/* Full Spectrum. The light is the only colour on the page: the visible band in real colour, every other band in
   muted, hatched false colour. Everything else is quiet glass over deep space-blue, with Molecule Viewer's warm
   amber for the cursor and whatever is active or measured. */
:root {
  --ink: #03050b;
  --glass: rgba(9, 13, 24, 0.62);
  --glass-strong: rgba(8, 12, 22, 0.92);
  --rule: rgba(160, 180, 220, 0.14);
  --rule-strong: rgba(160, 180, 220, 0.26);
  --text: #e6ebf3;
  --dim: #8b96aa;
  --faint: #5b6578;
  --amber: #f2b45a;
  --amber-ink: #1b1204;
  --display: 'Big Shoulders Display', 'DIN Condensed', 'Futura', sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --pad: clamp(14px, 2vw, 24px);
  --panel-w: clamp(280px, 24vw, 360px);
  --top-h: 64px;
  --dial-h: 162px;
  --controls-h: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); overflow: hidden;
  font: 400 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Scroll bars: a thin rule-coloured thumb on no track, amber while held. */
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(160, 180, 220, 0.42); }
::-webkit-scrollbar-thumb:active { background-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
kbd { font: 500 11px/1 var(--body); padding: 3px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 5px; color: var(--dim); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.glass, .tip, .toast, .help, .caption { background: var(--glass); border: 1px solid var(--rule); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay; z-index: 1;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------------------------------------------------------------- views */
.views { position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 40% 35%, rgba(40, 60, 110, 0.22), transparent 60%); }
.view-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.view-host { position: absolute; display: none; }
/* The 3D layer is drawn on black and added to the page's light, so its glows have no edges. */
.view-canvas.gl { mix-blend-mode: screen; }
.view-host canvas { display: block; touch-action: none; cursor: grab; }
body[data-view="spectrum"]:not([data-mode="field"]) [data-for="spectrum"],
body[data-view="spectrum"][data-mode="field"] .views [data-for="field"],
body[data-view="visible"] .views [data-for="visible"],
body[data-view="blackbody"] .views [data-for="blackbody"],
body[data-view="air"] .views [data-for="air"],
body[data-view="sky"] .views [data-for="sky"] { display: block; }
.field-labels { position: absolute; inset: 0; pointer-events: none; display: none; }
.field-labels span { position: absolute; left: 0; top: 0; font: 600 12px var(--body); color: var(--dim); white-space: nowrap; translate: -50% -50%; }
.field-labels span b { display: block; font-weight: 600; }
.field-labels span small { display: block; font: 500 11px var(--body); color: var(--faint); text-align: center; }
.field-labels .lab-e b { color: var(--field-e, var(--text)); }
.field-labels .lab-b b { color: #e8edf5; }
.field-labels .lab-l b, .field-labels .lab-l small { color: var(--amber); }
.field-card { position: absolute; left: 0; top: 0; max-width: 300px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; color: #c4ccdb; }
.field-card p { margin: 0 0 6px; }
.field-card p:last-child { margin: 0; }
.field-card strong { color: var(--text); font-weight: 600; }

/* the sky */
.sky { display: none; flex-direction: column; gap: 10px; }
body[data-view="sky"] .views .sky { display: flex; }
.sky-stage { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #000; }
.sky-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.6s; }
.sky-stage > img.on { opacity: 1; }
.sky-rows { display: none; position: absolute; inset: 0; overflow-y: auto; padding: 8px; }
.sky.strips .sky-stage > img { display: none; }
.sky img.failed { visibility: hidden; }
.sky-missing { display: none; position: absolute; inset: 0; margin: 0; place-content: center; text-align: center; color: var(--dim); }
.sky.missing:not(.strips) .sky-missing { display: grid; }
.sky.strips .sky-rows { display: grid; gap: 6px; align-content: start; }
.sky-rows figure { margin: 0; position: relative; opacity: 0.4; transition: opacity 0.4s; cursor: pointer; }
.sky-rows figure.on { opacity: 1; outline: 1px solid var(--amber); outline-offset: 2px; }
.sky-rows img { display: block; width: 100%; border-radius: 4px; }
.sky-rows figcaption { position: absolute; left: 8px; top: 50%; translate: 0 -50%; font-size: 11.5px; color: #fff; text-shadow: 0 1px 4px #000, 0 0 2px #000; }
.sky.strips .sky-strip { display: none; }
.sky-strip { display: flex; gap: 6px; overflow-x: auto; flex: none; }
.sky-strip button { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--rule); color: var(--dim); font-size: 11.5px; }
.sky-strip button img { width: 84px; height: 46px; object-fit: cover; border-radius: 6px; display: block; }
.sky-strip button[aria-current="true"] { border-color: var(--amber); color: var(--text); }
.photon-facts { display: none !important; position: absolute; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
body[data-view="spectrum"][data-mode="photons"] .photon-facts { display: grid !important; overflow: hidden; }
@media (max-width: 820px) { body[data-view="spectrum"][data-mode="photons"] .photon-facts { display: none !important; } }
.pf { padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--rule); color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.pf p { margin: 0; }
.pf-label { color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pf-big { margin: 2px 0 6px !important; color: var(--text); font: 800 24px/1.05 var(--display); }
.wave-credit { display: none; position: absolute; margin: 0; text-align: right; color: var(--faint); font-size: 11.5px; pointer-events: none; }
.wave-credit a { color: var(--dim); pointer-events: auto; }
.wave-credit:empty { display: none !important; }
.sky-credit { margin: 0; color: var(--faint); font-size: 11.5px; flex: none; }
.sky-credit a { color: var(--dim); }

/* ---------------------------------------------------------------- top */
.top { position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); z-index: 9; }
.mark { font: 800 17px/0.86 var(--display); color: var(--text); text-decoration: none; letter-spacing: 0.02em; flex: none;
  background: linear-gradient(90deg, #ff6a4a, #ffd84a 35%, #4ae08a 60%, #4a9cff 80%, #a46aff); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; }
.stage { flex: none; margin: 0 0 0 -14px; padding: 2px 7px; border: 1px solid var(--amber); border-radius: 10px; color: var(--amber);
  font: 600 10px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; }
.landing .stage { display: inline-block; margin: 0 0 14px; }
button.stage { position: relative; background: none; cursor: pointer; }
button.stage:hover, button.stage:focus-visible { background: rgba(242, 180, 90, 0.12); outline: none; }
button.stage.unseen::after { content: ''; position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
/* What's new (js/whatsnew.js): releases newest first, each item's kind, Show me, and feedback at the foot. */
.whatsnew { max-width: 600px; width: calc(100vw - 32px); max-height: min(80vh, 760px); }
.whatsnew[open] { display: flex; flex-direction: column; }
.wn-list { overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.wn-rel { padding: 10px 0 12px; border-top: 1px solid var(--rule); }
.wn-rel.next { opacity: 0.85; }
.wn-rh { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.wn-rh b { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); font-size: 12px; }
.wn-rh span { color: var(--faint); font-size: 12px; }
.wn-rel.next .wn-rh span { color: var(--amber); }
.wn-title { margin: 2px 0 8px; color: var(--text); font: 800 20px/1.1 var(--display); text-transform: uppercase; }
.wn-rel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wn-rel li { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: baseline; color: #c4ccdb; line-height: 1.4; }
.wn-kind { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.wn-kind.new { color: #8ef0b0; } .wn-kind.better { color: #7cc4ff; } .wn-kind.fix { color: var(--amber); }
.wn-go { color: var(--amber); white-space: nowrap; font-size: 12.5px; }
.wn-foot { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0 14px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--dim); }
.wn-foot a { color: var(--amber); }
.sections { display: flex; gap: 4px; }
.sections a { color: var(--dim); text-decoration: none; padding: 7px 12px; border-radius: 18px; white-space: nowrap; }
.sections a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.sections a[aria-current="true"] { color: var(--text); background: rgba(242, 180, 90, 0.12); box-shadow: inset 0 0 0 1px rgba(242, 180, 90, 0.35); }
.actions { display: flex; gap: 8px; margin-left: auto; flex: none; }
.act { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; cursor: pointer; white-space: nowrap;
  background: var(--glass); border: 1px solid var(--rule); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--text); }
.act:hover { border-color: var(--rule-strong); }
.act[aria-pressed="true"] { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.act.icon-only { width: 36px; padding: 0; justify-content: center; }
@media (max-width: 1320px) { .actions .act span { display: none; } .actions .act { width: 36px; padding: 0; justify-content: center; } }

/* ---------------------------------------------------------------- readout */
.readout { position: fixed; z-index: 4; top: calc(var(--top-h) + 4px); left: var(--pad); right: calc(var(--panel-w) + var(--pad) * 2); pointer-events: none; }
.readout .kicker { margin: 0 0 2px; color: var(--dim); font: 500 13px var(--body); letter-spacing: 0.02em; min-height: 1.4em; }
.readout h1 { margin: 0; font: 800 clamp(40px, 5.6vw, 84px)/0.9 var(--display); text-transform: uppercase; letter-spacing: 0.005em;
  text-shadow: 0 2px 40px rgba(3, 5, 11, 0.9); transition: color 0.3s; overflow-wrap: anywhere; }
.values { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 10px; pointer-events: auto; }
.values label { display: flex; flex-direction: column; }
.values span { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.values input { width: 10.5ch; background: none; border: 0; border-bottom: 1px dashed transparent; padding: 1px 0; color: var(--text);
  font: 600 19px var(--body); font-variant-numeric: tabular-nums; outline: none; }
.values input:hover { border-bottom-color: var(--rule-strong); }
.values input:focus { border-bottom-color: var(--amber); }
.values input.bad { border-bottom-color: #ff6a5a; animation: shake 0.3s; }
@keyframes shake { 25% { translate: -3px; } 75% { translate: 3px; } }

/* ---------------------------------------------------------------- details */
.details { position: fixed; z-index: 4; top: calc(var(--top-h) + 6px); right: var(--pad); width: var(--panel-w);
  bottom: calc(var(--dial-h) + var(--controls-h) + 8px); overflow-y: auto; border-radius: 16px; padding: 16px 18px 20px; }
.details h2 { margin: 0 0 4px; font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.details h2 small { display: block; font: 500 13px var(--body); color: var(--dim); text-transform: none; letter-spacing: 0; margin-top: 4px; }
.details h3 { margin: 16px 0 3px; font: 600 11px var(--body); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.details p { margin: 6px 0; color: #c4ccdb; }
.details .range { color: var(--dim); font-variant-numeric: tabular-nums; margin-top: 0; }
.details .big { font-size: 15px; color: var(--text); }
.details .note { color: var(--faint); font-size: 12.5px; }
.details .shares li { display: grid; grid-template-columns: 9.5em 1fr 4.2em; align-items: center; gap: 8px; margin: 4px 0; color: #c4ccdb; }
.details .shares .bar { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--amber) var(--w), rgba(160, 180, 220, 0.12) var(--w)); }
.details .shares b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.details .mode-notes { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.details .thing { margin: -2px -6px 14px; padding: 10px 12px; border-radius: 12px; background: rgba(242, 180, 90, 0.08); box-shadow: inset 0 0 0 1px rgba(242, 180, 90, 0.25); }
.details .thing .known { margin: 0; color: var(--amber); font-weight: 600; }
.details ul { list-style: none; margin: 4px 0; padding: 0; }
.details .links li { margin: 6px 0; }
.details .links small { color: var(--faint); margin-left: 4px; }
.details .things a { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; margin: 0 -8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.details .things a:hover { background: rgba(255, 255, 255, 0.04); }
.details .things a[aria-current="true"] { background: rgba(242, 180, 90, 0.12); }
.details .things small { color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.details .pictures button { display: block; width: calc(100% + 16px); text-align: left; padding: 6px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.details .pictures button:hover { background: rgba(255, 255, 255, 0.04); }
.details .pictures button[aria-current="true"] { background: rgba(242, 180, 90, 0.12); }
.details .pictures button > span:first-child { display: flex; justify-content: space-between; gap: 10px; color: var(--text); }
.details .pictures .short { display: block; color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.sheet-toggle { display: none; }

/* ---------------------------------------------------------------- controls and the dial */
.controls { position: fixed; z-index: 5; left: var(--pad); right: var(--pad); bottom: calc(var(--dial-h) + 6px); height: var(--controls-h);
  display: flex; align-items: center; gap: 12px; }
.controls > [data-for] { display: none; }
body[data-view="spectrum"] .controls [data-for="spectrum"],
body[data-view="spectrum"][data-mode="field"] .controls [data-for="field"],
body[data-view="visible"] .controls [data-for="visible"],
body[data-view="blackbody"] .controls [data-for="blackbody"],
body[data-view="sky"] .controls [data-for="sky"] { display: flex; }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 20px; background: var(--glass); border: 1px solid var(--rule); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 16px; cursor: pointer; color: var(--dim); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--amber-ink); }
.bb { align-items: center; gap: 14px; }
.slider { display: flex; align-items: center; gap: 10px; color: var(--dim); }
.slider input { width: clamp(160px, 26vw, 380px); accent-color: var(--amber); }
/* The examples: a row of picture tiles, coolest to hottest, the current one outlined. */
.bb-examples { position: absolute; z-index: 1; display: none; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
body[data-view="blackbody"] .bb-examples { display: flex !important; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.bb-examples button { flex: none; width: 116px; padding: 0 0 7px; border: 1px solid var(--rule); border-radius: 12px; background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--dim); text-align: left; cursor: pointer; overflow: hidden; scroll-snap-align: start; }
.bb-examples button:hover { border-color: var(--rule-strong); color: var(--text); }
.bb-examples button[aria-pressed="true"] { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); color: var(--text); }
.bb-examples img { display: block; width: 100%; height: 66px; object-fit: cover; background: #000; }
.bb-examples .t-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; margin: 6px 9px 2px; font-size: 12px; line-height: 1.3; }
.bb-examples .t-k { display: flex; align-items: center; gap: 6px; margin: 0 9px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bb-examples .swatch, .details .swatch { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--rule-strong); }
.hint { margin-left: auto; color: var(--faint); font-size: 12px; text-align: right; }
.dial { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(to top, var(--ink) 75%, rgba(3, 5, 11, 0)); }
.dial canvas { display: block; width: 100%; height: var(--dial-h); touch-action: none; cursor: grab; }
.dial canvas:active { cursor: grabbing; }

/* ---------------------------------------------------------------- landing */
.landing { position: fixed; inset: 0 0 var(--dial-h) 0; z-index: 8; display: none; overflow-y: auto;
  background: radial-gradient(ellipse at 30% 20%, rgba(40, 60, 110, 0.35), rgba(3, 5, 11, 0.88) 70%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
body.at-landing .landing { display: block; }
body.at-landing .readout, body.at-landing .details, body.at-landing .controls, body.at-landing .sections, body.at-landing .sheet-toggle { visibility: hidden; }
.landing-inner { max-width: 1180px; margin: 0 auto; padding: calc(var(--top-h) + 3vh) var(--pad) 32px; }
.title { margin: 0; font: 800 clamp(64px, 11vw, 168px)/0.82 var(--display); text-transform: uppercase;
  background: linear-gradient(90deg, #ff6a4a, #ffd84a 30%, #4ae08a 52%, #4a9cff 74%, #a46aff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 640px; font-size: clamp(16px, 1.5vw, 19px); color: #c4ccdb; margin: 20px 0 22px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.primary, .secondary { height: 44px; padding: 0 22px; border-radius: 22px; cursor: pointer; font-weight: 600; border: 1px solid var(--amber); }
.primary { background: var(--amber); color: var(--amber-ink); }
.secondary { background: none; color: var(--text); border-color: var(--rule-strong); }
.secondary:hover { border-color: var(--text); }
.chapters { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.chapters a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 12px 14px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: var(--glass); border: 1px solid var(--rule); position: relative; overflow: hidden; }
.chapters a::before { content: ''; height: 6px; border-radius: 3px; background: var(--sw); margin-bottom: 6px; }
.chapters a:hover { border-color: var(--rule-strong); transform: translateY(-2px); transition: transform 0.2s; }
.chapters .n { position: absolute; top: 14px; right: 12px; color: var(--faint); font: 600 11px var(--body); }
.chapters b { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.chapters small { color: var(--dim); font-size: 12.5px; line-height: 1.35; }
.more { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.more a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text); border: 1px dashed var(--rule-strong); }
.more a:hover { border-style: solid; }
.more b { font-weight: 600; }
.more small { color: var(--dim); }
.fine { color: var(--faint); font-size: 12px; margin-top: 22px; }
.fine a { color: var(--dim); }

/* ---------------------------------------------------------------- caption, tip, toast, help */
.caption { position: fixed; z-index: 7; left: var(--pad); bottom: calc(var(--dial-h) + var(--controls-h) + 16px); width: min(600px, calc(100vw - var(--panel-w) - 4 * var(--pad)));
  border-radius: 16px; padding: 14px 18px 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }
.caption p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.caption-bar { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.caption-bar span { margin-right: auto; font-variant-numeric: tabular-nums; }
.caption-bar button { background: none; border: 1px solid var(--rule); border-radius: 14px; padding: 2px 12px; color: var(--text); cursor: pointer; }
.caption-bar button:hover { border-color: var(--rule-strong); }
body.at-landing .caption { display: none; }
.tip { position: fixed; z-index: 10; max-width: 340px; padding: 7px 10px; border-radius: 10px; background: var(--glass-strong); font-size: 12.5px; pointer-events: none; }
.toast { position: fixed; z-index: 10; left: 50%; top: calc(var(--top-h) + 8px); translate: -50% 0; padding: 8px 16px; border-radius: 18px; }
.help { color: var(--text); border-radius: 18px; padding: 22px 26px; max-width: 520px; background: var(--glass-strong); }
.help::backdrop { background: rgba(3, 5, 11, 0.6); }
.help h2 { margin: 0 0 12px; font: 800 28px/1 var(--display); text-transform: uppercase; }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
.help dt { white-space: nowrap; }
.help dd { margin: 0; color: #c4ccdb; }
.help p { color: var(--dim); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .sections a { padding: 7px 8px; }
  .chapters { grid-template-columns: repeat(4, 1fr); }
  .hint { display: none; }
}
@media (max-width: 820px) {
  :root { --top-h: 56px; --controls-h: 46px; }
  .sections { position: fixed; top: var(--top-h); left: 0; right: 0; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; z-index: 6; }
  .sections a { padding: 5px 10px; font-size: 13px; }
  .readout { right: var(--pad); top: calc(var(--top-h) + 36px); }
  .caption { width: calc(100vw - 2 * var(--pad)); }
  .readout h1 { font-size: clamp(34px, 11vw, 52px); }
  .values { gap: 2px 16px; }
  .values input { font-size: 15px; width: 9ch; }
  .details { display: none; left: var(--pad); width: auto; top: auto; bottom: calc(var(--dial-h) + var(--controls-h) + 8px); max-height: 52vh; z-index: 7; }
  body.sheet-open .details { display: block; }
  .sheet-toggle { display: inline-flex; position: fixed; z-index: 7; right: var(--pad); bottom: calc(var(--dial-h) + 10px); height: 34px; }
  .controls { right: 90px; overflow-x: auto; scrollbar-width: none; }
  .seg button { padding: 6px 10px; font-size: 13px; }
  .chapters { grid-template-columns: repeat(2, 1fr); }
  .more { grid-template-columns: repeat(2, 1fr); }
  .caption { bottom: calc(var(--dial-h) + var(--controls-h) + 8px); }
  .caption p { font-size: 13.5px; }
}
