/* ════════════════════════════════════════════════════════════
   SubPair — marketing + account site
   Binding system: DESIGN.md (surface ladder + hairlines, Geist,
   white-pill CTA, single red accent, quiet ease-out motion).
   ════════════════════════════════════════════════════════════ */

/* ═══ FONT ═══ */
@font-face {
  font-family: 'Geist';
  src: url('../fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-compatible fallback so the swap doesn't shift layout */
@font-face {
  font-family: 'Geist Fallback';
  src: local('Arial'), local('Helvetica Neue');
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ═══ TOKENS ═══ */
:root {
  color-scheme: dark;
  /* surface ladder (DESIGN.md §1) */
  --bg: #07080a;            /* canvas */
  --bg-raised: #0d0d0d;     /* surface */
  --bg-card: #101111;       /* elevated card */
  --bg-card-hover: #121212; /* card / active */
  --bg-media: #0f1011;      /* screenshot panel (§11 Linear framing) */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --hairline: rgba(255, 255, 255, 0.06);

  /* text (DESIGN.md §2) — all ≥4.5:1 on every surface */
  --text: #cdcdcd;
  --muted: #9c9c9d;
  --heading: #f4f4f6;
  --faint: #828384; /* §6 asks #6a6b6c, raised to pass AA (4.9:1 on #101111) */

  /* single accent + status colors (DESIGN.md §3) */
  --accent: #e50914;
  --accent-hover: #f6212c;
  --accent-soft: rgba(229, 9, 20, 0.15);
  --green: #59d499;
  --green-soft: rgba(89, 212, 153, 0.15);
  --blue: #57c1ff;
  --blue-soft: rgba(87, 193, 255, 0.15);
  --warn: #ffc533;
  --warn-soft: rgba(255, 197, 51, 0.15);
  --error: #ff6161;
  --error-soft: rgba(255, 97, 97, 0.15);
  --gold: #f5c518; /* in-mock subtitle yellow only */

  /* type */
  --font: 'Geist', 'Geist Fallback', system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); /* 36 → 64 */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);    /* 28 → 40 */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);    /* 20 → 24 */

  /* 8px spacing grid */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --section: clamp(64px, 8vw, 112px);

  /* shape & motion — depth is tone + hairline; shadows only on overlays */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --overlay-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.33, 1, 0.68, 1);   /* ease-out */
  --t-fast: 0.12s var(--ease);              /* routine interaction 100-150ms */
  --t: 0.25s var(--ease);                   /* transitions 200-300ms */
  --container: 1160px;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }
.num, [class*="price"], time { font-variant-numeric: tabular-nums; }

/* Focus ring is never suppressed (DESIGN.md §11) */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--heading); color: var(--bg);
  padding: 12px 16px; z-index: 2000; border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* inline text links inside prose */
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: color var(--t-fast), text-decoration-color var(--t-fast); }
.link:hover { color: var(--heading); text-decoration-color: rgba(255,255,255,0.5); }

/* ═══ LAYOUT ═══ */
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px); }
.container-sm { max-width: 820px; }
.container-xs { max-width: 480px; }
.section { padding: var(--section) 0; }
/* Section separation = hairline, not a gradient wash (DESIGN.md §11) */
.section-alt { border-top: 1px solid var(--hairline); }

.section-tag, .feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: var(--s-3);
}

/* Left-aligned section head: title left, supporting line right (asymmetric) */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-5) var(--s-8);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2,
.faq-intro h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--heading);
}
.section-head > p { color: var(--muted); font-size: 1.0625rem; max-width: 46ch; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-full);
  min-height: 44px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
/* press: one tone darker + 1px down — never shifts layout bounds */
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 9px 18px; font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 15px 28px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: #fff; color: #0a0a0a; }
.btn-primary:hover { background: #ededee; }
.btn-primary:active { background: #e0e0e1; }

/* Arrow-slide micro-interaction (Clerk formula): only the arrow moves */
.btn .btn-arrow { transition: transform var(--t-fast); flex-shrink: 0; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-outline { border-color: var(--border-strong); color: var(--heading); background: transparent; }
.btn-outline:hover { border-color: rgba(255,255,255,0.32); background: rgba(255,255,255,0.04); }
.btn-outline:active { background: rgba(255,255,255,0.07); }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--heading); background: rgba(255,255,255,0.04); }

.btn-danger-ghost { border-color: rgba(255, 97, 97, 0.35); color: var(--error); background: transparent; }
.btn-danger-ghost:hover { background: rgba(255, 97, 97, 0.08); border-color: rgba(255, 97, 97, 0.5); }
.btn-danger-ghost:active { background: rgba(255, 97, 97, 0.14); }

.btn-soon { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--muted); cursor: default; }
.btn-soon:hover, .btn-soon:active { transform: none; }

.btn[disabled], .btn.btn-loading { opacity: 0.55; pointer-events: none; }

/* ═══ NAVIGATION ═══ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t), transform var(--t);
}
/* Opaque tone, not frosted glass (DESIGN.md §8) */
.nav-scrolled { background: rgba(7, 8, 10, 0.97); border-bottom-color: var(--border); }
.nav-hidden { transform: translateY(-100%); }

.nav-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-4);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--heading);
  justify-self: start;
}
.nav-logo img { border-radius: 7px; }

.nav-links { display: flex; align-items: center; gap: var(--s-1); }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-link:hover { color: var(--heading); background: rgba(255,255,255,0.04); }
.nav-link-mobile-auth { display: none; }

.nav-actions { display: flex; align-items: center; gap: var(--s-3); justify-self: end; }

/* Language menu (header): a <details> disclosure — globe + native name toggle,
   list of real links (works without JS; header.php script adds arrows/Esc).
   Quiet chrome: no accent (DESIGN §3); overlay = elevated tone + hairline +
   one soft shadow (§1). Rows follow §5 anatomy with 44px hit targets. */
.lang-menu { position: relative; }
.lang-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 10px; margin: 0 -2px;
  font-size: 0.875rem; font-weight: 500; color: var(--muted);
  border-radius: var(--radius-full); cursor: pointer; list-style: none;
  white-space: nowrap; user-select: none;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.lang-menu-btn::-webkit-details-marker { display: none; }
.lang-menu-btn::marker { content: ""; }
.lang-menu-btn:hover, .lang-menu[open] .lang-menu-btn { color: var(--heading); background: rgba(255,255,255,0.04); }
.lang-menu-btn:focus-visible { outline: 2px solid var(--heading); outline-offset: 2px; }
.lang-globe { flex: none; }
.lang-chev { flex: none; opacity: 0.7; transition: transform var(--t-fast); }
.lang-menu[open] .lang-chev { transform: rotate(180deg); }
.lang-menu-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 1100;
  min-width: 200px; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 6px; list-style: none;
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.lang-menu[open] .lang-menu-list { animation: lang-menu-in 0.18s var(--ease) both; }
@keyframes lang-menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lang-menu-item, .footer-langs a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  min-height: 44px; padding: 6px 10px; border-radius: var(--radius-xs);
  font-size: 0.9375rem; color: var(--text); white-space: nowrap;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.lang-menu-item:hover, .lang-menu-item:focus-visible { background: var(--bg-card-hover); color: var(--heading); }
.lang-menu-item:focus-visible { outline: 2px solid var(--heading); outline-offset: -2px; }
.lang-menu-item[aria-current="true"] { color: var(--heading); background: var(--bg-card-hover); }
.lang-check { flex: none; color: var(--heading); }

/* Footer language list: one wrapping row of quiet links */
.footer-langs { display: flex; align-items: flex-start; gap: var(--s-2); color: var(--muted); margin-bottom: var(--s-5); }
.footer-langs > svg { flex: none; margin-top: 14px; }
.footer-langs ul { display: flex; flex-wrap: wrap; gap: 0 var(--s-1); margin: 0; padding: 0; list-style: none; }
.footer-langs a { font-size: 0.8125rem; color: var(--muted); padding: 6px 8px; }
.footer-langs a:hover { color: var(--heading); }
.footer-langs a[aria-current="true"] { color: var(--heading); }
.footer-langs .lang-check { display: none; }

@media (prefers-reduced-motion: reduce) {
  .lang-menu[open] .lang-menu-list { animation: none; }
  .lang-chev { transition: none; }
}

/* Script-specific typography: CJK has no Geist glyphs and no word spaces —
   native fallback stacks, no negative tracking, line-break rules. Long
   compounds (de/ru) may hyphenate in headings rather than overflow. */
:lang(ja) { --font: 'Geist', 'Geist Fallback', "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif; }
:lang(ko) { --font: 'Geist', 'Geist Fallback', "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(zh) { --font: 'Geist', 'Geist Fallback', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
html:lang(ja) body, html:lang(zh) body { line-break: strict; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }
/* Japanese headings: break at phrase boundaries, never inside a word ("二|か国語").
   auto-phrase = Chrome 119+; other browsers keep the default. */
html:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
html:lang(ja) :is(h1, h2, h3, .hero-title), html:lang(ko) :is(h1, h2, h3, .hero-title), html:lang(zh) :is(h1, h2, h3, .hero-title) { letter-spacing: 0; }
html:lang(de) :is(h1, h2, h3), html:lang(ru) :is(h1, h2, h3) { hyphens: auto; overflow-wrap: break-word; }
.legal-lang-note { font-size: 0.875rem; color: var(--muted); padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: var(--s-5); }

.nav-hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; margin-right: -10px; }
.nav-hamburger span {
  width: 20px; height: 1.5px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══ HERO ═══ */
.hero { padding: clamp(104px, 13vh, 136px) 0 var(--section); }

.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s-6) var(--s-8);
  align-items: start; /* N-W8: title and copy share one top edge — no dead space above the H1 */
  margin-bottom: clamp(32px, 4.5vw, 56px);
}
.hero-title {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--heading);
  max-width: 15ch;
}
.hero-subtitle { font-size: 1.125rem; color: var(--text); line-height: 1.6; margin-bottom: var(--s-5); max-width: 40ch; padding-top: 6px; }
.hero-ctas { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.hero-note { margin-top: var(--s-4); font-size: 0.875rem; color: var(--muted); }
.hero-note a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
/* N-W6: the secondary hero link gets a ≥44px hit area without changing the text layout */
.hero-note-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; margin: -10px 0; }
.hero-caption { margin-top: var(--s-3); font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.01em; }
.hero-caption-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
.hero-caption-link:hover { color: var(--heading); text-decoration-color: rgba(255,255,255,0.5); }
.hero-note a:hover { color: var(--heading); text-decoration-color: rgba(255,255,255,0.5); }

/* proof row: three mechanism claims, hairline-separated */
.hero-proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--s-6) 0 0;
  border-top: 1px solid var(--border);
}
.hero-proof li { padding: var(--s-4) var(--s-5) 0 0; display: flex; flex-direction: column; gap: 2px; }
.hero-proof li + li { padding-left: var(--s-5); border-left: 1px solid var(--border); }
.hp-key { color: var(--heading); font-weight: 500; font-size: 0.9375rem; }
.hp-val { color: var(--muted); font-size: 0.875rem; }

/* ── Player + panel mock ── */
.hero-preview { position: relative; }
.hero-browser {
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero-browser-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: #2a2b2d; }
.hero-url {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-left: var(--s-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.hero-ext-pin {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.hero-ext-pin img { width: 13px; height: 13px; border-radius: 3px; }

.hero-stage { display: grid; grid-template-columns: minmax(0, 1fr) 288px; }

/* The "film frame": neutral tones only — no blue/purple wash (DESIGN.md §8) */
.hero-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  /* An original illustrated scene (assets/img/product/scene-harbor.svg, inlined
     so it paints with the CSS — no extra request in the hero) instead of an
     empty dark frame; the bottom scrim keeps both lines legible */
  background:
    linear-gradient(180deg, rgba(7, 8, 10, 0.15) 0%, rgba(7, 8, 10, 0) 40%, rgba(7, 8, 10, 0.55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1600 900%22 preserveAspectRatio=%22xMidYMid slice%22%3E%3Cdefs%3E%3ClinearGradient id=%22sky%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%231c2340%22/%3E%3Cstop offset=%220.45%22 stop-color=%22%235a4a6e%22/%3E%3Cstop offset=%220.75%22 stop-color=%22%23c9826b%22/%3E%3Cstop offset=%221%22 stop-color=%22%23e9b98a%22/%3E%3C/linearGradient%3E%3ClinearGradient id=%22sea%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%236e5f78%22/%3E%3Cstop offset=%220.4%22 stop-color=%22%232f3550%22/%3E%3Cstop offset=%221%22 stop-color=%22%230d111c%22/%3E%3C/linearGradient%3E%3CradialGradient id=%22sun%22 cx=%220.5%22 cy=%220.5%22 r=%220.5%22%3E%3Cstop offset=%220%22 stop-color=%22%23ffe2b0%22/%3E%3Cstop offset=%220.35%22 stop-color=%22%23ffc58a%22 stop-opacity=%220.9%22/%3E%3Cstop offset=%221%22 stop-color=%22%23ffb07a%22 stop-opacity=%220%22/%3E%3C/radialGradient%3E%3ClinearGradient id=%22vign%22 x1=%220%22 y1=%220%22 x2=%220%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%23000%22 stop-opacity=%220.25%22/%3E%3Cstop offset=%220.55%22 stop-color=%22%23000%22 stop-opacity=%220%22/%3E%3Cstop offset=%221%22 stop-color=%22%23000%22 stop-opacity=%220.55%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width=%221600%22 height=%22900%22 fill=%22url%28%23sky%29%22/%3E%3C%21-- stars --%3E%3Cg fill=%22%23fff%22 opacity=%220.55%22%3E%3Ccircle cx=%22140%22 cy=%2270%22 r=%221.6%22/%3E%3Ccircle cx=%22380%22 cy=%22120%22 r=%221.2%22/%3E%3Ccircle cx=%22610%22 cy=%2254%22 r=%221.4%22/%3E%3Ccircle cx=%221010%22 cy=%2290%22 r=%221.2%22/%3E%3Ccircle cx=%221290%22 cy=%2260%22 r=%221.6%22/%3E%3Ccircle cx=%221480%22 cy=%22140%22 r=%221.1%22/%3E%3Ccircle cx=%22820%22 cy=%22150%22 r=%221%22/%3E%3Ccircle cx=%22250%22 cy=%22200%22 r=%221%22/%3E%3C/g%3E%3C%21-- sun --%3E%3Ccircle cx=%22980%22 cy=%22380%22 r=%22280%22 fill=%22url%28%23sun%29%22/%3E%3Ccircle cx=%22980%22 cy=%22380%22 r=%2256%22 fill=%22%23ffe7bf%22/%3E%3C%21-- far hills --%3E%3Cpath d=%22M0 470 C 160 420 300 440 430 455 C 560 470 640 410 780 430 C 900 448 1000 470 1120 452 C 1260 430 1400 400 1600 440 L1600 560 L0 560 Z%22 fill=%22%236c5272%22/%3E%3Cpath d=%22M0 505 C 120 480 260 470 380 492 C 520 516 620 490 760 500 C 900 512 1080 530 1220 506 C 1360 484 1480 492 1600 500 L1600 560 L0 560 Z%22 fill=%22%234d3f5e%22/%3E%3C%21-- sea --%3E%3Crect y=%22540%22 width=%221600%22 height=%22360%22 fill=%22url%28%23sea%29%22/%3E%3C%21-- sun reflection --%3E%3Cg fill=%22%23ffd9a6%22 opacity=%220.7%22%3E%3Crect x=%22930%22 y=%22556%22 width=%22100%22 height=%224%22 rx=%222%22/%3E%3Crect x=%22945%22 y=%22574%22 width=%2270%22 height=%223%22 rx=%221.5%22/%3E%3Crect x=%22915%22 y=%22592%22 width=%22130%22 height=%223%22 rx=%221.5%22 opacity=%220.7%22/%3E%3Crect x=%22955%22 y=%22612%22 width=%2250%22 height=%223%22 rx=%221.5%22/%3E%3Crect x=%22935%22 y=%22634%22 width=%2290%22 height=%222.5%22 rx=%221.25%22 opacity=%220.6%22/%3E%3Crect x=%22960%22 y=%22660%22 width=%2240%22 height=%222.5%22 rx=%221.25%22 opacity=%220.5%22/%3E%3C/g%3E%3C%21-- lighthouse on left headland --%3E%3Cpath d=%22M0 560 C 80 520 180 510 300 528 C 360 538 400 552 430 572 L0 600 Z%22 fill=%22%231d1a2b%22/%3E%3Cg transform=%22translate%28205 395%29%22%3E%3Cpath d=%22M10 0 L34 0 L42 136 L2 136 Z%22 fill=%22%23e8dccb%22/%3E%3Crect x=%224%22 y=%2234%22 width=%2236%22 height=%2214%22 fill=%22%23b4473f%22/%3E%3Crect x=%223%22 y=%2280%22 width=%2238%22 height=%2214%22 fill=%22%23b4473f%22/%3E%3Crect x=%226%22 y=%22-22%22 width=%2232%22 height=%2222%22 fill=%22%232a2638%22/%3E%3Crect x=%2212%22 y=%22-18%22 width=%2220%22 height=%2214%22 fill=%22%23ffe7a8%22/%3E%3Cpath d=%22M2 -22 L22 -40 L42 -22 Z%22 fill=%22%23b4473f%22/%3E%3C/g%3E%3Cpath d=%22M227 384 L-40 330 L-40 420 Z%22 fill=%22%23ffe7a8%22 opacity=%220.10%22/%3E%3C%21-- distant boats --%3E%3Cg fill=%22%23231f33%22%3E%3Cpath d=%22M610 548 L680 548 L670 558 L620 558 Z%22/%3E%3Crect x=%22642%22 y=%22516%22 width=%223%22 height=%2232%22/%3E%3Cpath d=%22M645 518 L645 545 L668 545 Z%22 fill=%22%233b3350%22/%3E%3Cpath d=%22M1300 560 L1390 560 L1378 572 L1312 572 Z%22/%3E%3Crect x=%221342%22 y=%22520%22 width=%223%22 height=%2240%22/%3E%3Cpath d=%22M1345 522 L1345 556 L1374 556 Z%22 fill=%22%233b3350%22/%3E%3C/g%3E%3C%21-- pier with lamps %28right%29 --%3E%3Cg fill=%22%2314121e%22%3E%3Crect x=%221120%22 y=%22640%22 width=%22480%22 height=%2218%22/%3E%3Crect x=%221150%22 y=%22658%22 width=%2210%22 height=%2290%22/%3E%3Crect x=%221260%22 y=%22658%22 width=%2210%22 height=%2290%22/%3E%3Crect x=%221370%22 y=%22658%22 width=%2210%22 height=%2290%22/%3E%3Crect x=%221480%22 y=%22658%22 width=%2210%22 height=%2290%22/%3E%3Crect x=%221220%22 y=%22560%22 width=%225%22 height=%2280%22/%3E%3Crect x=%221440%22 y=%22560%22 width=%225%22 height=%2280%22/%3E%3C/g%3E%3Ccircle cx=%221222.5%22 cy=%22556%22 r=%227%22 fill=%22%23ffd38a%22/%3E%3Ccircle cx=%221442.5%22 cy=%22556%22 r=%227%22 fill=%22%23ffd38a%22/%3E%3Ccircle cx=%221222.5%22 cy=%22556%22 r=%2222%22 fill=%22%23ffd38a%22 opacity=%220.18%22/%3E%3Ccircle cx=%221442.5%22 cy=%22556%22 r=%2222%22 fill=%22%23ffd38a%22 opacity=%220.18%22/%3E%3C%21-- two figures on the pier, silhouettes --%3E%3Cg fill=%22%230f0d17%22%3E%3Ccircle cx=%221300%22 cy=%22572%22 r=%2211%22/%3E%3Cpath d=%22M1288 584 Q1300 578 1312 584 L1316 640 L1284 640 Z%22/%3E%3Ccircle cx=%221336%22 cy=%22578%22 r=%2210%22/%3E%3Cpath d=%22M1325 589 Q1336 584 1347 589 L1350 640 L1322 640 Z%22/%3E%3C/g%3E%3C%21-- near wave lines --%3E%3Cg stroke=%22%238d86a8%22 stroke-width=%222%22 stroke-linecap=%22round%22 opacity=%220.25%22 fill=%22none%22%3E%3Cpath d=%22M120 700 q30 -8 60 0%22/%3E%3Cpath d=%22M420 760 q40 -10 80 0%22/%3E%3Cpath d=%22M760 720 q30 -8 60 0%22/%3E%3Cpath d=%22M300 820 q40 -10 80 0%22/%3E%3Cpath d=%22M980 800 q40 -10 80 0%22/%3E%3C/g%3E%3Crect width=%221600%22 height=%22900%22 fill=%22url%28%23vign%29%22/%3E%3C/svg%3E") center 62% / cover no-repeat,
    #1b1a19;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 24px 16px;
  overflow: hidden;
}

.hero-sub-stack { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 20px; }
.hero-subtitle-original, .hero-subtitle-translated {
  text-align: center;
  padding: 6px 16px;
  border-radius: var(--radius-xs);
  font-weight: 500;
}
.hero-subtitle-original { color: #fff; background: rgba(0, 0, 0, 0.6); font-size: clamp(0.875rem, 1.6vw, 1.125rem); }
.hero-subtitle-translated { color: var(--gold); background: rgba(0, 0, 0, 0.45); font-size: clamp(0.8125rem, 1.4vw, 1rem); }
.hero-word { color: var(--gold); border-bottom: 1px dashed rgba(245, 197, 24, 0.7); }
.hero-phrase { background: rgba(245, 197, 24, 0.22); border-radius: 3px; box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.22); }

.hero-dict-popup {
  position: absolute;
  bottom: 32%; right: 7%;
  min-width: 190px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--overlay-shadow);
}
.hero-dict-kind, .dict-kind { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.hero-dict-word { font-weight: 600; color: var(--heading); font-size: 0.9375rem; }
.hero-dict-meaning { color: var(--text); font-size: 0.8125rem; }
.hero-dict-save {
  margin-top: 8px;
  color: var(--bg);
  background: var(--heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  align-self: flex-start;
}
.hero-dict-save.is-saved { color: var(--heading); background: rgba(255,255,255,0.08); }

.hero-instant-chip {
  position: absolute;
  top: 16px; left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 13, 13, 0.9);
  border: 1px solid var(--border-strong);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-full);
}

.hero-player-bar { display: flex; align-items: center; gap: 12px; }
.hero-progress { flex: 1; height: 3px; background: rgba(255,255,255,0.16); border-radius: var(--radius-full); overflow: hidden; }
.hero-progress::before { content: ""; display: block; width: 34%; height: 100%; background: var(--accent); }
.hero-player-time { font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* side panel mock — row anatomy per DESIGN.md §5 */
.hero-panel {
  border-left: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
  min-width: 0;
}
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hp-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--heading); }
.hp-brand img { border-radius: 4px; }
/* Mirrors the real side panel: four text tabs, active one underlined (UX-AUDIT-v7 X8) */
.hp-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.hp-tabs span { flex: 1; text-align: center; font-size: 0.75rem; color: var(--muted); padding: 5px 0 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hp-tabs span.active { color: var(--heading); border-bottom-color: var(--heading); }
.hp-list { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: hidden; }
.hp-row { padding: 6px 10px; border-radius: var(--radius-xs); display: flex; flex-direction: column; min-width: 0; }
.hp-row strong { font-size: 0.8125rem; font-weight: 500; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-row span { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-row em { font-style: normal; font-size: 0.6875rem; color: var(--muted); background: rgba(255,255,255,0.06); padding: 0 6px; border-radius: var(--radius-full); margin-left: 4px; }
.hp-row.is-new { background: var(--bg-card-hover); }
.hp-foot { display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }
.hp-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text); }
.hp-sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ═══ LEARNER LOOP (sequential → numbers are allowed, §11) ═══ */
.loop {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  overflow: hidden;
}
.loop-step { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.loop-step + .loop-step { border-left: 1px solid var(--border); }
.loop-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  font-size: 0.8125rem; font-weight: 500; color: var(--text);
  background: linear-gradient(180deg, #121212, #0d0d0d);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
}
.loop-step h3 { font-size: 1.0625rem; font-weight: 600; color: var(--heading); letter-spacing: -0.01em; }
.loop-step p { font-size: 0.9375rem; color: var(--muted); line-height: 1.55; flex: 1; }
.loop-art { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--border); display: flex; align-items: center; gap: var(--s-2); min-height: 45px; }
.loop-art-text { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.loop-sel { font-size: 0.875rem; color: #fff; background: rgba(245, 197, 24, 0.22); box-shadow: 0 0 0 2px rgba(245, 197, 24, 0.22); border-radius: 3px; padding: 0 2px; }
.loop-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 3px 10px; border-radius: var(--radius-full); }

/* ═══ FEATURE ROWS — copy left, product right ═══ */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: clamp(40px, 5vw, 64px) 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--hairline); }
.feature-row:first-of-type { padding-top: 0; }
.feature-row:last-child { padding-bottom: 0; }
.feature-reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.feature-reverse .feature-text { order: 2; }
.feature-reverse .feature-visual { order: 1; }

.feature-tag svg { color: var(--green); }
.feature-text h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; color: var(--heading); margin-bottom: var(--s-4); }
.feature-text > p { color: var(--muted); margin-bottom: var(--s-5); line-height: 1.7; max-width: 52ch; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.feature-list li { display: flex; align-items: flex-start; gap: var(--s-3); color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.feature-list li svg { color: var(--green); flex-shrink: 0; margin-top: 4px; }

/* demo cards */
.feature-visual { display: flex; justify-content: center; min-width: 0; }
.demo-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  width: 100%;
  max-width: 520px;
}
.demo-scene {
  background:
    radial-gradient(ellipse 70% 60% at 30% 20%, rgba(255, 236, 214, 0.06), transparent 70%),
    linear-gradient(180deg, #1a1918, #0d0d0d);
  padding-top: var(--s-8);
}
.demo-original {
  background: rgba(0,0,0,0.6);
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  text-align: center;
  color: #fff;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 1.0625rem;
}
.demo-phrase { position: relative; background: rgba(245,197,24,0.22); box-shadow: 0 0 0 2px rgba(245,197,24,0.22); border-radius: 3px; }
.demo-caret { position: absolute; right: -3px; top: -4px; bottom: -4px; width: 2px; background: var(--gold); border-radius: 2px; }
.demo-translated {
  background: rgba(0,0,0,0.45);
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  text-align: center;
  color: var(--gold);
  font-size: 0.9375rem;
}
.demo-source-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 4px 12px; border-radius: var(--radius-full); }
.dict-popup-demo {
  margin: var(--s-5) 0 0 auto;
  max-width: 280px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--overlay-shadow);
}
.dict-word { font-size: 1.0625rem; font-weight: 600; color: var(--heading); }
.dict-meaning { color: var(--text); font-size: 0.875rem; margin-bottom: var(--s-3); }
.dict-btn { padding: 4px 12px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; align-self: flex-start; }
.dict-btn-save { background: var(--green-soft); color: var(--green); }

/* side-panel mock (row anatomy per DESIGN.md §5) */
.panel-mock { padding: var(--s-4); }
.panel-mock-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 10px 10px; font-size: 0.875rem; font-weight: 600; color: var(--heading); }
.panel-mock-head .pm-count { color: var(--muted); font-weight: 500; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.panel-mock-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 8px 10px; border-radius: var(--radius-xs); }
.panel-mock-row.active { background: var(--bg-card-hover); }
.panel-mock-row .pm-main { min-width: 0; }
.panel-mock-row .pm-main strong { display: block; color: var(--heading); font-weight: 500; font-size: 0.9375rem; }
.panel-mock-row .pm-main span { display: block; color: var(--muted); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-mock-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-3); padding: 12px 10px 4px; border-top: 1px solid var(--border); }
.pm-action { font-size: 0.75rem; color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-full); padding: 3px 10px; }

.learn-demo-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.learn-demo-row:first-child { padding-top: 0; }
.learn-demo-row:last-child { border-bottom: none; padding-bottom: 0; }
.ld-label { color: var(--text); font-weight: 500; min-width: 0; }
.ld-pill { font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full); }
.ld-pill-on { background: var(--green-soft); color: var(--green); }
.ld-blur { filter: blur(4px); color: var(--gold); font-size: 0.875rem; white-space: nowrap; }

/* ═══ PLATFORMS ═══ */
.platform-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-6);
}
.platform-cell { padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.platform-cell + .platform-cell { padding-left: var(--s-5); border-left: 1px solid var(--border); }
.platform-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-2); }
.platform-head h3 { font-size: 1.0625rem; font-weight: 600; color: var(--heading); letter-spacing: -0.01em; }
.platform-cell p { font-size: 0.9375rem; color: var(--muted); line-height: 1.55; }

/* Mode badges — one system, same as the extension (native/MT/live) */
.mode-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.mode-instant { background: var(--green-soft); color: var(--green); }
.mode-mt { background: var(--blue-soft); color: var(--blue); }
/* X6: Live is a neutral state (same grey as the extension), never a warning */
.mode-live { background: rgba(156, 156, 157, 0.15); color: #b4b4b5; }

/* ═══ PRODUCT VISUALS — Linear-style panel framing (§11) ═══
   assets/img/product/*: the extension's real UI rendered over original
   illustrated scenes (scripts/site-images/), all 16:10. The media box keeps
   the panel tone while an image loads — never a flat black rectangle. */
.shots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.shot-card {
  margin: 0;
  background: var(--bg-media);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
}
.shot-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-media); }
.shot-media picture { display: contents; } /* responsive AVIF/WebP wrapper must not change the img box */
.shot-media img { width: 100%; height: 100%; object-fit: cover; }
.shot-card figcaption {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: 14px var(--s-4);
  font-size: 0.875rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.shot-card figcaption .mode-badge { position: relative; top: -1px; }

/* details: definition list, hairline rows — replaces the icon-card grid (§8) */
.details-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--s-6);
  margin-top: clamp(48px, 6vw, 80px);
}
.details-list > div { padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.details-list dt { color: var(--heading); font-weight: 500; font-size: 0.9375rem; margin-bottom: 2px; }
.details-list dd { color: var(--muted); font-size: 0.875rem; line-height: 1.55; }

/* ═══ KEYCAPS (§5) ═══ */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: #cdcdcd;
  background: linear-gradient(180deg, #121212, #0d0d0d);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  height: 20px;
  padding: 0 6px;
  min-width: 20px;
  line-height: 1;
  vertical-align: 1px;
}
.kbd-group { display: inline-flex; gap: 4px; }
.kbd-inline { white-space: nowrap; letter-spacing: 0.06em; }

/* ═══ COMPARISON ═══ */
.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  -webkit-overflow-scrolling: touch;
}
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 680px; }
.comparison-table th, .comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.comparison-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-raised);
  box-shadow: 1px 0 0 var(--border);
  width: 24%;
}
.comparison-swipe-hint { display: none; }
.comparison-table tr:last-child th, .comparison-table tr:last-child td { border-bottom: none; }
.comparison-table thead th { background: rgba(255,255,255,0.02); font-weight: 600; color: var(--heading); font-size: 0.9375rem; border-bottom-color: var(--border-strong); }
.comparison-table tbody th { font-weight: 500; color: var(--text); }
.comparison-table td { color: var(--muted); }
/* "Us" column = one tone lighter, no colored border (§6) */
.comparison-table .comp-us { background: var(--bg-card-hover); color: var(--text); }
.comparison-table thead .comp-us { color: var(--heading); }
.comp-yes { color: var(--green); font-weight: 600; }
.comparison-note { font-size: 0.8125rem; color: var(--muted); margin-top: var(--s-4); }

/* ═══ PRICING ═══ */
.pricing-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-raised);
  margin-bottom: var(--s-6);
}
.pt-opt {
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.pt-opt:hover { color: var(--heading); }
.pt-opt.active { background: var(--bg-card-hover); color: var(--heading); box-shadow: inset 0 0 0 1px var(--border-strong); }
.pricing-save {
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-full);
}

.pricing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--s-4); align-items: start; }
.pricing-aside { padding: var(--s-6) var(--s-2) var(--s-6) var(--s-5); }
.pricing-aside h3 { font-size: 1.0625rem; font-weight: 600; color: var(--heading); margin-bottom: var(--s-4); }
.pricing-aside dl > div { padding: var(--s-3) 0; border-top: 1px solid var(--border); }
.pricing-aside dt { color: var(--text); font-weight: 500; font-size: 0.9375rem; margin-bottom: 2px; }
.pricing-aside dd { color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.pricing-aside-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: var(--s-2); font-size: 0.9375rem; font-weight: 500; color: var(--heading); }
.pricing-aside-link svg { transition: transform var(--t-fast); }
.pricing-aside-link:hover svg { transform: translateY(2px); }
.pricing-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}
/* featured = one tone lighter + hairline only (§6) */
.pricing-card-pro { background: var(--bg-card-hover); border-color: var(--border-strong); }

.pricing-card-header h3 { font-size: 1.0625rem; font-weight: 600; color: var(--heading); margin-bottom: var(--s-3); }
.pricing-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.pricing-amount { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -0.035em; color: var(--heading); font-variant-numeric: tabular-nums; }
.pricing-period { font-size: 0.9375rem; color: var(--muted); }
.pricing-desc { font-size: 0.875rem; color: var(--muted); min-height: 1.5em; }

.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; padding-top: var(--s-5); border-top: 1px solid var(--border); }
.pricing-features li { font-size: 0.9375rem; position: relative; padding-left: 24px; line-height: 1.5; }
.pricing-features li.included { color: var(--text); }
.pricing-features li.included strong { color: var(--heading); font-weight: 600; }
.pricing-features li.included::before {
  content: "";
  position: absolute; left: 0; top: 4px;
  width: 14px; height: 14px;
  background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pricing-features li.plain { color: var(--muted); padding-left: 0; }
.pricing-features li.plain::before { display: none; }
.pricing-features li.excluded { color: var(--faint); }
.pricing-features li.excluded::before { content: "—"; position: absolute; left: 0; top: 0; width: 14px; text-align: center; }

.pricing-fineprint { font-size: 0.875rem; color: var(--muted); margin-top: var(--s-5); }
.pricing-fineprint a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; display: inline-block; padding: 6px 0; }
.pricing-fineprint a:hover { color: var(--heading); }
.pricing-msg { font-size: 0.875rem; color: var(--warn); display: none; margin-top: calc(var(--s-3) * -1); }
.pricing-msg.visible { display: block; }
.pricing-prelaunch { font-size: 0.8125rem; line-height: 1.5; color: var(--muted); margin-top: calc(var(--s-3) * -1); }
.pricing-msg a { color: var(--heading); text-decoration: underline; text-underline-offset: 3px; }

/* ═══ FAQ ═══ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s-6) var(--s-8); align-items: start; }
.faq-intro { position: sticky; top: 96px; }
.faq-intro h2 { margin-bottom: var(--s-3); }
.faq-intro p { color: var(--muted); }
.faq-intro a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.faq-intro a:hover { color: var(--heading); }

.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-h { font-size: inherit; font-weight: inherit; }
.faq-question {
  width: 100%;
  min-height: 56px;
  padding: 16px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  font-size: 1rem;
  font-weight: 500;
  color: var(--heading);
  text-align: left;
  transition: color var(--t-fast);
}
.faq-question:hover { color: #fff; }
.faq-question svg { transition: transform var(--t); flex-shrink: 0; color: var(--muted); }
.faq-question[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-answer p { padding: 0 40px 20px 4px; color: var(--muted); line-height: 1.7; font-size: 0.9375rem; max-width: 68ch; }

/* ═══ FINAL CTA ═══ */
.final-cta { padding: var(--section) 0; border-top: 1px solid var(--hairline); }
.final-cta-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6) var(--s-8); align-items: start; } /* N-W8 */
.final-cta h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; color: var(--heading); max-width: 14ch; }
.final-cta p { color: var(--muted); margin-bottom: var(--s-5); }

/* ═══ FOOTER ═══ */
.footer { border-top: 1px solid var(--border); padding: var(--s-8) 0 var(--s-6); background: var(--bg-raised); }
/* Asymmetric: wide brand block + narrow link columns (DESIGN.md §11) */
.footer-grid { display: grid; grid-template-columns: 4fr 2fr 3fr 2fr 3fr; gap: var(--s-7); margin-bottom: var(--s-7); }

.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; color: var(--heading); margin-bottom: var(--s-3); }
.footer-logo img { border-radius: 6px; }
.footer-desc { color: var(--muted); font-size: 0.875rem; margin-bottom: var(--s-4); line-height: 1.65; max-width: 34ch; }
.footer-soon-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.footer-col h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--heading);
  margin-bottom: var(--s-2);
}
.footer-col a { display: flex; align-items: center; min-height: 40px; font-size: 0.875rem; color: var(--muted); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--heading); }

.footer-bottom { border-top: 1px solid var(--border); padding-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.footer-bottom p { font-size: 0.8125rem; color: var(--muted); line-height: 1.6; }
.footer-disclaimer { max-width: 80ch; }

/* ═══ AUTH SPLIT (Clerk/Linear structure, our tokens) ═══ */
.auth-split {
  display: grid;
  grid-template-columns: 45fr 55fr;
  min-height: 100vh;
  padding-top: 64px; /* fixed nav clearance */
}
.auth-side {
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-7) var(--s-6);
}
.auth-side-inner { max-width: 440px; width: 100%; display: flex; flex-direction: column; gap: var(--s-5); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; color: var(--heading); }
.auth-brand img { border-radius: 7px; }
.auth-value { color: var(--muted); line-height: 1.65; font-size: 0.98rem; }
.auth-mock { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.auth-mock .hero-screen { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.auth-mock .hero-sub-stack { margin-bottom: 8px; }
.auth-platforms { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: 0.88rem; color: var(--text); }
.auth-platforms .ap-item { display: inline-flex; align-items: center; gap: 8px; }
.auth-platforms .ap-note { color: var(--muted); font-size: 0.8rem; margin-left: -2px; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: var(--s-7) clamp(16px, 4vw, 24px) var(--s-8); }
.auth-main-inner { width: 100%; max-width: 400px; }
.auth-logo-mobile { display: none; align-items: center; justify-content: center; gap: 10px; font-weight: 600; color: var(--heading); margin-bottom: var(--s-5); }
.auth-logo-mobile img { border-radius: 7px; }
.auth-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}

@media (max-width: 960px) {
  .auth-split { grid-template-columns: 1fr; padding-top: 96px; min-height: 0; }
  .auth-side { display: none; }
  .auth-logo-mobile { display: none; }
}
@media (max-width: 480px) {
  .auth-card { padding: var(--s-5); }
}

/* ═══ AUTH & ACCOUNT ═══ */
.page-narrow {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  padding: clamp(112px, 14vh, 144px) 0 var(--s-9);
}
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.panel + .panel { margin-top: var(--s-4); }
.panel-title-sm { font-size: 1.125rem !important; }
.panel-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; color: var(--heading); margin-bottom: 6px; }
.panel-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: var(--s-5); }

.form-stack { display: flex; flex-direction: column; gap: var(--s-3); }
.form-field label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  color: var(--heading);
  font-size: 1rem; /* >=16px prevents iOS Safari from zooming on focus */
  font-family: inherit;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: #8a8b8c; }
/* Outline is never suppressed — the global :focus-visible ring stays */
.input:focus { border-color: rgba(255, 255, 255, 0.35); background: rgba(255,255,255,0.06); }
.input[aria-invalid="true"] { border-color: rgba(255, 97, 97, 0.6); }
.field-hint { display: block; font-size: 0.8125rem; color: var(--muted); margin-top: 6px; }
.field-hint[hidden] { display: none; }
.label-opt { font-weight: 400; color: var(--muted); }

.form-error {
  display: none;
  color: var(--error);
  background: var(--error-soft);
  border: 1px solid rgba(255, 97, 97, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
}
.form-error.visible { display: block; }

.form-switch { text-align: center; font-size: 0.88rem; color: var(--muted); margin-top: var(--s-4); }
.form-switch a { display: inline-block; padding: 10px 4px; color: var(--heading); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.form-switch a:hover { text-decoration-color: rgba(255,255,255,0.5); }
.form-switch a[aria-disabled="true"] { color: var(--faint); pointer-events: none; cursor: default; }

.google-signin-wrap { display: flex; justify-content: center; margin-bottom: var(--s-4); min-height: 44px; }
.google-signin-wrap > div { width: 100%; }
/* GIS renders in an iframe; with the page in color-scheme:dark Chrome paints
   an opaque white backdrop behind a light-scheme iframe. Matching the
   scheme on the frame keeps it transparent around the pill. */
.google-signin-wrap iframe { color-scheme: light; }
.btn-google-disabled {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: default;
}
.or-divider {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: var(--s-4) 0;
}
.or-divider::before, .or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-upgrade-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--blue-soft);
  border: 1px solid rgba(87, 193, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--blue);
  margin-bottom: var(--s-4);
}

/* account */
.account-wrap { width: 100%; max-width: 640px; }
.page-head { margin-bottom: var(--s-6); }
.page-head h1 { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--heading); margin-bottom: 6px; }
.page-head p { color: var(--muted); }
.account-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.account-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.25rem; color: var(--heading);
  flex-shrink: 0;
}
.account-id { min-width: 0; }
.account-name { font-size: 1.15rem; font-weight: 600; color: var(--heading); overflow-wrap: anywhere; }
.account-email { font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-left: auto;
  flex-shrink: 0;
}
/* Status-chip system (§3): 15%-alpha soft ground + full-color text, no border */
.plan-badge-free { background: rgba(255,255,255,0.08); color: var(--text); }
.plan-badge-pro { background: var(--green-soft); color: var(--green); }

.usage-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; margin-bottom: var(--s-2); }
.usage-row .usage-val { color: var(--heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.usage-bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: var(--radius-full); overflow: hidden; }
/* Animated with transform, not width (DESIGN.md §11) */
.usage-bar-fill { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: var(--green); border-radius: var(--radius-full); transition: transform 0.6s var(--ease); }
.usage-hint { font-size: 0.78rem; color: var(--muted); margin-top: var(--s-2); }

/* usage history (account) */
.history-list { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-4); }
/* Row anatomy per DESIGN.md §5: 6px/10px padding, 6px radius, active tone */
.history-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 44px;
  align-items: center;
  gap: var(--s-3);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.history-row:hover { background: var(--bg-card-hover); }
.history-date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-track {
  position: relative;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.history-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  min-width: 2px;
  background: var(--green);
  border-radius: var(--radius-full);
}
.history-limit { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--warn); }
.history-count { text-align: right; color: var(--heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.history-note { font-size: 0.82rem; color: var(--muted); margin-top: var(--s-3); }

.upgrade-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-4); }
.upgrade-option {
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--s-4);
  text-align: center;
  background: rgba(255,255,255,0.02);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.upgrade-option:hover { border-color: rgba(255,255,255,0.32); background: var(--bg-card-hover); }
.upgrade-option:active { transform: translateY(1px); }
.uo-unit { font-size: 0.8125rem; font-weight: 500; color: var(--muted); }
.upgrade-option .uo-interval { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.upgrade-option .uo-price { font-size: 1.5rem; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.upgrade-option .uo-note { font-size: 0.75rem; color: var(--muted); }
.upgrade-option .uo-save { color: var(--green); font-weight: 600; }

/* vocabulary panel */
.vocab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); }
.vocab-filter { margin: var(--s-4) 0 var(--s-2); }
.vocab-list { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-2); }
.vocab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  padding: 6px 10px;
  border-radius: 6px;
}
.vocab-row:hover { background: var(--bg-card-hover); }
.vocab-main { min-width: 0; }
.vocab-main strong { display: block; color: var(--heading); font-weight: 500; font-size: 0.92rem; overflow-wrap: anywhere; }
.vocab-main span { display: block; color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.vocab-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.vocab-type { font-size: 0.68rem; font-weight: 500; padding: 2px 8px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.vocab-date { color: var(--muted); font-size: 0.74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vocab-note { font-size: 0.86rem; color: var(--muted); padding: var(--s-3) 0 0; }
.vocab-skel { margin-top: var(--s-2); }

/* account settings forms */
.settings-msg { display: none; font-size: 0.86rem; }
.settings-msg.visible { display: block; }
.settings-msg.ok { color: var(--green); }
.settings-msg.err { color: var(--error); }
.settings-divider { border: 0; border-top: 1px solid var(--border); margin: var(--s-5) 0; }
.settings-google-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.settings-google-note svg { flex-shrink: 0; margin-top: 2px; }

.banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.9rem;
  margin-bottom: var(--s-5);
}
.banner-success { background: var(--green-soft); border: 1px solid rgba(89, 212, 153, 0.35); color: var(--green); }
.banner-info { background: var(--blue-soft); border: 1px solid rgba(87, 193, 255, 0.3); color: var(--blue); }
.banner svg { flex-shrink: 0; margin-top: 2px; }

.account-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; }

.loading-state { color: var(--muted); font-size: 0.95rem; }

/* ═══ SKELETONS (content-shaped loading, no spinners — DESIGN.md §11) ═══ */
.skel-block {
  display: inline-block;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  animation: skelPulse 1.6s ease-in-out infinite;
}
.skel-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  animation: skelPulse 1.6s ease-in-out infinite;
}
.skel-head { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.skel-head .skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skel-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 9px 0; }
@keyframes skelPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ═══ LEGAL PAGES ═══ */
.legal { padding: clamp(120px, 16vh, 170px) 0 var(--s-9); }
.legal h1 { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; color: var(--heading); margin-bottom: var(--s-2); }
.legal-updated { font-size: 0.875rem; color: var(--muted); margin-bottom: var(--s-6); }
.legal .container { max-width: 760px; }
.legal h2 { font-size: 1.25rem; font-weight: 600; color: var(--heading); margin: var(--s-7) 0 var(--s-3); padding-top: var(--s-6); border-top: 1px solid var(--hairline); letter-spacing: -0.01em; }
.legal h3 { font-size: 1.02rem; font-weight: 600; color: var(--heading); margin: var(--s-5) 0 var(--s-2); }
.legal p { color: var(--text); margin-bottom: var(--s-4); line-height: 1.75; font-size: 1rem; max-width: 68ch; }
.legal strong { color: var(--text); }
.legal ul { color: var(--text); margin: 0 0 var(--s-4) 20px; line-height: 1.75; font-size: 1rem; max-width: 66ch; }
.legal ul li { margin-bottom: var(--s-2); }
.legal strong { color: var(--heading); font-weight: 500; }
.legal a { color: var(--heading); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; padding: 4px 0; }
.legal a:hover { text-decoration-color: rgba(255,255,255,0.5); }
.legal-toc { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-6); }
.legal .legal-toc-title { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); margin: 0 0 var(--s-2); padding: 0; border: none; }
.legal-toc ol { columns: 2; column-gap: var(--s-6); margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.875rem; }
.legal-toc li { break-inside: avoid; }
.legal .legal-toc a { display: inline-block; padding: 5px 0; color: var(--text); text-decoration: none; }
.legal .legal-toc a:hover { color: var(--heading); text-decoration: underline; }
@media (max-width: 560px) { .legal-toc ol { columns: 1; } }
.legal-summary { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s-5) var(--s-5) var(--s-2); margin: var(--s-5) 0; }
.legal-summary h2 { margin-top: 0; padding-top: 0; border-top: none; }

/* ═══ 404 ═══ */
.error-page { min-height: 72vh; display: flex; align-items: center; padding: 128px 0 var(--s-9); }
.error-page .container { width: 100%; }
.error-code { font-size: 0.875rem; font-weight: 500; color: var(--muted); margin-bottom: var(--s-3); font-variant-numeric: tabular-nums; }
.error-title { font-size: var(--fs-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--heading); margin-bottom: var(--s-3); }
.error-lede { color: var(--muted); margin-bottom: var(--s-6); max-width: 46ch; }
.error-links { list-style: none; margin-top: var(--s-7); border-top: 1px solid var(--border); max-width: 520px; }
.error-links a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--border); color: var(--text); transition: color var(--t-fast); }
.error-links a span { color: var(--muted); font-size: 0.875rem; }
.error-links a:hover { color: var(--heading); }

/* ═══ REVEAL — hero mock only (§11: scroll-reveal restricted) ═══ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.reveal.revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
  .loop { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .loop-step { grid-column: span 2; }
  .loop-step:nth-child(4), .loop-step:nth-child(5) { grid-column: span 3; }
  .loop-step + .loop-step { border-left: none; }
  .loop-step:nth-child(2), .loop-step:nth-child(3), .loop-step:nth-child(5) { border-left: 1px solid var(--border); }
  .loop-step:nth-child(n+4) { border-top: 1px solid var(--border); }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); }
  .footer-brand { grid-column: 1 / -1; }
  .hero-stage { grid-template-columns: minmax(0, 1fr) 240px; }
  .details-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-aside { grid-column: 1 / -1; padding: var(--s-4) 0 0; }
  .pricing-aside dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-5); }
}

@media (max-width: 900px) {
  .hero-head, .section-head, .final-cta-inner { grid-template-columns: 1fr; align-items: start; }
  .hero-title { max-width: 14ch; }
  .hero-proof { grid-template-columns: 1fr; }
  .hero-proof li + li { padding-left: 0; border-left: none; }
  .hero-proof li { padding: 12px 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; column-gap: 8px; }
  .hero-stage { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .feature-row, .feature-reverse { grid-template-columns: 1fr; gap: var(--s-6); }
  .feature-reverse .feature-text { order: 1; }
  .feature-reverse .feature-visual { order: 2; }
  .shots-grid { grid-template-columns: 1fr; max-width: 600px; }
  .platform-strip { grid-template-columns: 1fr; }
  .platform-cell, .platform-cell + .platform-cell { padding: var(--s-4) 0; border-left: none; }
  .platform-cell + .platform-cell { border-top: 1px solid var(--border); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 560px; }
  .pricing-aside { padding: var(--s-4) 0 0; }
  .pricing-aside dl { display: block; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}

@media (max-width: 768px) {
  .nav-container { grid-template-columns: 1fr auto; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 8px clamp(16px, 4vw, 24px) 24px;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  body.no-scroll .nav { background: var(--bg); border-bottom-color: var(--border); transform: none; }
  .nav-link { font-size: 1.25rem; color: var(--heading); min-height: 56px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--border); }
  .nav-link:hover { background: none; }
  .nav-link-mobile-auth { display: flex; }
  .nav-hamburger { display: flex; z-index: 1001; position: relative; }
  .nav-actions .btn { display: none; }

  .loop { grid-template-columns: 1fr; }
  .loop-step, .loop-step:nth-child(4), .loop-step:nth-child(5) { grid-column: auto; }
  .loop-step:nth-child(n) { border-left: none; }
  .loop-step + .loop-step { border-top: 1px solid var(--border); }
  .loop-step { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s-4); row-gap: 4px; padding: var(--s-4) var(--s-4); }
  .loop-num { grid-row: 1 / span 2; margin: 0; }
  .loop-step h3, .loop-step p, .loop-art { grid-column: 2; }
  .loop-art { margin-top: var(--s-2); padding-top: 0; border-top: none; min-height: 0; }

  .hero-dict-popup { right: 12px; bottom: auto; top: 52px; min-width: 0; padding: 8px 12px; }
  .hero-dict-meaning { font-size: 0.75rem; }
  .hero-instant-chip { top: 12px; left: 12px; }
  .hero-screen { padding: 16px 12px 12px; aspect-ratio: 1 / 1; }
  .hero-dict-kind { display: none; }

  .comparison-swipe-hint { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: var(--s-3); }
}

@media (max-width: 560px) {
  .details-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .demo-card { padding: var(--s-5); }
  .demo-scene { padding-top: var(--s-7); }
  .pricing-card { padding: var(--s-5); }
  .pricing-toggle { display: flex; }
  .pt-opt { flex: 1; justify-content: center; padding: 0 10px; }
  .upgrade-options { grid-template-columns: 1fr; }
  .account-head { flex-wrap: wrap; }
  .plan-badge { margin-left: 0; }
  .hero-ext-pin span { display: none; }
  .panel { padding: var(--s-5); }
}

/* ═══ WAITLIST (pre-launch primary CTA — UX-AUDIT-v5 W1/W6) ═══ */
.waitlist {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--s-2);
  width: 100%; max-width: 520px;
}
.waitlist-input { flex: 1 1 220px; min-height: 52px; border-radius: var(--radius-full); padding: 0 20px; font-size: 16px; }
.waitlist-btn { flex: 0 0 auto; max-width: 100%; white-space: normal; text-align: center; } /* long translations wrap instead of widening the page */
.waitlist .wl-mob { display: none; }
.waitlist-msg { flex-basis: 100%; min-height: 0; font-size: 0.875rem; color: var(--muted); }
.waitlist-msg:empty { display: none; }
.waitlist-msg.ok { color: var(--green); }
.waitlist-msg.err { color: var(--error); }
.waitlist.is-done .waitlist-input, .waitlist.is-done .waitlist-btn { display: none; }
@media (max-width: 768px) {
  .waitlist .wl-desk { display: none; }
  .waitlist .wl-mob { display: inline; }
  .waitlist-input, .waitlist-btn { flex-basis: 100%; width: 100%; }
}

/* ═══ PLATFORM COLUMNS — each platform with its own visual (W2) ═══ */
/* Subgrid rows: heading, copy and visual line up across the three columns
   whatever each paragraph's length (the visuals share one top edge). */
.platform-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: var(--s-5); row-gap: 0; margin-bottom: var(--s-7); }
.platform-col { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: var(--s-3); min-width: 0; border-top: 1px solid var(--border); padding-top: var(--s-5); }
.platform-col > p { font-size: 0.9375rem; color: var(--muted); line-height: 1.55; margin-bottom: var(--s-2); }
.platform-col .shot-card { align-self: stretch; display: flex; flex-direction: column; }
.platform-col .shot-card figcaption { flex: 1; }
@media (max-width: 900px) {
  .platform-cols { grid-template-columns: 1fr; grid-template-rows: none; row-gap: var(--s-6); max-width: 600px; }
  .platform-col { grid-template-rows: auto; grid-row: auto; }
}

/* ═══ ROUND 6 — hero fold + mobile menu (UX-AUDIT-v6 N-W2/N-W8/N-W9) ═══ */
/* Cinematic frame on wide screens so the two subtitle lines sit above the fold at 1440×900 */
@media (min-width: 901px) {
  .hero-stage .hero-screen { aspect-ratio: 21 / 10; }
}
/* Mobile menu's primary task: the launch-day email (hidden on desktop) */
.nav-menu-cta { display: none; }
@media (max-width: 768px) {
  .nav-links .nav-menu-cta { display: inline-flex; margin-top: var(--s-5); width: 100%; justify-content: center; min-height: 52px; }
  .hero { padding-top: 96px; }
  .hero-head { margin-bottom: var(--s-6); }
  .hero-subtitle { font-size: 1.0625rem; margin-bottom: var(--s-4); }
  .hero-note { margin-top: var(--s-3); }
  /* shorter frame on phones so both subtitle lines reach the first screen */
  .hero-stage .hero-screen { aspect-ratio: 16 / 9; padding-top: 12px; }
  .hero-stage .hero-sub-stack { margin-bottom: 12px; }
}
@media (max-width: 480px) {
  .hero-stage .hero-screen { aspect-ratio: 4 / 3; }
  /* popup tucks into the top-right corner, clear of the two subtitle lines */
  .hero-stage .hero-dict-popup { top: 12px; right: 12px; padding: 6px 10px; gap: 0; }
  .hero-stage .hero-dict-save { margin-top: 4px; }
}

/* ═══ GUIDE PAGES (netflix-dual-subtitles, youtube-dual-subtitles, learn-language-with-netflix) ═══
   Long-form reading column on the surface ladder: hairline-separated H2s,
   numbered steps (sequential content — §11 allows numbers here), the shared
   FAQ accordion and hairline link rows. No new colours, no shadows. */
.guide { padding: clamp(120px, 16vh, 170px) 0 var(--s-9); }
.guide .container { max-width: 760px; }
.guide-crumbs { font-size: 13px; color: var(--muted); margin-bottom: var(--s-4); letter-spacing: 0.02em; }
.guide-crumbs a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.guide-crumbs a:hover { color: var(--heading); }
.guide h1 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; color: var(--heading); margin-bottom: var(--s-4); }
.guide-lede { font-size: 1.125rem; color: var(--text); line-height: 1.65; max-width: 62ch; margin-bottom: var(--s-5); }
.guide-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-2); }
.guide-cta-note { font-size: 0.875rem; color: var(--muted); }
.guide h2 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.015em; color: var(--heading); margin: var(--s-7) 0 var(--s-3); padding-top: var(--s-6); border-top: 1px solid var(--hairline); }
.guide h3 { font-size: 1.0625rem; font-weight: 600; color: var(--heading); margin: var(--s-5) 0 var(--s-2); }
.guide p { color: var(--text); line-height: 1.75; margin-bottom: var(--s-4); max-width: 68ch; }
.guide p a, .guide li a, .guide dd a { color: var(--heading); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.guide p a:hover, .guide li a:hover, .guide dd a:hover { text-decoration-color: rgba(255,255,255,0.5); }
.guide ul.guide-list { margin: 0 0 var(--s-4) 20px; color: var(--text); line-height: 1.75; max-width: 66ch; }
.guide ul.guide-list li { margin-bottom: var(--s-2); }
.guide strong { color: var(--heading); font-weight: 500; }
.guide-steps { list-style: none; counter-reset: gstep; margin: var(--s-4) 0 var(--s-5); border-top: 1px solid var(--border); }
.guide-steps li { counter-increment: gstep; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); color: var(--text); line-height: 1.65; }
.guide-steps li::before { content: counter(gstep); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 6px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, #121212, #0d0d0d); font-size: 13px; font-weight: 500; color: var(--heading); font-variant-numeric: tabular-nums; }
.guide-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); margin: var(--s-4) 0 var(--s-4); }
.guide-plans > div { padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.guide-plans dt { color: var(--heading); font-weight: 500; font-size: 0.9375rem; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.guide-plans dd { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.guide-note { font-size: 0.9375rem; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); margin: var(--s-4) 0; background: var(--bg-raised); max-width: 68ch; }
.guide .faq-list { margin-top: var(--s-3); }
.guide .faq-answer p { margin-bottom: 0; }
.guide-related h2 { font-size: 1rem; }
.guide-related ul { list-style: none; border-top: 1px solid var(--border); }
.guide-related a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--border); color: var(--text); transition: color var(--t-fast); }
.guide-related a:hover { color: var(--heading); }
.guide-related a svg { color: var(--muted); transition: transform var(--t-fast); }
.guide-related a:hover svg { transform: translateX(3px); }
.guide-end { margin-top: var(--s-7); padding: var(--s-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.guide-end h2 { margin: 0 0 var(--s-2); padding: 0; border: 0; }
.guide-end p { color: var(--muted); }
@media (max-width: 560px) { .guide-plans { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .guide-related a svg { transition: none; } }

/* Home page: links to the guides (hairline rows, under the platform details) */
.home-guides { margin-top: clamp(40px, 5vw, 64px); }
.home-guides h3 { font-size: 0.9375rem; font-weight: 500; color: var(--heading); margin-bottom: var(--s-3); }
.home-guides ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-6); }
.home-guides a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); min-height: 52px; border-top: 1px solid var(--border); color: var(--text); transition: color var(--t-fast); }
.home-guides a:hover { color: var(--heading); }
.home-guides a svg { color: var(--muted); flex-shrink: 0; transition: transform var(--t-fast); }
.home-guides a:hover svg { transform: translateX(3px); }
@media (max-width: 768px) { .home-guides ul { grid-template-columns: 1fr; } }

/* Home: "What is SubPair?" quick answers (hairline columns, like .details-list) */
.quick-answers-section .section-head { align-items: start; }
.quick-answers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-6); }
.quick-answers > div { padding: var(--s-4) 0; border-top: 1px solid var(--border); }
.quick-answers h3 { color: var(--heading); font-weight: 500; font-size: 1rem; line-height: 1.4; margin-bottom: var(--s-2); }
.quick-answers p { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.quick-answers a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; white-space: nowrap; }
.quick-answers a:hover { color: var(--heading); }
@media (max-width: 900px) { .quick-answers { grid-template-columns: 1fr; } }
/* Guide pages: the same definition, near the top */
.guide-figure { margin: var(--s-6) 0 var(--s-2); }
.guide-answer { margin: var(--s-6) 0 0; padding: var(--s-4) var(--s-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-raised); }
.guide .guide-answer h2 { font-size: 1rem; margin: 0 0 var(--s-2); padding: 0; border: 0; }
.guide .guide-answer p { color: var(--muted); font-size: 0.9375rem; margin: 0; }
