/* Charades website
   Tokens mirror the app's Charades/Design/Theme.swift and DeckCover.swift. The app is dark only, so is the site.
   Static site, no build step. */

/* ---------- Font (SIL Open Font License, text in assets/fonts/) ---------- */
@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Night purple ground (Theme.Colors.ink, inkRaised, inkSunken) */
  --ink: #120E2E;
  --ink-raised: #241C58;
  --ink-sunken: #0C0920;
  --line: rgba(255, 255, 255, 0.1);

  /* Accents */
  --lemon: #FFD23F;
  --lemon-edge: #C99A00;
  --pink: #FF5C8A;
  --violet: #8B6CFF;
  --paper: #FFFDF5;
  --correct: #3DDC84;
  --correct-edge: #1D8F50;
  --pass: #FF8A3D;
  --pass-edge: #B3591D;
  --danger: #FF4D6D;
  --on-bright: #15112F;

  /* Text on the ground */
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.52);

  --r-sm: 12px;
  --r-md: 22px;
  --r-lg: 26px;
  --r-xl: 30px;
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.45);

  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --max: 1120px;
  --gutter: 20px;
  --nav-h: 68px;
}

/* One signature color per deck (DeckCover.swift): --deck is the cover's bottom color and the accent
   everywhere else, --deck-top the light end of the gradient, --deck-edge the chunky bottom edge. */
.deck-act-it-out { --deck: #E0335E; --deck-top: #FF7A7A; --deck-edge: #A8213F; --deck-ink: var(--on-bright); }
.deck-animals { --deck: #F07A1E; --deck-top: #FFC257; --deck-edge: #B4540F; --deck-ink: var(--on-bright); }
.deck-mixed { --deck: #FFB300; --deck-top: #FFE76B; --deck-edge: #C98A00; --deck-ink: var(--on-bright); }
.deck-movies { --deck: #4A45D6; --deck-top: #8A97FF; --deck-edge: #2C2B8F; --deck-ink: #FFFFFF; }
.deck-food { --deck: #E5467F; --deck-top: #FF9DBB; --deck-edge: #A82A58; --deck-ink: var(--on-bright); }
.deck-kids { --deck: #58BF2E; --deck-top: #C2F57A; --deck-edge: #37811B; --deck-ink: var(--on-bright); }
.deck-sports { --deck: #12A892; --deck-top: #6CF0DA; --deck-edge: #0A6E60; --deck-ink: var(--on-bright); }
.deck-around-the-house { --deck: #2F93DD; --deck-top: #8ADBFF; --deck-edge: #1C639A; --deck-ink: var(--on-bright); }
.deck-jobs { --deck: #8255FF; --deck-top: #CDB0FF; --deck-edge: #5433B8; --deck-ink: #FFFFFF; }
.deck-celebrations { --deck: #E5479F; --deck-top: #FFA6DA; --deck-edge: #A52A6E; --deck-ink: var(--on-bright); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  /* The app's inkBackground: a violet glow falling from the top of the screen. */
  background:
    radial-gradient(ellipse 110% 760px at 50% -180px, rgba(139, 108, 255, 0.38), rgba(139, 108, 255, 0) 72%) no-repeat,
    var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--lemon); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #FFE27A; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.45em;
  color: var(--text);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.3rem; line-height: 1.2; font-weight: 600; }
p { margin: 0 0 1em; }
p.lead { font-size: 1.2rem; color: var(--text-2); font-weight: 500; }
strong { font-weight: 700; }
kbd {
  font-family: inherit; font-size: 0.82em; font-weight: 600; padding: 1px 7px; border-radius: 7px;
  background: var(--ink-raised); border: 1px solid var(--line); box-shadow: 0 2px 0 var(--ink-sunken);
}
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }
.center-text { text-align: center; }
:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--lemon); color: var(--on-bright); padding: 10px 14px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.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;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section.sunken { background: linear-gradient(180deg, var(--ink-sunken), rgba(12, 9, 32, 0.6)); }
.section-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { margin-bottom: 0; }
.section-foot { max-width: 600px; margin: 32px auto 0; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lemon); margin-bottom: 14px;
}
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.3; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.tag.lemon { background: var(--lemon); color: var(--on-bright); }
.tag.green { background: var(--correct); color: var(--on-bright); }
.tag.orange { background: var(--pass); color: var(--on-bright); }
.tag.pink { background: var(--pink); color: var(--on-bright); }
.tag.quiet { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ---------- Buttons ----------
   PrimaryButtonStyle / SecondaryButtonStyle: a chunky face over a solid darker edge that presses down. */
.btn {
  --btn-bg: var(--ink-raised);
  --btn-edge: var(--ink-sunken);
  --btn-fg: var(--text);
  --depth: 5px;
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 26px; margin-bottom: var(--depth);
  border: 0; border-radius: var(--r-md);
  background: var(--btn-bg); color: var(--btn-fg);
  box-shadow: 0 var(--depth) 0 var(--btn-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--btn-fg); filter: brightness(1.07); }
.btn:active { transform: translateY(calc(var(--depth) - 1px)); box-shadow: 0 1px 0 var(--btn-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.btn.primary { --btn-bg: var(--lemon); --btn-edge: var(--lemon-edge); --btn-fg: var(--on-bright); --depth: 6px; box-shadow: 0 var(--depth) 0 var(--btn-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.btn.correct { --btn-bg: var(--correct); --btn-edge: var(--correct-edge); --btn-fg: var(--on-bright); }
.btn.pass { --btn-bg: var(--pass); --btn-edge: var(--pass-edge); --btn-fg: var(--on-bright); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--lemon); min-height: 44px; padding: 8px 12px; margin-bottom: 0; }
.btn.ghost:hover { background: rgba(255, 210, 63, 0.1); }
.btn.ghost:active { transform: none; }
.btn.small { --depth: 4px; min-height: 42px; padding: 8px 18px; font-size: 0.95rem; border-radius: 16px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary:focus-visible { outline-color: var(--paper); }

/* ---------- Brand (LogoMark: three fanned cards next to the name) ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em;
  color: var(--lemon); text-decoration: none;
}
.brand:hover { color: var(--lemon); }
.brand .logo { width: 36px; height: 34px; flex: none; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 14, 46, 0.78);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .container { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-cta { margin-left: auto; }
.nav-links + .nav-cta { margin-left: 0; }
.nav .btn { margin-bottom: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--text-3); font-size: 0.9rem; }
.footer .container { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.footer .brand { font-size: 1.25rem; }
.footer .brand .logo { width: 30px; height: 28px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer nav a { color: var(--text-2); text-decoration: none; }
.footer nav a:hover { color: var(--lemon); }
.footer .credit { flex-basis: 100%; margin: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero-copy { position: relative; max-width: 780px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-copy .tag { margin-bottom: 22px; }
.hero-copy h1 { max-width: 15ch; }
.hero-copy .lead { max-width: 36rem; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-bottom: 12px; }
.hero-note { color: var(--text-3); font-size: 0.92rem; font-weight: 600; margin: 0; }

/* "you." on a lemon card, the one on your forehead. */
.hl {
  display: inline-block; padding: 0 0.2em 0.06em; margin-left: 0.04em;
  background: var(--lemon); color: var(--on-bright); border-radius: 0.16em;
  box-shadow: 0 0.08em 0 var(--lemon-edge), inset 0 0 0 0.03em rgba(255, 255, 255, 0.35);
  transform: rotate(-3deg);
}

/* Confetti in the brand colors. */
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; left: var(--x); top: var(--y);
  width: 14px; height: 26px; border-radius: 6px; background: var(--c); opacity: 0.85;
  transform: rotate(var(--r, 0deg));
  animation: drift 7s ease-in-out infinite alternate;
}
.confetti i.dot { width: 14px; height: 14px; border-radius: 50%; }
.confetti i:nth-child(2n) { animation-duration: 9s; animation-delay: -3s; }
.confetti i:nth-child(3n) { animation-duration: 11s; animation-delay: -5s; }
@keyframes drift {
  from { transform: translateY(0) rotate(var(--r, 0deg)); }
  to { transform: translateY(16px) rotate(calc(var(--r, 0deg) + 18deg)); }
}

/* ---------- Playable demo: the forehead screen on a landscape iPhone ----------
   Inside .screen every size is in iPhone points: --pt is 1/874 of the screen width (iPhone 17 Pro in landscape is
   874 x 402 pt), so the layout from PlayingView, ReadyView, CountdownView and ResultsView scales as one piece. */
.hero-demo { margin-top: clamp(44px, 6vw, 72px); display: flex; flex-direction: column; align-items: center; gap: 18px; scroll-margin-top: calc(var(--nav-h) + 12px); }
.demo-decks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.deck-chip {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2;
  padding: 9px 16px; margin-bottom: 4px; border-radius: 14px;
  background: var(--ink-raised); color: var(--text);
  box-shadow: 0 4px 0 var(--ink-sunken), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.deck-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-sunken), inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.deck-chip[aria-checked="true"] { background: var(--deck); color: var(--deck-ink); box-shadow: 0 4px 0 var(--deck-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.deck-chip[aria-checked="true"]:active { box-shadow: 0 1px 0 var(--deck-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.3); }

.stage { width: 100%; max-width: 880px; container-type: inline-size; perspective: 1800px; }
.phone {
  position: relative; padding: 1.5cqw; border-radius: 7cqw;
  background: #09080F;
  box-shadow: 0 0 0 0.3cqw #3D3A55, 0 0 0 0.6cqw #17152A, 0 4cqw 8cqw rgba(0, 0, 0, 0.55), 0 0 14cqw rgba(139, 108, 255, 0.2);
}
.phone.tilt-correct { animation: tilt-correct 0.45s ease-out; }
.phone.tilt-pass { animation: tilt-pass 0.45s ease-out; }
@keyframes tilt-correct { 30% { transform: rotateX(-14deg); } 100% { transform: none; } }
@keyframes tilt-pass { 30% { transform: rotateX(14deg); } 100% { transform: none; } }

.screen {
  --pt: calc(100cqw / 874);
  position: relative; aspect-ratio: 874 / 402; overflow: hidden; isolation: isolate;
  border-radius: 5.5cqw;
  container-type: inline-size;
  /* GameView: inkBackground with the deck's color glowing from the bottom. */
  background:
    radial-gradient(circle calc(var(--pt) * 560) at 50% 100%, color-mix(in srgb, var(--deck) 38%, transparent), transparent),
    var(--ink);
  color: var(--text);
  font-family: var(--font-display);
  user-select: none; -webkit-user-select: none;
}
.island {
  position: absolute; z-index: 6; left: calc(var(--pt) * 11); top: 50%;
  width: calc(var(--pt) * 37); height: calc(var(--pt) * 126); transform: translateY(-50%);
  border-radius: calc(var(--pt) * 19); background: #000; pointer-events: none;
}

/* Phases sit inside the landscape safe area and swap with a soft spring. */
.ph {
  position: absolute; top: 0; bottom: calc(var(--pt) * 21); left: calc(var(--pt) * 60); right: calc(var(--pt) * 60);
  display: flex; opacity: 0; visibility: hidden; transform: scale(0.94);
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), visibility 0s linear 0.25s;
}
.screen[data-phase="ready"] .ph-ready,
.screen[data-phase="countdown"] .ph-countdown,
.screen[data-phase="playing"] .ph-playing,
.screen[data-phase="results"] .ph-results { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.ph p { margin: 0; }

.scr-chip {
  display: inline-flex; align-items: center; gap: calc(var(--pt) * 6);
  padding: calc(var(--pt) * 6) calc(var(--pt) * 10); border-radius: 999px;
  font-weight: 700; font-size: calc(var(--pt) * 13); line-height: 1.2; color: var(--on-bright); white-space: nowrap;
}
.scr-chip svg { width: calc(var(--pt) * 12); height: calc(var(--pt) * 12); }
.scr-chip.correct { background: var(--correct); }
.scr-chip.pass { background: var(--pass); }

/* Ready: "Place on forehead" with a floating card. */
.ph-ready { align-items: center; gap: calc(var(--pt) * 36); padding: 0 calc(var(--pt) * 56); }
.ready-hit {
  position: absolute; z-index: 2; top: 0; bottom: calc(var(--pt) * -21); left: calc(var(--pt) * -60); right: calc(var(--pt) * -60);
  border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ready-hit:focus-visible { outline: calc(var(--pt) * 4) solid var(--lemon); outline-offset: calc(var(--pt) * -12); border-radius: calc(var(--pt) * 44); }
.ready-art { position: relative; flex: none; width: calc(var(--pt) * 150); height: calc(var(--pt) * 190); animation: float 1.6s ease-in-out infinite alternate; }
.ready-art::before {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--pt) * 22);
  background: var(--deck-edge); opacity: 0.7; transform: translate(calc(var(--pt) * -8), calc(var(--pt) * 6)) rotate(-10deg);
}
.ready-card {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border-radius: calc(var(--pt) * 22); background: var(--paper); border: calc(var(--pt) * 7) solid var(--deck);
  box-shadow: 0 calc(var(--pt) * 12) calc(var(--pt) * 18) rgba(0, 0, 0, 0.4);
  font-family: var(--font-body); font-size: calc(var(--pt) * 72); line-height: 1;
}
.ready-copy { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--pt) * 14); min-width: 0; }
.ready-title { font-weight: 700; font-size: calc(var(--pt) * 54); line-height: 1.02; }
.ready-sub { font-weight: 600; font-size: calc(var(--pt) * 20); color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: calc(var(--pt) * 10); }
.go-pill {
  margin-top: calc(var(--pt) * 4); padding: calc(var(--pt) * 10) calc(var(--pt) * 18); border-radius: 999px;
  background: var(--lemon); color: var(--on-bright); font-weight: 700; font-size: calc(var(--pt) * 17);
  animation: nudge 1.4s ease-in-out infinite;
}
@keyframes float {
  from { transform: translateY(calc(var(--pt) * 6)) rotate(-4deg); }
  to { transform: translateY(calc(var(--pt) * -6)) rotate(4deg); }
}
@keyframes nudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* Countdown: a draining ring with a bouncing digit. */
.ph-countdown { flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--pt) * 14); }
.cd-ring { position: relative; width: calc(var(--pt) * 190); height: calc(var(--pt) * 190); }
.cd-ring svg, .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.screen .track { fill: none; stroke: rgba(255, 255, 255, 0.14); }
.screen .arc { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.2s ease; }
.cd-ring circle { stroke-width: 14; }
.cd-ring .arc { stroke: var(--deck); }
.cd-digit {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: calc(var(--pt) * 124); line-height: 1; color: var(--deck);
}
.cd-digit.pop { animation: cd-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cd-label { font-weight: 700; font-size: calc(var(--pt) * 22); color: var(--text-2); }
@keyframes cd-pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Playing: the word on a paper card, a timer ring and a time bar. */
.ph-playing { flex-direction: column; }
.pl-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--pt) * 10) calc(var(--pt) * 18) 0; }
.pl-tag {
  margin-left: calc(var(--pt) * 50); padding: calc(var(--pt) * 8) calc(var(--pt) * 14); border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); font-weight: 700; font-size: calc(var(--pt) * 15); white-space: nowrap;
}
.ring { position: relative; flex: none; width: calc(var(--pt) * 66); height: calc(var(--pt) * 66); }
.ring circle { stroke-width: 7; }
.ring .arc { stroke: var(--lemon); }
.ring span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: calc(var(--pt) * 26); color: var(--lemon); font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}
.word-card {
  position: relative; flex: none; height: calc(var(--pt) * 200); margin: auto calc(var(--pt) * 46);
  padding: calc(var(--pt) * 16) calc(var(--pt) * 36);
  background: var(--paper); border: calc(var(--pt) * 10) solid var(--deck); border-radius: calc(var(--pt) * 30);
  box-shadow: 0 calc(var(--pt) * 14) calc(var(--pt) * 22) rgba(0, 0, 0, 0.45);
  transform: rotate(-1.5deg);
  transition: border-color 0.2s ease;
}
.word {
  --fs: 96;
  height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-weight: 700; font-size: calc(var(--pt) * var(--fs)); line-height: 1.04; color: var(--on-bright); text-align: center;
}
.word span { display: inline-block; max-width: 100%; overflow: hidden; }
.word.in span { animation: word-in 0.2s ease-out; }
@keyframes word-in { from { opacity: 0; } to { opacity: 1; } }
.pl-bottom { display: flex; flex-direction: column; gap: calc(var(--pt) * 10); padding: 0 calc(var(--pt) * 50) calc(var(--pt) * 12); }
.hints { display: flex; justify-content: space-between; }
.hints .scr-chip { font-size: calc(var(--pt) * 15); padding: calc(var(--pt) * 6) calc(var(--pt) * 12); }
.time-bar { height: calc(var(--pt) * 6); border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.time-bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--lemon); transition: width 1s linear, background-color 0.2s ease; }
.zone {
  position: absolute; z-index: 2; top: 0; bottom: calc(var(--pt) * -21); width: calc(50% + var(--pt) * 60);
  border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.zone.left { left: calc(var(--pt) * -60); }
.zone.right { right: calc(var(--pt) * -60); }

/* The last five seconds: everything turns red and the card pulses. */
.screen.final .word-card { border-color: var(--danger); animation: card-pulse 0.9s ease-in-out infinite; }
.screen.final .ring .arc { stroke: var(--danger); }
.screen.final .ring span { color: var(--danger); }
.screen.final .time-bar i { background: var(--danger); }
@keyframes card-pulse { 0%, 100% { transform: rotate(-1.5deg) scale(1); } 50% { transform: rotate(-1.5deg) scale(1.025); } }

.exit {
  position: absolute; z-index: 3; top: calc(var(--pt) * 14); left: calc(var(--pt) * 74);
  width: calc(var(--pt) * 40); height: calc(var(--pt) * 40); padding: calc(var(--pt) * 11);
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: var(--text); cursor: pointer;
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.exit svg { width: 100%; height: 100%; }
.screen[data-phase="countdown"] .exit, .screen[data-phase="playing"] .exit { opacity: 1; visibility: visible; transition-delay: 0s; }

/* FlashOverlay: green for correct, orange for pass, the word bouncing in and dots bursting out. */
.flash {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.12s ease-out, visibility 0s linear 0.12s;
}
.flash.on { opacity: 1; visibility: visible; transition: none; }
.flash.correct { background: var(--correct); }
.flash.pass { background: var(--pass); }
.flash b { position: relative; font-weight: 700; font-size: calc(var(--pt) * 104); line-height: 1; color: var(--on-bright); white-space: nowrap; }
.flash.on b { animation: flash-pop 0.4s cubic-bezier(0.3, 1.7, 0.5, 1) both; }
.flash i {
  position: absolute; left: 50%; top: 50%; width: calc(var(--pt) * 14); height: calc(var(--pt) * 14);
  margin: calc(var(--pt) * -7) 0 0 calc(var(--pt) * -7); border-radius: 50%; background: rgba(255, 253, 245, 0.9);
}
.flash i:nth-child(even) { width: calc(var(--pt) * 9); height: calc(var(--pt) * 9); margin: calc(var(--pt) * -4.5) 0 0 calc(var(--pt) * -4.5); }
.flash.on i { animation: burst 0.55s ease-out both; }
@keyframes flash-pop { from { transform: scale(0.5) rotate(6deg); } to { transform: scale(1) rotate(-3deg); } }
@keyframes burst {
  from { transform: rotate(var(--a)) translateX(calc(var(--pt) * 20)); opacity: 1; }
  to { transform: rotate(var(--a)) translateX(calc(var(--pt) * 300)); opacity: 0; }
}

/* Results: the score on a paper card in the deck's color. */
.ph-results { flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--pt) * 16); padding: calc(var(--pt) * 14) calc(var(--pt) * 32); }
.eyebrow-pill {
  padding: calc(var(--pt) * 7) calc(var(--pt) * 14); border-radius: 999px; background: var(--lemon); color: var(--on-bright);
  font-weight: 700; font-size: calc(var(--pt) * 13); letter-spacing: calc(var(--pt) * 1.2); text-transform: uppercase;
}
.plaque {
  position: relative; display: flex; flex-direction: column; align-items: center;
  min-width: calc(var(--pt) * 300); padding: calc(var(--pt) * 8) calc(var(--pt) * 56) calc(var(--pt) * 18);
  background: var(--paper); border: calc(var(--pt) * 8) solid var(--deck); border-radius: calc(var(--pt) * 28);
  box-shadow: 0 calc(var(--pt) * 12) calc(var(--pt) * 18) rgba(0, 0, 0, 0.4); color: var(--on-bright);
}
.plaque .score { font-weight: 700; font-size: calc(var(--pt) * 112); line-height: 1; font-variant-numeric: tabular-nums; }
.plaque .caption { margin-top: calc(var(--pt) * -2); font-weight: 700; font-size: calc(var(--pt) * 13); letter-spacing: calc(var(--pt) * 1.6); text-transform: uppercase; opacity: 0.6; }
.plaque .sticker {
  position: absolute; top: calc(var(--pt) * -14); left: calc(var(--pt) * -14);
  padding: calc(var(--pt) * 6); border-radius: calc(var(--pt) * 12); background: var(--paper); border: calc(var(--pt) * 3) solid var(--deck);
  font-family: var(--font-body); font-size: calc(var(--pt) * 26); line-height: 1; transform: rotate(-12deg);
}
.res-actions { display: flex; gap: calc(var(--pt) * 12); }
.scr-btn {
  --edge: var(--ink-sunken);
  position: relative; z-index: 4; display: inline-flex; align-items: center; justify-content: center;
  width: calc(var(--pt) * 190); height: calc(var(--pt) * 58); margin-bottom: calc(var(--pt) * 6);
  border: 0; border-radius: calc(var(--pt) * 22);
  background: var(--ink-raised); color: var(--text);
  box-shadow: 0 calc(var(--pt) * 5) 0 var(--edge), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--pt) * 19);
  text-decoration: none; cursor: pointer; transition: transform 0.1s ease, box-shadow 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.scr-btn:hover { color: var(--text); }
.scr-btn.primary { --edge: var(--lemon-edge); background: var(--lemon); color: var(--on-bright); box-shadow: 0 calc(var(--pt) * 6) 0 var(--edge), inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.scr-btn:active { transform: translateY(calc(var(--pt) * 5)); box-shadow: 0 calc(var(--pt) * 1) 0 var(--edge); }

/* ConfettiView after a round that scored. */
.confetti-fall { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.confetti-fall i {
  position: absolute; top: calc(var(--pt) * -24); left: var(--x);
  width: calc(var(--pt) * 9); height: calc(var(--pt) * 15); border-radius: calc(var(--pt) * 3);
  animation: fall var(--t) cubic-bezier(0.25, 0.6, 0.45, 1) var(--d) both;
}
.confetti-fall i.round { width: calc(var(--pt) * 10); height: calc(var(--pt) * 10); border-radius: 50%; }
@keyframes fall { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(calc(var(--pt) * 460)) rotate(var(--r)); } }

.demo-controls { display: flex; gap: 12px; width: 100%; max-width: 440px; }
.demo-controls .btn { flex: 1; }
.demo-controls .btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.demo-controls .btn[aria-disabled="true"]:active { transform: none; box-shadow: 0 var(--depth) 0 var(--btn-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.demo-caption { margin: 0; max-width: 44rem; text-align: center; color: var(--text-3); font-size: 0.9rem; }

/* ---------- Steps (how to play) ---------- */
.steps { counter-reset: step; }
.step {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 24px 22px; border-radius: var(--r-lg);
  background: var(--ink-raised); box-shadow: 0 6px 0 var(--ink-sunken), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.step .art { height: 132px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.step .art svg { height: 132px; width: auto; max-width: 100%; }
.step h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.step h3::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%; background: var(--lemon); color: var(--on-bright); font-size: 1rem;
}
.step p { margin: 0; color: var(--text-2); font-size: 0.98rem; }

/* ---------- Screenshots ----------
   Simulator captures (tools/make_shots.py) in the demo's phone frame. Each figure is a size container, so the
   bezel, rings and shadows are the demo's, rescaled from the phone's long side to its short side (x2.1) for the
   portrait phones. The screen corners are the iPhone 17 Pro's: about 62 pt, 15.6% of the short side. */
.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px);
  max-width: 900px; margin: 0 auto; align-items: start;
}
.shots:focus-visible { outline-offset: 12px; border-radius: var(--r-md); }
.shot { margin: 0; container-type: inline-size; }
.shot-frame {
  padding: 3.3cqw; border-radius: 17.8cqw; background: #09080F;
  box-shadow: 0 0 0 0.63cqw #3D3A55, 0 0 0 1.26cqw #17152A, 0 8.4cqw 16.8cqw rgba(0, 0, 0, 0.55), 0 0 29cqw rgba(139, 108, 255, 0.2);
}
.shot img { width: 100%; height: auto; border-radius: 14.5cqw; background: var(--ink); }
.shot figcaption { margin-top: 22px; text-align: center; text-wrap: balance; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; color: var(--text-2); }
.shots .shot:nth-child(2) { transform: translateY(32px); }
.shot.landscape { width: min(100%, 700px); margin: clamp(72px, 9vw, 104px) auto 0; }
.shot.landscape .shot-frame {
  padding: 1.5cqw; border-radius: 8.5cqw;
  box-shadow: 0 0 0 0.3cqw #3D3A55, 0 0 0 0.6cqw #17152A, 0 4cqw 8cqw rgba(0, 0, 0, 0.55), 0 0 14cqw rgba(139, 108, 255, 0.2);
}
.shot.landscape img { border-radius: 7cqw; }

/* ---------- Decks ----------
   DeckCoverView: two cards peeking out behind, a front card with the cover photo, a dark scrim for the title,
   a solid edge underneath and a lock badge on premium decks. */
.decks { --cols: 5; --gap: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 36px var(--gap); }
.deck { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cover { position: relative; aspect-ratio: 8 / 7; margin: 12px 0 8px; }
.cover .back { position: absolute; inset: 0 12px; border-radius: var(--r-md); background: var(--deck-edge); }
.cover .b1 { opacity: 0.55; transform: translate(-9px, -11px) rotate(-7deg); }
.cover .b2 { opacity: 0.8; transform: translate(11px, -8px) rotate(6deg); }
.cover .front {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--r-md); background: var(--deck);
  box-shadow: 0 7px 0 var(--deck-edge), 0 18px 26px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.cover .front img { width: 100%; height: 100%; object-fit: cover; }
.cover .front::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.08) 45%, rgba(0, 0, 0, 0.72) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}
.cover .title {
  position: absolute; z-index: 1; left: 14px; right: 12px; bottom: 11px; margin: 0;
  font-size: 1.3rem; font-weight: 700; line-height: 1.1; color: #FFFFFF; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.cover .lock {
  position: absolute; z-index: 1; top: 10px; left: 10px; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, 0.4); color: #FFFFFF;
}
.cover .lock svg { width: 13px; height: 13px; }
.deck:hover .front { transform: rotate(-1.5deg) scale(1.03); }
.deck .desc { margin: 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.45; }
.deck .facts { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text-3); font-size: 0.85rem; font-weight: 600; }

/* ---------- Team mode ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split-copy .lead { margin-bottom: 0; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--text); }
.checks li::before {
  content: ""; flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  background: var(--correct) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315112F' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.stage.mock { max-width: 600px; justify-self: center; }
.stage.mock .phone { transform: rotate(-2deg); }
.ph.static { opacity: 1; visibility: visible; transform: none; }
.ph-final { flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--pt) * 12); padding: calc(var(--pt) * 14) calc(var(--pt) * 32); }
.winner { font-weight: 700; font-size: calc(var(--pt) * 50); line-height: 1.1; white-space: nowrap; text-shadow: 0 calc(var(--pt) * 6) calc(var(--pt) * 22) rgba(255, 210, 63, 0.4); }
.standings { display: flex; gap: calc(var(--pt) * 8); }
.standing {
  display: inline-flex; align-items: center; gap: calc(var(--pt) * 8); padding: calc(var(--pt) * 7) calc(var(--pt) * 14);
  border-radius: 999px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-weight: 700; font-size: calc(var(--pt) * 15); white-space: nowrap;
}
.standing b { padding-left: calc(var(--pt) * 2); font-size: calc(var(--pt) * 20); font-variant-numeric: tabular-nums; }
.standing.leader { color: var(--lemon); background: rgba(255, 210, 63, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.6); }
.ph-final .res-actions { gap: calc(var(--pt) * 10); }
.scr-btn.wide { width: calc(var(--pt) * 220); }
.scr-btn.narrow { width: calc(var(--pt) * 130); }
.confetti-static i {
  position: absolute; left: var(--x); top: var(--y);
  width: calc(var(--pt) * 9); height: calc(var(--pt) * 15); border-radius: calc(var(--pt) * 3);
  background: var(--c); transform: rotate(var(--r));
}

/* ---------- Features ---------- */
.feature { padding: 24px 22px 22px; border-radius: var(--r-md); background: var(--ink-raised); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.feature .glyph {
  --g: var(--lemon); --g-edge: var(--lemon-edge);
  display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 14px; background: var(--g); color: var(--on-bright); box-shadow: 0 4px 0 var(--g-edge);
  transform: rotate(-4deg);
}
.feature:nth-child(even) .glyph { transform: rotate(4deg); }
.feature .glyph svg { width: 23px; height: 23px; }
.glyph.g-pink { --g: var(--pink); --g-edge: #C93A65; }
.glyph.g-green { --g: var(--correct); --g-edge: var(--correct-edge); }
.glyph.g-orange { --g: var(--pass); --g-edge: var(--pass-edge); }
.glyph.g-violet { --g: var(--violet); --g-edge: #5B43C9; }
.glyph.g-blue { --g: #8ADBFF; --g-edge: #2F93DD; }
.feature h3 { font-size: 1.18rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ---------- Languages ---------- */
.langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lang-card {
  display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 18px; border-radius: var(--r-md);
  background: var(--ink-raised); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.lang-card p { margin: 0; }
.lang-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: 0.95rem; }
.lang-name .muted { font-weight: 600; font-size: 0.8rem; }
.lang-app { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.15; color: var(--lemon); }
.lang-words { list-style: none; margin: 4px 0 2px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-words li {
  padding: 4px 10px; border-radius: 10px; border: 3px solid var(--deck); background: var(--paper); color: var(--on-bright);
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; line-height: 1.3; transform: rotate(-2deg);
}
.lang-words li:nth-child(2) { transform: rotate(1.5deg); }
.lang-words li:nth-child(3) { transform: rotate(-1deg); }
.lang-gloss { margin-top: auto !important; padding-top: 4px; color: var(--text-3); font-size: 0.85rem; line-height: 1.4; }
/* Fredoka only draws Latin; other scripts get the system's rounded or heavy faces, as in the app. */
.lang-card :is(:lang(ja), :lang(zh), :lang(hi), :lang(ar)) { font-family: var(--font-body); font-weight: 800; }

/* ---------- Pricing (the paywall's plan cards) ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; max-width: 1000px; margin: 0 auto; }
.plan {
  display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 24px; margin-bottom: 6px; border-radius: 20px;
  background: var(--ink-raised); color: var(--text);
  box-shadow: 0 6px 0 var(--ink-sunken), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.plan p { margin: 0; }
.plan-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.plan-big { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.1; }
.plan-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 9px; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 0.97rem; line-height: 1.4; }
.plan-list li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
/* The selected plan in PaywallView: lemon face, darker lemon edge. */
.plan.featured { background: var(--lemon); color: var(--on-bright); box-shadow: 0 6px 0 var(--lemon-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.35); transform: translateY(-8px); }
.plan.featured .plan-list li::before {
  background: rgba(21, 17, 47, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315112F' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4 4 9-9.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Download band: a big lemon card ---------- */
.band {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(20px, 3vw, 36px); align-items: center;
  padding: clamp(28px, 4.5vw, 52px); border-radius: var(--r-xl);
  background: var(--lemon); color: var(--on-bright);
  box-shadow: 0 10px 0 var(--lemon-edge), 0 34px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  transform: rotate(-1deg);
}
.band-icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 10px 22px rgba(21, 17, 47, 0.35); transform: rotate(-6deg); }
.band h2 { color: var(--on-bright); margin-bottom: 8px; }
.band p { margin: 0; color: rgba(21, 17, 47, 0.75); font-weight: 600; }
.band .actions { display: flex; flex-direction: column; gap: 10px; min-width: 260px; }
.band .btn { --btn-bg: rgba(21, 17, 47, 0.08); --btn-edge: rgba(21, 17, 47, 0.28); --btn-fg: var(--on-bright); box-shadow: 0 var(--depth) 0 var(--btn-edge), inset 0 0 0 2px rgba(21, 17, 47, 0.22); }
.band .btn.primary { --btn-bg: var(--on-bright); --btn-edge: #000000; --btn-fg: var(--lemon); box-shadow: 0 var(--depth) 0 var(--btn-edge); }
.band .btn:focus-visible { outline-color: var(--on-bright); }

/* ---------- Prose pages (privacy, support, terms) ---------- */
.page-head { padding: clamp(40px, 6vw, 76px) 0 clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); max-width: 18ch; }
.page-head .lead { margin: 0; }
.prose { max-width: 740px; padding-bottom: clamp(56px, 9vw, 104px); }
.prose h2 { font-size: 1.6rem; margin: 2.1em 0 0.5em; }
.prose h3 { font-size: 1.15rem; margin: 1.8em 0 0.6em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--lemon); }
.prose .callout { background: var(--ink-raised); border-left: 4px solid var(--lemon); border-radius: var(--r-sm); padding: 16px 20px; margin: 0 0 1.6em; }
.prose .callout p { margin: 0; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 700; color: var(--text); background: var(--ink-raised); }
.prose td { color: var(--text-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose details { margin-bottom: 10px; padding: 0 18px; border-radius: var(--r-sm); background: var(--ink-raised); box-shadow: inset 0 0 0 1px var(--line); }
.prose summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0;
  font-weight: 700; color: var(--text); cursor: pointer; list-style: none;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; flex: none; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--lemon); }
.prose details[open] summary::after { content: "–"; }
.prose details p { margin: 0; padding-bottom: 16px; }
.contact-card {
  margin: 0 0 2.2em; padding: 24px 26px; border-radius: var(--r-lg);
  background: var(--lemon); color: var(--on-bright); box-shadow: 0 8px 0 var(--lemon-edge);
}
.prose .contact-card h2 { margin-top: 0; color: var(--on-bright); }
.prose .contact-card p { color: rgba(21, 17, 47, 0.8); font-weight: 500; }
.prose .contact-card p:last-child { margin-bottom: 0; }
.prose .contact-card a { color: var(--on-bright); font-weight: 700; }
.prose .contact-card a:focus-visible { outline-color: var(--on-bright); }

/* ---------- 404: the card gets passed ---------- */
.lost { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 48px var(--gutter) 72px; text-align: center; }
.lost-card {
  display: flex; align-items: center; justify-content: center; width: 230px; height: 136px; margin: 0 auto 28px;
  border-radius: var(--r-md); border: 9px solid var(--pass); background: var(--paper); color: var(--on-bright);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  font-family: var(--font-display); font-weight: 700; font-size: 4.2rem; line-height: 1;
  transform: rotate(-4deg); animation: pass-tilt 1.1s 0.4s ease-in-out both;
}
.lost .tag { margin-bottom: 16px; }
.lost h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.lost .lead { max-width: 30rem; margin: 0 auto; }
.lost .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
@keyframes pass-tilt {
  0%, 100% { transform: rotate(-4deg); }
  40% { transform: perspective(600px) rotateX(32deg) rotate(-4deg); }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .decks { --cols: 3; }
}
@media (max-width: 960px) {
  .langs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links + .nav-cta { margin-left: auto; }
  .split { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .plan.featured { transform: none; }
  .band { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .band .actions { min-width: 0; width: 100%; max-width: 360px; }
}
/* Below this the three phones get too small side by side: they become a row to swipe, edge to edge. */
@media (max-width: 700px) {
  .shots {
    display: flex; gap: 16px; max-width: none; margin: 0 calc(-1 * var(--gutter));
    padding: 24px var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shots:focus-visible { outline-offset: -3px; border-radius: 0; }
  .shots .shot { flex: 0 0 72%; max-width: 280px; scroll-snap-align: center; }
  .shots .shot:nth-child(2) { transform: none; }
  /* The scroller clips whatever spills past its edges, so the shadow and glow stay inside its padding. */
  .shots .shot-frame { box-shadow: 0 0 0 0.63cqw #3D3A55, 0 0 0 1.26cqw #17152A, 0 5cqw 9cqw rgba(0, 0, 0, 0.5), 0 0 9cqw rgba(139, 108, 255, 0.2); }
  .shot.landscape { margin-top: 28px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .confetti i { width: 10px; height: 18px; opacity: 0.6; }
  .confetti i.dot { width: 10px; height: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .demo-decks { gap: 8px; }
  .deck-chip { font-size: 0.88rem; padding: 8px 11px; gap: 6px; border-radius: 12px; }
  .demo-controls .btn { min-height: 50px; }
  .decks { --cols: 2; --gap: 14px; row-gap: 28px; }
  .langs { grid-template-columns: 1fr; }
  .cover .title { font-size: 1.1rem; left: 12px; bottom: 9px; }
}
