:root {
  --lab: #05080a;
  --steel: #11171a;
  --steel-2: #1a2226;
  --line: rgba(150, 255, 200, 0.2);
  --ph: #66f5aa;
  --ph-dim: #38b87a;
  --amber: #ffb43a;
  --white: #eaf5ef;
  --mut: #9bb3a8;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ed-fg: var(--white);
  --ed-bg: rgba(8, 12, 13, 0.8);
  --ed-line: var(--line);
  --ed-accent: var(--amber);
  --ed-font: var(--mono);
  --ed-radius: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--lab); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--lab);
  color: var(--white);
  font: 400 16px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ph); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }

/* ---------- fallback document (no JS / no WebGL) ---------- */
.hero, .quick, .doc { max-width: 52rem; margin-inline: auto; padding-inline: 20px; }
.hero { padding-top: 48px; }
.doc { padding-bottom: 120px; }
.run, .strip, .guide, .osd, .tip, .panel, #stage, .shade, .keys, .skip-boot { display: none; }
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ph); }
h1 { margin: 0; font: 700 clamp(48px, 9vw, 96px)/.92 var(--display); letter-spacing: .005em; text-transform: uppercase; }
.role { margin: 12px 0 0; color: var(--mut); }
.lede { margin: 14px 0 0; font-size: 1.2rem; max-width: 34em; }
.status { display: flex; align-items: flex-start; gap: .6em; margin: 0; color: var(--amber); }
.led { flex: none; width: .62em; height: .62em; margin-top: .42em; border-radius: 50%; background: var(--amber); box-shadow: 0 0 .7em var(--amber); }
.links { display: flex; flex-wrap: wrap; gap: .4em 1.4em; margin: 10px 0 0; padding: 0; list-style: none; }
.ch { margin: 2.4rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pt { margin: 0 0 .6rem; font: 700 2.1rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.pt-n { color: var(--amber); margin-right: .4em; font-family: var(--mono); font-size: .55em; letter-spacing: .1em; vertical-align: .2em; }

/* ---------- shared content styles (panel + document) ---------- */
.big { font: 600 1.5em/1.2 var(--display); letter-spacing: .01em; color: var(--white); margin: 0 0 .7em; }
.meta { color: var(--mut); }
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: .55em 1.1em;
  border: 1px solid var(--amber); border-radius: 6px; background: rgba(255, 180, 58, .08);
  color: var(--amber); font: 400 1em var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--amber); color: #120c02; }
.act { margin: 1.2em 0 0; }
.era { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.4em; }
.yrs { margin: 0; font: 700 3.2em/.9 var(--display); color: var(--ph); letter-spacing: .01em; }
.co { margin: .6em 0 0; font: 600 1.7em/1.05 var(--display); text-transform: uppercase; }
.role { margin: .35em 0 0; }
.note { margin: .5em 0 0; color: var(--amber); }
.era-r h3 { margin: 0 0 .5em; font: 600 1.7em/1.1 var(--display); }
.pts { margin: 1em 0 0; padding: 0; list-style: none; }
.pts li { position: relative; margin: 0 0 .5em; padding-left: 1.4em; }
.pts li::before { content: "▸"; position: absolute; left: 0; color: var(--ph); }
.stk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em 2em; }
.stk h3 { margin: 0 0 .35em; font: 600 1.25em/1 var(--display); color: var(--amber); letter-spacing: .1em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; padding: 0; list-style: none; }
.chips li { padding: .12em .6em; border: 1px solid var(--line); border-radius: 4px; background: rgba(102, 245, 170, .06); font-size: .88em; }
.res { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2.4em; }
.ledger { margin: 0; padding: 0; list-style: none; font-size: .95em; }
.ledger li { display: flex; align-items: flex-end; gap: .6em; }
.ledger i { flex: 1; border-bottom: 2px dotted rgba(155, 179, 168, .55); margin-bottom: .45em; min-width: 1em; }
.ledger span:last-child { color: var(--ph); }
.contact { margin: 0 0 1em; padding: 0; list-style: none; }
.contact li { display: flex; flex-wrap: wrap; align-items: center; gap: .4em 1.2em; padding: .55em 0; border-bottom: 1px solid var(--line); }
.contact li > span:first-child { width: 6.5em; color: var(--mut); text-transform: uppercase; letter-spacing: .12em; font-size: .85em; }
.contact a { font-size: 1.15em; }
.dial-out a { font: 700 1.9em var(--display); letter-spacing: .06em; color: var(--ph); text-decoration: none; }

/* ======================================================================= */
/* Experience mode                                                         */
/* ======================================================================= */
html.gl, html.gl body { height: 100%; overflow: hidden; }
html.gl .doc {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
html.gl #stage { display: block; position: fixed; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.2s ease; touch-action: none; }
html.gl.ready #stage { opacity: 1; }
html.gl #gl { display: block; width: 100%; height: 100%; }
html.gl .shade {
  display: block; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 7, .78) 0, rgba(3, 6, 7, .5) 150px, rgba(3, 6, 7, 0) 290px),
    linear-gradient(0deg, rgba(3, 6, 7, .82) 0, rgba(3, 6, 7, .5) 90px, rgba(3, 6, 7, 0) 200px);
  transition: opacity .5s;
}
html.gl.tuned .shade { opacity: .55; }

html.gl .hero, html.gl .quick {
  position: fixed; z-index: 5; max-width: none; margin: 0; padding: 0; pointer-events: none; transition: opacity .45s, transform .6s cubic-bezier(.2, .7, .2, 1);
}
html.gl .hero a, html.gl .quick a, html.gl .quick button { pointer-events: auto; }
html.gl .hero { left: 28px; top: 62px; width: min(660px, 56vw); }
html.gl .hero h1 { font-size: clamp(44px, 6.4vw, 92px); text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }
html.gl .hero .role { color: var(--white); opacity: .8; margin-top: 10px; font-size: 15px; letter-spacing: .04em; }
html.gl .hero .lede { margin-top: 8px; font-size: 17px; max-width: 40em; color: var(--white); text-shadow: 0 1px 12px #000; }
html.gl .quick { left: 28px; bottom: 22px; width: min(560px, calc(100vw - 660px)); min-width: 340px; }
html.gl .quick .status { font-size: 14px; }
html.gl .quick .links { margin-top: 8px; font-size: 14px; gap: .3em 1.2em; }
html.gl .quick .links a { display: inline-block; padding: 4px 0; }
html.gl .keys { display: block; margin: 8px 0 0; font-size: 12px; color: var(--mut); letter-spacing: .06em; }
html.gl.tuned .hero, html.gl.tuned .quick { opacity: 0; transform: translateY(-10px); pointer-events: none; }
html.gl.tuned .hero a, html.gl.tuned .quick a, html.gl.tuned .quick button { pointer-events: none; }

/* test-run readout */
html.gl .run {
  display: flex; align-items: center; gap: 10px; position: fixed; z-index: 6; left: 28px; top: 16px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--ed-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut);
}
.run .led { margin: 0; background: var(--amber); box-shadow: 0 0 .8em var(--amber); }
.run.pass .led { background: var(--ph); box-shadow: 0 0 .8em var(--ph); }
.run b { color: var(--white); font-weight: 400; font-size: 14px; min-width: 2ch; text-align: right; }
.run .bar { width: 64px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.run .bar i { display: block; height: 100%; width: 0; background: var(--ph); box-shadow: 0 0 8px var(--ph); }
.run .skip-boot { align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--white); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.run .skip-boot:hover { border-color: var(--amber); color: var(--amber); }
html.gl .run.booting .skip-boot { display: inline-flex; }

/* channel number on screen display */
html.gl .osd {
  display: block; position: fixed; z-index: 7; right: 28px; top: 74px; text-align: right; pointer-events: none; opacity: 0; transition: opacity .5s;
  font: 700 64px/.9 var(--display); color: var(--ph); text-shadow: 0 0 18px rgba(102, 245, 170, .55); letter-spacing: .04em;
}
html.gl .osd small { display: block; margin-top: 6px; font: 400 14px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--white); text-shadow: none; }
html.gl .osd.on { opacity: 1; transition: opacity .05s; }
html.gl .tip {
  display: block; position: fixed; z-index: 8; left: 0; top: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(5, 9, 10, .88);
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--white); pointer-events: none; opacity: 0; white-space: nowrap; transition: opacity .15s;
}
html.gl .tip.on { opacity: 1; }
.tip b { color: var(--amber); font-weight: 400; margin-right: .6em; }

/* control strip */
html.gl .strip {
  display: flex; align-items: stretch; gap: 6px; position: fixed; z-index: 9; right: 28px; bottom: 20px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(26, 34, 38, .9), rgba(10, 14, 16, .92));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.k {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; background: linear-gradient(180deg, #232d31, #151c1f); cursor: pointer;
  font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--white);
  box-shadow: 0 2px 0 #060809, inset 0 1px 0 rgba(255, 255, 255, .07); transition: transform .08s, border-color .15s, color .15s;
}
.k:hover { border-color: var(--amber); color: var(--amber); }
.k:active { transform: translateY(2px); box-shadow: 0 0 0 #060809; }
.k .pip { width: 7px; height: 7px; border-radius: 50%; background: #3a4448; transition: background .2s, box-shadow .2s; }
.k[aria-pressed="true"] .pip { background: var(--ph); box-shadow: 0 0 8px var(--ph); }
.k-pwr .pip { background: var(--ph); box-shadow: 0 0 8px var(--ph); }
.k-back { display: none; }
html.gl.tuned .k-back { display: inline-flex; border-color: var(--amber); color: var(--amber); }
.chdisp {
  display: flex; flex-direction: column; justify-content: center; min-width: 116px; padding: 0 12px; border-radius: 9px; background: #020504; border: 1px solid rgba(102, 245, 170, .25);
  box-shadow: inset 0 0 14px rgba(102, 245, 170, .12); color: var(--ph); line-height: 1.05;
}
.chdisp b { font: 700 24px/1 var(--display); letter-spacing: .08em; text-shadow: 0 0 10px rgba(102, 245, 170, .5); }
.chdisp span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }

html.gl .guide {
  display: block; position: fixed; z-index: 10; right: 28px; bottom: 84px; width: min(560px, calc(100vw - 32px)); padding: 12px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 10, 11, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s, transform .18s, visibility .18s;
}
html.gl .guide.open { opacity: 1; visibility: visible; transform: none; }
.guide h2 { margin: 2px 4px 8px; font: 400 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mut); }
.guide ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.guide button {
  display: flex; align-items: baseline; gap: .7em; width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; background: rgba(255, 255, 255, .03);
  text-align: left; cursor: pointer; font-size: 13px; color: var(--white);
}
.guide button:hover, .guide button[aria-current="true"] { border-color: var(--amber); background: rgba(255, 180, 58, .08); }
.guide button b { font: 700 18px/1 var(--display); color: var(--amber); letter-spacing: .06em; }
.guide button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- the panel: crisp HTML, aligned with the tuned screen ---------- */
html.gl .panel {
  display: block; position: fixed; z-index: 8; left: var(--px, 0); top: var(--py, 0); width: var(--pw, 0); height: var(--ph-h, 0);
  container-type: size; opacity: 0; visibility: hidden; pointer-events: none; overflow: hidden; border-radius: 1.2cqw;
  background: radial-gradient(120% 100% at 50% 0%, rgba(4, 18, 12, .94), rgba(2, 9, 6, .96)); color: var(--white);
  transition: opacity .12s, visibility .12s;
}
html.gl .panel.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s; animation: crt-on .5s steps(1, end) both; }
@keyframes crt-on { 0% { filter: brightness(2.2); } 15% { filter: brightness(.6); } 30% { filter: brightness(1.6); } 50% { filter: brightness(1.05); } 100% { filter: none; } }
.panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, .45));
}
.panel-in { --u: 1cqw; font-size: calc(var(--u) * 1.5); line-height: 1.45; height: 100%; display: flex; flex-direction: column; padding: calc(var(--u) * 2) calc(var(--u) * 3.2) calc(var(--u) * 1.8); }
.ph { display: flex; align-items: center; gap: 1.2em; flex: none; padding-bottom: .7em; margin-bottom: 1em; border-bottom: 1px solid var(--line); font-size: .78em; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.ph-ch { color: var(--amber); }
.ph-sig { margin-right: auto; display: inline-flex; align-items: center; gap: .6em; }
.ph-sig::before { content: ""; width: .6em; height: .6em; border-radius: 50%; background: var(--ph); box-shadow: 0 0 .8em var(--ph); }
.ph button { display: inline-flex; align-items: center; min-height: 44px; margin: -.8em 0; padding: 0 1em; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .04); color: var(--white); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.ph button:hover { border-color: var(--amber); color: var(--amber); }
.pb { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--ph-dim) transparent; padding-right: .4em; text-shadow: 0 0 .6em rgba(102, 245, 170, .18); }
.pb .pt { font-size: 4.6em; line-height: .95; margin: 0 0 .22em; color: var(--white); }
.pb .pt-n { display: none; }
.pb p { margin: 0 0 .9em; max-width: 46em; }
.pb .big { max-width: 24em; }
.pf { flex: none; display: flex; justify-content: space-between; gap: 1em; margin-top: .8em; padding-top: .8em; border-top: 1px solid var(--line); font-size: .78em; letter-spacing: .1em; text-transform: uppercase; }
.pf button { display: inline-flex; align-items: center; gap: .6em; min-height: 44px; max-width: 48%; padding: 0 1em; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--mut); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf button:hover { color: var(--amber); border-color: var(--line); }
.pf button b { color: var(--amber); font-weight: 400; }
.panel .btn { font-size: .95em; }
.panel .stk { gap: .7em 2em; }
.panel .stk h3 { font-size: 1.1em; }
.panel .chips li { font-size: .85em; }
.panel.ambient .pb { display: none; }

/* ---------- phone / portrait: a sheet under the tuned screen ---------- */
html.gl.portrait .hero { left: 16px; right: 16px; top: 58px; width: auto; }
html.gl.portrait .hero .eyebrow { display: none; }
html.gl.portrait .hero h1 { font-size: 40px; }
html.gl.portrait .hero .role { font-size: 13px; margin-top: 6px; }
html.gl.portrait .hero .lede { font-size: 15px; line-height: 1.35; margin-top: 6px; }
html.gl.portrait .quick { left: 16px; right: 16px; bottom: 82px; width: auto; min-width: 0; }
html.gl.portrait .quick .status { font-size: 13px; line-height: 1.3; }
html.gl.portrait .quick .links { font-size: 14px; margin-top: 4px; }
html.gl.portrait .quick .links a { padding: 11px 0; }
html.gl.portrait .contact a, html.gl.portrait .panel a { display: inline-block; padding: 8px 0; }
html.gl.portrait .keys { display: none; }
html.gl.portrait .run { left: 16px; top: 14px; gap: 8px; padding: 0 10px; }
html.gl.portrait .run .bar, html.gl.portrait .run .lbl { display: none; }
html.gl.portrait .run .of { font-size: 0; }
html.gl.portrait .run .of::before { content: '/ 50'; font-size: 13px; }
html.gl.portrait .run .skip-boot { min-height: 40px; min-width: 40px; }
html.gl.portrait .strip { left: 8px; right: 8px; bottom: 10px; justify-content: space-between; padding: 5px; }
html.gl.portrait .k { flex: 1; min-width: 0; padding: 0 4px; }
html.gl.portrait .k .lbl { display: none; }
html.gl.portrait .chdisp { flex: 1.5; min-width: 0; padding: 0 8px; }
html.gl.portrait .chdisp span { max-width: 100%; }
html.gl.portrait .k-back { display: none !important; }
html.gl.portrait .guide { right: 8px; left: 8px; width: auto; bottom: 72px; }
html.gl.portrait .guide ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.gl.portrait .osd { right: 16px; top: 62px; font-size: 44px; }
html.gl.portrait .panel {
  left: 0; right: 0; top: 33dvh; bottom: 70px; width: auto; height: auto; container-type: normal; border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--line); background: #03100b; transform: translateY(24px); transition: opacity .25s, transform .35s cubic-bezier(.2, .8, .2, 1), visibility .25s;
}
html.gl.portrait .panel.on { transform: none; }
html.gl.portrait .panel-in { --u: 10.4px; font-size: 15.5px; padding: 14px 18px 8px; }
html.gl.portrait .ph button, html.gl.portrait .ph-sig { white-space: nowrap; }
html.gl.portrait .ph { font-size: 12px; letter-spacing: .08em; margin-bottom: 10px; padding-bottom: 8px; }
html.gl.portrait .pb .pt { font-size: 40px; }
html.gl.portrait .era, html.gl.portrait .res, html.gl.portrait .stk { grid-template-columns: minmax(0, 1fr); gap: 1em; }
html.gl.portrait .yrs { font-size: 46px; }
html.gl.portrait .co { font-size: 26px; }
html.gl.portrait .era-r h3 { font-size: 26px; }
html.gl.portrait .big { font-size: 24px; }
html.gl.portrait .pf { font-size: 12px; }
html.gl.portrait .pf button { max-width: 49%; padding: 0 8px; }
html.gl.portrait.tuned .run { opacity: 0; pointer-events: none; }
html.gl.portrait .tip { display: none; }

@media (max-width: 1100px) and (min-aspect-ratio: 9/10) {
  html.gl .quick { width: calc(100vw - 56px); bottom: 92px; }
  html.gl .keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.gl #stage, .osd, .panel, .guide, .hero, .quick { transition: none !important; }
  html.gl .panel.on { animation: none; }
}

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.k .mute { display: block; }
.k[aria-pressed="true"] .mute { display: none; }
html.gl .run.booting .skip-boot { display: inline-flex; }
