/* VARÐA: the hub and the rooms. The eva house grammar (heavy mincho titles, all-caps condensed grotesque for the
   instruments, orange and red line work on black), from eva-coast's world, alert, enter and cards vignettes. */

* { box-sizing: border-box; }
html { background: var(--k); color: var(--w); scrollbar-color: var(--o-line) var(--k); }
body { margin: 0; font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--o); color: var(--k); }
:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
button { font: inherit; color: inherit; }
kbd { font: 700 10px/1 var(--cn); letter-spacing: .04em; padding: 2px 4px; border: 1px solid currentColor; opacity: .75; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cn { font-family: var(--cn); text-transform: uppercase; letter-spacing: .05em; }
.panel { background: #000; border: 1px solid var(--o-line); }
.tab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 10px 4px; background: var(--o); color: var(--k); font: 700 12px/1.1 var(--cn); text-transform: uppercase; letter-spacing: .05em; }
.tab h2 { font: inherit; }
.tab span:last-child { font-weight: 400; }
.tab.red { background: var(--r); }
.ico { width: .8em; height: .8em; vertical-align: -.02em; }
.anchor { width: 10px; height: 12px; flex: none; vertical-align: -1px; color: currentColor; }

/* live text */
.typed { position: relative; }
.typed[data-ghost]::before { content: attr(data-ghost); position: absolute; inset: 0; color: inherit; opacity: 0; pointer-events: none; animation: ghost .42s ease-out; }
@keyframes ghost { from { opacity: .45; filter: blur(.4px); } to { opacity: 0; filter: blur(1.5px); } }
.tail { white-space: nowrap; }
.cursor { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.16em; background: var(--o); animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* the alert grammar: a strip of honeycomb cells */
.hexes { display: block; flex: none; }
.hexes polygon { fill: none; stroke: var(--r); stroke-width: 1.6; }
.hexes text { fill: var(--r); font: 700 9.5px var(--cn); letter-spacing: .04em; }
.hexes.orange polygon { stroke: var(--o); }
.hexes.orange text { fill: var(--o); }

/* ------------------------------------------------------------------ the display */
.display { position: relative; height: 100vh; min-height: 720px; overflow: hidden; background: #000; --halo: 0 0 2px #000, 0 0 3px #000, 0 0 6px rgba(0, 0, 0, .85); }
.stage { position: absolute; inset: 0; }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#fx { pointer-events: none; }
.stage.over-angel { cursor: pointer; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.overlay .hidden { display: none; }
.labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.gl-note { display: none; }
.no-gl .gl-note { display: block; position: absolute; top: 44%; left: calc(var(--edge) + 380px); right: calc(var(--edge) + 520px); font: 700 13px/1.4 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-text); text-align: center; }
.no-gl .feed.live .scr::before { content: 'No signal'; position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px/1 var(--cn); text-transform: uppercase; letter-spacing: .2em; color: var(--o-dim); }
.no-gl .scopes, .no-gl .scale { display: none; }

/* the bar */
.bar { position: absolute; z-index: 8; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 20px; padding: 16px var(--edge) 0; pointer-events: none; }
.bar a, .bar button { pointer-events: auto; }
.ident { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark { width: 30px; height: 30px; color: var(--o); flex: none; display: block; }
.org { font: 700 15px/1 var(--cn); letter-spacing: .26em; color: var(--o); padding-right: 12px; border-right: 1px solid var(--o-line); }
.who { font: 900 27px/1 var(--mincho); text-transform: uppercase; color: #fff; display: inline-block; transform: scaleX(.78); transform-origin: 0 60%; margin-right: -2.6em; white-space: nowrap; }
.sector { flex: 1; font: 400 12px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); text-align: center; white-space: nowrap; text-shadow: var(--halo); }
.sector span { color: var(--o-text); margin-left: 10px; }
.cond { margin-left: auto; display: flex; align-items: baseline; gap: 9px; font: 400 11px/1 var(--cn); text-transform: uppercase; letter-spacing: .08em; color: var(--o-dim); white-space: nowrap; text-shadow: var(--halo); }
.cond b { padding: 6px 10px 5px; border: 1px solid var(--o); background: var(--o); font: 700 13px/1 var(--cn); letter-spacing: .12em; color: var(--k); text-shadow: none; animation: lamp 1.2s steps(1) infinite; }
body[data-cond="alert"] .cond b, body[data-cond="emergency"] .cond b { background: var(--r); border-color: var(--r); animation-duration: .5s; }
@keyframes lamp { 50% { background: #000; color: var(--o); } }
body[data-cond="alert"] .cond b, body[data-cond="emergency"] .cond b { animation-name: lamp-r; }
@keyframes lamp-r { 50% { background: #000; color: var(--r); } }
.radio, .resume { padding: 6px 10px 5px; border: 1px solid var(--o-line); background: #000; color: var(--o-text); font: 700 11.5px/1 var(--cn); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; text-decoration: none; white-space: nowrap; }
.radio b { color: var(--o-dim); margin-left: 4px; }
.radio[aria-pressed="true"] { border-color: var(--o); color: #fff; }
.radio[aria-pressed="true"] b { color: var(--o); }
.resume { color: #fff; border-color: var(--o); }
.resume span { color: var(--o); margin-left: 4px; }
.radio:hover, .resume:hover { background: var(--o-wash); }
.clock { display: flex; align-items: center; gap: 10px; }
.clock-label { font: 400 11px/1 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); text-shadow: var(--halo); }
.seg { width: 142px; height: 27px; display: block; contain: strict; }
.seg .s { fill: var(--o); opacity: .09; }
.seg .s.on { opacity: 1; }
.seg .cc .s.on { opacity: .55; }
.seg .colon { fill: var(--o); }

/* ------------------------------------------------------------------ the index */
.index, .track, .feeds { position: absolute; z-index: 6; }
.index { top: 72px; left: var(--edge); width: 350px; max-height: calc(100vh - 72px - 150px); display: flex; flex-direction: column; }
.list { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.rows { list-style: none; margin: 0; padding: 2px 0 4px; }
.rows .grp { padding: 8px 10px 2px; font: 700 10px/1 var(--cn); text-transform: uppercase; letter-spacing: .14em; color: var(--o-dim); }
.row { width: 100%; display: grid; grid-template-columns: 9px 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 10px 3px; border: 0; background: none; color: #fff; font: 700 12.5px/1.15 var(--cn); text-transform: uppercase; letter-spacing: .04em; text-align: left; cursor: pointer; }
.row .no { color: var(--o-dim); font-size: 11px; }
.row .nm { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; min-width: 0; }
.row .nm small { flex-basis: 100%; font: 400 10.5px/1.2 var(--cn); letter-spacing: .04em; color: var(--o-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm em, .tl em { font-style: normal; font-size: 9.5px; padding: 1px 4px 0; background: var(--r); color: var(--k); letter-spacing: .08em; }
.row .st { color: var(--o-text); font-weight: 400; font-size: 11px; white-space: nowrap; }
.row .anchor { color: var(--o-dim); }
.lamp { display: block; width: 7px; height: 7px; background: #3a1f08; transform: rotate(45deg); }
.lamp[data-c="W"] { background: #fff4de; }
.lamp[data-c="R"] { background: var(--r); }
.lamp[data-c="G"] { background: #46d27e; }
.row.angel .lamp { animation: lamp-dot 1.2s steps(1) infinite; }
@keyframes lamp-dot { 50% { background: #3a1f08; } }
.row.angel .nm { color: var(--r); }
.row.s-dormant .nm { color: var(--o-dim); }
.row.s-dormant .lamp { animation: fade 2.3s steps(1) infinite; }
.row.s-coming { color: var(--o-dim); }
.row.s-coming .lamp { background: none; border: 1px dashed var(--o-dim); }
.row.k-hq .lamp { transform: none; width: 9px; height: 8px; background: var(--r); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.row:hover { background: var(--o-wash); }
.row[aria-current] { background: var(--o); color: var(--k); }
.row[aria-current] .no, .row[aria-current] .st, .row[aria-current] small, .row[aria-current] .nm, .row[aria-current] .anchor { color: var(--k); }
.row[aria-current] .nm em { background: var(--k); color: var(--o); } /* no red chip on the orange row */
.row:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.legend { display: flex; justify-content: space-between; gap: 14px; padding: 6px 10px 7px; border-top: 1px solid var(--o-line); font: 400 10.5px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); }
.legend span { display: flex; align-items: center; gap: 7px; }
.lamp-key { display: inline-block; width: 7px; height: 7px; background: #fff4de; transform: rotate(45deg); }

/* ------------------------------------------------------------------ the monitors */
.feeds { top: 72px; right: var(--edge); width: 500px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.feed { position: relative; min-width: 0; border: 1px solid var(--o-line); background: #000; }
.feed .scr { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.feed .scr > * { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.feed video.graded { filter: url(#amber); }
.feed .scr::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px); pointer-events: none; }
.feed.cut .scr::before { content: ""; position: absolute; inset: 0; z-index: 2; background: #d8d0c0; mix-blend-mode: difference; animation: cut .16s steps(2) forwards; }
@keyframes cut { to { opacity: 0; } }
.feed figcaption { display: flex; align-items: baseline; gap: 8px; padding: 3px 6px 2px; border-top: 1px solid var(--o-line); font: 700 10px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); white-space: nowrap; overflow: hidden; }
.feed figcaption b { color: var(--o); overflow: hidden; text-overflow: ellipsis; }
.feed time { margin-left: auto; font-weight: 400; flex: none; }
/* a still, brought to life: slow drift, a flicker, film grain, an interference band rolling through now and then */
.feed.still video { visibility: hidden; }
.feed:not(.still) :is(img.still, .grain, .roll) { display: none; }
.feed img.still { animation: drift 38s ease-in-out var(--d, 0s) infinite alternate, flicker 9s steps(1) var(--d, 0s) infinite; transform: scale(1.08); }
/* the margin keeps a key light near the frame's top in view and never shows an edge (image x 2.5–99%, y 1.8–96.5%) */
@keyframes drift { from { transform: scale(1.06) translate(-2%, 1%); } to { transform: scale(1.1) translate(2%, -1%); } }
@keyframes flicker { 71% { opacity: .78; } 72% { opacity: 1; } 73% { opacity: .88; } 74% { opacity: 1; } }
.feed .scr > .grain { inset: -60px; width: auto; height: auto; opacity: .13; pointer-events: none; will-change: transform; animation: grain .6s steps(1) infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px; }
@keyframes grain { 20% { transform: translate(-30px, 18px); } 40% { transform: translate(22px, -34px); } 60% { transform: translate(-14px, 40px); } 80% { transform: translate(36px, 8px); } }
.feed .scr > .roll { bottom: auto; height: 26%; pointer-events: none; transform: translateY(-110%); animation: roll 11s linear var(--d, 0s) infinite;
  background: linear-gradient(to bottom, transparent, rgba(255, 190, 120, .1) 45%, rgba(0, 0, 0, .3) 60%, transparent); }
@keyframes roll { 0%, 78% { transform: translateY(-110%); } 100% { transform: translateY(420%); } }
/* every monitor is a way in (js/hub/hub.js): the whole screen is the button */
.door { position: absolute; inset: -1px; z-index: 3; display: block; padding: 0; border: 0; background: none; cursor: pointer; }
.door[hidden] { display: none; }
.door span { position: absolute; top: 6px; right: 6px; padding: 3px 6px 2px; background: var(--o); color: #050505; font: 700 10px/1 var(--cn); text-transform: uppercase; letter-spacing: .08em; opacity: 0; }
.door:hover, .door:focus-visible { box-shadow: inset 0 0 0 1px var(--o); }
.door:hover span, .door:focus-visible span { opacity: 1; }
.door:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

/* ------------------------------------------------------------------ the tracking card */
.track { right: var(--edge); width: 500px; top: 390px; max-height: calc(100vh - 390px - var(--edge)); display: flex; flex-direction: column; }
.t-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.t-body > * { flex-shrink: 0; }
.t-hex:empty { display: none; }
.t-hex .hexes { height: 30px; width: auto; }
.t-name { font: 900 38px/.92 var(--mincho); color: #fff; text-transform: uppercase; display: inline-block; transform: scaleX(.8); transform-origin: 0 50%; white-space: nowrap; }
.t-name.long { font-size: 30px; }
.t-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font: 400 11.5px/1.3 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); }
.t-sub b { color: var(--o-text); font-weight: 700; }
.t-sub b.blue { color: #7fb4ff; }
.t-sub .dot { width: 4px; height: 4px; background: var(--o-line); }
.t-sub .anchor { color: var(--o-text); margin-right: -3px; }
.t-visual { display: block; width: 100%; height: 118px; border-top: 1px solid var(--o-line); border-bottom: 1px solid var(--o-line); }
.t-visual[hidden] { display: none; }
.t-lore { font-size: 14px; line-height: 1.45; color: var(--w); min-height: 4.35em; }
.t-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 14px; padding-top: 9px; border-top: 1px solid var(--o-line); }
.t-stats dt { font: 400 10px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); }
.t-stats dd { font: 700 13px/1.25 var(--cn); color: #fff; overflow-wrap: anywhere; }
.t-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.t-act:empty { display: none; }
.go { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 7px; border: 0; background: var(--o); color: var(--k); font: 700 12.5px/1 var(--cn); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; cursor: pointer; white-space: nowrap; }
.go:hover { background: #fff; }
.go kbd { opacity: .7; }
.note { font: 400 11px/1.3 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); }
.track.angel .t-name { color: #fff; }
.track.angel { border-color: var(--r); }

/* ------------------------------------------------------------------ the lower left: view, alert, status, scale */
.scopes { position: absolute; z-index: 6; left: calc(var(--edge) + 362px); bottom: 84px; display: flex; border: 1px solid var(--o-line); background: #000; }
.scopes button { padding: 6px 10px 5px; border: 0; background: none; color: var(--o-text); font: 700 11px/1 var(--cn); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.scopes button + button { border-left: 1px solid var(--o-line); }
.scopes button[aria-pressed="true"] { background: var(--o); color: var(--k); }
.scopes button:hover:not([aria-pressed="true"]) { background: var(--o-wash); }
.status { position: absolute; z-index: 5; left: calc(var(--edge) + 362px); bottom: 54px; right: 540px; font-size: 12px; color: var(--o-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; text-shadow: var(--halo); }
.scale { position: absolute; z-index: 5; left: calc(var(--edge) + 362px); bottom: 28px; display: flex; align-items: center; gap: 12px; font: 400 11px/1 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-dim); pointer-events: none; text-shadow: var(--halo); }
.scale svg { overflow: visible; }
.scale path { fill: none; stroke: var(--o-text); stroke-width: 1.2; }
.alert { position: absolute; z-index: 7; right: var(--edge); top: 72px; width: 500px; display: flex; align-items: center; gap: 12px; padding: 9px 14px 9px 10px; border: 1px solid var(--r); background: rgba(0, 0, 0, .92); color: #fff; text-align: left; cursor: pointer; }
.alert[hidden] { display: none; }
.alert .hexes { height: 44px; width: auto; }
body:not([data-cond="contact"]) .alert .alert-hex { animation: honey 1s steps(1) infinite; }
@keyframes honey { 50% { opacity: .3; } }
.alert-txt { display: grid; gap: 3px; }
.alert b { font: 700 14px/1.1 var(--cn); text-transform: uppercase; letter-spacing: .06em; color: var(--r); }
.alert-txt span { font: 400 12px/1.25 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--o-text); }
.alert:hover { background: #1a0603; }
body[data-cond="emergency"] .display::after { content: ""; position: absolute; inset: 0; z-index: 9; border: 4px solid var(--r); pointer-events: none; animation: edge .5s steps(1) infinite; }
@keyframes edge { 50% { border-color: transparent; } }

/* ------------------------------------------------------------------ on the map */
/* every label reads on a black plate (stations, HQ, the sector) or inside a black halo (lights, summits, places,
   water); a selected label is a red plate with black type; no orange or red type ever sits on an orange/red fill */
.tl { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 6px; padding: 3px 6px 2px; background: rgba(0, 0, 0, .88); border: 1px solid var(--o-line); color: var(--o-text); font: 700 11px/1.1 var(--cn); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; pointer-events: auto; cursor: pointer; will-change: transform; }
.tl b { color: var(--o-dim); }
.tl i { font-style: normal; font-weight: 400; color: var(--o-dim); }
.tl.hover { border-color: var(--o); color: #fff; }
.tl.hidden { visibility: hidden; }
.tl.k-station, .tl.k-hq { display: grid; gap: 1px; padding: 3px 7px 3px; }
.tl .p { display: flex; align-items: baseline; gap: 6px; color: #fff; }
.tl .s { display: flex; gap: 6px; font-size: 10px; font-weight: 400; color: var(--o-dim); }
.tl .anchor { color: var(--o-text); align-self: center; }
.tl.k-hq { border-color: var(--o); }
.tl.k-hq .p b { color: var(--r); }
.tl.s-shipped { border-color: #7a4a1c; }
.tl.s-dormant { animation: decay 3.1s steps(1) infinite; }
.tl.s-dormant .p { color: var(--o-dim); }
@keyframes decay { 0%, 61%, 66%, 100% { opacity: 1; } 62%, 64% { opacity: .15; } 63% { opacity: .7; } 85% { opacity: .45; } 86% { opacity: 1; } }
.tl.lost { opacity: .5; text-decoration: line-through; }
.tl.s-coming { border-style: dashed; background: rgba(0, 0, 0, .82); }
.tl.s-coming .p { color: var(--o-dim); }
.tl.s-coming em { background: none; border: 1px solid var(--o-dim); color: var(--o-dim); }
.tl.on { background: var(--r); border-color: var(--r); }
.tl.on .p, .tl.on .s, .tl.on .p b, .tl.on i, .tl.on .anchor { color: #050505; }
.tl.on em { background: #050505; border-color: #050505; color: var(--r); }
.tl.k-light { padding: 0 0 3px 5px; background: none; border: 0; font-size: 10px; font-weight: 400; color: var(--o-dim); pointer-events: none; text-shadow: var(--halo); }
.tl.k-light:not(.major) { display: none; }
.tl.k-summit { padding: 0 0 2px 4px; background: none; border: 0; font-size: 10px; font-weight: 400; letter-spacing: .08em; color: #b8743a; pointer-events: none; text-shadow: var(--halo); }
.tl.k-place { padding: 0; background: none; border: 0; font-size: 11px; font-weight: 400; letter-spacing: .22em; color: #b06c30; pointer-events: none; text-shadow: var(--halo); }
.tl.k-place[data-id="Maine"], .tl.k-place[data-id="New Hampshire"] { font-size: 13px; letter-spacing: .5em; color: #a8662c; }
.tl.k-water { padding: 0; background: none; border: 0; font-size: 11.5px; font-weight: 400; letter-spacing: .36em; color: #ad6a30; pointer-events: none; text-shadow: var(--halo); }
.tl.k-sector { display: grid; gap: 1px; background: rgba(0, 0, 0, .88); border: 1px dashed var(--o-dim); color: var(--o-text); }
.tl.k-sector:hover { border-color: var(--o); }
.lead { stroke: var(--o-dim); stroke-width: 1; }
.lead.k-hq { stroke: var(--o); }
.lead.k-light, .lead.k-summit { stroke: #6b3a14; }
.glyph { fill: none; stroke: var(--o); stroke-width: 1.4; }
.glyph.k-hq { stroke: var(--r); stroke-width: 1.6; fill: rgba(255, 59, 34, .18); }
.glyph.t-fort { stroke: var(--o-text); }
.glyph.t-mountain { stroke: var(--o); fill: rgba(255, 138, 31, .16); }
.glyph.k-light { stroke: #8a4a16; }
.glyph.k-summit { stroke: #8a4a16; fill: none; }
.glyph.s-shipped { fill: rgba(255, 138, 31, .28); }
.glyph.new { stroke: var(--r); stroke-width: 1.8; }
.glyph.s-dormant { animation: decay 3.1s steps(1) infinite; stroke-dasharray: 3 2; }
.glyph.s-coming { stroke: var(--o-dim); stroke-dasharray: 2 2; }
.overlay .lamp { fill: #3a1f08; }
.overlay .lamp[data-c="W"] { fill: #fff4de; }
.overlay .lamp[data-c="R"] { fill: var(--r); }
.overlay .lamp[data-c="G"] { fill: #46d27e; }
.overlay .lamp.s-coming { fill: none; }

.overlay .contact-track { stroke: var(--r); stroke-width: 1.2; stroke-dasharray: 6 5; opacity: .8; }
.reticle { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; will-change: transform; }
.reticle.big { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.reticle.hidden { visibility: hidden; }
.reticle i { position: absolute; width: 10px; height: 10px; border: 0 solid var(--r); }
.reticle i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.reticle i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.reticle i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.reticle i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.reticle b { position: absolute; left: calc(100% + 8px); top: 4px; padding: 2px 5px 1px; background: rgba(0, 0, 0, .88); font: 700 10.5px/1 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: var(--r); white-space: nowrap; }
.reticle b:empty { display: none; }
.reticle .frame { position: absolute; inset: 0; }
.reticle.acquire .frame { animation: acquire .38s cubic-bezier(.16, 1, .3, 1); }
@keyframes acquire { from { transform: scale(2.6); opacity: .2; } }
@keyframes fade { 50% { opacity: .25; } }

/* ------------------------------------------------------------- entering: the dive, then the beats */
body.diving .index, body.diving .feeds, body.diving .track, body.diving .scopes, body.diving .alert, body.diving .status, body.diving .scale, body.diving .labels, body.diving .overlay { opacity: 0; transition: opacity .25s; }
.beat { position: fixed; inset: 0; z-index: 40; background: #000; }
.beat[hidden] { display: none; }
.sync { display: grid; grid-template-rows: auto 1fr auto; padding: 22px var(--edge) 26px; gap: 20px; }
.sync.iris { animation: iris .34s cubic-bezier(.55, 0, .85, .35) both; }
@keyframes iris { from { clip-path: circle(0 at var(--ox, 50%) var(--oy, 50%)); } to { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); } }
.sync-bar { display: flex; justify-content: space-between; gap: 20px; padding: 6px 10px 5px; background: var(--o); color: var(--k); font: 700 13px/1.1 var(--cn); text-transform: uppercase; letter-spacing: .06em; }
.sync-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; min-height: 0; }
.sync-left { display: grid; gap: 10px; }
.sync-label { font-size: 12px; color: var(--o-dim); }
.ratio { font: 700 184px/.82 var(--cn); color: #fff; letter-spacing: -.02em; }
.ratio span { font-size: 64px; color: var(--o); margin-left: 6px; }
.harm { display: block; width: 100%; height: 110px; border-top: 1px solid var(--o-line); border-bottom: 1px solid var(--o-line); }
.sync .legend { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; color: #fff; justify-content: flex-start; }
.sync .legend i { display: inline-block; width: 18px; height: 2px; margin-left: 8px; }
.sync .legend i:first-child { margin-left: 0; }
.sync .legend span { color: var(--o-dim); }
.h-run { background: #ff8a1f; } .h-lift { background: #f3eee6; } .h-yoga { background: #c9772f; }
.roll { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font: 700 17px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .06em; color: var(--o-text); }
.roll li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; white-space: nowrap; }
.roll li span:first-child { color: var(--o-dim); font-weight: 400; }
.roll li span:last-child { overflow: hidden; text-overflow: ellipsis; }
.roll li.ok span:last-child { color: #fff; }
.cells { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 4px; height: 20px; }
.cells i { background: var(--o-line); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.cells i.on { background: var(--o); }
.complete { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 26px var(--edge) 22px; background: var(--o); overflow: hidden; }
.complete[hidden] { display: none; }
.complete b { display: block; font: 900 min(120px, 7.4vw)/.86 var(--mincho); text-transform: uppercase; color: var(--k); transform: scaleX(.72); transform-origin: 0 50%; white-space: nowrap; }

/* title cards: classic entry (black) and red emergency */
.card { display: flex; align-items: center; padding-left: 12vw; overflow: hidden; }
.card svg { display: block; overflow: visible; position: relative; z-index: 1; }
.card text { fill: #fff; }
.card .mincho { font-family: var(--mincho); font-weight: 900; }
.card .heros { font-family: var(--cn); font-weight: 700; }
.card.invert { background: #fff; }
.card.invert text { fill: #000; }
.alarm-word, .alarm-rail { display: none; }
.card.red { background: var(--r); }
.card.red text { fill: #000; }
.card.red text.ep, .card.red text.foot { fill: #fff; }
.card.red .alarm-word { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; color: rgba(0, 0, 0, .11); font: 900 min(26vw, 330px)/1 var(--cn); letter-spacing: -.04em; transform: scaleX(.76); white-space: nowrap; pointer-events: none; }
.card.red .alarm-rail { display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: 31px; align-items: center; overflow: hidden; background: #000; color: #fff; font: 700 12px/1 var(--cn); letter-spacing: .15em; white-space: nowrap; }
.card.red .alarm-rail span { min-width: max-content; animation: rail 9s linear infinite; }
@keyframes rail { to { transform: translateX(-100%); } }
.card.red.invert { background: #fff; }

/* ------------------------------------------------------------------ rooms */
.room-page { display: flex; flex-direction: column; min-height: 100vh; }
.room-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 10px var(--edge); border-bottom: 1px solid var(--o-line); background: #000; font: 400 13px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .05em; }
.room-bar .mark { width: 26px; height: 26px; }
.room-id { display: flex; align-items: baseline; gap: 10px; color: var(--o-dim); white-space: nowrap; }
.room-id b { color: #fff; }
.room-where { color: var(--o-text); font-size: 12px; white-space: nowrap; }
.room-cam { display: flex; align-items: center; gap: 7px; padding: 4px 8px 3px; border: 1px solid var(--o-line); color: var(--o); font-size: 11.5px; letter-spacing: .06em; white-space: nowrap; }
.room-cam i { width: 6px; height: 6px; border-radius: 50%; background: var(--r); }
.room-state { flex: 1; color: var(--o-dim); font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.return { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 6px; border: 0; background: var(--o); color: var(--k); font: 700 13px/1 var(--cn); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.return:hover { background: #fff; }
.return:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.room-body { position: relative; flex: 1; min-height: 0; }
body.in-frame { height: 100vh; overflow: hidden; }
.room-body iframe.live { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.brief { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; max-width: 1360px; margin: 0 auto; padding: 40px var(--edge) 64px; }
.brief-ep { display: flex; align-items: baseline; gap: 12px; font: 700 12px/1 var(--cn); text-transform: uppercase; letter-spacing: .12em; color: var(--o); }
.brief-ep .k { font: 900 30px/1 var(--mincho); letter-spacing: 0; color: #fff; }
.brief-title { margin-top: 16px; font: 900 clamp(64px, 9vw, 132px)/.8 var(--mincho); letter-spacing: -.02em; text-transform: uppercase; color: #fff; transform: scaleX(.74); transform-origin: 0 50%; width: 135%; }
.brief-eng { margin-top: 18px; padding-top: 10px; border-top: 2px solid #fff; font: 700 clamp(13px, 1.4vw, 18px)/1.15 var(--cn); text-transform: uppercase; letter-spacing: .05em; color: #fff; max-width: 60ch; }
.brief-lore { margin-top: 26px; font-size: 19px; line-height: 1.5; max-width: 58ch; }
.brief-plain { margin-top: 12px; font-size: 14.5px; line-height: 1.5; color: var(--o-text); max-width: 62ch; }
.brief-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--o-line); }
.brief-stats dt, .brief-station dt { font: 400 10.5px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .06em; color: var(--o-dim); }
.brief-stats dd { margin-top: 3px; font: 700 17px/1.2 var(--cn); color: #fff; }
.brief-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.go.ghost { border: 1px solid var(--o-line); background: none; color: var(--o-text); }
.go.ghost:hover { border-color: var(--o); background: var(--o-wash); color: #fff; }
.brief-side { display: grid; gap: 14px; align-content: start; }
.brief-side .feed figcaption { font-size: 11px; }
.brief-station { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; padding: 12px 14px; border: 1px solid var(--o-line); }
.brief-station dd { margin-top: 2px; font: 700 14px/1.3 var(--cn); color: #fff; }
.brief-station .wide { grid-column: 1 / -1; }
.brief-station .wide dd { font: 400 14px/1.45 var(--sans); color: var(--w); }
.brief-status { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--o-line); }
.brief-status p { display: flex; align-items: center; gap: 8px; font: 700 13px/1.2 var(--cn); text-transform: uppercase; letter-spacing: .06em; color: var(--o-text); }
.brief-status.s-live b { color: #fff; }
.brief-status.s-dormant b { color: var(--o-dim); }
.field span { font-weight: 400; font-size: 11px; color: var(--o-dim); }
.field i { flex: 1; height: 8px; background: linear-gradient(90deg, var(--o) var(--f), var(--o-line) var(--f)); }
@media (max-width: 900px) {
  .room-bar { flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; }
  .room-where, .room-state { display: none; }
  .room-cam { order: 9; flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; }
  .room-id { flex: 1; }
  .brief { grid-template-columns: 1fr; gap: 28px; padding: 24px 16px 48px; }
  .brief-title { font-size: 64px; }
  .brief-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1280px) {
  .index { width: 320px; }
  .feeds, .track { width: 440px; }
  .track { top: 356px; max-height: calc(100vh - 356px - var(--edge)); }
  .scopes, .status, .scale { left: calc(var(--edge) + 332px); }
  .alert { width: 440px; }
  .status { right: 480px; }
  .sector { display: none; }
  .no-gl .gl-note { left: calc(var(--edge) + 340px); right: calc(var(--edge) + 460px); }
}
@media (max-width: 900px) {
  .display { height: auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; gap: 10px; padding: 60px 10px 18px; }
  .stage { position: relative; inset: auto; height: 58vh; min-height: 360px; order: 1; margin: 0 -10px; }
  .bar { padding: 12px 12px 0; gap: 10px; }
  .sector, .clock, .cond span, .who { display: none; }
  .org { border-right: 0; padding-right: 0; }
  .resume span { display: none; }
  .index, .track, .feeds { position: relative; inset: auto; width: auto; max-height: none; }
  .track { order: 2; top: auto; }
  .alert { position: relative; inset: auto; width: auto; order: 3; }
  .index { order: 4; }
  .feeds { order: 5; top: auto; right: auto; }
  .feed.live { display: none; }
  .scopes { position: absolute; left: 10px; bottom: auto; top: calc(58vh + 60px - 40px); z-index: 7; }
  .status, .scale { display: none; }
  .no-gl .gl-note { left: 10%; right: 10%; }
  .t-name { font-size: 30px; white-space: normal; transform: none; }
  .t-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ratio { font-size: 104px; }
  .sync-main { grid-template-columns: 1fr; gap: 18px; }
  .roll { font-size: 12.5px; }
  .roll li { grid-template-columns: 90px minmax(0, 1fr); }
  .card { padding-left: 8vw; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .typed[data-ghost]::before, .cond b, .row.angel .lamp, .row.s-dormant .lamp, .tl.s-dormant, .glyph.s-dormant, .reticle.acquire .frame, .feed.cut .scr::before,
  .feed img.still, .feed .grain, .feed .roll,
  .alert .alert-hex, body[data-cond="emergency"] .display::after, .card.red .alarm-rail span, .sync.iris { animation: none !important; }
}
