/* =========================================================================
   ATPL Classic — website styles
   Design language: airfield signage (Barlow / Barlow Condensed) and
   cockpit displays (B612 Mono, designed by Airbus for flight decks).
   Two themes — Day and Night — defined as tokens below.
   ========================================================================= */

/* ---------- Fonts (self-hosted, SIL OFL — see assets/fonts/LICENSE.txt) */
@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"); }
@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"); }
@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"); }
@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"); }
@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"); }
@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"); }
@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"); }
@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"); }
@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"); }

@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }

/* ---------- Tokens: Day (default) */
: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;

  --bg: #f3f1eb;
  --bg-elev: #fcfbf8;
  --bg-sunk: #e8e5dc;
  --bg-hover: rgba(21, 23, 26, .045);
  --ink: #15171a;
  --ink-2: #474c55;
  --ink-3: #62676f;
  --line: #dbd7cc;
  --line-strong: #c2bdb0;
  --route: #a8126a;          /* the “magenta line” — active route on a nav display */
  --route-soft: rgba(168, 18, 106, .1);
  --link: #1a4ad0;
  --sign: #ffc72c;           /* airfield sign yellow */
  --sign-ink: #15171a;
  --sign-edge: #15171a;
  --frame-bg: #ffffff;
  --frame-bar: #f7f5f0;
  --chart: rgba(21, 23, 26, .09);
  --chart-accent: rgba(168, 18, 106, .22);
  --shadow-sm: 0 1px 2px rgba(40, 32, 12, .06), 0 2px 8px -2px rgba(40, 32, 12, .08);
  --shadow-lg: 0 40px 80px -40px rgba(40, 32, 12, .38), 0 18px 36px -18px rgba(40, 32, 12, .18);
  --backdrop: rgba(10, 12, 16, .72);
  --dim: rgba(14, 16, 20, .26);
  --ok: #1f8a4c;

  --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: #0b0e13;
  --bg-elev: #141922;
  --bg-sunk: #07090d;
  --bg-hover: rgba(238, 241, 245, .05);
  --ink: #eef1f5;
  --ink-2: #aeb6c2;
  --ink-3: #8a92a0;
  --line: #222a35;
  --line-strong: #353f4d;
  --route: #ff63bd;
  --route-soft: rgba(255, 99, 189, .13);
  --link: #93b3ff;
  --sign-edge: #000;
  --frame-bg: #1d2127;
  --frame-bar: #10141b;
  --chart: rgba(110, 200, 255, .1);
  --chart-accent: rgba(255, 99, 189, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02);
  --dim: rgba(0, 0, 0, .38);
  --ok: #45d38a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e13;
    --bg-elev: #141922;
    --bg-sunk: #07090d;
    --bg-hover: rgba(238, 241, 245, .05);
    --ink: #eef1f5;
    --ink-2: #aeb6c2;
    --ink-3: #8a92a0;
    --line: #222a35;
    --line-strong: #353f4d;
    --route: #ff63bd;
    --route-soft: rgba(255, 99, 189, .13);
    --link: #93b3ff;
    --sign-edge: #000;
    --frame-bg: #1d2127;
    --frame-bar: #10141b;
    --chart: rgba(110, 200, 255, .1);
    --chart-accent: rgba(255, 99, 189, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02);
    --dim: rgba(0, 0, 0, .38);
    --ok: #45d38a;
    color-scheme: dark;
  }
}

/* ---------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; 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;
}
html.theme-anim body, html.theme-anim body *:not(img) { transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, box-shadow .35s ease !important; }
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(--sign); color: #15171a; }
: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: #15171a; 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: 7px 10px 6px; }
.sign-loc { background: #15171a; color: var(--sign); box-shadow: inset 0 0 0 2px #15171a, inset 0 0 0 3.5px var(--sign); 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: 13px 20px;
  border: 2px solid transparent;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  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: #15171a; border-color: var(--sign-edge); box-shadow: var(--btn-shadow); }
.btn-sign:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--sign-edge); }
.btn-sign:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sign-edge); }
:root[data-theme="dark"] .btn-sign { border-color: #c89600; --sign-edge: #7a5b00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-sign { border-color: #c89600; --sign-edge: #7a5b00; } }
.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: 16px 22px; font-size: 17px; }
.btn-small { padding: 8px 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: 4px 6px 3px; border-radius: 5px; background: rgba(21, 23, 26, .12); }

.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 img { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-family: var(--font-sign); font-weight: 700; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.brand-name span { color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { position: relative; 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="true"] { color: var(--ink); }
.nav a[aria-current="true"]::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(--bg-sunk); 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(--sign); color: #15171a; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .35s var(--ease), background-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-track { background: #28303c; }
:root[data-theme="dark"] .theme-toggle-thumb { transform: translateX(20px); background: #e9eef6; }
: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-track { background: #28303c; }
  :root:not([data-theme="light"]) .theme-toggle-thumb { transform: translateX(20px); background: #e9eef6; }
  :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; }
.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(--route); 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(--route); opacity: 0; }
.callout b { position: absolute; bottom: 20px; left: 0; transform: translateX(-50%); padding: 8px 11px 7px; border-radius: 7px; background: #15171a; 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: #15171a; }
.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: #0f1319; 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(--sign); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); 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: 2px solid #15171a; border-radius: 50%; background: var(--sign); color: #15171a; 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: #15171a; color: #fff; }
.compare-tag-night { right: 14px; background: #eef1f5; color: #15171a; }

.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: 2px solid #15171a; border-radius: 50%; background: var(--sign); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
#eye-range::-moz-range-thumb { width: 18px; height: 18px; border: 2px solid #15171a; border-radius: 50%; background: var(--sign); }

.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%, #15171a 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: #15171a; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.card-badge-night { background: #0e1218; 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: #111419;
  --bg-elev: #1a1f27;
  --bg-sunk: #0b0d11;
  --bg-hover: rgba(255, 255, 255, .05);
  --ink: #f1f3f6;
  --ink-2: #b6bdc8;
  --ink-3: #8d95a2;
  --line: #2a313c;
  --line-strong: #3b4451;
  --route: #ff63bd;
  --link: #93b3ff;
  --sign-edge: #000;
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
  border-top: 0 !important;
  overflow: hidden;
}
.install .btn-sign { border-color: #c89600; --sign-edge: #7a5b00; }
.install::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 70% at 85% 110%, rgba(255, 199, 44, .08), transparent 60%), repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, .025) 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(--sign); opacity: .92; }
.holding-point span:nth-child(3), .holding-point span:nth-child(4) { background: repeating-linear-gradient(90deg, var(--sign) 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: #fbfaf6; color: #15171a; 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: #15171a; color: #fbfaf6; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; border-bottom: 3px solid var(--sign); }
.checklist-state { color: var(--sign); }
.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 #e4e0d6; background: transparent; color: #15171a; 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: #f1eee6; } }
.check-item:focus-visible { outline-offset: -3px; outline-color: #a8126a; }
.check-box { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid #15171a; border-radius: 5px; transition: background-color .2s; }
.check-box .icon { width: 15px; height: 15px; stroke-width: 3; color: var(--sign); 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 #9a9da3; }
.check-response { font-weight: 700; }
.check-item[aria-pressed="true"] .check-box { background: #15171a; }
.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: #5c6068; }
.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: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 24px -8px rgba(168, 18, 106, .6); }
.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); }
.zip-install { border-top: 1px solid var(--line); padding-top: 14px; }
.zip-install summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; list-style: none; }
.zip-install summary::-webkit-details-marker { display: none; }
.zip-install summary::after { content: "+"; font-family: var(--font-mono); font-size: 18px; color: var(--ink-3); transition: transform .25s; }
.zip-install[open] summary::after { transform: rotate(45deg); }
.zip-install summary:hover { color: var(--ink); }
.zip-install ol { display: grid; gap: 10px; margin-top: 14px; padding-left: 22px; list-style: decimal; color: var(--ink-2); font-size: 15px; }
.zip-install li::marker { font-family: var(--font-mono); color: var(--ink-3); }
.zip-install a { color: var(--link); font-weight: 600; }

/* ---------- 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; }

/* ---------- Footer */
.footer { padding: 36px 0 44px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { border-radius: 9px; }
.footer-name { font-family: var(--font-sign); font-weight: 700; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.footer-note { font-size: 14.5px; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.to-top { display: inline-flex; align-items: center; gap: 6px; }
.to-top .icon { width: 16px; height: 16px; }

/* ---------- 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; }

/* ---------- 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="true"]::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 (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: #15171a; font-size: 17px; }
  .nav .nav-install::after { display: none; }
  .nav .nav-install:hover { background: var(--sign); color: #15171a; }
  .nav a[aria-current="true"]::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); }
  .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: #6b5a00; }
  .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: 17px; }
  .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; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::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; }
}
