/* OnAirGuard: broadcast studio / ON AIR.
   One signal colour (tungsten red) used like a lit sign. System fonts only. No boxes: sections are
   separated by colour, space and type scale.

   Two modes, one design.
   DARK  (the original look): ink fields alternate with paper fields.
   LIGHT (paper-dominant): the ink fields become warm paper, the paper fields become a deeper sand,
         the showcase ("screens") and the footer stay ink, the banners stay red, shadows are warm and
         soft, and the red glow is re-tuned for a light ground (multiply, lower alpha).
   Mode is chosen by prefers-color-scheme and overridden by the header toggle (kept in localStorage).
   The inline script in <head> sets data-theme on <html> before first paint.
   NEVER use purple/indigo/violet anywhere and NEVER use pill-shaped (fully rounded) controls: tools/check_site.py enforces both. */

:root {
  /* palette (constant in both modes) */
  --ink: #0E0C0B;
  --ink-2: #1A1411;
  --on-ink: #F3EEE6;
  --on-ink-muted: #B5ABA0;
  --red: #FF2A1F;               /* the lit signal: button and banner surfaces, text on ink */
  --paper: #F3EEE6;
  --paper-2: #E6DED0;
  --on-paper: #1A1613;
  --on-paper-muted: #5A5148;
  --red-ink: #C4160D;           /* red text on dark-mode paper (AA) */
  --lt-1: #F8F4EC;              /* light mode: field A */
  --lt-2: #EDE5D8;              /* light mode: field B (sand) */
  --lt-3: #E0D6C4;
  --lt-red-ink: #BF140B;        /* light mode: small red text (AA on both fields) */
  --lt-hot: #DC2013;            /* light mode: big red display type (3:1 on both fields) */
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Condensed", "Arial Black", system-ui, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  --gut: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* ---- MODE TOKENS: dark (default). The two light blocks below must stay identical (check_contrast.py verifies). ---- */
  color-scheme: dark;
  --page: var(--ink);
  /* "d" = what a .dark field is; "p" = what a .paper field is */
  --d-bg: var(--ink);        --d-fg: var(--on-ink);    --d-mute: var(--on-ink-muted);   --d-acc: var(--red);      --d-hot: var(--red);      --d-tint: var(--ink-2);
  --p-bg: var(--paper);      --p-fg: var(--on-paper);  --p-mute: var(--on-paper-muted); --p-acc: var(--red-ink);  --p-hot: var(--red-ink);  --p-tint: var(--paper-2);
  --d-glow: 0 0 .12em rgba(255, 42, 31, .8), 0 0 .5em rgba(255, 42, 31, .4);
  --p-glow: 0 0 0 transparent;
  --d-img: drop-shadow(0 24px 50px rgba(0, 0, 0, .65));
  --p-img: drop-shadow(0 20px 40px rgba(26, 22, 19, .35));
  --glow-h1: 0 0 .15em rgba(255, 42, 31, .9), 0 0 .6em rgba(255, 42, 31, .55);
  --em-off: #76655E;
  --edge: inset 0 0 70px 14px rgba(255, 42, 31, .78), inset 0 0 190px 20px rgba(255, 42, 31, .38);
  --edge-blend: normal;
  --sign-glow: 0 0 .6em .1em rgba(255, 42, 31, .55), 0 0 2.4em .3em rgba(255, 42, 31, .35), inset 0 0 .5em rgba(255, 42, 31, .25);
  --sign-drop: none;
  --banner-shadow: 0 10px 50px rgba(0, 0, 0, .55), 0 0 90px rgba(255, 42, 31, .35);
  --rev-bg: var(--paper);
  --rev-fg: var(--ink);
  --rev-shadow: 0 10px 50px rgba(0, 0, 0, .5);
  --btn-glow: 0 0 46px 6px rgba(255, 42, 31, .55);
  --grain-op: .09;
  --grain-blend: overlay;
  --ghost: #1F1814;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --page: var(--lt-1);
    --d-bg: var(--lt-1);   --d-fg: var(--on-paper);  --d-mute: var(--on-paper-muted);  --d-acc: var(--lt-red-ink);  --d-hot: var(--lt-hot);  --d-tint: var(--lt-2);
    --p-bg: var(--lt-2);   --p-fg: var(--on-paper);  --p-mute: var(--on-paper-muted);  --p-acc: var(--lt-red-ink);  --p-hot: var(--lt-hot);  --p-tint: var(--lt-3);
    --d-glow: 0 0 .5em rgba(220, 32, 19, .2);
    --p-glow: 0 0 .5em rgba(220, 32, 19, .2);
    --d-img: drop-shadow(0 22px 30px rgba(70, 40, 24, .28));
    --p-img: drop-shadow(0 22px 30px rgba(70, 40, 24, .28));
    --glow-h1: 0 .02em .3em rgba(220, 32, 19, .28);
    --em-off: #85766C;
    --edge: inset 0 0 56px 12px rgba(232, 26, 14, .82), inset 0 0 170px 20px rgba(232, 26, 14, .36);
    --edge-blend: multiply;
    --sign-glow: 0 0 .5em .06em rgba(255, 42, 31, .45), 0 0 1.6em .2em rgba(255, 42, 31, .22), inset 0 0 .5em rgba(255, 42, 31, .25);
    --sign-drop: drop-shadow(0 .22em .32em rgba(40, 24, 14, .34));
    --banner-shadow: 0 14px 30px -6px rgba(40, 24, 14, .4), 0 0 60px rgba(255, 42, 31, .26);
    --rev-bg: var(--ink);
    --rev-fg: var(--on-ink);
    --rev-shadow: 0 14px 30px -6px rgba(40, 24, 14, .45);
    --btn-glow: 0 12px 28px -6px rgba(220, 32, 19, .55);
    --grain-op: .06;
    --grain-blend: multiply;
    --ghost: #E9E0D0;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: var(--lt-1);
  --d-bg: var(--lt-1);   --d-fg: var(--on-paper);  --d-mute: var(--on-paper-muted);  --d-acc: var(--lt-red-ink);  --d-hot: var(--lt-hot);  --d-tint: var(--lt-2);
  --p-bg: var(--lt-2);   --p-fg: var(--on-paper);  --p-mute: var(--on-paper-muted);  --p-acc: var(--lt-red-ink);  --p-hot: var(--lt-hot);  --p-tint: var(--lt-3);
  --d-glow: 0 0 .5em rgba(220, 32, 19, .2);
  --p-glow: 0 0 .5em rgba(220, 32, 19, .2);
  --d-img: drop-shadow(0 22px 30px rgba(70, 40, 24, .28));
  --p-img: drop-shadow(0 22px 30px rgba(70, 40, 24, .28));
  --glow-h1: 0 .02em .3em rgba(220, 32, 19, .28);
  --em-off: #85766C;
  --edge: inset 0 0 56px 12px rgba(232, 26, 14, .82), inset 0 0 170px 20px rgba(232, 26, 14, .36);
  --edge-blend: multiply;
  --sign-glow: 0 0 .5em .06em rgba(255, 42, 31, .45), 0 0 1.6em .2em rgba(255, 42, 31, .22), inset 0 0 .5em rgba(255, 42, 31, .25);
  --sign-drop: drop-shadow(0 .22em .32em rgba(40, 24, 14, .34));
  --banner-shadow: 0 14px 30px -6px rgba(40, 24, 14, .4), 0 0 60px rgba(255, 42, 31, .26);
  --rev-bg: var(--ink);
  --rev-fg: var(--on-ink);
  --rev-shadow: 0 14px 30px -6px rgba(40, 24, 14, .45);
  --btn-glow: 0 12px 28px -6px rgba(220, 32, 19, .55);
  --grain-op: .06;
  --grain-blend: multiply;
  --ghost: #E9E0D0;
}
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; background: var(--page); }
body {
  margin: 0; overflow-x: clip; background: var(--page); color: var(--d-fg);
  font: 400 clamp(1rem, .95rem + .25vw, 1.15rem)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
html.theming, html.theming *, html.theming *::before, html.theming *::after { transition: background-color .35s ease, color .35s ease, box-shadow .35s ease, text-shadow .35s ease !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ol, ul, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--red); color: var(--ink); }

/* film grain (inline SVG, no request) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: var(--grain-op); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.2 -.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: var(--ink); padding: .6em 1em; font-weight: 700; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* fields: each sets the tokens its content reads */
.dark  { --bg: var(--d-bg); --fg: var(--d-fg); --mute: var(--d-mute); --acc: var(--d-acc); --hot: var(--d-hot); --tint: var(--d-tint); --glow: var(--d-glow); --img: var(--d-img); background: var(--bg); color: var(--fg); }
.paper { --bg: var(--p-bg); --fg: var(--p-fg); --mute: var(--p-mute); --acc: var(--p-acc); --hot: var(--p-hot); --tint: var(--p-tint); --glow: var(--p-glow); --img: var(--p-img); background: var(--bg); color: var(--fg); }
.stay  { --bg: var(--ink);  --fg: var(--on-ink);  --mute: var(--on-ink-muted);  --acc: var(--red); --hot: var(--red); --tint: var(--ink-2); --glow: 0 0 .12em rgba(255, 42, 31, .8), 0 0 .5em rgba(255, 42, 31, .4); --img: drop-shadow(0 24px 50px rgba(0, 0, 0, .65)); }
.field { position: relative; padding: clamp(72px, 7.5vw, 112px) max(var(--gut), calc((100vw - 1480px) / 2)); }
.mute { color: var(--mute); }
:focus-visible { outline: 3px solid var(--acc, var(--red)); outline-offset: 4px; }

/* type */
.d { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -.005em; line-height: .9; }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.h-xl { font-size: clamp(2.6rem, 8vw, 5.6rem); }
.h-l  { font-size: clamp(2.2rem, 6vw, 4.4rem); }
.h-m  { font-size: clamp(1.8rem, 3.6vw, 3rem); }
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.3rem); line-height: 1.45; max-width: 34em; }
.fine { font-size: .875rem; color: var(--mute); }
.src, .src a { font-size: .8rem; color: var(--mute); line-height: 1.5; }
.src a:hover { color: var(--fg); }
.acc { color: var(--acc); }

/* links + the one primary button per section (square, never rounded) */
.arrow { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .28em; text-decoration-color: var(--acc); }
.arrow::after { content: "\2192"; display: inline-block; margin-left: .35em; transition: transform .25s var(--ease); }
.arrow:hover::after { transform: translateX(.3em); }
.btn {
  display: inline-block; background: var(--red); color: var(--ink); text-decoration: none;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  padding: .5em 1.1em .45em; line-height: 1; cursor: pointer; border: 0; border-radius: 0;
  box-shadow: 0 0 0 0 rgba(255, 42, 31, .0); transition: box-shadow .3s var(--ease), transform .2s var(--ease);
}
.btn:hover { box-shadow: var(--btn-glow); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-s { font-size: clamp(1rem, 1.3vw, 1.2rem); padding: .55em 1.2em .5em; min-width: 11em; text-align: center; }
.btn.alt { background: var(--paper); color: var(--ink); }
.btn.alt:hover { box-shadow: 0 0 0 .2em rgba(243, 238, 230, .18); }
.textbtn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .28em; text-decoration-color: var(--acc); }

/* ===== top bar (plain, no boxes; sits on the first field of the page) ===== */
.top { --acc: var(--d-acc); position: absolute; z-index: 40; inset: 0 0 auto 0; padding: 22px var(--gut); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--d-fg); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); text-transform: uppercase; font-size: 1.5rem; letter-spacing: .04em; }
.brand img { width: 30px; height: 30px; }
.top-r { display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); flex-wrap: wrap; }
.top nav { display: flex; gap: clamp(14px, 2.6vw, 34px); flex-wrap: wrap; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.top nav a { text-decoration: none; padding: .5em 0; }
.top nav a:hover { color: var(--acc); }

/* mode toggle: a bare icon, square hit area, no border. Shows the icon of the mode you will switch TO. */
.mode { display: none; appearance: none; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; width: 42px; height: 42px; color: inherit; cursor: pointer; align-items: center; justify-content: center; }
.js .mode { display: inline-flex; }
.mode svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; transition: transform .5s var(--ease), color .2s; }
.mode:hover { color: var(--acc); }
.mode:hover svg { transform: rotate(32deg); }
.mode .moon { display: none; }
:root[data-theme="light"] .mode .sun { display: none; }
:root[data-theme="light"] .mode .moon { display: block; }
.mode .sun circle { fill: currentColor; stroke: none; }
.mode .moon path { fill: currentColor; stroke: none; }

/* ===== hero ===== */
.hero { min-height: min(100svh, 920px); padding-top: clamp(120px, 15vw, 190px); padding-bottom: clamp(150px, 18vw, 260px); overflow: visible; }
.hero::after { /* the visitor's own screen goes live */
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: var(--edge-blend);
  box-shadow: var(--edge);
  animation: edge 1.5s ease-in-out infinite alternate; transition: opacity .5s;
}
@keyframes edge { from { opacity: .55; } to { opacity: 1; } }
.hero[data-live="off"]::after { animation: none; opacity: 0; }
.hero-in { position: relative; z-index: 6; }
.hero h1 { position: relative; z-index: 2; max-width: 6.7em; text-shadow: 0 0 0 transparent; }
.hero h1 em { font-style: normal; color: var(--hot); text-shadow: var(--glow-h1); transition: color .4s, text-shadow .4s; }
.hero[data-live="off"] h1 em { color: var(--em-off); text-shadow: none; }
.hero .lede { margin-top: clamp(24px, 3vw, 44px); }
.cta { display: flex; gap: clamp(20px, 3vw, 40px); align-items: center; flex-wrap: wrap; margin: clamp(24px, 3vw, 40px) 0 18px; }
.try { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; color: var(--mute); text-transform: uppercase; max-width: 46em; }
.try [aria-live] { color: var(--fg); }

/* the ON AIR sign is a dark lightbox in both modes */
.sign { position: absolute; top: clamp(-20px, -1vw, 0px); right: 0; z-index: 3; transform: rotate(3deg); font-size: clamp(1.8rem, 4vw, 3.8rem); filter: var(--sign-drop); }
.sign-in { display: flex; gap: .06em; align-items: center; padding: .28em .5em .22em; font-family: var(--display); line-height: 1; letter-spacing: .05em;
  background: linear-gradient(#211815, #0B0908); border-radius: 6px;
  box-shadow: 0 0 0 .09em #2A1F1B, 0 0 0 .13em #0B0908, var(--sign-glow);
  transition: box-shadow .4s; }
.sign .gap { width: .35em; }
.sign .l { color: #FF5B4F; text-shadow: 0 0 .06em #FF2A1F, 0 0 .2em #FF2A1F, 0 0 .5em rgba(255, 42, 31, .85); animation: flick 1.7s steps(1, end) both; }
.sign .l:nth-child(2) { animation-delay: .15s; }
.sign .l:nth-child(4) { animation-delay: .35s; }
.sign .l:nth-child(5) { animation-delay: .55s; }
.sign .l:nth-child(6) { animation-delay: .7s; }
@keyframes flick { 0% { opacity: .08; text-shadow: none; } 8% { opacity: 1; } 14% { opacity: .1; text-shadow: none; } 22% { opacity: 1; } 30% { opacity: .15; } 34% { opacity: 1; } 55% { opacity: .5; } 60%, 100% { opacity: 1; } }
.hero[data-live="off"] .sign .l { color: #4A3733; text-shadow: none; animation: none; }
.hero[data-live="off"] .sign-in { box-shadow: 0 0 0 .09em #2A1F1B, 0 0 0 .13em #0B0908; }
.sign.static .l { animation: none; }

.pill-img { position: absolute; z-index: 4; right: clamp(8px, 6vw, 110px); bottom: clamp(-60px, 4vw, 60px); transform: rotate(-4deg); width: clamp(250px, 31vw, 480px); filter: var(--img); }
.pill-img.k { display: none; width: clamp(300px, 39vw, 600px); }
.hero[data-live="off"] .pill-img.l { display: none; }
.hero[data-live="off"] .pill-img.k { display: block; }
.tc { position: absolute; z-index: 6; top: clamp(78px, 9vw, 108px); right: var(--gut); font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; color: var(--mute); display: flex; gap: .8em; align-items: center; }
.tc b { color: var(--acc); font-weight: 400; animation: blink 1s steps(1) infinite; }
.hero[data-live="off"] .tc b { animation: none; color: var(--mute); }
@keyframes blink { 50% { opacity: 0; } }

/* ===== crossing banners (red in both modes) ===== */
.cross { position: absolute; z-index: 30; left: -12vw; width: 124vw; bottom: clamp(-34px, -1vw, 0px); transform: rotate(-4deg); background: var(--red); color: var(--ink); overflow: hidden; padding: .42em 0 .3em; font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1.3rem, 2.6vw, 2.2rem); line-height: 1; white-space: nowrap; box-shadow: var(--banner-shadow); transition: background .4s, color .4s; }
.cross.rev { transform: rotate(3deg); background: var(--rev-bg); color: var(--rev-fg); box-shadow: var(--rev-shadow); top: -1.4em; bottom: auto; }
.track { display: flex; width: max-content; animation: tick 46s linear infinite; }
.cross.rev .track { animation-direction: reverse; animation-duration: 58s; }
.cross:hover .track { animation-play-state: paused; }
.grp { display: flex; flex: none; }
.grp span { padding-right: .5em; }
@keyframes tick { to { transform: translateX(-50%); } }
.off-only { display: none; }
.hero[data-live="off"] .on-only { display: none; }
.hero[data-live="off"] .off-only { display: flex; }
.hero[data-live="off"] .cross { background: var(--rev-bg); color: var(--rev-fg); box-shadow: var(--rev-shadow); }

/* ===== problem (paper) ===== */
.problem { padding-top: clamp(130px, 14vw, 200px); }
.film { margin: 0 auto clamp(64px, 8vw, 120px); max-width: 720px; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); filter: var(--p-img); }
.problem h2 { max-width: 11em; }
.bigstat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: end; margin-top: clamp(30px, 5vw, 70px); }
.bigstat .n { display: block; font-size: clamp(6rem, 21vw, 18rem); line-height: .78; color: var(--hot); margin-left: -.04em; white-space: nowrap; }
.bigstat .t { margin: 0; max-width: 15em; font-size: clamp(1.3rem, 1rem + 1.1vw, 2.1rem); line-height: 1.2; font-weight: 600; }
.bigstat .src { margin-top: 14px; }
.facts { margin-top: clamp(64px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.fact { display: grid; gap: 10px; }
.fact .n { font-size: clamp(3.4rem, 7vw, 6.4rem); line-height: .82; white-space: nowrap; }
.fact p { margin: 0; max-width: 24em; font-size: clamp(1.1rem, .9rem + .65vw, 1.6rem); line-height: 1.28; font-weight: 600; }
.fact .src { margin-top: 8px; max-width: none; font-size: .8rem; font-weight: 400; }
@media (min-width: 760px) {
  .bigstat { grid-template-columns: auto minmax(0, 1fr); gap: 12px clamp(28px, 4vw, 70px); }
  .facts { grid-template-columns: max-content minmax(0, 1fr); gap: clamp(40px, 4.5vw, 64px) clamp(28px, 4vw, 70px); }
  .fact { grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
  .fact .n { text-align: right; }
}
.reach { margin-top: clamp(60px, 7vw, 100px); max-width: 17em; font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.reach i { font-style: normal; color: var(--hot); }

/* ===== how (dark) ===== */
.how h2 { max-width: 7em; }
.acts { margin-top: clamp(50px, 6vw, 90px); display: grid; gap: clamp(70px, 8vw, 120px); }
.act { position: relative; display: grid; gap: 14px; }
.act .tcode { font-family: var(--mono); font-size: .85rem; letter-spacing: .12em; color: var(--acc); }
.act h3 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: .9; }
.act p { max-width: 31em; margin: 0; color: var(--mute); font-size: clamp(1rem, .95rem + .25vw, 1.15rem); }
.act p strong { color: var(--fg); }
.act figure { margin: 18px 0 0; }
.act figcaption { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 12px; max-width: 34em; }
.act .art img { filter: var(--img); }
.act .tray-art { width: min(560px, 90%); }
.act .border-art { width: min(760px, 100%); transform: rotate(1.8deg); }
.act .hud-art { width: min(640px, 100%); transform: rotate(-2.5deg); }
.act .pill-art { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: center; }
.act .pill-art img { width: clamp(190px, 24vw, 300px); }
.act .pill-art img:nth-child(odd) { transform: rotate(-3deg); }
.act .pill-art img:nth-child(even) { transform: rotate(2deg); }
.mini-keys { display: flex; gap: .35em; font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; margin-top: 8px; }
.mini-keys span { color: var(--fg); }
@media (min-width: 900px) {
  .act { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 5vw; align-items: center; }
  .act .copy { grid-column: 1; }
  .act .art { grid-column: 2; grid-row: 1 / span 3; }
  .act:nth-child(2) { padding-left: 8vw; }
  .act:nth-child(3) .copy { grid-column: 2; }
  .act:nth-child(3) .art { grid-column: 1; grid-row: 1; margin-left: -4vw; }
}

/* ===== features (paper) ===== */
.features h2 { max-width: 9em; }
.feat-list { margin-top: clamp(50px, 6vw, 90px); display: grid; gap: clamp(40px, 4.5vw, 70px); counter-reset: none; }
.feat { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-items: baseline; }
.feat .num { font-family: var(--display); font-size: clamp(3rem, 6vw, 5rem); line-height: .75; color: var(--hot); }
.feat h3 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: .95; text-transform: uppercase; font-family: var(--display); }
.feat p { margin: 10px 0 0; max-width: 30em; font-size: clamp(1rem, .95rem + .25vw, 1.15rem); color: var(--fg); }
.feat p a { color: var(--acc); }
@media (min-width: 900px) {
  .feat { grid-template-columns: clamp(180px, 22vw, 340px) minmax(0, 1fr); column-gap: 3vw; align-items: end; }
  .feat:nth-child(even) { padding-left: 14vw; }
  .feat:nth-child(3n) { padding-left: 6vw; }
}

/* ===== screens (always ink: the showcase) ===== */
.screens { overflow: visible; padding-bottom: clamp(120px, 16vw, 240px); }
.screens h2 { max-width: 7em; position: relative; z-index: 3; }
.stage { position: relative; margin-top: clamp(40px, 6vw, 90px); max-width: none !important; margin-right: calc(var(--gut) * -1); }
.stage .a { width: min(900px, 92%); margin-left: auto; transform: rotate(2.4deg); filter: drop-shadow(0 40px 80px rgba(0, 0, 0, .7)); position: relative; z-index: 1; }
.stage .b { width: min(600px, 62%); margin-top: clamp(-190px, -13vw, -60px); margin-left: calc(var(--gut) * -1); transform: rotate(-3.2deg); position: relative; z-index: 2; filter: drop-shadow(0 40px 80px rgba(0, 0, 0, .75)); }
.stage figcaption, .loose figcaption { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: 14px; max-width: 30em; }
.stage .cap-a { margin-right: var(--gut); text-align: right; margin-left: auto; position: relative; z-index: 3; }
.stage .cap-b { position: relative; z-index: 3; }
.stage figure { margin: 0; } /* was an inline style: the CSP allows none */
.loose { margin-top: clamp(70px, 10vw, 150px); display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 90px) clamp(30px, 5vw, 80px); align-items: flex-end; }
.loose figure { margin: 0; }
.loose img { filter: var(--img); }
.loose .f1 { width: min(540px, 100%); transform: rotate(-1.5deg); }
.loose .f2 { width: min(430px, 100%); transform: rotate(1.5deg); margin-top: 30px; }
.loose .f3 { width: min(220px, 50%); transform: rotate(-3deg); }
.loose .f4 { width: min(300px, 70%); transform: rotate(2deg); }
.pillrow { display: grid; gap: 12px; }
.pillrow img { width: min(300px, 100%); }
.pillrow img:nth-child(2) { margin-left: 28px; }
.pillrow img:nth-child(3) { margin-left: 8px; }
.menus { display: flex; gap: 14px; }
.menus img { width: calc(50% - 7px); }

/* ===== muted (paper) ===== */
.muted .q { font-size: clamp(2.4rem, 6.5vw, 5.2rem); max-width: 9em; }
.muted .q i { font-style: normal; color: var(--hot); }
.script { margin-top: clamp(60px, 9vw, 130px); display: grid; gap: clamp(26px, 3.4vw, 44px); max-width: 920px; margin-left: auto; margin-right: 0; }
.script > div { display: grid; gap: 4px 28px; }
.script dt { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); padding-top: .55em; }
.script dd { font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem); line-height: 1.2; font-weight: 600; }
.script .us dt { color: var(--acc); }
.script .us dd { color: var(--acc); }
@media (min-width: 700px) { .script > div { grid-template-columns: 170px minmax(0, 1fr); } }
.muted .why { margin-top: clamp(50px, 7vw, 100px); max-width: 36em; font-size: clamp(1.02rem, .95rem + .3vw, 1.2rem); }
.muted .why .src { display: block; margin-top: 12px; }

/* ===== pricing (dark) ===== */
.pricing { padding-top: clamp(130px, 14vw, 200px); overflow: visible; }
.pricing h2 { max-width: 8em; }
.rates { margin-top: clamp(40px, 5vw, 70px); }
.rate { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; padding-block: clamp(20px, 3vw, 40px); }
.rate dt { display: flex; align-items: baseline; font-family: var(--display); text-transform: uppercase; font-size: clamp(1.6rem, 3.4vw, 2.8rem); line-height: .95; }
.rate dt::after { content: ""; flex: 1; align-self: flex-end; margin: 0 .35em .16em .45em; height: .14em; min-width: 20px; background: radial-gradient(circle, currentColor 0 .06em, transparent .075em) 0 50% / .26em .14em repeat-x; opacity: .45; }
.rate .p { text-transform: uppercase; font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: .9; white-space: nowrap; }
.rate .p small { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-left: .5em; color: var(--mute); }
.rate .n { grid-column: 1 / -1; margin-top: 10px; color: var(--mute); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.rate .n a:not(.btn) { color: var(--fg); }
.rate.best { color: var(--hot); }
.rate.best dt, .rate.best .p { text-shadow: var(--glow); }
.rate.best .p small { color: var(--acc); }
.rate.best .n { color: var(--fg); }
.pricing .go { margin-top: clamp(40px, 5vw, 70px); display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; }
.pricing .codes { margin-top: 40px; max-width: 36em; color: var(--mute); }

/* ===== download (paper) ===== */
.download { overflow: hidden; }
.download h2 { font-size: clamp(3rem, 9vw, 7rem); line-height: .8; }
.download h2 em { font-style: normal; color: var(--hot); }
.dl-row { margin-top: clamp(50px, 8vw, 110px); display: grid; gap: clamp(50px, 7vw, 100px); }
.dl-win .btn { margin-top: 10px; }
.dl-win .mono, .dl-mac .mono { color: var(--mute); }
.dl-win .req { margin: 0 0 22px; }
.dl-win .fine { margin-top: 18px; }
.dl-mac h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); color: var(--mute); }
.dl-mac p { max-width: 28em; color: var(--mute); margin-top: 10px; }
@media (min-width: 900px) { .dl-row { grid-template-columns: 1.3fr 1fr; align-items: start; } .dl-mac { padding-top: 1.2em; } }

/* ===== FAQ (dark) ===== */
.faq h2 { max-width: 8em; }
.qa { margin-top: clamp(40px, 5vw, 70px); max-width: 1000px; }
.qa details { padding-block: clamp(22px, 3vw, 38px); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; font-family: var(--display); text-transform: uppercase; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--mono); color: var(--hot); transition: transform .3s var(--ease); flex: none; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa summary:hover { color: var(--hot); }
.qa .ans { padding-top: 18px; max-width: 40em; color: var(--mute); font-size: clamp(1rem, .95rem + .25vw, 1.12rem); }
.qa .ans a { color: var(--fg); }
.todo { background: var(--tint); color: var(--fg); padding: .1em .4em; font-family: var(--mono); font-size: .9em; }

/* ===== footer (always ink: grounds the page) ===== */
footer.foot { padding: clamp(70px, 10vw, 140px) var(--gut) 50px; overflow: hidden; }
footer .off { font-family: var(--display); text-transform: uppercase; font-size: clamp(3.4rem, 10vw, 8rem); line-height: .8; color: #2A211D; margin: 0 0 30px -.03em; user-select: none; }
footer .row { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: space-between; max-width: 1480px; margin-inline: auto; font-size: .9rem; color: var(--mute); }
footer .row a { color: var(--fg); }
footer p { margin: 0; }

/* ===== prose pages (privacy) ===== */
.phead { padding: clamp(130px, 16vw, 220px) max(var(--gut), calc((100vw - 1480px) / 2)) clamp(60px, 8vw, 110px); position: relative; }
.phead > * { max-width: 1480px; }
.phead h1 { font-size: clamp(2.4rem, 6.5vw, 5rem); max-width: 9em; }
.phead .lede { margin-top: 26px; color: var(--mute); }
.prose { padding: clamp(60px, 8vw, 120px) var(--gut) clamp(90px, 12vw, 180px); }
.prose > div { max-width: 760px; margin-inline: auto; }
.prose h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: .95; margin: 2.2em 0 .5em; color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose li { margin: 0 0 1em; padding-left: 1.3em; position: relative; }
.prose li::before { content: ""; position: absolute; left: 0; top: .72em; width: .5em; height: .5em; border-radius: 50%; background: var(--acc); }
.prose a { color: var(--acc); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--tint); padding: .1em .35em; }
.prose .todo { background: var(--tint); color: var(--fg); }

/* ===== 404 ===== */
.nf { min-height: 100svh; display: grid; place-items: center; padding: 40px var(--gut); text-align: left; overflow: hidden; position: relative; }
.nf > div { position: relative; z-index: 2; }
.nf .sign { position: static; transform: rotate(-3deg); display: inline-block; font-size: clamp(2rem, 6vw, 4.6rem); margin-bottom: 40px; }
.nf .sign .l { color: #4A3733; text-shadow: none; animation: none; }
.nf .sign-in { box-shadow: 0 0 0 .09em #2A1F1B, 0 0 0 .13em #0B0908; }
.nf h1 { font-size: clamp(5rem, 22vw, 16rem); line-height: .78; color: var(--ghost); }
.nf h1 span { color: var(--fg); display: block; font-size: clamp(2.4rem, 7vw, 6rem); margin-top: -.5em; position: relative; }
.nf .go { margin-top: 36px; }

/* ===== motion preferences ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero::after { opacity: .9; }
}
html.noanim *, html.noanim *::before, html.noanim *::after { animation: none !important; transition: none !important; }
html.noanim .hero::after { opacity: .9; }
html.noanim .hero[data-live="off"]::after { opacity: 0; }

@media (max-width: 899px) {
  .sign { position: relative; top: auto; right: auto; display: block; width: max-content; margin: 0 0 28px auto; font-size: clamp(2rem, 9vw, 3.4rem); }
  .tc { top: 74px; }
  .pill-img { position: relative; right: auto; bottom: auto; margin: 54px 0 0 auto; }
  .stage .a { width: 126%; margin-left: -4%; }
  .stage .b { width: 88%; }
}
@media (max-width: 520px) {
  .top nav:not(.lang) a:first-child { display: none; }
  .tc { display: none; }
  .cross { font-size: 1.25rem; }
}

/* ===== thank-you page: the licence to copy ===== */
.lic { width: 100%; font-family: var(--mono); font-size: .8rem; line-height: 1.5; padding: 14px 16px; background: rgba(14, 12, 11, .07); color: var(--fg); border: 0; border-radius: 4px; resize: vertical; word-break: break-all; }
[data-theme="dark"] .lic { background: rgba(243, 238, 230, .08); }
.src-gap { margin-top: 36px; }
.lic-err { font-weight: 600; }
.lic-err::before { content: "Problem: "; }

/* ===== language switcher (plain text links, current one marked; no boxes) ===== */
.top nav.lang { gap: clamp(2px, .6vw, 8px); letter-spacing: .06em; }
.top nav.lang a { padding: .5em .4em; }
.top nav a[aria-current] { color: var(--acc); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.nf .langs { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; }
.nf .langs a { color: var(--fg); padding: .5em 0; }

/* ===== localisation ===== */
/* Japanese: the display font (Impact) is Latin only. Latin glyphs keep Impact; Japanese glyphs come from a bold system Gothic.
   local() only: no download, no external request. "OAG JP Display" covers kana, kanji and full-width forms only. */
@font-face {
  font-family: "OAG JP Display"; font-weight: 100 900;
  src: local("Yu Gothic Bold"), local("YuGothic-Bold"), local("Hiragino Sans W8"), local("HiraginoSans-W8"), local("Noto Sans JP Black"), local("NotoSansJP-Black"),
       local("Noto Sans CJK JP Black"), local("NotoSansCJKjp-Black"), local("Meiryo Bold"), local("Meiryo-Bold");
  unicode-range: U+3000-30FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
html:lang(ja) {
  --display: Impact, Haettenschweiler, "OAG JP Display", "Yu Gothic", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  --text: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
}
/* Japanese has no spaces: break at phrase boundaries where supported (auto-phrase), strict kinsoku everywhere, never split a word badly. */
html:lang(ja) :is(h1, h2, h3, summary, .lede, p, dd, dt, figcaption, .btn, .try) { line-break: strict; word-break: auto-phrase; overflow-wrap: anywhere; }
html:lang(ja) :is(.d, .feat h3, .rate dt, .rate .p, .qa summary, .prose h2, .btn, .brand) { letter-spacing: 0; line-height: 1.22; }
html:lang(ja) .d { font-weight: 800; }
html:lang(ja) .h-xl { font-size: clamp(2.2rem, 6.4vw, 4.8rem); }
html:lang(ja) .h-l { font-size: clamp(1.9rem, 5vw, 3.8rem); }
html:lang(ja) .hero h1 { max-width: 9em; }
html:lang(ja) .muted .q { font-size: clamp(2rem, 5vw, 4rem); max-width: 12em; }
html:lang(ja) .phead h1 { font-size: clamp(2rem, 5vw, 4rem); max-width: 14em; }
html:lang(ja) .bigstat .n { line-height: 1; }
html:lang(ja) .feat h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
html:lang(ja) .rate dt { font-size: clamp(1.4rem, 2.8vw, 2.3rem); }
html:lang(ja) .qa summary { font-size: clamp(1.1rem, 2vw, 1.6rem); }
html:lang(ja) .mono, html:lang(ja) .try { text-transform: none; }
html:lang(ja) .download h2 { font-size: clamp(2.4rem, 7vw, 5.6rem); line-height: 1.1; }
html:lang(ja) .prose li, html:lang(ja) .prose p, html:lang(ja) .qa .ans, html:lang(ja) .lede { line-height: 1.8; }
html:lang(ja) .cross { line-height: 1.15; }
/* Long German/French/Spanish/Portuguese words in the giant display type: hyphenate rather than overflow, and keep headings balanced. */
html:lang(de) :is(.d, .feat h3, .rate dt, .qa summary, .btn), html:lang(fr) :is(.d, .feat h3, .rate dt, .qa summary), html:lang(es) :is(.d, .feat h3, .rate dt, .qa summary), html:lang(pt-BR) :is(.d, .feat h3, .rate dt, .qa summary) { overflow-wrap: break-word; hyphens: auto; }
html:not(:lang(en)) :is(h1, h2, h3) { text-wrap: balance; }
html:lang(ja) :is(.try, .mono, .top nav, .src, figcaption, .tc) { letter-spacing: .03em; }
@media (max-width: 520px) { .hero { padding-top: 168px; } }
/* capital letters with accents (À, É, Ê, Ç, Ã) need a little more line height in the tight display type */
html:is(:lang(fr), :lang(es), :lang(pt-BR)) .d { line-height: 1; }
html:is(:lang(fr), :lang(es), :lang(pt-BR)) :is(.feat h3, .rate dt, .qa summary) { line-height: 1.05; }
