/* Headfake homepage. The look is the pitch deck's: library green, ivory, brass and
   claret, with Cormorant Garamond for display and Jost for text. Every hidden starting
   state sits inside (prefers-reduced-motion: no-preference) and behind .js, so the page
   is complete without the script and without motion. */

/* The typefaces are served from this site (site/fonts/, SIL Open Font License), so no visitor's address goes to Google. */
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/cormorant-garamond-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
  --ivory: #F4EEE1;
  --ivory-2: #E9E1CF;
  --green: #0F2B24;
  --green-2: #183A30;
  --brass: #C9A65E;
  --claret: #571722;
  --soft-on-ivory: #44564D;
  --soft-on-green: #BFCBC1;
  --soft-on-claret: #E6CFC9;
  /* the softer tone a long sentence is set in: the ink's own hue with less saturation and more lightness */
  --ink-soft: hsl(165 18% 34%);
  --ivory-soft: hsl(41 18% 70%);

  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --text: "Jost", "Helvetica Neue", Arial, sans-serif;

  --s-name: clamp(84px, 11.4vw, 196px);
  --s-head: clamp(38px, 5vw, 80px);
  --s-state: clamp(22px, 2.2vw, 32px);
  --s-body: clamp(17px, 0.5vw + 12px, 20px);
  --s-small: 16px;

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(120px, 14vw, 220px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--green); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* No blinking text cursor on the page's own text (a browser in caret mode, F7, draws one wherever the
   reader last clicked). Boxes the reader types in keep theirs. */
html { caret-color: transparent; }
input, textarea, select, [contenteditable] { caret-color: auto; }
body { margin: 0; background: var(--ivory); color: var(--green); font: 400 var(--s-body)/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--green); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* A section's heading on the left edge and its opening sentence on the centre line: the page's two edges. */
.head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.head > h2, .head > h3 { grid-column: 1 / span 6; font-size: var(--s-head); }
.head > p { grid-column: 7 / -1; max-width: 34em; }

/* Focus. A long sentence is set in the softer tone of its own colour, and the words that
   carry it stand in the full ink, so the eye lands on them first. */
[data-focus] { color: var(--ink-soft); }
[data-focus] .hl { color: var(--green); font-weight: 500; }
.statement[data-focus] .hl { font-weight: 600; }
.work [data-focus], .panel [data-focus], .dp-road [data-focus] { color: var(--ivory-soft); }
.work [data-focus] .hl, .panel [data-focus] .hl, .dp-road [data-focus] .hl { color: var(--ivory); }

.statement { font-family: var(--display); font-weight: 500; font-size: var(--s-state); line-height: 1.16; letter-spacing: -0.015em; }

/* ---- Buttons and links ---------------------------------------------------- */
.btn, .signup button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 0;
  background: var(--claret); color: var(--ivory); font: 500 var(--s-body)/1 var(--text); text-decoration: none; cursor: pointer;
  transition: background-color 180ms ease, transform 140ms var(--ease-out); }
.btn:hover, .signup button:hover { background: #6E1D2C; }
.btn:active, .signup button:active { transform: scale(0.97); }

/* ---- Loading screen: a walker from each game crosses it while the first screen arrives.
   It is only shown while the page carries the class "loading", which a line in the head sets
   and takes away again after nine seconds whatever happens. ------------------------------- */
.loader { display: none; }
.loading body { overflow: hidden; }
.loading .loader, .loader.lifting { display: block; position: fixed; z-index: 50; inset: 0; overflow: hidden; background: var(--ivory); color: var(--green); clip-path: inset(0); transition: clip-path 900ms var(--ease-in-out); }
.loader.lifting { clip-path: inset(0 0 100% 0); }
.loader-mark { position: absolute; top: 12px; left: var(--m); }
.loader-mark img, .bar-mark img { display: block; width: auto; height: var(--logo-h); }
.loader-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34svh; background: var(--green); color: var(--ivory); }
.loader-count { position: absolute; left: var(--m); bottom: clamp(16px, 2.4vw, 32px); font: 600 var(--s-name)/0.8 var(--display); letter-spacing: -0.04em; font-variant-numeric: lining-nums tabular-nums; }
.loader-say { position: absolute; left: calc(50% + 12px); right: var(--m); bottom: clamp(20px, 2.6vw, 36px); }
.loader-walk { --wh: clamp(96px, min(24svh, 26vw), 240px); position: absolute; left: 0; bottom: 34svh; display: flex; align-items: flex-end; gap: clamp(4px, 1.6vw, 24px);
  transform: translate3d(calc(var(--load, 0) * (100vw + 100%) - 100%), 0, 0); will-change: transform; }
.walker { display: block; flex: none; width: var(--h); height: var(--h); margin-bottom: calc(var(--h) * -0.022); background-repeat: no-repeat; background-size: auto 100%; }
.walker-raider { --h: var(--wh); background-image: url(../img/walk_raider.webp); animation: walk-4 640ms steps(4) infinite; }
.walker-student { --h: var(--wh); background-image: url(../img/walk_student.webp); animation: walk-4 580ms steps(4) infinite; }
.walker-bisnu { --h: calc(var(--wh) * 0.8); background-image: url(../img/walk_bisnu.webp); animation: walk-24 1700ms steps(24) infinite; }
@keyframes walk-4 { to { background-position: calc(var(--h) * -4) 0; } }
@keyframes walk-24 { to { background-position: calc(var(--h) * -24) 0; } }
@media (prefers-reduced-motion: reduce) {
  .loading .loader, .loader.lifting { transition: opacity 300ms ease; }
  .loader.lifting { clip-path: none; opacity: 0; }
  .loader-walk { left: var(--m); transform: none; }
  .walker { animation: none; }
}

/* ---- Bar ------------------------------------------------------------------- */
.bar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 24px; padding: 20px var(--m); font-size: var(--s-small); font-weight: 400; }
.bar-mark { margin: -8px auto -8px 0; }
.bar-mark, .loader-mark { --logo-h: 56px; }
.bar-links { display: flex; gap: clamp(20px, 3.4vw, 56px); margin-right: clamp(20px, 3.4vw, 56px); }
.bar a { text-decoration: none; }
.bar-links a, .bar-action, .foot-links a { position: relative; padding: 10px 0; }
.bar-links a::after, .bar-action::after, .foot-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 320ms var(--ease-out); }
.bar-links a:hover::after, .bar-action:hover::after, .foot-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.bar-links a[aria-current="page"]::after { transform: scaleX(1); }
.bar-action { font-weight: 500; }
.bar-action::after { transform: scaleX(1); }
.bar-action:hover::after { transform: scaleX(0.4); }
/* The menu button and its sheet belong to the phone's composition, further down. */
.bar-menu { display: none; }
/* The arrows under a sideways row are also the phone's. */
.swipe-nav { display: none; }
/* A word that is true of one layout only: "left" where the halves sit side by side, "upper" where they are stacked. */
.on-phone { display: none; }

/* ---- Hero: the name with a game where its word space would be ------------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 96px var(--m) clamp(24px, 3.4vw, 44px); }
.name { align-self: center; display: flex; align-items: baseline; justify-content: center; gap: 0.16em; font-size: var(--s-name); font-weight: 600; line-height: 0.9; letter-spacing: -0.035em; text-transform: uppercase; white-space: nowrap; }
.name-a, .name-b { display: block; }
.slot { position: relative; display: block; width: 1.9em; height: 0.64em; overflow: hidden; background: var(--green); }
.window-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 700ms ease; }
.window-frame video.on { opacity: 1; }

/* The drawing in the name: ten seconds of gold line on the deep green. A classroom is drawn
   in, ribbons of line drift across it, the three games' worlds are drawn as one line, and the
   class returns at play. Without motion it is the first drawing, still. */
.gold { position: absolute; inset: 0; width: 100%; height: 100%; }
.gold .scene-b, .gold .world, .gold .chalk { opacity: 0; }
.gold .ribbon { stroke: #E3C27C; stroke-width: 2.2; stroke-dasharray: 0.2 0.8; opacity: 0.5; }
.gold .world, .gold .chalk { stroke: var(--brass); stroke-width: 3.2; }
.gold .world { stroke-dasharray: 1; }
.gold .wipe { transform-box: fill-box; transform-origin: 0 50%; }
.gold .chalk { transform-box: fill-box; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) {
  .gold .scene-a { animation: gold-a 10s linear infinite; }
  .gold .wipe-a { animation: gold-wipe-a 10s var(--ease-in-out) infinite; }
  .gold .scene-b { animation: gold-b 10s linear infinite; }
  .gold .wipe-b { animation: gold-wipe-b 10s var(--ease-in-out) infinite; }
  .gold .world { animation: gold-world 10s linear infinite; }
  .gold .ribbon-1 { animation: gold-run 5.2s linear infinite; }
  .gold .ribbon-2 { animation: gold-run 6.8s linear infinite -2s; }
  .gold .ribbon-3 { animation: gold-run 8.4s linear infinite -5s; }
  .gold .chalk-1 { animation: gold-chalk 10s ease-in-out infinite; }
  .gold .chalk-2 { animation: gold-chalk 10s ease-in-out infinite 0.35s; }
  .gold .chalk-3 { animation: gold-chalk 10s ease-in-out infinite 0.7s; }
  /* it waits for the name to open, so the drawing is seen from its first line */
  .js:not(.ready) .gold * { animation-play-state: paused; }
}
@keyframes gold-a { 0%, 40% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes gold-wipe-a { 0% { transform: scaleX(0); } 17%, 100% { transform: scaleX(1); } }
@keyframes gold-b { 0%, 57% { opacity: 0; } 58%, 91% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes gold-wipe-b { 0%, 58% { transform: scaleX(0); } 74%, 100% { transform: scaleX(1); } }
@keyframes gold-world { 0%, 42% { opacity: 1; stroke-dashoffset: 1; } 56% { opacity: 1; stroke-dashoffset: 0; } 60% { opacity: 1; stroke-dashoffset: 0; } 67%, 100% { opacity: 0; stroke-dashoffset: 0; } }
@keyframes gold-run { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes gold-chalk { 0%, 41% { opacity: 0; transform: translateY(8px) rotate(-20deg); } 47% { opacity: 1; } 58% { opacity: 1; } 65%, 100% { opacity: 0; transform: translateY(-14px) rotate(40deg); } }

.hero-foot { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
.fake { grid-column: 1 / span 6; }
/* Two lines. Each begins with words that never change, and the phrase for the game on show
   follows on the same line. The three games' phrases lie in one place, so the longest sets
   the room and nothing moves when one gives way to the next. */
.fake-line { font-family: var(--display); font-weight: 500; font-size: clamp(18px, 1.95vw, 34px); line-height: 1.2; letter-spacing: -0.015em; white-space: nowrap; }
.fake-row { display: flex; align-items: baseline; column-gap: 0.26em; }
.fake-row + .fake-row { margin-top: 0.12em; }
.fake-swap { display: grid; color: var(--claret); }
.fake-swap .v { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 650ms ease, visibility 0s linear 650ms; }
.fake-swap .v.on { opacity: 1; visibility: visible; transition: opacity 900ms ease 300ms, visibility 0s; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pick { min-height: 44px; padding: 0 16px; border: 0; border-radius: 0; background: var(--ivory-2); color: var(--green); font: 400 var(--s-small)/1 var(--text); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.pick:hover { background: #DDD3BC; }
.pick:active { transform: scale(0.97); }
.pick[aria-pressed="true"] { background: var(--green); color: var(--ivory); }
.hero-say { grid-column: 7 / span 4; max-width: 26em; }
.hero .btn { grid-column: 11 / span 2; justify-self: end; }

/* ---- The window: the game in the name, opened to the full width ------------ */
.window { margin: 0; }
.window-frame { position: relative; aspect-ratio: 16 / 9; max-height: 88svh; width: 100%; overflow: hidden; background: var(--green); }
.window figcaption { margin: 12px var(--m) 0; font-size: var(--s-small); }

/* ---- Intro: a sentence that stays while three pictures pass ---------------- */
.intro { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--gap) var(--m) 0; }
.intro-pin { grid-column: 1 / span 6; position: sticky; top: 12svh; align-self: start; padding-bottom: 4svh; }
.intro-title { font-size: var(--s-head); max-width: 7em; }
.intro .statement { margin-top: clamp(24px, 3vw, 44px); max-width: 22em; }
.intro-pics { grid-column: 7 / -1; display: flex; flex-direction: column; gap: 9svh; padding-bottom: 4svh; }
.pic figcaption { margin-top: 12px; max-width: 34em; font-size: var(--s-small); }
.pic-frame { overflow: hidden; background: var(--ivory-2); }
.pic-frame img { width: 100%; height: 100%; object-fit: cover; }
.pic .pic-frame { aspect-ratio: 3 / 2; }

/* ---- Work: each game as two halves, the play and the lesson ---------------- */
.work { margin-top: var(--gap); background: var(--green); color: var(--ivory); position: relative; }
.work-head { padding: clamp(72px, 9vw, 140px) var(--m) 0; }
.game { position: relative; height: 100svh; min-height: 620px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; }
.pane { position: relative; overflow: hidden; }
.pane-l img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; filter: brightness(0.74); transform: translate3d(0, calc(var(--p, 0) * 9%), 0); will-change: transform; }
.pane-r { display: grid; justify-items: center; align-items: end; padding: 0 clamp(16px, 4vw, 64px) max(21svh, 168px); }
.pane-r picture { display: block; }
.pane-r .card { width: auto; max-width: 100%; max-height: 32svh; transform: translate3d(0, calc(var(--p, 0) * -4svh), 0); will-change: transform; }
.game-ratio .pane-r { background: #0A0812; }
.game-pyth .pane-r { background: #22150C; }
.game-dust .pane-r { background: #1B1512; }
.game-ratio { --light: #CFF4FF; }
.game-pyth { --light: #F6DDB1; }
.game-dust { --light: #F4EEE1; }

.seam { position: absolute; z-index: 2; left: 0; right: 0; top: 30%; margin-top: -0.84em; font-size: var(--s-name); font-weight: 700; line-height: 0.84; letter-spacing: -0.04em; text-transform: uppercase; text-align: center; color: var(--light); }
.seam .sr { left: var(--m); }
/* The name is drawn twice from the same words, each copy cut to its own half, so it tears at the seam. */
.seam::before, .seam::after { content: attr(data-a) "\A" attr(data-b); white-space: pre; display: block; }
.seam::before { clip-path: inset(-20% 50% -20% 0); transform: translate3d(0, calc(var(--p, 0) * 12svh), 0); }
.seam::after { position: absolute; inset: 0; clip-path: inset(-20% 0 -20% 50%); transform: translate3d(0, calc(var(--p, 0) * -12svh), 0); }
.cap { position: absolute; z-index: 2; bottom: clamp(20px, 2.4vw, 36px); width: min(40%, 26em); font-size: var(--s-body); line-height: 1.45; color: var(--ivory); }
.cap b { display: block; font-weight: 500; color: var(--light); }
.cap-l { left: var(--m); }
.cap-r { left: calc(50% + var(--m)); }
.game-meta { position: absolute; z-index: 3; top: clamp(20px, 2.4vw, 36px); right: var(--m); display: flex; gap: 20px; align-items: baseline; font-size: var(--s-body); color: var(--ivory); }
.game-meta a { font-weight: 500; color: var(--light); text-underline-offset: 5px; text-decoration-thickness: 2px; padding: 10px 0; transition: text-underline-offset 240ms var(--ease-out); }
.game-meta a:hover { text-underline-offset: 9px; }

/* ---- Scenes: the story game's own paintings, two rows that pass each other -- */
.scenes { padding: clamp(72px, 9vw, 140px) 0 clamp(40px, 4.4vw, 64px); overflow: hidden; }
.scenes-head { padding: 0 var(--m); }
.reel { display: flex; gap: 8px; width: max-content; will-change: transform; }
.reel + .reel { margin-top: 8px; }
.reel img { height: clamp(150px, 21vw, 310px); width: auto; max-width: none; }
.reel-a { transform: translate3d(calc(var(--d, 0) * (100vw - 100%)), 0, 0); }
.reel-b { transform: translate3d(calc((1 - var(--d, 0)) * (100vw - 100%)), 0, 0); }
@media (prefers-reduced-motion: reduce) {
  .reels { overflow-x: auto; }
  .reel-a, .reel-b { transform: none; }
}

/* ---- Homework: where the studio begins. A sentence, a painting of one evening, the three
   things a class table shows beside a working one, and four figures set out like a ledger. ---- */
.hw { padding-top: var(--gap); }
.hw-head { padding: 0 var(--m); }
.hw-head > .statement { align-self: end; }
.hw-field { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start; padding: clamp(56px, 7vw, 110px) var(--m); background: var(--green); color: var(--ivory); }
/* the three points stand beside the table and share its height: the first at its head, the last at its foot */
.hw-points { grid-column: 1 / span 5; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(32px, 3.6vw, 52px); max-width: 30em; }
.hw-point h3 { font-size: var(--s-state); line-height: 1.05; letter-spacing: -0.02em; }
.hw-point p { margin-top: 10px; }

/* The class table is a piece of the product, so it wears the teacher's panel's own colours. */
.match { --a: #0F7A4D; --a-mid: #63B890; --a-track: #CDEBDB; --line: #DFE7E2; --mute: #50605A; --ink: #12201A;
  grid-column: 7 / -1; min-width: 0; padding: clamp(16px, 2vw, 28px); border-radius: 8px; background: #F6FAF8; color: var(--ink); font-size: var(--s-small); line-height: 1.45; }
.match :focus-visible { outline-color: var(--green); }
.match-title { font-family: var(--text); font-weight: 500; font-size: var(--s-state); line-height: 1.1; letter-spacing: -0.01em; }
.match-sub { margin-top: 8px; max-width: 36em; color: var(--mute); }
.match-views { display: none; flex: none; padding: 3px; gap: 2px; border-radius: 8px; background: #E6EDE9; }
.js .match-views { display: flex; margin-top: 16px; }
.match-view { flex: 1 1 0; min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--mute); font: 500 var(--s-small)/1 var(--text); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.match-view:active { transform: scale(0.97); }
.match-view[aria-pressed="true"] { background: #fff; color: var(--ink); }
.match-stage { margin-top: 18px; }
.match-morning { margin-top: 28px; }
/* With the script, the evening and the morning share one place, so the card keeps its height. */
.js .match-stage { display: grid; }
.js .match-stage > * { grid-area: 1 / 1; min-width: 0; margin-top: 0; opacity: 0; visibility: hidden; transition: opacity 260ms ease, visibility 0s linear 260ms; }
.js .match[data-view="evening"] .match-evening, .js .match[data-view="morning"] .match-morning { opacity: 1; visibility: visible; transition: opacity 420ms ease 140ms, visibility 0s; }

/* whichever of the two is shorter lets its rows grow, so neither leaves a hole in the card */
.js .match-evening, .js .match-morning { display: flex; flex-direction: column; }
.js .match-table, .js .match-roll { flex: 1 1 auto; grid-auto-rows: 1fr; }
.match-clock { display: none; }
.js .match-clock { display: block; }
.match-clock label { display: block; font-weight: 500; }
.match-clock input { display: block; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.match-clock input::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--a) var(--fill, 100%), var(--a-track) var(--fill, 100%)); }
.match-clock input::-moz-range-track { height: 8px; border-radius: 4px; background: var(--a-track); }
.match-clock input::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--a); }
.match-clock input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border: 3px solid #fff; border-radius: 50%; background: var(--a); box-shadow: 0 1px 4px rgba(18, 32, 26, 0.3); transition: transform 140ms var(--ease-out); }
.match-clock input::-moz-range-thumb { width: 24px; height: 24px; border: 3px solid #fff; border-radius: 50%; background: var(--a); box-shadow: 0 1px 4px rgba(18, 32, 26, 0.3); }
.match-clock input:active::-webkit-slider-thumb { transform: scale(1.12); }
/* the keyboard's ring goes round the handle, not round the whole track */
.match-clock input:focus-visible { outline: none; }
.match-clock input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--green); outline-offset: 3px; }
.match-clock input:focus-visible::-moz-range-thumb { outline: 3px solid var(--green); outline-offset: 3px; }
.match-ticks { display: flex; justify-content: space-between; margin-top: -4px; color: var(--mute); font-variant-numeric: tabular-nums; }
.match-status { margin-top: 16px; font-size: var(--s-body); }
.match-status b { font-weight: 500; font-variant-numeric: tabular-nums; }

.match-table, .match-roll { list-style: none; display: grid; gap: 8px; margin: 14px 0 0; padding: 0; }
.team { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto 3.2em; grid-template-areas: "rank name kids pts" "bar bar bar bar"; align-items: center; align-content: center; column-gap: 12px; row-gap: 10px; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: transform 520ms var(--ease-out); }
.team-rank { grid-area: rank; color: var(--mute); font-weight: 500; font-variant-numeric: tabular-nums; }
.team-name { grid-area: name; font-size: var(--s-body); font-weight: 500; }
.team-kids { grid-area: kids; display: flex; gap: 5px; }
.kid { display: block; flex: none; width: 20px; height: 20px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px #C5D1CA; transition: background-color 320ms ease, box-shadow 320ms ease; }
.kid.on { background: var(--a-track); box-shadow: inset 0 0 0 1.5px var(--a-mid); }
.kid.done { background: var(--a); box-shadow: none; }
.team-pts { grid-area: pts; text-align: right; font-size: var(--s-state); font-weight: 500; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.team-bar { grid-area: bar; height: 6px; border-radius: 3px; overflow: hidden; background: var(--a-track); }
.team-bar i { display: block; height: 100%; background: var(--a); transform: scaleX(var(--s, 0)); transform-origin: left; transition: transform 520ms var(--ease-out); }
.match-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; color: var(--mute); }
.match-key span { display: inline-flex; align-items: center; gap: 8px; }
.match-key .kid { width: 16px; height: 16px; }

.match-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.match-kpis div { padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.match-kpis dt { color: var(--mute); }
.match-kpis dd { margin: 4px 0 0; font-size: var(--s-state); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
.match-roll li { display: grid; grid-template-columns: minmax(4.4em, 1fr) auto minmax(0, 13em); align-items: center; align-content: center; column-gap: 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.match-roll .team-name { grid-area: auto; }
.match-roll .team-kids { grid-area: auto; }
.roll-say { color: var(--mute); text-align: right; }
.match-more, .match-note { margin-top: 14px; color: var(--mute); }

.hw-facts { display: grid; row-gap: clamp(36px, 4.4vw, 64px); padding: clamp(72px, 9vw, 140px) var(--m) 0; }
.hw-fact { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: baseline; }
.hw-fig { grid-column: 1 / span 6; text-align: right; font: 600 var(--s-head)/0.9 var(--display); letter-spacing: -0.03em; font-variant-numeric: lining-nums; color: var(--claret); white-space: nowrap; }
.hw-say { grid-column: 7 / -1; max-width: 34em; }
.hw-src { margin-top: 8px; font-size: var(--s-small); color: var(--soft-on-ivory); }

/* ---- Proof: a heading and its note, then three figures on stepped tiles ---- */
.proof { padding: var(--gap) var(--m) 0; }
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 8px; align-items: start; }
.tile { display: flex; flex-direction: column; padding: clamp(20px, 2.2vw, 32px); }
.tile .fig { font: 600 var(--s-name)/0.82 var(--display); letter-spacing: -0.04em; font-variant-numeric: lining-nums; }
.tile-say { margin-top: auto; padding-top: 28px; max-width: 26em; }
.tile-src { margin-top: 12px; font-size: var(--s-small); }
.tile-a { grid-column: 1 / span 6; min-height: max(64svh, 480px); background: var(--claret); color: var(--ivory); }
.tile-a .tile-src { color: var(--soft-on-claret); }
.tile-b { grid-column: 7 / span 3; margin-top: 9svh; min-height: max(46svh, 380px); background: var(--green); color: var(--ivory); }
.tile-b .tile-src { color: var(--soft-on-green); }
.tile-c { grid-column: 10 / span 3; margin-top: 18svh; min-height: max(38svh, 330px); background: var(--brass); color: var(--green); }
.tile-c .tile-src { color: #2A3B33; }

/* ---- How it works: four lines that step across ---------------------------- */
.how { padding: var(--gap) var(--m) 0; }
.book { margin: 0 calc(var(--m) * -1) clamp(56px, 7vw, 110px); }
.book .pic-frame { height: min(78svh, 52vw); }
.book .pic-frame img { height: 112%; transform: translate3d(0, calc(var(--d, 0) * -8%), 0); }
.stair { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: clamp(40px, 4.4vw, 60px); }
.stage:nth-child(1) { grid-column: 1 / -1; }
.stage:nth-child(2) { grid-column: 3 / -1; }
.stage:nth-child(3) { grid-column: 5 / -1; }
.stage:nth-child(4) { grid-column: 7 / -1; }
.stage-line { font-size: var(--s-head); font-weight: 600; line-height: 1; letter-spacing: -0.03em; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.stage-line span { display: block; }
.stage:nth-child(4) .stage-line { color: var(--claret); }
.stage p { margin-top: 12px; max-width: 36ch; }

/* ---- The teacher's panel --------------------------------------------------- */
.panel { margin-top: var(--gap); background: var(--green); color: var(--ivory); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; padding: clamp(72px, 9vw, 140px) var(--m); }
.panel-text { grid-column: 1 / span 6; }
.panel-title { font-size: var(--s-head); }
.panel-say { margin-top: clamp(24px, 3vw, 40px); max-width: 20em; }
.word { display: inline-block; width: 1.9em; height: 1em; margin: 0 0.08em; vertical-align: -0.14em; object-fit: cover; background: var(--ivory); }
.panel-note { margin-top: clamp(24px, 3vw, 40px); max-width: 30em; color: var(--soft-on-green); }
.panel-note a { display: inline-block; padding: 10px 0; color: var(--brass); font-weight: 500; text-underline-offset: 5px; text-decoration-thickness: 2px; transition: text-underline-offset 240ms var(--ease-out); }
.panel-note a:hover { text-underline-offset: 9px; }
.panel-shot { grid-column: 7 / -1; margin-right: calc(var(--m) * -1); }
.panel-shot .pic-frame { aspect-ratio: 5 / 4; background: #F3F8F5; }
.panel-shot .pic-frame img { width: 132%; max-width: none; height: auto; }

/* ---- Pilot schools page: the same parts as the home page, with its own first screen ---- */
.pilot-hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 96px var(--m) clamp(24px, 3.4vw, 44px); }
.pilot-name { align-self: center; font-size: var(--s-name); font-weight: 600; line-height: 0.94; letter-spacing: -0.04em; }
.pilot-row { display: flex; align-items: baseline; gap: 0.2em; white-space: nowrap; }
.pilot-name .slot { flex: none; width: 1.9em; height: 0.66em; }
.pilot-name .slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.pilot-foot { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
.pilot-foot .statement { grid-column: 1 / span 6; max-width: 22em; }
.pilot-say { grid-column: 7 / span 3; max-width: 26em; }
.pilot-foot .btn { grid-column: 10 / span 3; justify-self: end; white-space: nowrap; }
/* a painting from edge to edge, drifting a little as it passes */
.wide .pic-frame { height: min(78svh, 52vw); }
.wide .pic-frame img { height: 112%; transform: translate3d(0, calc(var(--d, 0) * -8%), 0); }
.wide-gap { margin-top: var(--gap); }
.panel-pic { grid-column: 7 / -1; margin-right: calc(var(--m) * -1); }
.panel-pic .pic-frame { aspect-ratio: 3 / 2; }
.thanks { padding: var(--gap) var(--m) 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---- Catalogue page: every game as one entry, its painting on one side and its details on the other ---- */
.cat { padding: var(--gap) var(--m) 0; }
.cat .head { align-items: end; }
.cat-top { padding-top: clamp(120px, 12vw, 190px); }
.head > h1 { grid-column: 1 / span 6; font-size: var(--s-name); line-height: 0.9; letter-spacing: -0.04em; }
.cat-tools { grid-column: 7 / -1; }
.cat-picks { margin-top: 8px; }
.cat-label { font-size: var(--s-small); color: var(--soft-on-ivory); }
.cat-label + .cat-picks { margin-top: 8px; }
.cat-cur + .cat-label { margin-top: 18px; }
.cat-count { margin-top: 14px; font-size: var(--s-small); color: var(--soft-on-ivory); }
.entry { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
.entry + .entry { margin-top: clamp(72px, 9vw, 150px); }
.entry[hidden] { display: none; }
.entry-pic { grid-column: 1 / span 7; grid-row: 1; margin-left: calc(var(--m) * -1); }
.entry-pic .pic-frame { aspect-ratio: 3 / 2; }
.entry-text { grid-column: 8 / -1; grid-row: 1; }
.entry.flip .entry-pic { grid-column: 6 / -1; margin-left: 0; margin-right: calc(var(--m) * -1); }
.entry.flip .entry-text { grid-column: 1 / span 5; }
.entry h3 { font-size: var(--s-head); }
.entry-say { margin-top: 18px; max-width: 30em; }
.entry h3 + .entry-say { margin-top: clamp(20px, 2.4vw, 32px); }
.entry-say b { display: block; font-weight: 500; color: var(--claret); }
.entry-facts { display: grid; row-gap: 6px; margin: clamp(20px, 2.4vw, 32px) 0 0; font-size: var(--s-small); }
.entry-facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); column-gap: 12px; }
.entry-facts dt { color: var(--soft-on-ivory); }
.entry-facts dd { margin: 0; }
.entry-go { margin-top: 14px; }
.entry-status { display: inline-block; margin-bottom: 10px; padding: 5px 12px 4px; border: 1.5px solid var(--claret); border-radius: 999px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--claret); }
.entry-note { margin-top: 14px; color: var(--ink-soft); }
.entry-go a, .work-more a { display: inline-block; padding: 10px 0; font-weight: 500; text-underline-offset: 5px; text-decoration-thickness: 2px; transition: text-underline-offset 240ms var(--ease-out); }
.entry-go a { color: var(--claret); }
.entry-go a:hover, .work-more a:hover { text-underline-offset: 9px; }
.work-more a { color: var(--brass); }
.cat-end { margin-top: var(--gap); }
.cat-end .btn { background: var(--brass); color: var(--green); }
.cat-end .btn:hover { background: #D8B872; }

/* ---- Data privacy and security: a page to read. A short top, the promises, the road to the pilot,
   and the full policy with its contents held beside it. ---- */
.dp-top { padding: clamp(120px, 12vw, 190px) var(--m) 0; }
.dp-top .head > h1 { font-size: var(--s-head); }
.dp-top .head > .statement { grid-column: 7 / -1; max-width: 22em; }
.dp-status { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.dp-status > * { grid-column: 7 / -1; max-width: 34em; }
.dp-motto { font: 500 var(--s-state)/1.16 var(--display); letter-spacing: -0.015em; color: var(--claret); }
.dp-meta { margin-top: 12px; font-size: var(--s-small); color: var(--soft-on-ivory); }
.dp-pic { margin-top: clamp(56px, 7vw, 110px); }
.dp-pic figcaption { margin: 12px var(--m) 0; max-width: 40em; font-size: var(--s-small); }
.dp-glance { padding: var(--gap) var(--m) 0; }
.dp-promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 3.6vw, 52px) 24px; margin: 0; }
.dp-promises div { padding-top: 18px; border-top: 2px solid var(--green); }
.dp-promises dt { font: 600 var(--s-state)/1.05 var(--display); letter-spacing: -0.02em; }
.dp-promises dd { margin: 10px 0 0; max-width: 26em; }
.dp-road { margin-top: var(--gap); padding: clamp(72px, 9vw, 140px) var(--m); background: var(--green); color: var(--ivory); }
.dp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dp-steps li { padding: clamp(20px, 2.2vw, 32px); min-height: max(30svh, 260px); display: flex; flex-direction: column; background: var(--ivory); color: var(--green); }
.dp-steps li:nth-child(2) { background: var(--claret); color: var(--ivory); }
.dp-steps li:nth-child(3) { background: var(--brass); color: var(--green); }
.dp-when { font-size: var(--s-small); font-weight: 500; }
.dp-steps h3 { margin-top: auto; padding-top: 32px; font-size: var(--s-state); line-height: 1.05; }
.dp-steps h3 + p { margin-top: 10px; max-width: 28em; }
.dp-laws { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 4.4vw, 64px); }
.dp-laws h3 { padding-top: 14px; border-top: 2px solid var(--brass); font-size: var(--s-state); line-height: 1.05; }
.dp-laws ul { margin: 12px 0 0; padding: 0; list-style: none; font-size: var(--s-small); color: var(--soft-on-green); }
.dp-laws li + li { margin-top: 8px; }

.policy { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: start; padding: var(--gap) var(--m) var(--gap); }
.policy-toc { grid-column: 1 / span 3; position: sticky; top: 32px; }
.policy-toc-title { font-size: var(--s-state); line-height: 1.05; }
.policy-toc ol { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: toc; font-size: var(--s-small); }
.policy-toc li { counter-increment: toc; }
.policy-toc a { display: grid; grid-template-columns: 2em 1fr; padding: 5px 0; text-decoration: none; color: var(--soft-on-ivory); transition: color 180ms ease; }
.policy-toc a::before { content: counter(toc); font-variant-numeric: tabular-nums; }
.policy-toc a:hover, .policy-toc a.on { color: var(--green); }
.policy-toc a.on { font-weight: 500; }
.policy-body { grid-column: 5 / -1; max-width: 46em; }
.clause { scroll-margin-top: 24px; }
.clause + .clause { margin-top: clamp(48px, 5vw, 72px); }
.clause h3 { display: flex; align-items: baseline; gap: 0.5em; font-size: clamp(30px, 3.2vw, 52px); }
.clause-n { flex: none; min-width: 1.1em; color: var(--claret); font-variant-numeric: lining-nums; }
.clause h3 + p { margin-top: clamp(18px, 2vw, 28px); }
.clause p + p, .clause p + .dp-list, .clause .dp-list + p, .clause p + .dp-table-wrap, .clause .dp-table-wrap + p, .clause p + .dp-contact { margin-top: 14px; }
.clause b { font-weight: 500; }
.dp-list { margin: 0; padding-left: 1.2em; }
.dp-list li + li { margin-top: 8px; }
.dp-list li::marker { color: var(--claret); }
.dp-table-wrap { overflow-x: auto; }
.dp-table { width: 100%; border-collapse: collapse; font-size: var(--s-small); line-height: 1.5; }
.dp-table th, .dp-table td { padding: 14px 16px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid #CFC5AF; }
.dp-table thead th { padding-top: 0; font-weight: 500; color: var(--soft-on-ivory); border-bottom: 2px solid var(--green); }
.dp-table tbody th { font-weight: 500; width: 24%; }
.dp-table td:last-child { width: 38%; }
.dp-contact { display: grid; row-gap: 6px; margin: 0; }
.dp-contact div { display: grid; grid-template-columns: 5em 1fr; }
.dp-contact dt { color: var(--soft-on-ivory); }
.dp-contact dd { margin: 0; font-weight: 500; }
.dp-contact a { color: var(--claret); text-underline-offset: 4px; }

.dp-download { margin-top: clamp(48px, 5vw, 72px); }

/* The privacy page printed, or saved as the PDF that the page offers: the words only. */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  html, body { background: #fff; }
  .bar, .loader, .dp-pic, .policy-toc, .foot, .dp-download, .swipe-nav { display: none !important; }
  .dp-top { padding: 0; }
  .head, .dp-status { display: block; margin-bottom: 16pt; }
  .head > p, .dp-status > * { max-width: none !important; }
  .head > p, .head > .statement { margin-top: 10pt; }
  .dp-status { margin-top: 0; }
  .dp-top .head > h1 { font-size: 34pt; }
  .dp-glance, .policy { padding: 28pt 0 0; }
  .dp-road { margin-top: 0; padding: 0; background: none; color: var(--green); break-before: page; }
  .dp-road [data-focus], .dp-road [data-focus] .hl { color: var(--green); }
  .dp-steps li { min-height: 0; border: 1px solid var(--green); background: none !important; color: var(--green) !important; break-inside: avoid; }
  .dp-laws ul { color: var(--green); }
  .dp-laws h3 { border-top-color: var(--green); }
  .policy { display: block; }
  .policy-body { max-width: none; }
  .clause { break-inside: auto; }
  .clause h3 { font-size: 20pt; break-after: avoid; }
  .dp-table tr, .dp-promises div, .dp-laws div { break-inside: avoid; }
  [data-reveal], [data-reveal] * { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ---- Pricing: two plans, the free seats on the green, a calculator, and the questions ---- */
.pr-top { padding: clamp(120px, 12vw, 190px) var(--m) 0; }
.pr-top .head > h1 { font-size: var(--s-head); }
.pr-top .head > .statement { grid-column: 7 / -1; max-width: 22em; }
.pr-plans { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 0 var(--m); }
.pr-plan { grid-column: span 6; display: flex; flex-direction: column; padding: clamp(24px, 3vw, 44px); background: var(--ivory-2); }
.pr-plan-main { background: var(--claret); color: var(--ivory); }
.pr-name { font-size: var(--s-state); line-height: 1.05; }
.pr-price { margin-top: clamp(20px, 2.6vw, 40px); font: 600 var(--s-name)/0.82 var(--display); letter-spacing: -0.04em; font-variant-numeric: lining-nums; }
.pr-cur { font-size: 0.5em; vertical-align: 0.62em; margin-right: 0.04em; }
.pr-unit { margin-top: 12px; font-weight: 500; }
.pr-say { margin-top: 18px; max-width: 30em; }
.pr-list { margin: 22px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid currentColor; font-size: var(--s-small); }
.pr-list li { position: relative; padding-left: 22px; }
.pr-list li + li { margin-top: 8px; }
.pr-list li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: currentColor; }
.pr-list a { color: inherit; text-underline-offset: 4px; }
.pr-plan-main .pr-list { border-top-color: rgba(244, 238, 225, 0.4); }


.pr-more { padding: var(--gap) var(--m) 0; }
.pr-tiers { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; }
.pr-tier { grid-column: span 6; padding-top: 20px; border-top: 2px solid var(--green); }
.pr-tier-ent { border-top-color: var(--claret); }
.pr-tier-tag { font-weight: 500; color: var(--claret); }
.pr-tier-name { margin-top: 8px; font-size: var(--s-state); line-height: 1.1; font-variant-numeric: lining-nums; }
.pr-tier-fig { margin-top: clamp(18px, 2.4vw, 32px); font: 600 clamp(64px, 8vw, 128px)/0.85 var(--display); letter-spacing: -0.04em; font-variant-numeric: lining-nums; }
.pr-tier-word { color: var(--claret); }
.pr-tier-unit { margin-top: 12px; font-weight: 500; }
.pr-tier-say { margin-top: 12px; max-width: 30em; }
.pr-reach { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(40px, 4.4vw, 64px); }
.pr-reach span { color: var(--soft-on-ivory); }
.pr-reach span a { color: var(--claret); font-weight: 500; text-underline-offset: 4px; }
.pr-talk { margin-top: 20px; }
.pr-talk .btn { background: var(--claret); }
.pr-calc-wrap { margin-top: var(--gap); padding: clamp(72px, 9vw, 140px) var(--m); background: var(--green); color: var(--ivory); }
.pr-calc-wrap [data-focus] { color: var(--ivory-soft); }
.pr-calc-wrap [data-focus] .hl, .js .pr-calc-wrap [data-focus].in .hl { color: var(--ivory); }
.pr-calc { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: stretch; }
.pr-inputs { grid-column: 1 / span 6; display: grid; row-gap: 28px; align-content: start; }
.pr-field label, .pr-field legend { display: block; margin-bottom: 10px; font-size: var(--s-small); font-weight: 500; }
.pr-plan-pick { margin-top: 0; }
.pr-plan-pick .pick { flex: 1 1 0; min-height: 52px; font-size: var(--s-body); }
.pr-calc-wrap .pick[aria-pressed="true"] { background: var(--brass); color: var(--green); }
.pr-num { display: grid; grid-template-columns: 8em 1fr; gap: 20px; align-items: center; }
.pr-slide { display: grid; gap: 2px; }
.pr-ticks { position: relative; height: 1.4em; font-size: 14px; color: var(--soft-on-green); font-variant-numeric: tabular-nums; }
/* each label sits under the slider's thumb at its own value (the thumb is 26px wide) */
.pr-ticks span { position: absolute; top: 0; left: calc(13px + (100% - 26px) * var(--v) / 375); transform: translateX(-50%); white-space: nowrap; }
.pr-ticks span:last-child { left: auto; right: 0; transform: none; }
.pr-num input#pr-kids, .pr-num input[type="number"], .pr-step input { width: 100%; height: 56px; padding: 0 14px; border: 0; border-radius: 0; background: var(--ivory-2); color: var(--green); font: 500 var(--s-state)/1 var(--text); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.pr-num input::-webkit-inner-spin-button, .pr-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pr-num input[type="range"] { width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.pr-num input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(to right, var(--brass) var(--fill, 10%), rgba(244, 238, 225, 0.25) var(--fill, 10%)); }
.pr-num input[type="range"]::-moz-range-track { height: 6px; background: rgba(244, 238, 225, 0.25); }
.pr-num input[type="range"]::-moz-range-progress { height: 6px; background: var(--brass); }
.pr-num input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border: 0; border-radius: 50%; background: var(--brass); }
.pr-num input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--brass); }
.pr-step { display: grid; grid-template-columns: 56px 6em 56px; gap: 4px; }
.pr-step button { height: 56px; border: 0; border-radius: 0; background: var(--brass); color: var(--green); font: 400 26px/1 var(--text); cursor: pointer; transition: background-color 180ms ease, transform 140ms var(--ease-out); }
.pr-step button:hover { background: #D8B872; }
.pr-step button:active { transform: scale(0.95); }
.pr-step input { text-align: center; }
.pr-calc[data-plan="catalogue"] #pr-games-field { display: none; }
.pr-out { grid-column: 8 / -1; padding: clamp(24px, 3vw, 40px); background: var(--ivory); color: var(--green); }
.pr-total { font: 600 clamp(48px, 6vw, 96px)/0.9 var(--display); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.pr-per { font: 500 var(--s-state)/1 var(--display); letter-spacing: 0; }
.pr-lines { margin: 26px 0 0; display: grid; row-gap: 8px; font-size: var(--s-small); }
.pr-lines div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid #CFC5AF; }
.pr-lines dt { color: var(--soft-on-ivory); }
.pr-lines dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.pr-avg { margin-top: 18px; color: var(--claret); font-weight: 500; }

.pr-faq { padding: var(--gap) var(--m) var(--gap); }
.pr-calc .pr-field :focus-visible { outline-color: var(--brass); }
.pr-qs { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.pr-q { grid-column: 7 / -1; border-top: 1px solid #CFC5AF; }
.pr-q:last-child { border-bottom: 1px solid #CFC5AF; }
.pr-q summary { position: relative; padding: 20px 40px 20px 0; font: 600 var(--s-state)/1.15 var(--display); letter-spacing: -0.015em; cursor: pointer; list-style: none; }
.pr-q summary::-webkit-details-marker { display: none; }
.pr-q summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; border-right: 2px solid var(--claret); border-bottom: 2px solid var(--claret); transform: translateY(-70%) rotate(45deg); transition: transform 240ms var(--ease-out); }
.pr-q[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.pr-q p { padding: 0 40px 22px 0; max-width: 36em; }
.pr-q a { color: var(--claret); font-weight: 500; text-underline-offset: 4px; }
.pr-end a:not(.btn) { color: inherit; font-weight: 500; text-underline-offset: 4px; }
.pr-end .btn { background: var(--brass); color: var(--green); }
.pr-end .btn:hover { background: #D8B872; }

/* ---- Join: a sentence with a blank in it ----------------------------------- */
.join { background: var(--claret); color: var(--ivory); padding: clamp(80px, 9vw, 140px) var(--m); }
.join-line { font-size: var(--s-head); line-height: 1.16; letter-spacing: -0.03em; }
.join-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.26em; }
.join-row + .join-row { margin-top: 0.12em; }
.signup .email { flex: 1 1 6em; min-width: 0; height: 1.08em; padding: 0 0.18em; border: 0; border-radius: 0; background: #6B2330; color: var(--ivory); font: inherit; letter-spacing: inherit;
  transition: background-color 180ms ease; }
.signup .email::placeholder { color: #D9B8B0; opacity: 1; }
.signup .email:focus { background: #7A2B39; }
.signup button { height: 1.08em; min-height: 52px; padding: 0 0.3em; background: var(--brass); color: var(--green); font: inherit; letter-spacing: inherit; }
.signup button:hover { background: #D8B872; }
.role { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 3.4vw, 48px); }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role label { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; background: #6B2330; color: var(--ivory); font-size: var(--s-body); font-weight: 400; cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.role label:hover { background: #7A2B39; }
.role input:checked + label { background: var(--ivory); color: var(--claret); }
.role input:focus-visible + label { outline: 3px solid var(--brass); outline-offset: 3px; }
.trap { position: absolute; width: 2px; height: 2px; padding: 0; border: 0; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.status { margin-top: 20px; color: var(--soft-on-claret); min-height: 1.6em; }
.signup.bad .email { animation: nudge 320ms var(--ease-out); }
.signup.busy button { opacity: 0.6; pointer-events: none; }
.signup.done .status { color: var(--ivory); font-weight: 400; }
.joined { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.joined-pic { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: brightness(0.42); }
.joined .status { color: var(--ivory); }
.joined .btn { margin-top: 32px; background: var(--brass); color: var(--green); }
.joined .btn:hover { background: #D8B872; }
@keyframes nudge { 30% { transform: translateX(-6px); } 65% { transform: translateX(4px); } }

/* ---- A school's application: an ordinary form, one field for each thing we need to know ---- */
.join .head { margin-bottom: clamp(32px, 4vw, 56px); }
.apply { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 22px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: var(--s-small); font-weight: 500; }
.field input { height: 60px; padding: 0 16px; border: 0; border-radius: 0; background: #6B2330; color: var(--ivory); font: 400 var(--s-body)/1 var(--text); transition: background-color 180ms ease; }
.field input:focus { background: #7A2B39; }
.field input[aria-invalid="true"] { outline: 3px solid var(--brass); outline-offset: 0; }
.apply-end { grid-column: span 6; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.apply-hint { max-width: 18em; font-size: var(--s-small); color: var(--soft-on-claret); }
.apply .btn { flex: none; min-height: 60px; padding: 0 36px; background: var(--brass); color: var(--green); }
.apply .btn:hover { background: #D8B872; }
.apply .status { grid-column: 1 / -1; margin-top: 0; color: var(--ivory); }
.apply.busy .btn { opacity: 0.6; pointer-events: none; }
.apply.done .field, .apply.done .apply-end { display: none; }
.apply.done .status { font-family: var(--display); font-weight: 500; font-size: var(--s-state); line-height: 1.16; max-width: 24em; }

/* ---- Footer: the name across the last painting ----------------------------- */
.foot { position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; background: var(--green); color: var(--ivory); padding: 32px var(--m) 20px; isolation: isolate; }
.foot-pic { position: absolute; z-index: -1; left: 0; top: -8%; width: 100%; height: 116%; max-width: none; object-fit: cover; filter: brightness(0.6); transform: translate3d(0, calc(var(--d, 0) * -6%), 0); will-change: transform; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.foot-logo { width: clamp(132px, 17vw, 260px); height: auto; }
.foot-links { display: flex; flex-direction: column; font-size: var(--s-small); font-weight: 400; }
.foot-links a { text-decoration: none; align-self: flex-start; }
.foot-word { margin-top: auto; font: 600 clamp(64px, 19.6vw, 400px)/0.8 var(--display); letter-spacing: -0.04em; text-transform: uppercase; white-space: nowrap; text-align: center; padding-top: 0.1em; overflow: hidden; }
.foot-word .ch { display: inline-block; }
.legal { margin-top: 12px; font-size: var(--s-small); font-weight: 400; }

@media (prefers-reduced-motion: no-preference) {
  .kid.pop { animation: kid-pop 420ms var(--ease-out); }
}
@keyframes kid-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .team, .team-bar i, .kid, .js .match-stage > * { transition: none; }
}

/* Moving between the two pages is a short cross-fade where the browser can do it. */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }

/* ---- Motion ---------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* The name opens to let the game in. */
  .js .name-a { transform: translateX(1.03em); transition: transform 1200ms var(--ease-in-out) 120ms; }
  .js .name-b { transform: translateX(-1.03em); transition: transform 1200ms var(--ease-in-out) 120ms; }
  .js .slot { clip-path: inset(0 50% 0 50%); transition: clip-path 1200ms var(--ease-in-out) 120ms; }
  .js .hero-foot > * { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease 700ms, transform 900ms var(--ease-expo) 700ms; }
  .js .hero-foot > :nth-child(2) { transition-delay: 780ms; }
  .js .hero-foot > :nth-child(3) { transition-delay: 860ms; }
  .js .bar > * { opacity: 0; transition: opacity 600ms ease 500ms; }
  .js.ready .name-a, .js.ready .name-b { transform: none; }
  .js.ready .slot { clip-path: inset(0); }
  .js.ready .hero-foot > *, .js.ready .bar > * { opacity: 1; transform: none; }

  /* The pilot page's first screen: its two lines rise, and the picture opens inside the first. */
  .js .pilot-row { opacity: 0; transform: translateY(0.3em); transition: opacity 700ms ease 150ms, transform 1100ms var(--ease-expo) 150ms; }
  .js .pilot-row + .pilot-row { transition-delay: 260ms; }
  .js .pilot-name .slot { clip-path: inset(0 100% 0 0); transition: clip-path 1200ms var(--ease-in-out) 500ms; }
  .js .pilot-foot > * { opacity: 0; transform: translateY(20px); transition: opacity 700ms ease 800ms, transform 900ms var(--ease-expo) 800ms; }
  .js .pilot-foot > :nth-child(2) { transition-delay: 880ms; }
  .js .pilot-foot > :nth-child(3) { transition-delay: 960ms; }
  .js.ready .pilot-row, .js.ready .pilot-foot > * { opacity: 1; transform: none; }
  .js.ready .pilot-name .slot { clip-path: inset(0); }
  .js.ready .pilot-foot .hl { color: var(--green); transition-delay: calc(1600ms + var(--k, 0) * 300ms); }

  /* The window opens like a shutter. */
  .js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1200ms var(--ease-in-out); }
  .js .shutter.in { clip-path: inset(0); }

  /* Parts of a section rise in reading order. */
  .js [data-reveal=""] { opacity: 0; transform: translateY(26px); transition: opacity 700ms ease, transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal=""].in { opacity: 1; transform: none; }

  /* Pictures open from their lower edge and settle. */
  .js [data-reveal="open"] .pic-frame { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-in-out); }
  .js [data-reveal="open"] .pic-frame img { transform: scale(1.14); transition: transform 1700ms var(--ease-soft); }
  .js [data-reveal="open"] figcaption { opacity: 0; transition: opacity 700ms ease 500ms; }
  .js [data-reveal="open"].in .pic-frame { clip-path: inset(0); }
  .js [data-reveal="open"].in .pic-frame img { transform: none; }
  .js .book[data-reveal="open"].in .pic-frame img, .js .wide[data-reveal="open"].in .pic-frame img { transform: translate3d(0, calc(var(--d, 0) * -8%), 0); }
  .js [data-reveal="open"].in figcaption { opacity: 1; }

  /* The staircase: each line rises out of its own mask, then its sentence follows. */
  .js [data-reveal="line"] .stage-line span { opacity: 0; transform: translateY(0.45em); transition: opacity 600ms ease, transform 1000ms var(--ease-expo); }
  .js [data-reveal="line"] p { opacity: 0; transform: translateY(14px); transition: opacity 700ms ease 260ms, transform 800ms var(--ease-expo) 260ms; }
  .js [data-reveal="line"].in .stage-line span { opacity: 1; transform: none; }
  .js [data-reveal="line"].in p { opacity: 1; transform: none; }

  /* The words that carry a sentence come into the full ink one phrase after another. */
  .js [data-focus] .hl { color: inherit; transition: color 900ms ease; transition-delay: calc(350ms + var(--k, 0) * 300ms); }
  .js [data-focus].in .hl { color: var(--green); }
  .js .work [data-focus].in .hl, .js .panel [data-focus].in .hl, .js .dp-road [data-focus].in .hl { color: var(--ivory); }
  .js.ready .hero-say .hl { color: var(--green); transition-delay: calc(1500ms + var(--k, 0) * 300ms); }

  /* The picture words blink open once. */
  .js .panel-say .word { clip-path: inset(0 100% 0 0); transition: clip-path 900ms var(--ease-in-out); transition-delay: calc(500ms + var(--w, 0) * 160ms); }
  .js .panel-say.in .word { clip-path: inset(0); }

  /* The footer's name rises letter by letter. */
  .js .foot-word .ch { transform: translateY(105%); transition: transform 1100ms var(--ease-expo); transition-delay: calc(var(--c) * 34ms); }
  .js .foot-word.in .ch { transform: none; }
}

/* ---- A narrow desktop: the bar keeps its links on one line by setting two of them aside ---- */
.bar-links a { white-space: nowrap; }
@media (max-width: 1360px) {
  .bar-links a.bar-minor { display: none; }
  .bar-links { gap: 22px; }
}

/* ---- Tablet ---------------------------------------------------------------- */
@media (max-width: 1000px) {
  .dp-laws { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .bar-links a:not(.bar-pilot):not(.bar-data):not(.bar-price) { display: none; }
  .bar-links { margin-right: 20px; }
  .pilot-foot { row-gap: 28px; }
  .pilot-foot .statement { grid-column: 1 / -1; }
  .pilot-say { grid-column: 1 / span 7; }
  .pilot-foot .btn { grid-column: 8 / -1; }
  .hero-foot { row-gap: 28px; }
  .fake { grid-column: 1 / -1; }
  .hero-say { grid-column: 1 / span 8; }
  .hero .btn { grid-column: 9 / -1; }
  .intro-pics { grid-column: 7 / -1; }
  .cap { width: 42%; }
  .hw-points { grid-column: 1 / -1; align-self: start; max-width: 34em; }
  .match { grid-column: 1 / -1; margin-top: 48px; }
}

/* ---- Phone: its own composition -------------------------------------------- */
@media (max-width: 680px) {
  :root { --s-name: 23vw; --s-head: 9.6vw; --s-state: 22px; --s-body: 17px; }
  .hero { padding-top: 76px; grid-template-rows: auto auto; row-gap: 26px; min-height: 0; }
  .name { flex-direction: column; align-items: center; gap: 0.08em; line-height: 0.86; }
  .slot { width: 100%; height: auto; aspect-ratio: 3 / 1; margin: 0.12em 0 0.06em; }
  .hero-foot { display: flex; flex-direction: column; align-items: stretch; row-gap: 22px; }
  .hero-say { order: 1; }
  .hero .btn { order: 2; }
  .fake { order: 3; margin-top: 18px; }
  .fake-line { font-size: var(--s-state); white-space: normal; }
  .fake-row { display: block; }
  .fake-row + .fake-row { margin-top: 0.3em; }
  .pick { flex: 1 1 auto; }
  .hero .btn { justify-self: stretch; }

  .pilot-hero { padding-top: 76px; grid-template-rows: auto auto; row-gap: 26px; min-height: 0; }
  .pilot-name { font-size: 12.4vw; line-height: 1; }
  .pilot-row { display: block; white-space: normal; }
  .pilot-name .slot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0.16em 0 0.1em; }
  .pilot-foot { display: flex; flex-direction: column; align-items: stretch; row-gap: 22px; }
  .wide .pic-frame { height: 74vw; }
  .panel-pic { margin: 40px calc(var(--m) * -1) 0 0; }
  .duo { grid-template-columns: 1fr; gap: 40px; }

  .field, .apply-end { grid-column: 1 / -1; }
  .apply-end { flex-direction: column; align-items: stretch; }
  .apply-hint { max-width: none; }

  .book .pic-frame { height: 74vw; }

  .intro { display: block; }
  .intro-pin { position: static; padding-bottom: 0; }
  .intro-title { max-width: none; }
  .intro .statement { margin-top: 16px; max-width: none; }
  .intro-pics { gap: 44px; padding: 40px 0 0; }

  /* A game's two halves are stacked: the painting above, the lesson below. Its name lies along
     the seam between them, one line on each side, and the two lines slide level as it arrives. */
  .on-wide { display: none; }
  .on-phone { display: inline; }
  .game { --ph: max(62svh, 430px); --seam: 13vw; height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--ph) auto auto; }
  /* the lesson and its sentence share the lower half's ground */
  .game-ratio { background: #0A0812; }
  .game-pyth { background: #22150C; }
  .game-dust { background: #1B1512; }
  /* the two lines are level by the time the seam is a third of the way up the screen */
  .game { --slide: calc(max(0, var(--p, 0) - 0.15) * 56vw); }
  .pane-l { grid-area: 1 / 1; }
  .pane-l::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 64%; background: linear-gradient(to bottom, rgba(10, 8, 12, 0), rgba(10, 8, 12, 0.8)); }
  .pane-r { grid-area: 2 / 1; display: block; padding: calc(var(--seam) * 0.84 + 30px) var(--m) 0; }
  .pane-r .card { width: 100%; max-height: none; }
  .seam { top: var(--ph); margin-top: -0.84em; padding: 0 var(--m); font-size: var(--seam); text-align: left; }
  .seam::before { content: attr(data-a); white-space: nowrap; clip-path: none; transform: translate3d(calc(var(--slide) * -1), 0, 0); }
  .seam::after { content: attr(data-b); white-space: nowrap; position: static; clip-path: none; transform: translate3d(var(--slide), 0, 0); }
  .cap { position: static; width: auto; max-width: 30em; font-size: var(--s-body); line-height: 1.45; }
  .cap-l { grid-area: 1 / 1; align-self: end; margin: 0 var(--m) calc(var(--seam) * 0.84 + 18px); }
  .cap-r { grid-area: 3 / 1; margin: 22px var(--m) 56px; }
  .game-meta { top: 18px; left: var(--m); right: var(--m); justify-content: space-between; }

  .head { display: block; }
  .head > p { margin-top: 16px; }
  .tiles { display: flex; flex-direction: column; gap: 6px; }
  .tile { min-height: 0; padding: 22px 20px 24px; }
  .tile-b, .tile-c { margin-top: 0; }
  .tile-b { margin-left: 7vw; }
  .tile-c { margin-left: 14vw; }
  .tile-say { padding-top: 18px; max-width: none; }

  .hw .wide .pic-frame { height: 74vw; }
  .hw-field { display: block; padding: 56px var(--m); }
  .hw-points { max-width: none; }
  .match { margin-top: 40px; padding: 16px 14px; }
  .match-status { min-height: 2.9em; }
  .match-view { padding: 0 8px; }
  .team { grid-template-columns: 1.4em minmax(0, 1fr) auto; grid-template-areas: "rank name pts" "kids kids kids" "bar bar bar"; padding: 12px 14px 14px; }
  .team-pts { text-align: right; }
  .match-roll li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 10px 14px; }
  .roll-say { grid-column: 1 / -1; text-align: left; }
  .hw-fact { display: block; }
  .hw-fig { text-align: left; font-size: 15vw; }
  .hw-say { margin-top: 8px; }

  .stage:nth-child(1) { grid-column: 1 / -1; }
  .stage:nth-child(2) { grid-column: 1 / -1; padding-left: 4vw; }
  .stage:nth-child(3) { grid-column: 1 / -1; padding-left: 8vw; }
  .stage:nth-child(4) { grid-column: 1 / -1; padding-left: 12vw; }
  .stage p { max-width: none; }

  .panel { display: block; }
  .panel-shot { margin: 40px calc(var(--m) * -1) 0 0; }
  .panel-shot .pic-frame { aspect-ratio: auto; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
  .panel-shot .pic-frame::-webkit-scrollbar { display: none; }
  .panel-shot .pic-frame img { width: 190%; height: auto; }

  .signup .email { flex-basis: 100%; height: 1.5em; margin-top: 0.12em; }
  .signup button { height: 1.5em; margin-top: 0.2em; padding: 0 0.5em; }
  .role label { flex: 1 1 auto; justify-content: center; }

  .foot { min-height: 88svh; }
  .foot-word { font-size: 17.4vw; }

  /* The menu. Without the script the bar keeps its two links, as before. */
  .bar { gap: 20px; }
  .js .bar-menu { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: 500 var(--s-small)/1 var(--text); cursor: pointer; }
  .js .bar-mark, .js .bar-action { position: relative; z-index: 2; }
  .js .bar-links { position: fixed; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 0; margin: 0; padding: 96px var(--m) 40px; overflow-y: auto; background: var(--ivory); color: var(--green);
    visibility: hidden; clip-path: inset(0 0 100% 0); transition: clip-path 520ms var(--ease-in-out), visibility 0s linear 520ms; }
  .js .bar-links a, .js .bar-links a:not(.bar-pilot) { display: block; align-self: flex-start; padding: 0.14em 0; font: 600 clamp(36px, 11.5vw, 56px)/1.02 var(--display); letter-spacing: -0.03em; }
  .js .bar-links a::after { display: none; }
  .js .bar-links a[aria-current="page"] { color: var(--claret); }
  .menu-open body { overflow: hidden; }
  .menu-open .bar { position: fixed; z-index: 45; }
  .menu-open .bar-links { visibility: visible; clip-path: inset(0); transition: clip-path 520ms var(--ease-in-out), visibility 0s; }
  .foot-top { flex-direction: column; gap: 20px; }
  .foot-logo { position: absolute; top: 32px; right: var(--m); width: 116px; }

  .cat-top { padding-top: 104px; }
  .pr-top { padding-top: 104px; }
  .pr-top .head > .statement { margin-top: 18px; }
  .pr-plans { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .pr-plan { grid-column: 1 / -1; }
  .pr-calc { display: block; }
  .pr-out { margin-top: 28px; }
  .pr-num { grid-template-columns: 6.4em 1fr; gap: 14px; }
  .pr-qs { display: block; }
  .pr-tiers { grid-template-columns: minmax(0, 1fr); }
  .pr-tier { grid-column: 1 / -1; }
  .pr-reach .btn { width: 100%; }
  .pr-q summary { font-size: 22px; }
  .dp-top { padding-top: 104px; }
  .dp-top .head > .statement { margin-top: 18px; }
  .dp-status { display: block; margin-top: 4px; }
  .dp-pic figcaption { margin-top: 10px; }
  .dp-promises { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dp-steps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dp-steps li { min-height: 0; }
  .dp-steps h3 { padding-top: 22px; }
  .dp-laws { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .policy { display: block; }
  .policy-toc { position: static; padding-bottom: 32px; border-bottom: 1px solid #CFC5AF; }
  .policy-toc ol { columns: 2; column-gap: 16px; }
  .policy-toc li { break-inside: avoid; }
  .policy-body { margin-top: 48px; }
  .dp-table, .dp-table thead, .dp-table tbody, .dp-table tr, .dp-table th, .dp-table td { display: block; width: auto; }
  .dp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dp-table tr { padding: 14px 0; border-bottom: 1px solid #CFC5AF; }
  .dp-table th, .dp-table td { padding: 0; border: 0; }
  .dp-table tbody th { font-size: var(--s-body); }
  .dp-table td { margin-top: 6px; }
  .dp-table td:last-child { width: auto; color: var(--soft-on-ivory); }
  .head > h1 { font-size: 15.5vw; }
  .cat-count { margin-top: 12px; }
  .cat .head > .cat-tools { margin-top: 20px; }
  .entry { display: block; }
  .entry-pic, .entry.flip .entry-pic { margin: 0 calc(var(--m) * -1); }
  .entry h3 { margin-top: 22px; }
  .entry-facts div { grid-template-columns: 6.6em minmax(0, 1fr); }
}

/* ---- Phone: rows that are swiped sideways. A long run of like things (the three games, the
   pictures, the figures, the steps) lies in one row, with the edge of the next one showing. ---- */
@media (max-width: 680px) {
  .intro-pics, .games, .tiles, .hw-facts, .stair, .duo { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 10px;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-left: var(--m); overscroll-behavior-x: contain; scrollbar-width: none; }
  .intro-pics::-webkit-scrollbar, .games::-webkit-scrollbar, .tiles::-webkit-scrollbar, .hw-facts::-webkit-scrollbar, .stair::-webkit-scrollbar, .duo::-webkit-scrollbar { display: none; }
  .intro-pics > *, .games > *, .tiles > *, .hw-facts > *, .stair > *, .duo > * { flex: 0 0 84%; min-width: 0; scroll-snap-align: start; }
  /* rows inside a section with side margins reach both edges of the screen */
  .intro-pics, .tiles, .stair, .duo { margin-left: calc(var(--m) * -1); margin-right: calc(var(--m) * -1); padding-left: var(--m); padding-right: var(--m); }
  .intro-pics { padding-top: 40px; padding-bottom: 0; }
  .hw-facts { row-gap: 0; }
  .hw-facts > * { flex-basis: 78%; }
  .tile-b, .tile-c { margin-left: 0; }
  .stage:nth-child(n) { padding-left: 0; }
  .stage:nth-child(4) { margin-right: var(--m); }
  .games { gap: 6px; scroll-padding-left: 0; }
  .swipe-nav { display: flex; justify-content: flex-end; gap: 4px; margin-top: 6px; }
  .games + .swipe-nav, .hw-facts + .swipe-nav { padding: 0 var(--m); }
  .swipe-nav button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; cursor: pointer; transition: opacity 180ms ease, transform 140ms var(--ease-out); }
  .swipe-nav button:active { transform: scale(0.94); }
  .swipe-nav button:disabled { opacity: 0.28; cursor: default; }
  .swipe-nav button:last-child { margin-right: -10px; }
  .games > .game { flex-basis: 90%; --seam: 11.6vw; }
}

@media (max-width: 680px) and (prefers-reduced-motion: reduce) {
  .js .bar-links, .menu-open .bar-links { transition: none; }
}

/* On a phone the name is stacked, so it opens upwards and downwards to let the game in. */
@media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
  .js .name-a { transform: translateY(0.76em); }
  .js .name-b { transform: translateY(-0.76em); }
  .js .slot { clip-path: inset(50% 0 50% 0); }
  .js.ready .name-a, .js.ready .name-b { transform: none; }
  .js.ready .slot { clip-path: inset(0); }
}

/* Values the pages used to set in style attributes. They are rules here so that the pages' content security
   policy can refuse every inline style. The script still sets the team bars' --s as the scores change. */
[data-i="0"] { --i: 0; }
[data-i="1"] { --i: 1; }
[data-i="2"] { --i: 2; }
.team-bar i[data-s="0.8"] { --s: 0.8; }
.team-bar i[data-s="0.75"] { --s: 0.75; }
.team-bar i[data-s="0.733"] { --s: 0.733; }
.team-bar i[data-s="0.692"] { --s: 0.692; }
.pr-ticks span[data-v="0"] { --v: 0; }
.pr-ticks span[data-v="100"] { --v: 100; }
.pr-ticks span[data-v="200"] { --v: 200; }
.pr-ticks span[data-v="300"] { --v: 300; }
.pr-ticks span[data-v="375"] { --v: 375; }
.pic-frame img[data-pos="left"] { object-position: 0% 50%; }
.pic-frame img[data-pos="low"] { object-position: 50% 62%; }
