/* ──────────────────────────────────────────────────────────────
   LANCEWHITAKER.COM — LCARS-style interface (fan-inspired)
   ────────────────────────────────────────────────────────────── */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #ff9d1f; }

:root {
  /* palette */
  --orange: #ff9d1f;
  --peach:  #ffc99a;
  --lilac:  #cc99cc;
  --peri:   #9aa0ff;
  --sky:    #8fc8ff;
  --rose:   #e0766d;
  --dusk:   #8a79c0;
  --text:   #efe6dc;
  --dim:    #a69d94;

  /* frame geometry */
  --rail: 200px;   /* sidebar width = elbow stem width */
  --bar: 34px;     /* thickness of top / bottom bars */
  --eh: 132px;     /* top elbow height */
  --ebh: 92px;     /* bottom elbow height */
  --gap: 6px;
  --R: 96px;       /* elbow outer radius */
  --r: 34px;       /* elbow inner radius */

  --display: 'Antonio', 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: 'Barlow Semi Condensed', 'Arial Narrow', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .9, .24, 1);
  color-scheme: dark;
}

/* RED ALERT (konami code) — same layout, different blood */
:root[data-alert] {
  --orange: #ff3b30; --peach: #ff9a8a; --lilac: #c4384a; --peri: #ff6a4d;
  --sky: #ff8f70; --rose: #ff3b30; --dusk: #8f2a38; --text: #ffe3dc; --dim: #c49a94;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #000; }
body {
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #000; }
a { color: inherit; }
.muted { color: var(--dim); }

/* ───────── frame ───────── */
.frame {
  position: fixed; inset: 0;
  transition: --accent .6s ease;
  background:
    radial-gradient(900px 600px at 78% 12%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    radial-gradient(700px 500px at 20% 100%, rgba(154,160,255,.06), transparent 70%),
    #000;
}

/* elbows — the signature L-shapes */
.elbow { position: absolute; left: 0; width: var(--rail); background: var(--c); }
.elbow--t { top: 0; height: var(--eh); border-top-left-radius: var(--R); --c: var(--accent); }
.elbow--b { bottom: 0; height: var(--ebh); border-bottom-left-radius: var(--R); --c: var(--lilac); }
/* inner (concave) curve where stem meets bar */
.elbow::after { content: ""; position: absolute; left: 100%; width: var(--r); height: var(--r); }
.elbow--t::after {
  top: var(--bar);
  background: radial-gradient(circle at 100% 100%, transparent calc(var(--r) - .5px), var(--c) var(--r));
}
.elbow--b::after {
  bottom: var(--bar);
  background: radial-gradient(circle at 100% 0%, transparent calc(var(--r) - .5px), var(--c) var(--r));
}
.elbow__label {
  position: absolute; right: 14px;
  font: 600 26px/1 var(--display); letter-spacing: .06em; color: #000;
  font-variant-numeric: tabular-nums;
}
.elbow--t .elbow__label { bottom: 10px; }
.elbow--b .elbow__label { top: 10px; }

/* horizontal bars */
.topbar, .botbar { position: absolute; left: var(--rail); right: 0; height: var(--bar); display: flex; gap: var(--gap); }
.topbar { top: 0; }
.botbar { bottom: 0; }
.seg { display: block; height: 100%; background: var(--c); flex: none; }
.seg--a { width: 150px; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px;
  font: 600 22px/1 var(--display); color: #000; }
.seg--b { width: 54px; }
.seg--d { width: 110px; }
.seg--cap { width: 46px; border-radius: 0 999px 999px 0; }
.seg--title {
  flex: 1 1 auto; min-width: 0; background: none;
  display: flex; align-items: center; gap: 14px; padding: 0 10px;
  font: 500 20px/1 var(--display); letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap; overflow: hidden;
}
.seg--title .sep { opacity: .5; }
.seg--title::after { content: ""; flex: 1; min-width: 20px; height: 3px; background: linear-gradient(90deg, currentColor, transparent); }
.botbar .seg--title { color: var(--dim); font-size: 15px; letter-spacing: .24em; }

/* sidebar rail */
.rail {
  position: absolute; left: 0; width: var(--rail);
  top: calc(var(--eh) + var(--gap)); bottom: calc(var(--ebh) + var(--gap));
  display: flex; flex-direction: column; gap: var(--gap);
}
.rbtn {
  flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  height: 56px; padding: 0 12px 7px; border: 0; border-radius: 0;
  background: var(--c); color: #000; text-decoration: none; cursor: pointer;
  font: 600 22px/1 var(--display); letter-spacing: .05em; text-transform: uppercase;
  transition: filter .2s, border-radius .35s var(--ease), background-color .3s;
}
.rbtn__n { opacity: .65; font-weight: 500; }
.rbtn:hover { filter: brightness(1.18); border-radius: 0 14px 14px 0; }
.rbtn[aria-current="page"] { background: color-mix(in srgb, var(--c) 52%, #fff); border-radius: 0 30px 30px 0; }
.rbtn:focus-visible, .pill:focus-visible, .tile:focus-visible, .chan:focus-visible, .fbtn:focus-visible,
.card__link:focus-visible, .gate__btn:focus-visible, .gate__alt:focus-visible, .op__name:focus-visible {
  outline: 3px solid #fff; outline-offset: 3px;
}
.rbtn--util { height: 38px; font-size: 17px; --c: var(--dusk); justify-content: flex-end; }
.rbtn--util[aria-pressed="true"] { --c: var(--lilac); }
.rdecor { flex: none; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 10px 4px;
  background: var(--c); font: 500 14px/1 var(--display); letter-spacing: .1em; color: #000; }
.rpad { flex: 1 1 0; min-height: 0; background: var(--dusk); opacity: .9; }

/* ───────── stage (content region) ───────── */
.stage {
  position: absolute;
  left: calc(var(--rail) + 40px); right: 32px;
  top: calc(var(--bar) + 22px); bottom: calc(var(--bar) + 18px);
  display: flex; flex-direction: column; min-height: 0;
}
.stage.is-off { opacity: 0; pointer-events: none; }
.stage__head { flex: none; padding-bottom: 14px; }
.stage__row { display: flex; align-items: flex-end; gap: 16px; }
.stage__num {
  align-self: center; height: 40px; padding: 0 14px 0 18px; display: grid; place-items: center;
  background: var(--accent); color: #000; border-radius: 999px 0 0 999px;
  font: 600 24px/1 var(--display); letter-spacing: .06em;
}
.stage__title {
  margin: 0; font: 600 clamp(40px, 5.4vw, 64px)/.95 var(--display);
  letter-spacing: .03em; text-transform: uppercase; color: var(--accent);
  text-shadow: 0 0 26px color-mix(in srgb, var(--accent) 45%, transparent);
}
.stage__title:focus, .stage__title:focus-visible { outline: none; }
.stage__meta {
  margin-left: auto; padding-bottom: 6px; text-align: right;
  font: 500 16px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--dim);
}
.stage__rule { display: flex; align-items: center; gap: var(--gap); margin-top: 10px; }
.stage__rule i { display: block; height: 8px; background: var(--accent); }
.stage__rule i:nth-child(1) { width: 140px; }
.stage__rule i:nth-child(2) { width: 38px; background: var(--lilac); }
.stage__rule i:nth-child(3) { width: 38px; background: var(--peri); }
.stage__rule i:nth-child(4) { flex: 1; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .6; }

.stage__body {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 18px 10px 24px 2px;
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  transition: opacity .16s, transform .16s;
}
.stage__body.leaving { opacity: 0; transform: translateX(14px); }

.view { display: none; }
.view.is-active { display: block; }

/* section label */
.sec {
  display: flex; align-items: center; gap: 16px; margin: 30px 0 16px;
  font: 500 20px/1 var(--display); letter-spacing: .26em; text-transform: uppercase; color: var(--lilac);
}
.sec:first-child { margin-top: 4px; }
.sec::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--lilac), transparent); opacity: .5; }

/* shared pill */
.pill {
  display: inline-flex; align-items: center; height: 46px; padding: 0 28px;
  border-radius: 999px; background: var(--c, var(--orange)); color: #000; text-decoration: none; border: 2px solid var(--c, var(--orange));
  font: 600 18px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  transition: filter .2s, transform .2s var(--ease), background-color .2s;
}
.pill:hover { filter: brightness(1.15); transform: translateX(3px); }
.pill--ghost { background: transparent; color: var(--c); }
.pill--ghost:hover { background: color-mix(in srgb, var(--c) 16%, transparent); }
.pill--sm { height: 36px; padding: 0 20px; font-size: 15px; }

/* ───────── BRIDGE ───────── */
.bridge { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.eyebrow { margin: 0 0 12px; font: 500 16px/1 var(--display); letter-spacing: .38em; text-transform: uppercase; color: var(--lilac); }
.hero__name { margin: 0; font: 700 clamp(60px, 9.4vw, 142px)/.86 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.hero__name span { display: block; }
.hero__name .l1 { color: var(--peach); }
.hero__name .l2 { color: var(--orange); text-shadow: 0 0 40px color-mix(in srgb, var(--orange) 28%, transparent); }
.hero__role { margin: 18px 0 0; font: 500 clamp(18px, 1.9vw, 26px)/1.2 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--sky); }
.hero__role i { font-style: normal; color: var(--lilac); margin: 0 .1em; }
.hero__blurb { margin: 18px 0 26px; max-width: 46ch; font-size: 19px; line-height: 1.5; color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.scope { min-width: 0; }
.scope__ring { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; }
.scope__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scope__ring svg * { fill: none; }
.sweep {
  position: absolute; inset: 9%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 290deg, color-mix(in srgb, var(--accent) 42%, transparent) 360deg);
  animation: spin 5.5s linear infinite;
}
.sweep::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 50%; background: var(--accent); opacity: .9; transform: translateX(-1px); }
.scope__core { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.scope__core b { font: 700 clamp(64px, 8vw, 104px)/1 var(--display); color: var(--peach); text-shadow: 0 0 30px color-mix(in srgb, var(--peach) 35%, transparent); }
.scope__core span { margin-top: 2px; font: 500 14px/1 var(--display); letter-spacing: .32em; text-transform: uppercase; color: var(--sky); text-shadow: 0 0 6px #000, 0 0 10px #000; }
.r1 { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 9; transform-origin: 200px 200px; animation: spin 90s linear infinite; }
.r2 { stroke: var(--lilac); stroke-width: 10; stroke-dasharray: 90 40 28 40; transform-origin: 200px 200px; animation: spin 40s linear infinite reverse; }
.r3 { stroke: var(--peri); stroke-width: 2; }
.r4 { stroke: var(--sky); stroke-width: 4; stroke-dasharray: 42 24; transform-origin: 200px 200px; animation: spin 24s linear infinite; }
.r5 { stroke: var(--peach); stroke-width: 1.5; opacity: .8; }
.r6 { stroke: var(--accent); stroke-width: 4; }
.blip { fill: var(--sky) !important; animation: blip 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.blip:nth-of-type(2) { animation-delay: .9s; fill: var(--peach) !important; }
.blip:nth-of-type(3) { animation-delay: 1.7s; fill: var(--lilac) !important; }

.readouts { list-style: none; margin: 22px auto 0; padding: 0; display: grid; gap: 6px; max-width: 380px; }
.readouts li { display: flex; align-items: center; gap: 10px; font: 500 16px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.readouts li span { flex: none; width: 128px; padding: 4px 12px 3px; text-align: right; background: var(--c); color: #000; border-radius: 999px 0 0 999px; }
.readouts li b { font-weight: 500; color: var(--c); font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 34px; }
.tile {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 120px; padding: 14px 18px 12px;
  background: var(--c); color: #000; text-decoration: none; border-top-left-radius: 38px;
  transition: filter .2s, transform .25s var(--ease);
}
.tile:nth-child(2) { border-top-left-radius: 0; border-top-right-radius: 38px; }
.tile:nth-child(3) { border-top-left-radius: 0; border-bottom-right-radius: 38px; }
.tile:hover { filter: brightness(1.14); transform: translateY(-3px); }
.tile small { font: 500 15px/1 var(--display); letter-spacing: .2em; opacity: .7; text-transform: uppercase; }
.tile b { font: 700 44px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.tile span { font: 500 16px/1.25 var(--body); opacity: .82; }

/* ───────── PROJECTS ───────── */
.filters { display: flex; flex-wrap: wrap; gap: var(--gap); margin-bottom: 8px; }
.fbtn {
  height: 34px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--accent) 18%, #000); color: var(--accent);
  font: 600 15px/1 var(--display); letter-spacing: .18em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.fbtn:hover { background: color-mix(in srgb, var(--accent) 34%, #000); }
.fbtn[aria-pressed="true"] { background: var(--accent); color: #000; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 40px 24px; padding-top: 34px; }
.card {
  --c: var(--orange);
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 196px; cursor: pointer;
  padding: 16px 18px 14px 20px;
  border-left: 14px solid var(--c); border-top: 26px solid var(--c); border-top-left-radius: 36px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 62%);
  transition: transform .25s var(--ease), filter .2s;
}
.card[hidden] { display: none; }
.card:hover { transform: translateY(-3px); filter: brightness(1.12); }
.card__head {
  position: absolute; top: -26px; left: 0; right: 0; height: 26px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 26px;
  color: #000; font: 600 16px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
}
.card h3 { margin: 0; font: 600 28px/1.05 var(--display); letter-spacing: .03em; text-transform: uppercase; color: var(--c); }
.card p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--text); }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); }
.tag { padding: 3px 11px 2px; border: 1px solid var(--c); border-radius: 999px; font: 500 13px/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--c); }
.card__link { font: 600 15px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--c); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: -26px 0 0 -14px; } /* whole card is the hit area */
.card:hover .card__link { text-decoration: underline; text-underline-offset: 4px; }

/* ───────── PROJECT DOSSIER ───────── */
.back { margin-bottom: 4px; }
.dossier { --c: var(--lilac); display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; margin-top: 22px; }
.dossier__side { display: grid; align-content: start; gap: 14px; }
.dossier__cap {
  height: 128px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 8px 18px;
  background: var(--c); color: #000; border-top-left-radius: 56px;
  font: 700 84px/.8 var(--display); letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.readouts--spec { margin: 0; max-width: none; }
.readouts--spec li span { width: 104px; }
.dossier__name { margin: 0; font: 700 clamp(38px, 4.8vw, 66px)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; color: var(--c);
  text-shadow: 0 0 34px color-mix(in srgb, var(--c) 32%, transparent); }
.dossier__sum { margin: 14px 0 0; max-width: 52ch; font-size: 21px; line-height: 1.45; }
.dossier__main .sec { color: var(--c); }
.dossier__main .sec::after { background: linear-gradient(90deg, var(--c), transparent); }
.dossier__main p { max-width: 62ch; line-height: 1.55; }
.dossier__main .brief p { margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips .tag { font-size: 16px; padding: 5px 16px 4px; }
.links { display: flex; flex-wrap: wrap; gap: 12px; }
.dnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 38px; }
.dnav .tile { min-height: 92px; }
.dnav .tile b { font-size: 30px; }
.dnav .tile:nth-child(1) { border-top-left-radius: 38px; border-top-right-radius: 0; }
.dnav .tile:nth-child(2) { border-top-left-radius: 0; border-top-right-radius: 38px; border-bottom-right-radius: 0; text-align: right; align-items: flex-end; }

/* ───────── ACTIVE ───────── */
.ops { display: grid; gap: 18px; }
.op { display: grid; grid-template-columns: 230px minmax(0, 1fr) 86px; align-items: center; gap: 14px; row-gap: 6px; }
.op__name { padding: 7px 14px 5px; background: var(--c); color: #000; border-radius: 999px 0 0 999px; text-align: right; text-decoration: none;
  font: 600 20px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; transition: filter .2s; }
a.op__name:hover { filter: brightness(1.15); }
.op__meter { height: 24px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.09) 0 12px, transparent 12px 16px); }
.op__fill { display: block; height: 100%; width: var(--p); background: repeating-linear-gradient(90deg, var(--c) 0 12px, transparent 12px 16px); animation: fill 1.2s .45s var(--ease) backwards; }
.op__val { font: 600 34px/1 var(--display); color: var(--c); text-align: right; font-variant-numeric: tabular-nums; }
.op__val small { font-size: 18px; opacity: .7; }
.op__note { grid-column: 2 / -1; font-size: 15px; color: var(--dim); }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.log li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: start; }
.log time { padding: 5px 12px 3px; background: var(--c); color: #000; border-radius: 999px 0 0 999px; text-align: right;
  font: 600 17px/1.1 var(--display); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.log p { margin: 0; padding-top: 2px; font-size: 17px; line-height: 1.45; }
.log p b { font: 600 17px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); margin-right: 6px; }

/* ───────── COMMS ───────── */
.chans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.chan {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 150px; padding: 14px 18px 14px;
  background: var(--c); color: #000; text-decoration: none; border-top-right-radius: 44px;
  transition: filter .2s, transform .25s var(--ease);
}
.chan:nth-child(1) { border-top-left-radius: 44px; border-top-right-radius: 0; }
.chan:nth-child(3) { border-bottom-right-radius: 44px; border-top-right-radius: 0; }
.chan:hover { filter: brightness(1.14); transform: translateY(-3px); }
.chan small { font: 500 15px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; opacity: .7; }
.chan b { font: 700 46px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.chan span { font: 500 17px/1.2 var(--body); opacity: .85; }
.transmission { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.transmission p { margin: 0; max-width: 56ch; font-size: 19px; line-height: 1.5; }
.transmission .pill { justify-self: start; }

/* ───────── engage gate (first-visit audio unlock) ───────── */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000;
  transition: opacity .4s ease, visibility .4s;
}
.gate[hidden] { display: none; }
.gate.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.no-gate .gate { display: none; }
.gate__box { display: grid; justify-items: center; gap: 18px; padding: 24px; text-align: center; width: min(520px, 100%); }
.gate__bar { display: flex; gap: var(--gap); height: 12px; width: 100%; }
.gate__bar i { display: block; background: var(--c); flex: var(--w, 1); animation: wipeX .9s var(--ease) backwards; animation-delay: calc(var(--k, 0) * 90ms); }
.gate__bar i:first-child { border-radius: 999px 0 0 999px; }
.gate__bar i:last-child { border-radius: 0 999px 999px 0; }
.gate__eyebrow { margin: 10px 0 0; font: 500 16px/1 var(--display); letter-spacing: .4em; text-transform: uppercase; color: var(--lilac); }
.gate__title { margin: 0; font: 700 clamp(44px, 9vw, 78px)/.9 var(--display); text-transform: uppercase; color: var(--orange);
  text-shadow: 0 0 40px color-mix(in srgb, var(--orange) 30%, transparent); }
.gate__btn {
  margin-top: 12px; height: 62px; padding: 0 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--orange); color: #000; font: 700 26px/1 var(--display); letter-spacing: .26em; text-transform: uppercase;
  animation: ring 1.8s ease-out infinite; transition: filter .2s, transform .2s var(--ease);
}
.gate__btn:hover { filter: brightness(1.15); transform: scale(1.03); }
.gate__alt { border: 0; background: none; cursor: pointer; padding: 8px 14px; color: var(--dim);
  font: 500 15px/1 var(--display); letter-spacing: .26em; text-transform: uppercase; }
.gate__alt:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }
.gate__note { margin: 0; font: 500 14px/1.4 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }

/* ───────── motion ───────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.4); } }
@keyframes fill { from { width: 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orange) 50%, transparent); } 100% { box-shadow: 0 0 0 26px transparent; } }
@keyframes alertPulse { 0%, 100% { filter: none; } 50% { filter: brightness(.38); } }
@keyframes wipeX { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -60px 0 0); } }
@keyframes flash { from { filter: brightness(2.6) saturate(.5); } to { filter: brightness(1) saturate(1); } }
@keyframes enter {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateX(-22px); }
  to   { opacity: 1; clip-path: inset(-24px -24px -24px -24px); transform: none; }
}

/* boot sequence: elbows, then bars, then rail, then bottom — all sweep outward */
.boot .elbow--t { animation: wipeX .55s .10s var(--ease) backwards, flash .7s .35s ease-out backwards; }
.boot .topbar   { animation: wipeX .85s .45s var(--ease) backwards, flash .7s .9s ease-out backwards; }
.boot .rbtn, .boot .rdecor, .boot .rpad
                { animation: wipeX .45s calc(.62s + var(--i, 0) * 70ms) var(--ease) backwards, flash .6s calc(.9s + var(--i, 0) * 70ms) ease-out backwards; }
.boot .elbow--b { animation: wipeX .55s .95s var(--ease) backwards, flash .7s 1.2s ease-out backwards; }
.boot .botbar   { animation: wipeX .85s 1.05s var(--ease) backwards, flash .7s 1.5s ease-out backwards; }

:root[data-alert] .elbow--t, :root[data-alert] .seg--cap { animation: alertPulse 1.1s steps(1) infinite; }

.swap .stage__num   { animation: enter .5s var(--ease) backwards; }
.swap .stage__title { animation: enter .6s .05s var(--ease) backwards; }
.swap .stage__meta  { animation: enter .6s .15s var(--ease) backwards; }
.swap .stage__rule i { animation: wipeX .7s var(--ease) backwards; }
.swap .stage__rule i:nth-child(2) { animation-delay: .08s; }
.swap .stage__rule i:nth-child(3) { animation-delay: .16s; }
.swap .stage__rule i:nth-child(4) { animation-delay: .24s; }

.view.is-active [data-s] { animation: enter .65s calc(.12s + var(--i, 0) * 65ms) var(--ease) backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sweep, .r1, .r2, .r4, .blip { animation: none !important; }
}

/* ───────── responsive ───────── */
@media (max-width: 1180px) {
  .scope__ring { width: min(100%, 320px); }
  .readouts { max-width: 320px; }
  .readouts li span { width: 112px; }
  .dossier { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 900px) {
  .bridge { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .scope__ring { width: min(80%, 320px); }
  .dossier { grid-template-columns: minmax(0, 1fr); }
  .dossier__cap { height: 84px; font-size: 60px; border-top-left-radius: 44px; }
}
@media (max-height: 660px) { .rdecor { display: none; } }

@media (max-width: 760px) {
  :root { --rail: 64px; --bar: 26px; --eh: 78px; --ebh: 58px; --R: 56px; --r: 22px; --gap: 5px; }
  body { font-size: 16px; }
  .elbow__label, .rdecor, .rbtn--util, .seg--d, .seg--title .sep, .seg--title .t2 { display: none; }
  .seg--a { width: 100%; max-width: 70px; font-size: 18px; padding-right: 8px; }
  .seg--b { width: 26px; }
  .seg--cap { width: 30px; }
  .seg--title { font-size: 14px; letter-spacing: .16em; padding: 0 6px; gap: 8px; }
  .botbar .seg--title { font-size: 11px; letter-spacing: .1em; }
  .rbtn { height: 50px; padding: 0 6px 6px; justify-content: center; align-items: center; font-size: 20px; }
  .rbtn__l { display: none; }
  .rbtn__n { opacity: 1; }
  .rbtn[aria-current="page"] { border-radius: 0 20px 20px 0; }
  .stage { left: calc(var(--rail) + 16px); right: 14px; top: calc(var(--bar) + 14px); bottom: calc(var(--bar) + 10px); }
  .stage__row { flex-wrap: wrap; gap: 8px 12px; }
  .stage__num { height: 32px; font-size: 20px; }
  .stage__meta { margin-left: 0; width: 100%; text-align: left; font-size: 13px; padding-bottom: 0; order: 3; }
  .stage__rule i:nth-child(1) { width: 70px; }
  .stage__body { padding-right: 4px; }
  .hero__blurb { font-size: 17px; }
  .tiles, .chans, .dnav { grid-template-columns: 1fr; }
  .tile, .chan { min-height: 96px; border-radius: 0 !important; border-top-left-radius: 34px !important; }
  .dnav .tile:nth-child(2) { text-align: left; align-items: flex-start; }
  .tile b, .chan b { font-size: 38px; }
  .dnav .tile b { font-size: 28px; }
  .op { grid-template-columns: minmax(0, 1fr) 70px; }
  .op__name { grid-column: 1 / -1; text-align: left; border-radius: 0 999px 999px 0; }
  .op__meter { grid-column: 1; }
  .op__note { grid-column: 1 / -1; }
  .log li { grid-template-columns: 1fr; gap: 6px; }
  .log time { text-align: left; border-radius: 0 999px 999px 0; justify-self: start; }
  .transmission { grid-template-columns: 1fr; }
  .grid { gap: 40px 16px; }
  .gate__btn { padding: 0 44px; }
}
