
:root {
  --bg: #E3E2DD;
  --panel: #ECEBE7;
  --recess: #DCDAD3;
  --ink: #17191B;
  --muted: #5B6066;
  --faint: #8A8E94;
  --hair: #C4C2BA;
  --hair-strong: #9C9A93;
  --needle: #DC4F18;
  --amber: #A87300;
  --green: #2B7F47;
  --econ: #AE371B;
  --tech: #1D4DA3;
  --dream: #6A3CBC;
  --build: #19736B;
  --knob: #F4F3EF;
  --knob-edge: #B5B3AB;
  --cap-hi: #FFFFFF;
  --cap: #ECEBE6;
  --cap-lo: #C3C1B9;
  --ridge-a: #DAD8D1;
  --ridge-b: #B7B5AD;
  --well: #CFCDC5;
  --shadow: rgba(40,36,28,.35);
  --cab-hi: #F7F6F2;
  --cab: #D9D7D0;
  --cab-lo: #C3C1B9;
  --cab-edge: #9F9D95;
  --cab-depth: #A39F95;
  --grille-base: #D2D0C8;
  --grille-hole: #7E7B73;
  --dim: .2;
  --g: 0;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0F13;
    --panel: #11171C;
    --recess: #06090C;
    --ink: #E7EAED;
    --muted: #B9C1CA;
    --faint: #85909B;
    --hair: #222A31;
    --hair-strong: #46525E;
    --needle: #FF5C1F;
    --amber: #FFB21E;
    --green: #3EDD86;
    --econ: #FF6B48;
    --tech: #3CA8FF;
    --dream: #C48CFF;
    --build: #2FE6C7;
    --knob: #192027;
    --knob-edge: #2C363F;
    --cap-hi: #4A5662;
    --cap: #252E37;
    --cap-lo: #10151A;
    --ridge-a: #303A44;
    --ridge-b: #151B21;
    --well: #05080A;
    --shadow: rgba(0,0,0,.7);
    --cab-hi: #3A4550;
    --cab: #1A2128;
    --cab-lo: #11161B;
    --cab-edge: #000000;
    --cab-depth: #05070A;
    --grille-base: #242C34;
    --grille-hole: #020304;
    --dim: .16;
    --g: 1;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0F13;
  --panel: #11171C;
  --recess: #06090C;
  --ink: #E7EAED;
  --muted: #B9C1CA;
  --faint: #85909B;
  --hair: #222A31;
  --hair-strong: #46525E;
  --needle: #FF5C1F;
  --amber: #FFB21E;
  --green: #3EDD86;
  --econ: #FF6B48;
  --tech: #3CA8FF;
  --dream: #C48CFF;
  --build: #2FE6C7;
  --knob: #192027;
  --knob-edge: #2C363F;
  --cap-hi: #4A5662;
  --cap: #252E37;
  --cap-lo: #10151A;
  --ridge-a: #303A44;
  --ridge-b: #151B21;
  --well: #05080A;
  --shadow: rgba(0,0,0,.7);
  --cab-hi: #3A4550;
  --cab: #1A2128;
  --cab-lo: #11161B;
  --cab-edge: #000000;
  --cab-depth: #05070A;
  --grille-base: #242C34;
  --grille-hole: #020304;
  --dim: .16;
  --g: 1;
}
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--needle); outline-offset: 2px; }

.page { max-width: 1440px; margin: 0 auto; padding: 24px clamp(14px, 2.4vw, 32px) 40px; }

/* Header */
.masthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.crumb { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -0.012em; margin: 0; }
.header-switches { display: flex; gap: 18px; flex-wrap: wrap; flex: none; }
.masthead > div:first-child { flex: 1 1 760px; min-width: 0; }
.h1-line { display: block; }
.theme-switch { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--hair-strong); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: var(--knob); padding: 6px 10px; font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--hair-strong); }
.seg button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--needle); }

/* Plates and windows */
.plate { background: var(--panel); border: 1px solid var(--hair); border-radius: 6px; padding: 16px 18px; }
.plate + .plate { margin-top: 12px; }
.window { background: var(--recess); border-radius: 4px; box-shadow: inset 0 1px 3px rgba(0,0,0,.28), inset 0 0 0 1px var(--hair); }
.label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 400; }

/* Top plate */
.radio { position: relative; margin: 6px 0 44px; padding: 18px; border-radius: 22px;
  background: linear-gradient(180deg, var(--cab-hi) 0%, var(--cab) 22%, var(--cab) 70%, var(--cab-lo) 100%);
  box-shadow: 0 0 0 1px var(--cab-edge), inset 0 1px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.25), inset 2px 0 0 rgba(255,255,255,.05), inset -2px 0 0 rgba(0,0,0,.18), 0 12px 0 -1px var(--cab-depth), 0 12px 0 0 var(--cab-edge), 0 34px 44px -14px var(--shadow); }
.radio-face { border-radius: 12px; background: var(--panel); padding: 20px 22px 18px;
  box-shadow: inset 0 3px 6px var(--shadow), inset 0 0 0 1px var(--hair), 0 1px 0 rgba(255,255,255,.12), 0 -1px 0 rgba(0,0,0,.2); }
.screw { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--cap-hi), var(--cap-lo) 80%); box-shadow: 0 1px 1px var(--shadow), inset 0 0 0 1px var(--knob-edge); }
.screw::after { content: ""; position: absolute; left: 1px; right: 1px; top: 4px; height: 2px; background: var(--cab-depth); transform: rotate(35deg); }
.screw.tl { top: 5px; left: 5px; } .screw.tr { top: 5px; right: 5px; }
.screw.bl { bottom: 5px; left: 5px; } .screw.br { bottom: 5px; right: 5px; }
.screw.tr::after { transform: rotate(-20deg); } .screw.bl::after { transform: rotate(80deg); }
.radio-foot { position: absolute; bottom: -24px; width: 72px; height: 12px; border-radius: 0 0 8px 8px; background: var(--cab-lo); box-shadow: 0 0 0 1px var(--cab-edge), 0 8px 10px -4px var(--shadow); }
.radio-foot.l { left: 9%; } .radio-foot.r { right: 9%; }
.top { display: grid; grid-template-columns: 168px auto minmax(300px, 1fr); grid-template-areas: "grille ctl display"; gap: 20px 40px; align-items: stretch; }
.display { grid-area: display; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "search search" "readout keys" "chips chips"; gap: 16px 14px; align-content: center; }
.display .keys { align-self: end; flex-direction: row; height: 56px; }
.display .keys .key { height: 100%; display: inline-flex; align-items: center; justify-content: center; }
.chips { grid-area: chips; margin-top: 0; }
.grille { grid-area: grille; align-self: stretch; min-height: 200px; border-radius: 10px;
  background-color: var(--grille-base);
  background-image: radial-gradient(circle, var(--grille-hole) 0 1.8px, transparent 2.3px);
  background-size: 9px 9px; background-position: center;
  box-shadow: inset 0 2px 5px var(--shadow), inset 0 0 0 1px var(--hair), 0 1px 0 rgba(255,255,255,.1); }
.grille.live { animation: hum .12s steps(2, jump-none) infinite; }
@keyframes hum { 50% { background-position: calc(50% + .5px) 50%; } }
.ctl { grid-area: ctl; display: flex; align-items: flex-start; gap: 18px; align-self: center; }
.search-mod { grid-area: search; } .readout-mod { grid-area: readout; } .keys { grid-area: keys; }
.lens-module { display: flex; flex-direction: column; align-items: center; }
.search-window { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.search-window input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--mono); font-size: 18px; letter-spacing: .02em; outline: none; caret-color: var(--needle); }
.search-window input::placeholder { color: var(--faint); }
.search-window:focus-within { box-shadow: inset 0 1px 3px rgba(0,0,0,.28), inset 0 0 0 1px var(--needle); }
.clear { border: 0; background: none; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 2px 4px; }
.status { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .lamp { margin-right: 6px; }
.count { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 56px; }
.count strong { font-family: var(--mono); font-weight: 500; font-size: 34px; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink); }
.count span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 26px; }
.chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid var(--hair-strong); background: transparent; border-radius: 3px; padding: 3px 8px; font-family: var(--mono); font-size: 11.5px; cursor: pointer; color: var(--ink); }
.chip .x { color: var(--muted); }
.chip:hover .x { color: var(--needle); }
.keys { display: flex; flex-direction: column; gap: 8px; }
.key { border: 1px solid var(--hair-strong); background: var(--knob); border-radius: 4px; padding: 9px 14px; font-family: var(--mono); font-size: 12px; cursor: pointer; box-shadow: 0 2px 0 var(--knob-edge); white-space: nowrap; text-decoration: none; color: var(--ink); display: inline-block; text-align: center; }
.key:active { transform: translateY(2px); box-shadow: 0 0 0 var(--knob-edge); }

/* Power */
.power { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 70px; }
.power-btn { position: relative; width: 54px; height: 54px; flex: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted); display: grid; place-items: center; background: radial-gradient(circle at 36% 28%, var(--cap-hi) 0%, var(--cap) 48%, var(--cap-lo) 100%); box-shadow: 0 7px 10px -4px var(--shadow), 0 2px 3px var(--shadow), 0 0 0 1px var(--knob-edge), 0 0 0 6px var(--well), inset 0 1px 1px rgba(255,255,255,.2); transition: transform .08s; }
.power-btn:active { transform: translateY(1px) scale(.96); }
.power-btn[aria-pressed="true"] { color: var(--needle); }
.power-btn[aria-pressed="true"] svg { filter: drop-shadow(0 0 calc(var(--g) * 6px) var(--needle)); }
.power-meta { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 84px; justify-content: center; }
.lamp.blink { animation: blink 1.1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Powered-off state */
[data-powered] { transition: opacity .35s, filter .35s; }
body.off { --g: 0; }
body.off [data-powered] { opacity: .38; filter: saturate(0) brightness(.85); }
body.warm [data-powered] { animation: warm .75s ease-out; }
@keyframes warm {
  0% { opacity: .38; filter: saturate(0) brightness(.85); }
  25% { opacity: .95; filter: saturate(.6) brightness(1.15); }
  38% { opacity: .55; filter: saturate(.3) brightness(.9); }
  55% { opacity: 1; filter: saturate(1) brightness(1.05); }
  100% { opacity: 1; filter: none; }
}

/* Lamps and markers */
.lamp { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 calc(var(--g) * 8px) currentColor; vertical-align: middle; }
.lamp.off { background: transparent; box-shadow: inset 0 0 0 1px var(--hair-strong); }
.mk { display: inline-block; width: 8px; height: 8px; background: currentColor; flex: none; }
.mk-circle { border-radius: 50%; }
.mk-diamond { background: transparent; border: 1.5px solid currentColor; transform: rotate(45deg) scale(.85); }
.mk-bar { width: 12px; height: 4px; }
.c-econ { color: var(--econ); } .c-tech { color: var(--tech); } .c-dream { color: var(--dream); } .c-build { color: var(--build); }

/* Knobs */
.knob-wrap { position: relative; }
.knob-well { position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); background: var(--well); box-shadow: inset 0 3px 6px var(--shadow), inset 0 -1px 0 rgba(255,255,255,.06), 0 1px 0 rgba(255,255,255,.05); pointer-events: none; }
.knob { position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; touch-action: none; user-select: none; box-shadow: 0 10px 16px -6px var(--shadow), 0 3px 4px var(--shadow), 0 0 0 1px var(--knob-edge); transition: transform .12s; }
.knob:active { transform: translate(-50%, -50%) scale(.975); }
.knob-rot { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(var(--ridge-a) 0deg 3.5deg, var(--ridge-b) 3.5deg 7.5deg); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.knob-cap { position: absolute; inset: 13%; border-radius: 50%; background: radial-gradient(circle at 36% 28%, var(--cap-hi) 0%, var(--cap) 48%, var(--cap-lo) 100%); box-shadow: 0 3px 6px var(--shadow), inset 0 1px 1px rgba(255,255,255,.22), inset 0 -3px 5px rgba(0,0,0,.3); }
.knob-cap::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.08), transparent 70%); box-shadow: inset 0 1px 2px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.08); }
.knob-ind { position: absolute; left: 50%; top: 17%; width: 3px; height: 22%; margin-left: -1.5px; border-radius: 2px; background: var(--needle); box-shadow: 0 0 calc(var(--g) * 9px) var(--needle), 0 0 0 1px rgba(0,0,0,.25); }
.knob::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; background: linear-gradient(155deg, rgba(255,255,255,.16) 0%, transparent 42%, rgba(0,0,0,.28) 100%); }
.detent { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--faint); }
.detent.on { background: var(--needle); box-shadow: 0 0 calc(var(--g) * 6px) var(--needle); }
.knob-label { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 3px 4px; cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.knob-label[aria-checked="true"] { color: var(--ink); }
.knob-caption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }

/* Tuning band */
.band-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.band-head .label { margin: 0; }
.years { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.years .window { padding: 4px 6px; }
.years input { width: 4.4em; border: 0; background: transparent; font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; outline: none; text-align: center; -moz-appearance: textfield; }
.years input::-webkit-inner-spin-button, .years input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.years .window:focus-within { box-shadow: inset 0 1px 3px rgba(0,0,0,.28), inset 0 0 0 1px var(--needle); }
.band-scroll { overflow-x: auto; }
.band { display: grid; grid-template-columns: 78px minmax(560px, 1fr) 76px; gap: 10px; min-width: 740px; }
.lane-labels { padding-top: 10px; }
.lane-labels div { height: 28px; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; }
.dial { position: relative; padding-top: 10px; }
.dial:has(.needle:focus-visible) { box-shadow: inset 0 1px 3px rgba(0,0,0,.28), inset 0 0 0 2px var(--needle); }
.scale { position: relative; margin: 0 7px; }
.lane { position: relative; height: 28px; }
.lane::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--hair); opacity: .7; }
.tick { position: absolute; top: 7px; width: 2px; height: 14px; margin-left: -1px; padding: 0; border: 0; background: currentColor; cursor: pointer; z-index: 1; transition: opacity .15s; }
.tick.off { opacity: var(--dim); }
.tick.sel { top: 1px; height: 26px; width: 3px; margin-left: -1.5px; box-shadow: 0 0 calc(var(--g) * 10px) currentColor, 0 0 0 2px var(--recess), 0 0 0 3px currentColor; z-index: 2; }
.tick.pulse { animation: pulse .9s ease-out 2; }
@keyframes pulse { 50% { transform: scaleY(1.5); } }
.shade { position: absolute; top: 0; height: 140px; background: var(--recess); opacity: .72; pointer-events: none; z-index: 3; }
.shade.l { left: -7px; } .shade.r { right: -7px; }
.axis { position: relative; height: 30px; border-top: 1px solid var(--hair-strong); }
.minor, .major { position: absolute; top: 0; width: 1px; background: var(--hair-strong); }
.minor { height: 4px; } .major { height: 8px; background: var(--muted); }
.axis-year { position: absolute; top: 9px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.needle { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 150px; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; z-index: 4; filter: drop-shadow(0 0 calc(var(--g) * 5px) var(--needle)); }
.needle:focus { outline: none; }
.needle::-webkit-slider-runnable-track { height: 150px; background: transparent; border: 0; }
.needle::-moz-range-track { height: 150px; background: transparent; border: 0; }
.needle::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 150px; border: 0; cursor: ew-resize; background: linear-gradient(var(--needle), var(--needle)) center top / 10px 7px no-repeat, linear-gradient(var(--needle), var(--needle)) center / 2px 100% no-repeat; }
.needle::-moz-range-thumb { pointer-events: auto; width: 14px; height: 150px; border: 0; border-radius: 0; cursor: ew-resize; background: linear-gradient(var(--needle), var(--needle)) center top / 10px 7px no-repeat, linear-gradient(var(--needle), var(--needle)) center / 2px 100% no-repeat; }
.undated { padding-top: 10px; position: relative; }
.undated .lane::after { left: 8px; right: 8px; }
.undated-cap { height: 30px; border-top: 1px solid var(--hair-strong); font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; padding-top: 9px; }
.band-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; max-width: 90ch; }

/* Main */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; margin-top: 8px; align-items: start; }
.conditions { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
.cond { display: flex; align-items: center; gap: 14px; }
.cond .window { padding: 7px 10px; min-width: 210px; font-family: var(--mono); font-size: 13px; }
.cond-name { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cond-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; max-width: 32ch; }
.strip-wrap { max-height: 560px; overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; font-weight: 400; text-align: left; padding: 12px 6px 10px; border-bottom: 1px solid var(--hair-strong); vertical-align: bottom; }
th.num, td.num { text-align: right; width: 60px; }
th.ch, td.ch { text-align: center; width: 92px; }
.chbtn { border: 0; background: none; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 2px 4px; }
.chbtn[aria-pressed="true"] { color: var(--ink); }
.chbtn[aria-pressed="true"] .lamp { color: var(--needle); }
.col-focus { background: color-mix(in srgb, var(--needle) 7%, transparent); }
thead th.col-focus { background: color-mix(in srgb, var(--needle) 7%, var(--panel)); }
.th-plain { font-family: var(--mono); font-size: 12px; color: var(--muted); }
tbody tr { cursor: pointer; }
tbody td { padding: 9px 6px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tbody tr:hover td { background: color-mix(in srgb, var(--ink) 4%, transparent); }
tbody tr[aria-selected="true"] td { background: color-mix(in srgb, var(--needle) 10%, transparent); }
tbody tr[aria-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--needle); }
.work { display: flex; gap: 10px; align-items: baseline; }
.work .mk { transform: translateY(-1px); }
.work .mk-diamond { transform: rotate(45deg) scale(.85) translateY(-1px); }
.work-title { font-size: 14.5px; }
.work-who { font-size: 12.5px; color: var(--muted); display: block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.num { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.empty td { cursor: default; padding: 22px 6px; border-bottom: 0; }
.empty p { margin: 0 0 10px; }
.empty .key { margin-right: 8px; }

/* Detail readout */
.detail { position: sticky; top: calc(14px + env(safe-area-inset-top, 0px)); }
.detail .status-row { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.detail h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.15; margin: 12px 0 6px; }
.detail .meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.detail .who { font-size: 14px; margin: 12px 0 14px; }
.readout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; padding: 10px 12px; margin-bottom: 12px; }
.readout div { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; }
.readout .off-text { color: var(--muted); }
.notice { font-size: 13px; color: var(--muted); border-left: 2px solid var(--amber); padding: 2px 0 2px 10px; margin: 0 0 14px; }
.scenario { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.detail .key-row { display: flex; gap: 8px; flex-wrap: wrap; }
.foot { font-size: 13px; color: var(--muted); margin-top: 16px; max-width: 100ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1240px) {
  .top { grid-template-columns: 132px auto minmax(260px, 1fr); gap: 20px 28px; }
  .display { grid-template-areas: "search search" "readout readout" "chips keys"; }
  .display .keys { height: auto; align-self: center; }
}
@media (max-width: 920px) {
  .top { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ctl display" "grille grille"; }
  .grille { min-height: 56px; }
}
@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr; }
  .detail { position: static; }
}
@media (max-width: 760px) {
  .radio { padding: 12px; }
  .radio-face { padding: 16px 14px; }
  .top { grid-template-columns: 1fr; grid-template-areas: "ctl" "display" "grille"; }
  .display { grid-template-columns: 1fr; grid-template-areas: "search" "readout" "keys" "chips"; }
  .display .keys { justify-self: start; }
  .ctl { justify-content: center; }
  .grille { min-height: 64px; }
  .lens-module { align-items: center; }
  .cond .window { min-width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .knob-rot, .tick { transition: none; }
  .tick.pulse { animation: none; }
  body.warm [data-powered] { animation: none; }
  .lamp.blink { animation: none; }
  .grille.live { animation: none; }
}

/* ---- Full-scale additions ---- */
.presets { grid-area: presets; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.presets .plabel { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 4px; }
.pkey { width: 38px; height: 34px; border-radius: 4px; border: 1px solid var(--hair-strong); background: var(--knob); font-family: var(--mono); font-size: 13px; cursor: pointer; box-shadow: 0 2px 0 var(--knob-edge); position: relative; color: var(--ink); }
.pkey:active { transform: translateY(2px); box-shadow: none; }
.pkey[aria-pressed="true"] { box-shadow: inset 0 2px 3px var(--shadow); transform: translateY(1px); color: var(--needle); }
.pkey[aria-pressed="true"]::after { content: ""; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--needle); box-shadow: 0 0 calc(var(--g) * 6px) var(--needle); }
.key[aria-pressed="true"] { box-shadow: inset 0 2px 3px var(--shadow); transform: translateY(1px); color: var(--needle); }
.station { font-family: var(--mono); font-size: 12px; color: var(--muted); min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 200px; min-width: 0; }
.display { grid-template-areas: "search search" "readout keys" "presets presets" "chips chips"; }
.cond-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); margin-bottom: 6px; }
.cond-wide .window.value { padding: 7px 10px; font-family: var(--mono); font-size: 13px; min-height: 34px; }
.cond-text { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.cond-text b { color: var(--ink); font-weight: 600; }
.terr-readout { font-size: 13.5px; color: var(--muted); padding: 10px 2px 2px; min-height: 26px; }
.terr-readout strong { color: var(--ink); font-weight: 600; }
.role-tag { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 3px; border: 1px solid var(--hair-strong); white-space: nowrap; }
.role-tag.sup { color: var(--green); border-color: currentColor; }
.role-tag.qual { color: var(--amber); border-color: currentColor; }
.stopno { font-family: var(--mono); font-size: 12px; color: var(--needle); margin-right: 6px; }
.anchor { color: var(--needle); font-size: 10px; margin-left: 6px; vertical-align: 1px; }
.ledger { font-family: var(--mono); font-size: 10.5px; color: var(--faint); margin-left: 6px; }
th.role, td.role { width: 92px; text-align: center; }
.detail { max-height: calc(100vh - 28px); overflow: auto; }
.detail .lead { font-family: var(--serif); font-size: 17px; line-height: 1.45; margin: 0 0 14px; }
.fields { display: grid; gap: 10px; margin: 0 0 14px; }
.fields div { font-size: 13.5px; line-height: 1.5; }
.fields .k { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.detail details { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; }
.detail summary { cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.works { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.works li { padding: 10px 12px; }
.works .wt { font-size: 14px; }
.works .wm { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.works a { color: var(--ink); }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.pchip { border: 1px solid var(--hair-strong); background: transparent; border-radius: 3px; padding: 2px 7px; font-size: 12px; cursor: pointer; color: var(--ink); }
.pchip:hover { border-color: var(--needle); }
.sect { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 16px 0 8px; }
.rel, .tension { font-size: 13px; line-height: 1.5; padding: 8px 10px; border-left: 2px solid var(--hair-strong); margin-bottom: 8px; }
.rel button, .tension button, .linkbtn { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.journey-nav { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.journey-nav .key { padding: 6px 10px; }
.pin-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
dialog.sheet { border: 1px solid var(--hair-strong); border-radius: 8px; background: var(--panel); color: var(--ink); padding: 0; width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 30px 60px -20px var(--shadow); }
dialog.sheet::backdrop { background: rgba(0,0,0,.45); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--hair); position: sticky; top: 0; background: var(--panel); }
.sheet-head h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 0; }
.sheet-body { padding: 16px 18px 20px; overflow: auto; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cmp h3 { font-family: var(--serif); font-weight: 400; font-size: 19px; margin: 0 0 6px; }
.credit { padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; line-height: 1.5; }
.credit .wm { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.scale-note { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.mark-anchor { position: absolute; top: -1px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: currentColor; z-index: 1; pointer-events: none; }
@media (max-width: 760px) { .cond-wide { grid-template-columns: 1fr; } .cmp { grid-template-columns: 1fr; } .display { grid-template-areas: "search" "readout" "keys" "presets" "chips"; } }
@media (max-width: 1240px) and (min-width: 761px) { .display { grid-template-areas: "search search" "readout readout" "keys keys" "presets presets" "chips chips"; } .display .keys { justify-self: start; } }
.display, .search-mod, .readout-mod { min-width: 0; }
@media (max-width: 760px) {
  .top { grid-template-columns: minmax(0, 1fr); }
  .display { grid-template-columns: minmax(0, 1fr); }
  .ctl { gap: 6px; }
  .power { padding-top: 70px; }
}
@media (max-width: 1100px) { .main { grid-template-columns: minmax(0, 1fr); } }
.main > * { min-width: 0; }
