/* ============================================================================
   Einbürgerungstest 2026 — production stylesheet
   Ported from the "Einbürgerungstest 2026 Design System" (tokens/ + components/).

   Design thesis: "amtlich, but friendly" — the visual language of a well-designed
   German official document. Flat, bordered, shadow-free, paper-like.
   Borders do the work, never elevation. Radius is 14px everywhere.
   RTL mirrors genuinely via logical properties — never scaleX.
   ========================================================================== */

/* ---------------------------------------------------------------- fonts --- */
/* Archivo is self-hosted, not loaded from the Google Fonts CDN. Two reasons:
   (1) the design system asks for it (readme.md → CAVEATS), and (2) embedding
   Google Fonts transmits the visitor's IP to Google without consent, which
   LG München I ruled a GDPR violation (3 O 17493/20, 20.01.2022). This site
   is German-facing, so the CDN is not an option.
   Variable font, weights 400–800. Latin + Latin-Ext only — Archivo has no
   Cyrillic or Arabic glyphs, so ru/uk/ar headings fall through to the system
   stack by design (see readme.md → VISUAL FOUNDATIONS). */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------- tokens --- */
:root {
  /* Base palette — light */
  --ink: #17181c;
  --flag-red: #d0342c;
  --flag-gold: #f0b429;
  --paper: #fafaf7;
  --card: #ffffff;
  --slate: #616875;
  --hairline: #e5e5df;

  /* Schwarz-Rot-Gold tricolor segments */
  --tricolor-1: var(--ink);
  --tricolor-2: var(--flag-red);
  --tricolor-3: var(--flag-gold);

  /* Feedback — answer states ONLY, never decorative */
  --correct-fg: #1e7d46;
  --correct-bg: #e7f4ec;
  --wrong-fg: #c0392b;
  --wrong-bg: #fbecea;

  /* Semantic aliases — light */
  --bg-page: var(--paper);
  --surface-card: var(--card);
  --surface-inverse: var(--ink);
  --text-primary: var(--ink);
  --text-muted: var(--slate);
  --text-on-inverse: #ffffff;
  --border-hairline: var(--hairline);
  --accent: var(--flag-red);
  --highlight: var(--flag-gold);
  --focus-ring: var(--flag-red);

  /* Type */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Noto Sans', sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

  --text-eyebrow: 11px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 21px;
  --text-2xl: 26px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  --text-5xl: 52px;
  --text-6xl: 66px;

  --leading-tight: 1.08;
  --leading-snug: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  --tracking-display: -0.5px;
  --tracking-heading: -0.3px;
  --tracking-normal: 0;
  --tracking-eyebrow: 1.6px;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Borders */
  --border-width: 1px;
  --border: var(--border-width) solid var(--border-hairline);
  --tricolor-height: 3px;

  /* Elevation — deliberately none */
  --shadow-none: none;

  /* Controls & layout */
  --control-min-height: 54px;
  --control-radius: var(--radius);
  --page-max: 1120px;
  --gutter: var(--space-6);

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 120ms;
  --duration: 200ms;
  --duration-slow: 320ms;
}

[data-theme='dark'] {
  --dark-bg: #131417;
  --dark-card: #1c1e22;
  --dark-text: #f1f1ec;
  --dark-slate: #9aa0aa;
  --dark-hairline: #2a2c31;

  --bg-page: var(--dark-bg);
  --surface-card: var(--dark-card);
  --surface-inverse: #ffffff;
  --text-primary: var(--dark-text);
  --text-muted: var(--dark-slate);
  --text-on-inverse: var(--ink);
  --border-hairline: var(--dark-hairline);
  --paper: var(--dark-bg);
  --card: var(--dark-card);

  --correct-bg: #14301f;
  --wrong-bg: #331a17;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration: 0ms;
    --duration-slow: 0ms;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--flag-red);
  text-decoration: none;
  transition: color var(--duration) var(--ease-standard);
}
a:hover {
  color: color-mix(in oklch, var(--flag-red) 78%, var(--ink));
}

img {
  max-width: 100%;
}

button {
  font-family: var(--font-display);
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  transition: top var(--duration) var(--ease-standard);
}
.skip-link:focus {
  top: var(--space-4);
  color: #fff;
}

/* ----------------------------------------------------------- primitives --- */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: var(--leading-normal);
  margin: 0;
}

/* TricolorBar — the signature motif. Once per section, maximum. */
.tricolor {
  display: flex;
  width: 100%;
  height: var(--tricolor-height);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex: none;
}
.tricolor i {
  flex: 1;
  display: block;
}
.tricolor i:nth-child(1) { background: var(--tricolor-1); }
.tricolor i:nth-child(2) { background: var(--tricolor-2); }
.tricolor i:nth-child(3) { background: var(--tricolor-3); }
/* RTL: no rule needed. A flex row already lays its children right-to-left under
   dir="rtl", so ink→red→gold mirrors to gold→red→ink on its own. An explicit
   `flex-direction: row-reverse` here CANCELS that and forces the LTR order back —
   which is the bug this comment exists to prevent someone re-adding. */

/* DocCard — white surface, 1px hairline, 14px radius, NO shadow. */
.card {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-none);
}
.card--ink {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.card--ink .card__body { color: rgba(255, 255, 255, 0.66); }
.card--gold {
  background: var(--flag-gold);
  color: var(--ink);
  border-color: var(--flag-gold);
}
.card__body { color: var(--text-muted); }

/* Button — primary is ink fill (inverts to white in dark). Min-height 54px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: var(--control-min-height);
  padding-inline: var(--space-6);
  border-radius: var(--control-radius);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  letter-spacing: -0.2px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: opacity var(--duration) var(--ease-standard),
    background var(--duration) var(--ease-standard);
}
.btn:hover { opacity: 0.88; }
.btn--primary {
  background: var(--surface-inverse);
  color: var(--text-on-inverse);
  border-color: var(--surface-inverse);
}
.btn--primary:hover { color: var(--text-on-inverse); }
.btn--secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}
.btn--secondary:hover { color: var(--text-primary); }
.btn--block { width: 100%; }
.btn--sm {
  min-height: 42px;
  font-size: var(--text-base);
  padding-inline: var(--space-5);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Chip — bordered pill for topics and counts. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  line-height: 1;
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hairline);
}
.chip__count { opacity: 0.6; font-weight: var(--weight-medium); }

/* LanguagePill — language link in its native script. */
.langpill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) 22px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  text-decoration: none;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  color: var(--text-primary);
  transition: border-color var(--duration) var(--ease-standard);
}
.langpill:hover {
  border-color: var(--ink);
  color: var(--text-primary);
}
.langpill--active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.langpill--active:hover { color: #fff; }

/* ProgressBar */
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--border-hairline);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--correct-fg);
  transition: width var(--duration-slow) var(--ease-standard);
}

/* --------------------------------------------------------------- layout --- */
.section { padding-block: 72px; }
.section--tint {
  background: var(--surface-card);
  border-block: 1px solid var(--border-hairline);
}

.sectionhead { max-width: 640px; margin-bottom: 36px; }
.sectionhead h2 {
  font-size: 38px;
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.6px;
  line-height: 1.08;
  margin-top: var(--space-3);
}
.sectionhead__sub {
  color: var(--text-muted);
  font-size: var(--text-lg);
  line-height: 1.5;
  margin-top: var(--space-4);
}

.grid { display: grid; gap: var(--space-4); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ------------------------------------------------------------------ nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 66px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--text-primary);
  text-decoration: none;
  flex: none;
}
.wordmark:hover { color: var(--text-primary); }
.wordmark__year { color: var(--flag-red); }
.wordmark__logo {
  width: 32px;
  height: 32px;
  flex: none;
  display: block;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px;
  object-fit: contain;
}
.nav__links {
  display: flex;
  gap: 26px;
  margin-inline: auto;
}
.nav__links a {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 15px;
  color: var(--text-primary);
}
.nav__links a:hover { color: var(--flag-red); }
.nav__actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Language switcher — a real <details> disclosure, no framework needed. */
.langswitch { position: relative; }
.langswitch > summary {
  list-style: none;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  cursor: pointer;
  display: flex;
  gap: var(--space-2);
  align-items: center;
  color: var(--text-primary);
}
.langswitch > summary::-webkit-details-marker { display: none; }
.langswitch__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  background: var(--surface-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: var(--space-2);
  min-width: 190px;
  display: grid;
  gap: 2px;
  z-index: 30;
}
.langswitch__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 15px;
  color: var(--text-primary);
}
.langswitch__menu a:hover { background: var(--paper); color: var(--text-primary); }
.langswitch__menu a[aria-current='true'] { background: var(--ink); color: #fff; }

.hamburger {
  display: none;
  border: none;
  background: none;
  cursor: pointer;
  margin-inline-start: auto;
  padding: var(--space-2);
  color: var(--text-primary);
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  padding: 10px var(--space-6) var(--space-4);
}
.nav__mobile[data-open='true'] { display: flex; }
.nav__mobile a {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 17px;
  color: var(--text-primary);
  padding-block: 10px;
}

/* ----------------------------------------------------------------- hero --- */
.hero { padding-block: 56px; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-12);
  align-items: center;
}
.hero h1 {
  font-size: 56px;
  font-weight: var(--weight-extrabold);
  letter-spacing: -1px;
  line-height: 1.02;
  margin: var(--space-4) 0 0;
}
.hero__underline {
  position: relative;
  white-space: nowrap;
}
.hero__underline svg {
  position: absolute;
  inset-inline-start: 0;
  bottom: -6px;
  width: 100%;
  height: 12px;
}
.hero__lede {
  color: var(--text-muted);
  font-size: 19px;
  line-height: 1.5;
  margin: 22px 0 26px;
  max-width: 520px;
}
.hero__note {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: var(--space-5);
}
.hero__shots {
  position: relative;
  height: 560px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.storebadges { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.storebadge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px var(--space-4);
  text-decoration: none;
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.storebadge:hover { color: #fff; opacity: 0.88; }
.storebadge__text { text-align: start; line-height: 1.1; }
.storebadge__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  opacity: 0.8;
}
.storebadge__name {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
}

/* Device frame — the ONLY shadow in the system. */
.phone {
  width: 244px;
  border-radius: 40px;
  background: #0b0b0d;
  padding: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  flex: none;
}
.phone img {
  width: 100%;
  height: 512px;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
  display: block;
}
.phone--back {
  position: absolute;
  transform: rotate(8deg) translateX(40px);
  opacity: 0.82;
  z-index: 1;
}
[dir='rtl'] .phone--back { transform: rotate(-8deg) translateX(-40px); }
.phone--front { position: relative; z-index: 2; }

/* ----------------------------------------------------------- proofstrip --- */
.proof {
  border-block: 1px solid var(--border-hairline);
  background: var(--surface-card);
}
.proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof__cell {
  text-align: center;
  padding: 30px var(--space-3);
  border-inline-start: 1px solid var(--border-hairline);
}
.proof__cell:first-child { border-inline-start: none; }
.proof__value {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 44px;
  letter-spacing: -1px;
  color: var(--text-primary);
}
.proof__label { color: var(--text-muted); font-size: 15px; margin-top: 6px; }

/* ------------------------------------------------------------- features --- */
.featgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.feature { padding: 22px; }
.feature__num {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--flag-gold);
  border: none;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  color: #17181c; /* Strict dark ink color for contrast */
}
.feature__title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 19px;
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.feature__body { font-size: 15px; line-height: 1.45; margin-top: var(--space-2); }

/* ---------------------------------------------------------- screenshots --- */
.shots__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  gap: var(--space-4);
}
.shots__head .sectionhead { margin-bottom: 0; }
.shots__nav { display: flex; gap: var(--space-2); flex: none; }
.arrowbtn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--paper);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-primary);
  display: grid;
  place-items: center;
}
.shots__rail {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--space-6) 10px;
  scrollbar-width: thin;
}
.shot { flex: none; width: 260px; scroll-snap-align: start; }
.shot__cap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  min-height: 44px;
}
.shot__cap .tricolor { width: 22px; }
.shot__cap span {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 15px;
  letter-spacing: -0.2px;
}
.shot__frame { border-radius: 34px; background: #0b0b0d; padding: 7px; }
.shot__frame img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: top;
  border-radius: 28px;
  display: block;
}

/* ----------------------------------------------------------- howitworks --- */
.stepgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.step__num {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 40px;
  letter-spacing: -1px;
  color: var(--flag-red);
  line-height: 1;
}
.step__title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 20px;
  margin-top: var(--space-2);
}
.step__body { color: var(--text-muted); font-size: 15px; line-height: 1.45; margin-top: var(--space-2); }

.readiness { margin-top: var(--space-5); }
.readiness__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-1);
  gap: var(--space-4);
}
.readiness__label { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 17px; }
.readiness__value { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 17px; color: var(--correct-fg); }
.readiness__note { color: var(--text-muted); font-size: 13px; margin-top: 10px; }

/* -------------------------------------------------------------- examinfo --- */
.examgrid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-12); }
.examinfo__lede { color: var(--text-primary); font-size: var(--text-lg); line-height: 1.55; }
.examinfo__body { color: var(--text-muted); font-size: var(--text-base); line-height: 1.55; margin-top: var(--space-4); }
.examinfo__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--space-6); }
.examinfo__source { color: var(--text-muted); font-size: 13px; margin-top: var(--space-5); }
.factcard { position: sticky; top: 90px; align-self: start; padding: var(--space-2); }
.factgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-hairline);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.fact { background: var(--surface-card); padding: 26px var(--space-4); text-align: center; }
.fact__value {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 44px;
  letter-spacing: -1px;
}
.fact__label { color: var(--text-muted); font-size: 15px; margin-top: var(--space-1); }

/* ----------------------------------------------------------------- quiz --- */
.quiz { max-width: 680px; margin-inline: auto; padding: 28px; }
.quiz__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  gap: var(--space-4);
}
.quiz__count {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.quiz__q {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-2xl);
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.quiz__qt { color: var(--text-muted); font-size: 17px; line-height: 1.35; margin: 6px 0 var(--space-5); }
.quiz__image {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.quiz__image img { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
.quiz__options { display: flex; flex-direction: column; gap: var(--space-3); }

/* AnswerOption — the signature bilingual answer card. */
.answer {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  width: 100%;
  text-align: start;
  padding: var(--space-5) var(--space-5);
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--border-hairline);
  background: var(--surface-card);
  transition: border-color var(--duration) var(--ease-standard),
    background var(--duration) var(--ease-standard);
}
.answer__text { flex: 1; }
.answer__primary {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  line-height: 1.3;
}
.answer__translation {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}
.answer__marker {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-hairline);
  display: grid;
  place-items: center;
}
.answer__marker i {
  width: 13px;
  height: 13px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  display: none;
}
.answer[data-state='selected'] { border: 1.5px solid var(--ink); }
.answer[data-state='selected'] .answer__marker { border-color: var(--ink); border-width: 1px; }
.answer[data-state='selected'] .answer__marker i { display: block; }
.answer[data-state='correct'] { border: 1.5px solid var(--correct-fg); background: var(--correct-bg); }
.answer[data-state='wrong'] { border: 1.5px solid var(--wrong-fg); background: var(--wrong-bg); }
.answer[data-state='correct'] .answer__primary,
.answer[data-state='wrong'] .answer__primary { font-weight: var(--weight-bold); }
.answer[data-state='correct'] .answer__marker,
.answer[data-state='wrong'] .answer__marker {
  width: 30px;
  height: 30px;
  border: none;
}
.answer[data-state='correct'] .answer__marker { background: var(--correct-fg); }
.answer[data-state='wrong'] .answer__marker { background: var(--wrong-fg); }
.answer__marker svg { display: none; }
.answer[data-state='correct'] .answer__marker .ico-check,
.answer[data-state='wrong'] .answer__marker .ico-cross { display: block; }

.quiz__explain {
  margin-top: var(--space-4);
  background: var(--paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.quiz__explain p { font-size: var(--text-base); line-height: 1.45; margin-top: var(--space-2); }
.quiz__explain p.muted { color: var(--text-muted); }
.quiz__result { text-align: center; padding: var(--space-5) 0; }
.quiz__score {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: 60px;
  letter-spacing: -1px;
  color: var(--correct-fg);
  margin: var(--space-2) 0;
}
.quiz__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------- trust --- */
.trustgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.trust__title { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-lg); }
.trust__body { color: var(--text-muted); font-size: 15px; line-height: 1.45; margin-top: var(--space-2); }

/* ----------------------------------------------------------- languages --- */
.langs { text-align: center; }
.langs h2 {
  font-size: 36px;
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: var(--space-3) auto 0;
  max-width: 720px;
}
.langs__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: 30px;
}


/* --------------------------------------------------------- testimonials --- */
.testimonials { max-width: 1200px; }
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.testimonial__card {
  background: var(--paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.testimonial__text {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.5;
}
.testimonial__author {
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: auto;
}

/* ------------------------------------------------------------------ faq --- */
.faq { max-width: 820px; }
.faq__list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq__item {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.faq__item > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5) var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  color: var(--text-primary);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__plus {
  flex: none;
  font-size: 22px;
  line-height: 1;
  transition: transform var(--duration) var(--ease-standard);
}
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__answer {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.5;
  padding: 0 var(--space-5) var(--space-5);
}

/* ------------------------------------------------------------ final CTA --- */
.finalcta { background: var(--ink); color: #fff; }
.finalcta__grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-10);
  align-items: center;
}
.finalcta h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.6px;
  line-height: 1.05;
  color: #fff;
}
.finalcta__lede { color: rgba(255, 255, 255, 0.68); font-size: var(--text-lg); margin-top: var(--space-4); max-width: 460px; }
.finalcta__mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  padding: 8px;
}
.finalcta__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.finalcta__qr { justify-self: end; text-align: center; }
.finalcta__qrbox { background: #fff; padding: var(--space-4); border-radius: var(--radius); }
.finalcta__qrbox img { display: block; width: 132px; height: 132px; }
.finalcta__qrlabel {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 13px;
  color: var(--ink);
  margin-top: 10px;
}

/* --------------------------------------------------------------- footer --- */
.footer { background: var(--paper); border-top: 1px solid var(--border-hairline); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
  padding-block: var(--space-12);
}
.footer__tagline { color: var(--text-muted); font-size: 15px; line-height: 1.5; margin-top: var(--space-3); max-width: 300px; }
.footer__coltitle { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer__links a { color: var(--text-muted); font-size: 15px; }
.footer__links a:hover { color: var(--flag-red); }
.footer__legal { padding-bottom: var(--space-10); }
.footer__legal p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
  border-top: 1px solid var(--border-hairline);
  padding-top: var(--space-5);
  max-width: 900px;
}

/* -------------------------------------------------------- legal / prose --- */
.prose { max-width: 760px; margin-inline: auto; }
.prose h1 { font-size: var(--text-4xl); font-weight: var(--weight-extrabold); letter-spacing: -0.6px; }
.prose h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.3px;
  margin-top: var(--space-10);
}
.prose p { margin-top: var(--space-4); line-height: var(--leading-relaxed); color: var(--text-primary); }
.prose ul { margin-top: var(--space-4); padding-inline-start: var(--space-6); color: var(--text-primary); line-height: var(--leading-relaxed); }
.prose li { margin-top: var(--space-2); }
.prose__updated { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-3); }
.prose__langs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.prose__langs a {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  padding: 6px 12px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
}
.prose__langs a[aria-current='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------- motion --- */
/* Restrained per the design system: 120–320ms, standard ease, transform/opacity
   only. Every animated initial state is scoped to .js — without JavaScript the
   content must render fully visible, never stuck at opacity 0. */

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes phoneIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes phoneInBack {
  from { opacity: 0; transform: rotate(8deg) translateX(40px) translateY(24px); }
  to   { opacity: 0.82; transform: rotate(8deg) translateX(40px); }
}
@keyframes phoneInBackRtl {
  from { opacity: 0; transform: rotate(-8deg) translateX(-40px) translateY(24px); }
  to   { opacity: 0.82; transform: rotate(-8deg) translateX(-40px); }
}
@keyframes drawUnderline {
  from { stroke-dashoffset: 240; }
  to   { stroke-dashoffset: 0; }
}

/* Scroll reveal ---------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--duration-slow) var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
  transition-delay: var(--reveal-delay, 0ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero entrance — plays on load, no observer needed ---------------------- */
.js .hero [data-enter] {
  opacity: 0;
  animation: riseIn var(--duration-slow) var(--ease-standard) forwards;
  animation-delay: var(--enter-delay, 0ms);
}
.js .hero__shots .phone--front {
  opacity: 0;
  animation: phoneIn 520ms var(--ease-standard) 160ms forwards;
}
.js .hero__shots .phone--back {
  opacity: 0;
  animation: phoneInBack 520ms var(--ease-standard) 300ms forwards;
}
[dir='rtl'].js .hero__shots .phone--back {
  animation-name: phoneInBackRtl;
}

/* The hand-drawn underline draws itself once the headline has settled. */
.js .hero__underline path {
  stroke-dasharray: 240;
  animation: drawUnderline 620ms var(--ease-standard) 620ms backwards;
}

/* Nav gains a hairline once the page scrolls, so it detaches from the hero. */
.nav {
  transition: box-shadow var(--duration) var(--ease-standard),
    background var(--duration) var(--ease-standard);
}
.nav[data-scrolled='true'] {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

/* Card hover — border, never elevation. The system is defined by hairlines. */
.featgrid .card,
.stepgrid .card,
.trustgrid .card {
  transition: border-color var(--duration) var(--ease-standard),
    transform var(--duration) var(--ease-standard);
}
.featgrid .card:hover,
.stepgrid .card:hover,
.trustgrid .card:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, var(--border-hairline));
  transform: translateY(-2px);
}
.featgrid .card--ink:hover {
  border-color: var(--flag-gold);
}

/* Screenshot rail */
.shot__frame {
  transition: transform var(--duration) var(--ease-standard);
}
.shot:hover .shot__frame {
  transform: translateY(-4px);
}
.arrowbtn {
  transition: border-color var(--duration) var(--ease-standard),
    background var(--duration) var(--ease-standard);
}
.arrowbtn:hover {
  border-color: var(--ink);
  background: var(--surface-card);
}

/* Answer options: colour and border only — the design system forbids scale on
   press, and a quiz answer is the last place to add bounce. */
.answer { transition: border-color var(--duration) var(--ease-standard),
    background var(--duration) var(--ease-standard); }
.answer:hover:not([data-state='correct']):not([data-state='wrong']) {
  border-color: color-mix(in srgb, var(--ink) 40%, var(--border-hairline));
}
.quiz__explain[hidden] { display: none !important; }
.js .quiz__explain:not([hidden]) {
  animation: riseIn var(--duration) var(--ease-standard);
}
.js [data-question]:not([hidden]) {
  animation: fadeIn var(--duration) var(--ease-standard);
}
.js [data-result]:not([hidden]) {
  animation: riseIn var(--duration-slow) var(--ease-standard);
}

/* FAQ — native <details>, with the answer easing in on open. */
.faq__item {
  transition: border-color var(--duration) var(--ease-standard);
}
.faq__item[open] { border-color: color-mix(in srgb, var(--ink) 24%, var(--border-hairline)); }
.faq__item > summary { transition: color var(--duration) var(--ease-standard); }
.faq__item > summary:hover { color: var(--flag-red); }
.js .faq__item[open] .faq__answer {
  animation: riseIn var(--duration) var(--ease-standard);
}

/* Language pills */
.langpill { transition: border-color var(--duration) var(--ease-standard),
    transform var(--duration) var(--ease-standard); }
.langpill:hover { transform: translateY(-2px); }

/* Store badges */
.storebadge { transition: opacity var(--duration) var(--ease-standard),
    transform var(--duration) var(--ease-standard); }
.storebadge:hover { transform: translateY(-2px); }

/* Proof strip cells reveal in sequence. */
.js .proof__cell { --reveal-delay: 0ms; }

/* Reduced motion: everything above collapses to nothing. The tokens already
   zero the durations; these rules kill the keyframe states outright so nothing
   can be left mid-animation or invisible. */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js .hero [data-enter],
  .js .hero__shots .phone--front {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .js .hero__shots .phone--back {
    opacity: 0.82 !important;
    animation: none !important;
  }
  .js .hero__underline path { animation: none !important; stroke-dasharray: none !important; }
  .featgrid .card:hover,
  .stepgrid .card:hover,
  .trustgrid .card:hover,
  .shot:hover .shot__frame,
  .langpill:hover,
  .storebadge:hover { transform: none !important; }
}

/* ------------------------------------------------------------ responsive --- */
@media (max-width: 980px) {
  .examgrid { grid-template-columns: 1fr; }
  .factcard { position: static; }
}

@media (max-width: 860px) {
  .hero__grid,
  .finalcta__grid { grid-template-columns: 1fr; }
  .featgrid,
  .stepgrid,
  .trustgrid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .nav__links,
  .nav__actions { display: none; }
  .hamburger { display: block; }
  .hero h1 { font-size: 40px; }
  .sectionhead h2 { font-size: 30px; }
  .hero__shots { height: 480px; }
  .finalcta__qr { justify-self: start; }
  .proof__grid { grid-template-columns: 1fr 1fr; }
  .proof__cell:nth-child(3) { border-inline-start: none; }
  .proof__cell:nth-child(n + 3) { border-top: 1px solid var(--border-hairline); }
}

@media (max-width: 560px) {
  .featgrid,
  .trustgrid,
  .stepgrid { grid-template-columns: 1fr; }
  .section { padding-block: 52px; }
  .hero h1 { font-size: 34px; }
  .langs h2 { font-size: 27px; }
  .quiz { padding: var(--space-5); }
  .quiz__q { font-size: 21px; }
  .answer__primary { font-size: var(--text-lg); }
  .phone { width: 200px; }
  .phone img { height: 420px; }
  .hero__shots { height: 420px; }
  .proof__value,
  .fact__value { font-size: 36px; }
}
