/* mw.css: the look of the mathworkout.app site pages written by tools/site/build_site.py.
 * (The legal and support pages keep assets/site.css.)
 *
 * The look: the app's chunky toy-box cards (white faces, a dark ink outline, a solid ink lip under
 * them), soft pastel paper with a faint graph grid, Fredoka headings, a calm system font for reading,
 * Doc in speech bubbles, and drawn scenes (tools/site/kit.py).
 *
 * Effects: a scene reads --p, its scroll progress from 0 to 1. Browsers with CSS scroll timelines
 * animate --p here (animation-timeline); assets/site.js sets it for the others. Each scene declares
 * its own resting --p, so without effects (reduced motion, old engines, no JavaScript) it shows a
 * good still picture. Everything moves with transform and opacity only, idle loops run only while
 * on screen (.is-on), and all of it sits behind html.fx (the page head sets it when motion is
 * allowed and the engine is modern: CSS :has support). Old engines (Chrome 91 class WebViews) get
 * the same content and layout with the effects off: no color-mix, no :has, no container queries,
 * no individual transform properties outside html.fx.
 */

@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('fonts/fredoka-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('fonts/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@property --p { syntax: '<number>'; inherits: true; initial-value: 1; }

:root {
  --ink: #23262C; --ink-2: #4A505A; --stroke: #2A2A2A; --paper: #F7F6F2; --card: #FFFFFF; --line: #E4E2DA;
  --gold: #F5C233; --gold-d: #C98E0B; --mint: #A8E6C0; --pink: #FFB7C5; --sky: #A8D2EE; --lemon: #FFEC8B;
  --peach: #FFCBA4; --lav: #D5C4F0; --rose: #F0B8B8; --sage: #BFD4B0; --peri: #B8BFEC; --coral: #F6BBA0;
  --night: #1C1F3F; --pal: #EEF0F2; --pal-a: #BFE6C5;
  --display: 'Fredoka', 'Trebuchet MS', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  --lh: 1.65; --head-h: 64px; --r: 22px; --lip: 5px;
  --wrap: 1160px; --pad: clamp(16px, 4vw, 28px);
}
:lang(hi) { --body: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', system-ui, sans-serif; --display: 'Noto Sans Devanagari', 'Nirmala UI', system-ui, sans-serif; --lh: 1.8; }
:lang(bn) { --body: 'Noto Sans Bengali', 'Nirmala UI', 'Vrinda', system-ui, sans-serif; --display: 'Noto Sans Bengali', 'Nirmala UI', system-ui, sans-serif; --lh: 1.8; }
:lang(ar) { --body: 'Noto Naskh Arabic', 'Segoe UI', 'Geeza Pro', system-ui, sans-serif; --display: 'Noto Naskh Arabic', 'Segoe UI', system-ui, sans-serif; --lh: 1.85; }
:lang(ur) { --body: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Noto Naskh Arabic', system-ui, sans-serif; --display: 'Noto Naskh Arabic', system-ui, sans-serif; --lh: 2.1; }
:lang(zh), :lang(ja), :lang(ko) { --lh: 1.75; }
:lang(ko) { word-break: keep-all; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: var(--lh);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(42, 42, 42, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(42, 42, 42, .035) 1px, transparent 1px);
  background-size: 28px 28px; overflow-x: hidden;
}
@supports (overflow: clip) { body, main { overflow-x: clip; } }
img, svg, video { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); position: relative; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -.2em; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
:focus-visible { outline: 3px solid var(--stroke); outline-offset: 3px; box-shadow: 0 0 0 7px var(--lemon); border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 100; background: var(--card); border: 3px solid var(--stroke); border-radius: 12px; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }
.js .nojs-only { display: none; }

/* ---------------------------------------------------------------- buttons, chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 24px;
  font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.1; text-decoration: none; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #5B606A, #3E434B); border: 3px solid var(--stroke); border-radius: 16px;
  box-shadow: 0 var(--lip) 0 var(--stroke); transition: transform .08s, box-shadow .08s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--stroke); }
.btn.small { min-height: 42px; padding: 8px 16px; font-size: 15px; border-radius: 13px; white-space: nowrap; }
.btn.line { background: var(--card); color: var(--ink); }
.btn.gold { background: linear-gradient(180deg, #FFE08A, #F5C233); color: #3a2606; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-family: var(--display); text-decoration: none; color: var(--ink);
  padding: 8px 4px; border-bottom: 3px solid var(--lemon); }
.link-arrow:hover { border-color: var(--gold); }
.link-arrow.on-dark { color: #fff; border-color: rgba(255, 255, 255, .35); }
.tag { display: inline-block; font: 700 12.5px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px;
  background: var(--card); border: 2px solid var(--stroke); margin-bottom: 8px; }
.tag-new { background: var(--lemon); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1.2 var(--display); padding: 7px 14px; border-radius: 99px; background: var(--card);
  border: 2px solid var(--stroke); box-shadow: 0 3px 0 var(--stroke); margin-bottom: 16px; }
.kicker { font: 700 13px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 46ch; }
.fine { font-size: 14px; color: var(--ink-2); }
mark.ph { background: repeating-linear-gradient(45deg, #FFF6D6, #FFF6D6 8px, #FFEFC2 8px, #FFEFC2 16px); color: #5A4500; border: 2px dashed #C9A227;
  border-radius: 8px; padding: 2px 7px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.ph-tag { display: inline-block; font: 700 10.5px/1.5 var(--display); letter-spacing: .06em; text-transform: uppercase; background: #FFD54A; color: #3a2a00;
  border-radius: 5px; padding: 0 5px; margin-inline-end: 6px; vertical-align: .1em; }
.draft-note { max-width: var(--wrap); margin: 10px auto 0; padding-inline: var(--pad); font-size: 14px; }

/* ---------------------------------------------------------------- header + menu */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(247, 246, 242, .86); border-bottom: 2px solid rgba(42, 42, 42, .08); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-head { -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); background: rgba(247, 246, 242, .72); }
}
.head-bar { display: flex; align-items: center; gap: 14px; min-height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--display); text-decoration: none; white-space: nowrap; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--stroke); box-shadow: 0 3px 0 var(--stroke); }
.nav-main { display: none; gap: 4px; margin-inline-start: auto; }
.nav-main a { font: 600 15px/1 var(--display); text-decoration: none; padding: 10px 11px; border-radius: 12px; color: var(--ink-2); white-space: nowrap; }
.nav-main a:hover, .nav-main a[aria-current] { color: var(--ink); background: rgba(255, 236, 139, .55); }
.head-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.nav-lang { display: flex; }
/* the language button (built by i18n.js with inline styles) matches Play now and Menu: same height, stroke and lip */
.nav-lang > button { min-height: 42px !important; padding: 0 12px !important; border: 3px solid var(--stroke) !important;
  border-radius: 13px !important; box-shadow: 0 var(--lip) 0 var(--stroke) !important; background: var(--card) !important; }
.menu { position: static; }
.menu-btn { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 12px; border-radius: 13px; cursor: pointer;
  font: 700 15px/1 var(--display); background: var(--card); border: 3px solid var(--stroke); box-shadow: 0 var(--lip) 0 var(--stroke); -webkit-tap-highlight-color: transparent; }
.menu-btn::-webkit-details-marker { display: none; }
.menu[open] .menu-btn { background: var(--lemon); }
.menu-sheet { position: fixed; z-index: 60; top: var(--head-h); left: 0; right: 0; bottom: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--paper); border-top: 2px solid rgba(42, 42, 42, .1); padding: 18px var(--pad) 40px; }
.menu-groups { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.mg { background: var(--card); border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); padding: 12px 16px; }
.mg-h { display: flex; align-items: center; gap: 8px; font: 700 18px/1.2 var(--display); text-decoration: none; margin: 0; padding: 6px 0; }
.mg ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.mg ul.cols2 { grid-template-columns: 1fr 1fr; }
.mg li a { display: block; padding: 8px 0; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.menu-region { max-width: 760px; margin: 16px auto 0; }
.mr-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 8px 0 4px; }
.lang-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-list a { display: inline-block; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--stroke); text-decoration: none; font-weight: 600; background: var(--card); }
.lang-list a[aria-current] { background: var(--lemon); }
html.menu-open { overflow: hidden; }
/* a blurred header is the containing block of fixed children: drop the blur while the menu is open */
html.menu-open .site-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }
@supports selector(:has(*)) { .site-head:has(.menu[open]) { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); } }
@media (min-width: 1180px) {
  .nav-main { display: flex; }
  .menu { display: none; }
  /* only while the links show: below this width .head-tools keeps margin-inline-start: auto, so the buttons sit on the right */
  .nav-main + .head-tools { margin-inline-start: 6px; }
}
@media (max-width: 460px) { .menu-word { display: none; } .brand span { font-size: 17px; } .head-play { padding-inline: 12px; }
  .nav-lang > button { padding: 0 9px !important; } .nav-lang > button > span { display: none; } }
@media (max-width: 370px) { .brand span { display: none; } }

/* ---------------------------------------------------------------- the call to action */
.cta-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; background: #101114; color: #fff;
  border-radius: 14px; border: 3px solid var(--stroke); box-shadow: 0 var(--lip) 0 #000; text-decoration: none; }
.store .gp { width: 24px; height: 26px; }
.store span { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.store small { font: 600 10px/1 var(--body); letter-spacing: .06em; opacity: .85; }
.store b { font: 700 18px/1.1 var(--display); }
.store.small { min-height: 44px; padding: 6px 12px 6px 10px; }
.store.small b { font-size: 15px; }
.qr-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; background: var(--card); border: 3px solid var(--stroke);
  border-radius: 16px; box-shadow: 0 4px 0 var(--stroke); max-width: 260px; font-size: 13.5px; line-height: 1.35; font-weight: 600; }
.qr-chip img { width: 72px; height: 72px; border-radius: 10px; }
.a2hs { display: none; font-size: 14px; color: var(--ink-2); margin: 4px 0 0; flex-basis: 100%; }
html[data-os="android"] .hide-android, html[data-os="ios"] .hide-ios, html[data-os="mobile"] .hide-mobile { display: none !important; }
html[data-os="ios"] .only-ios { display: block; }
html[data-os="desktop"] .cta-group .cta-web { order: -1; }
.show-android-only, .show-ios-only { display: none; }
html[data-os="android"] .show-android-only, html[data-os="ios"] .show-ios-only { display: block; }
html[data-os="android"] .show-desktop-only, html[data-os="ios"] .show-desktop-only { display: none; }

.sticky-cta { position: fixed; z-index: 45; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .94); border: 3px solid var(--stroke); box-shadow: 0 6px 0 var(--stroke), 0 14px 30px rgba(0, 0, 0, .16);
  transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); max-width: calc(100vw - 20px); }
.sticky-cta.up { transform: translate(-50%, 0); }
.sticky-cta[hidden] { display: none; }
html.sticky-on .site-foot { padding-bottom: 96px; }
@media (min-width: 900px) { .sticky-cta { display: none !important; } }

/* ---------------------------------------------------------------- the hero */
.hero { position: relative; padding: clamp(24px, 5vw, 64px) 0 clamp(28px, 5vw, 56px); --p: 0; }
.hero-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-title { font-size: clamp(38px, 6.6vw, 74px); font-weight: 700; line-height: 1.02; letter-spacing: -.025em; margin-bottom: 18px; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 6px; }
.made-for { margin: 14px 0 0; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.hero-tiles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.ht { position: absolute; left: var(--x); top: var(--y); width: clamp(38px, 5vw, 62px); height: clamp(38px, 5vw, 62px); display: grid; place-items: center;
  font: 700 clamp(22px, 3vw, 36px)/1 var(--display); background: var(--c); border: 3px solid var(--stroke); border-radius: 14px;
  box-shadow: 0 4px 0 var(--stroke); transform: rotate(var(--r)); opacity: .9; }
.hero-grid, .hero-copy { position: relative; z-index: 1; }
@media (max-width: 899px) {
  .ht { opacity: .55; width: 40px; height: 40px; font-size: 22px; }
  .ht:nth-child(n+5) { display: none; }
  .ht:nth-child(1) { left: auto; right: 3%; top: 2%; } .ht:nth-child(2) { left: 84%; top: 46%; } .ht:nth-child(3) { left: 2%; top: 58%; } .ht:nth-child(4) { left: 88%; top: 74%; }
}
.hero-media { display: flex; flex-direction: column; align-items: center; }
.phone-stage { position: relative; perspective: 1300px; width: min(300px, 72vw); }
/* a drawn phone: the notch sits in the top bezel, never over the screen, and the screen box has the video's own shape
   (9:16 for the films, 480:1066 for the gameplay takes), so the whole app screen always shows, never cropped or zoomed */
.phone { position: relative; border-radius: 42px; background: #15161B; border: 4px solid var(--stroke); padding: 26px 9px 18px;
  box-shadow: 0 8px 0 var(--stroke), 0 30px 60px rgba(38, 42, 48, .28); transform-style: preserve-3d; }
.phone-screen { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #E3EFF9, #BFE6C5 70%); }
.phone-screen.s920 { aspect-ratio: 480 / 1066; background: #E9EEF3; }
.phone-screen video, .phone-screen .clip-still { display: block; width: 100%; height: auto; object-fit: contain; background: transparent; }
@supports (aspect-ratio: 1) { .phone-screen video, .phone-screen .clip-still { height: 100%; } }
.phone-notch { position: absolute; top: 8px; left: 50%; width: 28%; height: 10px; margin-left: -14%; border-radius: 99px; background: #2D3138; }
.clip-phone { margin-bottom: 22px; }
.clip-toggle { position: absolute; left: 50%; top: 100%; margin: -16px 0 0 -20px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; border: 2.5px solid var(--stroke); background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 3px 0 var(--stroke); cursor: pointer; }
.clip-toggle[hidden] { display: none; }
.clip-toggle .ico { width: 18px; height: 18px; }
.clip-toggle .ico:first-child, .clip-toggle.playing .ico:last-child { display: none; }
.clip-toggle.playing .ico:first-child { display: block; }
.clip-toggle.big { width: 52px; height: 52px; margin: -22px 0 0 -26px; background: var(--lemon); }
.clip-toggle.big .ico { width: 24px; height: 24px; }
.phone.mini { border-width: 3px; border-radius: 24px; padding: 15px 5px 10px; box-shadow: 0 5px 0 var(--stroke); }
.phone.mini .phone-screen { border-radius: 12px; }
.phone.mini .phone-notch { top: 5px; height: 6px; }
.phone.mini .clip-toggle { width: 34px; height: 34px; margin: -12px 0 0 -17px; }
.phone.mini .clip-toggle.big { width: 42px; height: 42px; margin: -16px 0 0 -21px; }
.video-play { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; min-height: 52px;
  padding: 12px 20px; border-radius: 99px; border: 3px solid var(--stroke); background: var(--lemon); font: 700 16px/1 var(--display); box-shadow: 0 5px 0 var(--stroke); cursor: pointer; }
.video-play[hidden] { display: none; }
.sticker { position: absolute; top: 10%; inset-inline-end: -14%; transform: rotate(10deg); font: 700 18px/1 var(--display); background: var(--pink);
  border: 3px solid var(--stroke); box-shadow: 0 4px 0 var(--stroke); padding: 10px 14px; border-radius: 14px; white-space: nowrap; }
.hero-doc { position: absolute; bottom: 4%; inset-inline-start: -22%; width: 34%; }
.video-cap { font-size: 14px; color: var(--ink-2); margin-top: 18px; text-align: center; }
@media (max-width: 899px) { .hero-media .hero-doc { inset-inline-start: 2%; width: 24%; } [dir="rtl"] .hero-media .hero-doc { inset-inline-end: 2%; } }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.08fr .92fr; }
}

/* ---------------------------------------------------------------- sections and cards */
.sec { padding-block: clamp(28px, 5vw, 56px); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(18px, 3vw, 30px); }
.sec-title { font-size: clamp(28px, 4.2vw, 44px); font-weight: 700; }
.sec-title.left { text-align: start; }
.sec-sub { color: var(--ink-2); font-size: 17.5px; max-width: 56ch; margin-inline: auto; }
.sec-ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--card); border: 3px solid var(--stroke);
  box-shadow: 0 4px 0 var(--stroke); margin-bottom: 12px; font-size: 26px; }
.center-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.cards { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.cards.c4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.cards.c2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.cards.c5 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.mcard, .hcard, .xcard, .how-card, .mini-mode {
  position: relative; background: var(--card); border: 3px solid var(--stroke); border-radius: var(--r); box-shadow: 0 var(--lip) 0 var(--stroke);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mcard { display: flex; gap: 14px; padding: 18px; align-items: flex-start; }
.mcard-ic { flex: 0 0 auto; }
.mcard.has-clip { flex-direction: column; align-items: stretch; }
.mcard-clip { display: flex; justify-content: center; padding: 6px 0 2px; border-radius: 16px; background: var(--pal); }
.mcard-clip .phone { width: 150px; margin: 10px 0 30px; }
.mc-title { display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) {   /* the wide Method Lab card: the phone beside the words */
  .cards.bento .mcard.wide.has-clip { flex-direction: row; align-items: center; }
  .cards.bento .mcard.wide.has-clip .mcard-clip { flex: 0 0 auto; padding: 4px 28px; }
}
.mc-title .micon { flex: 0 0 auto; width: 30px; height: 30px; }
.mcard-ic .micon { width: 64px; height: 64px; }
.mcard h3 { font-size: 20px; margin-bottom: 4px; }
.mcard p { font-size: 15.5px; color: var(--ink-2); margin-bottom: 8px; }
.more { display: inline-flex; align-items: center; gap: 4px; font: 700 15px/1.2 var(--display); text-decoration: none; color: var(--ink); }
.mcard .more { position: static; }
.micon { display: block; }
.micon.big { width: 76px; height: 76px; }
.micon.tiny { width: 34px; height: 34px; display: inline-block; }
@media (hover: hover) {
  .mcard:hover, .hcard:hover, .xcard:hover, .how-card:hover, .mini-mode:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 calc(var(--lip) + 4px) 0 var(--stroke); }
}
.cards.bento .mcard.wide { background: #F3EEFB; }
@media (min-width: 900px) {
  .cards.bento { grid-template-columns: repeat(3, 1fr); }
  .cards.bento .mcard.wide { grid-column: span 2; }
}
@supports (container-type: inline-size) {
  .mcard { container-type: inline-size; }
  @container (min-width: 460px) { .mcard-body h3 { font-size: 24px; } .mcard-ic .micon { width: 86px; height: 86px; } }
}

/* hub cards */
.hcard { display: flex; flex-direction: column; overflow: hidden; }
.hc-art { background: var(--pal); border-bottom: 3px solid var(--stroke); display: grid; place-items: center; min-height: 128px; padding: 14px; }
.hc-art .micon { width: 86px; height: 86px; }
.hc-scene { display: block; width: 100%; }
.hc-scene .art { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; }
.flag-mini { width: 96px; height: auto; }
.hc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.hc-body h3 { font-size: 21px; margin-bottom: 6px; }
.hc-body p { font-size: 15.5px; color: var(--ink-2); flex: 1; }
.stretch { text-decoration: none; }
.stretch::after { content: ''; position: absolute; inset: 0; border-radius: var(--r); }
.hcard .more { margin-top: auto; }
.hcard.soon { opacity: .78; }
.soon-tag { font: 600 14px/1.3 var(--display); color: var(--ink-2); }
.idea-mini { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font: 600 13px/1.3 var(--display); padding: 5px 10px; border-radius: 99px;
  background: var(--pal); border: 2px solid var(--stroke); margin-bottom: 10px; }
.pal-mint { --pal: #E4F5EA; --pal-a: #A8E6C0; } .pal-pink { --pal: #FBEAF0; --pal-a: #FFB7C5; } .pal-sky { --pal: #E3EFF9; --pal-a: #A8D2EE; }
.pal-lemon { --pal: #FCF5D8; --pal-a: #FFEC8B; } .pal-peach { --pal: #FCEBDD; --pal-a: #FFCBA4; } .pal-lavender { --pal: #EEE7F7; --pal-a: #D5C4F0; }
.pal-rose { --pal: #F8E4E4; --pal-a: #F0B8B8; } .pal-sage { --pal: #E6EEDF; --pal-a: #BFD4B0; } .pal-periwinkle { --pal: #E6E8F8; --pal-a: #B8BFEC; }
.pal-coral { --pal: #FCE6DB; --pal-a: #F6BBA0; } .pal-classic { --pal: #EEF0F2; --pal-a: #BFE6C5; }

.xcard { display: flex; flex-direction: column; text-decoration: none; overflow: hidden; }
.xcard .scene-card { margin: 0; border-bottom: 3px solid var(--stroke); background: #fff; }
.xc-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 18px; }
.xc-h { font: 700 21px/1.2 var(--display); }
.xc-p { color: var(--ink-2); font-size: 15.5px; }
.how-card { display: flex; gap: 16px; align-items: center; text-decoration: none; padding: 12px 18px 12px 12px; margin: 30px 0; background: #FFFBEA; }
.how-card .scene-card { width: 140px; flex: 0 0 auto; margin: 0; border-radius: 14px; overflow: hidden; border: 2px solid var(--stroke); }
.how-card > span { display: flex; flex-direction: column; gap: 2px; }
.scene-card { margin: 0; }
.scene-card .art { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- sums that solve themselves */
.sums { --p: 1; padding-block: clamp(30px, 5vw, 60px); text-align: center; }
.sum-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 2.4vw, 26px); margin-top: 22px; }
.sum-card { --k: clamp(0, calc((var(--p) - .26 - var(--o, 0)) * 4.4), 1); position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 22px; background: var(--card); border: 3px solid var(--stroke); border-radius: 20px; box-shadow: 0 5px 0 var(--stroke);
  font: 700 clamp(28px, 4.4vw, 44px)/1 var(--display); }
.sum-a { display: inline-flex; padding: 4px 8px; border-radius: 12px; background: var(--lemon); border: 2px solid var(--stroke); }
.dg { display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.strip { display: block; transform: translateY(calc(var(--v) * -1em * var(--k))); }
.sum-card::after { content: ''; position: absolute; top: -12px; inset-inline-end: -12px; width: 28px; height: 28px; border-radius: 50%; background: var(--mint) no-repeat center / 16px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%232A2A2A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border: 2px solid var(--stroke); opacity: calc((var(--k) - .92) * 12.5); }

/* ---------------------------------------------------------------- built on strip */
.built-on { padding-block: 26px 34px; text-align: center; }
.bo-h { font-size: clamp(22px, 3vw, 30px); margin-bottom: 4px; }
.bo-sub { color: var(--ink-2); font-size: 15.5px; margin-bottom: 16px; }
.bo-track { display: flex; overflow: hidden; padding-block: 8px 12px; }
.bo-list { list-style: none; margin: 0 auto; padding: 0 var(--pad); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bo-dup { display: none; }
.idea-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: var(--card); border: 3px solid var(--stroke);
  box-shadow: 0 4px 0 var(--stroke); font: 700 15.5px/1 var(--display); text-decoration: none; white-space: nowrap; }
.idea-chip:hover { background: var(--lemon); }

/* ---------------------------------------------------------------- Math Run spotlight */
.spot-card { display: grid; gap: clamp(18px, 3vw, 34px); align-items: center; background: var(--pal); border: 3px solid var(--stroke); border-radius: 30px;
  box-shadow: 0 7px 0 var(--stroke); padding: clamp(18px, 3.4vw, 40px); }
.spot-title { display: flex; align-items: center; gap: 14px; margin: 6px 0 10px; }
.spot-title h2 { font-size: clamp(34px, 5vw, 54px); margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .tick { width: 22px; height: 22px; margin-top: .15em; }
.prose ul.ticks li::before { content: none; }
@media (min-width: 900px) { .spot-card { grid-template-columns: .9fr 1.1fr; } }
/* the jungle is the backdrop; the real game runs in the phone in front of it */
.run-side { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.run-stage { position: relative; width: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 24px; border: 3px solid var(--stroke);
  padding: 26px 16px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .05); }
.run-scene { --p: .5; position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(180deg, #D3EEFF 0%, #EAF7FF 58%, #E9F7EE 100%); }
.run-phone { position: relative; z-index: 1; width: min(250px, 66vw); margin-bottom: 30px; }
.run-scene .lyr { position: absolute; }
.run-scene .lyr .art { display: block; width: 100%; height: auto; }
.l-sky { inset: 0; background: radial-gradient(60px 60px at 82% 18%, #FFEC8B 98%, transparent 100%); }
.l-far { left: -15%; width: 130%; bottom: 26%; transform: translateX(calc((var(--p) - .5) * var(--z) * -30%)); }
.l-mid { left: -20%; width: 140%; bottom: 24%; transform: translateX(calc((var(--p) - .5) * var(--z) * -34%)); }
.l-track { left: 0; width: 100%; bottom: -2%; }
.l-near { left: -20%; width: 140%; bottom: -6%; transform: translateX(calc((var(--p) - .5) * var(--z) * -40%)); }

/* ---------------------------------------------------------------- the space band */
.space { --p: .5; position: relative; overflow: hidden; background: radial-gradient(120% 90% at 70% 0%, #2B2F6B, var(--night) 70%); color: #EEF1FF;
  padding-block: clamp(60px, 9vw, 120px); margin-block: 20px; border-block: 4px solid var(--stroke); }
.space-scene { position: absolute; inset: 0; }
.space-scene .lyr { position: absolute; }
.space-scene .art { display: block; width: 100%; height: auto; }
.st1, .st2 { inset: -20% 0; }
.st1 .art, .st2 .art { width: 100%; height: 100%; }
.st1 { transform: translateY(calc((var(--p) - .5) * var(--z) * -260px)); }
.st2 { transform: translateY(calc((var(--p) - .5) * var(--z) * -260px)); opacity: .7; }
.pl1 { width: clamp(130px, 18vw, 230px); inset-inline-end: 6%; top: 8%; transform: translateY(calc((var(--p) - .5) * var(--z) * -260px)); }
.pl2 { width: clamp(90px, 11vw, 150px); inset-inline-start: 4%; bottom: 6%; transform: translateY(calc((var(--p) - .5) * var(--z) * -260px)); }
.pl3 { width: clamp(60px, 7vw, 90px); inset-inline-end: 30%; bottom: 12%; transform: translateY(calc((var(--p) - .5) * var(--z) * -260px)); }
.ship { width: clamp(60px, 7vw, 92px); left: 50%; top: 50%; transform: translate(calc((var(--p) - .5) * 90vw), calc((var(--p) - .5) * -180px)) rotate(38deg); }
.space-grid { position: relative; z-index: 1; display: grid; gap: clamp(20px, 4vw, 48px); justify-items: center; align-items: center; }
@media (min-width: 900px) { .space-grid { grid-template-columns: auto minmax(0, 640px); justify-content: center; } }
.space-phone { width: min(240px, 64vw); box-shadow: 0 8px 0 #000, 0 30px 60px rgba(0, 0, 0, .45); }
.space-copy { position: relative; z-index: 1; max-width: 640px; text-align: center; background: rgba(28, 31, 63, .55); border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 26px; padding: clamp(18px, 3vw, 30px); }
.space-copy p { color: #D8DDFF; font-size: 17.5px; }
.raiders-line { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px !important; }
.space-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------------------------------------------------------------- scatter, adapt */
.scatter-head { --p: 1; --k: clamp(0, calc((var(--p) - .1) * 3.6), 1); }
.scatter { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; min-height: 64px; }
.sc { display: inline-grid; place-items: center; width: clamp(44px, 6vw, 60px); height: clamp(44px, 6vw, 60px); font: 700 clamp(24px, 3.4vw, 34px)/1 var(--display);
  background: var(--c); border: 3px solid var(--stroke); border-radius: 14px; box-shadow: 0 4px 0 var(--stroke);
  transform: translate(calc(var(--sx) * (1 - var(--k))), calc(var(--sy) * (1 - var(--k)))) rotate(calc(var(--sr) * (1 - var(--k)))); }
.adapt-card { display: grid; gap: 24px; align-items: center; background: var(--card); border: 3px solid var(--stroke); border-radius: 30px; box-shadow: 0 7px 0 var(--stroke);
  padding: clamp(18px, 3.4vw, 40px); }
@media (min-width: 900px) { .adapt-card { grid-template-columns: 1.1fr .9fr; } }
.adapt-art { --p: 1; position: relative; }
.ab-box { display: flex; align-items: flex-end; justify-content: center; gap: clamp(10px, 2vw, 20px); height: 220px; padding: 22px; border-radius: 24px; background: #F3F5F7; border: 3px solid var(--stroke); }
.ab { display: block; width: 18%; height: var(--h); background: var(--mint); border: 3px solid var(--stroke); border-radius: 10px; box-shadow: 0 4px 0 var(--stroke);
  transform-origin: 50% 100%; transform: scaleY(calc(.15 + .85 * clamp(0, calc((var(--p) - .12 - var(--i) * .07) * 3.4), 1))); }
.ab:nth-child(4) { background: var(--lemon); }
.ab-chip { position: absolute; top: -14px; inset-inline-end: 8%; font: 700 15px/1 var(--display); padding: 10px 14px; border-radius: 99px; background: var(--lemon);
  border: 3px solid var(--stroke); box-shadow: 0 4px 0 var(--stroke); }

/* ---------------------------------------------------------------- get it (the QR card) */
.getit { display: grid; gap: 28px; align-items: center; background: linear-gradient(160deg, #262A30, #33383F); color: #fff; border: 3px solid var(--stroke);
  border-radius: 30px; box-shadow: 0 7px 0 #000; padding: clamp(22px, 4vw, 44px); }
.getit h2 { font-size: clamp(26px, 3.4vw, 36px); }
.getit p { color: #CDD1D7; }
.getit .qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.getit .qr { background: #fff; border-radius: 22px; padding: 14px; width: 200px; height: 200px; }
.getit .qr img { width: 100%; height: 100%; display: block; }
.getit .qr-cap { display: none; margin: 0; font-size: 13px; color: #CDD1D7; max-width: 18ch; text-align: center; }
.getit-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.getit .btn { background: linear-gradient(180deg, #FFE08A, #F5C233); color: #3a2606; }
.getit-note { font-size: 13.5px; color: #A3A9B2 !important; margin: 16px 0 0; }
.getit .a2hs { color: #CDD1D7; }
@media (min-width: 760px) { .getit { grid-template-columns: auto 1fr; } }
.getit.desk { grid-template-columns: 1fr; }
@media (min-width: 760px) { .getit.desk { grid-template-columns: 1fr auto; } .getit.desk .qr-wrap { order: 2; } }
.getit.desk .qr { width: 132px; height: 132px; padding: 10px; border-radius: 16px; }
.getit.desk .qr-cap { display: block; }
html[data-os="android"] .getit .qr-wrap, html[data-os="ios"] .getit .qr-wrap { display: none; }

/* ---------------------------------------------------------------- Doc, pro, faq, cta band */
.doc-says { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0; }
.doc-coin { flex: 0 0 auto; width: 74px; }
.doc-av { display: block; width: 100%; height: auto; }
.doc-av.big { width: 120px; }
.doc-says.big .doc-coin { width: 96px; }
.bubble { position: relative; background: var(--card); border: 3px solid var(--stroke); border-radius: 20px; box-shadow: 0 4px 0 var(--stroke); padding: 14px 18px;
  font-family: var(--display); font-weight: 500; font-size: 17.5px; line-height: 1.45; }
.bubble::before { content: ''; position: absolute; top: 22px; inset-inline-start: -12px; width: 18px; height: 18px; background: var(--card);
  border-inline-start: 3px solid var(--stroke); border-bottom: 3px solid var(--stroke); transform: rotate(45deg); }
[dir="rtl"] .bubble::before { transform: rotate(-45deg); }
.bubble p:last-child { margin: 0; }
.science-teaser .doc-says { max-width: 760px; margin: 0 auto 26px; }
.pro-card { display: grid; gap: 24px; align-items: center; background: linear-gradient(160deg, #FFF3C4, #FFE08A); border: 3px solid var(--stroke); border-radius: 30px;
  box-shadow: 0 7px 0 var(--stroke); padding: clamp(20px, 4vw, 44px); }
@media (min-width: 900px) { .pro-card { grid-template-columns: 1.2fr .8fr; } }
.pro-sub { font: 600 18px/1.4 var(--display); }
.pro-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pro-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; background: rgba(255, 255, 255, .7); border: 2px solid var(--stroke); border-radius: 14px; padding: 10px 12px; }
.pro-art { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.medal { position: relative; width: 150px; height: 150px; }
.medal .disc { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; font-size: 60px;
  background: radial-gradient(circle at 38% 32%, #FFE9A0, #F5C233 55%, #B8860B); border: 4px solid var(--stroke); box-shadow: 0 6px 0 var(--stroke); }
.medal .shine { position: absolute; inset: 14px; border-radius: 50%; z-index: 1; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .55), transparent 30%); }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 260px; }
.swatches i { width: 34px; height: 34px; border-radius: 10px; background: var(--c); border: 2.5px solid var(--stroke); box-shadow: 0 3px 0 var(--stroke); }
.faq { max-width: 860px; }
.qa { background: var(--card); border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); margin-bottom: 12px; }
.qa summary { cursor: pointer; padding: 16px 18px; font: 700 18px/1.3 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; font-size: 26px; line-height: .8; }
.qa[open] summary::after { content: '\2212'; }
.qa p { padding: 0 18px 16px; margin: 0; color: var(--ink-2); }
.cta-band { display: grid; gap: 20px; align-items: center; max-width: calc(var(--wrap) - 2 * var(--pad)); margin: clamp(24px, 5vw, 56px) auto; width: calc(100% - 2 * var(--pad));
  background: #E4F5EA; border: 3px solid var(--stroke); border-radius: 30px; box-shadow: 0 7px 0 var(--stroke); padding: clamp(20px, 4vw, 40px); }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 38px); }
.cta-band-art { display: none; }
@media (min-width: 760px) { .cta-band { grid-template-columns: auto 1fr; } .cta-band-art { display: block; } }

/* ---------------------------------------------------------------- the film dialog (Math Run, with sound) */
.watch-btn .ico { width: 18px; height: 18px; }
.vid-dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
.vid-dialog::backdrop { background: rgba(20, 22, 27, .82); }
.vd-box { position: relative; width: min(92vw, calc(84vh * 9 / 16), 460px); }
.vd-box video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 22px; border: 4px solid var(--stroke); background: #000; }
.vd-close { position: absolute; top: -18px; inset-inline-end: -18px; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid var(--stroke); background: var(--card); box-shadow: 0 4px 0 var(--stroke); cursor: pointer; }

/* ---------------------------------------------------------------- crumbs, page hero, hubs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; margin: 16px 0 0; font-size: 14px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); font-weight: 600; text-decoration: none; padding: 6px 2px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--ink); font-weight: 700; }
.page-hero { display: grid; gap: 22px; align-items: center; margin: 14px 0 22px; padding: clamp(18px, 3.4vw, 36px); background: var(--pal); border: 3px solid var(--stroke);
  border-radius: 30px; box-shadow: 0 7px 0 var(--stroke); }
@media (min-width: 860px) { .page-hero { grid-template-columns: 1.15fr .85fr; } }
.page-hero h1 { font-size: clamp(34px, 5.4vw, 58px); margin: 0; }
.ph-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.ph-art { background: #fff; border: 3px solid var(--stroke); border-radius: 22px; overflow: hidden; box-shadow: 0 5px 0 var(--stroke); }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 14.5px; margin: 6px 0 0; }
.based { display: inline-flex; align-items: center; gap: 6px; font: 600 14.5px/1.3 var(--display); padding: 7px 12px; border-radius: 99px; background: var(--card);
  border: 2px solid var(--stroke); text-decoration: none; }
.mr { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.hub-hero { display: grid; gap: 22px; align-items: center; padding-block: 18px 10px; }
@media (min-width: 900px) { .hub-hero { grid-template-columns: 1.05fr .95fr; } }
.hub-hero h1 { font-size: clamp(36px, 5.6vw, 62px); }
.hub-art-wrap .scene-card { background: #fff; border: 3px solid var(--stroke); border-radius: 26px; overflow: hidden; box-shadow: 0 6px 0 var(--stroke); }

/* the science hub's warm-up brain */
.hub-hero.fx-top { --p: 1; }
.brain-scene { position: relative; margin: 0; background: #fff; border: 3px solid var(--stroke); border-radius: 26px; box-shadow: 0 6px 0 var(--stroke); overflow: hidden; }
.bs-stage { position: relative; aspect-ratio: 3 / 2; }
.bs-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs-warm { opacity: var(--p); }
.bs-link path { stroke-dasharray: 640; stroke-dashoffset: calc(640 * (1 - var(--p))); opacity: .25; }
.bs-spark { position: absolute; left: var(--x); top: var(--y); width: 26px; height: 26px; margin: -13px; background: var(--gold); border: 2.5px solid var(--stroke);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: clamp(0, calc((var(--p) - var(--at)) * 8), 1); transform: scale(clamp(.3, calc((var(--p) - var(--at)) * 6), 1)); }
.bs-cap { position: absolute; bottom: 10px; inset-inline-start: 12px; font: 700 13px/1 var(--display); background: var(--lemon); border: 2px solid var(--stroke);
  border-radius: 99px; padding: 6px 10px; opacity: calc(1 - var(--p) * 2); }

/* ---------------------------------------------------------------- reading pages */
.read-layout { display: grid; gap: 26px; align-items: start; }
@media (min-width: 1040px) { .read-layout { grid-template-columns: 230px minmax(0, 1fr); } }
.toc-desk { display: none; }
@media (min-width: 1040px) { .toc-desk { display: block; position: sticky; top: calc(var(--head-h) + 16px); } .toc-mob { display: none; } }
.toc { background: var(--card); border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); padding: 14px 16px; font-size: 15px; }
.toc-h, .toc summary { font: 700 15px/1.2 var(--display); margin: 0 0 8px; cursor: pointer; }
.toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.toc a { text-decoration: none; color: var(--ink-2); font-weight: 600; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.prose { max-width: 74ch; font-size: 18px; }
.prose.solo { margin-inline: auto; }
.prose section { margin-bottom: 34px; scroll-margin-top: calc(var(--head-h) + 16px); }
.prose h2 { font-size: clamp(25px, 3vw, 31px); display: flex; align-items: center; gap: 10px; }
.prose h2::before { content: ''; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 5px; background: var(--pal-a, var(--mint)); border: 2.5px solid var(--stroke); }
.prose .try h2::before, .prose .refs h2::before { content: none; }
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose ul.bul { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 8px; }
.prose ul.bul li { position: relative; padding-inline-start: 26px; }
.prose ul.bul li::before { content: ''; position: absolute; inset-inline-start: 4px; top: .55em; width: 11px; height: 11px; border-radius: 4px; background: var(--pal-a, var(--mint)); border: 2px solid var(--stroke); }
sup.cites { font-size: .62em; line-height: 0; margin-inline-start: 2px; vertical-align: super; white-space: nowrap; }
a.cite { display: inline-block; min-width: 1.6em; padding: .15em .38em; border-radius: 99px; background: var(--lemon); border: 1.5px solid var(--stroke); color: var(--ink);
  text-decoration: none; font-weight: 700; text-align: center; line-height: 1.2; }
a.cite:target, .ref-list li:target { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: var(--gold); } 100% { background: inherit; } }
.sep { margin: 0 1px; }
.idea-box { background: var(--pal, #fff); border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); padding: 14px 18px; margin-bottom: 16px; }
.idea-label { display: inline-flex; align-items: center; gap: 6px; font: 700 13px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.idea-box p { margin: 0; font-size: 18.5px; }
.means-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .means-grid { grid-template-columns: 1fr 1fr; } }
.means { background: var(--card); border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); padding: 14px 16px; }
.means.yes { background: #F0FAF3; } .means.no { background: #FFF2F4; }
.means h3 { font-size: 19px; }
.means ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.means li { display: flex; gap: 10px; align-items: flex-start; font-size: 16.5px; }
.means .tick { width: 22px; height: 22px; margin-top: .15em; }
.note-box { background: #FFFBEA; border: 3px solid var(--stroke); border-radius: 18px; box-shadow: 0 4px 0 var(--stroke); padding: 14px 18px; margin: 18px 0; }
.note-box.parents { background: #FBEAF0; }
.sci-links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sci-links a { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 99px; border: 2px solid var(--stroke); background: var(--card);
  text-decoration: none; font: 600 15px/1.2 var(--display); }
.mini-modes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 14px; }
.mini-mode { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; }
.mini-mode .micon { width: 54px; height: 54px; flex: 0 0 auto; }
.mini-mode > span { display: flex; flex-direction: column; }
.mm-h { font: 700 17px/1.2 var(--display); }
.mm-p { font-size: 13.5px; color: var(--ink-2); }
.refs { border-top: 3px dashed rgba(42, 42, 42, .2); padding-top: 22px; }
.refs h2 { display: flex; align-items: center; gap: 10px; }
.refs-note { font-size: 14.5px; color: var(--ink-2); }
.ref-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ref-list li { display: flex; gap: 12px; padding: 10px 12px; border-radius: 14px; scroll-margin-top: calc(var(--head-h) + 20px); }
.ref-n { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--lemon); border: 2px solid var(--stroke);
  font: 700 14px/1 var(--display); }
.ref-body p { margin: 0; font-size: 15.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ref-body a.doi, .ref-body a.oa { word-break: break-all; }
.ref-back { margin-top: 4px !important; display: flex; gap: 6px; }
.back { display: inline-flex; align-items: center; gap: 2px; font: 700 13px/1 var(--display); text-decoration: none; padding: 4px 8px; border-radius: 99px; border: 1.5px solid var(--stroke); }
.reviewed { font-size: 14px; color: var(--ink-2); }
.ref-example { margin: 12px 0 0; background: var(--card); border: 3px solid var(--stroke); border-radius: 18px; padding: 14px 16px; box-shadow: 0 4px 0 var(--stroke); }
.ref-example figcaption { font: 700 13px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; color: var(--ink-2); }
.ref-example p { font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.rp { padding: 2px 4px; border-radius: 6px; border-bottom: 4px solid; }
.rp-authors { background: #E4F5EA; border-color: #3FB27F; } .rp-year { background: #FCF5D8; border-color: #E0A81E; }
.rp-title { background: #E3EFF9; border-color: #5B8DEF; } .rp-journal { background: #EEE7F7; border-color: #8E6FD1; } .rp-doi { background: #FBEAF0; border-color: #E36A8C; }
.rp-legend { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 15px; }
.rp-legend li { display: flex; gap: 8px; align-items: center; }
.rp-key { width: 18px; height: 12px; border-radius: 4px; border-bottom: 4px solid; display: inline-block; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-block: 30px 10px; }
.pn { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--card); border: 3px solid var(--stroke); border-radius: 18px;
  box-shadow: 0 4px 0 var(--stroke); text-decoration: none; font: 700 16.5px/1.25 var(--display); min-height: 64px; }
.pn span { display: flex; flex-direction: column; }
.pn small { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.pn.next { justify-content: flex-end; text-align: end; }

/* ---------------------------------------------------------------- try it */
.try { margin: 28px 0; }
.try-card { background: #FFF8D9; border: 3px solid var(--stroke); border-radius: 24px; box-shadow: 0 6px 0 var(--stroke); padding: clamp(16px, 3vw, 24px); }
.try-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.try-top h2 { display: flex; align-items: center; gap: 8px; font-size: 24px; margin: 0; }
.try-clock { --left: 1; font: 700 15px/1 var(--display); min-width: 64px; text-align: center; padding: 8px 10px; border-radius: 99px; border: 2px solid var(--stroke);
  background: linear-gradient(90deg, var(--gold) calc(var(--left) * 100%), #fff calc(var(--left) * 100%)); }
.try-clock:empty { display: none; }
.try-intro { color: var(--ink-2); margin: 6px 0 12px; }
.try-stage { min-height: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.try.live .try-static, .try.live .try-q-static { display: none; }
.try-q { font: 700 clamp(30px, 5vw, 46px)/1.1 var(--display); margin: 0; }
.try-form { display: flex; gap: 10px; flex-wrap: wrap; }
.try-in { font: 700 26px/1 var(--display); width: 8ch; min-height: 54px; padding: 8px 12px; border: 3px solid var(--stroke); border-radius: 14px; background: #fff; color: var(--ink); }
.try-msg { min-height: 1.4em; margin: 0; font-weight: 600; }
.try-result { font: 700 22px/1.3 var(--display); margin: 0; }
.try-hint, .try-count { color: var(--ink-2); margin: 0; font-weight: 600; }
.try.won .try-card { background: #E4F5EA; }
.try-static summary { cursor: pointer; font-weight: 700; }
.pick-grid { display: grid; grid-template-columns: repeat(4, minmax(56px, 1fr)); gap: 10px; width: 100%; max-width: 360px; }
.pick { min-height: 56px; font: 700 22px/1 var(--display); border: 3px solid var(--stroke); border-radius: 14px; background: #fff; box-shadow: 0 4px 0 var(--stroke); cursor: pointer; }
.pick.hit { background: var(--mint); }
.pick.slip { background: var(--pink); }

/* ---------------------------------------------------------------- footer */
.site-foot { margin-top: 30px; padding: 40px 0 24px; border-top: 3px solid rgba(42, 42, 42, .12); background: rgba(255, 255, 255, .5); font-size: 15px; }
.foot-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.foot-grid a { display: block; text-decoration: none; color: var(--ink-2); padding: 5px 0; font-weight: 500; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid .brand { display: inline-flex; color: var(--ink); }
.fh { font: 700 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
.fh + a { margin-top: 0; }
.foot-grid div > .fh:not(:first-child) { margin-top: 16px; }
.foot-legal { margin-top: 26px; font-size: 13px; color: var(--ink-2); }
.foot-legal p { margin: 4px 0; }

/* ================================================================= effects (html.fx only) */
@keyframes fxp { from { --p: 0; } to { --p: 1; } }
@supports (animation-timeline: view()) {
  html.fx .fx { animation: fxp linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  html.fx .fx-top { animation: fxp linear both; animation-timeline: scroll(root block); animation-range: 0px 90vh; }
}
html.fx .hero { --p: 0; }
html.fx .sums, html.fx .scatter-head, html.fx .adapt-art { --p: 0; }
html.fx .hub-hero.fx-top { --p: 0; }
html.fx .run-scene, html.fx .space { --p: .5; }
/* the hero: tiles drift at their own depth, the phone flattens as you scroll */
html.fx .ht { translate: 0 calc(var(--p) * var(--z) * -280px); }
html.fx .hero-tiles.is-on .ht { animation: wobble 7s ease-in-out infinite; animation-delay: calc(var(--z) * -4s); }
@keyframes wobble { 50% { rotate: 8deg; } }
html.fx #heroPhone { --tx: 0deg; --ty: 0deg;
  transform: rotateY(calc(-16deg * (1 - var(--p)) + var(--tx))) rotateX(calc(8deg * (1 - var(--p)) + var(--ty))) translateY(calc(var(--p) * -28px)); }
html.fx .phone-stage { animation: phone-in .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes phone-in { from { transform: translateY(46px) rotateZ(-4deg); } to { transform: none; } }
html.fx .sticker { animation: pop 1s .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: rotate(10deg) scale(0); } to { transform: rotate(10deg) scale(1); } }
/* entrance reveals */
html.fx .rise.pre { opacity: 0; transform: translateY(28px); }
html.fx .rise.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
/* idle loops, only while on screen */
html.fx .bo-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
html.fx .bo-list { flex-wrap: nowrap; margin: 0; padding-inline-end: 10px; }
html.fx .bo-dup { display: flex; }
html.fx .bo-track.is-on .bo-list { animation: marquee 38s linear infinite; }
html.fx .bo-track:hover .bo-list, html.fx .bo-track:focus-within .bo-list { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
[dir="rtl"] .bo-track { direction: ltr; }
html.fx .is-on .idle-bob { animation: bob 1.2s ease-in-out infinite; }
html.fx .is-on .idle-run path { animation: run .5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
html.fx .is-on .idle-float { animation: floaty 5s ease-in-out infinite; animation-delay: var(--d, 0s); }
html.fx .is-on .idle-sway { animation: sway 4s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: 50% 100%; }
html.fx .is-on .idle-twinkle { animation: twinkle 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
html.fx .is-on .idle-pulse { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
html.fx .is-on .idle-spin { animation: spin 12s linear infinite; transform-box: fill-box; transform-origin: center; }
html.fx .is-on .idle-dash { animation: dash 1s linear infinite; }
html.fx .is-on .idle-grow { animation: grow 3s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
html.fx .is-on .idle-orbit { animation: orbit 8s linear infinite; transform-box: view-box; transform-origin: 240px 168px; }
html.fx .is-on .max-eyes, html.fx .idle-host.is-on .max-eyes { animation: blink 5.5s infinite; transform-box: fill-box; transform-origin: center; }
html.fx .medal.is-on .shine { animation: spin 6s linear infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes run { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes sway { 50% { transform: rotate(3deg); } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.7); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes grow { from { transform: scaleY(.85); } to { transform: scaleY(1); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
html.fx .try.shake .try-card { animation: shake .4s; }
html.fx .chain-step.pop { animation: pulse .5s; }
html.fx .try.won .try-result { animation: pop-in .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* page changes: cross-fade, and a workout icon flies from its card to the page it opens */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- RTL and scripts */
[dir="rtl"] .hero-doc { inset-inline-start: auto; inset-inline-end: -22%; }
[dir="rtl"] .pn.next { text-align: start; }
:lang(hi) .hero-title, :lang(bn) .hero-title, :lang(ar) .hero-title, :lang(ur) .hero-title { line-height: 1.3; letter-spacing: 0; }
:lang(hi) h1, :lang(hi) h2, :lang(bn) h1, :lang(bn) h2, :lang(ar) h1, :lang(ar) h2, :lang(ur) h1, :lang(ur) h2 { line-height: 1.45; letter-spacing: 0; }
:lang(ar) .kicker, :lang(ur) .kicker, :lang(ar) .tag, :lang(ur) .tag { letter-spacing: 0; text-transform: none; }

/* ---------------------------------------------------------------- print */
@media print {
  .site-head, .sticky-cta, .cta-band, .try, .hero-tiles, .prevnext, .built-on { display: none !important; }
  body { background: #fff; }
}
