/* ==========================================================================
   Clevolo website: one stylesheet for every page.

   1. Tokens (colors, fonts, sizes): change the brand here
   2. Base
   3. Layout
   4. Header and footer
   5. Components (buttons, badges, cards, chips …)
   6. Page sections
   7. WordWallet
   8. Vocabulary test
   9. Long text pages (privacy, terms, support)
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
  /* Clevolo: deep navy ink, warm paper, a gold spark */
  --ink: #1E2B3C;
  --ink-2: #33465E;
  --gold: #FBBF24;
  --gold-deep: #B7791F;
  --paper: #FFFBF2;

  /* Surfaces and text */
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --surface-2: #F3F1EA;
  --text: #1E2B3C;
  --muted: #5B6778;
  --line: rgba(30, 43, 60, 0.12);
  --shadow: 0 1px 2px rgba(30, 43, 60, .06), 0 12px 32px -12px rgba(30, 43, 60, .18);
  --shadow-lg: 0 2px 4px rgba(30, 43, 60, .06), 0 30px 60px -20px rgba(30, 43, 60, .30);

  /* Buttons */
  --btn-bg: #1E2B3C;
  --btn-text: #FFFFFF;

  /* WordWallet (the same colors as in the app's Brand.swift) */
  --ww-green: #34D399;
  --ww-deep: #059669;
  --ww-mint: #C9F7E2;
  --ww-ink: #1E2B3C;

  /* Fonts: Apple's own on Apple devices, rounded headings like the apps */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 24px;
  --radius-sm: 14px;
  --max: 1120px;
  --gutter: 24px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E141C;
    --surface: #161F2B;
    --surface-2: #1D2836;
    --text: #F3F1EA;
    --muted: #9AA6B5;
    --line: rgba(243, 241, 234, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 30px 60px -20px rgba(0, 0, 0, .7);
    --btn-bg: #FFFBF2;
    --btn-text: #1E2B3C;
  }
}

/* 2. Base ------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-round);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
p  { margin: 0 0 1em; text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 3. Layout ----------------------------------------------------------------- */

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 760px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: clamp(40px, 6vw, 64px) 0; }
.section-alt { background: var(--surface-2); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--muted); line-height: 1.55; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

@media (max-width: 640px) { :root { --gutter: 16px; } body { font-size: 16px; } }

/* 4. Header and footer -------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo-word {
  font-family: var(--font-round); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted);
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .btn { margin-left: 8px; }

/* The menu on phones: a plain <details>, no script */
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); font-weight: 600; font-size: .95rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--surface-2); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 8px; display: grid;
}
.menu-panel a { padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 500; }
.menu-panel a:hover { background: var(--surface-2); }

@media (max-width: 760px) { .nav { display: none; } .menu { display: block; } }

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 {
  font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid ul a { text-decoration: none; color: var(--text); }
.footer-grid ul a:hover { text-decoration: underline; }
.footer-brand p { color: var(--muted); max-width: 300px; margin-top: 14px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* 5. Components --------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-text);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-green { background: var(--ww-ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* App Store button. Until the app is live it says "Coming soon".
   At launch, swap it for Apple's official badge (see README). */
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  border-radius: 12px; padding: 8px 18px 9px 14px; min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: grid; line-height: 1.1; text-align: left; }
.store-badge small { font-size: .7rem; letter-spacing: .02em; opacity: .85; }
.store-badge strong { font-family: var(--font); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.store-badge[aria-disabled="true"] { cursor: default; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill-gold { background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--text); border-color: transparent; }
.pill-green { background: var(--ww-mint); color: #065F46; border-color: transparent; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }

.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 1.5rem; margin-bottom: 18px;
}

.app-icon {
  border-radius: 22.37%; /* Apple's app icon corner */
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 24px -8px rgba(0,0,0,.25);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 500; font-size: .95rem;
}
.chip small { color: var(--muted); margin-left: 6px; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: color-mix(in srgb, var(--gold) 30%, transparent); color: var(--text); margin-top: 2px;
}

/* 6. Page sections --------------------------------------------------------------- */

/* Home hero */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 .spark { position: relative; white-space: nowrap; }
.hero h1 .spark::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .22em; z-index: -1;
  background: var(--gold); opacity: .55; border-radius: 4px;
}
.hero .lead { max-width: 560px; margin-bottom: 32px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* "Our home screen": a grid of app icons */
.homescreen {
  position: relative; justify-self: center; width: min(100%, 420px); aspect-ratio: 1 / 1.05;
  border-radius: 44px; padding: 34px;
  background:
    radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--gold) 38%, transparent), transparent 60%),
    radial-gradient(120% 90% at 90% 100%, color-mix(in srgb, var(--ww-green) 40%, transparent), transparent 60%),
    var(--ink);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min-content; gap: 26px 22px;
  align-content: start;
}
.homescreen .slot { display: grid; justify-items: center; gap: 8px; text-decoration: none; color: #fff; min-width: 0; }
.homescreen .slot img, .homescreen .slot .ghost { width: 100%; height: auto; aspect-ratio: 1; }
.homescreen .slot span { font-size: .78rem; font-weight: 500; color: rgba(255,255,255,.9); }
.homescreen .ghost {
  border-radius: 22.37%; border: 2px dashed rgba(255, 251, 242, .28);
  display: grid; place-items: center; color: rgba(255, 251, 242, .45); font-size: 1.6rem; font-weight: 300;
}
.homescreen .slot.dim span { color: rgba(255,255,255,.45); }
.homescreen-dock {
  position: absolute; left: 22px; right: 22px; bottom: 22px; height: 76px; border-radius: 28px;
  background: rgba(255, 251, 242, .12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: rgba(255,251,242,.8); font-size: .85rem; font-weight: 500;
}
.homescreen-dock svg { width: 22px; height: 22px; }

/* Featured app row (home and apps) */
.app-feature {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
  padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.app-feature img { width: 120px; height: 120px; }
.app-feature h3 { font-size: 1.7rem; margin-bottom: .2em; }
.app-feature p { color: var(--muted); margin-bottom: 12px; }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.app-feature .actions { display: grid; gap: 10px; justify-items: end; }
@media (max-width: 860px) {
  .app-feature { grid-template-columns: 1fr; text-align: left; }
  .app-feature .actions { justify-items: start; }
}

.app-tile-soon {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: 28px 32px; border-radius: 32px; border: 2px dashed var(--line); color: var(--muted);
}
.app-tile-soon .ghost-icon {
  width: 72px; height: 72px; border-radius: 22.37%; border: 2px dashed var(--line);
  display: grid; place-items: center; font-size: 1.6rem;
}
.app-tile-soon h3 { color: var(--text); margin-bottom: .2em; }
.app-tile-soon p { margin: 0; }

/* Principles */
.principle { padding: 0; }
.principle .num {
  font-family: var(--font-round); font-weight: 800; font-size: .9rem; color: var(--gold-deep);
  margin-bottom: 10px; display: block;
}
@media (prefers-color-scheme: dark) { .principle .num { color: var(--gold); } }
.principle p { color: var(--muted); }

/* Banner: the vocabulary test, contact */
.banner {
  border-radius: 36px; padding: clamp(32px, 6vw, 64px);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
  background: var(--ink); color: #FFFBF2; position: relative; overflow: hidden;
}
.banner::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 55%, transparent), transparent 65%);
  pointer-events: none;
}
.banner h2 { color: #FFFBF2; }
.banner p { color: rgba(255, 251, 242, .75); }
.banner .btn { background: #FFFBF2; color: var(--ink); }
.banner .btn-ghost { background: transparent; color: #FFFBF2; border-color: rgba(255,251,242,.3); }
@media (max-width: 860px) { .banner { grid-template-columns: 1fr; } }

.big-number {
  font-family: var(--font-round); font-weight: 800; font-size: clamp(3.4rem, 8vw, 5.4rem);
  letter-spacing: -0.04em; line-height: 1; position: relative; z-index: 1;
}
.big-number small { display: block; font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: .7; margin-top: 10px; }

/* Page header for inner pages */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.page-head .lead { max-width: 640px; }
.breadcrumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }

/* Contact */
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.contact-card a.mail { font-family: var(--font-round); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.6rem); text-decoration: none; }
.contact-card a.mail:hover { text-decoration: underline; }

/* Brand page */
.swatch { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.swatch .color { height: 120px; }
.swatch .info { padding: 14px 16px; font-size: .9rem; }
.swatch .info strong { display: block; }
.swatch .info code { color: var(--muted); font-family: var(--font-mono); font-size: .82rem; }
.logo-stage {
  border-radius: var(--radius); border: 1px solid var(--line); padding: 48px; display: grid; place-items: center; min-height: 220px;
}
.logo-stage.light { background: #FBFAF6; color: #1E2B3C; }
.logo-stage.dark { background: #0E141C; color: #F3F1EA; }
.logo-stage.gold { background: #FBBF24; color: #1E2B3C; }
.logo-stage .logo-word { font-size: 2.6rem; }
.logo-stage .logo svg { width: 64px; height: 64px; }
.type-sample { padding: 28px; }
.type-sample .sample-display { font-family: var(--font-round); font-weight: 800; font-size: 3rem; letter-spacing: -0.03em; line-height: 1.05; }
.type-sample .sample-body { font-family: var(--font); font-size: 1.1rem; }
.do-dont { display: grid; gap: 10px; }
.do-dont p { margin: 0; color: var(--text); }

/* 404 */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found .code { font-family: var(--font-round); font-weight: 800; font-size: clamp(5rem, 16vw, 9rem); letter-spacing: -0.05em; line-height: 1; }

/* 7. WordWallet ----------------------------------------------------------------- */

.ww-hero {
  background:
    radial-gradient(80% 60% at 85% 20%, rgba(255,255,255,.35), transparent 60%),
    var(--ww-green);
  color: var(--ww-ink);
  padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  overflow: hidden;
}
.ww-hero .breadcrumbs, .ww-hero .breadcrumbs a { color: rgba(30, 43, 60, .7); }
.ww-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ww-hero .app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.ww-hero .app-id img { width: 72px; height: 72px; }
.ww-hero .app-id strong { font-family: var(--font-round); font-size: 1.4rem; font-weight: 800; display: block; line-height: 1.1; }
.ww-hero .app-id span { font-size: .95rem; opacity: .75; }
.ww-hero h1 { color: var(--ww-ink); }
.ww-hero .lead { color: rgba(30, 43, 60, .78); max-width: 520px; margin-bottom: 30px; }
.ww-hero .platforms { margin-top: 18px; font-size: .92rem; color: rgba(30, 43, 60, .75); }
.ww-hero .btn-ghost { color: var(--ww-ink); border-color: rgba(30,43,60,.25); }
.ww-hero .btn-ghost:hover { background: rgba(255,255,255,.35); }
@media (max-width: 900px) { .ww-hero-grid { grid-template-columns: 1fr; } }

/* The word card, drawn like the app's card */
.card-stack { position: relative; justify-self: center; width: min(100%, 440px); padding: 28px 10px 10px; }
.card-stack .back {
  position: absolute; inset: 10px 30px 40px 20px; border-radius: 28px; background: var(--ww-mint);
  border: 2px solid var(--ww-ink); transform: rotate(-6deg);
}
.word-card {
  position: relative; background: #FFFFFF; color: #1E2B3C; border-radius: 28px; padding: 26px 26px 0;
  border: 2px solid var(--ww-ink); box-shadow: 0 30px 60px -24px rgba(6, 78, 59, .55);
  transform: rotate(1.5deg); font-size: 15px; line-height: 1.45;
}
.word-card .w-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.word-card .w-word { font-size: 1.55rem; font-weight: 800; font-family: var(--font); letter-spacing: -0.01em; }
.word-card .w-ipa { color: #6B7280; font-size: .95rem; }
.word-card .w-say { margin-left: auto; font-size: 1.1rem; }
.word-card .w-tr { font-weight: 700; margin: 2px 0 8px; }
.word-card .w-def { color: #374151; margin-bottom: 14px; }
.word-card .w-title { font-weight: 700; margin: 12px 0 6px; }
.word-card ol, .word-card ul { margin: 0; padding-left: 20px; }
.word-card li { margin-bottom: 6px; }
.word-card li b { display: block; }
.word-card li span { color: #4B5563; }
.word-card .w-nuance { background: #F0FDF7; border-radius: 12px; padding: 10px 12px; margin: 14px 0 0; color: #1F2937; }
.word-card .w-foot {
  display: flex; justify-content: space-between; align-items: center; margin: 18px -26px 0; padding: 14px 26px;
  border-top: 1px solid #E5E7EB; font-size: .9rem; color: #6B7280; font-weight: 600;
}
.word-card .w-foot .to-learn { color: var(--ww-deep); }
.card-caption { text-align: center; font-size: .85rem; color: rgba(30,43,60,.7); margin-top: 22px; }

/* Steps: Add → Review → Learned */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .step-icon {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.8rem;
  background: var(--ww-mint); margin-bottom: 18px;
}
@media (prefers-color-scheme: dark) { .step .step-icon { background: color-mix(in srgb, var(--ww-green) 22%, transparent); } }
.step p { color: var(--muted); }

.feature-card .icon-tile { background: var(--ww-mint); }
@media (prefers-color-scheme: dark) { .feature-card .icon-tile { background: color-mix(in srgb, var(--ww-green) 22%, transparent); } }

/* Review modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode {
  border-radius: var(--radius); padding: 24px; background: var(--surface); border: 1px solid var(--line);
}
.mode .mini {
  border-radius: 16px; border: 1.5px solid var(--line); padding: 16px; margin-bottom: 18px; min-height: 132px;
  background: var(--bg); font-size: .9rem;
}
.mode .mini b { font-size: 1.1rem; }
.mode .mini .blank { display: inline-block; width: 86px; border-bottom: 2px solid var(--ww-deep); }
.mode .mini .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.mode .mini .opts span { border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: .8rem; }
.mode .mini .opts span.ok { border-color: var(--ww-deep); color: var(--ww-deep); font-weight: 600; }
.mode .mini.flip { display: grid; place-items: center; text-align: center; }
.mode .mini.flip small { color: var(--muted); display: block; margin-top: 4px; }
.mode p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

/* Levels table */
.levels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.level {
  border-radius: 16px; padding: 14px 12px; background: var(--surface); border: 1px solid var(--line); text-align: center;
}
.level strong { display: block; font-family: var(--font-round); font-size: 1.25rem; }
.level span { font-size: .78rem; color: var(--muted); display: block; line-height: 1.3; }
@media (max-width: 900px) { .levels { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .levels { grid-template-columns: repeat(2, 1fr); } }

/* Privacy summary on app pages */
.privacy-strip {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 28px 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.privacy-strip .lock {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem;
  background: var(--surface-2);
}
.privacy-strip p { margin: 0; color: var(--muted); }
.privacy-strip h3 { margin-bottom: .25em; }
@media (max-width: 760px) { .privacy-strip { grid-template-columns: 1fr; } }

/* App page sub-navigation (Overview · Support · Privacy · Terms) */
.subnav { border-bottom: 1px solid var(--line); background: var(--bg); }
.subnav .container { display: flex; align-items: center; gap: 6px; overflow-x: auto; height: 56px; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav .app-mini { display: flex; align-items: center; gap: 10px; margin-right: auto; font-weight: 700; text-decoration: none; white-space: nowrap; }
.subnav .app-mini img { width: 28px; height: 28px; border-radius: 7px; }
.subnav a.tab {
  text-decoration: none; color: var(--muted); font-size: .92rem; padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.subnav a.tab:hover { background: var(--surface-2); color: var(--text); }
.subnav a.tab[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details {
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 0 22px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* 8. Vocabulary test ----------------------------------------------------------- */

.vt-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); }
.vt-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .vt-hero-grid { grid-template-columns: 1fr; } }
.vt-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 26px 0 32px; color: var(--muted); font-size: .95rem; }
.vt-facts span { display: inline-flex; align-items: center; gap: 8px; }
.vt-facts b { color: var(--text); }

/* The test window: one card that shows intro, a question or the result */
.vt-window {
  background: var(--surface); border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.vt-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted);
}
.vt-progress { height: 6px; background: var(--surface-2); }
.vt-progress i { display: block; height: 100%; width: 24%; background: var(--gold); border-radius: 0 6px 6px 0; }
.vt-body { padding: 32px; }
.vt-word {
  font-family: var(--font-round); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3rem); letter-spacing: -0.02em; text-align: center;
  margin: 8px 0 4px;
}
.vt-hint { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.vt-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vt-option {
  font: inherit; text-align: left; cursor: pointer; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: .98rem;
  transition: border-color .15s, background .15s;
}
.vt-option:hover { border-color: var(--text); }
.vt-option[aria-pressed="true"] { border-color: var(--text); background: color-mix(in srgb, var(--gold) 20%, var(--bg)); font-weight: 600; }
.vt-option .k { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); font-size: .75rem; font-weight: 700; margin-right: 10px; color: var(--muted); }
@media (max-width: 520px) { .vt-options { grid-template-columns: 1fr; } .vt-body { padding: 22px; } }
.vt-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.vt-skip { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }

.vt-intro { text-align: center; padding: 44px 32px; }
.vt-intro .big-emoji { font-size: 3rem; margin-bottom: 8px; }
.vt-intro ol { text-align: left; max-width: 420px; margin: 18px auto 26px; padding-left: 22px; color: var(--muted); }
.vt-intro ol li { margin-bottom: 6px; }

.vt-result { padding: 36px 32px; }
.vt-result .score { text-align: center; margin-bottom: 26px; }
.vt-result .score .num { font-family: var(--font-round); font-weight: 800; font-size: clamp(3.2rem, 9vw, 4.6rem); letter-spacing: -0.04em; line-height: 1; }
.vt-result .score .range { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.vt-result .score .lvl { margin-top: 14px; }

/* Bar chart: words known in each 2,000 of the most common */
.vt-chart { display: grid; grid-template-columns: repeat(20, 1fr); align-items: end; gap: 3px; height: 120px; margin: 8px 0 6px; }
.vt-chart i { display: block; background: var(--ink); border-radius: 3px 3px 0 0; min-height: 3px; }
@media (prefers-color-scheme: dark) { .vt-chart i { background: var(--text); } }
.vt-chart i.edge { background: var(--gold); }
.vt-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.vt-cta {
  margin-top: 26px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 18px; border-radius: 18px; background: var(--ww-mint); color: #064E3B;
}
.vt-cta img { width: 52px; height: 52px; border-radius: 12px; }
.vt-cta p { margin: 0; font-size: .95rem; }
.vt-cta a { color: #064E3B; font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .vt-cta { grid-template-columns: auto 1fr; } .vt-cta a { grid-column: 1 / -1; } }

.vt-states { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.vt-states button {
  font: inherit; font-size: .82rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); cursor: pointer;
}
.vt-states button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }
.design-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 8px; }

[hidden] { display: none !important; }

/* 9. Long text pages ------------------------------------------------------------ */

.prose { max-width: 720px; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose .updated { color: var(--muted); font-size: .95rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

.summary-box {
  border-radius: var(--radius); padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); margin: 8px 0 32px;
}
.summary-box h2 { font-size: 1.15rem; margin: 0 0 12px; }

.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 140px; font-size: .9rem; }
.toc strong { display: block; margin-bottom: 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } .toc { position: static; display: none; } }

/* 10. Extras ---------------------------------------------------------------------- */

a.card { display: block; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-dashed { border-style: dashed; background: transparent; }

kbd {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px;
  border-radius: 8px; border: 1px solid var(--line); border-bottom-width: 3px;
  background: var(--surface); font-family: var(--font); font-size: .85rem; font-weight: 600; color: var(--text);
}
.kbd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.kbd-list li { display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 12px; }
.kbd-list .keys { display: flex; gap: 4px; }
.kbd-list li > span:last-child { color: var(--muted); }

.banner-green { background: var(--ww-green); color: var(--ww-ink); }
.banner-green::after { background: radial-gradient(circle, rgba(255,255,255,.5), transparent 65%); }
.banner-green h2 { color: var(--ww-ink); }
.banner-green p { color: rgba(30, 43, 60, .78); }
.banner-green .app-icon { width: 160px; height: 160px; justify-self: center; position: relative; z-index: 1; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.stat strong { display: block; font-family: var(--font-round); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }


.support-topics a.card .icon-tile { background: var(--ww-mint); }
@media (prefers-color-scheme: dark) { .support-topics a.card .icon-tile { background: color-mix(in srgb, var(--ww-green) 22%, transparent); } }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h2 { font-size: 1.4rem; margin-bottom: 16px; scroll-margin-top: 140px; }
@media (max-width: 520px) { .subnav .app-mini span { display: none; } .subnav .app-mini { margin-right: 8px; } }

/* A chosen answer in the vocabulary test stands out more */
.vt-option[aria-pressed="true"] { border-width: 2px; padding: 13px 15px; background: color-mix(in srgb, var(--gold) 28%, var(--bg)); }
