/* BetterSPICE website mock-up. Tokens copied from the app (ui/src/styles/tokens.css): one ground, one surface step,
 * hairlines, a single orange accent, Barlow only (JetBrains Mono for code, as the app ships it), radii 0 / 2px / pill,
 * no shadows, tabular figures, motion 150 ms linear colour changes only. */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(fonts/barlow-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 800; font-display: swap; src: url(fonts/barlow-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  --ground: #0D0D0D; --surface: #1A1A1A; --raised: #222222; --rule: #2A2A2A;
  --text: #FFFFFF; --muted: #888888; --soft: #B8B8B8;
  --accent: #FF6B00; --accent-hi: #FF8800; --on-accent: #0D0D0D;
  --ok: #22C55E; --warn: #F59E0B; --danger: #EF4444; --info: #3B82F6; --ai: #8B5CF6;
  --radius-surface: 2px; --radius-pill: 999px;
  --motion-micro: 150ms;
  --wrap: 1200px;
  --mono: 'JetBrains Mono', monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: Barlow, sans-serif; font-size: 17px; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 14px; }
code, kbd, pre { font-family: var(--mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.fig { font-variant-numeric: tabular-nums; font-weight: 600; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; display: flex; gap: 12px; align-items: center; }
.eyebrow b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
kbd {
  font-family: Barlow, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; vertical-align: 1px;
  border: 1px solid var(--rule); border-radius: var(--radius-surface); color: var(--soft); background: var(--surface);
}
code { font-size: .88em; color: var(--soft); }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: var(--ground); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; height: 60px; gap: 28px; }
.top .mark img { height: 26px; width: auto; }
.top nav { display: flex; gap: 22px; font-size: 15px; font-weight: 500; flex: 1; }
.top nav a { text-decoration: none; color: var(--muted); transition: color var(--motion-micro) linear; }
.top nav a:hover, .top nav a.on { color: var(--text); }
.ver { height: 24px; padding: 0 10px; border: 1px solid var(--rule); border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: var(--soft); white-space: nowrap; }
.ver i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* buttons */
.btn {
  height: 44px; padding: 0 18px; border: 1px solid var(--rule); border-radius: var(--radius-surface);
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--text); background: transparent; transition: border-color var(--motion-micro) linear, background-color var(--motion-micro) linear;
}
.btn:hover { border-color: var(--muted); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.pri:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn small { font-weight: 500; opacity: .75; font-size: 12px; letter-spacing: .04em; text-transform: none; }
.btn svg { flex: none; }

/* hero */
.hero { padding: 76px 0 0; }
.hero h1 { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.01em; margin: 0 0 22px; max-width: 900px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 21px; line-height: 1.5; color: var(--soft); max-width: 760px; margin: 0 0 32px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.hero .note { font-size: 14px; color: var(--muted); margin: 0 0 52px; }
.shot { border: 1px solid var(--rule); border-radius: var(--radius-surface); overflow: hidden; background: var(--surface); }
.hero .shot { border-bottom: 0; border-radius: var(--radius-surface) var(--radius-surface) 0 0; }
.cap { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

/* figure strip: label above, figure, unit in the same face */
.figs { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figs > div { padding: 22px 20px 20px; border-left: 1px solid var(--rule); }
.figs > div:first-child { border-left: 0; padding-left: 0; }
.figs .k { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.figs .v { font-size: 30px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.figs .v span { color: var(--muted); font-size: 18px; font-weight: 600; }
.figs .d { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

/* sections */
section.s { padding: 104px 0 0; }
section.s h2 { font-size: 44px; line-height: 1.08; font-weight: 800; margin: 0 0 18px; max-width: 820px; }
section.s .intro { font-size: 19px; color: var(--soft); max-width: 760px; margin: 0 0 40px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.split.rev { grid-template-columns: 7fr 5fr; }
.split h3, .cols h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.split p, .cols p { color: var(--soft); font-size: 16px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.cols > div { padding: 26px 28px 10px 0; }
.cols > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.cols.four { grid-template-columns: repeat(4, 1fr); }
.rule-top { border-top: 1px solid var(--rule); padding-top: 26px; }

/* ruled table */
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 16px 10px 0; border-bottom: 1px solid var(--rule); }
table.t td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--soft); }
table.t td:first-child { color: var(--text); }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t td .fig { color: var(--text); }
.pass { color: var(--ok); font-weight: 600; font-size: 12px; letter-spacing: .1em; }

/* voltage scale (the live look's one scale from 1 mV to 1 kV) */
.vscale { margin: 22px 0 6px; }
.vscale .bar { height: 10px; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #8B3FD9 0%, #D9304A 14%, #EF4444 24%, #F4A5B0 40%, #7A7A7A 50%, #FFF3A8 60%, #D8F25A 72%, #22C55E 84%, #14B8A6 90%, #3B82F6 96%, #6D4BEF 100%); }
.vscale .ticks { position: relative; height: 18px; font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.chips li { height: 30px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--soft); }
.chips li kbd { height: 18px; font-size: 11px; }

/* terminal */
.term { background: var(--ground); border: 1px solid var(--rule); border-radius: var(--radius-surface); font-size: 13.5px; line-height: 1.7; overflow: hidden; }
.term .bar { height: 34px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; padding: 0 14px; font-family: Barlow, sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.term pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: var(--soft); }
.term .p { color: var(--accent); }
.term .c { color: var(--muted); }
.term .o { color: #FFFFFF; }

/* analyses list */
.alist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.alist li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.alist li span { color: var(--muted); font-size: 14px; text-align: right; }

/* calculators */
.calcs { columns: 2; column-gap: 32px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.calcs li { break-inside: avoid; padding: 7px 0; border-bottom: 1px solid var(--rule); color: var(--soft); }

/* download */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.os { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-surface); padding: 24px 24px 22px; display: flex; flex-direction: column; }
.os.here { border-color: var(--accent); }
.os h3 { font-size: 22px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.os .req { font-size: 14px; color: var(--muted); margin: 4px 0 20px; min-height: 22px; }
.os .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.os .row b { font-weight: 600; font-size: 15px; display: block; }
.os .row span { font-size: 13px; color: var(--muted); }
.os .row .btn { flex: none; }
.os .tag { height: 20px; padding: 0 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); display: none; align-items: center; }
.os.here .tag { display: inline-flex; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; }
.facts h4 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.facts p { font-size: 15px; color: var(--soft); }

/* limits */
.limits { margin: 0; padding: 0; list-style: none; }
.limits li { padding: 12px 0 12px 22px; border-bottom: 1px solid var(--rule); position: relative; color: var(--soft); font-size: 15px; }
.limits li::before { content: ''; position: absolute; left: 0; top: 21px; width: 10px; height: 2px; background: var(--warn); }

/* footer */
footer { margin-top: 120px; border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer h5 { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
footer a { display: block; text-decoration: none; color: var(--soft); padding: 3px 0; transition: color var(--motion-micro) linear; }
footer a:hover { color: var(--text); }
footer .mark img { height: 20px; width: auto; margin-bottom: 14px; }
.mock { font-size: 12px; color: var(--muted); border: 1px dashed var(--rule); border-radius: var(--radius-surface); padding: 6px 10px; display: inline-block; margin-top: 10px; }

/* features page */
.ftable td:first-child { width: 220px; font-weight: 600; }
.toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { height: 30px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-pill); display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--soft); transition: border-color var(--motion-micro) linear; }
.toc a:hover { border-color: var(--muted); }

@media (max-width: 1080px) {
  .top nav { display: none; }
  .figs { grid-template-columns: repeat(3, 1fr); }
  .figs > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .figs > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .top .wrap { gap: 14px; }
  .top .ver { display: none; }
  .top .mark { flex: 1; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 40px; }
  .hero .lede { font-size: 18px; }
  .hero .note { margin-bottom: 32px; }
  .hero .cta .btn { flex: 1 1 100%; justify-content: center; }
  section.s { padding-top: 72px; }
  section.s h2 { font-size: 32px; }
  section.s .intro { font-size: 17px; }
  .figs { grid-template-columns: 1fr 1fr; }
  .figs > div { padding: 16px 14px 14px; }
  .figs > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figs > div:nth-child(4) { border-left: 1px solid var(--rule); padding-left: 14px; }
  .figs > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .figs .v { font-size: 24px; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 28px; }
  .split.rev > :first-child { order: 2; }
  .cols, .cols.four { grid-template-columns: 1fr; }
  .cols > div, .cols > div + div { padding: 20px 0 6px; border-left: 0; border-top: 1px solid var(--rule); }
  .cols > div:first-child { border-top: 0; }
  .alist { grid-template-columns: 1fr; }
  .calcs { columns: 1; }
  .dl { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 8px; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
  footer .wrap > :first-child { grid-column: 1 / -1; }
  table.t { font-size: 14px; }
  .tscroll { overflow-x: auto; }
  .tscroll table.t { min-width: 560px; }
  .ftable td:first-child { width: 130px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }

/* README brand assets in the hero */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 44px; }
.badges img { height: 26px; width: auto; }
.cta a img { display: block; height: 50px; width: auto; }
caption.eyebrow { display: table-caption; margin-bottom: 12px; }
@media (max-width: 760px) {
  .badges { gap: 6px; margin-bottom: 30px; }
  .badges img { height: 22px; }
  .hero .cta > a:first-child { flex: 1 1 100%; }
  .hero .cta > a:first-child img { width: 100%; height: auto; }
}

.banner { display: block; width: 100%; height: auto; margin: 0 0 44px; }
.hero h1 { font-size: 54px; }
.vscale .ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.vscale .ticks span:first-child { transform: none; }
.vscale .ticks span:last-child { transform: translateX(-100%); }
.split > *, .cols > *, .dl > * { min-width: 0; }
.os.here .row:first-of-type .btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 760px) {
  .banner { margin-bottom: 28px; }
  .hero h1 { font-size: 36px; }
  .tscroll table.t { min-width: 0; }
  .tscroll table.t:first-of-type td:nth-child(3), .tscroll table.t:first-of-type th:nth-child(3) { display: none; }
  .vscale .ticks span:nth-child(2), .vscale .ticks span:nth-child(4) { display: none; }
}
.hero h1.h1-sm { font-size: 48px; }
@media (max-width: 760px) { .hero h1.h1-sm { font-size: 34px; } }

/* Hero v2: the recorded live view first, centred, then the headline block, centred */
.hero.v2 { padding: 24px 0 0; }
.hero-video { position: relative; width: min(1600px, calc(100% - 48px), calc((100vh - 60px - 64px) * 1.864)); margin: 0 auto; isolation: isolate; }
.hero-video::before { /* light from the screen, not a shadow: a wide, faint orange halo behind the frame */
  content: ''; position: absolute; inset: -8% -6%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 107, 0, .16), rgba(255, 107, 0, .05) 55%, transparent 100%);
}
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 1030; background: var(--ground);
  border: 1px solid #3A2A1E; border-radius: var(--radius-surface); }
.vid-tag { position: absolute; left: 14px; top: 14px; height: 26px; padding: 0 11px; border-radius: var(--radius-pill);
  background: rgba(13, 13, 13, .82); border: 1px solid var(--rule); color: var(--soft); font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px; }
.vid-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero-copy { text-align: center; padding-top: 52px; }
.hero-copy h1 { margin-left: auto; margin-right: auto; max-width: 1040px; }
.hero-copy .lede { margin-left: auto; margin-right: auto; }
.hero-copy .cta, .hero-copy .badges { justify-content: center; }
.hero-copy .badges { margin-bottom: 64px; }
#download .banner { margin: 0 0 56px; }
@media (max-width: 760px) {
  .hero.v2 { padding-top: 0; }
  .hero-video { width: 100%; }
  .hero-video::before { display: none; }
  .hero-video video { border-left: 0; border-right: 0; border-radius: 0; }
  .vid-tag { left: 8px; top: 8px; height: 22px; font-size: 11px; padding: 0 8px; }
  .hero-copy { padding-top: 28px; }
  .hero-copy .badges { margin-bottom: 40px; }
}
.hero.v2 { overflow-x: clip; }

/* Notice bar above the nav: the repository is private for now */
.notice { background: var(--surface); border-bottom: 1px solid var(--rule); color: var(--soft); font-size: 14px; line-height: 1.4; }
.notice .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.notice strong { color: var(--text); font-weight: 600; }
.notice-dot { flex: none; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--accent); }

/* Downloads are not open yet: greyed buttons that say so */
.btn.soon, .btn.pri.soon, .btn.pri.soon:hover { background: var(--raised); border-color: var(--rule); color: var(--muted); }
span.btn.soon { cursor: default; }
.soon-link { color: var(--muted) !important; }
.soon-note { display: flex; align-items: center; gap: 10px; color: var(--soft); margin: 8px 0 16px; }
.dl .soon { opacity: .7; }
.os.here .row .btn.soon { background: var(--raised); border-color: var(--rule); color: var(--muted); }
/* Hero order: tagline, then the video, then the text and buttons */
.hero.v2 { padding-top: 40px; }
.hero-head { text-align: center; }
.hero-head h1 { margin: 0 auto 28px; max-width: 1100px; }
.hero.v2 .hero-copy { padding-top: 36px; }
@media (max-width: 760px) {
  .hero.v2 { padding-top: 28px; }
  .hero-head h1 { margin-bottom: 20px; }
  .hero.v2 .hero-copy { padding-top: 24px; }
}
.hero-video { width: min(1600px, calc(100% - 48px), calc((100vh - 370px) * 1.864)); }
@media (max-width: 760px) { .hero-video { width: calc(100% - 24px); } }

/* =====================================================================================================================
 * Interaction layer. MOTION.md tokens only: 150 ms hover and focus, 300 ms state, 500 ms a group arriving, 1200 ms a
 * section change (site.js). Moves use --ease-move, colour and opacity are linear. Nothing scales, nothing bounces.
 * Hover styles live under (hover: hover); touch screens get :active instead.
 * ===================================================================================================================== */
:root { --motion-state: 300ms; --motion-reveal: 500ms; --motion-travel: 1200ms; --ease-move: cubic-bezier(0.34, 0, 0.11, 1); --ease-fade: linear; }
section.s, [id] { scroll-margin-top: 72px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-surface); }
.btn:focus-visible, .zoomable:focus-visible { outline-offset: 2px; }

/* links in running text */
.split p a, .cols p a, .facts p a, .lede a, .intro a, .lic a { color: var(--text); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color var(--motion-micro) linear; }

/* nav: an underline that draws in from the left (background-size, not a scale) */
.top nav a { position: relative; padding: 18px 0; background: linear-gradient(var(--accent), var(--accent)) 0 calc(100% - 12px) / 0 2px no-repeat;
  transition: color var(--motion-micro) linear, background-size var(--motion-micro) var(--ease-move); }
.top nav a.on { color: var(--text); background-size: 100% 2px; }
.top .mark { border-radius: var(--radius-surface); }

/* buttons */
.btn { transition: border-color var(--motion-micro) linear, background-color var(--motion-micro) linear, color var(--motion-micro) linear; }
.btn svg { transition: transform var(--motion-micro) var(--ease-move); }
.btn.soon { cursor: default; }
.btn.soon svg { opacity: .7; }

/* chips, list rows, table rows, cards */
.chips li, .toc a, .alist li, .calcs li, table.t tbody tr, .os, .os .row, .figs > div, .cols > div, .limits li, .facts > div, .shot, kbd {
  transition: border-color var(--motion-micro) linear, background-color var(--motion-micro) linear, color var(--motion-micro) linear; }
table.t tbody tr td:first-child { box-shadow: inset 2px 0 0 transparent; transition: box-shadow var(--motion-micro) linear; }

/* figure tiles: zoom on click (zoom.js) */
.shot { position: relative; }
.zoomable { cursor: zoom-in; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--radius-pill); background: rgba(13, 13, 13, .86); border: 1px solid var(--rule); color: var(--text);
  font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: 0; pointer-events: none; transition: opacity var(--motion-micro) linear; }

/* code blocks: copy */
.term .bar { justify-content: space-between; gap: 12px; }
.copy { height: 26px; margin-right: -6px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule);
  border-radius: var(--radius-surface); background: transparent; color: var(--muted); font: 600 11px/1 Barlow, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; transition: color var(--motion-micro) linear, border-color var(--motion-micro) linear; }
.copy.done { color: var(--ok); border-color: var(--ok); }
@media (pointer: coarse) { .copy { height: 36px; margin: 0 -8px 0 0; } .term .bar { height: 48px; } }

/* "soon" items: not links */
[data-soon] { position: relative; cursor: default; }
.soon-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 8px; border: 1px solid var(--rule);
  border-radius: var(--radius-pill); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); vertical-align: 1px; font-style: normal; }
[data-soon]::after { content: attr(data-soon); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 6; white-space: nowrap; pointer-events: none;
  padding: 6px 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-surface);
  color: var(--soft); font: 500 12px/1.3 Barlow, sans-serif; letter-spacing: 0; text-transform: none; opacity: 0; transition: opacity var(--motion-micro) linear; }
[data-soon]:focus-visible::after, [data-soon].tip-on::after { opacity: 1; }
.dl [data-soon]::after { left: auto; right: 0; }
footer span.soon-link { display: flex; align-items: center; min-height: 30px; color: var(--muted); width: max-content; }

@media (hover: hover) {
  .top nav a:hover { color: var(--text); background-size: 100% 2px; }
  .split p a:hover, .cols p a:hover, .facts p a:hover, .lede a:hover, .intro a:hover, .lic a:hover { color: var(--accent); }
  .btn:hover { border-color: var(--accent); color: var(--text); }
  .btn:hover svg { transform: translateY(2px); }
  .btn.pri:hover { color: var(--on-accent); }
  .btn.soon:hover, .btn.pri.soon:hover { border-color: var(--muted); color: var(--soft); background: var(--raised); }
  .btn.soon:hover svg { transform: translateY(2px); }
  .chips li:hover, .toc a:hover { border-color: var(--accent); color: var(--text); }
  .alist li:hover, .calcs li:hover, .limits li:hover { color: var(--text); border-bottom-color: #3A3A3A; }
  .alist li:hover kbd { border-color: var(--accent); color: var(--text); }
  table.t tbody tr:hover { background: var(--surface); }
  table.t tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
  table.t tbody tr:hover td { color: var(--text); }
  .os:hover { border-color: #3A3A3A; background: #1D1D1D; }
  .os.here:hover { border-color: var(--accent); }
  .os .row:hover { border-top-color: #3A3A3A; }
  .os .row:hover b { color: var(--accent); }
  .figs > div:hover .k { color: var(--soft); }
  .zoomable:hover { border-color: #4A3624; }
  .zoomable:hover .zoom-hint { opacity: 1; }
  .copy:hover { color: var(--text); border-color: var(--accent); }
  .copy.done:hover { color: var(--ok); border-color: var(--ok); }
  footer a:hover { color: var(--text); background-size: 100% 1px; }
  [data-soon]:hover::after { opacity: 1; }
  .facts > div:hover h4, .cols > div:hover h3 { color: var(--accent); }
  .facts h4, .cols h3 { transition: color var(--motion-micro) linear; }
}
@media (hover: none) {
  .btn:active { border-color: var(--accent); }
  .btn.pri:active { background: var(--accent-hi); }
  .chips li:active, .toc a:active { border-color: var(--accent); }
  table.t tbody tr:active { background: var(--surface); }
  .os .row:active { background: var(--surface); }
  .zoomable:active { border-color: #4A3624; }
  .zoom-hint { opacity: 1; font-size: 0; gap: 0; padding: 0 7px; } /* the icon alone on touch screens */
  .copy:active { border-color: var(--accent); }
  footer a:active, .top nav a:active, .menu-panel a:active { color: var(--accent); }
}
footer a { width: max-content; max-width: 100%; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: color var(--motion-micro) linear, background-size var(--motion-micro) var(--ease-move); }
footer a.mark { background: none; }
@media (pointer: coarse) { footer a:not(.mark) { padding: 11px 0; } }

/* groups arrive once (site.js): a 10 px rise and a fade, 500 ms, 70 ms apart */
html.js .rv { opacity: 0; transform: translateY(10px); }
html.js .rv.in { opacity: 1; transform: none; transition: opacity var(--motion-reveal) linear var(--d, 0ms), transform var(--motion-reveal) var(--ease-move) var(--d, 0ms); }

/* menu for narrow screens */
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: var(--radius-surface); align-items: center; justify-content: center; }
.menu-btn svg path { transition: opacity var(--motion-micro) linear; }
.menu-btn[aria-expanded="true"] .m-open, .menu-btn:not([aria-expanded="true"]) .m-close { opacity: 0; }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--ground); border-bottom: 1px solid var(--rule);
  visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--motion-micro) linear, transform var(--motion-micro) var(--ease-move), visibility 0s linear var(--motion-micro); }
.menu-panel.open { visibility: visible; opacity: 1; transform: none; transition: opacity var(--motion-micro) linear, transform var(--motion-micro) var(--ease-move); }
.top .menu-panel .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding-top: 6px; padding-bottom: 14px; height: auto; }
.menu-panel a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--soft); font-weight: 500; font-size: 16px; }
.menu-panel a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 1080px) { .menu-btn { display: inline-flex; } .top .btn.sm { display: none; } .top .ver { margin-left: auto; } }
@media (min-width: 1081px) { .menu-panel { display: none; } }

/* the colour scale: the voltage under the pointer */
.vscale { position: relative; margin-top: 44px; }
.vscale .bar { position: relative; cursor: crosshair; touch-action: none; height: 14px; }
.vscale .bar::before { content: ''; position: absolute; inset: -15px 0; }
.vscale .read { position: absolute; top: -34px; transform: translateX(-50%); height: 26px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-surface); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--motion-micro) linear; }
.vscale .read::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #7A7A7A); }
.vscale.reading .read { opacity: 1; }
.vscale .mark { position: absolute; top: -3px; width: 2px; height: 20px; margin-left: -1px; background: var(--text); opacity: 0; transition: opacity var(--motion-micro) linear; pointer-events: none; }
.vscale .mark.on { opacity: 1; }
.vscale .ticks { margin-top: 10px; }
.vscale .hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* ------------------------------------------------------------ the live circuit */
.live { border: 1px solid var(--rule); border-radius: var(--radius-surface); background: var(--ground); overflow: hidden; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.lc-title { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-title i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); transition: background-color var(--motion-state) linear; }
.live.paused .lc-title i { background: var(--muted); }
.lc-run { flex: none; height: 36px; min-width: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: var(--radius-surface);
  background: transparent; color: var(--soft); font: 600 12px/1 Barlow, sans-serif; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: border-color var(--motion-micro) linear, color var(--motion-micro) linear; }
.lc-run .ic-run, .live.paused .lc-run .ic-pause { display: none; }
.live.paused .lc-run .ic-run { display: block; }
.lc-stage { position: relative; outline: none; background-color: var(--ground);
  background-image: radial-gradient(#242424 1px, transparent 1.2px); background-size: 4.1667% 8.197%; background-position: 0 1.6%; }
.lc-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
.lc-svg { display: block; width: 100%; height: auto; aspect-ratio: 480 / 244; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.lc-svg [data-hit] { cursor: crosshair; }
.lc-svg path.hl { stroke-width: 4; }
.lc-stage .bs-tip { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity var(--motion-micro) linear;
  display: grid; grid-template-columns: auto auto; gap: 3px 14px; align-items: baseline; padding: 10px 12px; min-width: 150px;
  background: var(--surface); color: var(--text); border: 1px solid var(--rule); border-radius: 2px; white-space: nowrap; font-size: 14px; line-height: 1.35; }
.lc-stage .bs-tip.on { opacity: 1; }
.lc-stage .bs-tip b { grid-column: 1 / -1; font-weight: 700; font-size: 13px; }
.lc-stage .bs-tip span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.lc-stage .bs-tip i { font-style: normal; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; }
.lc-stage .bs-tip em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.lc-scope { position: relative; border-top: 1px solid var(--rule); background: #0A0A0A; }
.lc-scope-svg { display: block; width: 100%; height: 130px; }
.lc-scope .ax { position: absolute; left: 8px; font-size: 11px; color: #555; font-variant-numeric: tabular-nums; pointer-events: none; }
.lc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 9px 14px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lc-legend b { font-weight: 600; color: var(--text); display: inline-block; min-width: 64px; }
.lc-legend .sw { display: inline-block; width: 14px; height: 2px; margin-right: 7px; vertical-align: middle; }
.lc-legend .t { margin-left: auto; }
.lc-ctl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 14px; padding: 4px 14px 12px; border-top: 1px solid var(--rule); background: var(--surface); }
.lc-ctl label { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lc-ctl output { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.lc-ctl .resp { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* a range input in the site's terms: hairline track, accent thumb */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--rule); }
input[type=range]::-moz-range-track { height: 2px; background: var(--rule); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--accent); border: 4px solid var(--surface); transition: background-color var(--motion-micro) linear; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
@media (hover: hover) {
  .lc-run:hover { border-color: var(--accent); color: var(--text); }
  input[type=range]:hover::-webkit-slider-thumb { background: var(--accent-hi); }
}
@media (hover: none) { .lc-run:active { border-color: var(--accent); } }
.live-aside { margin: 32px 0 0; }
.live-aside .shot { max-width: 440px; }
@media (max-width: 760px) {
  .lc-scope-svg { height: 110px; }
  .lc-legend .t { margin-left: 0; width: 100%; }
  .live-aside .shot { max-width: none; }
  .lc-title { letter-spacing: .1em; }
}

/* ------------------------------------------------------------ the mini calculator */
.mini-calc { margin-top: 28px; border: 1px solid var(--rule); border-radius: var(--radius-surface); background: var(--surface); }
.mini-calc .mc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 14px; border-bottom: 1px solid var(--rule);
  font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mini-calc .mc-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px; }
.mini-calc label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.mini-calc input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius-surface); background: var(--ground);
  color: var(--text); font: 600 16px/1 Barlow, sans-serif; font-variant-numeric: tabular-nums; transition: border-color var(--motion-micro) linear; }
.mini-calc input:focus-visible { outline: none; border-color: var(--accent); }
.mini-calc .mc-out { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.mini-calc .mc-out > div { padding: 12px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.mini-calc .mc-out > div:nth-child(3n+1) { border-left: 0; }
.mini-calc .mc-out > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
.mini-calc .mc-out .k { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mini-calc .mc-out .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-calc .mc-out .acc .v { color: var(--accent); }
.mini-calc .mc-msg { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.mini-calc.bad .mc-msg { color: var(--warn); }
@media (hover: hover) { .mini-calc input:hover { border-color: var(--muted); } .mini-calc input:focus-visible { border-color: var(--accent); } }
@media (max-width: 760px) {
  .mini-calc .mc-out { grid-template-columns: 1fr 1fr; }
  .mini-calc .mc-out > div:nth-child(3n+1) { border-left: 1px solid var(--rule); }
  .mini-calc .mc-out > div:nth-child(odd) { border-left: 0; }
  .mini-calc .mc-out > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .mini-calc .mc-in { gap: 8px; padding: 12px; }
}

/* ------------------------------------------------------------ image viewer (zoom.js) */
html.zv-lock, html.zv-lock body { overflow: hidden; }
html.zv-lock body { padding-right: var(--sbw, 0); }
.zv { position: fixed; inset: 0; z-index: 100; background: rgba(8, 8, 8, .96); opacity: 0; transition: opacity var(--motion-state) linear;
  display: grid; grid-template-rows: 60px minmax(0, 1fr) auto; overscroll-behavior: contain; }
.zv[hidden] { display: none; }
.zv.on { opacity: 1; }
.zv-stage { position: relative; grid-row: 2; overflow: hidden; touch-action: none; margin: 0 68px; }
.zv-img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: 50% 50%; cursor: zoom-in; user-select: none; -webkit-user-drag: none; background: var(--surface); }
.zv.zoomed .zv-img { cursor: grab; }
.zv.panning .zv-img { cursor: grabbing; }
.zv-bar { grid-row: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; }
.zv-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zv-tools { display: flex; gap: 6px; }
.zv-b, .zv-nav { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rule); border-radius: var(--radius-surface);
  background: var(--ground); color: var(--soft); cursor: pointer; font: 600 13px/1 Barlow, sans-serif; letter-spacing: .04em; font-variant-numeric: tabular-nums;
  transition: border-color var(--motion-micro) linear, color var(--motion-micro) linear; }
.zv-fit { width: 56px; }
.zv-nav { position: absolute; top: 50%; margin-top: -22px; z-index: 2; }
.zv-prev { left: 12px; } .zv-next { right: 12px; }
.zv-nav[hidden] { display: none; }
.zv-cap { grid-row: 3; margin: 0 auto; padding: 14px 20px 20px; max-width: 900px; text-align: center; color: var(--soft); font-size: 15px; }
@media (hover: hover) { .zv-b:hover, .zv-nav:hover { border-color: var(--accent); color: var(--text); } }
@media (hover: none) { .zv-b:active, .zv-nav:active { border-color: var(--accent); } }
@media (max-width: 760px) {
  .zv-stage { margin: 0; }
  .zv-nav { display: none; }
  .zv-cap { font-size: 14px; padding: 12px 16px 18px; }
}

/* license and error pages */
.lic pre { white-space: pre-wrap; font-size: 13px; line-height: 1.6; color: var(--soft); margin: 0; padding: 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-surface); overflow-wrap: anywhere; }
.lic ul { margin: 0 0 28px; padding: 0; list-style: none; max-width: 820px; }
.lic li { padding: 11px 0 11px 22px; border-bottom: 1px solid var(--rule); position: relative; color: var(--soft); }
.lic li::before { content: ''; position: absolute; left: 0; top: 22px; width: 10px; height: 2px; background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html.js .rv, html.js .rv.in { transform: none !important; }
  html.js .rv.in { transition: opacity var(--motion-reveal) linear !important; }
  .btn:hover svg, .btn.soon:hover svg { transform: none; }
  .menu-panel, .menu-panel.open { transform: none; }
}

/* ---- Hero player v3 (hp-*): four recorded clips, one decisive move between them, then stillness.
   Durations and curves from the motion guide: 150 / 300 / 500 ms, ease-move for travel, linear for fades,
   ease-exit for leaving. Nothing scales or bounces. Self-contained: needs only the page tokens with fallbacks. */
.hp-player {
  --hp-move: cubic-bezier(0.34, 0, 0.11, 1); --hp-exit: cubic-bezier(0.4, 0, 1, 1); --hp-accent: var(--accent, #FF6B00);
  position: relative; isolation: isolate; margin: 0 auto;
  width: min(1600px, calc(100% - 48px), calc((100vh - 330px) * 1.864));
}
.hp-player::before { /* light from the screen, not a shadow */
  content: ''; position: absolute; inset: -8% -6% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 107, 0, .14), rgba(255, 107, 0, .04) 55%, transparent 100%);
}
.hp-stage { position: relative; aspect-ratio: 1920 / 1030; overflow: hidden; background: #0D0D0D;
  border: 1px solid #3A2A1E; border-radius: 2px; }
.hp-stage > video, .hp-still, .hp-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-stage > video { opacity: 0; z-index: 1; }
.hp-stage > video.hp-on { opacity: 1; z-index: 2; }
.hp-stage > video.hp-out { opacity: 0; transition: opacity 500ms linear; }
.hp-stage > video.hp-in { opacity: 1; z-index: 3; clip-path: inset(0 100% 0 0); }
.hp-stage > video.hp-in.hp-go { clip-path: inset(0 0 0 0); transition: clip-path 500ms var(--hp-move); }
.hp-stage > video.hp-in-fade { opacity: 0; z-index: 3; }
.hp-stage > video.hp-in-fade.hp-go { opacity: 1; transition: opacity 300ms linear; }
.hp-scan { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; z-index: 4; pointer-events: none;
  background: var(--hp-accent); opacity: 0; transform: translateX(-2px); }
.hp-scan::before { /* the soft light the trace leaves behind it */
  content: ''; position: absolute; top: 0; bottom: 0; right: 2px; width: 140px;
  background: linear-gradient(to left, rgba(255, 107, 0, .24), rgba(255, 107, 0, 0)); }
.hp-scan.hp-go { opacity: 1; transform: translateX(var(--hp-w, 100vw)); transition: transform 500ms var(--hp-move); }
.hp-scan.hp-done { opacity: 0; transform: translateX(var(--hp-w, 100vw)); transition: opacity 150ms linear; }
.hp-caption { position: absolute; left: 14px; top: 14px; z-index: 5; overflow: hidden; border-radius: 2px;
  background: rgba(13, 13, 13, .86); border: 1px solid #2A2A2A; padding: 7px 12px; max-width: calc(100% - 28px); }
.hp-caption-in { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14px; line-height: 1.3;
  color: #B8B8B8; transition: transform 300ms var(--hp-move); }
.hp-caption-in b { color: #FFFFFF; font-weight: 600; }
.hp-caption-in span { font-variant-numeric: tabular-nums; }
.hp-caption-in.hp-leave { transform: translateY(-140%); transition: transform 150ms var(--hp-exit); }
.hp-caption-in.hp-enter { transform: translateY(10px); transition: none; }
.hp-prog { display: flex; gap: 8px; margin-top: 4px; }
.hp-seg { flex: 1; min-height: 44px; padding: 8px 0 0; border: 0; background: none; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 7px; color: #888888; font: 500 12px/1 Barlow, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.hp-seg:hover, .hp-seg.hp-cur { color: #FFFFFF; }
.hp-seg:focus-visible { outline: 1px solid var(--hp-accent); outline-offset: 2px; }
.hp-seg-track { position: relative; display: block; height: 2px; background: #2A2A2A; }
.hp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--hp-accent); }
@media (max-width: 760px) {
  .hp-player { width: calc(100% - 24px); }
  .hp-player::before { display: none; }
  .hp-stage { aspect-ratio: 1080 / 1286; }
  .hp-caption { left: 8px; top: 8px; padding: 6px 10px; }
  .hp-caption-in { font-size: 13px; gap: 2px 8px; }
  .hp-prog { gap: 6px; }
  .hp-seg { font-size: 11px; letter-spacing: .06em; }
}
@media (prefers-reduced-motion: reduce) {
  .hp-scan { display: none; }
  .hp-caption-in, .hp-caption-in.hp-leave { transition: none; }
}

/* Phone tap targets: every link and button at least 44 px tall (mobile check, 390 x 844) */
@media (max-width: 760px) {
  .top .mark { display: inline-flex; align-items: center; min-height: 44px; }
  .top .btn.sm { height: 44px; }
  footer a { display: flex; align-items: center; min-height: 44px; padding: 0; }
  .toc a { height: 44px; }
}
/* Accuracy tables on a phone: keep the 95 % column, drop the median and the step description */
@media (max-width: 760px) {
  .tscroll table.acc-ng td:nth-child(3), .tscroll table.acc-ng th:nth-child(3) { display: table-cell; }
  .tscroll table.acc-ng td:nth-child(4), .tscroll table.acc-ng th:nth-child(4),
  .tscroll table.acc-lq td:nth-child(2), .tscroll table.acc-lq th:nth-child(2) { display: none; }
}

/* ------------------------------------------------------------ measured accuracy band, under the key figures */
.acc-band { padding: 72px 0 0; }
.ab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.ab-head h2 { font-size: 40px; line-height: 1.08; font-weight: 800; margin: 0; max-width: 820px; }
.ab-head .eyebrow b { letter-spacing: .16em; }
.ab-more { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--soft); transition: color var(--motion-micro) linear; }
.ab-more svg { transition: transform var(--motion-micro) var(--ease-move); }
.ab-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius-surface); background: var(--surface); }
.ab-tile { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 24px; min-width: 0; text-decoration: none; color: var(--text);
  border-left: 1px solid var(--rule); border-top: 2px solid transparent; margin-top: -1px;
  transition: border-top-color var(--motion-micro) linear, background-color var(--motion-micro) linear; }
.ab-tile:first-child { border-left: 0; }
.ab-tile .k { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ab-tile .v { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ab-tile .v small { font-size: 22px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ab-tile .v sup { font-size: .5em; font-weight: 700; vertical-align: .9em; line-height: 0; margin-left: 1px; }
.ab-tile .d { font-size: 14px; line-height: 1.45; color: var(--soft); }
.ab-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.ab-note code { font-size: 12px; }
.fine { font-size: 13px; line-height: 1.5; color: var(--muted) !important; margin: 10px 0 0; }
table.t sup { font-size: .72em; line-height: 0; }
table.meas td.n, table.meas th.n { white-space: nowrap; }
#accuracy h3 { font-size: 20px; margin: 0 0 10px; }
@media (hover: hover) {
  .ab-tile:hover { background: var(--raised); border-top-color: var(--accent); }
  .ab-more:hover { color: var(--text); }
  .ab-more:hover svg { transform: translateY(2px); }
}
@media (hover: none) { .ab-tile:active { background: var(--raised); border-top-color: var(--accent); } }
.ab-tile:focus-visible { outline-offset: -2px; }
@media (max-width: 1080px) {
  .ab-tiles { grid-template-columns: 1fr 1fr; }
  .ab-tile:nth-child(3) { border-left: 0; }
  .ab-tile:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 0; }
}
@media (max-width: 760px) {
  .acc-band { padding-top: 52px; }
  .ab-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .ab-head h2 { font-size: 30px; }
  .ab-tiles { grid-template-columns: 1fr; }
  .ab-tile, .ab-tile:nth-child(3) { border-left: 0; padding: 20px 18px; }
  .ab-tile + .ab-tile { border-top: 1px solid var(--rule); margin-top: 0; }
  .ab-tile .v { font-size: 44px; }
  .tscroll table.meas { font-size: 13px; }
  .tscroll table.meas td:nth-child(2), .tscroll table.meas th:nth-child(2) { display: none; }
  .tscroll table.meas td, .tscroll table.meas th { padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .ab-more:hover svg { transform: none; } }

/* phone tap targets, 44 px */
@media (pointer: coarse) {
  .lc-run { height: 44px; }
  .copy { height: 44px; }
  .term .bar { height: 56px; }
  .os .row .btn.sm { height: 44px; }
  footer span.soon-link { min-height: 44px; }
}
.ab-tile .k { min-height: 30px; }
@media (max-width: 760px) {
  .ab-tiles { grid-template-columns: 1fr 1fr; }
  .ab-tile, .ab-tile:nth-child(3) { padding: 16px 14px 18px; gap: 8px; }
  .ab-tile:nth-child(even) { border-left: 1px solid var(--rule); }
  .ab-tile + .ab-tile { border-top: 0; }
  .ab-tile:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .ab-tile .k { font-size: 10px; letter-spacing: .1em; min-height: 27px; }
  .ab-tile .v { font-size: 32px; }
  .ab-tile .v small { font-size: 15px; }
  .ab-tile .d { font-size: 13px; }
}
.zv { background: rgba(8, 8, 8, .985); }
.zv-bar, .zv-cap { background: #080808; }
.zv-cap { max-width: none; width: 100%; }
/* Join the beta: the address appears only after the click */
.beta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; min-height: 48px; }
.beta-mail { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.beta-addr { font-size: 20px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--accent); transition: color var(--motion-micro) linear; }
.beta-addr:hover, .beta-addr:focus-visible { color: var(--accent); }
.beta-row [data-reveal][hidden] { display: none; }
/* Join the beta in the top bar: the one orange button while downloads are greyed */
.top .beta-cta { margin-right: 8px; }
@media (max-width: 760px) {
  .top .btn.soon { display: none; }
  .top .beta-cta { margin-right: 0; }
}
@media (max-width: 1080px) { .top .btn.sm.beta-cta { display: inline-flex; margin-left: auto; margin-right: 8px; } .top .ver { display: none; } }
@media (max-width: 420px) { .top .mark img { width: 150px; height: auto; } .top .btn.sm.beta-cta { padding: 0 10px; font-size: 13px; } }
/* top bar with the beta button: never wrap, logo keeps its size */
.top .mark { flex: none; }
.top nav a { white-space: nowrap; }
.top .btn { white-space: nowrap; flex: none; }
@media (max-width: 1500px) { .top .ver { display: none; } }
@media (max-width: 1340px) { .top nav { gap: 18px; } .top nav a { font-size: 15px; } }
@media (max-width: 1080px) { .top .menu-btn { order: 10; } .top .btn.sm.beta-cta { order: 9; } }
@media (max-width: 1340px) { .top .btn.soon { display: none; } }
@media (max-width: 1500px) and (min-width: 1341px) { .top nav { gap: 16px; } .top .beta-cta { margin-right: 6px; } .top .btn.sm { padding: 0 10px; } }
/* Hero player on phones and short screens: the whole clip is always visible (no crop), the caption sits under it */
@media (max-width: 760px) {
  .hp-stage { aspect-ratio: 1920 / 1030; overflow: visible; margin-bottom: 50px; }
  .hp-stage > video, .hp-still, .hp-still img { object-fit: contain; }
  .hp-scan::before { display: none; }
  .hp-caption { top: calc(100% + 8px); left: 0; max-width: 100%; background: none; border: 0; padding: 0; }
}
@media (max-height: 700px) and (min-width: 561px) {
  .hp-player { width: min(1600px, calc(100% - 48px), calc((100vh - 96px) * 1.864)); }
}
/* long code lines scroll inside their box, never the page */
.split > *, .wrap > div, figure, .term { min-width: 0; } pre { max-width: 100%; }
.hero.v2 { overflow-x: clip; }
@media (max-width: 1000px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > :first-child { grid-column: 1 / -1; } }
footer .wrap > * { min-width: 0; }
/* Phone turned sideways: a compact tagline, then the clip at nearly the full screen height */
@media (max-height: 500px) and (orientation: landscape) {
  .hero.v2 { padding-top: 14px; }
  .hero-head h1 { font-size: 26px; line-height: 1.1; margin-bottom: 12px; max-width: none; }
  .hp-player { width: min(calc(100% - 48px), calc((100vh - 70px) * 1.864)); }
  .notice .wrap { padding-top: 5px; padding-bottom: 5px; font-size: 13px; }
}
