/* BrainBuzz web. Design tokens mirror the Android app's ui/theme (Color.kt, Theme.kt). */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/assets/fonts/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* Brand */
  --purple: #6c4bf4;
  --purple-deep: #4b2fd1;
  --purple-light: #cbbeff;
  --purple-container: #eae4ff;
  --teal: #0fb5a6;
  --teal-deep: #0b8f84;
  --teal-container: #d5f6f2;
  --amber: #ffb23f;
  --coral: #ff6b6b;
  --sky: #4ea8ff;
  --streak: #ff8a3d;
  --success: #22b573;
  --success-ink: #13804f;
  --success-container: #d7f5e6;
  --error: #e5484d;
  --error-ink: #c22f35;
  --error-container: #ffe1e1;

  /* Neutrals */
  --bg: #f7f5fc;
  --surface: #ffffff;
  --surface-low: #fbfafe;
  --surface-variant: #f0edf8;
  --surface-high: #eae6f5;
  --ink: #1c1830;
  --ink-2: #6a6584;
  --outline: #dcd7ea;
  --outline-soft: #eae6f3;
  --primary: var(--purple);
  --on-primary: #fff;
  --primary-container: var(--purple-container);
  --on-primary-container: var(--purple-deep);

  /* Gradients (Theme.kt BrainColors) */
  --hero-gradient: linear-gradient(135deg, #6c4bf4, #9b7bff);
  --arcade-gradient: linear-gradient(135deg, #6c4bf4, #3d5afe);
  /* Daily card: the app's teal→blue, deepened slightly so white text keeps 4.5:1. */
  --daily-gradient: linear-gradient(135deg, #0b8579, #2f68d8);
  --glow: rgba(108, 75, 244, 0.35);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(28, 24, 48, 0.06), 0 2px 8px rgba(28, 24, 48, 0.05);
  --shadow-md: 0 4px 12px rgba(28, 24, 48, 0.07), 0 12px 32px rgba(28, 24, 48, 0.07);
  --shadow-glow: 0 14px 36px -10px var(--glow);

  --font-body: Roboto, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fredoka', var(--font-body);
  --wrap: 1160px;
  --gutter: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 720px) {
  :root { --gutter: 24px; --header-h: 72px; }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --purple: #9f86ff;
  --primary: #9f86ff;
  --on-primary: #1e0f66;
  --primary-container: #3b2a8f;
  --on-primary-container: #eae4ff;
  --purple-container: #2c2160;
  --teal: #7be3d8;
  --teal-container: #0d4e47;
  --success: #4fd99a;
  --success-ink: #4fd99a;
  --success-container: #123d2a;
  --error: #ff8a8f;
  --error-ink: #ff8a8f;
  --error-container: #5c1a1e;
  --bg: #110e1c;
  --surface: #1b1729;
  --surface-low: #181424;
  --surface-variant: #272238;
  --surface-high: #2f2943;
  --ink: #ece9f7;
  --ink-2: #a9a3c2;
  --outline: #3a3450;
  --outline-soft: #2e2840;
  --hero-gradient: linear-gradient(135deg, #4b2fd1, #7a55f5);
  --arcade-gradient: linear-gradient(135deg, #4b2fd1, #2f45c9);
  --daily-gradient: linear-gradient(135deg, #0b7f75, #2b5fc6);
  --glow: rgba(122, 85, 245, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --purple: #9f86ff;
    --primary: #9f86ff;
    --on-primary: #1e0f66;
    --primary-container: #3b2a8f;
    --on-primary-container: #eae4ff;
    --purple-container: #2c2160;
    --teal: #7be3d8;
    --teal-container: #0d4e47;
    --success: #4fd99a;
    --success-ink: #4fd99a;
    --success-container: #123d2a;
    --error: #ff8a8f;
    --error-ink: #ff8a8f;
    --error-container: #5c1a1e;
    --bg: #110e1c;
    --surface: #1b1729;
    --surface-low: #181424;
    --surface-variant: #272238;
    --surface-high: #2f2943;
    --ink: #ece9f7;
    --ink-2: #a9a3c2;
    --outline: #3a3450;
    --outline-soft: #2e2840;
    --hero-gradient: linear-gradient(135deg, #4b2fd1, #7a55f5);
    --arcade-gradient: linear-gradient(135deg, #4b2fd1, #2f45c9);
    --daily-gradient: linear-gradient(135deg, #0b7f75, #2b5fc6);
    --glow: rgba(122, 85, 245, 0.45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
  }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.muted { color: var(--ink-2); }
.center { text-align: center; }

/* Buttons */
.btn {
  --btn-bg: var(--surface);
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.35em; border-radius: 999px;
  border: 1.5px solid transparent; background: var(--btn-bg); color: var(--btn-ink);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.18s, border-color 0.18s, opacity 0.18s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--arcade-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: 0 18px 40px -10px var(--glow); }
.btn-secondary { --btn-bg: var(--surface); --btn-ink: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost { --btn-bg: transparent; --btn-ink: var(--ink); }
.btn-ghost:hover { background: var(--surface-variant); }
.btn-light { --btn-bg: #fff; --btn-ink: var(--purple-deep); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35); }
.btn-play { --btn-bg: #000; --btn-ink: #fff; border-color: #4b4b4b; }
.btn-lg { min-height: 56px; padding: 0.85em 1.7em; font-size: 1.08rem; }
.btn-sm { min-height: 40px; padding: 0.5em 1em; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.play-badge { display: inline-block; border-radius: 10px; transition: transform 0.18s var(--ease); }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { width: 190px; height: auto; margin: -12px -11px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--primary-container); color: var(--on-primary-container); font-weight: 700; font-size: 0.85rem; line-height: 1.2;
}
.pill .icon { width: 1.1em; height: 1.1em; }
.pill-white { background: rgba(255, 255, 255, 0.2); color: #fff; }
.pill-amber { background: color-mix(in srgb, var(--amber) 22%, var(--surface)); color: color-mix(in srgb, var(--amber) 35%, var(--ink)); }
.pill-success { background: var(--success-container); color: var(--success-ink); }
.pill-streak { background: color-mix(in srgb, var(--streak) 16%, var(--surface)); color: color-mix(in srgb, var(--streak) 45%, var(--ink)); }

.card {
  background: var(--surface); border: 1px solid var(--outline-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled { border-color: var(--outline-soft); box-shadow: 0 6px 20px -12px rgba(28, 24, 48, 0.25); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1; letter-spacing: -0.01em; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  transition: background-color 0.15s, color 0.15s;
}
.nav a:hover { background: var(--surface-variant); }
.nav a[aria-current='page'] { background: var(--primary-container); color: var(--on-primary-container); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--outline-soft); background: var(--surface); color: var(--ink); transition: background-color 0.15s, transform 0.15s;
}
.icon-btn:hover { background: var(--surface-variant); }
.icon-btn .icon { width: 22px; height: 22px; }
.theme-toggle .i-dark { display: none; }
:root[data-theme='dark'] .theme-toggle .i-dark { display: block; }
:root[data-theme='dark'] .theme-toggle .i-light { display: none; }
.header-cta { display: none; }
.nav-toggle { display: inline-grid; }
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49; padding: 12px var(--gutter) 20px;
  background: var(--bg); border-bottom: 1px solid var(--outline-soft); box-shadow: var(--shadow-md);
  display: grid; gap: 4px; transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity 0.18s, transform 0.18s var(--ease), visibility 0.18s;
}
.mobile-nav.open { transform: none; opacity: 1; visibility: visible; }
.mobile-nav a:not(.btn) { padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.05rem; }
.mobile-nav a:not(.btn):hover, .mobile-nav a[aria-current='page'] { background: var(--surface-variant); }
.mobile-nav .btn { margin-top: 8px; }
@media (min-width: 960px) {
  .nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none; }
  .header-cta { display: inline-flex; }
}

/* Sections */
main { display: block; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { max-width: 680px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--outline-soft); box-shadow: var(--shadow-sm); font-weight: 700; font-size: 0.88rem; color: var(--ink);
}
.eyebrow .dot { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: var(--teal-container); color: var(--teal-deep); }
:root[data-theme='dark'] .eyebrow .dot { color: var(--teal); }
.eyebrow .dot .icon { width: 14px; height: 14px; }
.kicker { font-weight: 800; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.text-gradient { background: var(--arcade-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; max-width: 900px; aspect-ratio: 1; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--purple) 22%, transparent), transparent 70%);
}
.hero::after {
  content: ''; position: absolute; left: -15%; bottom: -30%; width: 60vw; max-width: 700px; aspect-ratio: 1; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--teal) 16%, transparent), transparent 70%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy h1 { margin-bottom: 0.35em; }
.hero-copy .lead { font-size: clamp(1.06rem, 1.8vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
.hero-copy .btn-row { margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--teal); width: 20px; height: 20px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 420px); aspect-ratio: 0.82; }
.phone {
  position: absolute; border-radius: 34px; overflow: hidden; background: #2a1d7a;
  box-shadow: 0 30px 60px -20px rgba(43, 26, 140, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.7);
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone-main { width: 62%; left: 19%; top: 2%; aspect-ratio: 540 / 959; transform: rotate(-3deg); z-index: 2; }
.phone-back { width: 50%; top: 14%; aspect-ratio: 540 / 959; opacity: 0.95; }
.phone-back.left { left: -2%; transform: rotate(-12deg); }
.phone-back.right { right: -2%; transform: rotate(10deg); }
.float {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-md); font-weight: 700; font-size: 0.92rem; white-space: nowrap;
  animation: bob 5s ease-in-out infinite;
}
.float .bubble { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.float .bubble .icon { width: 18px; height: 18px; }
.float.f1 { left: -2%; top: 18%; }
.float.f2 { right: -4%; top: 46%; animation-delay: -1.6s; }
.float.f3 { left: 6%; bottom: 4%; animation-delay: -3.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; }
  .hero-art { width: 100%; max-width: 480px; }
}

/* Daily challenge card */
.daily-card {
  position: relative; overflow: hidden; display: grid; gap: 18px; align-items: center;
  padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-xl); color: #fff; background: var(--daily-gradient);
  box-shadow: 0 20px 44px -18px rgba(15, 181, 166, 0.6); border: 1px solid rgba(255, 255, 255, 0.3);
}
.daily-card::before, .daily-card::after {
  content: ''; position: absolute; border-radius: 999px; background: rgba(255, 255, 255, 0.12); pointer-events: none;
}
.daily-card::before { width: 380px; height: 380px; right: -120px; bottom: -220px; }
.daily-card::after { width: 220px; height: 220px; left: -90px; bottom: -150px; background: rgba(255, 255, 255, 0.08); }
.daily-card h2, .daily-card h3 { color: #fff; margin: 0; }
.daily-card p { margin: 0; color: rgba(255, 255, 255, 0.94); }
.daily-head { display: flex; gap: 14px; align-items: center; }
.bubble-lg { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.22); flex: none; }
.bubble-lg .icon { width: 30px; height: 30px; }
.daily-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.daily-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.daily-actions .btn-light { --btn-ink: #0b6e66; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; }
@media (min-width: 800px) { .daily-card { grid-template-columns: 1fr auto; } }

/* Game cards (Dashboard.kt GameTile) */
.game-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.game-card {
  --c: var(--purple);
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; min-height: 196px; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--outline-soft); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none; isolation: isolate;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
}
.game-card::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 46%; z-index: -1; opacity: 0.1; background: var(--c);
  clip-path: path('M0 40 C 80 0, 150 8, 200 44 S 300 70, 400 50 L 400 200 L 0 200 Z');
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--c) 70%, transparent); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
.game-card .top { display: flex; align-items: center; gap: 12px; }
.game-card h3 { margin: 0; font-size: 1.15rem; flex: 1; }
.game-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
.game-card .chev { width: 22px; height: 22px; color: var(--ink-2); transition: transform 0.2s var(--ease); }
.game-card:hover .chev { transform: translateX(3px); color: var(--c); }
.game-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-art {
  --c: var(--purple);
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; color: var(--c);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--surface)), color-mix(in srgb, var(--c) 26%, var(--surface)));
}
.game-art .icon { width: 30px; height: 30px; }
.game-art.xl { width: 76px; height: 76px; border-radius: 22px; }
.game-art.xl .icon { width: 44px; height: 44px; }
.cat-chip { font-size: 0.8rem; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.best-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 55%, var(--ink));
}
.best-chip .icon { width: 16px; height: 16px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--outline); background: var(--surface); font-weight: 700; font-size: 0.92rem; color: var(--ink);
}
.filter-chip[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.filter-chip .icon { width: 18px; height: 18px; }

/* Steps & features */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); counter-reset: step; }
.step { padding: 24px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 14px; background: var(--arcade-gradient); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feature { padding: 20px; display: grid; gap: 8px; align-content: start; }
.feature .fi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--c, var(--purple)); background: color-mix(in srgb, var(--c, var(--purple)) 15%, var(--surface)); }
.feature .fi .icon { width: 24px; height: 24px; }
.feature h3 { margin: 4px 0 0; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }

/* App promo (dark gradient band) */
.promo {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: #fff; background: var(--arcade-gradient);
  padding: clamp(28px, 5vw, 56px); box-shadow: 0 30px 60px -28px var(--glow);
}
.promo::before {
  content: ''; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 999px;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.22), transparent); pointer-events: none;
}
.promo h2, .promo h3 { color: #fff; }
.promo p { color: rgba(255, 255, 255, 0.92); }
.promo .kicker { color: var(--purple-light); }
.promo-grid { position: relative; display: grid; gap: 32px; align-items: center; }
.promo-list { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.promo-list li { display: flex; gap: 12px; align-items: flex-start; }
.promo-list .tick { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, 0.18); }
.promo-list .tick .icon { width: 18px; height: 18px; }
.promo-list strong { display: block; }
.promo-list span { color: rgba(255, 255, 255, 0.86); font-size: 0.95rem; }
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 16px; margin: 0 -4px; scrollbar-width: thin; }
.shots figure { margin: 0; flex: 0 0 min(62%, 230px); scroll-snap-align: start; }
.shots img { border-radius: 22px; box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.5); aspect-ratio: 540 / 959; object-fit: cover; width: 100%; background: rgba(255, 255, 255, 0.1); }
@media (min-width: 960px) { .promo-grid { grid-template-columns: 0.95fr 1.05fr; } }

/* CTA band */
.cta-band { display: grid; gap: 18px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--outline-soft); box-shadow: var(--shadow-md); }
.cta-band .logo { width: 72px; height: 72px; border-radius: 20px; }
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 4px; }
.cta-band p { margin: 0; color: var(--ink-2); }
@media (min-width: 760px) { .cta-band { grid-template-columns: auto 1fr auto; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; font-weight: 700; font-size: 1.04rem; position: relative; border-radius: var(--radius-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center; background: var(--primary-container); color: var(--on-primary-container); font-size: 1.2rem; line-height: 1;
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 22px 20px; color: var(--ink-2); }
.faq .answer p:last-child { margin: 0; }

/* Footer */
.site-footer { margin-top: clamp(48px, 7vw, 96px); padding: 48px 0 28px; background: var(--surface); border-top: 1px solid var(--outline-soft); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 14px; max-width: 360px; }
.footer-brand p { margin: 0; color: var(--ink-2); }
.site-footer h2 { font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-footer ul a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--outline-soft); display: grid; gap: 8px; color: var(--ink-2); font-size: 0.88rem; }
.footer-bottom p { margin: 0; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } .footer-brand { grid-column: auto; } }

/* Page hero for inner pages */
.page-hero { padding: clamp(28px, 5vw, 64px) 0 clamp(20px, 3vw, 32px); }
.page-hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 44em; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 18px; padding: 0; list-style: none; font-size: 0.9rem; color: var(--ink-2); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 88%, var(--ink-2)); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose code { background: var(--surface-variant); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; }
.info-card { padding: 22px; display: grid; gap: 10px; }
.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.contact-grid .info-card h2 { font-size: 1.25rem; margin: 0; }
.contact-grid .info-card p { margin: 0; color: var(--ink-2); }

/* ---------- Game page ---------- */
.game-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.game-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin: 0 0 4px; }
.game-hero p { margin: 0; color: var(--ink-2); font-size: 1.05rem; }
.game-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1040px) { .game-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.side-stack { display: grid; gap: 16px; }
.side-stack .card { padding: 20px; }
.side-stack h2 { font-size: 1.15rem; margin-bottom: 10px; }
.side-stack ol, .side-stack ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.side-stack li { margin-bottom: 6px; }
.app-mini { display: grid; gap: 12px; padding: 20px; border-radius: var(--radius-lg); color: #fff; background: var(--arcade-gradient); }
.app-mini h2 { color: #fff; font-size: 1.15rem; margin: 0; }
.app-mini p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }
.app-mini .row { display: flex; gap: 12px; align-items: center; }
.app-mini img.logo { width: 52px; height: 52px; border-radius: 15px; }

.stage:focus { outline: none; }
.stage {
  --c: var(--purple);
  position: relative; overflow: hidden; border-radius: var(--radius-xl); background: var(--surface);
  border: 1px solid var(--outline-soft); box-shadow: var(--shadow-md); min-height: 440px;
}
.stage-inner { padding: clamp(16px, 3.4vw, 32px); }
.stage-loading { display: grid; place-items: center; min-height: 440px; color: var(--ink-2); gap: 12px; text-align: center; padding: 24px; }
.spinner { width: 40px; height: 40px; border-radius: 999px; border: 4px solid var(--surface-high); border-top-color: var(--c); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage h2 { font-size: 1.4rem; }

.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.setup-head h2 { margin: 0; }
.diff-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); margin: 0 0 20px; padding: 0; border: 0; }
.diff-option { position: relative; display: block; cursor: pointer; }
.diff-option input { position: absolute; opacity: 0; pointer-events: none; }
.diff-option .box {
  display: grid; gap: 8px; height: 100%; padding: 16px; border-radius: var(--radius-md); border: 2px solid var(--outline);
  background: var(--surface-low); transition: border-color 0.15s, background-color 0.15s, transform 0.15s var(--ease);
}
.diff-option:hover .box { transform: translateY(-2px); }
.diff-option input:checked + .box { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); box-shadow: 0 10px 24px -16px var(--c); }
.diff-option input:focus-visible + .box { outline: 3px solid var(--primary); outline-offset: 2px; }
.diff-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.diff-title .check { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--outline); display: grid; place-items: center; color: #fff; }
.diff-option input:checked + .box .check { background: var(--c); border-color: var(--c); }
.diff-title .check .icon { width: 16px; height: 16px; opacity: 0; }
.diff-option input:checked + .box .check .icon { opacity: 1; }
.diff-option ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.9rem; color: var(--ink-2); }
.diff-option li { display: flex; gap: 6px; }
.diff-option li::before { content: '•'; color: var(--c); font-weight: 900; }
.diff-best { font-size: 0.85rem; font-weight: 700; color: color-mix(in srgb, var(--c) 55%, var(--ink)); }
.setup-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.setup-note { margin: 16px 0 0; font-size: 0.88rem; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.setup-note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--teal-deep); }
:root[data-theme='dark'] .setup-note .icon { color: var(--teal); }

.countdown-view { min-height: 440px; display: grid; place-items: center; text-align: center; }
.count-num {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 18vw, 9rem); line-height: 1; color: var(--c);
  animation: pop 0.6s var(--ease);
}
.count-label { color: var(--ink-2); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

.hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hud-score { margin-right: auto; display: grid; line-height: 1.1; }
.hud-score small { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; color: var(--ink-2); }
.hud-score strong { font-family: var(--font-display); font-size: 1.8rem; color: var(--c); font-variant-numeric: tabular-nums; }
.hud .pill { background: color-mix(in srgb, var(--c) 13%, var(--surface)); color: color-mix(in srgb, var(--c) 50%, var(--ink)); }
.hud-lives { display: inline-flex; gap: 2px; color: var(--error); }
.hud-lives .icon { width: 22px; height: 22px; }
.hud-lives .lost { color: var(--outline); }
.hud-time { font-variant-numeric: tabular-nums; }
.hud-actions { display: flex; gap: 8px; }
.hud-btn {
  position: relative; min-width: 44px; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--outline); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 0.92rem;
}
.hud-btn:hover:not([disabled]) { background: var(--surface-variant); }
.hud-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.hud-btn .icon { width: 22px; height: 22px; }
.hud-btn.hint .icon { color: #c98700; }
:root[data-theme='dark'] .hud-btn.hint .icon { color: var(--amber); }
.hud-btn .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: #3a2500; font-size: 0.75rem; display: grid; place-items: center;
}
.timerbar { height: 8px; border-radius: 999px; background: var(--surface-high); overflow: hidden; margin-bottom: 16px; }
.timerbar > span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--c); transform-origin: left center; transition: background-color 0.3s; }
.timerbar.low > span { background: var(--error); }
.timerbar[hidden] { display: none; }
.status-line { min-height: 1.6em; margin: 0 0 14px; font-weight: 700; text-align: center; color: var(--ink-2); }
.feedback { min-height: 56px; display: grid; place-items: center; margin-top: 14px; }
.feedback-msg {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; font-weight: 700; text-align: center; line-height: 1.35;
  animation: rise 0.25s var(--ease);
}
.feedback-msg.good { background: var(--success-container); color: var(--success-ink); }
.feedback-msg.bad { background: var(--error-container); color: var(--error-ink); }
.feedback-msg.info { background: var(--surface-variant); color: var(--ink); }
.feedback-msg .icon { width: 20px; height: 20px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.board { margin: 0 auto; }

/* Pause overlay */
.overlay {
  position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.overlay-card { width: min(100%, 380px); display: grid; gap: 12px; text-align: center; }
.overlay-card h2 { margin: 0; }
.overlay-card ul { text-align: left; color: var(--ink-2); margin: 0 0 6px; padding-left: 1.2em; }

/* Results */
.results { text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; justify-items: center; }
.results h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.results .big-score { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.2rem, 10vw, 5rem); line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.results .big-score small { display: block; font-family: var(--font-body); font-size: 0.9rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }
.stat-grid { width: 100%; max-width: 560px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stat { padding: 14px 10px; border-radius: var(--radius-md); background: var(--surface-low); border: 1px solid var(--outline-soft); display: grid; gap: 4px; justify-items: center; }
.stat .icon { width: 22px; height: 22px; color: var(--c); }
.stat strong { font-family: var(--font-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.82rem; color: var(--ink-2); font-weight: 600; }
.pattern { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 560px; }
.pattern i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 0.7rem; color: #fff; font-weight: 800; }
.pattern i.y { background: var(--success); }
.pattern i.n { background: var(--error); }
:root[data-theme='dark'] .pattern i { color: #111; }
.results .btn-row { justify-content: center; }
.results-note { font-size: 0.85rem; color: var(--ink-2); max-width: 460px; margin: 0; }
.app-cta {
  width: 100%; max-width: 640px; display: grid; gap: 16px; align-items: center; text-align: left;
  padding: 20px; border-radius: var(--radius-lg); background: var(--arcade-gradient); color: #fff; box-shadow: var(--shadow-glow);
}
.app-cta h3 { color: #fff; margin: 0 0 4px; font-size: 1.2rem; }
.app-cta p { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }
.app-cta img.logo { width: 60px; height: 60px; border-radius: 17px; }
@media (min-width: 620px) { .app-cta { grid-template-columns: auto 1fr auto; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 620px, 0) rotate(var(--r)); opacity: 0.2; } }

/* Shared tile button */
.tile-btn {
  position: relative; display: grid; place-items: center; padding: 0; border: 1px solid var(--outline); border-radius: 14px;
  background: var(--surface); color: var(--ink); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 0.15s var(--ease), background-color 0.18s, border-color 0.18s, opacity 0.2s;
}
.tile-btn:not([disabled]):hover { border-color: color-mix(in srgb, var(--c) 55%, var(--outline)); }
.tile-btn:not([disabled]):active { transform: scale(0.96); }
.tile-btn[disabled] { cursor: default; }

/* Memory Matrix */
.mx-grid { display: grid; gap: clamp(6px, 1.6vw, 10px); width: min(100%, 460px); margin: 0 auto; }
.mx-cell { aspect-ratio: 1; background: var(--surface-variant); border-color: color-mix(in srgb, var(--outline) 60%, transparent); }
.mx-cell .icon { width: 45%; height: 45%; color: #fff; }
.mx-cell .ord { color: #fff; font-weight: 800; font-size: 1.15rem; }
.mx-cell.lit { background: var(--c); border-color: var(--c); transform: scale(1.06); box-shadow: 0 10px 24px -10px var(--c); }
.mx-cell.found { background: var(--c); border-color: var(--c); }
.mx-cell.wrong { background: var(--error); border-color: var(--error); animation: shake 0.35s; }
.mx-cell.missed { border: 3px solid var(--c); }
.mx-cell.missed .icon { color: var(--c); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Memory Match */
.mm-grid { display: grid; gap: clamp(8px, 1.8vw, 12px); width: min(100%, 480px); margin: 0 auto; perspective: 900px; }
.mm-card { aspect-ratio: 0.78; padding: 0; border: 0; background: none; border-radius: 16px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mm-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.38s var(--ease); }
.mm-card.up .mm-inner { transform: rotateY(180deg); }
.mm-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.mm-back { background: var(--arcade-gradient); box-shadow: 0 8px 18px -10px var(--glow); border: 1px solid rgba(255, 255, 255, 0.25); }
.mm-back .icon { width: 45%; height: 45%; color: rgba(255, 255, 255, 0.35); }
.mm-front { background: var(--surface); border: 1px solid var(--outline); transform: rotateY(180deg); }
.mm-front .icon { width: 50%; height: 50%; }
.mm-card.matched .mm-front { border: 3px solid var(--success); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.mm-card.matched .mm-inner { animation: matchpop 0.4s var(--ease) 0.3s; }
@keyframes matchpop { 50% { transform: rotateY(180deg) scale(1.08); } }
.mm-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Logic Path */
.lp-wrap { display: grid; align-items: center; gap: 4px; width: min(100%, 520px); margin: 0 auto; }
.lp-tile { aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.lp-tile svg { width: 100%; height: 100%; transition: transform 0.16s ease-out; }
.lp-tile .pipe { stroke: color-mix(in srgb, var(--ink-2) 70%, transparent); transition: stroke 0.2s; }
.lp-tile .hub { fill: color-mix(in srgb, var(--ink-2) 70%, transparent); }
.lp-tile .core { fill: #fff; opacity: 0; }
.lp-tile.on { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.lp-tile.on .pipe { stroke: var(--c); stroke-width: 26; }
.lp-tile.on .hub { fill: var(--c); }
.lp-tile.on .core { opacity: 1; }
.lp-tile .lock { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; color: var(--ink-2); }
.lp-edge { display: grid; place-items: center; color: var(--c); }
.lp-edge .icon { width: 85%; height: auto; aspect-ratio: 1; }
.lp-solved .lp-tile.on { animation: glowpulse 0.9s ease; }
@keyframes glowpulse { 50% { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 70%, transparent)); } }

/* Odd One Out */
.odd-grid { display: grid; gap: clamp(8px, 1.8vw, 12px); width: min(100%, 460px); margin: 0 auto; }
.odd-cell { aspect-ratio: 1; border-radius: 16px; font-family: var(--font-display); font-weight: 700; }
.odd-cell svg { width: 100%; height: 100%; }
.odd-cell svg g { fill: var(--c); }
.odd-cell .num { font-size: clamp(1.4rem, 5vw, 1.9rem); }
.odd-cell .let { font-size: clamp(1.8rem, 6.5vw, 2.5rem); display: inline-block; }
.odd-cell .let.mirror { transform: scaleX(-1); }
.odd-cell.right { border: 3px solid var(--success); }
.odd-cell.wrong { border: 3px solid var(--error); }
.odd-cell.dim { opacity: 0.3; }
.odd-cell .badge { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; }
.odd-cell.right .badge { color: var(--success); }
.odd-cell.wrong .badge { color: var(--error); }

/* Word Scramble */
.ws { display: grid; gap: 18px; justify-items: center; width: min(100%, 560px); margin: 0 auto; }
.ws-clue { width: 100%; display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink); font-weight: 600; }
.ws-clue .icon { width: 22px; height: 22px; color: var(--c); }
.ws-clue.hidden-clue { color: var(--ink-2); font-style: italic; font-weight: 500; }
.ws-slots, .ws-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ws-slot, .ws-tile { width: clamp(38px, 10vw, 54px); height: clamp(46px, 12vw, 62px); border-radius: 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 4.4vw, 1.7rem); }
.ws-slot { border: 2px dashed var(--outline); background: var(--surface-low); }
.ws-slot.filled { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.ws-slot.revealed { background: color-mix(in srgb, var(--amber) 22%, var(--surface)); border-color: var(--amber); }
.ws.solved .ws-slot { border-color: var(--success); background: var(--success-container); color: var(--success-ink); }
.ws.wrong .ws-slots { animation: shake 0.35s; }
.ws.wrong .ws-slot.filled { border-color: var(--error); }
.ws-tile { background: var(--surface); box-shadow: 0 3px 0 var(--outline); border: 1px solid var(--outline); }
.ws-tile.used { opacity: 0.25; box-shadow: none; }
.ws-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* Quiz */
.quiz { display: grid; gap: 16px; width: min(100%, 620px); margin: 0 auto; }
.quiz-prompt {
  position: relative; padding: clamp(22px, 5vw, 36px) 16px; border-radius: var(--radius-lg); text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 9%, var(--surface)), color-mix(in srgb, var(--c) 18%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c) 20%, transparent);
}
.quiz-kind { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: color-mix(in srgb, var(--c) 55%, var(--ink)); margin-bottom: 10px; }
.quiz-text { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 7vw, 3rem); line-height: 1.15; font-variant-numeric: tabular-nums; word-spacing: 0.06em; }
.quiz-rule { margin-top: 12px; }
.quiz-options { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.quiz-opt {
  position: relative; min-height: 68px; border-radius: var(--radius-md); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 4.5vw, 1.7rem);
  font-variant-numeric: tabular-nums; box-shadow: 0 3px 0 var(--outline);
}
.quiz-opt .key { position: absolute; left: 10px; top: 8px; font-family: var(--font-body); font-size: 0.72rem; color: var(--ink-2); font-weight: 700; }
.quiz-opt .badge { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; }
.quiz-opt.correct { background: var(--success-container); border-color: var(--success); color: var(--success-ink); box-shadow: none; }
.quiz-opt.wrong { background: var(--error-container); border-color: var(--error); color: var(--error-ink); box-shadow: none; }
.quiz-opt.out { opacity: 0.3; text-decoration: line-through; box-shadow: none; }
.combo { animation: pop 0.35s var(--ease); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px 0; }
.notfound .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 20vw, 10rem); line-height: 1; }

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

/* Comparison table (About) */
.compare { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--outline-soft); vertical-align: middle; }
.compare thead th { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.compare tbody th { font-weight: 600; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare td { color: var(--ink-2); }
.compare td .icon { width: 22px; height: 22px; color: var(--success); }

@media (max-width: 520px) {
  .hero-copy .btn-row .btn { flex: 1 1 100%; padding-left: 1em; padding-right: 1em; }
}
