/* londonsystemchess.com: the home page. Shared pieces live in site.css. */

/* Hero ------------------------------------------------------------- */
.hero { position: relative; padding: clamp(32px, 4.5vw, 64px) 0 clamp(40px, 5vw, 72px); overflow: hidden; overflow: clip; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-areas: "head stage" "rest stage"; column-gap: clamp(24px, 4vw, 56px); row-gap: 26px;
}
.hero-head { grid-area: head; align-self: end; }
.hero-rest { grid-area: rest; align-self: start; }
/* A touch under the site's h1 size, so "London System" and "in a bowler hat." each keep a line of their own. */
.hero h1 { max-width: 9.6em; font-size: clamp(42px, 5vw, 72px); }
.essentials { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; font: 600 15.5px/1.3 var(--text); }
/* Each item carries its separator in front; the one that starts a line is clipped, so a wrap never dangles. */
.essentials { margin-left: -22px; clip-path: inset(-6px -6px -6px 22px); }
.essentials li { white-space: nowrap; }
.essentials li::before { content: "·"; display: inline-block; width: 22px; text-align: center; font-weight: 800; }

.stage {
  grid-area: stage; align-self: center; position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bubble bertie" "grades grades";
  align-items: center; gap: 22px 14px; --spin: 0deg;
}
.stage-bertie { grid-area: bertie; position: relative; width: clamp(250px, 28.5vw, 412px); }
.stage-bertie::before {
  content: ""; position: absolute; left: 50%; top: 54%; width: 158%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--spin));
  background: repeating-conic-gradient(from 4deg, var(--yellow-deep) 0deg 9deg, transparent 9deg 22.5deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); mask: radial-gradient(closest-side, #000 30%, transparent 100%);
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.stage-bertie bertie-coach { position: relative; display: block; width: 100%; }
.stage-bertie bertie-coach.cut { filter: url(#cut-lg); }
.bubble-hero { grid-area: bubble; margin-right: 8px; container-type: inline-size; }
@media (min-width: 1101px) { .stage-bertie { margin-left: -64px; } }

.say-stack { display: grid; }
.say { grid-area: 1 / 1; visibility: hidden; }
.say.is-on { visibility: visible; }
.say-head { display: flex; align-items: center; gap: 10px; font: 700 24px/1.15 var(--display); font-stretch: 94%; margin-bottom: 8px; }
.say-body { font-size: 17px; line-height: 1.5; }
.w { display: inline-block; }
.say.is-typing .w, .say.is-typing .w-el { animation: word-in .34s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 26ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }

.next { margin-top: 16px; padding-top: 14px; border-top: 2.5px dashed var(--ink); }
.next-label { font: 600 13.5px/1.35 var(--text); color: var(--ink-soft); margin-bottom: 9px; }
.next-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.next-row li { border: 2px solid var(--ink); border-radius: 11px; text-align: center; padding: 5px 2px 7px; font: 600 14px/1.15 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; transition: background-color .25s ease; }
.next-row b { display: block; font-size: 17px; font-weight: 700; }
.next-row li.is-on { background: var(--c); }
@container (max-width: 250px) { .next-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grades-wrap { grid-area: grades; display: grid; justify-items: center; gap: 10px; }
.grades-hint { font: 600 16px/1 var(--display); display: flex; align-items: center; gap: 8px; }
.grades-hint svg { width: 34px; height: 22px; }
.grades { display: flex; justify-content: center; gap: clamp(10px, 2.2vw, 26px); }
.sticker {
  appearance: none; background: none; border: 0; margin: 0; padding: 4px 2px 0; cursor: pointer; color: var(--ink);
  display: grid; justify-items: center; gap: 10px; font: 600 16px/1 var(--display); -webkit-tap-highlight-color: transparent;
}
.sticker:nth-child(1) { --rot: -7deg; --n: 0; }
.sticker:nth-child(2) { --rot: 5deg; --n: 1; }
.sticker:nth-child(3) { --rot: -3deg; --n: 2; }
.sticker:nth-child(4) { --rot: 7deg; --n: 3; }
.sticker-art { display: block; animation: nudge .9s cubic-bezier(.3, 1.4, .5, 1) 1 both; animation-delay: calc(1.2s + var(--n) * 110ms); }
.sticker svg {
  display: block; width: clamp(74px, 8vw, 108px); height: auto; overflow: visible; rotate: var(--rot);
  filter: drop-shadow(4px 5px 0 var(--ink)); transition: transform .2s cubic-bezier(.3, 1.5, .5, 1), filter .2s ease;
}
.sticker .cut { fill: var(--ink); stroke: var(--ink); stroke-width: 19; stroke-linejoin: round; }
.sticker .margin { fill: var(--paper); stroke: var(--paper); stroke-width: 13; stroke-linejoin: round; }
.sticker .face { fill: var(--c); stroke: var(--ink); stroke-width: 4.5; stroke-linejoin: round; }
.sticker .glyph { font: 700 46px/1 var(--display); fill: var(--ink); text-anchor: middle; dominant-baseline: central; letter-spacing: 1px; }
.sticker:hover svg { transform: translate(-2px, -4px) rotate(-4deg); filter: drop-shadow(6px 9px 0 var(--ink)); }
.sticker:active svg, .sticker[aria-pressed="true"] svg { transform: translate(3px, 4px); filter: drop-shadow(1px 1px 0 var(--ink)); }
.sticker-name { padding: 5px 11px 6px; border-radius: 999px; transition: background-color .2s ease, color .2s ease; }
.sticker[aria-pressed="true"] .sticker-name { background: var(--ink); color: var(--paper); }
.sticker:focus-visible { outline: none; }
.sticker:focus-visible .sticker-name { outline: 3px solid var(--ink); outline-offset: 2px; }
@keyframes nudge { 0%, 100% { transform: none; } 35% { transform: translateY(-10px) rotate(-5deg); } 65% { transform: translateY(1px) rotate(2deg); } }

/* Problem and promise ---------------------------------------------- */
.why { padding: var(--section) 0; }
.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.why-copy .lead { margin-top: 20px; }
.scoresheet { margin: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet { position: relative; flex: 0 1 360px; min-width: 0; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 20px; padding: 18px 22px 22px; transform: rotate(-2.5deg); }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; font: 600 14px/1.3 var(--text); color: var(--ink-soft); padding-bottom: 10px; border-bottom: var(--stroke) solid var(--ink); }
.sheet-moves { list-style: none; margin: 0; padding: 0; font: 600 25px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.sheet-moves li { display: grid; grid-template-columns: 1.6em 1fr 1fr; align-items: center; padding: 8px 0; border-bottom: 2px dashed rgba(18, 19, 20, .28); }
.sheet-moves .n { font-size: 17px; color: var(--ink-soft); }
.sheet-moves li:nth-child(2) > :not(.n) { opacity: .72; }
.sheet-moves li:nth-child(3) > :not(.n) { opacity: .46; }
.sheet-moves li:nth-child(4) > :not(.n) { opacity: .24; filter: blur(.6px); }
.sheet-moves li.gone { border-bottom: 0; }
.sheet-moves .blank { grid-column: 2 / 4; height: 3px; background: var(--ink); border-radius: 2px; align-self: end; margin-bottom: 10px; width: 74%; }
.scoresheet bertie-coach { width: clamp(128px, 13vw, 176px); flex: none; margin: 0 0 -10px -26px; position: relative; }

.promise { margin-top: clamp(56px, 7vw, 104px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: center; }
.promise h3 { font-size: clamp(28px, 3vw, 42px); font-weight: 700; font-stretch: 92%; line-height: 1.05; }
.promise .lead { margin-top: 16px; }
.more-link { display: inline-block; margin-top: 20px; font: 600 18px/1.3 var(--display); text-decoration-thickness: 2.5px; }
.replies-box { display: grid; gap: 14px; }
.replies-label { font: 600 17px/1.2 var(--display); }
.replies { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.replies li {
  display: inline-flex; align-items: center; gap: 9px; background: var(--paper); border: 2.5px solid var(--ink);
  border-radius: 999px; padding: 8px 16px 9px 9px; font: 600 19px/1 var(--display); white-space: nowrap;
}
.replies li::before { content: ""; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--mint) var(--tick) center / 15px no-repeat; }
.replies li.more { background: transparent; border-style: dashed; padding-left: 16px; }
.replies li.more::before { display: none; }

/* Stage tags: the three stages of the method ----------------------- */
.step-tag { display: inline-flex; align-items: center; gap: 9px; font: 600 17px/1 var(--display); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; padding: 7px 15px 8px 8px; transform: rotate(-2deg); margin-bottom: 20px; }
.step-tag i { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--c, var(--mint)); }

/* Learn ------------------------------------------------------------ */
/* The free guide: a sheet from it, with the London in four pictures. */
.guide-teaser { padding: 0 0 var(--section); }
.guide-sheet {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px clamp(28px, 4.5vw, 64px); align-items: center;
  background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 30px; padding: clamp(24px, 3.8vw, 52px);
}
.guide-sheet h2 { font-size: clamp(32px, 3.6vw, 50px); }
.guide-sheet .lead { margin-top: 16px; }
.guide-sheet .ticks a { font-weight: 600; }
.guide-sheet .cta-row { margin-top: 26px; }
.guide-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.guide-boards figcaption { font-size: 14px; }
.guide-boards .moves { font-size: 16px; }

.learn { padding: var(--section) 0; }
.learn-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(32px, 6vw, 96px); align-items: center; }
.learn-copy .lead { margin-top: 20px; }
.facts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; max-width: 32em; }
.facts li { position: relative; padding-left: 38px; font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.facts li strong { display: block; font: 600 19px/1.25 var(--display); color: var(--ink); margin-bottom: 2px; }
.facts li::before { content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 8px; border: 2.5px solid var(--ink); background: var(--paper); transform: rotate(-8deg); }
.facts li::after { content: ""; position: absolute; left: 8px; top: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }

.lesson-card { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 30px; padding: clamp(14px, 2vw, 24px); }
.lesson-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin: 2px 4px 14px; }
.lesson-top h3 { font-size: 22px; }
.lesson-meta { font: 600 14.5px/1.3 var(--text); color: var(--ink-soft); }
.lesson-board { border: var(--stroke) solid var(--ink); border-radius: 14px; overflow: hidden; --board-font: var(--display); background: var(--ink); aspect-ratio: 1; }
.lesson-moves { font: 600 21px/1.3 var(--display); min-height: 1.3em; margin: 12px 6px 2px; color: var(--ink); }
.your-move { display: inline-block; font: 600 14px/1 var(--display); color: var(--paper); background: var(--ink); border-radius: 999px; padding: 5px 11px 6px; vertical-align: 3px; }
.coach-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 10px; }
.coach-row bertie-coach { width: clamp(96px, 10vw, 128px); }
.bubble-coach { background: var(--yellow); min-height: 118px; display: flex; align-items: center; padding: 14px 18px; border-radius: 22px; }
.bubble-coach p { font-size: 16.5px; line-height: 1.45; }
.lesson-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 2px 2px; }

/* Remember --------------------------------------------------------- */
.remember { padding: var(--section) 0; }
.remember-grid { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.phone { margin: 0; justify-self: center; width: min(100%, 308px); }
.phone img { display: block; width: 100%; height: auto; filter: drop-shadow(9px 11px 0 var(--ink)); }
.phone.tilt-left img { transform: rotate(-3deg); }
.phone.tilt-right img { transform: rotate(3deg); }
.remember-copy .lead { margin-top: 20px; }
.rulebook { margin-top: 30px; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 24px; padding: 20px clamp(16px, 2vw, 24px) 22px; }
.rulebook-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.rulebook-head h3 { font-size: 21px; }
.rulebook-head p { font-size: 15px; color: var(--ink-soft); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rules li { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 11px 0; border-top: 2px dashed rgba(18, 19, 20, .28); }
.rules li:first-child { border-top: 0; padding-top: 2px; }
.rules .sym { min-width: 48px; height: 34px; font-size: 19px; }
.rule-title { font: 600 18px/1.2 var(--display); }
.rule-text { display: block; font-size: 15px; line-height: 1.4; color: var(--ink-soft); margin-top: 2px; }
.rule-effect { font: 600 14px/1 var(--display); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 11px 7px; white-space: nowrap; }
.remember-copy .after { margin-top: 20px; font-size: 17px; color: var(--ink-soft); max-width: 36em; }
.nerd { margin-top: 18px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); border-left: 4px solid var(--ink); padding: 2px 0 2px 16px; max-width: 38em; }
.nerd strong { color: var(--ink); font-weight: 700; }
.nerd code { font-family: var(--mono); font-size: 14px; color: var(--ink); white-space: nowrap; }
.nerd var { font-style: italic; color: var(--ink); }

/* The forgetting curves: one position over two months, learned once or with the Commute. */
.curve-sheet { margin-top: clamp(40px, 5vw, 64px); background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 30px; padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 40px) clamp(22px, 3vw, 36px); }
.curve-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px clamp(24px, 4vw, 56px); align-items: end; }
.curve-head h3 { font-size: clamp(25px, 2.5vw, 34px); font-weight: 700; font-stretch: 92%; line-height: 1.05; }
.curve-head p { font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); max-width: 38em; }
.curve-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px clamp(24px, 3.5vw, 48px); align-items: center; margin-top: clamp(22px, 2.8vw, 34px); }
.curve-figure { margin: 0; min-width: 0; }
.curve-key { display: flex; flex-wrap: wrap; gap: 6px 22px; font: 600 15.5px/1.2 var(--display); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; flex: none; width: 26px; }
.key-commute::before { height: 9px; border-radius: 999px; background: var(--mint); border: 2.5px solid var(--ink); }
.key-once::before { height: 0; border-top: 3px dashed var(--ink-soft); }
.curve-chart { height: 290px; margin-top: 12px; touch-action: pan-y; cursor: ew-resize; -webkit-tap-highlight-color: transparent; }
.curve-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cv-grid { stroke: rgba(18, 19, 20, .16); stroke-width: 1.5; }
.cv-target { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 6; }
.cv-tick { font: 500 13px/1 var(--text); fill: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cv-tick.is-target { font-weight: 700; fill: var(--ink); }
.cv-once { fill: none; stroke: var(--ink-soft); stroke-width: 3; stroke-dasharray: 7 7; stroke-linecap: round; }
.cv-case { fill: none; stroke: var(--ink); stroke-width: 8.5; stroke-linejoin: round; stroke-linecap: round; }
.cv-commute { fill: none; stroke: var(--mint); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.cv-stop { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.cv-cursor { stroke: var(--ink); stroke-width: 2; }
.cv-dot { stroke: var(--ink); stroke-width: 2.5; }
.cv-dot.is-commute { fill: var(--mint); }
.cv-dot.is-once { fill: var(--paper); }

.curve-day { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 16px; }
.curve-day-label { font: 600 17px/1 var(--display); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 14px 9px; min-width: 5.4em; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.curve-slider { --k: .35; -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 0; background: transparent; cursor: pointer; }
.curve-slider::-webkit-slider-runnable-track { height: 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--yellow) calc(13px + (100% - 26px) * var(--k)), var(--paper) 0); }
.curve-slider::-moz-range-track { height: 9px; border: 2.5px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--yellow) calc(13px + (100% - 26px) * var(--k)), var(--paper) 0); }
.curve-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; margin-top: -10.5px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); box-shadow: 2px 3px 0 var(--ink); }
.curve-slider::-moz-range-thumb { box-sizing: border-box; width: 30px; height: 30px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); box-shadow: 2px 3px 0 var(--ink); }
.curve-slider:active::-webkit-slider-thumb { background: var(--yellow); box-shadow: 1px 1px 0 var(--ink); }
.curve-slider:active::-moz-range-thumb { background: var(--yellow); box-shadow: 1px 1px 0 var(--ink); }
.curve-slider:focus-visible { outline: none; }
.curve-slider:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }
.curve-slider:focus-visible::-moz-range-thumb { outline: 3px solid var(--ink); outline-offset: 3px; }

.memos { display: grid; gap: 16px; }
.memo { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 18px; align-items: center; border: 2.5px solid var(--ink); border-radius: 22px; padding: 14px 16px 14px 14px; }
/* The board fogs over as recall falls. */
.memo-board { --fog: 0; position: relative; border: 2.5px solid var(--ink); border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #D9DED6; }
.memo-board svg { filter: blur(calc(var(--fog) * 2.4px)); }
.memo-board::after { content: ""; position: absolute; inset: 0; background: var(--paper); opacity: calc(var(--fog) * .66); pointer-events: none; }
.memo-name { font: 600 15.5px/1.2 var(--display); }
/* In a narrow card the name wraps under its line. */
.memo .key { display: block; }
.memo .key::before { display: inline-block; margin-right: 8px; vertical-align: 3px; }
.memo-pct { margin-top: 8px; font: 600 15px/1.3 var(--text); color: var(--ink-soft); }
.memo-pct b { display: block; font: 700 42px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.memo-note { margin-top: 6px; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); }
.curve-sheet .nerd { margin-top: clamp(22px, 2.8vw, 30px); }

.habits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: clamp(56px, 7vw, 96px); }
.habit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 26px; padding: 18px 24px 18px 16px; }
.habit bertie-coach { width: clamp(104px, 10vw, 128px); }
.habit h3 { margin-bottom: 6px; }
.habit p { font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); }
.habit.night { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.habit.night p { color: #D8D3C4; }
.habit.night::after { content: ""; position: absolute; right: 22px; top: 18px; width: 26px; height: 26px; border-radius: 50%; box-shadow: -7px 4px 0 0 var(--yellow); transform: rotate(-10deg); }
.drills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.drill { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 26px; padding: 22px 24px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 22px; align-items: start; }
.drill p { font-size: 16.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 6px; }
.clock { display: grid; justify-items: center; gap: 8px; }
.clock-face { font: 700 40px/1 var(--display); font-variant-numeric: tabular-nums; background: var(--ink); color: var(--yellow); border-radius: 14px; padding: 10px 14px 12px; letter-spacing: .02em; }
.clock-deltas { display: flex; gap: 6px; }
.delta { font: 600 13.5px/1 var(--display); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 8px 5px; white-space: nowrap; }
.delta.plus { background: var(--mint); }
.delta.minus { background: var(--coral); }
.mini-board { width: 132px; border: var(--stroke) solid var(--ink); border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.mini-caption { font: 600 13px/1.2 var(--text); color: var(--ink-soft); text-align: center; margin-top: 6px; max-width: 132px; }

/* Play ------------------------------------------------------------- */
.play { padding: var(--section) 0; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.play-copy .lead { margin-top: 20px; }
.levels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.level { position: relative; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 20px; padding: 16px; display: grid; gap: 4px; }
.level-name { font: 600 19px/1.15 var(--display); }
.level-rating { font: 500 15.5px/1.2 var(--text); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.level-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 8px; }
.level-bar i { height: 8px; border-radius: 3px; border: 1.5px solid var(--ink); }
.level-bar i.on { background: var(--ink); }
.level-free { position: absolute; top: -13px; right: 12px; background: var(--mint); border: 2.5px solid var(--ink); border-radius: 999px; padding: 3px 10px 4px; font: 600 13px/1.1 var(--display); transform: rotate(4deg); }
.levels-note { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }

/* Course: Bertie's map --------------------------------------------- */
.course { padding: var(--section) 0; }
.course-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.course-head .lead { margin-top: 18px; }
.course-bertie { display: flex; align-items: flex-end; gap: 12px; }
.course-bertie bertie-coach { width: 118px; flex: none; }
.course-bertie .bubble { max-width: 230px; font: 600 16px/1.35 var(--display); padding: 12px 16px 14px; border-radius: 20px; margin-bottom: 36px; }
.course-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: clamp(28px, 4vw, 44px); }
.map-sheet { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 28px; padding: 6px clamp(14px, 2.2vw, 26px); }
.zone { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px 18px; align-items: center; padding: 18px 0; border-top: 2.5px dashed rgba(18, 19, 20, .3); }
.zone:first-child { border-top: 0; }
.zone-label { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 11px; align-items: center; }
.zone-num { grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; border: var(--stroke) solid var(--ink); background: var(--yellow); display: grid; place-items: center; font: 700 23px/1 var(--display); }
.zone-name { font: 600 18px/1.1 var(--display); }
.zone-rating { font: 500 14.5px/1.3 var(--text); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.zone-lines { display: flex; flex-wrap: wrap; gap: 12px; }
.line-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 5px 15px 5px 5px; margin: 0;
  font: 600 16.5px/1.1 var(--display); color: var(--ink); background: var(--paper);
  border: 2.5px solid var(--ink); border-radius: 999px; box-shadow: 3px 4px 0 var(--ink); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.line-chip:hover { transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.line-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); transform: translate(3px, 4px); box-shadow: 0 0 0 var(--ink); }
.line-dot { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--paper); border: 6px solid var(--line); box-shadow: 0 0 0 2px var(--ink); display: grid; place-items: center; font: 700 13px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 15px; color: var(--ink-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }

.line-panel { background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 28px; overflow: hidden; }
.panel-band { height: 16px; background: var(--line); border-bottom: var(--stroke) solid var(--ink); }
.panel-body { padding: 18px clamp(16px, 2vw, 26px) 22px; }
.panel-zone { font: 600 14px/1.3 var(--text); color: var(--ink-soft); }
.panel-title { font-size: clamp(26px, 2.4vw, 32px); margin-top: 6px; font-stretch: 94%; }
.panel-sub { font: 600 17px/1.3 var(--display); margin-top: 4px; }
.panel-summary { font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 12px; }
.panel-count { font: 600 15px/1.2 var(--display); margin: 16px 0 10px; }
.stations { list-style: none; margin: 0; padding: 0; position: relative; }
.stations::before { content: ""; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 12px; background: var(--line); border: 2.5px solid var(--ink); border-radius: 8px; }
.stations li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 8px 0 8px 40px; }
.stations li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: var(--stroke) solid var(--ink); }
.st-title { font: 600 16.5px/1.25 var(--display); }
.st-sub { grid-column: 1; font-size: 14px; line-height: 1.35; color: var(--ink-soft); margin-top: 1px; }
.st-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; align-items: center; gap: 6px; font: 600 13.5px/1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag-free { background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 8px 4px; font: 600 13px/1 var(--display); }

/* Game Checkup ----------------------------------------------------- */
.checkup { padding: var(--section) 0; }
.checkup-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.checkup-copy .lead { margin-top: 20px; }
.checkup-bertie { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 22px; margin-top: 36px; max-width: 560px; }
.checkup-bertie bertie-coach { width: clamp(120px, 12vw, 156px); }
.checkup-bertie .bubble p { font: 600 18px/1.4 var(--display); }

/* Extras ----------------------------------------------------------- */
.extras { padding: var(--section) 0; }
.extras .lead { margin-top: 18px; }
.extras-sheet { margin-top: clamp(28px, 4vw, 44px); background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; }
.extra { padding: 24px clamp(18px, 2vw, 28px) 26px; border-right: 2.5px dashed rgba(18, 19, 20, .3); border-bottom: 2.5px dashed rgba(18, 19, 20, .3); }
.extra:nth-child(3n) { border-right: 0; }
.extra:nth-last-child(-n + 3) { border-bottom: 0; }
.extra .ico { width: 44px; height: 44px; display: block; }
.extra h3 { font-size: 20px; margin: 14px 0 6px; }
.extra p { font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); }
.swatches { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.swatches li { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--ink); background: conic-gradient(var(--d) 0 25%, var(--l) 0 50%, var(--d) 0 75%, var(--l) 0) 0 0 / 100% 100%; position: relative; }
.swatches li.premium::after { content: ""; position: absolute; right: -5px; top: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); }

/* Privacy band ----------------------------------------------------- */
.privacy-band { background: var(--green); color: var(--paper); border-block: var(--stroke) solid var(--ink); padding: var(--section) 0; }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 96px); align-items: center; }
.privacy-band h2 { color: var(--paper); }
.privacy-band .lead { color: #E4EFE9; margin-top: 20px; }
.privacy-band .policy { display: inline-block; margin-top: 24px; font: 600 18px/1.2 var(--display); color: var(--paper); text-decoration-thickness: 2.5px; }
.flow { background: var(--paper); color: var(--ink); border: var(--stroke) solid var(--ink); border-radius: 26px; padding: 24px clamp(18px, 2.4vw, 30px) 26px; }
.flow h3 { font-size: 22px; }
.flow > p { font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin-top: 10px; }
.flow-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.flow-node { border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 10px 11px; text-align: center; font: 600 15px/1.2 var(--display); background: var(--paper); }
.flow-node.is-phone { background: var(--yellow); }
.flow-arrow { display: grid; justify-items: center; gap: 2px; font: 600 12.5px/1.1 var(--text); color: var(--ink-soft); text-align: center; }
.flow-arrow svg { width: 38px; height: 14px; }

/* Tickets ---------------------------------------------------------- */
.tickets { padding: var(--section) 0; }
.tickets .lead { margin-top: 18px; }
.ticket-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 26px; margin-top: clamp(28px, 4vw, 44px); align-items: stretch; }
.ticket {
  --stub: 236px; --hole: 15px;
  position: relative; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 24px;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--stub);
  -webkit-mask: radial-gradient(circle var(--hole) at calc(100% - var(--stub) - 1.5px) 0, #0000 97%, #000), radial-gradient(circle var(--hole) at calc(100% - var(--stub) - 1.5px) 100%, #0000 97%, #000);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--hole) at calc(100% - var(--stub) - 1.5px) 0, #0000 97%, #000), radial-gradient(circle var(--hole) at calc(100% - var(--stub) - 1.5px) 100%, #0000 97%, #000);
  mask-composite: intersect;
}
.ticket::before, .ticket::after { content: ""; position: absolute; left: calc(100% - var(--stub) - var(--hole) - 1.5px); width: calc(2 * var(--hole) + 6px); height: calc(2 * var(--hole) + 6px); border-radius: 50%; border: var(--stroke) solid var(--ink); }
.ticket::before { top: calc(-1 * var(--hole) - 6px); }
.ticket::after { bottom: calc(-1 * var(--hole) - 6px); }
.ticket-main { padding: 26px clamp(18px, 2.4vw, 30px) 28px; }
.ticket-stub { border-left: var(--stroke) dashed var(--ink); padding: 26px 22px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.ticket-kicker { font: 600 14.5px/1.2 var(--text); color: var(--ink-soft); margin-top: 6px; }
.ticket h3 { font-size: clamp(30px, 3vw, 40px); font-weight: 700; font-stretch: 92%; }
.ticket-season .ticks li::before { background-color: var(--yellow); }
.ticket-free .ticket-stub { text-align: center; align-items: center; }
.stub-note { font: 600 14px/1.35 var(--text); color: var(--ink-soft); }
.plans { display: grid; gap: 0; align-content: center; }
.plan { padding: 14px 0; border-top: 2.5px dashed rgba(18, 19, 20, .3); }
.plan:first-child { border-top: 0; padding-top: 0; }
.plan:last-child { padding-bottom: 0; }
.plan-name { font: 600 16px/1.2 var(--display); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-price { font: 700 30px/1.05 var(--display); font-variant-numeric: tabular-nums; margin-top: 3px; }
.plan-price span { font: 600 15px var(--text); color: var(--ink-soft); margin-left: 4px; }
.plan-note { font-size: 14px; line-height: 1.4; color: var(--ink-soft); margin-top: 3px; }
.trial { background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px 3px; font: 600 12.5px/1.1 var(--display); }
.fine { margin-top: 22px; font-size: 15px; color: var(--ink-soft); max-width: 48em; }
.fine a { font-weight: 600; color: var(--ink); }

/* FAQ -------------------------------------------------------------- */
.faq { padding: var(--section) 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 40px); }
.faq-head .lead { margin-top: 18px; }
.faq-head bertie-coach { width: 180px; margin-top: 20px; }
.faq-more { margin-top: 6px; font: 600 18px/1.4 var(--display); padding: 4px 4px 0; }

/* Closing ---------------------------------------------------------- */
.closing { padding: calc(var(--section) * .8) 0 var(--section); }
.closing-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.closing bertie-coach { width: clamp(200px, 25vw, 330px); }
.closing h2 { font-size: clamp(38px, 5.4vw, 78px); font-stretch: 88%; line-height: 1; }
.closing h2 span { display: block; color: var(--green); }
.closing .cta-row { margin-top: 32px; }
.closing .essentials { margin-top: 22px; }

/* Responsive ------------------------------------------------------- */
@media (max-width: 1100px) {
  .extras-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .extra:nth-child(3n) { border-right: 2.5px dashed rgba(18, 19, 20, .3); }
  .extra:nth-child(2n) { border-right: 0; }
  .extra:nth-last-child(-n + 3) { border-bottom: 2.5px dashed rgba(18, 19, 20, .3); }
  .extra:last-child { border-bottom: 0; }
  .extra:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .ticket-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "rest"; row-gap: 34px; }
  .hero h1 { max-width: 12em; font-size: clamp(42px, 7vw, 76px); }
  .stage { max-width: 780px; }
}
@media (max-width: 980px) {
  .learn-grid, .remember-grid, .play-grid, .checkup-grid, .privacy-grid, .why-grid, .promise, .faq-grid, .guide-sheet { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
  .remember-grid .phone { order: 2; }
  .curve-head, .curve-grid { grid-template-columns: minmax(0, 1fr); }
  .memos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Side by side, a name on one line and a name on two still leave the two numbers level. */
  .memo-name { min-height: 2.4em; }
  .course-grid { grid-template-columns: minmax(0, 1fr); }
  .course-head { grid-template-columns: minmax(0, 1fr); }
  .faq-head bertie-coach { display: none; }
}
@media (max-width: 760px) {
  .habits, .drills { grid-template-columns: minmax(0, 1fr); }
  .zone { grid-template-columns: minmax(0, 1fr); padding: 16px 0 18px; }
  .extras-sheet { grid-template-columns: minmax(0, 1fr); }
  .extra, .extra:nth-child(3n), .extra:nth-last-child(-n + 3) { border-right: 0; border-bottom: 2.5px dashed rgba(18, 19, 20, .3); }
  .extra:last-child { border-bottom: 0; }
  .extra { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 20px 18px 22px; }
  .extra .ico { grid-row: span 3; }
  .extra h3 { margin: 6px 0 4px; }
  .swatches { grid-column: 2; }
  .ticket { --stub: 0px; grid-template-columns: minmax(0, 1fr); -webkit-mask: none; mask: none; }
  .ticket::before, .ticket::after { display: none; }
  .ticket-stub { border-left: 0; border-top: var(--stroke) dashed var(--ink); padding: 22px 20px 24px; }
  .flow-steps { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .flow-arrow { grid-auto-flow: column; justify-content: center; align-items: center; gap: 8px; }
  .flow-arrow svg { transform: rotate(90deg); width: 30px; }
}
@media (max-width: 640px) {
  /* The four pictures become a row to swipe through. */
  .guide-boards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .guide-boards .diagram { scroll-snap-align: start; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bertie" "bubble" "grades"; gap: 26px; }
  .stage-bertie { justify-self: center; width: min(296px, 78vw); }
  .bubble-hero { margin-right: 0; }
  .bubble-hero.tail-right::before { right: auto; top: -13.5px; left: calc(50% - 12px); transform: rotate(-45deg); }
  .say-head { font-size: 22px; }
  .say-body { font-size: 16.5px; }
  .grades-hint { display: none; }

  .scoresheet { display: block; position: relative; padding-right: 44px; }
  .sheet { padding: 16px 16px 18px; }
  .sheet-moves { font-size: 22px; }
  .scoresheet bertie-coach { position: absolute; right: -4px; bottom: -22px; width: 124px; margin: 0; }

  .coach-row { grid-template-columns: 78px minmax(0, 1fr); gap: 16px; }
  .coach-row bertie-coach { width: 78px; }
  .bubble-coach { min-height: 132px; padding: 12px 14px; }
  .bubble-coach p { font-size: 15.5px; }

  .phone { width: min(100%, 252px); }
  .curve-sheet { border-radius: 24px; }
  .curve-chart { height: 230px; }
  .curve-day { gap: 12px; }
  .curve-day-label { font-size: 16px; padding: 7px 12px 8px; }
  .memos { gap: 12px; }
  .memo { grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; padding: 12px; border-radius: 18px; }
  .memo-name { font-size: 15px; }
  .memo .key::before { width: 18px; margin-right: 7px; }
  .memo-pct { font-size: 14px; }
  .memo-pct b { font-size: 36px; }
  .memo-note { font-size: 13.5px; }
  .rules li { grid-template-columns: 46px minmax(0, 1fr) auto; row-gap: 2px; align-items: start; }
  .rules li > span:nth-child(2) { display: contents; }
  .rules .sym { grid-row: span 2; min-width: 44px; margin-top: 2px; }
  .rule-title { grid-column: 2; align-self: center; }
  .rule-effect { grid-column: 3; grid-row: 1; align-self: center; font-size: 13px; padding: 5px 9px 6px; }
  .rule-text { grid-column: 2 / 4; margin-top: 0; }

  .habit { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 18px 20px 12px; }
  .habit bertie-coach { width: 84px; }
  .habit h3 { font-size: 20px; }
  .habit p { font-size: 15.5px; }
  .habit.night::after { right: 16px; top: 14px; }
  .drill { grid-template-columns: minmax(0, 1fr); padding: 20px 18px 22px; }

  .levels { gap: 14px 12px; }
  .level { padding: 14px 13px; }
  .level-name { font-size: 17.5px; }

  .map-sheet { padding: 4px 14px; }
  .zone-lines { gap: 10px 8px; }
  .line-chip { font-size: 15px; gap: 7px; padding: 4px 12px 4px 4px; box-shadow: 2px 3px 0 var(--ink); }
  .line-dot { width: 28px; height: 28px; border-width: 5px; font-size: 12px; }
  .course-bertie .bubble { margin-bottom: 30px; }

  .checkup-bertie { gap: 16px; }
  .checkup-bertie bertie-coach { width: 112px; }
  .checkup-bertie .bubble p { font-size: 16.5px; }
  .extra { padding: 18px 16px 20px; }
  .closing-grid { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .closing { padding-top: 24px; }
  .closing bertie-coach { width: 190px; margin: -48px 0 -8px; }
}
@media (max-width: 374px) {
  .grades { gap: 6px; }
  .sticker { gap: 8px; font-size: 14.5px; }
  .sticker svg { width: 60px; }
}
