/* =========================================================================
   ATPL Classic — website styles
   Design language: airfield signage (Barlow / Barlow Condensed) and
   cockpit displays (B612 Mono, designed by Airbus for flight decks),
   in the navy and blues of the ATPL Classic logo.
   Two themes — Day and Night — defined as tokens below.
   ========================================================================= */

/* ---------- Fonts (self-hosted, SIL OFL — see assets/fonts/LICENSE.txt)
   ascent/descent-override: the fonts’ own metrics put capitals off-centre in
   their line (Barlow low, B612 Mono high), and Chrome rounds ascent, descent
   and leading to whole pixels on top of that — so text in chips, buttons and
   badges sat up to 1.5px high. These values were found by measuring Chrome’s
   layout at every font size and line height this site uses: capitals now land
   within half a pixel of centre on average. hcaa.css gives its Greek fallback
   fonts the same values, so mixed Greek/Latin lines share one baseline. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/barlow-latin-400-italic.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/barlow-latin-700-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 24.5%; line-gap-override: 0%; }
@font-face { font-family: "B612 Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/b612-mono-latin-400-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 20%; line-gap-override: 0%; }
@font-face { font-family: "B612 Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/b612-mono-latin-700-normal.woff2") format("woff2"); ascent-override: 100%; descent-override: 20%; line-gap-override: 0%; }

@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }

/* ---------- Tokens: Day (default) — colours taken from the ATPL Classic logo */
:root {
  --font-sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-sign: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-mono: "B612 Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Brand (logo) */
  --brand-navy: #012d66;
  --brand-blue: #1683ee;
  --brand-sky: #7cb5ed;

  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-sunk: #e7eef7;
  --bg-hover: rgba(1, 45, 102, .05);
  --ink: #0a2352;
  --ink-2: #3d4e6a;
  --ink-3: #56657e;
  --line: #d7e1ee;
  --line-strong: #b9c8dc;
  --route: #1466c4;          /* accent for text: logo blue, darkened for contrast */
  --route-soft: rgba(22, 131, 238, .1);
  --link: #1466c4;
  --sign: #146cc9;           /* primary buttons and signs */
  --sign-hover: #0f5bb5;
  --sign-ink: #ffffff;
  --sign-edge: #012d66;
  --frame-bg: #ffffff;
  --frame-bar: #f7f9fc;
  --chart: rgba(1, 45, 102, .08);
  --chart-accent: rgba(22, 131, 238, .25);
  --shadow-sm: 0 1px 2px rgba(1, 30, 70, .06), 0 2px 8px -2px rgba(1, 30, 70, .08);
  --shadow-lg: 0 40px 80px -40px rgba(1, 30, 70, .35), 0 18px 36px -18px rgba(1, 30, 70, .16);
  --backdrop: rgba(3, 12, 28, .72);
  --dim: rgba(3, 14, 32, .28);
  --ok: #1f8a4c;
  --toggle-track: var(--bg-sunk);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --header-h: 64px;
  --ease: cubic-bezier(.65, 0, .25, 1);
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

/* ---------- Tokens: Night */
:root[data-theme="dark"] {
  --bg: #06132a;
  --bg-elev: #0d1d38;
  --bg-sunk: #040c1c;
  --bg-hover: rgba(234, 242, 253, .05);
  --ink: #eaf2fd;
  --ink-2: #a9b8cf;
  --ink-3: #8494ad;
  --line: #17294a;
  --line-strong: #26406a;
  --route: #6fb3f7;
  --route-soft: rgba(111, 179, 247, .14);
  --link: #8cc1ff;
  --sign-edge: #01183a;
  --frame-bg: #111f36;
  --frame-bar: #0a1830;
  --chart: rgba(124, 181, 237, .1);
  --chart-accent: rgba(22, 131, 238, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02);
  --dim: rgba(0, 0, 0, .38);
  --ok: #45d38a;
  --toggle-track: #1a2d4f;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06132a;
    --bg-elev: #0d1d38;
    --bg-sunk: #040c1c;
    --bg-hover: rgba(234, 242, 253, .05);
    --ink: #eaf2fd;
    --ink-2: #a9b8cf;
    --ink-3: #8494ad;
    --line: #17294a;
    --line-strong: #26406a;
    --route: #6fb3f7;
    --route-soft: rgba(111, 179, 247, .14);
    --link: #8cc1ff;
    --sign-edge: #01183a;
    --frame-bg: #111f36;
    --frame-bar: #0a1830;
    --chart: rgba(124, 181, 237, .1);
    --chart-accent: rgba(22, 131, 238, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .02);
    --dim: rgba(0, 0, 0, .38);
    --ok: #45d38a;
    --toggle-track: #1a2d4f;
    color-scheme: dark;
  }
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* ---------- Scrollbars */
:root { --scroll-track: var(--bg); --scroll-thumb: #b3c3d8; --scroll-thumb-hover: #1466c4; }
:root[data-theme="dark"] { --scroll-thumb: #2a4570; --scroll-thumb-hover: #6fb3f7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --scroll-thumb: #2a4570; --scroll-thumb-hover: #6fb3f7; } }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 4px solid transparent; border-radius: 999px; background-clip: padding-box; min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-thumb:active { background-color: var(--scroll-thumb-hover); border-width: 3px; }
::-webkit-scrollbar-corner { background: transparent; }
.install ::-webkit-scrollbar-track, .lightbox ::-webkit-scrollbar-track { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin; }
  * { scrollbar-color: var(--scroll-thumb) transparent; }
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: .88em; padding: .12em .4em; border-radius: 5px; background: var(--bg-sunk); }
::selection { background: var(--brand-sky); color: #012d66; }
:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--sign); color: #fff; font-weight: 600; text-decoration: none; transform: translateY(-160%); transition: transform .2s; }
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: calc(1320px + var(--gutter) * 2); }

/* ---------- Airfield signs */
.sign {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--sign-edge);
  border-radius: 3px;
  background: var(--sign-edge);
  gap: 2px;
  font-family: var(--font-sign);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  white-space: nowrap;
}
.sign-loc, .sign-dir { display: inline-flex; align-items: center; gap: 6px; padding: 6.5px 10px; }
.sign-loc { background: var(--brand-navy); color: #fff; box-shadow: inset 0 0 0 2px var(--brand-navy), inset 0 0 0 3.5px var(--brand-sky); padding-inline: 11px; }
.sign-dir { background: var(--sign); color: var(--sign-ink); }
.sign-dir .icon { width: 17px; height: 17px; stroke-width: 2.8; }
.section-sign { margin-bottom: 28px; }

/* ---------- Buttons */
.btn {
  --btn-shadow: 0 3px 0 var(--sign-edge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn .icon { width: 19px; height: 19px; }
.btn-sign { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); box-shadow: var(--btn-shadow); }
.btn-sign:hover { transform: translateY(-1px); background: var(--sign-hover); border-color: var(--sign-hover); box-shadow: 0 4px 0 var(--sign-edge); }
.btn-sign:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sign-edge); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--ink-3); }
.btn-large { padding: 14.3px 22px; font-size: 17px; }
.btn-small { padding: 6.5px 13px; font-size: 14.5px; border-radius: 8px; --btn-shadow: 0 2px 0 var(--sign-edge); }
.btn-small .icon { width: 17px; height: 17px; }
.btn-block { width: 100%; }
.btn-note { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px 4px; border-radius: 5px; background: rgba(255, 255, 255, .18); }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, opacity .15s;
}
.icon-button:hover { background: var(--bg-sunk); border-color: var(--line-strong); }
.icon-button:disabled { opacity: .35; cursor: default; background: var(--bg-elev); }
.icon-button .icon { width: 18px; height: 18px; }
.icon-button .icon-zoom-in { display: none; }
.icon-button[aria-pressed="true"] .icon-zoom-in { display: block; }
.icon-button[aria-pressed="true"] .icon-zoom-out { display: none; }
#lb-zoom .icon-zoom-out { display: none; }
#lb-zoom .icon-zoom-in { display: block; }
#lb-zoom[aria-pressed="true"] .icon-zoom-out { display: block; }
#lb-zoom[aria-pressed="true"] .icon-zoom-in { display: none; }

.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.text-link .icon { width: 17px; height: 17px; }
.text-link:hover { text-decoration-thickness: 2.5px; }

/* ---------- Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background-color .25s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 100%; max-width: calc(1320px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: auto; height: 32px; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
.brand-name, .footer-name { font-family: var(--font-sans); font-weight: 700; font-size: 21px; letter-spacing: -.01em; line-height: 1; color: var(--ink); }
.brand-name span, .footer-name span { font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { position: relative; white-space: nowrap; padding: 8px 11px; border-radius: 8px; color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: none; transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--ink); background: var(--bg-hover); }
.nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--route); }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex: none; }

.theme-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-elev); cursor: pointer; }
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle-track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--toggle-track); transition: background-color .3s; }
.theme-toggle-thumb { position: absolute; top: 3px; left: 3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-blue); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .35s var(--ease), background-color .3s, color .3s; }
.theme-toggle-thumb .icon { width: 13px; height: 13px; stroke-width: 2.4; grid-area: 1 / 1; transition: opacity .2s, transform .35s var(--ease); }
.theme-toggle-thumb .icon-moon { opacity: 0; transform: rotate(-60deg); }
.theme-toggle-label { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); min-width: 3.8em; text-align: left; }
.theme-toggle-label .label-night { display: none; }
:root[data-theme="dark"] .theme-toggle-thumb { transform: translateX(20px); background: #eaf2fd; color: #012d66; }
:root[data-theme="dark"] .theme-toggle-thumb .icon-sun { opacity: 0; transform: rotate(60deg); }
:root[data-theme="dark"] .theme-toggle-thumb .icon-moon { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle-label .label-day { display: none; }
:root[data-theme="dark"] .theme-toggle-label .label-night { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle-thumb { transform: translateX(20px); background: #eaf2fd; color: #012d66; }
  :root:not([data-theme="light"]) .theme-toggle-thumb .icon-sun { opacity: 0; transform: rotate(60deg); }
  :root:not([data-theme="light"]) .theme-toggle-thumb .icon-moon { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle-label .label-day { display: none; }
  :root:not([data-theme="light"]) .theme-toggle-label .label-night { display: inline; }
}

.nav-install { display: none; }
.menu-button { display: none; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-elev); cursor: pointer; }
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-open { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Sections */
.section { position: relative; padding-block: clamp(80px, 11vw, 150px); scroll-margin-top: var(--header-h); }
.section + .section { border-top: 1px solid var(--line); }
.display { font-size: clamp(40px, 6.2vw, 84px); font-weight: 600; line-height: .98; letter-spacing: -.032em; text-wrap: balance; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head > p { color: var(--ink-2); font-size: 19px; max-width: 34em; }

/* ---------- Hero */
.hero { position: relative; padding-top: clamp(40px, 7vw, 92px); padding-bottom: clamp(56px, 7vw, 96px); overflow: clip; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg svg { width: 100%; height: 100%; }
.hero-bg .ring { stroke: var(--chart); stroke-width: 1.2; }
.hero-bg .ring-faint { stroke-dasharray: 2 10; }
.hero-bg .ticks { stroke: var(--chart); stroke-width: 12; stroke-dasharray: 1.2 22.8; }
.hero-bg .track { stroke: var(--chart-accent); stroke-width: 2; stroke-dasharray: 14 12; }
.hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kicker-text { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hero-title { margin: 26px 0 30px; font-size: clamp(48px, 8.8vw, 124px); font-weight: 600; line-height: .94; letter-spacing: -.038em; max-width: 11.5ch; text-wrap: balance; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 56px; align-items: end; }
.lede { max-width: 33em; color: var(--ink-2); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; max-width: 500px; }
.hero-figure { margin-top: clamp(44px, 6vw, 76px); }

/* ---------- Screenshot frames */
.frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--frame-bg); box-shadow: var(--shadow-lg); }
.frame-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--frame-bar); font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.frame-dots { display: flex; gap: 6px; flex: none; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.frame-url { flex: 1; max-width: 360px; margin-inline: auto; padding: 4px 14px; border-radius: 999px; background: var(--bg-sunk); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.frame-url span { color: var(--ink-3); }
.frame-badge { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-2); }
.frame-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.frame-media { position: relative; }
.frame-shot { display: block; cursor: zoom-in; }
.frame-shot img { width: 100%; background: #fff; }

.hero-frame { transform-origin: 50% 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-frame { animation: frame-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    @keyframes frame-settle {
      from { transform: perspective(1800px) rotateX(16deg) scale(.95); }
      to { transform: none; }
    }
  }
}

.callouts { position: absolute; inset: 0; pointer-events: none; }
.callout { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.callout i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-blue); box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 3px 10px rgba(0, 0, 0, .3); }
.callout i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand-blue); opacity: 0; }
.callout b { position: absolute; bottom: 20px; left: 0; transform: translateX(-50%); padding: 8px 11px 7px; border-radius: 7px; background: var(--brand-navy); color: #fff; font-family: var(--font-sign); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; line-height: 1; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .45); }
.callout b::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 12px; margin-left: -1px; background: var(--brand-navy); }
.callout-s b { top: 20px; bottom: auto; }
.callout-lean b { transform: translateX(-74%); }
.callout-lean b::after { left: 74%; }
.callout-s b::after { top: auto; bottom: 100%; }
.callout-e b { left: 20px; top: 0; bottom: auto; transform: translateY(-50%); }
.callout-w b { left: auto; right: 20px; top: 0; bottom: auto; transform: translateY(-50%); }
.callout-w b::after { left: 100%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0; }
.callout-e b::after { left: auto; right: 100%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0; }
.js .callout { opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .is-ready .callout { opacity: 1; transform: none; }
.js .is-ready .callout:nth-child(2) { transition-delay: .12s; }
.js .is-ready .callout:nth-child(3) { transition-delay: .24s; }
.js .is-ready .callout:nth-child(4) { transition-delay: .36s; }
@media (prefers-reduced-motion: no-preference) {
  .is-ready .callout i::after { animation: ping 2.8s var(--ease-out) 1s infinite; }
}
@keyframes ping { 0% { transform: scale(.8); opacity: .9; } 70%, 100% { transform: scale(2.2); opacity: 0; } }

.hero-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 18px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts span::before { content: ""; width: 6px; height: 6px; background: var(--sign); border: 1px solid var(--sign-edge); transform: rotate(45deg); }

/* ---------- A · Idea */
.idea-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px 64px; align-items: end; }
.idea-lede { color: var(--ink-2); font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; max-width: 32em; }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 2px solid var(--ink); counter-reset: p; }
.principle { position: relative; padding: 26px 28px 6px 0; }
.principle + .principle { padding-left: 28px; border-left: 1px solid var(--line); }
.principle-num { display: block; margin-bottom: 30px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--route); }
.principle h3 { font-size: 24px; font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 12px; text-wrap: balance; }
.principle p { color: var(--ink-2); font-size: 16px; }

/* ---------- B · Walkaround */
.walk-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 40px clamp(32px, 4vw, 56px); align-items: start; }
.walk-stage-col { position: sticky; top: calc(var(--header-h) + 20px); }

.stage-viewport { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; cursor: zoom-in; touch-action: pan-y; }
.stage-camera { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1s var(--ease); --s: 1; }
/* With JS the camera is laid out at the screenshot's native size and scaled down,
   so zoomed-in details stay sharp instead of being upscaled. */
.js .stage-camera { right: auto; bottom: auto; width: 3840px; height: 1722px; transform: scale(.2); }
.stage-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .5s ease; user-select: none; -webkit-user-drag: none; }
.stage-layer.is-active { opacity: 1; }
.stage-focus { position: absolute; border-radius: calc(6px / var(--s)); box-shadow: 0 0 0 calc(2px / var(--s)) var(--route), 0 0 0 9999px var(--dim); opacity: 0; transition: left 1s var(--ease), top 1s var(--ease), width 1s var(--ease), height 1s var(--ease), opacity .45s ease; pointer-events: none; }
.stage-focus.is-on { opacity: 1; }
.stage-loading { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--route), transparent); background-size: 40% 100%; background-repeat: no-repeat; opacity: 0; transition: opacity .2s; }
.stage.is-loading .stage-loading { opacity: 1; animation: loading 1s linear infinite; }
@keyframes loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 16px; border-top: 1px solid var(--line); background: var(--frame-bar); }
.stage-status { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.stage-count { flex: none; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--route); }
.stage-title { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-controls { display: flex; align-items: center; gap: 6px; flex: none; }
.stage-sep { width: 1px; height: 22px; margin-inline: 4px; background: var(--line); }
.stage-progress { height: 3px; background: var(--line); }
.stage-progress span { display: block; height: 100%; width: 0; background: var(--route); transition: width .6s var(--ease); }

.walk-list { counter-reset: none; }
.phase + .phase { margin-top: 22px; }
.phase-label { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.phase-num { color: var(--route); }
.stops li { position: relative; }
.stop {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  width: 100%;
  padding: 11px 12px 11px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s;
}
@media (hover: hover) { .stop:hover { background: var(--bg-hover); } }
.stop-num { padding-top: 3px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-align: center; transition: color .2s; }
.stop-title { display: block; font-size: 18px; font-weight: 600; line-height: 1.25; color: var(--ink-2); transition: color .2s; }
.stop-text { display: block; margin-top: 6px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.stop[aria-pressed="true"] { background: var(--bg-elev); box-shadow: inset 3px 0 0 var(--route), var(--shadow-sm); }
.stop[aria-pressed="true"] .stop-num { color: var(--route); }
.stop[aria-pressed="true"] .stop-title { color: var(--ink); }
.js .stop-text { display: grid; grid-template-rows: 0fr; margin-top: 0; opacity: 0; transition: grid-template-rows .45s var(--ease), opacity .3s ease, margin-top .45s var(--ease); }
.js .stop-text > span { overflow: hidden; min-height: 0; }
.js .stop[aria-pressed="true"] .stop-text { grid-template-rows: 1fr; margin-top: 6px; opacity: 1; }

/* ---------- C · Day & Night */
.dn-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.dn-head > p { color: var(--ink-2); font-size: 19px; max-width: 33em; }
.amp { font-family: var(--font-sans); font-style: italic; font-weight: 400; color: var(--ink-3); }

.compare-wrap { display: grid; gap: 20px; }
.compare { position: relative; aspect-ratio: 3840 / 1722; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #06132a; box-shadow: var(--shadow-lg); user-select: none; -webkit-user-select: none; }
.compare.is-animating { transition: --pos .7s var(--ease); }
.compare-day, .compare-night { position: absolute; inset: 0; }
.compare-day img, .compare-night img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.compare-night { clip-path: inset(0 0 0 var(--pos)); }
.compare-day img { filter: sepia(calc(var(--eye) * .5)) saturate(calc(1 - var(--eye) * .25)) brightness(calc(1 - var(--eye) * .22)); }
.compare-eye { position: absolute; inset: 0; background: #ffb766; mix-blend-mode: multiply; opacity: calc(var(--eye) * .2); pointer-events: none; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--brand-blue); box-shadow: 0 0 0 1px rgba(1, 45, 102, .45); pointer-events: none; }
.compare-knob { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-blue); color: #fff; box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .5); transition: transform .2s var(--ease-out); }
.compare-knob .icon { width: 17px; height: 17px; stroke-width: 2.6; margin: 0 -2px; }
.compare:hover .compare-knob, .compare-range:focus-visible ~ .compare-handle .compare-knob { transform: scale(1.08); }
.compare-range:focus-visible ~ .compare-handle .compare-knob { outline: 3px solid var(--route); outline-offset: 3px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none; }
.compare-tag { position: absolute; top: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px 6px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.compare-tag .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.compare-tag-day { left: 14px; background: var(--brand-navy); color: #fff; }
.compare-tag-night { right: 14px; background: #eaf2fd; color: var(--brand-navy); }

.dn-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.segmented { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-sunk); }
.segmented button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.segmented button .icon { width: 16px; height: 16px; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-sm); }
.eye-control { display: grid; gap: 6px; width: min(100%, 440px); }
.eye-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15px; }
.eye-label small { color: var(--ink-3); font-weight: 500; font-size: 13.5px; }
.eye-label output { font-family: var(--font-mono); font-size: 13px; color: var(--route); }
.eye-note { font-size: 13.5px; color: var(--ink-3); }

input[type="range"]#eye-range { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#eye-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #d8dde6, #f0b36a); }
#eye-range::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #d8dde6, #f0b36a); }
#eye-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
#eye-range::-moz-range-thumb { width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-blue); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }

.dn-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: clamp(40px, 5vw, 64px); }
.dn-facts li { display: grid; gap: 14px; align-content: start; }
.dn-fact-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--route); }
.dn-facts h3 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.dn-facts p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- D · Screenshots */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] .chip-count { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.chip-theme { margin-left: 10px; position: relative; }
.chip-theme::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, #fff 50%, #012d66 50%); flex: none; }
.chip-theme::after { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
.card { animation: card-in .45s var(--ease-out) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
.card-link { display: block; text-decoration: none; border-radius: 12px; }
.card-link:focus-visible { outline-offset: 5px; }
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-sunk); box-shadow: var(--shadow-sm); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform .6s var(--ease-out); }
@media (hover: hover) { .card-link:hover .card-media img { transform: scale(1.035); } }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 var(--route); transition: box-shadow .2s; }
@media (hover: hover) { .card-link:hover .card-media::after { box-shadow: inset 0 0 0 2px var(--route); } }
.card-link:focus-visible .card-media::after { box-shadow: inset 0 0 0 2px var(--route); }
.card-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; padding: 5px 8px 4px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card-badge-day { background: #fff; color: #012d66; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.card-badge-night { background: #06132a; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.card-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 14px 2px 0; }
.card-num { grid-row: span 2; padding-top: 3px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--route); }
.card-title { font-size: 17.5px; font-weight: 600; line-height: 1.25; }
.card-cat { font-size: 14px; color: var(--ink-3); }

/* ---------- E · Privacy */
.section-aside { display: grid; gap: 18px; justify-items: start; }
.section-aside > p { color: var(--ink-2); font-size: 19px; max-width: 34em; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { display: grid; gap: 16px; align-content: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.fact > .icon { width: 28px; height: 28px; color: var(--route); stroke-width: 1.7; }
.fact h3 { font-size: 19px; font-weight: 600; line-height: 1.2; margin-bottom: 6px; }
.fact p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- F · Install (always on the tarmac) */
.install {
  --bg: #031a42;
  --bg-elev: #0a2856;
  --bg-sunk: #021131;
  --bg-hover: rgba(255, 255, 255, .06);
  --ink: #eef4fd;
  --ink-2: #b9c8df;
  --ink-3: #95a8c6;
  --line: #1b3b70;
  --line-strong: #2c4f88;
  --route: #7cc0ff;
  --link: #9ccbff;
  --sign-edge: #01122e;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  border-top: 0 !important;
  overflow: hidden;
}
.install::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 70% at 85% 110%, rgba(22, 131, 238, .22), transparent 60%), repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, .03) 119px 120px); pointer-events: none; }
.holding-point { position: absolute; top: 0; left: 0; right: 0; display: grid; gap: 7px; padding-top: 22px; pointer-events: none; }
.holding-point span { height: 6px; background: var(--brand-sky); opacity: .92; }
.holding-point span:nth-child(3), .holding-point span:nth-child(4) { background: repeating-linear-gradient(90deg, var(--brand-sky) 0 44px, transparent 44px 76px); }
.install .wrap { position: relative; padding-top: 28px; }
.install-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
.install-copy > p { margin: 22px 0 36px; color: var(--ink-2); font-size: 19px; max-width: 30em; }

.checklist { overflow: hidden; border-radius: 12px; background: #ffffff; color: #0a2352; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); font-family: var(--font-mono); max-width: 640px; }
.checklist-title { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px 11px; background: var(--brand-navy); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-bottom: 3px solid var(--brand-blue); }
.checklist-state { color: var(--brand-sky); }
.check-item { display: grid; grid-template-columns: 22px auto minmax(16px, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid #e3eaf4; background: transparent; color: #0a2352; font-family: var(--font-mono); font-size: 14px; letter-spacing: .03em; text-transform: uppercase; text-align: left; cursor: pointer; transition: background-color .2s; }
.checklist li:last-child .check-item { border-bottom: 0; }
@media (hover: hover) { .check-item:hover { background: #f3f7fc; } }
.check-item:focus-visible { outline-offset: -3px; outline-color: #146cc9; }
.check-box { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #012d66; border-radius: 5px; transition: background-color .2s, border-color .2s; }
.check-box .icon { width: 15px; height: 15px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease-out); }
.check-leader { align-self: end; margin-bottom: 5px; border-bottom: 2px dotted #9aa8bd; }
.check-response { font-weight: 700; }
.check-item[aria-pressed="true"] .check-box { background: #146cc9; border-color: #146cc9; }
.check-item[aria-pressed="true"] .check-box .icon { opacity: 1; transform: none; }
.check-item[aria-pressed="true"] .check-challenge, .check-item[aria-pressed="true"] .check-response { color: #56657e; }
.checklist-done { padding: 12px 18px; background: #e3f3e8; color: #135c32; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.install-card { display: grid; gap: 14px; padding: clamp(24px, 3vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); }
.install-icon { width: auto; height: 72px; }
.install-card h3 { font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.install-version { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.install-version > span { padding: 5px 9px 4px; border: 1px solid var(--line-strong); border-radius: 6px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.install-meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.install-account { font-size: 15px; color: var(--ink-2); }
.install-account a { color: var(--link); text-underline-offset: 3px; }
.handoff { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.handoff p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- G · FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px clamp(40px, 6vw, 88px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 22px 48px 22px 0; font-size: 19.5px; font-weight: 600; line-height: 1.3; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat; color: var(--ink-3); transition: transform .3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(135deg); color: var(--route); }
.faq-list summary:hover { color: var(--route); }
.faq-list details p { padding: 0 48px 24px 0; color: var(--ink-2); font-size: 17px; max-width: 40em; }
.faq-list details p a { color: var(--link); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Footer (always on the tarmac, like Install) */
.footer {
  --bg: #031a42;
  --bg-elev: #0a2856;
  --bg-hover: rgba(255, 255, 255, .06);
  --ink: #eef4fd;
  --ink-2: #b9c8df;
  --ink-3: #95a8c6;
  --line: #1b3b70;
  --line-strong: #2c4f88;
  --route: #7cc0ff;
  --link: #9ccbff;
  --sign-edge: #01122e;
  position: relative;
  padding: clamp(52px, 6vw, 76px) 0 28px;
  border-top: 3px solid var(--brand-blue);
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  overflow: hidden;
}
.footer::before { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 120% at 100% 0%, rgba(22, 131, 238, .16), transparent 55%), repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, .025) 119px 120px); pointer-events: none; }
.footer .wrap { position: relative; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 44px clamp(40px, 8vw, 120px); padding-bottom: clamp(40px, 5vw, 56px); }
.footer-brand { display: grid; gap: 16px; align-content: start; justify-items: start; max-width: 380px; }
.footer-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.footer-mark { width: auto; height: 36px; }
.footer-name { font-size: 22px; }
.footer-tagline { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.footer-cta { margin-top: 4px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 32px clamp(36px, 5vw, 80px); }
.footer-head { margin-bottom: 16px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-sky); }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 15.5px; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-col a[aria-current="page"] { color: #fff; }
.footer-col a .icon { width: 14px; height: 14px; color: var(--ink-3); stroke-width: 2.1; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.to-top { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; transition: color .15s; }
.to-top:hover { color: #fff; }
.to-top .icon { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Lightbox */
.lightbox {
  width: min(1440px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-elev);
  color: var(--ink);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .7);
  overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: lb-in .3s var(--ease-out); }
.lightbox::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.lb-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta actions" "title actions"; column-gap: 16px; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.lb-meta { grid-area: meta; display: flex; gap: 12px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lb-count { color: var(--route); font-weight: 700; }
.lb-title { grid-area: title; font-size: 21px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-actions { grid-area: actions; display: flex; align-items: center; gap: 8px; }
.lb-viewport { position: relative; display: grid; place-items: center; min-height: 0; overflow: auto; background: var(--bg-sunk); overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.lb-viewport img { width: auto; max-width: 100%; max-height: calc(100dvh - 32px - 150px); cursor: zoom-in; background: #fff; transition: opacity .2s; }
.lb-viewport.is-zoomed { place-items: start; touch-action: auto; }
.lb-viewport.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-bottom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
.lb-caption { color: var(--ink-2); font-size: 15.5px; line-height: 1.45; text-align: center; }
.lb-nav { width: 44px; height: 44px; }

/* ---------- Promo video */
.icon-fill { fill: currentColor; stroke: none; }
.watch-link { flex-basis: 100%; display: inline-flex; align-items: center; gap: 12px; width: fit-content; margin-top: 4px; color: var(--ink); font-weight: 600; font-size: 16.5px; text-decoration: none; }
.watch-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--route); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-out), background-color .2s, color .2s; }
.watch-play .icon { width: 16px; height: 16px; margin-left: 2px; }
.watch-link:hover .watch-play { transform: scale(1.08); background: var(--sign); border-color: var(--sign); color: #fff; }
.watch-link:hover span:last-child { text-decoration: underline; text-underline-offset: 4px; }
.video-dialog { width: min(1200px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: 16px; background: #000; overflow: visible; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8); }
.video-dialog[open] { animation: lb-in .3s var(--ease-out); }
.video-dialog::backdrop { background: rgba(3, 12, 28, .85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vd-frame { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.vd-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.vd-close { position: absolute; top: -52px; right: 0; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.vd-close:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .4); }
@media (max-width: 700px) {
  .video-dialog { width: 100vw; border-radius: 0; }
  .vd-frame { border-radius: 0; }
  .vd-close { top: -50px; right: 10px; }
  .watch-link { justify-content: center; width: 100%; }
}
html:not(.js) .video-dialog { display: none; }

/* ---------- Contact page (contact.html) */
:root { --danger: #c0392b; --danger-soft: rgba(192, 57, 43, .1); }
:root[data-theme="dark"] { --danger: #ff8b7b; --danger-soft: rgba(255, 139, 123, .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --danger: #ff8b7b; --danger-soft: rgba(255, 139, 123, .12); } }

.contact { position: relative; padding: clamp(40px, 6vw, 84px) 0 clamp(80px, 10vw, 140px); isolation: isolate; overflow: clip; }
.contact-bg { position: absolute; inset: 0 0 auto 0; height: min(760px, 90vh); z-index: -1; pointer-events: none; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.contact-bg svg { width: 100%; height: 100%; }
.contact-bg .ring { stroke: var(--chart); stroke-width: 1.2; }
.contact-bg .ring-faint { stroke-dasharray: 2 10; }
.contact-bg .ticks { stroke: var(--chart); stroke-width: 12; stroke-dasharray: 1.2 22.8; }
.contact-head { max-width: 920px; margin-bottom: clamp(40px, 5vw, 64px); }
.contact-title { margin-bottom: 24px; }
.contact-lede { max-width: 35em; color: var(--ink-2); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; }
.contact-lede a { color: var(--link); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.contact-facts { margin-top: 22px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 28px clamp(28px, 4vw, 56px); align-items: start; }
.contact-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }

/* The form: an aircraft technical log entry */
.log { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elev); box-shadow: var(--shadow-lg); }
.log-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 22px 12px; background: var(--brand-navy); border-bottom: 3px solid var(--brand-blue); color: #fff; font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.log-state { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-sky); font-weight: 400; letter-spacing: .06em; white-space: nowrap; }
.log-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.log-body { display: grid; gap: 26px; padding: clamp(20px, 3vw, 32px); container-type: inline-size; }
.log fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.log legend { padding: 0; }

.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field-label { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.field-set > .field-label { margin-bottom: 10px; }
.optional { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.field-hint { color: var(--ink-3); font-size: 14px; }
.field-error { display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: 14.5px; font-weight: 600; }
.field-error .icon { width: 17px; height: 17px; }

.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; line-height: 1.45; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--ink-3); opacity: .8; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--route); box-shadow: 0 0 0 3px var(--route-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
textarea.input { min-height: 150px; resize: vertical; }
textarea.input-short { min-height: 76px; }
#f-steps { min-height: 116px; }
/* Custom dropdown (replaces native <select>): a button trigger plus an
   absolutely positioned option panel, driven by aria-activedescendant. */
.dropdown { position: relative; }
.dropdown-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--bg); cursor: pointer; }
.dropdown-btn:disabled { cursor: default; opacity: .55; }
.dropdown-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-value[data-empty] { color: var(--ink-3); }
.dropdown-caret { flex: none; width: 17px; height: 17px; color: var(--ink-3); transition: transform .2s var(--ease-out); }
.dropdown.is-open .dropdown-caret { transform: rotate(180deg); }
.dropdown-btn[aria-expanded="true"] { border-color: var(--route); box-shadow: 0 0 0 3px var(--route-soft); }
.dropdown-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  animation: dropdown-in .16s var(--ease-out);
}
.dropdown-panel:focus { outline: none; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px); } }
.dropdown-group { margin-top: 6px; padding: 8px 10px 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dropdown-group:first-child { margin-top: 0; }
.dropdown-option { padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--ink); cursor: pointer; }
.dropdown-option.is-active { background: var(--route-soft); }
.dropdown-option[aria-selected="true"] { color: var(--route); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .dropdown-panel { animation: none; } }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.mini-btn { flex: none; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-elev); color: var(--ink-2); font-size: 14.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.mini-btn:hover { background: var(--bg-hover); border-color: var(--ink-3); color: var(--ink); }

/* Type tiles (real radio buttons underneath) */
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.type-tile { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.type-tile input, .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.type-card { position: relative; display: grid; gap: 4px; align-content: start; height: 100%; padding: 15px 15px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.type-card::after { content: ""; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 50%; transition: border-color .15s, background-color .15s; }
.type-card .icon { width: 24px; height: 24px; margin-bottom: 10px; color: var(--ink-3); stroke-width: 1.7; transition: color .15s; }
.type-name { font-size: 16.5px; font-weight: 600; line-height: 1.2; }
.type-hint { color: var(--ink-3); font-size: 13.5px; line-height: 1.35; }
.type-tile:hover .type-card { border-color: var(--ink-3); }
.type-tile input:checked + .type-card { border-color: var(--route); background: var(--route-soft); box-shadow: inset 0 0 0 1px var(--route); }
.type-tile input:checked + .type-card::after { border-color: var(--route); background: radial-gradient(circle, var(--route) 0 3.5px, transparent 4px); }
.type-tile input:checked + .type-card .icon { color: var(--route); }
.type-tile input:focus-visible + .type-card { outline: 2px solid var(--route); outline-offset: 3px; }

/* Segmented radio choice */
.choice { display: flex; gap: 2px; min-height: 49px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); }
.choice label { position: relative; flex: 1; display: flex; }
.choice label > span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 10px; border-radius: 7px; color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s; }
.choice label > span .icon { width: 16px; height: 16px; }
.choice label:hover > span { color: var(--ink); background: var(--bg-hover); }
.choice input:checked + span { background: var(--sign); color: #fff; box-shadow: 0 2px 0 var(--sign-edge); }
.choice input:focus-visible + span { outline: 2px solid var(--route); outline-offset: 2px; }

/* Bug-only details */
.log-section { display: grid; gap: 20px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--bg-sunk) 55%, transparent); }
.log-section-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.log-section-title span:last-child { color: var(--ink-3); font-weight: 400; letter-spacing: .06em; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }

.sysinfo { display: grid; gap: 10px; }
.check-line { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin: 0; accent-color: var(--sign); cursor: pointer; }
.sysinfo-preview { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-sunk); color: var(--ink-2); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; transition: opacity .15s; }
.sysinfo:has(input:not(:checked)) .sysinfo-preview { opacity: .4; text-decoration: line-through; }

.attach-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--route-soft); color: var(--ink-2); font-size: 15px; }
.attach-note .icon { margin-top: 2px; color: var(--route); }
.attach-note b { color: var(--ink); }

.log-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.honeypot { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#send-button { position: relative; }
#send-button .icon-busy { display: none; }
#send-button.is-busy .icon-idle { display: none; }
#send-button.is-busy .icon-busy { display: block; }
.spinner { width: 19px; height: 19px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.4s; } }
.log-result { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, transparent); }
.log-result.is-error { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: var(--danger-soft); }
.log-result p { color: var(--ink-2); font-size: 15.5px; }
.log-result b { color: var(--ink); }
.log-result-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.link-button { padding: 0; border: 0; background: none; color: var(--link); font-size: 15.5px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; }
.link-button:hover { text-decoration-thickness: 2.5px; }
.log-fineprint { color: var(--ink-3); font-size: 14px; max-width: 46em; }

.log-preview { padding-top: 18px; border-top: 1px solid var(--line); }
.log-preview summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.log-preview summary::-webkit-details-marker { display: none; }
.log-preview summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; color: var(--ink-3); transition: transform .25s; }
.log-preview[open] summary::after { transform: rotate(45deg); }
.log-preview summary:hover { color: var(--ink); }
.log-preview pre { max-height: 380px; margin: 14px 0 0; padding: 16px; overflow: auto; border-radius: 10px; background: var(--bg-sunk); color: var(--ink-2); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Side cards */
.aside-card { display: grid; gap: 12px; justify-items: start; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-elev); }
.aside-card p { color: var(--ink-2); font-size: 15.5px; }
.aside-card a { color: var(--link); }
.aside-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; line-height: 1.2; }
.aside-title .icon { width: 22px; height: 22px; color: var(--route); }
.aside-kicker { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.aside-kicker .icon { width: 17px; height: 17px; }
.aside-card.direct { border-color: var(--brand-navy); background: var(--brand-navy) radial-gradient(120% 90% at 100% 0%, rgba(22, 131, 238, .35), transparent 60%); color: #fff; box-shadow: var(--shadow-lg); }
.direct .aside-kicker { color: var(--brand-sky); }
.direct p { color: rgba(255, 255, 255, .78); }
.aside-card .direct-address { max-width: 100%; color: #fff; font-size: clamp(20px, 2vw, 24px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; text-decoration: none; }
.aside-card .direct-address:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.direct .btn-ghost { border-color: rgba(255, 255, 255, .32); color: #fff; }
.direct .btn-ghost:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); }
.direct :focus-visible { outline-color: var(--brand-sky); }
.preflight { display: grid; gap: 12px; counter-reset: pf; }
.preflight li { position: relative; padding-left: 38px; color: var(--ink-2); font-size: 15px; counter-increment: pf; }
.preflight li::before { content: counter(pf, decimal-leading-zero); position: absolute; left: 0; top: 1px; padding: 2px 5px 1px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--route); font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.preflight b { color: var(--ink); }
.preflight code { white-space: nowrap; }
.wrong-freq { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.noscript-card { grid-column: 1 / -1; }
html:not(.js) .log { display: none; }

@media (max-width: 1060px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-aside .direct { grid-column: 1 / -1; }
}
/* Tiles and field pairs follow the width of the form itself, not the window. */
@container (max-width: 600px) { .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 480px) { .field-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .contact-aside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .log { border-radius: 14px; }
  .log-title { padding-inline: 16px; font-size: 11.5px; letter-spacing: .1em; }
  .log-section { padding: 16px; }
  .log-actions .btn { flex: 1 1 100%; }
  .type-card { padding: 13px 12px 12px; }
  .type-card::after { top: 12px; right: 12px; }
  .type-card .icon { margin-bottom: 6px; }
  .contact-facts { font-size: 11px; }
}
@media (max-width: 420px) {
  .log-state { display: none; }
  .type-hint { font-size: 13px; }
}

/* ---------- Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; padding: 12px 18px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); transform: translate(-50%, 150%); opacity: 0; transition: transform .35s var(--ease-out), opacity .35s; pointer-events: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Reveal on scroll (progressive enhancement) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: .07s; }
.js .reveal:nth-child(3) { transition-delay: .14s; }
.js .reveal:nth-child(4) { transition-delay: .21s; }
.js .reveal:nth-child(5) { transition-delay: .28s; }
.js .reveal:nth-child(6) { transition-delay: .35s; }

/* ---------- Without JavaScript, hide controls that need it */
html:not(.js) .theme-toggle,
html:not(.js) .stage-controls,
html:not(.js) .dn-controls,
html:not(.js) .filters,
html:not(.js) .compare-handle,
html:not(.js) .compare-range,
html:not(.js) .checklist-state { display: none !important; }

/* ---------- Responsive */
@media (max-width: 1180px) {
  .nav a { padding-inline: 8px; font-size: 14.5px; }
  .nav a[aria-current]::after { left: 8px; right: 8px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle:nth-child(3) { padding-left: 0; border-left: 0; }
  .principle:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 18px; }
  .dn-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1061px) and (max-width: 1120px) {
  .topbar-inner { gap: 16px; }
  .nav { gap: 0; }
  .nav a { padding-inline: 6px; }
  .nav a[aria-current]::after { left: 6px; right: 6px; }
}

@media (max-width: 1060px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: grid;
    gap: 2px;
    padding: 12px var(--gutter) 22px;
    margin: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -30px rgba(0, 0, 0, .35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease-out), visibility 0s .25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity .2s, transform .25s var(--ease-out); }
  .nav a { padding: 13px 4px; font-size: 19px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .nav .nav-install { display: flex; justify-content: center; margin-top: 16px; padding: 14px 18px; border-bottom: 2px solid var(--sign-edge); border-radius: 9px; color: #fff; font-size: 17px; }
  .nav .nav-install::after { display: none; }
  .nav .nav-install:hover { background: var(--sign-hover); color: #fff; }
  .nav a[aria-current]::after { left: auto; right: 4px; top: 50%; bottom: auto; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; }
  .topbar-actions { margin-left: auto; }
  .menu-button { display: grid; }
  .walk-layout { grid-template-columns: minmax(0, 1fr); }
  .walk-stage-col { top: calc(var(--header-h) + 8px); z-index: 5; }
  .walk-list { max-width: 720px; }
  .section-head, .idea-head, .dn-head { grid-template-columns: minmax(0, 1fr); }
  .section-head { gap: 20px; }
  .faq-layout, .install-layout { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .callout b { font-size: 13px; padding: 6px 9px 5px; }
}

@media (max-width: 900px) {
  .callouts { display: none; }
  .hero-row { grid-template-columns: minmax(0, 1fr); }
  .hero-cta { max-width: none; }
  .frame-badge { display: none; }
}

@media (max-width: 700px) {
  body { font-size: 16.5px; }
  .topbar-cta { display: none; }
  .hero-title { margin: 20px 0 22px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .frame { border-radius: 11px; }
  .frame-bar { height: 30px; gap: 8px; padding: 0 10px; font-size: 10.5px; }
  .frame-dots i { width: 8px; height: 8px; }
  .hero-caption { font-size: 11px; }
  .principles { grid-template-columns: minmax(0, 1fr); border-top-width: 2px; }
  .principle, .principle + .principle { padding: 22px 0 6px; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line); margin-top: 14px; }
  .principle-num { margin-bottom: 12px; }
  .stage .frame-bar { display: none; }
  .stage-viewport { aspect-ratio: 4 / 3; }
  .stage-bar { padding: 7px 7px 7px 12px; }
  .stage-title { font-size: 15.5px; }
  .stage-count { font-size: 12px; }
  .icon-button { width: 36px; height: 36px; }
  .stage-sep, #stage-open { display: none; }
  .stop-title { font-size: 17px; }
  .dn-facts { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .dn-facts li { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .compare-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .compare-tag { top: 8px; padding: 5px 8px 4px; font-size: 10.5px; }
  .compare-tag-day { left: 8px; }
  .compare-tag-night { right: 8px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; justify-content: center; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent); }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { grid-template-columns: 28px minmax(0, 1fr); padding: 20px; }
  .check-item { grid-template-columns: 22px minmax(0, 1fr); row-gap: 2px; font-size: 13px; padding: 12px 14px; }
  .check-leader { display: none; }
  .check-response { grid-column: 2; color: #146cc9; }
  .checklist-title { padding-inline: 14px; }
  .faq-list summary { font-size: 18px; padding-right: 40px; }
  .faq-list details p { padding-right: 0; font-size: 16px; }
  .lightbox { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .lb-viewport img { max-height: calc(100dvh - 170px); }
  .lb-title { font-size: 18px; }
  .lb-caption { font-size: 14.5px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .theme-toggle { padding-right: 5px; }
  .brand-name { font-size: 19px; }
  .theme-toggle-label { display: none; }
  .sign { font-size: 14px; }
  .section-head > p, .section-aside > p, .dn-head > p, .install-copy > p { font-size: 17.5px; }
}

@media (max-width: 359px) {
  .brand-name span { display: none; }
}

/* ---------- Text centred in its box, on every platform
   text-box trims a label's line to exactly cap height → baseline, so flex
   centring centres the letters themselves. Without it, where letters land
   depends on how the platform rounds the font's ascent and descent (Windows
   and Linux Chrome differ by up to 1.5px, whatever the metrics). Browsers
   without text-box (Firefox, for now) keep the padding-based sizes above;
   the heights here match them. */
@supports (text-box: trim-both cap alphabetic) {
  .btn > span, .chip > span, .sign-loc > span, .sign-dir > span, .compare-tag > span,
  .choice label > span > span, .mini-btn > span, .link-button > span, .toast { text-box: trim-both cap alphabetic; }
  .btn { min-height: 47px; padding-block: 8px; }
  .btn-small { min-height: 35px; padding-block: 5px; }
  .btn-large { min-height: 54px; padding-block: 10px; }
  .btn-note { padding: 6px; }
  .chip { min-height: 35px; padding-block: 6px; }
  .sign-loc, .sign-dir { min-height: 28px; padding-block: 0; }
  .compare-tag { min-height: 31px; padding-block: 0; }
  .mini-btn { display: inline-flex; align-items: center; gap: 5px; }
  .toast { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

@media print {
  .topbar, .hero-bg, .callouts, .stage-bar, .filters, .lightbox, .toast, .dn-controls, .holding-point { display: none !important; }
  .install { background: none; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
}
