/* ============================================================
   MathMaker : Mind Challenge — shared site styles (V2 design).
   Every page loads this file; the landing page adds home.css.
   Edited directly in this repo (the single source of the site).
   ============================================================ */

/* ============================================================
   0. Fonts — Exo (SIL OFL), self-hosted in assets/fonts
   ============================================================ */
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/exo-latin-400-normal.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: 'Exo'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/exo-latin-ext-400-normal.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; }
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/exo-latin-600-normal.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: 'Exo'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/exo-latin-ext-600-normal.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; }
@font-face { font-family: 'Exo'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/exo-latin-800-normal.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: 'Exo'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/exo-latin-ext-800-normal.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; }

/* ============================================================
   1. Tokens — every color, space and radius comes from here.
      1rem = 1/120 of the viewport width (16px at 1920, 32px at 4K),
      so the whole composition scales up crisply on large monitors.
   ============================================================ */
:root {
  color-scheme: dark;
  --c-bg: #0a1018;
  --c-navy: #151f2b;
  --c-surface: #1c2839;
  --c-surface-2: #24344b;
  --c-accent: #ff6d00;
  --c-accent-hot: #ff8f2e;
  --c-gold: #ffc35a;
  --c-correct: #2bd589;
  --c-wrong: #ff3b2f;
  --c-warn: #ffc107;
  --c-text: #ffffff;
  --c-muted: #aebcce;
  --c-faint: rgba(255, 255, 255, 0.5);
  --c-line: rgba(255, 255, 255, 0.1);
  --c-line-strong: rgba(255, 255, 255, 0.22);
  --c-glass: rgba(22, 33, 48, 0.62);
  --c-cream: #fff9f2;
  --c-ink: #151f2b;
  --c-cat-1: #2bd589;
  --c-cat-2: #9be04a;
  --c-cat-3: #ffc107;
  --c-cat-4: #ff9a1f;
  --c-cat-5: #ff6d00;
  --c-cat-6: #ff3d2e;
  --c-cat-7: #ff1f6b;

  --font: 'Exo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-math: 'Segoe UI', 'Cambria Math', 'Exo', system-ui, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 2rem;
  --radius-pill: 999px;
  --shell: 104rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --glow: 0 0 2rem rgba(255, 109, 0, 0.45), 0 0 6rem rgba(255, 109, 0, 0.18);
}
html { font-size: clamp(13px, 0.8333vw, 48px); scroll-behavior: smooth; background: var(--c-bg); }

/* ============================================================
   2. Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(80rem 50rem at 85% -10%, rgba(255, 109, 0, 0.12), transparent 60%),
    radial-gradient(70rem 60rem at -10% 30%, rgba(40, 90, 170, 0.18), transparent 60%),
    var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 0.2rem solid var(--c-gold); outline-offset: 0.25rem; border-radius: 0.4rem; }
h1, h2, h3, p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   3. Layout + global layers
   ============================================================ */
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }
.main { position: relative; z-index: 2; }
.shell { width: min(var(--shell), 100% - var(--space-12)); margin-inline: auto; }
.section { position: relative; padding-block: var(--space-32); }

/* Drifting math dust behind the inner pages (the landing page has the WebGL field instead) */
.dust { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; }

/* Scroll progress = "level bar" */
.progress { position: fixed; z-index: 55; inset: 0 0 auto; height: 0.3rem; background: rgba(255, 255, 255, 0.05); }
.progress__fill {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--c-cat-1), var(--c-cat-3), var(--c-accent), var(--c-cat-7));
  box-shadow: 0 0 1rem rgba(255, 109, 0, 0.8);
}

/* Custom cursor: a compass whose needle tip is the hotspot (fine pointers only). */
.cursor { --cr: 14deg; --cs: 1; position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor input, .has-cursor summary { cursor: none; }
.cursor__pin { position: absolute; top: 0; left: 0; transform: translate(var(--dx, -100px), var(--dy, -100px)); }
.cursor__compass {
  position: absolute; left: -0.18rem; top: -2.088rem; width: 1.8rem; height: 2.16rem; overflow: visible;
  fill: var(--c-accent); stroke: #160a00; stroke-width: 5; paint-order: stroke; stroke-linejoin: round;
  filter: drop-shadow(0 0 0.35rem rgba(255, 109, 0, 0.65));
  transform-origin: 0.18rem 2.088rem; transform: rotate(var(--cr)) scale(var(--cs));
  transition: transform 0.3s var(--ease-spring), fill 0.2s;
}
.cursor__trace { position: absolute; left: -1.565rem; top: -1.565rem; width: 3.13rem; height: 3.13rem; overflow: visible; opacity: 0; transform: rotate(var(--cr)); }
.cursor__trace circle { fill: none; stroke: var(--c-gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.cursor--hover { --cr: 30deg; --cs: 1.15; }
.cursor--hover .cursor__compass { fill: #fff3e6; filter: drop-shadow(0 0 0.5rem rgba(255, 195, 90, 0.9)); }
.cursor--draw .cursor__compass { animation: compass-draw 0.55s var(--ease-out); }
.cursor--draw .cursor__trace { animation: trace-fade 0.8s ease-out forwards; }
.cursor--draw .cursor__trace circle { animation: trace-draw 0.55s var(--ease-out) forwards; }
@keyframes compass-draw { from { transform: rotate(var(--cr)) scale(var(--cs)); } to { transform: rotate(calc(var(--cr) + 360deg)) scale(var(--cs)); } }
@keyframes trace-draw { to { stroke-dashoffset: 0; } }
@keyframes trace-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ============================================================
   4. Shared components (BEM)
   ============================================================ */

/* --- Buttons --- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  min-height: 3.5rem; padding: 0 var(--space-8); border: 0.12rem solid transparent; border-radius: var(--radius-pill);
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; text-decoration: none; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, background-color 0.25s, border-color 0.25s;
}
.btn--primary { background: linear-gradient(135deg, var(--c-accent-hot), var(--c-accent)); color: #160a00; box-shadow: var(--glow); }
.btn--primary:hover { box-shadow: 0 0 3rem rgba(255, 109, 0, 0.7), 0 0 8rem rgba(255, 109, 0, 0.3); }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--c-line-strong); color: var(--c-text); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--c-accent); background: rgba(255, 109, 0, 0.1); }
.btn--sm { min-height: 2.75rem; padding: 0 var(--space-6); font-size: 0.95rem; }
.btn--xl { min-height: 4.5rem; padding: 0 var(--space-12); font-size: 1.4rem; }
.btn__icon { width: 1.4em; height: 1.4em; }

/* --- Brand mark --- */
.mark { width: 1.6rem; height: 1.9rem; fill: var(--c-accent); filter: drop-shadow(0 0 0.6rem rgba(255, 109, 0, 0.6)); }

/* --- Navigation --- */
.nav {
  position: fixed; z-index: 50; top: var(--space-4); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--space-8);
  width: min(var(--shell), 100% - var(--space-8)); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-6);
  border: 1px solid var(--c-line); border-radius: var(--radius-pill);
  background: rgba(10, 16, 24, 0.55); backdrop-filter: blur(18px) saturate(140%);
  transition: transform 0.6s var(--ease-out), opacity 0.6s;
}
.is-locked .nav { opacity: 0; transform: translate(-50%, -150%); }
.nav__brand { display: inline-flex; align-items: center; gap: var(--space-3); font-weight: 800; font-size: 1.35rem; letter-spacing: 0.06em; text-decoration: none; white-space: nowrap; }
.nav__brand-sub { color: var(--c-muted); font-weight: 600; font-size: 0.8em; letter-spacing: 0.04em; }
.nav__links { display: flex; gap: var(--space-1); margin-right: auto; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  color: var(--c-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.03em; white-space: nowrap; transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover, .nav__link--active { color: var(--c-text); background: rgba(255, 255, 255, 0.06); }
.nav__link--active { color: var(--c-accent-hot); }
.nav__tools { display: flex; align-items: center; gap: var(--space-3); }

.lang { display: inline-flex; padding: 0.2rem; border: 1px solid var(--c-line); border-radius: var(--radius-pill); }
.lang__btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.4rem; padding: 0 var(--space-3);
  border: 0; border-radius: var(--radius-pill); background: none; color: var(--c-muted); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.08em; text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.lang__btn:hover { color: var(--c-text); }
.lang__btn[aria-pressed='true'], .lang__btn[aria-current='page'] { background: var(--c-text); color: var(--c-ink); }

/* --- Shared section heading --- */
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--c-accent-hot); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.35em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 3rem; height: 0.12rem; background: currentColor; box-shadow: 0 0 0.8rem currentColor; }
.headline { font-size: 6rem; font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; }
.headline--md { font-size: 4.5rem; }
.headline__glow { background: linear-gradient(100deg, #fff 10%, var(--c-gold) 45%, var(--c-accent) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 46rem; color: var(--c-muted); font-size: 1.4rem; line-height: 1.6; }
.section-head { display: grid; gap: var(--space-6); margin-bottom: var(--space-16); }
.section-head--center { justify-items: center; text-align: center; }

/* Reveal-on-scroll */
[data-reveal] { opacity: 0; transform: translateY(3rem); filter: blur(8px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s; transition-delay: var(--delay, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* --- Glass card --- */
.card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: grid; align-content: start; gap: var(--space-4); padding: var(--space-8); border-radius: var(--radius-lg);
  background: rgba(22, 33, 48, 0.42); border: 1px solid var(--c-line); backdrop-filter: blur(18px);
  transform: perspective(70rem) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.4s var(--ease-out), border-color 0.3s; transform-style: preserve-3d;
}
.card:hover { border-color: rgba(255, 109, 0, 0.45); }
.card__title { font-size: 1.9rem; font-weight: 800; line-height: 1.15; }
.card__text { color: var(--c-muted); font-size: 1.1rem; }

/* --- Footer --- */
.footer { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: var(--space-8); padding: var(--space-8) 0 var(--space-12); border-top: 1px solid var(--c-line); color: var(--c-faint); font-size: 0.95rem; }
.footer__links { display: flex; gap: var(--space-6); }
.footer__links a { color: var(--c-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer__links a:hover, .footer__links a[aria-current='page'] { color: var(--c-accent-hot); }
.footer__consent { padding: 0; border: 0; background: none; color: var(--c-muted); font: inherit; cursor: pointer; display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer__consent:hover { color: var(--c-accent-hot); }

/* --- Consent banner (assets/measure.js) — above the landing gate, never covering it --- */
.consent {
  position: fixed; z-index: 85; left: 50%; bottom: var(--space-6); transform: translateX(-50%);
  width: min(46rem, 100% - var(--space-8)); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-3) var(--space-6);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-6); border: 1px solid var(--c-line-strong); border-radius: var(--radius-md);
  background: rgba(14, 21, 31, 0.94); backdrop-filter: blur(18px); box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.55);
  color: var(--c-muted); font-size: 0.95rem; line-height: 1.45; animation: consent-in 0.5s var(--ease-out);
}
.consent__text { margin: 0; }
.consent__text a { color: var(--c-accent-hot); }
.consent__now { grid-column: 1; margin: 0; color: var(--c-faint); font-size: 0.85rem; }
.consent__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: var(--space-2); }
.consent__btn { min-width: 7.5rem; padding: 0 var(--space-4); }
@keyframes consent-in { from { opacity: 0; transform: translate(-50%, 1rem); } }

/* ============================================================
   5. Inner pages — support, privacy, terms, 404
   ============================================================ */
.page-hero { position: relative; display: grid; justify-items: start; gap: var(--space-6); padding: 13rem 0 var(--space-16); }
.page-hero__title { max-width: 80rem; padding-bottom: 0.08em; }
.page-hero__intro { max-width: 60rem; }
.page-hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.chip-note {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 2.5rem; padding: 0 var(--space-4);
  border: 1px solid var(--c-line); border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.04);
  color: var(--c-muted); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.03em;
}
.chip-note::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c-correct); box-shadow: 0 0 0.8rem var(--c-correct); }

/* Long-form document: sticky table of contents + glass article */
.doc { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: var(--space-12); align-items: start; padding-bottom: var(--space-32); }
.doc__toc { position: sticky; top: 7.5rem; display: grid; gap: var(--space-4); max-height: calc(100vh - 9rem); overflow: auto; padding-right: var(--space-2); }
.doc__toc-title { color: var(--c-faint); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; }
.toc { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--c-line); }
.toc__link {
  position: relative; display: block; margin-left: -1px; padding: var(--space-2) var(--space-4); border-left: 0.15rem solid transparent;
  color: var(--c-muted); font-size: 0.95rem; font-weight: 600; line-height: 1.35; text-decoration: none; transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.toc__link:hover { color: var(--c-text); background: rgba(255, 255, 255, 0.03); }
.toc__link--active { color: var(--c-accent-hot); border-left-color: var(--c-accent); background: linear-gradient(90deg, rgba(255, 109, 0, 0.12), transparent); }

.doc__body { display: block; padding: var(--space-12) var(--space-16); }
.doc__body:hover { border-color: var(--c-line); }

/* Prose — the original legal / support markup, styled in place */
.prose { color: var(--c-muted); font-size: 1.15rem; line-height: 1.75; }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 {
  display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-12); scroll-margin-top: 8rem;
  color: var(--c-text); font-size: 1.9rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
}
.prose h2::before { content: ''; flex: none; width: 0.35rem; height: 1.4em; border-radius: 1rem; background: linear-gradient(180deg, var(--c-gold), var(--c-accent)); box-shadow: 0 0 1rem rgba(255, 109, 0, 0.6); }
.prose > h2:first-child { margin-top: 0; }
.prose strong { color: var(--c-text); font-weight: 800; }
.prose a, .contact-card a { color: var(--c-accent-hot); text-decoration: underline; text-decoration-color: rgba(255, 143, 46, 0.4); text-underline-offset: 0.2em; transition: color 0.2s, text-decoration-color 0.2s; }
.prose a:hover, .contact-card a:hover { color: var(--c-gold); text-decoration-color: currentColor; }
.prose ul { display: grid; gap: var(--space-3); margin-bottom: 0; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: var(--space-8); }
.prose li::before { content: ''; position: absolute; left: 0.35rem; top: 0.72em; width: 0.55rem; height: 0.55rem; border-radius: 0.12rem; background: var(--c-accent); box-shadow: 0 0 0.6rem rgba(255, 109, 0, 0.7); transform: rotate(45deg); }

/* Support: contact cards + FAQ */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.contact-card { align-content: start; }
.contact-card__icon {
  display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 1.2rem; font-size: 1.9rem; line-height: 1;
  background: linear-gradient(135deg, rgba(255, 143, 46, 0.22), rgba(255, 109, 0, 0.06)); border: 1px solid rgba(255, 109, 0, 0.35); box-shadow: 0 0 2rem rgba(255, 109, 0, 0.15);
}
.contact-card h2 { margin: 0; font-size: 1.6rem; }
.contact-card h2::before { display: none; }
.contact-card p { margin: 0; color: var(--c-muted); font-size: 1.05rem; line-height: 1.65; overflow-wrap: break-word; }
.support-faq { padding-bottom: var(--space-32); }
.support-faq__title { margin: var(--space-24) 0 var(--space-8); }
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.faq__item p { margin: 0; }
.faq strong:first-child { display: block; margin-bottom: var(--space-2); color: var(--c-text); font-size: 1.35rem; line-height: 1.3; }
.faq strong:first-child + br { display: none; }

/* 404 */
.lost { display: grid; place-items: center; min-height: 100vh; padding: 10rem 0 var(--space-16); text-align: center; }
.lost__inner { display: grid; justify-items: center; gap: var(--space-6); }
.lost__mark { width: 8rem; height: 9.6rem; fill: var(--c-accent); filter: drop-shadow(0 0 2rem rgba(255, 109, 0, 0.6)); animation: sway 6s ease-in-out infinite; transform-origin: 50% 25%; }
@keyframes sway { 50% { transform: rotate(8deg); } }
.lost__title { font-size: 9rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lost__text { color: var(--c-muted); font-size: 1.35rem; }
.lost__text a { color: var(--c-accent-hot); }

/* ============================================================
   6. Media queries and motion
   ============================================================ */
@media (max-width: 1100px) {
  html { font-size: 12px; }
  .nav__links { display: none; }
  .nav__tools { margin-left: auto; }
  .headline { font-size: 4rem; }
  .doc { grid-template-columns: 1fr; gap: var(--space-8); }
  .doc__toc { position: static; max-height: none; overflow: visible; }
  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; gap: var(--space-1) var(--space-4); }
  .toc__link { margin-left: 0; border-left: 0; border-radius: var(--radius-sm); }
  .contacts { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .lost__title { font-size: 6rem; }
}
/* Inner pages keep their links on small screens: they wrap to a second row of the nav. */
@media (max-width: 1100px) {
  .nav--pages { flex-wrap: wrap; row-gap: 0; border-radius: var(--radius-lg); padding: var(--space-2) var(--space-2) var(--space-1) var(--space-4); }
  .nav--pages .nav__brand { margin-right: auto; }
  .nav--pages .nav__links { display: flex; order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .nav--pages .nav__links::-webkit-scrollbar { display: none; }
  .page-hero { padding-top: 12rem; }
}
@media (max-width: 640px) {
  .page--inner .shell { width: min(var(--shell), 100% - var(--space-8)); }
  .nav__brand-sub { display: none; }
  .nav--pages .btn--sm { display: none; }
  .headline { font-size: 3.4rem; }
  .doc__body { padding: var(--space-8) var(--space-6); }
  .toc { grid-template-columns: 1fr; }
  .toc__link { padding: var(--space-1) var(--space-3); }
  .footer { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .footer__links { flex-wrap: wrap; gap: 0 var(--space-6); }
  .consent { grid-template-columns: 1fr; bottom: var(--space-4); padding: var(--space-4); }
  .consent__actions { grid-column: 1; grid-row: auto; }
  .consent__btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
}
