/* GambitCamp website. Dark only: the page is a scoresheet laid over a board. Near-black green ground,
   one committed lime (the app's accent), hairline rules, Geist Mono for every label and readout,
   Space Grotesk (the app's face) for giant type and numerals. */

@font-face {
  font-family: 'Camp Sans';
  src: url('fonts/SpaceGrotesk-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Camp Sans';
  src: url('fonts/SpaceGrotesk-Medium.ttf') format('truetype');
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: 'Camp Mono';
  src: url('fonts/GeistMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0a0c09;
  --ground-2: #10140d;
  --ground-3: #161d12;
  --field: #141d10;
  --ink: #e9ede2;
  --muted: #a3ad97;
  --faint: #7c8871;
  --rule: rgb(197 245 105 / 0.13);
  --rule-strong: rgb(197 245 105 / 0.3);
  --lime: #c5f569;
  --lime-ink: #0f1609;
  --lime-dim: rgb(197 245 105 / 0.08);
  --bad: #ff7d5e;
  --owner-bg: #ffd84d;
  --owner-ink: #1d1600;
  --maxw: 1320px;
  --gutter: 16px;
  --header-h: 56px;
  --font: 'Camp Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Camp Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 30px 60px -24px rgb(0 0 0 / 0.75);
}
@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ground);
  scrollbar-color: var(--rule-strong) var(--ground);
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  overflow-x: clip;
}
/* Film grain over the whole landing page: one tiled file, no script. */
.page-home::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: url('grain.svg') repeat;
  background-size: 220px 220px;
  opacity: 0.07;
}

::selection {
  background: var(--lime);
  color: var(--lime-ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--lime);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 10px 14px;
  z-index: 60;
  font: 400 0.8125rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vertical-align: -0.18em;
}

/* ---------- Type ---------- */
h1,
h2,
h3 {
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 20px;
  overflow-wrap: break-word;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.5rem, 6.4vw, 6.25rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(2.125rem, 5.4vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}
h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
p {
  text-wrap: pretty;
}

/* The mono HUD voice: labels, coordinates, captions, readouts. */
.label,
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.sec-no {
  color: var(--lime);
}

.hl {
  font-style: normal;
  color: var(--lime);
}

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 36em;
}

.ann-bad {
  color: var(--bad);
}
.ann-good {
  color: var(--lime);
}

/* ---------- Header: a HUD bar ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
  position: relative;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--lime);
  color: var(--lime-ink);
  display: grid;
  place-items: center;
}
.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.site-nav {
  display: flex;
  gap: 4px 22px;
  align-items: center;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 8px;
}
.site-nav a:hover {
  color: var(--lime);
}
.nav-no {
  color: var(--faint);
  margin-right: 6px;
}
.site-nav .nav-optional {
  display: none;
}
@media (min-width: 820px) {
  .site-nav .nav-optional {
    display: inline;
  }
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule-strong);
  padding: 6px 10px;
}
.lang span[aria-current] {
  color: var(--lime);
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 0;
}
.lang > span[aria-hidden] {
  color: var(--faint);
}

/* ---------- The scoresheet: Legal's mate, one move per section, as the page's navigation ---------- */
.rail {
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.04em;
  z-index: 30;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.rail .tk-no {
  color: var(--faint);
}
.rail-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.625rem;
  color: var(--faint);
}
.rail a[aria-current='true'],
.rail a[aria-current='true'] .rail-label,
.rail a:hover {
  color: var(--lime);
}
.rail-head {
  display: none;
}
/* Phones and tablets: a strip along the bottom edge, once the hero has scrolled away. */
@media (max-width: 1199px) {
  .rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42px;
    background: var(--ground);
    border-top: 1px solid var(--rule-strong);
    overflow-x: auto;
    scrollbar-width: none;
    transition: transform 0.35s var(--ease-out);
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  /* With motion.js it waits below the edge until the hero has scrolled away. */
  .motion .rail {
    transform: translateY(100%);
  }
  .motion.rail-on .rail {
    transform: none;
  }
  .rail ol {
    display: flex;
    height: 100%;
    width: max-content;
  }
  .rail li + li {
    border-left: 1px solid var(--rule);
  }
  .rail a {
    height: 100%;
    align-items: center;
    padding: 0 14px;
  }
  .rail a[aria-current='true'] {
    background: var(--lime);
    color: var(--lime-ink);
  }
  .rail a[aria-current='true'] .rail-label,
  .rail a[aria-current='true'] .tk-no,
  .rail a[aria-current='true'] [class^='ann-'] {
    color: var(--lime-ink);
  }
  .page-home .site-footer {
    padding-bottom: 90px;
  }
}
/* Wide screens: a column in the right margin, like the move list beside a printed game. */
@media (min-width: 1200px) {
  :root {
    --maxw: min(1320px, calc(100vw - 250px));
  }
  .rail {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 104px;
    font-size: 0.625rem;
  }
  .rail-head {
    display: block;
    margin: 0 0 10px;
    font-size: 0.5625rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .rail ol {
    border-left: 1px solid var(--rule);
    background: rgb(10 12 9 / 0.9);
    padding-right: 8px;
  }
  .rail-head {
    background: rgb(10 12 9 / 0.9);
    padding: 6px 8px;
    margin-bottom: 0;
  }
  .rail a {
    flex-direction: column;
    gap: 4px;
    padding: 7px 0 7px 10px;
  }
  .rail a::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: var(--lime);
    transform: scaleY(0);
    transition: transform 0.25s var(--ease-out);
  }
  .rail a[aria-current='true']::before {
    transform: none;
  }
  .rail-label {
    font-size: 0.5625rem;
  }
}

/* ---------- Hero: the board ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  isolation: isolate;
}
.hero-board {
  position: absolute;
  inset: 0 0 46px 0;
  z-index: -1;
  /* Scanlines over the board grid, and a lime glow where the knight stands. */
  background-image:
    repeating-linear-gradient(to bottom, rgb(197 245 105 / 0.025) 0 1px, transparent 1px 4px),
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px),
    radial-gradient(ellipse 60% 70% at 78% 45%, rgb(197 245 105 / 0.07), transparent 70%);
  background-size:
    100% 100%,
    12.5% 12.5%,
    12.5% 12.5%,
    100% 100%;
}
.hero-board ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  display: flex;
  font: 400 0.625rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
}
.hero-board .files {
  left: 0;
  right: 0;
  bottom: 8px;
}
.hero-board .files li {
  flex: 1;
  padding-left: 8px;
}
.hero-board .ranks {
  top: 0;
  bottom: 0;
  left: 6px;
  flex-direction: column;
}
@media (max-width: 719px) {
  .hero-board .ranks {
    display: none;
  }
}
.hero-board .ranks li {
  flex: 1;
  padding-top: 8px;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-block: 40px 56px;
}
.hero-copy {
  display: contents;
}
.hero-label {
  order: 1;
  align-self: flex-start;
}
@media (max-width: 979px) {
  /* Phones: the store badges come straight after the knight, inside the first screen. */
  .hero-foot {
    display: flex;
    flex-direction: column;
  }
  .hero-foot .badges {
    order: -1;
    margin: 0 0 22px;
  }
}
.hero-title {
  order: 2;
  margin-bottom: 8px;
}
.knight-stage {
  order: 3;
}
.hero-foot {
  order: 4;
}
.hero-foot .lead {
  margin: 0;
}
@media (min-width: 980px) {
  .hero-title {
    font-size: clamp(3rem, 5.4vw, 6rem);
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    min-height: min(calc(100svh - var(--header-h) - 46px), 900px);
    padding-block: 48px 64px;
  }
  .hero-copy {
    display: block;
  }
  .hero-title {
    margin-bottom: 36px;
  }
  .hero-foot {
    display: grid;
    gap: 0;
    max-width: 34rem;
  }
}

/* The knight's box: a HUD frame with corner ticks and live readouts. */
.knight-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  margin-block: 20px 28px;
  border: 1px solid var(--rule);
  background:
    repeating-linear-gradient(to bottom, rgb(197 245 105 / 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 58%, rgb(197 245 105 / 0.12), transparent 62%);
}
@media (min-width: 980px) {
  .knight-stage {
    aspect-ratio: 4 / 5;
    max-height: min(74svh, 720px);
    justify-self: end;
    width: auto;
    height: min(74svh, 720px);
    margin: 0;
  }
}
.knight-stage::before,
.knight-stage::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--lime);
  pointer-events: none;
}
.knight-stage::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}
.knight-stage::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}
.knight-host,
.knight-poster {
  position: absolute;
  inset: 0;
}
.knight-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.knight-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.knight-canvas.on {
  opacity: 1;
}
/* The still image is first-screen media, so it loads eagerly (35 KB) and is ready the moment it is
   needed. With the 3D knight on its way it stays hidden; if the 3D one is not drawing after 2.5 s
   the still comes in (.k3d-wait), and fades out once the 3D one draws. */
.k3d:not(.k3d-wait) .knight-poster {
  display: none;
}
.knight-poster {
  transition: opacity 0.6s ease;
}
.k3d-live .knight-poster {
  opacity: 0;
}
.stage-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.stage-hud .hud {
  position: absolute;
  font: 400 0.625rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 10px 12px;
}
.stage-hud b {
  font-weight: 400;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.hud-tl {
  top: 0;
  left: 0;
  color: var(--lime) !important;
}
.hud-tr {
  top: 0;
  right: 0;
}
.hud-bl {
  bottom: 0;
  left: 0;
}
.hud-br {
  bottom: 0;
  right: 0;
}
.stage-hud b[data-hud] {
  display: inline-block;
  min-width: 6ch;
  text-align: right;
}
html:not(.k3d-live) .stage-hud .hud-tr,
html:not(.k3d-live) .stage-hud .hud-br {
  visibility: hidden;
}

/* Ticker: Legal's mate, move by move, along the bottom edge of the board. */
.ticker {
  height: 46px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: center;
  font: 400 0.8125rem/1 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: var(--ground);
}
.ticker-track {
  display: flex;
  width: max-content;
}
.tk-run {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}
.tk-title {
  color: var(--lime-ink);
  background: var(--lime);
  padding: 5px 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.6875rem;
}
.tk-no {
  color: var(--faint);
}
.tk-result {
  color: var(--lime);
}

/* ---------- Badges ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}
.badges a {
  display: inline-block;
  line-height: 0;
}
.badges img {
  height: 48px;
  width: auto;
}
.badge-soon {
  display: inline-block;
  line-height: 0;
  opacity: 0.7;
}
.soon-tag {
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid var(--rule-strong);
  padding: 8px 10px;
}

/* ---------- Sections: the board's files run down the whole page ---------- */
.sec {
  padding-block: clamp(72px, 10vw, 150px);
  border-bottom: 1px solid var(--rule);
  position: relative;
  background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: 12.5% 100%;
}
.engine {
  background-image: linear-gradient(to right, rgb(15 22 9 / 0.14) 1px, transparent 1px);
  background-size: 12.5% 100%;
}
/* Each section's move of the game sits on the rule where the section begins, like a scoresheet
   entry hung on the margin, not a label above the heading. */
.move-tag {
  position: absolute;
  z-index: 2;
  top: 0;
  left: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  transform: translateY(-50%);
  margin: 0;
  word-spacing: 0.3em;
  padding: 8px 12px 7px;
  border: 1px solid var(--rule-strong);
  background: var(--ground);
  font: 400 0.875rem/1 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.move-tag .tk-no {
  color: var(--faint);
}
/* Under the ticker the rule is already taken: the first section's move sits just inside it. */
#how .move-tag {
  top: clamp(24px, 3vw, 40px);
  transform: none;
}
#how {
  padding-top: clamp(112px, 12vw, 170px);
}
.engine .move-tag {
  background: var(--lime);
  border-color: var(--lime-ink);
}
.engine .move-tag .tk-no {
  color: var(--lime-ink);
}
.engine .ann-good {
  color: var(--lime-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.engine .ann-bad {
  color: #b52f12;
}
.sec-head {
  max-width: 62rem;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.sec-head .lead {
  margin: 0;
}

/* How it works: three numbered moves of one game. */
.moves {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}
.move {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-block: 36px 44px;
  border-bottom: 1px solid var(--rule);
}
.move-san {
  margin: 0;
  font: 500 clamp(3.5rem, 8.4vw, 8rem) / 0.82 var(--font);
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.move-text p {
  color: var(--muted);
  margin: 0;
  max-width: 32em;
}
.move-side {
  min-width: 0;
}
.move-art {
  aspect-ratio: 1;
  max-width: 200px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  color: var(--lime);
  background:
    linear-gradient(to right, var(--rule) 1px, transparent 1px) 0 0 / 25% 25%,
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px) 0 0 / 25% 25%;
}
.line-icon {
  width: 46%;
  height: 46%;
  stroke-width: 1;
}
@media (min-width: 900px) {
  .move {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.8fr);
    gap: 40px;
    align-items: start;
    padding-block: 48px 56px;
  }
  .move-text {
    padding-top: 14px;
  }
  .move-side {
    justify-self: end;
    width: 100%;
  }
  .move-art {
    margin-left: auto;
  }
}

/* Board story (move 2): a printed diagram. */
.board-story {
  margin: 0;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
}
.board-svg {
  display: block;
  width: 100%;
  height: auto;
  outline: 1px solid var(--rule-strong);
  outline-offset: 6px;
}
.board-svg .sq-l {
  fill: #e4ead6;
}
.board-svg .sq-d {
  fill: #a2b28a;
}
.board-svg .sq-blunder {
  fill: #e0553a;
  opacity: 0;
}
.board-svg .sq-best {
  fill: #c5f569;
  opacity: 0.75;
}
.board-svg .arrow line {
  stroke: #2f6a0c;
  stroke-width: 0.17;
  stroke-linecap: round;
  opacity: 0.92;
}
.board-svg .arrow polygon {
  fill: #2f6a0c;
  opacity: 0.92;
}
.board-svg .arrow {
  transform-origin: 0 0;
}
.board-svg .badge-blunder,
.board-svg .badge-best {
  transform-box: fill-box;
  transform-origin: center;
}
.board-svg .badge-blunder {
  opacity: 0;
}
.board-svg .badge-blunder circle {
  fill: #d8432a;
}
.board-svg .badge-blunder text {
  fill: #fff;
  font: 700 0.25px var(--font);
}
.board-svg .badge-best circle {
  fill: #2f6a0c;
}
.board-svg .badge-best polygon {
  fill: #fff;
}
.board-story figcaption {
  display: grid;
  margin-top: 18px;
  min-height: 3.2em;
  color: var(--muted);
  font-size: 0.9375rem;
}
.board-story .cap {
  grid-area: 1 / 1;
}
.board-story .cap strong {
  color: var(--ink);
  font-weight: 500;
}
.board-story .cap-played {
  opacity: 0;
}

/* Specimens: app screens shown as numbered plates. */
.specimen {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 300px;
}
.specimen-frame {
  position: relative;
  padding: 10px;
  border: 1px solid var(--rule);
  background: var(--ground-2);
}
.specimen-frame::before,
.specimen-frame::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--lime);
  pointer-events: none;
}
.specimen-frame::before {
  top: -5px;
  left: -5px;
  border-width: 1px 0 0 1px;
}
.specimen-frame::after {
  bottom: -5px;
  right: -5px;
  border-width: 0 1px 1px 0;
}
.specimen img {
  width: 100%;
  aspect-ratio: 600 / 1212;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
}
.specimen figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font: 400 0.625rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.specimen figcaption span:first-child {
  color: var(--lime);
}
.specimen-sm {
  max-width: 220px;
}
.move-side .specimen {
  margin-left: auto;
}

/* Review: the heading opens on a giant "10". */
.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.review-copy h2 {
  max-width: 11em;
}
.giant-num {
  display: block;
  margin: 0 0 0.1em -0.04em;
  font-size: clamp(10rem, 44vw, 26rem);
  line-height: 0.74;
  letter-spacing: -0.05em;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.review-copy .lead {
  margin-top: 0;
}
.numbered {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.numbered li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 8px;
  padding-block: 12px;
  border-bottom: 1px solid var(--rule);
}
.li-no {
  font: 400 0.75rem/1.9 var(--mono);
  color: var(--lime);
  letter-spacing: 0.08em;
}
.review-plates {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.review-plates .specimen {
  flex: 1;
}
.review-plates .specimen-sm {
  margin-top: 64px;
}
@media (min-width: 1000px) {
  .review-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
    gap: 64px;
    align-items: start;
  }
  .giant-num {
    font-size: clamp(16rem, 30vw, 26rem);
  }
  .review-plates {
    padding-top: 6vw;
  }
}

/* The index: one huge word per row; the open row is a lime band and shows its specimen. */
.index {
  position: relative;
  border-top: 1px solid var(--rule-strong);
}
.row summary {
  list-style: none;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  position: relative;
  isolation: isolate;
}
.row summary::-webkit-details-marker {
  display: none;
}
.row summary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-out);
}
.row-no {
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-left: 4px;
}
.row-word {
  font: 500 clamp(2.2rem, 6.6vw, 6rem) / 0.95 var(--font);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: transform 0.45s var(--ease-out);
}
.row-meta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.row-plus {
  width: 18px;
  height: 18px;
  position: relative;
}
.row-plus::before,
.row-plus::after {
  content: '';
  position: absolute;
  inset: 8px 0 auto 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}
.row-plus::after {
  transform: rotate(90deg);
}
.row[open] .row-plus::after {
  transform: rotate(0deg);
}
.row[open] summary,
.row summary:hover {
  color: var(--lime-ink);
}
.row[open] summary::before,
.row summary:hover::before {
  transform: none;
}
.row[open] .row-no,
.row summary:hover .row-no {
  color: var(--lime-ink);
}
.row summary:hover .row-word {
  transform: translateX(10px);
}
.pro-tag {
  display: inline-block;
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 5px 7px 4px;
}
.row-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--rule);
  animation: row-in 0.5s var(--ease-out) both;
}
.row-text h3 {
  margin-bottom: 12px;
}
.row-text p {
  color: var(--muted);
  margin: 0 0 14px;
}
.row-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.9375rem;
}
.row-text li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.row-text li .icon,
.plan li .icon {
  color: var(--lime);
  margin-top: 0.25em;
}
.row-art {
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  aspect-ratio: 600 / 1212;
  max-width: 300px;
  background:
    linear-gradient(to right, var(--rule) 1px, transparent 1px) 0 0 / 12.5% 6.2%,
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px) 0 0 / 12.5% 6.2%;
}
.row-knight {
  width: 62%;
  fill: var(--lime);
}
@media (min-width: 1000px) {
  .index {
    min-height: 760px;
  }
  .row summary {
    width: 62%;
  }
  .row-body {
    position: absolute;
    top: 0;
    right: 0;
    width: 34%;
    display: block;
    border: 0;
    padding: 28px 0 0;
  }
  .row-body .specimen,
  .row-body .row-art {
    max-width: 230px;
    margin-bottom: 22px;
  }
}

/* Engine: the one full lime field. */
.engine {
  background: var(--lime);
  color: var(--lime-ink);
  border-bottom: 0;
}
.engine .label {
  color: var(--lime-ink);
}
.engine .label::after {
  background: rgb(15 22 9 / 0.3);
}
.engine .sec-no {
  color: var(--lime-ink);
}
.engine-copy p:not(.label) {
  max-width: 34em;
  font-size: 1.125rem;
}
.engine ::selection {
  background: var(--lime-ink);
  color: var(--lime);
}
.engine a {
  color: var(--lime-ink);
}
.engine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.engine-drawing {
  margin: 0;
  max-width: 380px;
}
.engine-svg {
  width: 100%;
  height: auto;
}
.engine-svg .ln {
  fill: none;
  stroke: var(--lime-ink);
  stroke-width: 1.4;
}
.engine-svg .dim {
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.engine-svg .sq rect {
  fill: var(--lime-ink);
}
.engine-svg .arrow {
  stroke: var(--lime);
  stroke-width: 3;
}
.engine-svg .dot {
  fill: var(--lime-ink);
}
.engine-svg .tag {
  fill: var(--lime-ink);
}
.engine-svg text {
  fill: var(--lime);
  stroke: none;
  font: 400 14px var(--mono);
}
.engine-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  border-top: 1px solid rgb(15 22 9 / 0.35);
}
.engine-points li {
  display: grid;
  grid-template-columns: 30px 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-block: 16px;
  border-bottom: 1px solid rgb(15 22 9 / 0.2);
  font-size: 1.0625rem;
}
.pt-tag {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--lime-ink);
  color: var(--lime);
  font: 400 0.8125rem/1 var(--mono);
}
.engine-points .icon {
  margin-top: 0.2em;
}
@media (min-width: 900px) {
  .engine-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: 32px 64px;
    align-items: center;
  }
  .engine-drawing {
    justify-self: end;
    grid-row: span 2;
  }
  .engine-points {
    align-self: end;
  }
}

/* Free and Pro: one ruled sheet, two independent columns ("=" level, "±" an edge). */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: var(--ground);
}
.sheet-col {
  padding: clamp(22px, 3vw, 40px) clamp(0px, 2vw, 32px) clamp(22px, 3vw, 36px) 0;
}
.sheet-col + .sheet-col {
  border-top: 1px solid var(--rule);
}
.sheet-pro {
  background: var(--lime-dim);
  padding-left: clamp(16px, 2.4vw, 36px);
  padding-right: clamp(16px, 2.4vw, 36px);
}
@media (min-width: 860px) {
  .sheet {
    grid-template-columns: 1fr 1fr;
  }
  .sheet-col + .sheet-col {
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
.sheet h3 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  letter-spacing: -0.035em;
  margin: 0 0 8px;
}
.sheet-glyph {
  display: block;
  font: 500 clamp(2.75rem, 5vw, 4.5rem) / 0.8 var(--font);
  color: var(--faint);
  margin-bottom: 14px;
}
.sheet-pro .sheet-glyph {
  color: var(--lime);
}
.sheet-sub {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0;
}
.sheet .numbered {
  margin-top: 22px;
}
.sheet-price {
  margin: 22px 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}
.sheet-price strong {
  color: var(--lime);
  font-weight: 500;
}
.fine {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 20px;
  max-width: 62em;
}

/* Download: the game ends 1-0. */
.cta-sec {
  border-bottom: 0;
  overflow-x: clip;
  padding-top: clamp(104px, 12vw, 170px);
}
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
.cta-glyph {
  margin: 0;
  font: 500 clamp(9rem, 40vw, 26rem) / 0.72 var(--font);
  letter-spacing: -0.04em;
  color: var(--lime);
}
.cta-copy p {
  color: var(--muted);
  margin: 0;
}
.cta-knight {
  width: clamp(120px, 22vw, 260px);
  fill: var(--lime);
  justify-self: end;
}
@media (min-width: 960px) {
  .cta {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 48px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 0 48px;
  font-size: 0.9375rem;
  color: var(--muted);
  overflow: hidden;
}
/* The board's closing file row: full bleed, on the same 12.5% pitch as the grid above. */
.footer-word {
  border-bottom: 1px solid var(--rule);
  padding-block: 12px 10px;
}
.footer-files {
  display: flex;
  font: 400 0.625rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
}
.footer-files span {
  flex: 1;
  padding-left: 8px;
}
.footer-cols {
  display: grid;
  gap: 28px;
  padding-top: 36px;
}
@media (min-width: 820px) {
  .footer-cols {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.site-footer h2 {
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.site-footer a {
  color: var(--ink);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--lime);
}
.site-footer p {
  margin: 0 0 8px;
}
.footer-brand {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Owner markers ---------- */
mark.owner {
  background: var(--owner-bg);
  color: var(--owner-ink);
  font: 400 0.8125rem/1.5 var(--mono);
  padding: 2px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  overflow-wrap: anywhere;
}

/* ---------- Documents (legal, support): the same system, calm ---------- */
.doc-head {
  padding-block: 56px 8px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.doc-head h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
}
.crumbs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs a {
  color: var(--lime);
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}
.crumbs [aria-hidden] {
  color: var(--faint);
}
.doc-head.pad-xl {
  padding-block: 96px;
  border-bottom: 0;
}
.doc-meta {
  color: var(--muted);
  font: 400 0.75rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 32px;
}
.doc {
  display: grid;
  gap: 32px;
  padding-block: 32px 96px;
}
@media (min-width: 980px) {
  .doc {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 64px;
  }
  .toc {
    position: sticky;
    top: 24px;
    align-self: start;
  }
}
.toc {
  font-size: 0.9375rem;
  border: 1px solid var(--rule);
  padding: 18px 20px;
}
.toc p {
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 12px;
}
.toc ol {
  margin: 0;
  padding-left: 1.6em;
  display: grid;
  gap: 8px;
}
.toc li::marker {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--lime);
}
.toc a {
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover {
  color: var(--lime);
}
.prose {
  max-width: 70ch;
  min-width: 0;
  overflow-wrap: break-word;
}
.prose h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 16px;
}
.prose > section:first-child > h2 {
  margin-top: 0;
}
.prose h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 1.1875rem;
}
.prose p,
.prose li {
  color: var(--ink);
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
}
.prose li + li {
  margin-top: 6px;
}
.prose li::marker {
  color: var(--lime);
}
.prose .summary {
  background: var(--ground-2);
  border: 1px solid var(--rule);
  padding: 20px 22px;
  margin: 0 0 8px;
}
.prose .summary ul {
  margin: 8px 0 0;
}
.prose .callout {
  border: 1px solid var(--rule-strong);
  background: var(--ground-2);
  padding: 14px 18px;
}
.prose .provider {
  border: 1px solid var(--rule);
  padding: 16px 18px;
  margin: 12px 0;
}
.prose .provider h3 {
  margin-top: 0;
}
.prose .provider p {
  margin: 6px 0 0;
  font-size: 0.97rem;
}
.prose code,
.prose pre {
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.prose pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--ground-2);
  border: 1px solid var(--rule);
  padding: 16px;
  max-height: 26rem;
  overflow: auto;
}
.prose .path {
  font-family: var(--mono);
  font-size: 0.85em;
  border: 1px solid var(--rule);
  padding: 1px 6px;
  white-space: normal;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose td {
  overflow-wrap: anywhere;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
}
.prose th {
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

details.faq {
  border-bottom: 1px solid var(--rule);
  padding-block: 4px;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-block: 14px;
  font-weight: 500;
  font-size: 1.0625rem;
}
details.faq summary::-webkit-details-marker {
  display: none;
}
details.faq summary .icon {
  color: var(--lime);
  transition: transform 0.2s ease;
}
details.faq[open] summary .icon {
  transform: rotate(180deg);
}
details.faq > div {
  padding-bottom: 14px;
}
details.faq > div > :first-child {
  margin-top: 0;
}

.contact-cards {
  display: grid;
  gap: 0;
  margin: 16px 0 8px;
  border: 1px solid var(--rule);
}
@media (min-width: 700px) {
  .contact-cards {
    grid-template-columns: 1fr 1fr;
  }
  .contact-card + .contact-card {
    border-left: 1px solid var(--rule);
  }
}
.contact-card {
  padding: 20px;
}
.contact-card h3 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 8px;
}
.contact-card h3 .icon {
  color: var(--lime);
}
.contact-card p {
  margin: 0;
}

/* ---------- Opening board (built by motion.js, once per session) ---------- */
/* Until the board is built, a plain cover keeps the hero from flashing before it. */
.intro-on:not(.intro-mounted) .page-home::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--ground);
}
.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: var(--ground);
}
.intro-board {
  position: relative;
  width: min(84vw, 70svh, 600px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  transform-origin: 0 0;
  will-change: transform;
}
.intro-board i {
  display: block;
  background: var(--ground-3);
  outline: 1px solid var(--rule);
}
.intro-board i.d {
  background: #22301b;
}
.intro-board i.hit {
  background: var(--lime);
}
.intro-knight {
  position: absolute;
  left: 75%; /* g1 */
  top: 87.5%;
  width: 12.5%;
  height: 12.5%;
  padding: 1.5%;
  fill: var(--lime);
}
.intro-coords {
  position: absolute;
  inset: auto 0 -22px 0;
  display: flex;
  font: 400 0.625rem/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
}
.intro-coords span {
  flex: 1;
  text-align: center;
}
.intro-caption {
  position: absolute;
  left: 0;
  top: -30px;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}
.intro-skip {
  position: fixed;
  right: 16px;
  bottom: 16px;
  pointer-events: auto;
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  font: 400 0.6875rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 12px;
  cursor: pointer;
}
.intro-skip:hover {
  color: var(--lime);
  border-color: var(--lime);
}

/* ---------- Motion (landing page only; reduced motion keeps everything still) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Headline words come into focus one by one. They stay opaque, so the headline is painted at once. */
  .hero-title .w {
    display: inline-block;
    animation: focus-in 0.9s var(--ease-out) both;
  }
  .hero-title .w:nth-child(1) { animation-delay: 0.05s; }
  .hero-title .w:nth-child(2) { animation-delay: 0.11s; }
  .hero-title .w:nth-child(3) { animation-delay: 0.17s; }
  .hero-title .w:nth-child(4) { animation-delay: 0.23s; }
  .hero-title .w:nth-child(5) { animation-delay: 0.29s; }
  .hero-title .w:nth-child(6) { animation-delay: 0.35s; }
  .hero-title .w:nth-child(7) { animation-delay: 0.41s; }
  .hero-title .w:nth-child(8) { animation-delay: 0.47s; }
  .hero-title .w:nth-child(9) { animation-delay: 0.53s; }
  .hero-title .w:nth-child(10) { animation-delay: 0.59s; }
  .hero-title .w:nth-child(n + 11) { animation-delay: 0.65s; }
  .hero-foot,
  .stage-hud {
    animation: focus-in 0.9s var(--ease-out) 0.5s both;
  }
  .hero-board {
    animation: board-in 1.4s var(--ease-out) both;
  }
  /* While the opening board plays, the hero waits behind it. */
  .intro-on .hero-title .w,
  .intro-on .hero-label,
  .intro-on .hero-foot,
  .intro-on .stage-hud,
  .intro-on .hero-board {
    animation-play-state: paused;
  }

  .ticker-track {
    animation: ticker 70s linear infinite;
  }
  .ticker:hover .ticker-track {
    animation-play-state: paused;
  }

  /* Scroll reveals (motion.js adds .motion to <html> and .in when an element comes into view). */
  .motion .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity 0.8s ease,
      transform 0.9s var(--ease-out);
  }
  .motion .reveal.in {
    opacity: 1;
    transform: none;
  }
  .motion .reveal.d1 { transition-delay: 0.1s; }
  .motion .reveal.d2 { transition-delay: 0.2s; }

  /* Moves: the notation slides in from the left edge of its row. */
  .motion .move .move-san {
    transition: transform 1.1s var(--ease-out), clip-path 1.1s var(--ease-out);
    clip-path: inset(0 0 0 0);
  }
  .motion .move.reveal:not(.in) .move-san {
    transform: translateX(-6%);
    clip-path: inset(0 100% 0 0);
  }
  .motion .move-art .icon-draw > * {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease 0.3s;
  }
  .motion .move.reveal:not(.in) .move-art .icon-draw > * {
    stroke-dashoffset: 1;
  }

  /* The giant numerals and glyphs drift against the scroll (motion.js sets --drift). */
  .giant-num,
  .cta-glyph {
    transform: translate3d(0, calc(var(--drift, 0) * 1px), 0);
  }

  /* Board story: Qe4?? and the knight takes it; take back; the arrow draws Nxe5 and the star pops. */
  /* The loop starts 6.2 s in, on the answer (arrow, star, "Best was Nxe5"), then replays the blunder. */
  .board-svg .mv-queen { animation: bs-queen 9s ease-in-out -6.2s infinite; }
  .board-svg .mv-knight { animation: bs-knight 9s ease-in-out -6.2s infinite; }
  .board-svg .sq-blunder { animation: bs-red 9s ease -6.2s infinite; }
  .board-svg .badge-blunder { animation: bs-pop-blunder 9s ease -6.2s infinite; }
  .board-svg .arrow { animation: bs-arrow 9s cubic-bezier(0.5, 0, 0.2, 1) -6.2s infinite; }
  .board-svg .sq-best { animation: bs-green 9s ease -6.2s infinite; }
  .board-svg .badge-best { animation: bs-pop-best 9s ease -6.2s infinite; }
  .board-story .cap-played { animation: bs-cap-played 9s ease -6.2s infinite; }
  .board-story .cap-best { animation: bs-cap-best 9s ease -6.2s infinite; }
  .motion .board-story:not(.in) *,
  .motion .board-story:not(.in) {
    animation-play-state: paused;
  }

  .badge-link img {
    transition: transform 0.2s var(--ease-out);
  }
  .badge-link:hover img {
    transform: translateY(-2px);
  }
  .badge-link:active img {
    transform: scale(0.97);
  }
  .specimen-frame {
    transition: transform 0.5s var(--ease-out), border-color 0.3s ease;
  }
  .specimen:hover .specimen-frame {
    border-color: var(--rule-strong);
    transform: translateY(-4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker {
    overflow-x: auto;
  }
  .row-body {
    animation: none;
  }
}

@keyframes focus-in {
  from {
    transform: translateY(0.3em);
    filter: blur(12px);
  }
  to {
    transform: none;
    filter: blur(0);
  }
}
@keyframes board-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ticker {
  to {
    transform: translateX(-25%);
  }
}
@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bs-queen {
  0%, 8% { transform: translate(0, 0); opacity: 1; }
  16%, 32% { transform: translate(2px, -2px); opacity: 1; }
  35% { transform: translate(2px, -2px); opacity: 0; }
  44% { transform: translate(0, 0); opacity: 0; }
  50%, 100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes bs-knight {
  0%, 26% { transform: translate(0, 0); opacity: 1; }
  33%, 40% { transform: translate(-1px, 2px); opacity: 1; }
  44% { transform: translate(-1px, 2px); opacity: 0; }
  45% { transform: translate(0, 0); opacity: 0; }
  50%, 100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes bs-red {
  0%, 17% { opacity: 0; }
  21%, 40% { opacity: 0.6; }
  45%, 100% { opacity: 0; }
}
@keyframes bs-pop-blunder {
  0%, 18% { opacity: 0; transform: scale(0); }
  22% { opacity: 1; transform: scale(1.3); }
  25%, 40% { opacity: 1; transform: scale(1); }
  44%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes bs-arrow {
  0%, 52% { opacity: 0; transform: scaleX(0); }
  53% { opacity: 1; transform: scaleX(0.02); }
  62%, 90% { opacity: 1; transform: scaleX(1); }
  97%, 100% { opacity: 0; transform: scaleX(1); }
}
@keyframes bs-green {
  0%, 58% { opacity: 0; }
  64%, 90% { opacity: 0.75; }
  97%, 100% { opacity: 0; }
}
@keyframes bs-pop-best {
  0%, 62% { opacity: 0; transform: scale(0); }
  66% { opacity: 1; transform: scale(1.3); }
  69%, 90% { opacity: 1; transform: scale(1); }
  97%, 100% { opacity: 0; transform: scale(1); }
}
@keyframes bs-cap-played {
  0%, 14% { opacity: 0; transform: translateY(6px); }
  20%, 42% { opacity: 1; transform: none; }
  47%, 100% { opacity: 0; transform: none; }
}
@keyframes bs-cap-best {
  0%, 54% { opacity: 0; transform: translateY(6px); }
  60%, 92% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: none; }
}

/* =====================================================================================
   First screen: the knight leads. Short headline, one line of copy, a big stage.
   ===================================================================================== */
.hero-title {
  font-size: clamp(2.5rem, 9vw, 3.5rem);
}
.hero-sub {
  display: block;
  margin-top: 0.2em;
  font-size: 0.52em;
  letter-spacing: -0.025em;
  color: var(--muted);
}
.hero-foot .lead {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  max-width: 30em;
}
.knight-stage {
  aspect-ratio: 1 / 1;
}
@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
  }
  .hero-title {
    font-size: clamp(3rem, 4.3vw, 4.5rem);
    margin-bottom: 28px;
  }
  .knight-stage {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    max-height: min(78svh, 760px);
    max-width: min(78svh, 760px);
  }
}
/* HUD labels stay small and quiet. */
.stage-hud .hud {
  color: rgb(124 136 113 / 0.85);
}
.hud-tl {
  color: rgb(197 245 105 / 0.85) !important;
}

/* The scoresheet stays out of the first screen; it arrives with section 2. */
.motion .rail {
  transition:
    opacity 0.4s ease,
    transform 0.35s var(--ease-out),
    visibility 0s linear 0.4s;
  opacity: 0;
  visibility: hidden;
}
.motion.rail-on .rail {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.4s ease,
    transform 0.35s var(--ease-out),
    visibility 0s;
}

/* Free / Pro: three lines each at a glance, the rest behind "+N more". */
.sheet-more summary {
  list-style: none;
  cursor: pointer;
  margin-top: 12px;
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  padding: 8px 0;
}
.sheet-more summary::-webkit-details-marker {
  display: none;
}
.sheet-more[open] summary {
  color: var(--faint);
}
.sheet-more .numbered {
  margin-top: 4px;
  border-top: 0;
}

/* =====================================================================================
   HUD layer: lime hairlines that draw, a reticle on the knight, leader lines, one scan.
   Transform / opacity / stroke-dashoffset only. Static and fully drawn without motion.
   ===================================================================================== */
.board-lines,
.file-lines {
  display: none;
}
.motion .hero-board {
  background-image:
    repeating-linear-gradient(to bottom, rgb(197 245 105 / 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse 60% 70% at 72% 45%, rgb(197 245 105 / 0.08), transparent 70%);
  background-size: 100% 100%;
}
.motion .board-lines {
  display: block;
  position: absolute;
  inset: 0;
}
.board-lines i,
.file-lines i {
  position: absolute;
  background: var(--rule);
}
.board-lines .v,
.file-lines i {
  top: 0;
  bottom: 0;
  width: 1px;
  transform-origin: 50% 0;
}
.board-lines .h {
  left: 0;
  right: 0;
  height: 1px;
  transform-origin: 0 50%;
}
.board-lines .v:nth-child(1), .file-lines i:nth-child(1) { left: 12.5%; }
.board-lines .v:nth-child(2), .file-lines i:nth-child(2) { left: 25%; }
.board-lines .v:nth-child(3), .file-lines i:nth-child(3) { left: 37.5%; }
.board-lines .v:nth-child(4), .file-lines i:nth-child(4) { left: 50%; }
.board-lines .v:nth-child(5), .file-lines i:nth-child(5) { left: 62.5%; }
.board-lines .v:nth-child(6), .file-lines i:nth-child(6) { left: 75%; }
.board-lines .v:nth-child(7), .file-lines i:nth-child(7) { left: 87.5%; }
.board-lines .h:nth-child(8) { top: 12.5%; }
.board-lines .h:nth-child(9) { top: 25%; }
.board-lines .h:nth-child(10) { top: 37.5%; }
.board-lines .h:nth-child(11) { top: 50%; }
.board-lines .h:nth-child(12) { top: 62.5%; }
.board-lines .h:nth-child(13) { top: 75%; }
.board-lines .h:nth-child(14) { top: 87.5%; }
.motion .page-home .sec {
  background-image: none;
}
.motion .file-lines {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.motion .sec {
  isolation: isolate;
}
.motion .engine .file-lines i {
  background: rgb(15 22 9 / 0.14);
}

/* The reticle: four corner brackets lock onto the knight; a crosshair follows the pointer. */
.reticle {
  position: absolute;
  inset: 14% 16% 12%;
  pointer-events: none;
}
.rc {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid rgb(197 245 105 / 0.7);
}
.rc-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.rc-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.rc-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.rc-br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.xh {
  position: absolute;
  background: rgb(197 245 105 / 0.22);
}
.xh-x {
  left: -8%;
  right: -8%;
  top: 50%;
  height: 1px;
}
.xh-y {
  top: -8%;
  bottom: -8%;
  left: 50%;
  width: 1px;
}

/* Board story HUD: margin labels, leader lines, the queen's tracked path, the scan line. */
.board-story {
  max-width: 440px;
}
.board-svg {
  outline: 0;
}
.board-svg .board-frame {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 0.03;
}
.board-svg .scan {
  fill: #c5f569;
  opacity: 0;
}
.board-svg .track {
  stroke: #e0553a;
  stroke-width: 0.05;
  stroke-dasharray: 0.03 0.025;
  opacity: 0;
}
.board-svg .lead polyline {
  fill: none;
  stroke-width: 0.03;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.board-svg .lead circle {
  stroke: none;
}
.board-svg .lead text {
  font: 400 0.34px var(--mono);
}
.board-svg .lead-bad polyline { stroke: var(--bad); }
.board-svg .lead-bad circle,
.board-svg .lead-bad text { fill: var(--bad); }
.board-svg .lead-best polyline { stroke: var(--lime); }
.board-svg .lead-best circle,
.board-svg .lead-best text { fill: var(--lime); }
.board-svg .lead-bad {
  opacity: 0;
}
.scan-status {
  display: grid;
  margin: 0 0 12px;
  font: 400 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scan-status .st {
  grid-area: 1 / 1;
  opacity: 0;
}
.scan-status .st-scan,
.scan-status .st-scan2 {
  color: var(--muted);
}
.scan-status .st-bad {
  color: var(--bad);
}
.scan-status .st-best {
  color: var(--lime);
  opacity: 1;
}

/* Specimens: a leader from the figure label up to the plate, a node dot at each end. */
.specimen figcaption span:first-child {
  position: relative;
  padding-left: 12px;
}
.specimen figcaption span:first-child::before {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 0.6em;
  width: 1px;
  height: 24px;
  background: var(--lime);
  transform-origin: 50% 100%;
}
.specimen figcaption span:first-child::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: calc(0.6em - 2px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
}

@media (prefers-reduced-motion: no-preference) {
  /* Lines draw themselves: the hero's after the opening board, each section's as it arrives. */
  .motion .board-lines i {
    animation: draw-v 1.1s var(--ease-out) both;
  }
  .motion .board-lines .h {
    animation-name: draw-h;
  }
  .motion .board-lines i:nth-child(1), .motion .board-lines i:nth-child(8) { animation-delay: 0.1s; }
  .motion .board-lines i:nth-child(2), .motion .board-lines i:nth-child(9) { animation-delay: 0.16s; }
  .motion .board-lines i:nth-child(3), .motion .board-lines i:nth-child(10) { animation-delay: 0.22s; }
  .motion .board-lines i:nth-child(4), .motion .board-lines i:nth-child(11) { animation-delay: 0.28s; }
  .motion .board-lines i:nth-child(5), .motion .board-lines i:nth-child(12) { animation-delay: 0.34s; }
  .motion .board-lines i:nth-child(6), .motion .board-lines i:nth-child(13) { animation-delay: 0.4s; }
  .motion .board-lines i:nth-child(7), .motion .board-lines i:nth-child(14) { animation-delay: 0.46s; }
  .intro-on .board-lines i,
  .intro-on .hero-board li,
  .intro-on .reticle *,
  .intro-on .hero-sweep {
    animation-play-state: paused;
  }
  .motion .file-lines i {
    transform: scaleY(0);
    transition: transform 1.3s var(--ease-out);
  }
  .motion .file-lines.in i {
    transform: none;
  }
  .motion .file-lines i:nth-child(2) { transition-delay: 0.06s; }
  .motion .file-lines i:nth-child(3) { transition-delay: 0.12s; }
  .motion .file-lines i:nth-child(4) { transition-delay: 0.18s; }
  .motion .file-lines i:nth-child(5) { transition-delay: 0.24s; }
  .motion .file-lines i:nth-child(6) { transition-delay: 0.3s; }
  .motion .file-lines i:nth-child(7) { transition-delay: 0.36s; }

  /* Coordinates type in, one character at a time, like a terminal. */
  .motion .hero-board li {
    animation: type-in 0.01s steps(1) both;
  }
  .motion .hero-board .files li:nth-child(1) { animation-delay: 0.5s; }
  .motion .hero-board .files li:nth-child(2) { animation-delay: 0.56s; }
  .motion .hero-board .files li:nth-child(3) { animation-delay: 0.62s; }
  .motion .hero-board .files li:nth-child(4) { animation-delay: 0.68s; }
  .motion .hero-board .files li:nth-child(5) { animation-delay: 0.74s; }
  .motion .hero-board .files li:nth-child(6) { animation-delay: 0.8s; }
  .motion .hero-board .files li:nth-child(7) { animation-delay: 0.86s; }
  .motion .hero-board .files li:nth-child(8) { animation-delay: 0.92s; }
  .motion .hero-board .ranks li:nth-child(1) { animation-delay: 0.98s; }
  .motion .hero-board .ranks li:nth-child(2) { animation-delay: 1.04s; }
  .motion .hero-board .ranks li:nth-child(3) { animation-delay: 1.1s; }
  .motion .hero-board .ranks li:nth-child(4) { animation-delay: 1.16s; }
  .motion .hero-board .ranks li:nth-child(5) { animation-delay: 1.22s; }
  .motion .hero-board .ranks li:nth-child(6) { animation-delay: 1.28s; }
  .motion .hero-board .ranks li:nth-child(7) { animation-delay: 1.34s; }
  .motion .hero-board .ranks li:nth-child(8) { animation-delay: 1.4s; }

  /* One slow scan line passes down the hero every 9 s. */
  .hero-sweep {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgb(197 245 105 / 0.55) 30%, rgb(197 245 105 / 0.55) 70%, transparent);
    opacity: 0;
    animation: sweep-down 9s linear 2.2s infinite;
  }

  /* Reticle: corners snap in once, then the crosshair drifts until the pointer takes it. */
  .motion .rc {
    animation: lock-on 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) 0.9s both;
  }
  .motion .rc-tl { --dx: -14px; --dy: -14px; }
  .motion .rc-tr { --dx: 14px; --dy: -14px; }
  .motion .rc-bl { --dx: -14px; --dy: 14px; }
  .motion .rc-br { --dx: 14px; --dy: 14px; }
  .motion .xh {
    transition: transform 0.25s var(--ease-out);
  }
  .motion .reticle:not(.tracking) .xh-x {
    animation: drift-y 7s ease-in-out 1.6s infinite;
  }
  .motion .reticle:not(.tracking) .xh-y {
    animation: drift-x 9s ease-in-out 1.6s infinite;
  }
  .glitch {
    display: inline-block;
    animation: glitch 7s steps(1) 3s infinite;
  }

  /* Board story HUD, on the same 9 s loop as the moves (and the same -6.2 s start). */
  .board-svg .scan { animation: bs-scan 9s linear -6.2s infinite; }
  .board-svg .track { animation: bs-track 9s linear -6.2s infinite; }
  .board-svg .lead-bad { animation: bs-lead-bad-o 9s ease -6.2s infinite; }
  .board-svg .lead-bad polyline { animation: bs-lead-bad 9s ease -6.2s infinite; }
  .board-svg .lead-best { animation: bs-lead-best-o 9s ease -6.2s infinite; }
  .board-svg .lead-best polyline { animation: bs-lead-best 9s ease -6.2s infinite; }
  .scan-status .st-scan { animation: st-scan 9s steps(1) -6.2s infinite; }
  .scan-status .st-bad { animation: st-bad 9s steps(1) -6.2s infinite; }
  .scan-status .st-scan2 { animation: st-scan2 9s steps(1) -6.2s infinite; }
  .scan-status .st-best { animation: st-best 9s steps(1) -6.2s infinite; }

  /* Specimen leaders draw up to their plate as the plate arrives. */
  .motion .specimen figcaption span:first-child::before {
    transition: transform 0.8s var(--ease-out) 0.4s;
  }
  .motion .reveal:not(.in) .specimen figcaption span:first-child::before,
  .motion .specimen.reveal:not(.in) figcaption span:first-child::before {
    transform: scaleY(0);
  }

  /* Anything looping pauses while it is off screen (motion.js sets .paused). */
  .paused,
  .paused *,
  .hero-off .hero-sweep,
  .hero-off .reticle *,
  .hero-off .glitch,
  .hero-off .ticker-track {
    animation-play-state: paused !important;
  }
}

@keyframes draw-v {
  from { transform: scaleY(0); }
  to { transform: none; }
}
@keyframes draw-h {
  from { transform: scaleX(0); }
  to { transform: none; }
}
@keyframes type-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sweep-down {
  0% { transform: translateY(0); opacity: 0; }
  4% { opacity: 1; }
  40% { transform: translateY(calc(100svh - 120px)); opacity: 0.8; }
  44%, 100% { transform: translateY(calc(100svh - 120px)); opacity: 0; }
}
@keyframes lock-on {
  from { opacity: 0; transform: translate(var(--dx), var(--dy)); }
  to { opacity: 1; transform: none; }
}
@keyframes drift-y {
  0%, 100% { transform: translateY(-18%); }
  50% { transform: translateY(14%); }
}
@keyframes drift-x {
  0%, 100% { transform: translateX(-12%); }
  50% { transform: translateX(16%); }
}
@keyframes glitch {
  0%, 91%, 100% { opacity: 1; transform: none; }
  92% { opacity: 0.3; transform: translateX(2px); }
  93% { opacity: 1; transform: translateX(-1px); }
  94% { opacity: 0.5; transform: none; }
}
@keyframes bs-scan {
  0% { transform: translateY(0); opacity: 0; }
  1% { opacity: 0.9; }
  14% { transform: translateY(7.96px); opacity: 0.9; }
  15%, 45% { transform: translateY(7.96px); opacity: 0; }
  46% { transform: translateY(0); opacity: 0.9; }
  56% { transform: translateY(7.96px); opacity: 0.9; }
  57%, 100% { transform: translateY(7.96px); opacity: 0; }
}
@keyframes bs-track {
  0%, 8% { opacity: 0; stroke-dashoffset: 0; }
  9% { opacity: 1; }
  40% { opacity: 1; stroke-dashoffset: -0.6; }
  44%, 100% { opacity: 0; stroke-dashoffset: -0.6; }
}
@keyframes bs-lead-bad-o {
  0%, 21% { opacity: 0; }
  22%, 42% { opacity: 1; }
  45%, 100% { opacity: 0; }
}
@keyframes bs-lead-bad {
  0%, 22% { stroke-dashoffset: 1; }
  28%, 100% { stroke-dashoffset: 0; }
}
@keyframes bs-lead-best-o {
  0%, 63% { opacity: 0; }
  64%, 92% { opacity: 1; }
  97%, 100% { opacity: 0; }
}
@keyframes bs-lead-best {
  0%, 64% { stroke-dashoffset: 1; }
  70%, 100% { stroke-dashoffset: 0; }
}
@keyframes st-scan {
  0% { opacity: 1; }
  15%, 100% { opacity: 0; }
}
@keyframes st-bad {
  0% { opacity: 0; }
  18% { opacity: 1; }
  45%, 100% { opacity: 0; }
}
@keyframes st-scan2 {
  0% { opacity: 0; }
  46% { opacity: 1; }
  58%, 100% { opacity: 0; }
}
@keyframes st-best {
  0% { opacity: 0; }
  60% { opacity: 1; }
  95%, 100% { opacity: 0; }
}

/* =====================================================================================
   The app's board: default "signal" palette and shaded "rounded" pieces (src/pieces.mjs).
   ===================================================================================== */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.board-svg .sq-l { fill: #e8e8df; }
.board-svg .sq-d { fill: #b7bbae; }
.board-svg .sq-blunder { fill: #9c3c2d; }
.board-svg .sq-best { fill: #cdea8a; }
.board-svg .arrow line { stroke: #43561e; }
.board-svg .arrow polygon { fill: #43561e; }
.board-svg .badge-blunder circle { fill: #9c3c2d; }
.board-svg .badge-best circle { fill: #3e7a14; }

/* Each section's move tag names the section, in the same mono line. */
.tag-label {
  margin-left: 0.9em;
  padding-left: 0.9em;
  border-left: 1px solid var(--rule-strong);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  word-spacing: 0;
  color: var(--muted);
}
/* On the lime band the highlighted words are ink, underlined, not lime on lime. */
.engine .hl {
  color: var(--lime-ink);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}
.engine .tag-label {
  color: var(--lime-ink);
  border-color: rgb(15 22 9 / 0.35);
}

/* =====================================================================================
   Desktop: one section = one screen. Sizes follow the viewport height as well as the width,
   so every section fits from 1280 x 720 to 1920 x 1080 with room around it.
   ===================================================================================== */
@media (min-width: 980px) {
  .sec {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(56px, 8svh, 104px);
  }
  .sec > .wrap {
    width: 100%;
  }
  .sec h2 {
    font-size: clamp(2rem, min(4.2vw, 7.4svh), 4.25rem);
  }
  /* Headline left, its one line of copy right, on the same baseline grid. */
  .sec-head {
    margin-bottom: clamp(20px, 4svh, 48px);
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    column-gap: 48px;
    align-items: end;
    max-width: none;
  }
  .sec-head h2 {
    margin-bottom: 0;
  }
  .sec-head .lead {
    max-width: 26em;
    padding-bottom: 0.4em;
  }
  .board-story figcaption {
    display: none;
  }
  .sheet header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
  }
  .sheet header .sheet-glyph {
    grid-row: span 2;
    margin: 0;
  }
  .sheet-col {
    padding-block: clamp(18px, 3svh, 32px);
  }
  .sheet .numbered {
    margin-top: clamp(12px, 2svh, 22px);
  }
  .sheet .numbered li {
    padding-block: clamp(6px, 1.1svh, 12px);
  }
  .fine {
    font-size: 0.8125rem;
    margin-top: 14px;
  }
  .hero-grid {
    min-height: calc(100svh - var(--header-h) - 46px);
  }

  .move-text {
    padding-top: 0;
  }

  /* Review: the giant 10 and the two plates sized by height. */
  .giant-num {
    font-size: clamp(9rem, min(24vw, 30svh), 24rem);
  }
  .review-plates .specimen {
    max-width: min(260px, 27svh);
  }
  .review-plates .specimen-sm {
    max-width: min(210px, 22svh);
  }
  .review-plates {
    padding-top: 0;
    justify-content: flex-end;
  }

  /* The index: every row and the open plate inside one screen. */
  .row-word {
    font-size: clamp(2rem, min(5.4vw, 7svh), 4.75rem);
  }
  .row summary {
    padding-block: clamp(4px, 0.8svh, 10px);
  }
  .index {
    min-height: calc(min(230px, 24svh) * 2.02 + 150px);
  }
  .row-body .specimen,
  .row-body .row-art {
    max-width: min(230px, 24svh);
  }
  .row-body {
    padding-top: 0;
  }

  .engine-drawing {
    max-width: min(380px, 46svh);
  }
}
/* Short laptop screens (1280 x 720 and similar): the same layout, a size smaller. */
@media (min-width: 980px) and (max-height: 820px) {
  .sec-head {
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  }
  .sec h2 {
    font-size: clamp(2rem, min(4vw, 6.4svh), 3.5rem);
  }
  .move-text h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }
  .move-text p {
    font-size: 0.9375rem;
  }
  .sheet h3 {
    font-size: 1.75rem;
  }
  .sheet-glyph {
    font-size: 2.75rem;
  }
  .sheet-sub,
  .sheet-price {
    font-size: 0.875rem;
  }
  .plans-sec {
    padding-block: 34px;
  }
  .cta-glyph {
    font-size: clamp(8rem, min(22vw, 40svh), 24rem);
  }
  .cta-knight {
    width: clamp(120px, min(18vw, 28svh), 240px);
  }
}

/* =====================================================================================
   Critique pass: calmer large scale. One visual per section, fewer moving things.
   ===================================================================================== */
.hero-sub {
  font-size: 0.42em;
  letter-spacing: -0.015em;
  margin-top: 0.45em;
}
@media (min-width: 980px) {
  /* Sized so the longest headline (Indonesian) sets in two lines with no word left alone. */
  .hero-title {
    font-size: clamp(2.75rem, 3.8vw, 4.25rem);
  }
  .hero-title .w {
    white-space: nowrap;
  }
}
/* "Coming soon" is a caption under the badges, not a third button. */
.soon-tag {
  flex-basis: 100%;
  border: 0;
  padding: 0;
  font-size: 0.625rem;
  color: var(--muted);
  opacity: 1;
}
.engine-points li {
  grid-template-columns: 30px minmax(0, 1fr);
}
/* How it works: the three moves as a list beside the one board that shows them. */
.how-grid .board-story {
  margin: 40px 0 0;
  max-width: 420px;
}
@media (min-width: 980px) {
  .how-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, min(46svh, 460px));
    gap: clamp(40px, 5vw, 88px);
    align-items: center;
  }
  .how-grid .moves {
    display: block;
  }
  .how-grid .move {
    grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
    align-items: baseline;
    gap: 24px;
    padding: clamp(14px, 2.4svh, 26px) 0;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
  .how-grid .move-san {
    font-size: clamp(2.5rem, min(4vw, 7.5svh), 4.75rem);
  }
  .how-grid .board-story {
    margin: 0;
    max-width: none;
    width: 100%;
  }
}
@media (min-width: 980px) and (max-height: 820px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 40svh);
  }
  .how-grid .move {
    padding-block: 10px;
  }
  .how-grid .move-san {
    font-size: 6.4svh;
  }
  .plans-sec {
    padding-block: 22px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .ticker-track {
    animation-duration: 140s;
  }
  .motion .reticle:not(.tracking) .xh-x,
  .motion .reticle:not(.tracking) .xh-y {
    animation: none;
  }
  /* The hero's entrance runs only once motion.js says go (.hero-go). Until then, and forever if
     the script fails or a timer stalls, the hero is simply sharp, visible and still. */
  html:not(.hero-go) .hero-title .w,
  html:not(.hero-go) .hero-foot,
  html:not(.hero-go) .stage-hud,
  html:not(.hero-go) .hero-board,
  html:not(.hero-go) .board-lines i,
  html:not(.hero-go) .hero-board li,
  html:not(.hero-go) .rc {
    animation: none;
  }
  .hero-title .w {
    animation-duration: 0.6s;
  }
  /* Ended for certain by a timer (motion.js), so nothing can stay blurred or hidden. */
  .hero-done .hero-title .w,
  .hero-done .hero-foot,
  .hero-done .stage-hud,
  .hero-done .hero-board,
  .hero-done .board-lines i,
  .hero-done .hero-board li,
  .hero-done .rc {
    animation: none;
  }
  .motion .reveal.settled,
  .motion .move.reveal.settled .move-san {
    transition: none;
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .motion .file-lines.settled i {
    transition: none;
    transform: none;
  }
}

/* The scoresheet navigation never covers the hero: it shows only once motion.js has measured
   that the hero has left the screen (.rail-on), whatever the scroll position on load. */
.rail {
  opacity: 0;
  visibility: hidden;
}
.rail-on .rail {
  opacity: 1;
  visibility: visible;
}
@media (max-width: 1199px) {
  .rail {
    transform: translateY(100%);
  }
  .rail-on .rail {
    transform: none;
  }
}
