/* ==========================================================================
   MathClash — Landing v3 · Pro-style product page in the app's Flexoki (light + dark)
   Scoped to #mc-landing (built by landing-v3.js). Shared tokens + the
   Geist face also feed auth-pro.css.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Palette: the signed-in app's Flexoki inks (app.css), so the landing, sign-in
   and About read as the same product. Ink is the default (2026-11-19); the
   bright-mode button in the landing nav, or the app's theme switch, stores the
   pick and sets data-mc-theme on <html> (theme-boot.js applies it before first
   paint). Role names stay stable so every stylesheet and the field follow:
   --mc3-black is the page (Ink Black / Paper), --mc3-acc the one action colour
   (Orange), --mc3-ember the rival (Blue).
   tools/check-palette.js asserts the contrast ratios of both blocks. */
:root {
  color-scheme: dark;
  --mc3-black: #100f0f;        /* Ink Black */
  --mc3-black-rgb: 16, 15, 15;
  --mc3-g1: #1c1b1a;           /* panels, bands, the footer */
  --mc3-g2: #1c1b1a;           /* the slab and cards, edged by a hairline */
  --mc3-g3: #282726;           /* chips, tracks, avatars */
  --mc3-line: #282726;         /* Hairline */
  --mc3-line-2: #343331;       /* Rule */
  --mc3-line-3: #403e3c;       /* Track: hover edges, the scrollbar */
  --mc3-t1: #fffcf0;           /* Paper, as ink */
  --mc3-t1-rgb: 255, 252, 240;
  --mc3-t2: #cecdc3;
  --mc3-t3: #878580;
  --mc3-acc: #da702c;          /* Orange 400 */
  --mc3-acc-rgb: 218, 112, 44;
  --mc3-acc-hi: #ec8b49;       /* hover, and text on the wash */
  --mc3-acc-ink: #100f0f;
  --mc3-acc-soft: #40200d;     /* Orange Wash */
  --mc3-ember: #4385be;        /* Blue 400: the rival, the leader */
  --mc3-ember-rgb: 67, 133, 190;
  --mc3-ember-soft: rgba(67, 133, 190, 0.16);
  --mc3-ember-ink: #66a0c8;    /* rival text on its wash */
  --mc3-thumb: #100f0f;        /* the active segment is the page, ringed (as in the app) */
  --mc3-g3-hi: #343331;
  --mc3-red: #d14d41;          /* Miss: a state, not a brand colour */
  --mc3-red-rgb: 209, 77, 65;
  --mc3-red-text: #e8705f;
  --mc3-hl: rgba(255, 252, 240, 0.07);   /* the top light on lifted surfaces */
  --mc3-drop: rgba(0, 0, 0, 0.8);        /* long soft drops */
  --mc3-key: 1;                          /* the orange key lights at full strength on ink */
  --mc3-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mc3-font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* the bundle's own families (Bricolage, Space Mono) point at Geist too, so no
     screen ever downloads the legacy faces (numbers use tabular figures instead) */
  --font-sans: var(--mc3-font);
  --font-mono: var(--mc3-font);
}
/* bright mode: picked with the landing's button or the app's theme switch */
:root[data-mc-theme="light"] {
  color-scheme: light;
  --mc3-black: #fffcf0; --mc3-black-rgb: 255, 252, 240;
  --mc3-g1: #f2f0e5; --mc3-g2: #fffcf0; --mc3-g3: #f2f0e5;
  --mc3-line: #e6e4d9; --mc3-line-2: #dad8ce; --mc3-line-3: #cecdc3;
  --mc3-t1: #100f0f; --mc3-t1-rgb: 16, 15, 15; --mc3-t2: #403e3c; --mc3-t3: #66655f;
  --mc3-acc: #bc5215; --mc3-acc-rgb: 188, 82, 21; --mc3-acc-hi: #9d4310; --mc3-acc-ink: #fffcf0; --mc3-acc-soft: #ffe7ce;
  --mc3-ember: #205ea6; --mc3-ember-rgb: 32, 94, 166; --mc3-ember-soft: rgba(32, 94, 166, 0.12); --mc3-ember-ink: #1a4f8c;
  --mc3-thumb: #fffcf0; --mc3-g3-hi: #e6e4d9;
  --mc3-red: #af3029; --mc3-red-rgb: 175, 48, 41; --mc3-red-text: #942822;
  --mc3-hl: rgba(255, 255, 255, 0); --mc3-drop: rgba(16, 15, 15, 0.2); --mc3-key: 0.5;
}

/* ---- the landing owns the page: retire the old ambience layers -------- */
html.mc3-landing,
html.mc3-landing body { background: var(--mc3-black) !important; }
html.mc3-landing #mc-aurora,
html.mc3-landing #mc-grain,
html.mc3-landing #mc-rail-l,
html.mc3-landing #mc-rail-r,
html.mc3-landing #mc-cursor-dot,
html.mc3-landing #mc-cursor-ring,
html.mc3-landing .math-background { display: none !important; }
/* the bundle's fixed grain overlay: the stage is navy, not navy plus noise */
html.mc3-landing body::before,
html.mc3-landing body::after { display: none !important; }
/* the bundle's toast list has no styles while the app CSS is parked on the
   landing: its default list margins left a 16px strip under the footer */
html.mc3-landing #root > div > ol { margin: 0; padding: 0; list-style: none; }

#mc-landing,
#mc-boot {
  position: relative;
  z-index: 2;
  display: block;
  background: var(--mc3-black);
  color: var(--mc3-t1);
  font-family: var(--mc3-font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  cursor: auto;
}
#mc-landing *,
#mc-landing *::before,
#mc-landing *::after,
#mc-boot * { box-sizing: border-box; cursor: inherit; }
#mc-landing button,
#mc-landing a { cursor: pointer; }
#mc-landing input { cursor: text; }
#mc-landing ::selection { background: var(--mc3-acc); color: var(--mc3-acc-ink); }
/* resets at zero specificity so component classes always win */
:where(#mc-landing, #mc-boot) :where(h1, h2, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
:where(#mc-landing) :where(ul, ol) { list-style: none; }
:where(#mc-landing) b { font-weight: 600; }
:where(#mc-landing) button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  letter-spacing: inherit;
}
#mc-landing :focus { outline: none; }
#mc-landing :focus-visible {
  outline: 2px solid var(--mc3-acc);
  outline-offset: 3px;
}
#mc-landing .mc3-input:focus-visible { outline: none; } /* the input draws its own ring */
.mc3-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- layout primitives ------------------------------------------------ */
.mc3-wrap { width: min(1080px, 100% - 44px); margin: 0 auto; }
.mc3-wrap-narrow { width: min(760px, 100% - 44px); }
.mc3-sec { padding: clamp(72px, 9vw, 104px) 0 clamp(56px, 7vw, 80px); position: relative; }
.mc3-sec-stage { background: var(--mc3-g1); }
.mc3-center { text-align: center; margin-left: auto !important; margin-right: auto !important; }
.mc3-acc { color: var(--mc3-acc); }

/* ---- type ------------------------------------------------------------- */
.mc3-display {
  font-size: clamp(3rem, 7.6vw, 6rem);
  line-height: 1.02;
  font-weight: 650;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.mc3-display .mc3-l2,
.mc3-h2 .mc3-dim { color: var(--mc3-t3); }
.mc3-h2 {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 14ch;
}
.mc3-h2.mc3-center { max-width: 16ch; }
.mc3-lead {
  margin-top: 28px !important;
  max-width: 34em;
  font-size: clamp(1.1875rem, 1.75vw, 1.5rem);
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--mc3-t3);
  text-wrap: pretty;
}
.mc3-lead b { color: var(--mc3-t1); font-weight: 600; }
.mc3-note { font-size: 0.875rem; color: var(--mc3-t3); letter-spacing: 0; }

/* ---- buttons ---------------------------------------------------------- */
.mc3-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--mc3-acc) !important;
  color: var(--mc3-acc-ink) !important;
  font-size: 1.0625rem !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s var(--mc3-ease);
}
.mc3-pill:hover { background: var(--mc3-acc-hi) !important; }
.mc3-pill:active { transform: scale(0.97); }
.mc3-pill-sm { min-height: 32px; padding: 0 15px; font-size: 0.8125rem !important; }
.mc3-pill-lg { min-height: 56px; padding: 0 34px; font-size: 1.1875rem !important; }
.mc3-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--mc3-acc) !important;
  font-size: 1.0625rem;
  font-weight: 500;
  min-height: 44px;
}
.mc3-link svg { transition: transform 0.25s var(--mc3-ease); }
.mc3-link:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { .mc3-link:hover svg { transform: translateX(3px); } }

/* ---- local nav -------------------------------------------------------- */
.mc3-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 52px;
  background: rgba(var(--mc3-black-rgb), 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.mc3-nav[data-scrolled="1"] { background: rgba(var(--mc3-black-rgb), 0.82); border-bottom-color: var(--mc3-line); }
.mc3-nav-in {
  height: 100%;
  width: min(1080px, 100% - 44px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.mc3-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3125rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.025em !important;
  min-height: 44px;
  margin-right: auto;
}
.mc3-nav-links { display: flex; gap: 26px; }
.mc3-nav-links button {
  font-size: 0.8125rem;
  color: var(--mc3-t2);
  min-height: 44px;
  transition: color 0.2s ease;
}
.mc3-nav-links button:hover { color: var(--mc3-t1); }

/* ---- hero ------------------------------------------------------------- */
.mc3-hero {
  position: relative;
  padding: calc(52px + clamp(64px, 10vh, 120px)) 0 clamp(96px, 12vw, 150px);
  text-align: center;
  isolation: isolate;
}
/* stage light: one soft key light from above, the way hardware is shot */
.mc3-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 34%;
  width: min(1400px, 160vw);
  height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(var(--mc3-acc-rgb), calc(0.1 * var(--mc3-key))), rgba(var(--mc3-acc-rgb), calc(0.03 * var(--mc3-key))) 45%, transparent 72%);
  pointer-events: none;
}
.mc3-hero-copy { width: min(1080px, 100% - 44px); margin: 0 auto; }
.mc3-hero-sub {
  margin: 26px auto 0 !important;
  max-width: 30em;
  font-size: clamp(1.1875rem, 1.9vw, 1.5rem);
  line-height: 1.38;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--mc3-t2);
  text-wrap: balance;
}
.mc3-cta-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* the problem slab — staged like hardware */
.mc3-stage {
  width: min(780px, 100% - 32px);
  margin: clamp(56px, 8vw, 88px) auto 0;
}
.mc3-device {
  position: relative;
  text-align: left;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 32px;
  background:
    linear-gradient(180deg, var(--mc3-hl), transparent 38%),
    var(--mc3-g2);
  border: 1px solid var(--mc3-line-2);
  box-shadow:
    inset 0 1px 0 var(--mc3-hl),
    0 40px 80px -20px var(--mc3-drop),
    0 24px 140px -40px rgba(var(--mc3-acc-rgb), 0.16);
}
.mc3-device-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.mc3-device-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8125rem;
  color: var(--mc3-t3);
}
.mc3-device-label b { color: var(--mc3-t1); font-size: 0.9375rem; font-weight: 600; }
.mc3-meter {
  display: flex;
  align-items: center;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}
.mc3-meter-mult {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--mc3-acc-soft);
  color: var(--mc3-acc-hi);
  font-size: 0.9375rem;
  transition: background-color 0.4s ease, color 0.4s ease;
}
.mc3-meter-mult b { font-weight: 650; min-width: 2.6ch; }
.mc3-meter-time { font-size: 0.9375rem; color: var(--mc3-t2); }
.mc3-device[data-low="1"] .mc3-meter-mult { background: rgba(var(--mc3-ember-rgb), 0.12); color: var(--mc3-ember-ink); }
.mc3-meter-bar {
  margin-top: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--mc3-line);
  overflow: hidden;
}
.mc3-meter-bar i {
  display: block;
  height: 100%;
  background: var(--mc3-acc);
  transform-origin: left center;
  transition: background-color 0.4s ease;
}
.mc3-device[data-low="1"] .mc3-meter-bar i { background: var(--mc3-ember); }
.mc3-device[data-solved="1"] .mc3-meter-bar i { background: var(--mc3-acc); }
.mc3-question {
  margin-top: clamp(26px, 4vw, 40px) !important;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.22;
  font-weight: 550;
  letter-spacing: -0.025em;
  color: var(--mc3-t1);
  text-wrap: pretty;
}
.mc3-answer {
  margin-top: clamp(24px, 3.4vw, 34px);
  display: flex;
  gap: 12px;
}
.mc3-input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid var(--mc3-line-2);
  background: var(--mc3-black);
  color: var(--mc3-t1);
  font: 600 1.375rem/1 var(--mc3-font);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  caret-color: var(--mc3-acc);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mc3-input::placeholder { color: var(--mc3-t3); font-weight: 500; font-size: 1.0625rem; }
.mc3-input:focus { border-color: var(--mc3-acc); box-shadow: 0 0 0 4px rgba(var(--mc3-acc-rgb), 0.18); }
.mc3-input[aria-invalid="true"] { border-color: var(--mc3-red); box-shadow: 0 0 0 4px rgba(var(--mc3-red-rgb), 0.16); }
.mc3-device[data-solved="1"] .mc3-input { border-color: var(--mc3-acc); color: var(--mc3-acc); }
#mc-landing .mc3-check { min-height: 56px; min-width: 112px; border-radius: 16px; }
#mc-landing .mc3-check:disabled { cursor: default; opacity: 1; }
.mc3-status {
  margin-top: 16px !important;
  min-height: 1.5em;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--mc3-t3);
}
.mc3-status[data-tone="warn"] { color: var(--mc3-red-text); }
.mc3-status[data-tone="ok"] { color: var(--mc3-t2); }
.mc3-status[data-tone="ok"] b { color: var(--mc3-acc); }
.mc3-status .mc3-link { font-size: 0.9375rem; min-height: 32px; }
.mc3-dots {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 5px;
}
.mc3-dots i {
  height: 4px;
  border-radius: 4px;
  background: var(--mc3-line);
}
.mc3-dots i[data-done="1"] { background: var(--mc3-t3); }
.mc3-dots i[data-now="1"] { background: var(--mc3-acc); }
.mc3-device[data-solved="1"] .mc3-dots i[data-now="1"] { background: var(--mc3-t1); }
.mc3-shake { animation: mc3-shake 0.42s var(--mc3-ease); }
@keyframes mc3-shake {
  20% { transform: translateX(-7px); }
  45% { transform: translateX(5px); }
  70% { transform: translateX(-3px); }
  100% { transform: none; }
}

/* ---- stage background: perspective grid + floating formulas ---------- */
.mc3-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
/* a floor receding toward the horizon: its far rows (top) fade out */
.mc3-grid {
  position: absolute;
  left: -40%;
  right: -40%;
  top: 34%;
  bottom: -6%;
  --cell: 72px;
  overflow: hidden;
  transform: perspective(700px) rotateX(62deg);
  transform-origin: 50% 0%;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.25) 22%, #000 70%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(to right, transparent 8%, #000 34%, #000 66%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.25) 22%, #000 70%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(to right, transparent 8%, #000 34%, #000 66%, transparent 92%);
  mask-composite: intersect;
}
.mc3-grid::before {
  content: "";
  position: absolute;
  inset: calc(var(--cell) * -1) 0 0 0;
  background-image:
    linear-gradient(rgba(var(--mc3-t1-rgb), 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--mc3-t1-rgb), 0.11) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: 50% 0;
}
.mc3-final .mc3-grid { top: 46%; }
.mc3-formulas {
  position: absolute;
  inset: 0;
  will-change: transform;
  /* side bands only: formulas fade out before they reach the headline */
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 13%, transparent 33%, transparent 67%, #000 87%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 13%, transparent 33%, transparent 67%, #000 87%, #000 100%);
}
.mc3-formulas span {
  position: absolute;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 450;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
  color: rgba(var(--mc3-t1-rgb), 0.13);
}
.mc3-formulas span[data-near="1"] { font-size: 1.375rem; color: rgba(var(--mc3-t1-rgb), 0.22); }
.mc3-formulas sup, .mc3-formulas sub { font-size: 0.68em; line-height: 0; }
#mc-landing[data-motion="1"] .mc3-formulas span { animation: mc3-float var(--t, 18s) ease-in-out var(--dl, 0s) infinite alternate; }
#mc-landing[data-motion="1"] .mc3-grid::before { animation: mc3-grid-drift 9s linear infinite; }
@keyframes mc3-float {
  from { transform: translate3d(0, 10px, 0); }
  to { transform: translate3d(0, -14px, 0); }
}
/* the floor glides toward the viewer, one cell per loop */
@keyframes mc3-grid-drift { to { transform: translate3d(0, var(--cell), 0); } }

/* ---- daily ------------------------------------------------------------ */
.mc3-panel {
  border-radius: 28px;
  background: var(--mc3-g1);
  border: 1px solid var(--mc3-line);
}
.mc3-curve {
  position: relative;
  margin-top: clamp(56px, 7vw, 88px) !important;
  padding: clamp(28px, 4.5vw, 56px);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  grid-template-rows: 1fr auto;
  column-gap: clamp(24px, 4vw, 56px);
  overflow: hidden;
}
.mc3-curve-copy { grid-row: 1 / 3; align-self: end; }
.mc3-curve-big {
  font-size: clamp(4.5rem, 10vw, 8.5rem);
  line-height: 0.92;
  font-weight: 650;
  letter-spacing: -0.05em;
  color: var(--mc3-acc);
  font-variant-numeric: tabular-nums;
}
.mc3-curve-text {
  margin-top: 22px !important;
  max-width: 22em;
  font-size: 1.0625rem;
  color: var(--mc3-t3);
}
.mc3-curve-text b { color: var(--mc3-t1); }
.mc3-curve-svg { width: 100%; height: clamp(180px, 22vw, 260px); overflow: visible; align-self: end; }
.mc3-curve-grid { stroke: var(--mc3-line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.mc3-curve-line {
  fill: none;
  stroke: var(--mc3-acc);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.mc3-curve-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--mc3-t3);
}

/* ---- duels ------------------------------------------------------------ */
.mc3-duel {
  position: relative;
  margin-top: clamp(56px, 7vw, 88px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}
.mc3-player {
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: 28px;
  background: var(--mc3-g2);
  border: 1px solid var(--mc3-line);
  display: flex;
  flex-direction: column;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}
.mc3-duel[data-winner="a"] .mc3-player[data-side="a"] {
  border-color: rgba(var(--mc3-acc-rgb), 0.5);
  box-shadow: 0 30px 80px -30px rgba(var(--mc3-acc-rgb), 0.4);
}
.mc3-player-id { display: flex; align-items: center; gap: 12px; }
.mc3-player-id i,
.mc3-row-user i,
.mc3-roster i {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9375rem;
  background: var(--mc3-g3);
  border: 1px solid var(--mc3-line-2);
  color: var(--mc3-t1);
}
.mc3-player[data-side="a"] .mc3-player-id i { background: var(--mc3-acc); color: var(--mc3-acc-ink); border-color: transparent; }
.mc3-player[data-side="b"] .mc3-player-id i { background: var(--mc3-ember); color: var(--mc3-acc-ink); border-color: transparent; }
.mc3-player-id span { display: flex; flex-direction: column; line-height: 1.25; }
.mc3-player-id b { font-size: 1.0625rem; }
.mc3-player-id small { font-size: 0.875rem; color: var(--mc3-t3); }
.mc3-typed {
  margin: clamp(28px, 5vw, 48px) 0 !important;
  min-height: 1em;
  font-size: clamp(4.5rem, 10vw, 7.5rem);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.mc3-typed span:empty::before { content: "\00a0"; }
.mc3-typed[data-caret="1"]::after {
  content: "";
  display: inline-block;
  width: 0.06em;
  height: 0.8em;
  margin-left: 0.04em;
  vertical-align: -0.04em;
  background: var(--mc3-acc);
  animation: mc3-caret 1s steps(1) infinite;
}
@keyframes mc3-caret { 50% { opacity: 0; } }
.mc3-player-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mc3-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--mc3-acc);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.5s var(--mc3-ease);
}
.mc3-locked[data-on="1"] { opacity: 1; transform: none; }
.mc3-player[data-side="b"] .mc3-locked { color: var(--mc3-t2); }
.mc3-score { font-size: 0.9375rem; color: var(--mc3-t3); font-variant-numeric: tabular-nums; }
.mc3-score b { font-size: 1.375rem; color: var(--mc3-t1); letter-spacing: -0.02em; }
.mc3-vs {
  align-self: center;
  width: 56px;
  margin: 0 -14px;
  z-index: 1;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mc3-black);
  border: 1px solid rgba(var(--mc3-ember-rgb), 0.4);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--mc3-ember);
}
#mc3-duels .mc3-note { margin-top: 18px; }
.mc3-rules {
  margin: clamp(56px, 7vw, 80px) auto 0 !important;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--mc3-line);
}
.mc3-rules li { padding: 22px 24px 0 0; font-size: 1rem; line-height: 1.45; color: var(--mc3-t3); }
.mc3-rules li + li { padding-left: 24px; border-left: 1px solid var(--mc3-line); }
.mc3-rules b { display: block; color: var(--mc3-t1); font-size: 1.0625rem; }
.mc3-facts {
  margin-top: clamp(64px, 8vw, 104px) !important;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.mc3-facts li { display: flex; flex-direction: column; font-size: 1.0625rem; line-height: 1.45; }
.mc3-facts svg { color: var(--mc3-t2); margin-bottom: 18px; }
.mc3-facts b { color: var(--mc3-t1); }
.mc3-facts span { color: var(--mc3-t3); }

/* ---- parties ---------------------------------------------------------- */
.mc3-room {
  margin-top: clamp(56px, 7vw, 88px);
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) 1.15fr;
  overflow: hidden;
}
.mc3-room-side {
  padding: clamp(28px, 4vw, 48px);
  border-right: 1px solid var(--mc3-line);
  display: flex;
  flex-direction: column;
}
.mc3-room-label { font-size: 0.875rem; color: var(--mc3-t3); }
.mc3-room-code {
  margin-top: 6px !important;
  font-size: clamp(3rem, 6.4vw, 4.75rem);
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mc3-room-title {
  margin-top: 22px !important;
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;
  font-weight: 600;
}
.mc3-room-title span { font-weight: 400; color: var(--mc3-t3); font-size: 0.9375rem; }
.mc3-roster { margin-top: auto !important; padding-top: 32px !important; display: flex; flex-wrap: wrap; gap: 8px; }
.mc3-roster li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--mc3-g2);
  border: 1px solid var(--mc3-line);
  font-size: 0.875rem;
}
.mc3-roster i { width: 28px; height: 28px; font-size: 0.8125rem; }
.mc3-roster em { font-style: normal; color: var(--mc3-t2); font-size: 0.75rem; font-weight: 600; }
.mc3-roster .mc3-roster-more { padding: 4px 12px; color: var(--mc3-t3); }
.mc3-room-main { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; }
.mc3-room-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--mc3-t3);
}
.mc3-next b { color: var(--mc3-t1); font-variant-numeric: tabular-nums; font-weight: 600; }
.mc3-race {
  --row: 56px;
  position: relative;
  height: calc(var(--row) * 4);
  margin: 22px 0 26px !important;
}
.mc3-race li {
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--row);
  display: grid;
  grid-template-columns: 64px 1fr 56px;
  align-items: center;
  gap: 14px;
  transform: translateY(calc(var(--rank, var(--i)) * var(--row)));
  transition: transform 0.7s var(--mc3-ease);
}
.mc3-race-name { font-size: 0.9375rem; font-weight: 600; }
.mc3-race-track { height: 10px; border-radius: 10px; background: var(--mc3-line); overflow: hidden; }
.mc3-race-track i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--mc3-t3);
  transition: width 0.9s var(--mc3-ease);
}
.mc3-race li[data-lead] .mc3-race-track i { background: var(--mc3-ember); }
.mc3-race b { text-align: right; font-size: 1rem; font-variant-numeric: tabular-nums; }
.mc3-room-main .mc3-note { margin-top: auto; }

/* ---- leaderboard ------------------------------------------------------ */
.mc3-board { margin-top: clamp(48px, 6vw, 72px); }
.mc3-seg {
  --seg: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 3px;
  border-radius: 12px;
  background: var(--mc3-g3);
}
.mc3-seg button {
  position: relative;
  z-index: 1;
  min-height: 38px;
  border-radius: 9px;
  font-size: 0.9375rem !important;
  font-weight: 500;
  color: var(--mc3-t2) !important;
  transition: color 0.2s ease;
}
.mc3-seg button[aria-selected="true"] { color: var(--mc3-t1) !important; font-weight: 600; }
.mc3-seg-thumb {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 9px;
  background: var(--mc3-thumb);
  box-shadow: 0 0 0 1px var(--mc3-line-2), 0 1px 2px rgba(16, 15, 15, 0.12);
  transform: translateX(calc(var(--seg) * 100%));
  transition: transform 0.35s var(--mc3-ease);
}
.mc3-rows { margin: 28px 0 22px !important; border-top: 1px solid var(--mc3-line); }
.mc3-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 52px;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  border-bottom: 1px solid var(--mc3-line);
  font-variant-numeric: tabular-nums;
}
.mc3-row-rank { font-size: 1rem; color: var(--mc3-t3); }
.mc3-row[data-top="1"] .mc3-row-rank { color: var(--mc3-ember); font-weight: 600; }
.mc3-row-user { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mc3-row-name { font-size: 1.0625rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc3-row-user em {
  flex: none;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mc3-ember-ink);
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mc3-ember-soft);
}
.mc3-row[data-top="1"] .mc3-row-user i { background: var(--mc3-ember); color: var(--mc3-acc-ink); border-color: transparent; }
.mc3-row-score { text-align: right; white-space: nowrap; }
.mc3-row-score b { font-size: 1.25rem; letter-spacing: -0.02em; }
.mc3-row-score small { font-size: 0.8125rem; color: var(--mc3-t3); }
.mc3-trend { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 0.875rem; color: var(--mc3-t3); }
.mc3-trend[data-dir="up"] { color: var(--mc3-acc); }
.mc3-trend[data-dir="down"] { color: var(--mc3-red-text); }

/* ---- final + footer --------------------------------------------------- */
.mc3-final {
  position: relative;
  padding: clamp(88px, 10vw, 128px) 22px clamp(80px, 9vw, 112px);
  text-align: center;
  isolation: isolate;
}
.mc3-final::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -10%;
  width: min(1200px, 150vw);
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 60%, rgba(var(--mc3-acc-rgb), calc(0.11 * var(--mc3-key))), transparent 70%);
  pointer-events: none;
}
.mc3-final .mc3-note { margin-top: 22px; }
.mc3-footer {
  padding: 22px 0 40px;
  background: var(--mc3-g1);
  border-top: 1px solid var(--mc3-line);
  font-size: 0.8125rem;
  color: var(--mc3-t3);
}
.mc3-footer p { padding-bottom: 14px !important; border-bottom: 1px solid var(--mc3-line); text-wrap: pretty; }
.mc3-footer-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.mc3-footer-links { display: flex; flex-wrap: wrap; gap: 6px 0; }
.mc3-footer-links a,
.mc3-footer-links button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--mc3-t2);
  text-decoration: none;
  padding: 0 12px;
}
.mc3-footer-links > * + *::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  height: 1.1em;
  margin-top: -0.55em;
  border-left: 1px solid var(--mc3-line-2);
}
.mc3-footer-links > a:first-child { padding-left: 0; }
.mc3-footer-links a:hover,
.mc3-footer-links button:hover { color: var(--mc3-t1); text-decoration: underline; text-underline-offset: 3px; }

/* ---- motion: content is visible by default; JS opts in ---------------- */
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-stage.mc3-rv {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--mc3-ease) var(--d, 0s),
    transform 1.1s var(--mc3-ease) var(--d, 0s),
    filter 0.9s var(--mc3-ease) var(--d, 0s);
}
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-stage.mc3-rv[data-shown="1"] { opacity: 1; transform: none; filter: none; }
/* the hero slab rises in from a slight tilt: the page's one staged entrance */
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-stage.mc3-rv { transform: perspective(1600px) translateY(64px) rotateX(14deg) scale(0.96); transform-origin: 50% 100%; }
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-stage.mc3-rv[data-shown="1"] { transform: none; transition-duration: 1s, 1.4s, 1s; }
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-curve-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--mc3-ease) 0.3s; }
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-curve[data-shown="1"] .mc3-curve-line { stroke-dashoffset: 0; }
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-curve-area { opacity: 0; transition: opacity 1.2s ease 1s; }
#mc-landing[data-motion="1"]:not([data-scenes]) .mc3-curve[data-shown="1"] .mc3-curve-area { opacity: 1; }
#mc-landing[data-motion="1"] .mc3-rows .mc3-row { opacity: 0; transform: translateY(10px); }
#mc-landing[data-motion="1"] .mc3-rows[data-shown="1"] .mc3-row {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease calc(var(--i) * 0.06s), transform 0.7s var(--mc3-ease) calc(var(--i) * 0.06s);
}

/* ---- curve marker + track (exist in every mode; shown on the timeline) ---- */
.mc3-curve-plot { position: relative; align-self: end; }
.mc3-curve-ghost { fill: none; stroke: rgba(var(--mc3-acc-rgb), 0.22); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mc3-curve-dot, .mc3-curve-tag { display: none; }
.mc3-track { width: min(1080px, 100% - 44px); margin: 0 auto; }
.mc3-row[data-you] { background: rgba(var(--mc3-acc-rgb), 0.05); }
.mc3-row[data-you] .mc3-row-name { color: var(--mc3-acc); }
.mc3-row[data-you] .mc3-row-user i { background: rgba(var(--mc3-acc-rgb), 0.16); color: var(--mc3-acc); border-color: transparent; }
.mc3-row:not([data-top]) .mc3-row-user em { display: none; }

/* ==========================================================================
   TIMELINE — scroll moves the objects, not the page (2026-11-10)
   landing-v3.js sets data-scenes="1". .mc3-reel only supplies scroll length;
   .mc3-pin is the one screen that stays put; every [data-beat] is stacked in
   it and takes its turn (data-on: absent = off stage, 0 = in flight,
   1 = arrived and usable). Off-stage beats stay in the accessibility tree and
   the tab order; focusing one brings it on. Without data-scenes all of this
   is a normal page.
   ========================================================================== */
#mc-landing[data-scenes="1"] .mc3-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  overflow: clip;
}
#mc-landing[data-scenes="1"] :is(.mc3-hero, .mc3-sec, .mc3-final) {
  position: absolute;
  inset: 0;
  padding: 0;
  background: none;
  pointer-events: none;
}
#mc-landing[data-scenes="1"] [data-beat] { opacity: 0; pointer-events: none; }
#mc-landing[data-scenes="1"] [data-beat][data-on] { opacity: 1; }
#mc-landing[data-scenes="1"] [data-beat][data-on="1"] { pointer-events: auto; }
#mc-landing[data-scenes="1"] [data-beat][data-on] [data-fly],
#mc-landing[data-scenes="1"] [data-beat][data-on][data-fly] { will-change: transform, opacity; }
#mc-landing[data-scenes="1"] .mc3-beat {
  position: absolute;
  inset: 52px 0 0;
  display: flex;
  flex-direction: column;
}
/* centred while it fits; top-aligned, and panned by scroll, when it is taller
   than the screen. The perspective is for the objects that turn as they fly. */
#mc-landing[data-scenes="1"] .mc3-beat > * {
  flex: none;
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 28px;
  padding-bottom: 28px;
  perspective: 1600px;
}
#mc-landing[data-scenes="1"] .mc3-beat > * > :first-child { margin-top: 0 !important; }
/* one screen per beat: the gaps between a beat's parts are tighter than in the flowing page */
#mc-landing[data-scenes="1"] .mc3-duel { margin-top: clamp(40px, 6vh, 72px); perspective: 1500px; }
#mc-landing[data-scenes="1"] :is(.mc3-rules, .mc3-facts) { margin-top: clamp(28px, 4.5vh, 56px) !important; }
#mc-landing[data-scenes="1"] .mc3-faq { margin-top: clamp(16px, 3vh, 40px); }

/* A section's key light, fallback grid and formulas come and go with it: --on is
   how much of the floor is that section's (0 to 1). The formulas are sky, so they
   also rise out of frame as the camera moves on. */
#mc-landing[data-scenes="1"] :is(.mc3-hero, .mc3-final)::before,
#mc-landing[data-scenes="1"] .mc3-grid { opacity: var(--on, 0); }
#mc-landing[data-scenes="1"] .mc3-formulas {
  opacity: var(--on, 0);
  transform: translate3d(0, calc((var(--on, 0) - 1) * 28vh), 0);
}

/* hero: the copy stands in the top 70% of the screen, the slab peeks in below it
   and comes to rest centred under the nav */
#mc-landing[data-scenes="1"] .mc3-hero-copy {
  position: absolute;
  left: 0; right: 0; top: 52px;
  height: calc(var(--peek, 70vh) - 52px);
  width: auto;
  padding: 0 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-origin: 50% 40%;
}
#mc-landing[data-scenes="1"] .mc3-hero .mc3-stage {
  position: absolute;
  inset: 52px 0 0;
  margin: auto;
  height: fit-content;
}

/* final call: centred above the footer, which comes on stage with it */
#mc-landing[data-scenes="1"] .mc3-final .mc3-beat { bottom: var(--foot, 0px); }
#mc-landing[data-scenes="1"] .mc3-final .mc3-beat > * { padding-left: 22px; padding-right: 22px; }
#mc-landing[data-scenes="1"] .mc3-footer { position: absolute; inset: auto 0 0; }

/* daily: the clock is scrubbed by scroll */
#mc-landing[data-scenes="1"] :is(.mc3-curve-dot, .mc3-curve-tag) { display: block; }
.mc3-curve-dot {
  position: absolute;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--mc3-acc);
  border: 3px solid var(--mc3-black);
  box-shadow: 0 0 0 1px rgba(var(--mc3-acc-rgb), 0.5), 0 6px 18px -4px var(--mc3-drop);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.mc3-curve-tag {
  position: absolute;
  transform: translate(-50%, calc(-100% - 16px));
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--mc3-g3);
  border: 1px solid var(--mc3-line);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--mc3-t1);
  white-space: nowrap;
}
.mc3-curve-big { transition: color 0.3s ease; }
.mc3-curve[data-low="1"] .mc3-curve-big { color: var(--mc3-ember); }
.mc3-curve[data-low="1"] .mc3-curve-dot { background: var(--mc3-ember); box-shadow: 0 0 0 1px rgba(var(--mc3-ember-rgb), 0.5), 0 6px 18px -4px var(--mc3-drop); }

/* board: it flies in whole (the rows do not wait for the reveal); rows move with scroll, no transform lag */
#mc-landing[data-scenes="1"] .mc3-rows .mc3-row { opacity: 1; }
#mc-landing[data-scenes="1"] .mc3-rows[data-shown="1"] .mc3-row { transition: opacity 0.5s ease calc(var(--i) * 0.06s), background-color 0.3s ease; }
#mc-landing[data-scenes="1"] .mc3-rows { position: relative; perspective: 900px; }
#mc-landing[data-scenes="1"] .mc3-row[data-you] { position: relative; z-index: 1; background: var(--mc3-g1); background: color-mix(in srgb, var(--mc3-acc) 6%, var(--mc3-g1)); box-shadow: 0 -1px 0 var(--mc3-line), 0 18px 40px -18px var(--mc3-drop); }

@media (prefers-reduced-motion: reduce) {
  #mc-landing *, #mc-landing *::before, #mc-landing *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .mc3-nav-links { display: none; }
  .mc3-curve { grid-template-columns: 1fr; }
  .mc3-curve-copy { grid-row: auto; margin-bottom: 32px; }
  .mc3-room { grid-template-columns: 1fr; }
  .mc3-room-side { border-right: 0; border-bottom: 1px solid var(--mc3-line); }
  .mc3-facts { grid-template-columns: 1fr; gap: 36px; }
  .mc3-rules { grid-template-columns: 1fr; }
  .mc3-rules li, .mc3-rules li + li { padding: 18px 0; border-left: 0; }
  .mc3-rules li + li { border-top: 1px solid var(--mc3-line); }
  .mc3-facts li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
  .mc3-facts svg { grid-row: 1 / 3; margin: 0; }
}
@media (max-width: 680px) {
  #mc-landing { font-size: 16px; }
  /* "Train your edge." stays on one line down to 320px (7.2em wide in Geist 650) */
  .mc3-display { font-size: clamp(2.25rem, calc((100vw - 48px) / 7.4), 3rem); }
  /* no side bands on phones: the formulas would sit behind the headline, so the
     grid floor carries the stage alone */
  .mc3-formulas { display: none; }
  .mc3-grid { --cell: 52px; }
  .mc3-wrap, .mc3-wrap-narrow, .mc3-hero-copy, .mc3-nav-in { width: calc(100% - 32px); }
  .mc3-stage { width: calc(100% - 24px); }
  .mc3-device { border-radius: 24px; }
  .mc3-device-top { flex-direction: column; gap: 14px; }
  .mc3-answer { flex-direction: column; }
  .mc3-input { flex: none; width: 100%; }
  #mc-landing .mc3-check { width: 100%; }
  .mc3-cta-row { gap: 12px 24px; }
  .mc3-duel { grid-template-columns: 1fr; }
  .mc3-vs { margin: -14px auto; }
  .mc3-player { border-radius: 24px; }
  .mc3-typed { margin: 24px 0 !important; }
  .mc3-race li { grid-template-columns: 52px 1fr 44px; gap: 10px; }
  .mc3-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; min-height: 68px; }
  .mc3-row .mc3-trend { display: none; }
  .mc3-row-user { gap: 10px; }
  .mc3-row-user i { width: 32px; height: 32px; font-size: 0.8125rem; }
  .mc3-row-user em { display: none; }
  .mc3-row-score small { font-size: 0.75rem; }
  .mc3-footer-row { flex-direction: column; }
}
@media (max-width: 380px) {
  .mc3-room-code { font-size: 2.6rem; }
}

/* ==========================================================================
   CHARGE — the motion system (2026-11-08)
   One idea carried through the page: speed is charge. The sample problem
   waits charged at ×2.4, drains once you click in, and a correct answer discharges
   into points. Supporting beats: the nav's charge meter (scroll position),
   the duel's lock-in, the climb to #001. Everything below is opt-in via
   data-motion and collapses to static states under reduced motion.
   ========================================================================== */

/* ---- browser surfaces ------------------------------------------------- */
html.mc3-landing { scrollbar-color: var(--mc3-line-3) var(--mc3-black); }
html.mc3-landing ::-webkit-scrollbar { width: 12px; }
html.mc3-landing ::-webkit-scrollbar-track { background: var(--mc3-black); }
html.mc3-landing ::-webkit-scrollbar-thumb { background: var(--mc3-line-3); border: 3px solid var(--mc3-black); border-radius: 12px; }
html.mc3-landing ::-webkit-scrollbar-thumb:hover { background: var(--mc3-t3); }

/* ---- the mark: ink π, orange bolt (the app's: #da702c in both themes) --- */
.mc3-mark-pi { stroke: var(--mc3-t1); }
.mc3-mark-bolt { fill: #da702c; transform-box: fill-box; transform-origin: 50% 50%; }

/* ---- nav: sign in + charge meter ---------------------------------------- */
.mc3-nav-end { display: flex; align-items: center; gap: 18px; }
.mc3-nav-signin {
  font-size: 0.8125rem;
  color: var(--mc3-t1);
  min-height: 44px;
  transition: color 0.2s ease;
}
.mc3-nav-signin:hover { color: var(--mc3-acc); }
/* bright / dark: on ink the sun offers bright mode, on paper the moon offers ink */
.mc3-theme {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0 -6px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--mc3-t2);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mc3-theme:hover { color: var(--mc3-t1); border-color: var(--mc3-line-2); }
.mc3-theme svg { width: 18px; height: 18px; }
.mc3-theme .mc3-i-moon,
:root[data-mc-theme="light"] .mc3-theme .mc3-i-sun { display: none; }
:root[data-mc-theme="light"] .mc3-theme .mc3-i-moon { display: block; }
.mc3-nav-charge {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--mc3-acc-rgb), 0.35), var(--mc3-acc));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
.mc3-nav[data-spark="1"] .mc3-nav-charge { animation: mc3-spark-run 1.2s var(--mc3-ease); }
.mc3-nav[data-spark="1"] .mc3-mark-bolt { animation: mc3-bolt-strike 0.9s var(--mc3-ease); }
@keyframes mc3-spark-run {
  0% { transform: scaleX(0); opacity: 1; }
  60% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes mc3-bolt-strike {
  0% { transform: none; filter: none; }
  30% { transform: scale(1.35) rotate(-8deg); filter: drop-shadow(0 0 6px rgba(var(--mc3-acc-rgb), 0.9)); }
  100% { transform: none; filter: none; }
}

/* ---- primary pill: lit, with a sheen on hover ---------------------------- */
.mc3-pill { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 10px 34px -14px rgba(var(--mc3-acc-rgb), 0.55); }
.mc3-pill::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  #mc-landing[data-motion="1"] .mc3-pill:hover::after { transform: translateX(120%); transition: transform 0.75s var(--mc3-ease); }
}
.mc3-pill-sm { box-shadow: none; }
.mc3-check:disabled { box-shadow: none; }

/* For teachers: one disclosure under the party facts */
.mc3-faq { margin-top: 40px; border-top: 1px solid var(--mc3-line); border-bottom: 1px solid var(--mc3-line); }
.mc3-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  font-weight: 600;
  color: var(--mc3-t1);
  cursor: pointer;
  list-style: none;
}
.mc3-faq summary::-webkit-details-marker { display: none; }
.mc3-faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--mc3-acc); }
.mc3-faq[open] summary::after { content: "−"; }
.mc3-faq summary:hover { color: var(--mc3-acc); }
#mc-landing .mc3-faq summary:focus-visible { outline-offset: 4px; border-radius: 4px; }
.mc3-faq p { padding: 0 0 22px !important; max-width: 46em; color: var(--mc3-t2); }

/* landing-v3.js holds the app back while its stylesheets finish downloading */
html.mc-css-wait #root { visibility: hidden; }

/* ---- hero first paint ---------------------------------------------------
   The nav and hero copy are already on screen as static HTML (#mc-boot in
   index.html) before any script runs, so they do not animate in; the slab
   below them is the one staged entrance. #mc-boot copies the hero layout of
   the scroll scene (copy centred in the top 70% of the screen) whenever
   landing-v3.js would turn scenes on, so nothing moves when it mounts. */
#mc-boot a { color: inherit; text-decoration: none; }
#mc-boot :is(.mc3-nav-links span, .mc3-nav-signin) { display: inline-flex; align-items: center; font-size: 0.8125rem; min-height: 44px; }
#mc-boot .mc3-nav-links span { color: var(--mc3-t2); }
@media (prefers-reduced-motion: no-preference) and (min-height: 600px) and (min-width: 360px) {
  #mc-boot .mc3-hero { padding: 0; }
  #mc-boot .mc3-pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; overflow: clip; }
  #mc-boot .mc3-hero-copy {
    position: absolute;
    left: 0; right: 0; top: 52px;
    height: calc(70vh - 52px);
    width: auto;
    padding: 0 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ---- hero problem: charge, drain, discharge ----------------------------- */
.mc3-device[data-charging="1"] .mc3-meter-bar i { box-shadow: 0 0 12px rgba(var(--mc3-acc-rgb), 0.7); }
.mc3-device[data-low="1"] .mc3-meter-mult { background: var(--mc3-ember-soft); color: var(--mc3-ember-ink); }
.mc3-device[data-low="1"] .mc3-meter-bar i { background: var(--mc3-ember); }
.mc3-meter-mult svg { transition: transform 0.4s var(--mc3-ease); }
.mc3-device[data-solved="1"] .mc3-meter-mult { background: var(--mc3-acc); color: var(--mc3-acc-ink); }
.mc3-device[data-solved="1"] .mc3-meter-bar i { background: var(--mc3-acc); }
#mc-landing[data-motion="1"] .mc3-device[data-solved="1"] { animation: mc3-discharge 1.1s var(--mc3-ease); }
#mc-landing[data-motion="1"] .mc3-device[data-solved="1"] .mc3-meter-mult svg { animation: mc3-bolt-strike 0.8s var(--mc3-ease); }
@keyframes mc3-discharge {
  0% { box-shadow: inset 0 1px 0 var(--mc3-hl), 0 0 0 0 rgba(var(--mc3-acc-rgb), 0.6), 0 40px 80px -20px var(--mc3-drop); }
  35% { box-shadow: inset 0 1px 0 var(--mc3-hl), 0 0 0 6px rgba(var(--mc3-acc-rgb), 0.18), 0 40px 120px -20px rgba(var(--mc3-acc-rgb), 0.35); }
  100% { box-shadow: inset 0 1px 0 var(--mc3-hl), 0 0 0 0 rgba(var(--mc3-acc-rgb), 0), 0 40px 80px -20px var(--mc3-drop); }
}
.mc3-device[data-solved="1"] { border-color: rgba(var(--mc3-acc-rgb), 0.55); }
.mc3-answer { position: relative; }
.mc3-spark {
  position: absolute;
  z-index: 3;
  width: 3px;
  height: 14px;
  margin: -7px 0 0 -1.5px;
  border-radius: 3px;
  background: var(--mc3-acc);
  box-shadow: 0 0 8px rgba(var(--mc3-acc-rgb), 0.8);
  pointer-events: none;
}
#mc-landing[data-overclock="1"] .mc3-meter-mult { background: var(--mc3-acc); color: var(--mc3-acc-ink); }
#mc-landing[data-overclock="1"] .mc3-meter-bar i {
  background: linear-gradient(90deg, var(--mc3-acc), #fff, var(--mc3-acc));
  background-size: 200% 100%;
  animation: mc3-overclock 0.9s linear infinite;
}
@keyframes mc3-overclock { to { background-position: -200% 0; } }

/* ---- duels: the clash when both lock in --------------------------------- */
.mc3-player { position: relative; }
.mc3-vs { position: relative; }
.mc3-vs::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(var(--mc3-ember-rgb), 0.7);
  opacity: 0;
  pointer-events: none;
}
#mc-landing[data-motion="1"] .mc3-duel[data-clash="1"] .mc3-vs::after { animation: mc3-ring 0.9s var(--mc3-ease); }
@keyframes mc3-ring { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }

/* ---- leaderboard: taking the crown -------------------------------------- */
.mc3-row[data-you][data-top="1"] .mc3-row-rank { color: var(--mc3-acc); }
.mc3-row[data-you][data-top="1"] .mc3-row-user i { background: var(--mc3-acc); color: var(--mc3-acc-ink); }
.mc3-row[data-you] { transition: box-shadow 0.5s var(--mc3-ease), background-color 0.3s ease; }
#mc-landing[data-scenes="1"] .mc3-row[data-you][data-top="1"] {
  box-shadow: 0 0 0 1px rgba(var(--mc3-acc-rgb), 0.45), 0 22px 60px -22px rgba(var(--mc3-acc-rgb), 0.55);
}

/* ---- panel light: a key light that follows the pointer ------------------ */
.mc3-panel, .mc3-device, .mc3-player { isolation: isolate; }
.mc3-room, .mc3-facts li { position: relative; }
.mc3-light-wrap {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.mc3-light {
  position: absolute;
  left: -260px; top: -260px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--mc3-acc-rgb), 0.075), rgba(var(--mc3-acc-rgb), 0.025) 55%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mc3-light[data-on="1"] { opacity: 1; }
#mc-landing:not([data-scenes="1"]) .mc3-facts .mc3-light-wrap { display: none; }

/* ---- easter eggs -------------------------------------------------------- */
.mc3-formulas span[data-pi] { color: rgba(var(--mc3-acc-rgb), 0.32); }
.mc3-formulas span[data-pi][data-near="1"] { color: rgba(var(--mc3-acc-rgb), 0.5); }
.mc3-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: min(520px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  border-radius: 16px;
  background: rgba(var(--mc3-black-rgb), 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid var(--mc3-line-2);
  box-shadow: 0 24px 60px -20px var(--mc3-drop);
  color: var(--mc3-t2);
  font-size: 0.9375rem;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.mc3-toast[data-on="1"] {
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 0.35s ease, transform 0.45s var(--mc3-ease);
}
.mc3-toast svg { flex: none; color: var(--mc3-acc); }
.mc3-toast b { color: var(--mc3-t1); font-weight: 600; }


/* ---- the payoff: a correct answer you can see from across the room ------- */
.mc3-status[data-tone="ok"] { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; }
.mc3-win-pts {
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.035em;
  color: var(--mc3-acc) !important;
  font-variant-numeric: tabular-nums;
}
.mc3-win-note { color: var(--mc3-t2); }
.mc3-status[data-tone="ok"] .mc3-win-note b { color: var(--mc3-t1); }
.mc3-device[data-solved="1"] .mc3-check { min-width: 0; padding: 0 22px; }

/* ---- duels: the problem both players are racing -------------------------- */
.mc3-duel-q {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 12px;
  margin: clamp(48px, 6vw, 72px) auto -36px !important;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--mc3-t1);
  font-weight: 550;
}
.mc3-duel-q span { font-size: 0.875rem; font-weight: 400; color: var(--mc3-t3); }

/* ---- parties: the teacher's way in ------------------------------------- */
.mc3-cta-left { justify-content: flex-start; margin-top: 32px; gap: 14px 22px; }

/* ---- nav: where am I --------------------------------------------------- */
.mc3-nav-links button[aria-current="true"] { color: var(--mc3-t1); }

/* ==========================================================================
   FIELD — the living floor (2026-11-09)
   landing-field.js draws the grid floor as a real surface on one fixed canvas
   behind the whole page and sets data-field="1" after its first frame. Until
   then, and wherever it cannot run (no WebGL2, reduced motion), the static
   grid and the slate bands above are the page.
   ========================================================================== */
.mc3-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#mc-landing[data-field="1"] .mc3-field { opacity: 1; }
#mc-landing[data-field="1"] .mc3-grid { opacity: 0; transition: opacity 0.8s ease; }
/* one continuous floor: the bands would cut it into strips */
#mc-landing[data-field="1"] .mc3-sec-stage { background: none; }
/* copy that stands on the floor gets a pool of navy under it (no box, no
   layout change): the waves glow around the words, not through them */
#mc-landing[data-field="1"] :is(.mc3-lead, .mc3-duel-q, .mc3-rules, .mc3-facts, .mc3-faq) {
  background: rgba(var(--mc3-black-rgb), 0.72);
  box-shadow: 0 0 40px 28px rgba(var(--mc3-black-rgb), 0.72);
}
/* the board is a staged object like the others: a pane of navy glass, so
   the rows read cleanly while the peak glows through behind them */
.mc3-board {
  padding: clamp(18px, 3vw, 28px) clamp(14px, 3vw, 32px) 2px;
  border-radius: 28px;
  background: rgba(var(--mc3-black-rgb), 0.8);
  border: 1px solid var(--mc3-line);
}
