/* diviZible — teachers page stylesheet.
   Derived from gcd-landing.css (same components), with two differences:
   1. The Google Fonts @import is removed and the same fonts are served from
      /assets/fonts/ instead, so this page makes no third-party request.
   2. Teacher-page components are appended at the end.
   If gcd-landing.css changes, re-derive this file the same way. */

@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
/* diviZible — GCD landing page
   Palette, fonts and components matched to the live game's actual tokens. */

:root {
  --bg: #14231c;
  --surface: #355542;
  --surface-2: #47694f;
  --chalk: #ffffff;
  --chalk-dim: #d3ddd7;
  --divisor: #ffa688;
  --divisor-ink: #241109;
  --correct: #2ee673;
  --present: #ff9f45;
  --absent: #74887a;
  --rule: #b0bab4;
  --mono: 'JetBrains Mono', monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --wordmark-font: 'Space Grotesk', var(--sans);
  --z-chalk: #f2f0e6; /* exact color from the live wordmark/app-icon mark, not the page's --chalk */
  --z-coral: #e8846b; /* exact color from the live wordmark/app-icon mark, not the page's --divisor */
  --max: 42rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--divisor); text-underline-offset: 0.15em; }
a:hover { filter: brightness(1.1); }

:focus-visible {
  outline: 2px solid var(--divisor);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- nav ---------- */
.nav {
  display: flex;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 0.75rem; flex-wrap: nowrap; }

/* Matches the live game's own wordmark treatment exactly: Space
   Grotesk at the game's real 30px/1em-mark sizing, with the "Z"
   replaced by its actual logo mark (two chalk bars + a coral
   diagonal) rather than rendered as a letter. */
.wordmark {
  font-family: var(--wordmark-font);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--chalk);
  text-decoration: none;
}
.z-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin: 0 0.11em;
  vertical-align: baseline;
}
.z-mark svg { width: 100%; height: 100%; display: block; }
.z-mark .zbar,
.z-mark .zdiag {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}
.z-mark .zbar { stroke: var(--z-chalk); }
.z-mark .zdiag { stroke: var(--z-coral); }
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
/* Mirrors the game's .splash-eyebrow: JetBrains Mono 11px, .22em tracking,
   uppercase, coral (--divisor), centred under the wordmark. */
.wordmark-tagline {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--divisor);
  line-height: 1;
  white-space: nowrap;
}
.nav-play {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--divisor-ink);
  background: var(--divisor);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-play:hover { filter: brightness(1.06); }

/* ---------- hero ---------- */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.6vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 1.1rem;
}
.hero .mechanic {
  font-size: 1.1rem;
  color: var(--chalk-dim);
  margin: 0 0 1rem;
}
.hero-meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--divisor);
  margin: 0 0 2.25rem;
}

/* ---------- demo ---------- */
.demo {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.5rem;
  overflow: hidden;
}
/* Left cluster (digit count + toggle button) stacks; the mode name
   sits on the right, deliberately large and wrapped onto two lines
   so switching between "Easier mode" and "Harder mode" reads as an
   actual change, not a small label flicker. */
.demo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}
.demo-top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}
.demo-digits {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--chalk-dim);
  margin: 0;
}
.demo-toggle {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--chalk-dim);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}
.demo-toggle:hover { color: var(--chalk); border-color: var(--chalk-dim); }

.demo-mode {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--divisor);
  text-align: right;
  max-width: 6.6rem;
  margin: 0;
}
.demo-mode.mode-flash { animation: modeFlash 0.7s ease both; }
@keyframes modeFlash {
  from { opacity: 0.15; transform: scale(1.3); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-mode.mode-flash { animation: none; }
}

/* readout: the hidden-number strip, styled as a distinct dark panel
   nearly as wide as the surrounding surface, with tiles aligned to
   the same x-position as the guess rows below. Title (with the range
   folded into it) sits above the tiles; the factorization sits below. */
.readout {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.75rem;
}
.readout-title {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: 0.45rem;
  font-variant-numeric: tabular-nums;
}
.readout-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.readout-factorization {
  margin-top: 0.5rem;
  min-height: 1.35em; /* reserved, so it appearing after the first clue never shifts the layout */
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--chalk);
  font-variant-numeric: tabular-nums;
}
.readout-factorization.pending { visibility: hidden; }
.readout-factorization .fz-share { color: var(--divisor); font-weight: 700; }
/* once the next guess starts it is no longer new information */
.readout-factorization.seen .fz-share { color: inherit; font-weight: inherit; }

/* Fixed two-line headline above the hidden number and the board. It does
   not change from guess to guess; on the winning guess it is replaced by a
   single white line (same box, so nothing shifts). */
.demo-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.9em;
  margin: 0 0 0.9rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--chalk);
  text-align: center;
}
.demo-head .dh-line { display: block; }
.demo-head .dh-share { color: var(--divisor); }
.demo-head .dh-ok { color: var(--correct); }
.demo-head .dh-mis { color: var(--present); }

.demo-head .dh-solved { display: none; }
.demo-head.is-solved .dh-line { display: none; }
.demo-head.is-solved .dh-solved { display: block; color: var(--chalk); }

/* Board, row, tile and GCD values below are copied from the live
   game's own CSS (its .board/.row/.tile/.ground rules), not
   re-invented for the landing page, so this demo matches what a
   player actually sees — including how it behaves on a phone. */
.board {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem; /* 5px, matches live .board */
  margin-bottom: 0.75rem;
}

.row {
  border-radius: 0.625rem; /* 10px, matches live .row */
  padding: 0.1875rem 0.625rem; /* 3px 10px, matches live .row */
}

.row-main {
  display: flex;
  align-items: center;
  gap: 0.875rem; /* 14px, matches live .row gap */
  flex-wrap: nowrap;
  min-height: 3.375rem;
}

/* Reserved, always-present line under every row so an occasional
   explanatory note never changes the board's height mid-playback.
   (Landing-page addition — the live game doesn't need this since its
   rows aren't scripted.) */
.row-factors {
  min-height: 1.35em; /* reserved, filled when the guess is played */
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--chalk);
  font-variant-numeric: tabular-nums;
}
.row-factors .fz-share { color: var(--divisor); font-weight: 700; }

.row-note {
  min-height: 1.35em;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--chalk-dim);
}
.row-note .note-factor { color: var(--divisor); font-weight: 700; }

.tiles { display: flex; gap: 0.5rem; } /* 8px, matches live .tiles */

.tile {
  width: 3.375rem;  /* 54px, matches live .tile */
  height: 3.375rem;
  border: 2px solid var(--rule);
  border-radius: 0.5rem; /* 8px, matches live .tile */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 1.625rem; /* 26px, matches live .tile */
  font-weight: 700;
  background: var(--surface);
  color: var(--chalk);
  flex: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tile.static { background: var(--surface-2); }
.tile.empty { background: transparent; border-style: dashed; border-color: var(--rule); opacity: 0.55; }
.tile.correct { background: var(--correct); border-color: var(--correct); color: #0e1a14; }
.tile.present { background: var(--present); border-color: var(--present); color: #2a2107; }
.tile.absent { background: var(--absent); border-color: var(--absent); color: var(--chalk-dim); }

/* GCD readout — label above value, same as the live game's own
   "rule example" component (the mini-board it uses for its own
   how-to-play walkthrough, which is the real-game analog closest to
   this demo). Fixed-ish width so it doesn't jitter as digits change. */
.ground {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem; /* 1px, matches live .rule-example-gcd */
  min-width: 3.4rem;
  font-family: var(--mono);
  color: var(--chalk-dim);
  flex: none;
}
.ground .gcd-label {
  font-size: 0.5rem; /* 8px, matches live .rule-example-gcd-label */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}
.ground .gcd-val {
  font-size: 1.375rem; /* 22px, matches live main-board .gcd-val */
  font-weight: 800;
  color: var(--divisor);
  line-height: 1.1;
}
.ground .gcd-val.pending { color: var(--rule); font-weight: 600; }
.ground .gcd-val:not(.pending) { text-decoration: underline dotted; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
/* beat 1 of a guess: no GCD yet */
.row-pending .ground { visibility: hidden; }

/* Pegs always sit on a single line, right after the GCD block rather
   than pushed to the far edge of the row. Dot size/shape matches the
   live game's .peg-swatch. */
.pegs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.375rem; /* 6px, matches live .peg-swatch spacing */
  flex: none;
}
.peg {
  width: 0.625rem;  /* 10px, matches live .peg-swatch */
  height: 0.625rem;
  flex: none;
  border-radius: 50%;
  background: var(--rule);
  opacity: 0.35;
}
.peg.peg-correct { background: var(--correct); opacity: 1; }
.peg.peg-present { background: var(--present); opacity: 1; }
.peg.peg-absent { background: var(--absent); opacity: 1; }

.row.guess-row.filled { animation: rowReveal 0.3s ease both; }
@keyframes rowReveal {
  from { background: var(--surface-2); }
  to { background: transparent; }
}

.modes-key {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--chalk-dim);
  text-align: left;
}
.mode-card { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.mode-card p { margin: 0; }
.mode-card .mode-title { color: var(--chalk); font-weight: 700; font-size: 1rem; margin-bottom: 0.4rem; }
.mode-title .hint-realname { display: block; color: var(--chalk-dim); font-weight: 400; font-size: 0.85rem; }
.modes-gcd { grid-column: 1 / -1; margin: 0; }
@media (max-width: 36rem) {
  .modes-key { grid-template-columns: 1fr; }
}

/* Mirrors the game's post-solve .fun-fact-card */
.fact-card {
  margin: 1.5rem 0 0.5rem;
  background: var(--surface);
  border-radius: 14px;
  padding: 20px 18px;
  text-align: center;
  max-width: 22.5rem;
}
.fact-hero { font-size: 34px; font-weight: 800; color: var(--chalk); letter-spacing: 0.02em; line-height: 1; }
.fact-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  margin: 8px 0;
  color: var(--divisor);
}
.fact-sentence { font-size: 14px; color: var(--chalk-dim); line-height: 1.5; }
.fact-figure { margin-top: 14px; color: var(--chalk); display: flex; justify-content: center; }
.fact-figure svg { display: block; width: 100%; height: auto; max-height: 260px; }
.fact-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  margin-top: 18px;
  font-size: 11px;
  color: var(--chalk-dim);
  font-family: var(--mono);
}

@media (prefers-reduced-motion: reduce) {
  .row.guess-row.filled { animation: none; }
}

/* ---------- copy section kept after demo ---------- */
section.copy {
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}
section.copy p { margin: 0 0 1em; max-width: 68ch; color: var(--chalk); }
.copy h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--divisor);
  margin: 2.4em 0 .6em;
  line-height: 1.2;
  text-wrap: balance;
}
.copy h3 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--chalk);
  margin: 1.6em 0 .35em;
  line-height: 1.3;
}
.copy strong { color: var(--divisor); font-weight: 700; }
.copy table.algo {
  border-collapse: collapse;
  margin: 1.4em 0 1.6em;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  width: 100%;
  max-width: 36rem;
  display: block;
  overflow-x: auto;
}
.copy table.algo caption {
  text-align: left;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  padding-bottom: .6em;
}
.copy table.algo th,
.copy table.algo td {
  text-align: left;
  padding: .5em .9em .5em 0;
  border-bottom: 1px solid var(--rule);
  color: var(--chalk);
}
.copy table.algo th {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  font-weight: 500;
}

/* hero sub (content review addition) */
.hero-sub {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--chalk-dim);
  line-height: 1.35;
  margin: .3em 0 .8em;
}

/* ---------- inline mid-page CTA ---------- */
.inline-cta {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
  text-align: center;
}
.inline-cta p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--chalk-dim);
}
.inline-cta-link {
  color: var(--divisor);
  font-weight: 700;
  text-decoration: none;
}
.inline-cta-link:hover { filter: brightness(1.1); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2.5rem 0;
}
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--chalk);
  margin: 0;
  max-width: 22ch;
}
.cta-button {
  display: inline-block;
  background: var(--divisor);
  color: var(--divisor-ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.cta-button:hover { filter: brightness(1.06); }

/* ---------- footer ---------- */
footer { padding: 2.5rem 0 3.5rem; color: var(--chalk-dim); font-size: 0.9rem; }
footer .wrap {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
footer a { color: var(--chalk-dim); }
footer a:hover { color: var(--divisor); }
footer .copyright { flex-basis: 100%; margin: 0; font-size: 0.75rem; }

/* Matches the live game's own @media (max-width: 480px) rule: only
   the GCD column shrinks, tiles stay full-size (4 tiles at 54px
   always fits a phone width — that's the live game's own logic). */
@media (max-width: 30rem) {
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .cta-button { white-space: normal; max-width: 100%; }
  /* On phones the demo board is sized with min(rem, vw) so it fits the
     screen even when the reader's browser text size is larger than
     default (rem-only sizes grew with the text and the demo card,
     which clips its overflow, cut off the last peg and the mode name). */
  .wrap { padding: 0 min(1.5rem, 5vw); }
  .demo { padding: min(1.1rem, 3.5vw); }
  .row-main { gap: min(0.3rem, 1.2vw); }
  .row { padding: 0.1875rem min(0.4rem, 1.5vw); }
  .tiles { gap: min(0.2rem, 0.8vw); }
  .tile { width: min(2.3rem, 9.2vw); height: min(2.3rem, 9.2vw); font-size: min(1.1rem, 4.4vw); }
  .readout { padding: 0.5rem 0.5rem; }
  .ground { min-width: min(2.3rem, 9vw); }
  .ground .gcd-val { font-size: min(0.85rem, 3.6vw); }
  .ground .gcd-label { font-size: min(0.5rem, 2.4vw); }
  .pegs { gap: min(0.2rem, 0.8vw); }
  .peg { width: min(0.4rem, 1.7vw); height: min(0.4rem, 1.7vw); }
  .demo-toggle { font-size: min(0.66rem, 2.9vw); padding: 0.3rem min(0.6rem, 2.4vw); }
  .demo-mode { font-size: min(1rem, 4.6vw); }
  .demo-digits { font-size: min(0.78rem, 3.4vw); }
  .demo-head { font-size: min(1rem, 3.2vw); }
  .readout-factorization, .row-factors { font-size: min(0.78rem, 3.4vw); }
}

/* Narrow screens: the nav stays one row with the tagline visible, by
   shrinking the icon, the tagline's tracking and the controls. */
@media (max-width: 28rem) {
  .wordmark { font-size: 1.75rem; gap: 0.3rem; }
  .wordmark-tagline { font-size: 10px; letter-spacing: 0.14em; }
  .nav-play { font-size: 0.8rem; padding: 0.5rem 0.85rem; }
}
@media (max-width: 22.5rem) {
  .wordmark { font-size: 1.5rem; }
  .wordmark-tagline { font-size: 9px; letter-spacing: 0.1em; }
  .nav-play { font-size: 0.74rem; padding: 0.45rem 0.7rem; }
}

/* ---------- collapsible algorithm walkthrough ---------- */
.algo-detail { margin: 1.5rem 0 0.5rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.algo-detail summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0.25rem;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--chalk-dim);
}
.algo-detail summary::-webkit-details-marker { display: none; }
.algo-detail summary::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--divisor);
  border-bottom: 2px solid var(--divisor);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  margin: 0 0.25rem 0 0.1rem;
}
.algo-detail[open] summary::before { transform: rotate(45deg); }
.algo-detail summary:hover { color: var(--chalk); }
.algo-detail summary:focus-visible {
  outline: 2px solid var(--divisor);
  outline-offset: 2px;
  border-radius: 4px;
  color: var(--chalk);
}
.algo-detail .algo-body { padding: 0.25rem 0.25rem 0.75rem; }
@media (prefers-reduced-motion: reduce) {
  .algo-detail summary::before { transition: none; }
}

/* Separates the Q&A reference block from the narrative sections above it */
.copy h2.faq-title {
  margin-top: 3.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

/* ================= teachers page (v3) ================= */
.hero h1 { margin-bottom: 1rem; }
.hero .hero-sub { font-size: 1.15rem; line-height: 1.55; max-width: 36rem; color: var(--chalk); margin: 0; }
section.copy h2 { font-size: 1.25rem; margin-top: 0; }
section.copy .lead { font-size: 1.05rem; }
.copy .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Section 3: card beside the text on wide screens */
.concept { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 46rem) { .concept { grid-template-columns: 1fr 22.5rem; } .wrap.wide { max-width: 62rem; } }
.concept .fact-card { margin: 0; }
.fact-figure { color: var(--chalk); }
.questions { margin: 0 0 1em; padding-left: 1.2em; max-width: 60ch; }
.questions li { margin-bottom: 0.35em; }

/* Section 4 */
.copy code, .code-inline { font-family: var(--mono); }
.alphabet { display: block; margin-top: 0.4rem; letter-spacing: 0.04em; font-family: var(--mono); overflow-wrap: anywhere; }
.video { margin: 1.5rem 0 0; }
.video[hidden] { display: none; }
.video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0e1a14; border: 1px solid var(--rule); border-radius: 10px; }
.video figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--chalk-dim); }

/* Section 5: the guarantee and its price */
.honest { border-left: 4px solid var(--divisor); padding: 0.1rem 0 0.1rem 1rem; margin-top: 1.4rem; }
.honest h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.honest p { margin: 0; }

.ask-band h2 { font-size: 1.25rem; }
.ask-band a { color: var(--divisor); font-weight: 700; overflow-wrap: anywhere; }
.ask-band .ask-line { margin-top: 0.9rem; font-family: var(--mono); }

/* v4 additions */
.demo-wrap[hidden] { display: none; }
.demo-pause {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--chalk);
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.4rem 1rem; cursor: pointer; margin-top: 0.75rem;
}
.demo-pause:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
.split { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 46rem) { .split { grid-template-columns: 1fr 15.5rem; } }
.shot { margin: 0; }
.shot img { display: block; width: 100%; max-width: 17.5rem; height: auto; border-radius: 14px; border: 1px solid var(--rule); }
.shot figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--chalk-dim); max-width: 17.5rem; }
.options-grid { display: grid; gap: 1rem; margin: 1.2rem 0 0; }
@media (min-width: 36rem) { .options-grid { grid-template-columns: 1fr 1fr; } }
.opt { border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.opt h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.opt p { margin: 0 0 0.5em; font-size: 0.95rem; }
.opt-group { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--divisor); margin: 1.4rem 0 0; }
.rules { margin: 0 0 1em; padding-left: 1.2em; max-width: 62ch; }
.rules li { margin-bottom: 0.4em; }

/* One left edge for every section; running text keeps its own measure. */
.wrap, .wrap.wide { max-width: 62rem; }
.demo-wrap { max-width: 42rem; }
.copy .lead, .copy p, .copy .rules, .copy .questions { max-width: 44rem; }
.concept .lead, .concept p { max-width: none; }
.split .lead, .split p { max-width: none; }
.hero .hero-sub { max-width: 40rem; }
.ask-band p { max-width: 44rem; }
.options-grid { max-width: 44rem; }

/* Demo: wrapping factorization line and the harder-mode pulse (as on the landing pages) */
.readout-factorization { overflow-wrap: anywhere; word-break: normal; }
@keyframes peg-pulse { 0% { transform: scale(2.4); } 100% { transform: scale(1); } }
.peg.peg-pulse { position: relative; z-index: 1; animation: peg-pulse 0.55s cubic-bezier(0.2, 0.8, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { .peg.peg-pulse { animation: none; } }

/* Easier <-> harder: the board, headline and panel fade out, the new mode name
   pops in on the empty card, then everything fades back in. */
.demo .demo-head, .demo .readout, .demo .board { transition: opacity 0.35s ease; }
.demo.is-switching .demo-head, .demo.is-switching .readout, .demo.is-switching .board { opacity: 0; }
.demo-mode { transform-origin: right center; }
@media (prefers-reduced-motion: reduce) {
  .demo .demo-head, .demo .readout, .demo .board { transition: none; }
}


/* ================= v5: mock create screen + stepped walkthrough ================= */
@media (min-width: 46rem) { .split { grid-template-columns: 1fr 21rem; } }
.mock { margin: 0; }
.mock-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 1.1rem 1rem 1.2rem; max-width: 24rem; font-size: 0.9rem; }
.mock-card p { margin: 0; }
.mock-h { font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; margin-bottom: 0.7rem !important; }
.mock-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; background: var(--surface-2); border-radius: 10px; padding: 0.25rem; margin-bottom: 0.55rem; font-family: var(--mono); font-size: 0.82rem; }
.mock-seg > span { text-align: center; padding: 0.55rem 0.2rem; border-radius: 8px; color: var(--chalk-dim); }
.mock-seg > span.on { background: var(--divisor); color: var(--divisor-ink); font-weight: 700; }
.mock-seg-2 > span { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.25rem; padding: 0.5rem 0.2rem; }
.mock-seg-2 b { flex-basis: 100%; font-weight: 700; margin-top: 0.1rem; }
.sw { display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 2px solid #fff; }
.sw.sq { border-radius: 3px; }
.sw.g { background: var(--correct); } .sw.o { background: var(--present); } .sw.k { background: #121212; }
.mock-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chalk-dim); margin: 0.6rem 0 0.4rem !important; }
.mock-tiles { display: flex; justify-content: center; gap: 0.5rem; }
.mock-tiles span { width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center; border: 2px solid var(--rule); border-radius: 8px; font-family: var(--mono); font-weight: 700; font-size: 1.3rem; background: var(--surface-2); }
.mock-fz { text-align: center; font-family: var(--mono); font-size: 0.82rem; color: var(--chalk-dim); margin: 0.4rem 0 0.8rem !important; }
.mock-fact { border: 1px solid var(--rule); border-radius: 10px; padding: 0.7rem 0.7rem 0.8rem; text-align: center; background: var(--surface-2); }
.mock-fact-k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); margin-bottom: 0.3rem !important; }
.mock-fact-t { font-weight: 700; margin-bottom: 0.25rem !important; } .mock-fact-t em { font-style: normal; color: var(--divisor); }
.mock-fact-s { font-size: 0.82rem; line-height: 1.4; }
.mock-btn { display: inline-block; margin-top: 0.9rem; background: var(--divisor); color: var(--divisor-ink); font-family: var(--mono); font-weight: 700; font-size: 0.85rem; padding: 0.6rem 1.4rem; border-radius: 999px; }
.mock-ready { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--rule); text-align: center; }
.mock-ready p { font-size: 0.82rem; line-height: 1.4; color: var(--chalk-dim); }
.mock-code { font-family: var(--mono); font-weight: 700; font-size: 1.6rem !important; letter-spacing: 0.12em; color: var(--divisor) !important; margin: 0.5rem 0 0.15rem !important; }
.mock-link { font-family: var(--mono); font-size: 0.72rem !important; overflow-wrap: anywhere; color: var(--chalk) !important; }
.mock-copy { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.7rem; font-family: var(--mono); font-size: 0.78rem; }
.mock-copy span { border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.9rem; }
.mock figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--chalk-dim); max-width: 24rem; }

.walk { margin-top: 1.4rem; max-width: 42rem; }
.walk-ctl { display: none; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0.9rem 0 0; }
.walk-js .walk-ctl { display: flex; }
.walk-ctl button { font-family: var(--mono); font-size: 0.9rem; font-weight: 700; color: var(--chalk); background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 0.6rem 1.3rem; cursor: pointer; min-width: 5.5rem; }
.walk-ctl button.next { background: var(--divisor); border-color: var(--divisor); color: var(--divisor-ink); }
.walk-ctl button:disabled { opacity: 0.35; cursor: default; }
.walk-ctl button:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }
.walk-ctl .where { font-family: var(--mono); font-size: 0.8rem; color: var(--chalk-dim); }
.walk-notes { margin-top: 1rem; }
.walk-notes .note { margin-bottom: 1.4rem; }
.walk-notes .note h3 { font-size: 1.02rem; margin: 0 0 0.45rem; }
.walk-notes .note p { margin: 0 0 0.6em; font-size: 0.98rem; max-width: 60ch; }
.walk-js .walk-notes .note { display: none; margin-bottom: 0; }
.walk-js .walk-notes .note.on { display: block; animation: noteIn 0.35s ease both; }
@keyframes noteIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .walk-js .walk-notes .note.on { animation: none; } }
.share-text { font-family: var(--mono); font-size: 0.95rem; line-height: 1.6; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 0.8rem 1rem; margin: 0 0 0.8rem; white-space: pre; overflow-x: auto; max-width: 22rem; user-select: all; }
.row.row-pending .row-factors { visibility: hidden; }

/* v6: second mock card, step counter, concept card placement */
.mock-card + .mock-card { margin-top: 0.6rem; }
.mock-card-ready .mock-ready { margin-top: 0; padding-top: 0; border-top: 0; }
.walk-ctl .where { white-space: nowrap; }
.concept { grid-template-areas: "lead" "card" "rest"; }
.concept .c-lead { grid-area: lead; } .concept .fact-card { grid-area: card; } .concept .c-rest { grid-area: rest; }
@media (min-width: 46rem) { .concept { grid-template-areas: "lead card" "rest card"; grid-template-rows: auto 1fr; gap: 0 1.5rem; } }

/* v6.1: two-line step counter, share screen on the last step */
.walk-ctl .where { white-space: pre-line; text-align: center; line-height: 1.3; }
.share-demo { margin-top: 0.9rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.share-btn { display: inline-block; background: var(--divisor); color: var(--divisor-ink); font-family: var(--mono); font-weight: 700; font-size: 0.9rem; padding: 0.6rem 1.6rem; border-radius: 999px; }
.share-demo .share-text { display: block; text-align: left; margin: 0.8rem 0 0; }
.walk-js .share-demo { display: none; }
.walk-js.share-on .share-demo { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.walk-js.share-on #walkBoard { display: none; }
