:root {
  --screen-fill: #fff8e7;
  --screen-ink: #2a2140;
  --screen-quiet: #6e6152;
  --screen-radius: 0;
  --card-fill: #ffffff;
  --card-ink: #2a2140;
  --card-quiet: #6e6152;
  --card-radius: 18;
  --card-border: #f0e2c2;
  --card-border-width: 2;
  --card-edge: #f0e2c2;
  --card-edge-depth: 4;
  --tint-fill: #ecebff;
  --tint-ink: #2a2140;
  --tint-quiet: #4a4570;
  --tint-radius: 16;
  --tint-border: #d3d1f5;
  --tint-border-width: 2;
  --tint-edge: #d3d1f5;
  --tint-edge-depth: 3;
  --primary-button-fill: #ffc83d;
  --primary-button-ink: #2a1f14;
  --primary-button-radius: 18;
  --primary-button-edge: #dda017;
  --primary-button-edge-depth: 5;
  --secondary-button-fill: #ffffff;
  --secondary-button-ink: #2a1f14;
  --secondary-button-radius: 18;
  --secondary-button-border: #ead9b5;
  --secondary-button-border-width: 2;
  --secondary-button-edge: #ead9b5;
  --secondary-button-edge-depth: 5;
  --pill-school-year-fill: #ffefd2;
  --pill-school-year-ink: #8a4b00;
  --pill-school-year-radius: 9;
  --pill-easy-fill: #ddf5ee;
  --pill-easy-ink: #0b6b5c;
  --pill-easy-radius: 9;
  --pill-medium-fill: #dfe9ff;
  --pill-medium-ink: #1f4fb5;
  --pill-medium-radius: 9;
  --pill-hard-fill: #ffe3dd;
  --pill-hard-ink: #9e2a17;
  --pill-hard-radius: 9;
  --avatar-coral-fill: #c23a24;
  --avatar-coral-ink: #ffffff;
  --avatar-coral-radius: 999;
  --avatar-blue-fill: #2f6feb;
  --avatar-blue-ink: #ffffff;
  --avatar-blue-radius: 999;
  --avatar-teal-fill: #0a7a6b;
  --avatar-teal-ink: #ffffff;
  --avatar-teal-radius: 999;
  --avatar-purple-fill: #7a4fe0;
  --avatar-purple-ink: #ffffff;
  --avatar-purple-radius: 999;
  --avatar-orange-fill: #a35c00;
  --avatar-orange-ink: #ffffff;
  --avatar-orange-radius: 999;
  --equation-card-fill: #ffffff;
  --equation-card-ink: #2a2140;
  --equation-card-radius: 26;
  --equation-card-border: #f0e2c2;
  --equation-card-border-width: 2;
  --equation-card-edge: #f0e2c2;
  --equation-card-edge-depth: 5;
  --answer-empty-fill: #ffffff;
  --answer-empty-ink: #2a2140;
  --answer-empty-quiet: #847558;
  --answer-empty-radius: 20;
  --answer-empty-border: #ffc83d;
  --answer-empty-border-width: 3;
  --answer-right-fill: #167a4b;
  --answer-right-ink: #ffffff;
  --answer-right-radius: 20;
  --answer-right-edge: #0f5a37;
  --answer-right-edge-depth: 5;
  --answer-wrong-fill: #c7351d;
  --answer-wrong-ink: #ffffff;
  --answer-wrong-radius: 20;
  --answer-wrong-edge: #b5341f;
  --answer-wrong-edge-depth: 5;
  --key-fill: #ffffff;
  --key-ink: #2a2140;
  --key-radius: 16;
  --key-border: #f0e2c2;
  --key-border-width: 2;
  --key-edge: #f0e2c2;
  --key-edge-depth: 4;
  --enter-fill: #ffc83d;
  --enter-ink: #2a1f14;
  --enter-radius: 18;
  --enter-edge: #dda017;
  --enter-edge-depth: 5;
  --enter-off-fill: #f4ecda;
  --enter-off-ink: #b5a88f;
  --enter-off-radius: 18;
  --double-points-fill: #ffc83d;
  --double-points-ink: #2a1f14;
  --double-points-radius: 12;
  --double-points-edge: #dda017;
  --double-points-edge-depth: 3;
  --row-fill: #ffffff;
  --row-ink: #2a2140;
  --row-quiet: #6e6152;
  --row-radius: 16;
  --row-border: #f0e2c2;
  --row-border-width: 2;
  --row-edge: #f0e2c2;
  --row-edge-depth: 4;
  --row-you-fill: #ecebff;
  --row-you-ink: #2a2140;
  --row-you-quiet: #4a4570;
  --row-you-radius: 16;
  --row-you-border: #d3d1f5;
  --row-you-border-width: 2;
  --row-you-edge: #d3d1f5;
  --row-you-edge-depth: 4;
  --podium1-fill: #ffc83d;
  --podium1-ink: #2a1f14;
  --podium1-radius: 20;
  --podium1-edge: #dda017;
  --podium1-edge-depth: 5;
  --podium2-fill: #ecebff;
  --podium2-ink: #2a2140;
  --podium2-radius: 20;
  --podium2-edge: #d3d1f5;
  --podium2-edge-depth: 5;
  --podium3-fill: #ffffff;
  --podium3-ink: #2a2140;
  --podium3-radius: 20;
  --podium3-border: #f0e2c2;
  --podium3-border-width: 2;
  --podium3-edge: #f0e2c2;
  --podium3-edge-depth: 5;
  --link: #c2361f;
  --divider: #f3e7cc;
  --divider-width: 2;
  --text-headline-size: 32;
  --text-headline-weight: 900;
  --text-headline-line: 1.15;
  --text-screen-title-size: 26;
  --text-screen-title-weight: 900;
  --text-screen-title-line: 1.25;
  --text-section-title-size: 21;
  --text-section-title-weight: 900;
  --text-section-title-line: 1.25;
  --text-row-title-size: 19;
  --text-row-title-weight: 900;
  --text-row-title-line: 1.25;
  --text-lead-size: 18;
  --text-lead-weight: 700;
  --text-lead-line: 1.4;
  --text-button-size: 18;
  --text-button-weight: 900;
  --text-button-line: 1.2;
  --text-label-size: 16;
  --text-label-weight: 800;
  --text-label-line: 1.3;
  --text-helper-size: 15;
  --text-helper-weight: 600;
  --text-helper-line: 1.35;
  --text-card-size: 15;
  --text-card-weight: 700;
  --text-card-line: 1.4;
  --text-meta-size: 14;
  --text-meta-weight: 700;
  --text-meta-line: 1.35;
  --text-meta-strong-size: 14;
  --text-meta-strong-weight: 900;
  --text-meta-strong-line: 1.35;
  --text-chip-size: 15;
  --text-chip-weight: 900;
  --text-chip-line: 1.2;
  --text-pill-size: 11;
  --text-pill-weight: 900;
  --text-pill-line: 1.2;
  --play-typed-answer-size: 38;
  --play-typed-answer-weight: 900;
  --play-typed-answer-line: 1.2;
  --play-verdict-size: 20;
  --play-verdict-weight: 900;
  --play-verdict-line: 1.2;
  --play-key-digit-size: 27;
  --play-key-digit-weight: 900;
  --play-key-digit-line: 1;
  --play-enter-size: 21;
  --play-enter-weight: 900;
  --play-enter-line: 1.2;
  --play-equation-size: 84;
  --play-key-height: 56;
  --play-enter-height: 62;
  --play-key-gap: 11;
  --play-answer-height: 66;
  --play-timer-height: 14;
  --play-timer-track: #f0e2c2;
  --play-timer-fill: #f0533a;
  --right-text: #167a4b;
  --move-up: #167a4b;
  --move-up-on-you: #3e3a9a;
  --move-down: #8a2414;
  --move-down-on-you: #8a2414;
  --logo-plus-key: #f0533a;
  --logo-minus-key: #2f6feb;
  --logo-times-key: #0fa38f;
  --logo-divide-key: #7a4fe0;
  --font-family: 'Nunito';
}

/* Generated :root custom properties from app/lib/theme appear above this line. */

@font-face {
  font-family: Nunito;
  src: url(nunito-67a8a9a5.ttf) format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --gutter: clamp(16px, 4vw, 36px);
  --max-w: 1140px;
  --ink-outline: 2.5px solid var(--screen-ink);
  --hard-shadow-sm: 0 3px 0 var(--screen-ink);
  --hard-shadow-md: 0 5px 0 var(--screen-ink);
  --hard-shadow-lg: 0 7px 0 var(--screen-ink);
  color-scheme: light;
}

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

[hidden] {
  display: none !important;
}

html {
  background: var(--screen-fill);
  color: var(--screen-ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgb(255 200 61 / 0.22), transparent 34%),
    radial-gradient(circle at 88% 14%, rgb(15 163 143 / 0.12), transparent 36%),
    var(--screen-fill);
  color: var(--screen-ink);
  font-family: var(--font-family), 'Noto Sans Tamil', 'Tamil Sangam MN', 'Latha', system-ui, -apple-system, sans-serif;
  font-size: calc(var(--text-lead-size) * 0.0625rem);
  font-weight: var(--text-card-weight);
  line-height: 1.5;
  overflow-wrap: break-word;
  overflow-x: clip;
}

h1, h2, h3 {
  font-weight: var(--text-headline-weight);
  line-height: var(--text-headline-line);
  margin: 0 0 0.35em;
  color: var(--screen-ink);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.75rem, 4.6vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.22;
}

p {
  margin: 0 0 0.75em;
}

a {
  color: var(--link);
  font-weight: 800;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--answer-wrong-edge);
  outline-offset: 3px;
  border-radius: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Out of sight above the page, however tall its text wraps, until it has
   focus. */
.skip-link {
  position: absolute;
  max-width: calc(100% - 2 * var(--gutter));
  left: var(--gutter);
  top: 0;
  transform: translateY(calc(-100% - 12px));
  z-index: 100;
  padding: 0.625rem min(1.125rem, 4vw);
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: var(--ink-outline);
  border-radius: 14px;
  box-shadow: var(--hard-shadow-sm);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(12px);
}

/* Layout containers */
.topbar-inner,
.hero-shell,
.story-intro,
.how-section,
.ways-section,
.audience-section,
.locales-section,
.privacy-section,
.download-section,
.footer-inner {
  width: min(100% - 2 * var(--gutter), var(--max-w));
  margin-left: auto;
  margin-right: auto;
}

/* Top navigation bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(255 246 230 / 0.92);
  border-bottom: 2px solid var(--divider);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--screen-ink);
  font-weight: 900;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
}

/* With a large text size on a narrow screen the logo stands for the name,
   which the hero shows in full. */
@media (max-width: 19.9em) {
  .brand-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.brand-link img {
  border-radius: 11px;
  border: 2px solid var(--screen-ink);
  box-shadow: 0 2px 0 var(--screen-ink);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.try-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: 2px solid var(--screen-ink);
  box-shadow: 0 3px 0 var(--screen-ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 38.75em) {
  .try-pill {
    display: none;
  }
}

.lang-picker {
  position: relative;
}

.lang-picker summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.625rem;
  padding: 0.4375rem 0.875rem;
  background: var(--card-fill);
  color: var(--screen-ink);
  border: 2px solid var(--screen-ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--screen-ink);
  font-weight: 800;
  font-size: 0.9375rem;
}

.lang-picker summary::-webkit-details-marker {
  display: none;
}

.globe-icon {
  width: 1.0625rem;
  height: 1.0625rem;
  border-radius: 50%;
  border: 2.2px solid currentColor;
  position: relative;
  flex-shrink: 0;
}

.globe-icon::before {
  content: '';
  position: absolute;
  inset: -1px 3px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}

/* The menu stays inside the screen, and scrolls when the text is too
   large for all its entries to show. */
.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  min-width: min(13.125rem, 100vw - 2 * var(--gutter));
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: calc(100svh - var(--bar-h, 4.25rem) - 8px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--card-fill);
  border: var(--ink-outline);
  border-radius: 18px;
  box-shadow: var(--hard-shadow-md), 0 18px 36px rgb(42 33 64 / 0.16);
}

.lang-dropdown a {
  display: block;
  padding: 0.5625rem 0.75rem;
  border-radius: 11px;
  text-decoration: none;
  color: var(--screen-ink);
  font-weight: 800;
  font-size: 0.9375rem;
}

.lang-dropdown a:hover {
  background: var(--tint-fill);
}

.lang-dropdown a[aria-current="page"] {
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
}

/* Tactile question chips & stacked fractions */
.eq-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  white-space: nowrap;
  padding: 0.42em 0.72em;
  font-size: clamp(1rem, 2vw, 1.375rem);
  font-weight: 900;
  line-height: 1;
  background: var(--card-fill);
  color: var(--screen-ink);
  border: var(--ink-outline);
  border-radius: 16px;
  box-shadow: var(--hard-shadow-sm);
}

.s-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  font-size: 0.64em;
  line-height: 1.04;
  margin: 0 0.12em;
}

.s-frac > .num {
  border-bottom: 0.13em solid currentColor;
  padding: 0 0.18em 0.05em;
}

.s-frac > .den {
  padding-top: 0.05em;
}

/* A missing number's box, as the app draws it (ADR 0027): an empty outline
   two digits wide and 0.72 of the line tall, with a 0.05 em pen. */
.q-gap {
  display: inline-block;
  width: 2ch;
  height: 0.72em;
  vertical-align: -0.04em;
  border: max(1.5px, 0.05em) solid currentColor;
  border-radius: 0.08em;
}

.s-frac .q-gap {
  vertical-align: middle;
}

.icon {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  vertical-align: -0.15em;
}

.no-js .js-only,
html:not(.no-js) .no-js-only {
  display: none !important;
}

/* 1. HERO SECTION */
.hero-section {
  position: relative;
  padding: clamp(1.75rem, 5vw, 4rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.hero-constellation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orbit-node {
  position: absolute;
  transform: translate(-50%, -50%);
}

.hc-1 { left: 7%; top: 18%; }
.hc-2 { left: 92%; top: 16%; }
.hc-3 { left: 5%; top: 54%; }
.hc-4 { left: 94%; top: 52%; }
.hc-5 { left: 8%; top: 84%; }
.hc-6 { left: 91%; top: 82%; }

@media (max-width: 73.75em) {
  .hc-3, .hc-4 { display: none; }
  .hc-1 { left: 10%; top: 8%; }
  .hc-2 { left: 88%; top: 8%; }
  .hc-5 { left: 12%; top: 93%; }
  .hc-6 { left: 88%; top: 93%; }
}

@media (max-width: 42.5em) {
  .hero-constellation {
    display: none;
  }
}

.hero-card {
  position: relative;
  z-index: 1;
  max-width: 53.75rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4.5vw, 2.75rem);
  background: var(--card-fill);
  border: 3px solid var(--screen-ink);
  border-radius: 28px;
  box-shadow: var(--hard-shadow-lg);
}

.hero-pill-row {
  margin-bottom: 1.125rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--pill-school-year-fill);
  color: var(--screen-ink);
  border: 2px solid var(--screen-ink);
  font-size: 0.8125rem;
  font-weight: 900;
}

.live-dot {
  width: 0.5625rem;
  height: 0.5625rem;
  border-radius: 50%;
  background: var(--answer-wrong-fill);
  flex-shrink: 0;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.hero-app-icon {
  width: clamp(72px, 10vw, 96px);
  height: clamp(72px, 10vw, 96px);
  border-radius: 22px;
  border: 3px solid var(--screen-ink);
  box-shadow: 0 4px 0 var(--screen-ink);
  flex-shrink: 0;
}

.hero-titles h1 {
  font-size: clamp(2.25rem, 7vw, 4.25rem);
  line-height: 1.02;
  margin: 0 0 0.375rem;
}

.hero-tagline {
  margin: 0;
  font-size: clamp(1.1875rem, 2.8vw, 1.625rem);
  font-weight: 900;
  color: var(--answer-wrong-edge);
  line-height: 1.2;
}

.hero-subline {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--screen-quiet);
  max-width: 44em;
  margin-bottom: 1.5rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

/* The stores' own badges, never redrawn. Both show at the same visible
   height, and the gap and padding keep each store's clear space of a
   quarter of the badge's height. Google's PNG carries a transparent margin,
   which the negative margins take back (see badges.dart). */
.store-group {
  --badge-height: 52px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--badge-height) / 4);
  padding: calc(var(--badge-height) / 4);
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 9px;
}

.store-badge img {
  display: block;
  width: auto;
  height: calc(var(--badge-height) * var(--badge-scale, 1));
  margin:
    calc(var(--badge-height) * var(--badge-top, 0) * -1)
    calc(var(--badge-height) * var(--badge-right, 0) * -1)
    calc(var(--badge-height) * var(--badge-bottom, 0) * -1)
    calc(var(--badge-height) * var(--badge-left, 0) * -1);
}

.get-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.5rem;
  padding: 0.625rem 1.375rem;
  background: var(--screen-ink);
  color: var(--screen-fill);
  border: 2.5px solid var(--screen-ink);
  border-radius: 16px;
  box-shadow: var(--hard-shadow-md);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.0625rem;
}

.play-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.5rem;
  padding: 0.625rem 1.375rem;
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: 2.5px solid var(--screen-ink);
  border-radius: 16px;
  box-shadow: var(--hard-shadow-md);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.0625rem;
}

/* With a large text size a button, or a sample question, may need two
   lines on a narrow screen. */
.sample-chips-row .eq-chip,
.signs-live-preview .eq-chip {
  flex-wrap: wrap;
  white-space: normal;
  max-width: 100%;
}

.get-app-btn,
.play-jump-btn {
  max-width: 100%;
}

.play-jump-icon {
  display: inline-grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--screen-ink);
  color: var(--primary-button-fill);
}

.play-jump-icon .icon {
  width: 0.875rem;
  height: 0.875rem;
}

@media (max-width: 35em) {
  .hero-brand-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* 2. SCROLL STORY & LIVE PLAYABLE PHONE */
.story-section {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.story-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-lead {
  color: var(--screen-quiet);
  max-width: 40em;
  margin: 0;
}

.stage-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.3125rem;
  background: var(--card-fill);
  border: var(--ink-outline);
  border-radius: 16px;
  box-shadow: var(--hard-shadow-sm);
}

.mode-toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--screen-ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 900;
  padding: 0.5625rem 1rem;
  border-radius: 11px;
  cursor: pointer;
}

.mode-toggle-btn.is-active {
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  box-shadow: 0 2px 0 var(--screen-ink);
}

/* Phone screen internal scaling: --u is 1 app logical pixel (360x740 canvas) */
.phone-screen {
  --u: calc(var(--pw) / 360);
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--screen-fill);
  color: var(--screen-ink);
  border-radius: inherit;
  font-family: var(--font-family), sans-serif;
  display: flex;
  flex-direction: column;
  padding: calc(28 * var(--u)) calc(22 * var(--u)) calc(12 * var(--u));
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(30 * var(--u));
}

.phone-q-count {
  font-size: calc(var(--text-screen-title-size) * 0.92 * var(--u));
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.phone-timer-track {
  margin-top: calc(8 * var(--u));
  height: calc(var(--play-timer-height) * var(--u));
  border-radius: 99px;
  background: var(--play-timer-track);
  border: calc(1.5 * var(--u)) solid var(--screen-ink);
  overflow: hidden;
}

.phone-timer-bar {
  display: block;
  height: 100%;
  width: 76%;
  border-radius: inherit;
  background: var(--play-timer-fill);
  transform-origin: 0 50%;
}

.phone-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8 * var(--u));
  margin-top: calc(8 * var(--u));
  min-height: calc(26 * var(--u));
}

.phone-score-slot {
  position: relative;
  flex: 1;
  text-align: right;
  min-height: calc(19 * var(--u));
}

.phone-score {
  display: block;
  font-size: calc(var(--text-meta-strong-size) * var(--u));
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
}

.phone-score-slot .anim-layer {
  position: absolute;
  right: 0;
  top: 0;
}

.double-badge {
  padding: calc(3 * var(--u)) calc(9 * var(--u));
  background: var(--double-points-fill);
  color: var(--double-points-ink);
  border: calc(1.5 * var(--u)) solid var(--screen-ink);
  border-radius: calc(var(--double-points-radius) * var(--u));
  box-shadow: 0 calc(2.5 * var(--u)) 0 var(--screen-ink);
  font-size: calc(12 * var(--u));
  font-weight: 900;
  white-space: nowrap;
}

.q-slot {
  margin-top: calc(9 * var(--u));
  height: calc(122 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--equation-card-fill);
  color: var(--equation-card-ink);
  border: calc(2.2 * var(--u)) solid var(--screen-ink);
  border-radius: calc(var(--equation-card-radius) * var(--u));
  box-shadow: 0 calc(4 * var(--u)) 0 var(--screen-ink);
}

.phone-eq {
  font-size: calc(var(--play-equation-size) * 0.68 * var(--u));
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.phone-eq.is-wide-eq {
  font-size: calc(var(--play-equation-size) * 0.56 * var(--u));
}

.phone-eq.is-long-eq {
  font-size: calc(var(--play-equation-size) * 0.4 * var(--u));
}

.ans-slot {
  position: relative;
  margin-top: calc(14 * var(--u));
  height: calc(var(--play-answer-height) * var(--u));
}

.ans-box {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--answer-empty-radius) * var(--u));
  background: var(--answer-empty-fill);
  color: var(--answer-empty-ink);
  border: calc(2.5 * var(--u)) solid var(--double-points-edge);
  font-size: calc(var(--play-typed-answer-size) * var(--u));
  font-weight: 900;
  line-height: 1;
}

.ans-idle {
  color: var(--answer-empty-quiet);
}

.ans-correct {
  justify-content: space-between;
  padding: 0 calc(18 * var(--u));
  background: var(--answer-right-fill);
  color: var(--answer-right-ink);
  border: calc(2.2 * var(--u)) solid var(--screen-ink);
  box-shadow: 0 calc(4 * var(--u)) 0 var(--screen-ink);
}

.ans-correct em {
  font-style: normal;
  font-size: calc(var(--play-verdict-size) * 0.9 * var(--u));
  font-weight: 900;
  white-space: nowrap;
}

.ans-wrong {
  background: var(--answer-wrong-fill);
  color: var(--answer-wrong-ink);
  border: calc(2.2 * var(--u)) solid var(--screen-ink);
  font-size: calc(var(--play-verdict-size) * var(--u));
}

.points-pop {
  position: absolute;
  right: calc(8 * var(--u));
  top: calc(-32 * var(--u));
  z-index: 3;
  padding: calc(4 * var(--u)) calc(11 * var(--u));
  border-radius: 99px;
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: calc(2 * var(--u)) solid var(--screen-ink);
  box-shadow: 0 calc(3 * var(--u)) 0 var(--screen-ink);
  font-size: calc(19 * var(--u));
  font-weight: 900;
  line-height: 1.1;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--play-key-gap) * 0.9 * var(--u));
  margin-top: calc(14 * var(--u));
}

.pad-key,
.pad-enter {
  appearance: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--play-key-height) * 0.88 * var(--u));
  background: var(--key-fill);
  color: var(--key-ink);
  border: calc(2 * var(--u)) solid var(--screen-ink);
  border-radius: calc(var(--key-radius) * var(--u));
  box-shadow: 0 calc(3.5 * var(--u)) 0 var(--screen-ink);
  font-size: calc(var(--play-key-digit-size) * var(--u));
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.pad-enter {
  width: 100%;
  margin-top: calc(var(--play-key-gap) * 0.9 * var(--u));
  height: calc(var(--play-enter-height) * 0.88 * var(--u));
  background: var(--enter-fill);
  color: var(--enter-ink);
  border-radius: calc(var(--enter-radius) * var(--u));
  box-shadow: 0 calc(4 * var(--u)) 0 var(--screen-ink);
  font-size: calc(var(--play-enter-size) * var(--u));
}

.pad-enter {
  gap: 0.3em;
}

.pad-enter.is-disabled {
  background: var(--enter-off-fill);
  color: var(--enter-off-ink);
  box-shadow: none;
}

/* Standings screen inside the phone */
.standings-screen {
  padding: calc(30 * var(--u)) calc(18 * var(--u));
}

.st-headline {
  margin: 0;
  font-size: calc(25 * var(--u));
  font-weight: 900;
  line-height: 1.15;
  color: var(--answer-wrong-edge);
}

.st-subline {
  margin: calc(4 * var(--u)) 0 calc(14 * var(--u));
  color: var(--screen-quiet);
  font-size: calc(13 * var(--u));
  font-weight: 800;
}

.st-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: calc(10 * var(--u));
}

.st-row {
  display: grid;
  grid-template-columns: calc(24 * var(--u)) 1fr auto;
  align-items: center;
  gap: calc(8 * var(--u));
  min-height: calc(66 * var(--u));
  padding: calc(8 * var(--u)) calc(14 * var(--u));
  background: var(--row-fill);
  color: var(--row-ink);
  border: calc(2 * var(--u)) solid var(--screen-ink);
  border-radius: calc(var(--row-radius) * var(--u));
  box-shadow: 0 calc(3.5 * var(--u)) 0 var(--screen-ink);
}

.st-row-you {
  background: var(--row-you-fill);
}

.st-rank {
  font-size: calc(24 * var(--u));
  font-weight: 900;
}

.st-who {
  font-size: calc(18 * var(--u));
  font-weight: 900;
  line-height: 1.15;
  min-width: 0;
}

.st-who small {
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin-top: calc(2 * var(--u));
  color: var(--right-text);
  font-size: calc(12 * var(--u));
  font-weight: 900;
}

.st-who small.move-down {
  color: var(--screen-quiet);
}

.st-who small .icon {
  width: 0.8em;
  height: 0.8em;
}

.st-pts {
  text-align: right;
  font-size: calc(22 * var(--u));
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.st-pts em {
  display: block;
  font-style: normal;
  color: var(--right-text);
  font-size: calc(12 * var(--u));
}

/* Big-Screen TV device */
.device-tv {
  width: var(--tw);
}

.tv-bezel {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--tw) * 0.028);
  background: var(--screen-fill);
  border: calc(var(--tw) * 0.016) solid #1d1a2b;
  box-shadow: 0 20px 48px rgb(42 33 64 / 0.25);
  overflow: hidden;
}

.tv-neck {
  width: 24%;
  height: calc(var(--tw) * 0.042);
  margin: 0 auto;
  background: #1d1a2b;
  border-radius: 0 0 10px 10px;
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.tv-canvas {
  --tu: calc(var(--tw) / 640);
  padding: calc(20 * var(--tu)) calc(28 * var(--tu));
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tv-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(12 * var(--tu));
  margin-bottom: calc(12 * var(--tu));
}

.tv-brand {
  font-size: calc(16 * var(--tu));
  font-weight: 900;
  color: var(--screen-quiet);
}

.tv-winners-headline {
  font-size: calc(24 * var(--tu));
  font-weight: 900;
  color: var(--answer-wrong-edge);
}

.tv-podium-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: calc(9 * var(--tu));
}

.tv-podium-row {
  display: grid;
  grid-template-columns: calc(32 * var(--tu)) 1fr auto;
  align-items: center;
  height: calc(50 * var(--tu));
  padding: 0 calc(16 * var(--tu));
  border-radius: calc(14 * var(--tu));
  border: calc(2 * var(--tu)) solid var(--screen-ink);
  font-size: calc(20 * var(--tu));
  font-weight: 900;
  background: var(--podium3-fill);
  color: var(--podium3-ink);
  box-shadow: 0 calc(3.5 * var(--tu)) 0 var(--screen-ink);
}

.tv-place-0 {
  background: var(--podium1-fill);
  color: var(--podium1-ink);
}

.tv-place-1 {
  background: var(--podium2-fill);
  color: var(--podium2-ink);
}

.tv-who {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--tu));
}

.mini-av {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
  font-size: 0.8125rem;
  color: #fff;
  border: 2px solid var(--screen-ink);
  flex-shrink: 0;
}

.tv-who .mini-av {
  width: calc(28 * var(--tu));
  height: calc(28 * var(--tu));
  font-size: calc(14 * var(--tu));
  border-width: calc(2 * var(--tu));
}

.av-coral { background: var(--avatar-coral-fill); }
.av-teal { background: var(--avatar-teal-fill); }
.av-blue { background: var(--avatar-blue-fill); }
.av-purple { background: var(--avatar-purple-fill); }

/* STATIC / NO-JS / REDUCED-MOTION LAYOUT FOR THE STORY */
.orbit-layer,
.phone-shadow-plate,
.phone-bezel-overlay,
.live-play-phone {
  display: none;
}


.no-js .story-chapters,
.still .story-chapters {
  width: min(100% - 2 * var(--gutter), var(--max-w));
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2.25rem;
}

.story-chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

.no-js .chapter-visual,
.still .chapter-visual {
  --pw: min(276px, 74vw);
  --ph: calc(var(--pw) * 740 / 360);
  --tw: min(500px, 86vw);
}

.no-js .finale-visual,
.still .finale-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.device-phone {
  position: relative;
  width: var(--pw);
  height: var(--ph);
  margin: 12px;
  border-radius: calc(var(--pw) * 0.105);
  box-shadow: 0 0 0 calc(var(--pw) * 0.034) #1d1a2b, 0 22px 44px rgb(42 33 64 / 0.22);
}

.device-phone::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: calc(var(--pw) * 0.028);
  left: 50%;
  width: calc(var(--pw) * 0.16);
  height: calc(var(--pw) * 0.024);
  border-radius: 99px;
  transform: translateX(-50%);
  background: #1d1a2b;
}

.chapter-caption {
  max-width: 34em;
}

.chapter-step-pill {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.1875rem 0.6875rem;
  border-radius: 999px;
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: 2px solid var(--screen-ink);
  font-size: 0.8125rem;
  font-weight: 900;
}

.chapter-caption p {
  color: var(--screen-quiet);
  margin: 0;
}

.no-js .anim-layer:not(.is-final),
.still .anim-layer:not(.is-final) {
  visibility: hidden;
}

@media (max-width: 48.75em) {
  .story-chapter {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.875rem;
  }
}

/* MOTION SCROLL-STORY STAGE (GPU-only transform + opacity) */
.motion .story-scroll-track {
  height: 540svh;
  position: relative;
}

.motion .story-scroll-track.is-play-mode {
  height: auto;
}

.motion .story-sticky-stage {
  position: sticky;
  top: var(--bar-h, 4.25rem);
  height: calc(100svh - var(--bar-h, 4.25rem));
  overflow: hidden;
  --ph: min(60svh, 540px);
  --pw: calc(var(--ph) * 360 / 740);
  --px: calc(50% - var(--pw) / 2);
  --py: 2.5svh;
  --tw: min(90vw, 480px);
  --sx: 0px;
  --sy: calc(var(--tw) * 0.5625 + 26px);
  --ss: 0.45;
  --k: 0;
}

.motion .story-scroll-track.is-play-mode .story-sticky-stage {
  position: relative;
  top: 0;
  height: max(680px, 84svh);
}

.motion .story-chapters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.motion .story-chapter {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  z-index: 3;
}

.motion .chapter-visual {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.motion .chapter-visual,
.motion .chapter-caption,
.motion .anim-layer {
  opacity: 0;
  will-change: transform, opacity;
}

.motion .phone-shadow-plate,
.motion .phone-bezel-overlay,
.motion .device-phone {
  display: block;
  position: absolute;
  margin: 0;
  left: var(--px);
  top: var(--py);
  width: var(--pw);
  height: var(--ph);
  border-radius: calc(var(--pw) * 0.105);
  transform-origin: 50% 0;
  transform:
    translate3d(calc(var(--k) * var(--sx)), calc(var(--k) * var(--sy)), 0)
    scale(calc(1 - var(--k) * (1 - var(--ss))));
  will-change: transform;
}

.motion .phone-shadow-plate,
.motion .device-phone {
  z-index: 2;
}

.motion .phone-shadow-plate {
  background: var(--screen-fill);
  box-shadow: 0 22px 44px rgb(42 33 64 / 0.22);
}

.motion .phone-bezel-overlay {
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 0 calc(var(--pw) * 0.034) #1d1a2b;
}

.motion .phone-bezel-overlay::after {
  content: '';
  position: absolute;
  top: calc(var(--pw) * 0.028);
  left: 50%;
  width: calc(var(--pw) * 0.16);
  height: calc(var(--pw) * 0.024);
  border-radius: 99px;
  transform: translateX(-50%);
  background: #1d1a2b;
}

.motion .device-phone {
  box-shadow: none;
}

.motion .device-phone::after {
  content: none;
}

.motion .device-tv {
  position: absolute;
  z-index: 1;
  left: calc(50% - var(--tw) / 2);
  top: var(--py);
  opacity: 0;
  will-change: transform, opacity;
}

.motion .chapter-caption {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(var(--py) + var(--ph) + 3svh);
  text-align: center;
  margin: 0 auto;
}

.motion .chapter-caption h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
}

.motion .orbit-layer {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.motion .orbit-item {
  position: absolute;
  transform: translate(-50%, -50%);
  left: calc(var(--px) + var(--fx) * var(--pw));
  top: calc(var(--py) + var(--fy) * var(--ph));
  will-change: transform, opacity;
}

.fly-q1 { --fx: -0.05; --fy: 0.18; }
.fly-q2 { --fx: 1.04; --fy: 0.24; }
.fly-q3 { --fx: -0.04; --fy: 0.34; }
.drift-1 { --fx: 1.04; --fy: 0.06; }
.drift-2 { --fx: -0.04; --fy: 0.84; }
.drift-3 { --fx: 1.05; --fy: 0.78; }
.drift-4 { --fx: -0.08; --fy: 0.56; }
.drift-5 { --fx: 1.06; --fy: 0.52; }

@media (max-width: 56.1875em) {
  .drift-3, .drift-4, .drift-5 {
    display: none;
  }
}

/* On a phone there is no room beside the story's phone, so only the chips
   that fly in show. */
@media (max-width: 37.4375em) {
  .drift-1, .drift-2 {
    display: none;
  }
}

/* On a short phone screen the captions get smaller, so the phone above
   them keeps a size that can be read. */
@media (max-width: 56.1875em) and (max-height: 37.5em) {
  .motion .chapter-caption h3 {
    font-size: 1.125rem;
  }

  .motion .chapter-caption p {
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .motion .chapter-step-pill {
    margin-bottom: 0.25rem;
  }
}

@media (min-width: 56.25em) {
  .motion .story-sticky-stage {
    --ph: min(76svh, 660px);
    --px: calc(29% - var(--pw) / 2);
    --py: calc(46svh - var(--ph) / 2);
    --tw: min(40vw, 560px);
    --sx: calc(var(--tw) * 0.42);
    --sy: calc(var(--tw) * 0.38);
    --ss: 0.44;
  }

  .motion .device-tv {
    left: calc(29% - var(--tw) / 2);
    top: 5svh;
  }

  .motion .chapter-caption {
    left: 55%;
    right: max(var(--gutter), calc((100% - var(--max-w)) / 2));
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
  }

  .motion .chapter-caption h3 {
    font-size: clamp(1.75rem, 3vw, 2.625rem);
  }

  .motion .chapter-caption p {
    font-size: 1.1875rem;
  }

  .fly-q1 { --fx: -0.32; --fy: 0.16; }
  .fly-q2 { --fx: 1.32; --fy: 0.28; }
  .fly-q3 { --fx: -0.34; --fy: 0.52; }
  .drift-1 { --fx: 1.24; --fy: 0.08; }
  .drift-2 { --fx: -0.24; --fy: 0.86; }
  .drift-3 { --fx: 1.28; --fy: 0.72; }
  .drift-4 { --fx: -0.36; --fy: 0.34; }
  .drift-5 { --fx: 1.22; --fy: 0.92; }
}

/* Only the hero's and the story's decorative chips bob. A chip the visitor
   reads, in the ways-to-play samples or the signs preview, stays still. */
.motion .orbit-node .eq-chip,
.motion .orbit-item .eq-chip {
  animation: float-bob 5.2s ease-in-out infinite alternate;
}

.motion .orbit-item:nth-child(2n) .eq-chip {
  animation-duration: 6.4s;
  animation-delay: -1.8s;
}

.motion .orbit-item:nth-child(3n) .eq-chip {
  animation-duration: 7.2s;
  animation-delay: -3.4s;
}

@keyframes float-bob {
  from { transform: translate3d(0, -5px, 0) rotate(-2.5deg); }
  to { transform: translate3d(0, 5px, 0) rotate(2.5deg); }
}

/* LIVE PLAYABLE PHONE OVERLAY */
.motion .live-play-phone {
  display: block;
  position: absolute;
  z-index: 4;
  left: var(--px);
  top: var(--py);
  width: var(--pw);
  height: var(--ph);
  border-radius: calc(var(--pw) * 0.105);
  opacity: 0;
  pointer-events: none;
  transform-origin: 50% 0;
  transform:
    translate3d(calc(var(--k) * var(--sx)), calc(var(--k) * var(--sy)), 0)
    scale(calc(1 - var(--k) * (1 - var(--ss))));
  transition: opacity 0.2s ease;
}

.motion .story-scroll-track:not(.is-play-mode) .live-play-phone {
  pointer-events: none;
  opacity: 0;
}


.motion .story-scroll-track.is-play-mode .live-play-phone {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.motion .story-scroll-track.is-play-mode .phone-shadow-plate,
.motion .story-scroll-track.is-play-mode .phone-bezel-overlay {
  transform: none;
}

.motion .story-scroll-track.is-play-mode .story-chapters,
.motion .story-scroll-track.is-play-mode .orbit-layer {
  opacity: 0;
  pointer-events: none;
}

.live-key,
.live-enter,
.live-replay-btn {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.08s ease;
}

.live-key:active,
.live-enter:active,
.live-replay-btn:active,
.live-key.is-pressed {
  transform: translateY(3px) scale(0.96);
}

.live-hint-line {
  margin: calc(8 * var(--u)) 0 0;
  text-align: center;
  font-size: calc(11.5 * var(--u));
  font-weight: 800;
  color: var(--screen-quiet);
}

.live-results {
  justify-content: center;
  text-align: center;
  gap: calc(20 * var(--u));
}

.live-results .st-headline {
  font-size: calc(26 * var(--u));
  line-height: 1.2;
}

.live-get-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  align-self: center;
  padding: calc(8 * var(--u)) calc(14 * var(--u));
  color: var(--link);
  font-size: calc(17 * var(--u));
  font-weight: 900;
}

/* A closed question shows its answer, as the app does. */
.q-fill {
  color: var(--right-text);
}

/* With reduced motion the visitor can still play: the phone stands still
   in the page in place of the story's frames. */
.still .story-scroll-track.is-play-mode .story-chapters {
  display: none;
}

.still .story-scroll-track.is-play-mode .live-play-phone {
  --pw: min(300px, 80vw);
  --ph: calc(var(--pw) * 740 / 360);
  display: block;
  position: relative;
  width: var(--pw);
  height: var(--ph);
  margin: 12px auto;
  border-radius: calc(var(--pw) * 0.105);
  box-shadow: 0 0 0 calc(var(--pw) * 0.034) #1d1a2b, 0 22px 44px rgb(42 33 64 / 0.22);
}

/* 3. HOW IT WORKS, 4. WAYS TO PLAY, 5. AUDIENCE */
.how-section,
.ways-section,
.audience-section,
.locales-section,
.privacy-section,
.download-section {
  padding-top: clamp(3.25rem, 7vw, 6rem);
}

.section-header {
  margin-bottom: 1.5rem;
}

.how-grid,
.ways-grid,
.audience-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.125rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15.625rem, 100%), 1fr));
}

.tactile-card {
  position: relative;
  padding: 1.5rem 1.375rem 1.25rem;
  background: var(--card-fill);
  color: var(--screen-ink);
  border: var(--ink-outline);
  border-radius: 22px;
  box-shadow: var(--hard-shadow-md);
}

.tactile-card p {
  color: var(--card-quiet);
  margin: 0;
  font-size: 1rem;
}

.how-step-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
  border: 2.5px solid var(--screen-ink);
  box-shadow: 0 3px 0 var(--screen-ink);
  font-weight: 900;
  font-size: 1.25rem;
}

.code-preview {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.code-preview span {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 2.125rem;
  border-radius: 8px;
  background: var(--screen-fill);
  border: 2px solid var(--screen-ink);
  box-shadow: 0 2px 0 var(--screen-ink);
  font-weight: 900;
  font-size: 0.9375rem;
}

.avatar-cluster {
  display: inline-flex;
}

.avatar-cluster .mini-av + .mini-av {
  margin-left: -0.375rem;
}

.tv-mini-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 10px;
  background: var(--tint-fill);
  color: var(--tint-ink);
  border: 2px solid var(--screen-ink);
  font-weight: 900;
  font-size: 0.8125rem;
}

/* Ways to play interactive cards. The heading's button stretches over its
   card, so a click anywhere on the card presses it. */
.way-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.way-pick {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  cursor: pointer;
}

.way-pick::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.way-pick:focus-visible {
  outline: none;
}

.way-card:has(.way-pick:focus-visible) {
  outline: 3px solid var(--answer-wrong-edge);
  outline-offset: 3px;
}

.way-card:hover {
  transform: translateY(-2px);
}

.way-card.is-selected {
  background: #fffdf4;
  box-shadow: var(--hard-shadow-lg);
}

.way-year { border-top: 9px solid var(--logo-plus-key); }
.way-level { border-top: 9px solid var(--logo-minus-key); }
.way-tables { border-top: 9px solid var(--logo-times-key); }
.way-solo { border-top: 9px solid var(--logo-divide-key); }

.way-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.mode-tag {
  padding: 0.25rem 0.625rem;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1.5px solid var(--screen-ink);
}

.tag-year { background: var(--pill-school-year-fill); color: var(--pill-school-year-ink); }
.tag-easy { background: var(--pill-easy-fill); color: var(--pill-easy-ink); }
.tag-medium { background: var(--pill-medium-fill); color: var(--pill-medium-ink); }
.tag-hard { background: var(--pill-hard-fill); color: var(--pill-hard-ink); }
.tag-tables { background: var(--pill-easy-fill); color: var(--pill-easy-ink); }
.tag-solo { background: var(--tint-fill); color: var(--tint-ink); }

.ways-sample-bar {
  margin-top: 1.125rem;
  padding: 1.125rem 1.375rem;
  background: var(--card-fill);
  border: var(--ink-outline);
  border-radius: 20px;
  box-shadow: var(--hard-shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem;
}

.sample-bar-label {
  font-weight: 900;
  font-size: 0.9375rem;
  color: var(--screen-quiet);
}

.sample-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.sample-chips-row .eq-chip {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sample-chips-row .eq-chip.is-dimmed {
  opacity: 0.32;
  transform: scale(0.95);
}

/* Audience cards */
.capacity-pill {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.6875rem;
  border-radius: 999px;
  background: var(--screen-fill);
  border: 2px solid var(--screen-ink);
  font-size: 0.7812rem;
  font-weight: 900;
}

/* 6. LANGUAGES & SIGNS PLAYGROUND */
.lang-pill-list {
  list-style: none;
  margin: 0 0 1.375rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.lang-pill a {
  display: inline-block;
  padding: 0.5625rem 1rem;
  background: var(--card-fill);
  color: var(--screen-ink);
  border: 2px solid var(--screen-ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--screen-ink);
  text-decoration: none;
  font-weight: 900;
}

.lang-pill a[aria-current="true"] {
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
}

.signs-playground {
  background: var(--card-fill);
}

.signs-intro {
  font-weight: 800;
  color: var(--screen-ink) !important;
  margin-bottom: 1rem !important;
}

.signs-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.125rem;
}

.sign-switch-btn {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  padding: 0.625rem 1rem;
  background: var(--screen-fill);
  color: var(--screen-ink);
  border: 2px solid var(--screen-ink);
  border-radius: 14px;
  box-shadow: 0 3px 0 var(--screen-ink);
  text-align: left;
}

.sign-switch-btn.is-active {
  background: var(--primary-button-fill);
  color: var(--primary-button-ink);
}

.sign-pair {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.1;
}

.sign-switch-btn small {
  font-size: 0.7812rem;
  font-weight: 800;
  opacity: 0.85;
}

.signs-live-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

/* 7. PRIVACY SECTION */
.privacy-box {
  padding: clamp(1.75rem, 4.5vw, 2.75rem);
  background: var(--tint-fill);
  color: var(--tint-ink);
  border: var(--ink-outline);
  border-radius: 26px;
  box-shadow: var(--hard-shadow-md);
}

.privacy-box p {
  max-width: 42em;
  color: var(--tint-quiet);
}

.privacy-link-row {
  margin-bottom: 0;
}

/* 8. DOWNLOAD SECTION */
.download-section {
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.download-card {
  text-align: center;
  padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download-logo {
  border-radius: 18px;
  border: 2.5px solid var(--screen-ink);
  box-shadow: 0 3px 0 var(--screen-ink);
  margin-bottom: 0.875rem;
}

.download-card p {
  margin-bottom: 1.375rem;
}

/* 9. FOOTER */
.site-footer {
  border-top: 2px solid var(--divider);
  padding: 1.75rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  margin: 0;
  font-weight: 900;
  font-size: 1.125rem;
}

.footer-legal {
  flex-basis: 100%;
  margin: 0;
  color: var(--screen-quiet);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.footer-links {
  overflow-wrap: anywhere;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem 1.5rem;
}

.eq-inline {
  white-space: nowrap;
  font-weight: 900;
}

/* LARGE TEXT ON A NARROW SCREEN
   Where the screen is under 20 of the browser's em, as with 24 px text on a
   phone, cards and buttons keep little padding at their sides, and a
   button's icon may take its own line, so a long word in a button or pill
   still fits whole. */
@media (max-width: 19.9em) {
  .hero-card,
  .tactile-card,
  .ways-sample-bar,
  .privacy-box,
  .download-card {
    padding-left: 8px;
    padding-right: 8px;
  }

  .get-app-btn,
  .play-jump-btn {
    flex-wrap: wrap;
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
  }

  .status-pill {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* A heading or a line of running text may shrink below its longest word
   and break it, rather than widen the page. */
.hero-titles,
.story-header-row > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 48.75em) {
  .story-chapter {
    grid-template-columns: minmax(0, 1fr);
  }
}
