/* Toon Words · toonwords.com. One stylesheet for the site and the study app.
   The page is a chalkboard. The cards pinned to it are the only paper on it.
   One mood: there is no light/dark switch, on the site or in the app. */
:root {
  /* the board */
  --board: #1F3F38; --board-2: #19342E; --board-3: #244A42;
  /* chalk, the ink on the board */
  --chalk: #F2EDE0; --chalk-2: #C9C2B0; --chalk-3: #A6AE9F;
  --hair: rgba(242, 237, 224, .16); --hair-2: rgba(242, 237, 224, .32); --chalk-ghost: rgba(242, 237, 224, .07);
  /* the sounds-like sticker, the one accent */
  --sticker: #FFD84D; --sticker-hi: #FFE27A; --sticker-dim: #D9B53A; --sticker-ghost: rgba(255, 216, 77, .14); --sticker-ink: #2B2300;
  /* the card's own paper */
  --paper: #FFFBF0; --paper-ink: #1F2833; --paper-muted: #5F6B78; --paper-rule: #E8E2D0; --paper-red: #E4A79C;
  /* the four grades, as chalk pastels */
  --again: #F08A80; --hard: #F0A35A; --good: #7FD3A1; --easy: #8CBCEC;

  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;

  --ease-settle: cubic-bezier(.22, 1, .36, 1);
  --ease-flip: cubic-bezier(.7, 0, .2, 1);

  --measure: 64ch;
  --rule: 28px;
  --gutter: clamp(16px, 4vw, 40px);
  --pinned: 0 1px 1px rgba(0, 0, 0, .22), 0 16px 32px -12px rgba(0, 0, 0, .55), 0 34px 70px -34px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--board); color: var(--chalk);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
/* chalk dust: under everything, over the board only */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--chalk); text-decoration-line: underline; text-decoration-color: var(--sticker-dim); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: text-decoration-color .25s var(--ease-settle); }
a:hover { text-decoration-color: var(--sticker); }
:focus-visible { outline: 3px solid var(--sticker); outline-offset: 3px; }
::selection { background: var(--sticker); color: var(--sticker-ink); }

h1, h2, h3 { font-family: var(--display); color: var(--chalk); margin: 0; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 1.4rem + 4.2vw, 5rem); font-weight: 760; font-variation-settings: "wdth" 88; letter-spacing: -0.012em; line-height: .95; }
h2 { font-size: clamp(1.75rem, 1.15rem + 2.3vw, 3.1rem); font-weight: 720; font-variation-settings: "wdth" 90; letter-spacing: -0.02em; line-height: 1.02; }
h3 { font-size: clamp(1.2rem, 1.05rem + .45vw, 1.45rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0 0 1em; }
p, li, dd { text-wrap: pretty; }
.line { display: block; }
.nowrap { white-space: nowrap; }
.muted { color: var(--chalk-2); }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.kicker { font: 500 .75rem/1.5 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--chalk-2); margin: 0 0 20px; }
.kicker::before { content: ""; display: inline-block; vertical-align: middle; width: 32px; height: 2px; margin: -2px 12px 0 0; background: var(--chalk-2); border-radius: 2px; }
.lede { font-size: clamp(1.08rem, 1rem + .3vw, 1.25rem); line-height: 1.55; color: var(--chalk-2); max-width: 34em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--chalk); color: var(--board); border-radius: 8px; font: 650 .95rem var(--display); text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 2px solid transparent;
  font: 650 1rem/1 var(--display); letter-spacing: .005em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .4s var(--ease-settle), background-color .25s var(--ease-settle), border-color .25s var(--ease-settle), color .25s var(--ease-settle);
}
.btn-primary { background: var(--chalk); color: var(--board); border-color: var(--chalk); }
.btn-primary:hover { background: #FFF9EC; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--chalk); border-color: var(--hair-2); }
.btn-ghost:hover { border-color: var(--chalk); background: var(--chalk-ghost); }
.btn-yellow, .btn-sticker { background: var(--sticker); color: var(--sticker-ink); border-color: var(--sticker); border-radius: 6px 14px 6px 14px; }
.btn-yellow:hover, .btn-sticker:hover { background: var(--sticker-hi); border-color: var(--sticker-hi); transform: rotate(-1.5deg) translateY(-1px); }
.btn-wide { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.btn:active:not([disabled]) { transform: scale(.98); }

.arrow-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; font: 650 1rem/1 var(--display); color: var(--chalk); text-decoration: none; white-space: nowrap; background: linear-gradient(var(--sticker), var(--sticker)) 0 100% / 0 2px no-repeat; transition: background-size .45s var(--ease-settle); }
.arrow-link::after { content: "→"; transition: transform .45s var(--ease-settle); }
.arrow-link:hover { background-size: calc(100% - 1.4em) 2px; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- masthead ---------- */
.mast { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--board) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.mast-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; color: var(--chalk); text-decoration: none; font: 800 1.3rem/1 var(--display); font-variation-settings: "wdth" 100; letter-spacing: -0.015em; white-space: nowrap; }
.mark { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--sticker); color: var(--sticker-ink); border-radius: 5px 11px 5px 11px; font: 800 1.15rem/1 var(--display); transform: rotate(-5deg); transition: transform .5s var(--ease-settle); }
.wordmark:hover .mark { transform: rotate(4deg) scale(1.05); }
.mast nav { margin-left: auto; display: flex; align-items: center; gap: 8px 26px; }
.nav-link { position: relative; padding: 8px 0; font: 700 .95rem/1 var(--body); color: var(--chalk-2); text-decoration: none; white-space: nowrap; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--sticker); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-settle); }
.nav-link:hover { color: var(--chalk); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.mast .btn + .btn { margin-left: -12px; }

/* ---------- the board (hero) ---------- */
.board { position: relative; padding-top: clamp(28px, 4vw, 56px); overflow-x: clip; }
.board::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(48% 62% at 76% 46%, rgba(242, 237, 224, .05), transparent 72%), linear-gradient(104deg, transparent 8%, rgba(242, 237, 224, .025) 24%, transparent 40%); }
.board-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 88px); align-items: center; padding-bottom: clamp(28px, 3.5vw, 52px); }
.pitch { min-width: 0; }
.pitch h1 { margin-bottom: 26px; }
.pitch h1 em { position: relative; display: inline-block; font-style: normal; color: var(--sticker); transform: skewX(-8deg); transform-origin: left bottom; }
.pitch h1 em::after { content: ""; position: absolute; left: .02em; right: .12em; bottom: -.1em; height: .16em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9c30-5 62-7 96-5s66 3 98-1' fill='none' stroke='%23D9B53A' stroke-width='5' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 30px; }
.fineprint { margin: 26px 0 0; font: 400 .8rem/1.7 var(--mono); letter-spacing: .03em; color: var(--chalk-3); }

.stage { position: relative; min-width: 0; width: 100%; max-width: 600px; justify-self: end; padding-top: 44px; }
.deck { perspective: 1400px; }
.flip { position: relative; display: grid; transform-style: preserve-3d; transition: transform .85s var(--ease-flip); cursor: pointer; border-radius: 8px; outline-offset: 8px; -webkit-tap-highlight-color: transparent; }
.flip > .face { grid-area: 1 / 1; min-width: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.face-back { transform: rotateY(180deg); }
.flip.is-flipped { transform: rotateY(180deg); }

.grader { position: relative; margin-top: 20px; min-height: 60px; display: grid; align-items: center; }
.grade-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grade-row[hidden] { display: none; }

.note { margin: 0; font: 400 1.4rem/1 var(--hand); color: var(--chalk); white-space: nowrap; }
.note-arrow { flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.note-tap { position: absolute; top: 0; right: 8px; display: flex; align-items: flex-start; gap: 6px; transform: rotate(-3deg); }
.note-tap .note-arrow { margin-top: 8px; }
.note-grade { position: absolute; right: calc(100% + 18px); top: 50%; display: flex; align-items: center; gap: 8px; transform: translateY(-62%) rotate(-2deg); }
/* the notes write themselves once, after the card has landed: text left to right, then the arrow */
@keyframes chalk-write { from { clip-path: inset(-20% 100% -30% -4%); } to { clip-path: inset(-20% -4% -30% -4%); } }
@keyframes chalk-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.note > span { display: inline-block; animation: chalk-write .9s var(--ease-settle) .7s both; }
.note-arrow path { stroke-dasharray: 1; animation: chalk-draw .4s var(--ease-settle) 1.45s both; }
.note-arrow path + path { animation-delay: 1.8s; animation-duration: .25s; }
.note-grade > span { animation-delay: 2.05s; }
.note-grade .note-arrow path { animation-delay: 2.85s; }
.note-grade .note-arrow path + path { animation-delay: 3.2s; }
.note-line { display: none; margin: 14px 0 0; font: 400 1.3rem/1.2 var(--hand); color: var(--chalk); text-align: center; animation: chalk-write 1.2s var(--ease-settle) .8s both; }
.readout { min-height: 1.7em; margin: 14px 0 0; font: 400 .8rem/1.7 var(--mono); letter-spacing: .03em; color: var(--chalk-2); text-align: center; }

.tray { position: relative; height: 12px; background: var(--board-2); border-bottom: 1px solid var(--hair-2); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3); }
.tray i { position: absolute; bottom: 100%; display: block; }
.tray .chalk { left: 66%; width: 52px; height: 9px; border-radius: 3px 5px 5px 3px; background: linear-gradient(#FBF7EC, #DCD5C3); box-shadow: 0 2px 2px rgba(0, 0, 0, .3); transform: rotate(-2deg); }
.tray .chalk-y { left: calc(66% + 66px); width: 34px; background: linear-gradient(#FFE58A, var(--sticker-dim)); transform: rotate(3deg); }
.tray .eraser { left: 12%; width: 92px; height: 18px; border-radius: 3px; background: linear-gradient(#6B5A49 0 58%, #CFC6B4 58%); box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }

/* ---------- the card: paper, art full bleed, no drawn edge ---------- */
.toon { background: var(--paper); color: var(--paper-ink); border-radius: 8px; overflow: hidden; box-shadow: var(--pinned); }
.toon img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-rule); }
.toon-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.word-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.word { font: 780 clamp(1.7rem, 1.35rem + 1.3vw, 2.3rem)/1 var(--display); font-variation-settings: "wdth" 92; letter-spacing: .01em; color: var(--paper-ink); }
.pron { font: 500 .88rem/1.2 var(--mono); letter-spacing: .04em; color: var(--paper-muted); }
.pos { font: italic 400 .98rem/1.2 var(--body); color: var(--paper-muted); }
.link-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.link-label { font: 500 .72rem/1.2 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--paper-muted); }
@keyframes sticker-slap { 0% { opacity: 0; transform: rotate(-9deg) scale(1.35); } 60% { opacity: 1; transform: rotate(-.5deg) scale(.96); } 100% { opacity: 1; transform: rotate(-1.5deg) scale(1); } }
.slap .hl { animation: sticker-slap .55s cubic-bezier(.34, 1.56, .64, 1) .18s both; }
.hl { display: inline-block; padding: 4px 12px 5px; font: 760 1.12rem/1.2 var(--display); letter-spacing: .03em; color: var(--sticker-ink); background: var(--sticker); border-radius: 4px 12px 4px 12px; transform: rotate(-1.5deg); box-shadow: 0 1px 0 rgba(43, 35, 0, .2), 0 3px 6px -2px rgba(43, 35, 0, .25); }

/* the back of the card, and the answer in the app: a ruled index card */
.ruled, .answer { background-color: var(--paper); background-image: linear-gradient(to bottom, transparent calc(var(--rule) - 1px), var(--paper-rule) calc(var(--rule) - 1px)); background-size: 100% var(--rule); line-height: var(--rule); }
.face-back { padding: 0 clamp(18px, 3vw, 30px) var(--rule); border-radius: 8px; overflow: hidden; color: var(--paper-ink); box-shadow: var(--pinned); }
.back-head { display: flex; align-items: flex-end; gap: 12px; height: calc(var(--rule) * 2); padding-bottom: 7px; margin: 0 calc(-1 * clamp(18px, 3vw, 30px)); padding-left: clamp(18px, 3vw, 30px); padding-right: clamp(18px, 3vw, 30px); background: var(--paper); border-bottom: 2px solid var(--paper-red); }
.back-head .word { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.7rem); }
.def { margin: 0; font: 700 1.2rem/var(--rule) var(--body); color: var(--paper-ink); }
.cap { margin: 0; font: italic 400 1.05rem/var(--rule) var(--body); color: var(--paper-ink); }
.cap b { font-style: normal; font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
.ex-label { margin: 0; font: 500 .7rem/var(--rule) var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--paper-muted); }
.ex, .ex ul { list-style: none; margin: 0; padding: 0; }
.ex li { position: relative; padding-left: 16px; font-size: .95rem; line-height: var(--rule); color: var(--paper-muted); }
.ex li::before { content: ""; position: absolute; left: 2px; top: calc(var(--rule) / 2 - 3px); width: 6px; height: 6px; border-radius: 50%; background: var(--paper-red); }
.answer[hidden] { display: none; }
.answer { margin: 4px -20px -20px; padding: 0 20px var(--rule); border-top: 2px solid var(--paper-red); }
.answer > .ex { margin-top: 0; }
.answer .ex-label { display: block; }

/* ---------- grade buttons, the hero's and the app's ---------- */
.grade {
  --c: var(--hair-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 60px; padding: 8px 4px; border-radius: 12px; border: 2px solid var(--c);
  background: transparent; color: var(--chalk); font: 650 1rem/1.1 var(--display); cursor: pointer;
  transition: background-color .25s var(--ease-settle), transform .25s var(--ease-settle);
}
.grade small { font: 500 .74rem/1 var(--mono); letter-spacing: .06em; color: var(--chalk-2); }
.grade.again { --c: var(--again); }
.grade.hard { --c: var(--hard); }
.grade.good { --c: var(--good); }
.grade.easy { --c: var(--easy); }
.grade:hover { background: color-mix(in srgb, var(--c) 16%, transparent); }
.grade:active { transform: scale(.97); }

/* ---------- sections ---------- */
.sec { padding: clamp(56px, 7vw, 104px) 0; }
.sec-dense { padding: clamp(36px, 4vw, 56px) 0 clamp(56px, 6vw, 88px); }
.sec-rule { display: flex; align-items: center; gap: 18px; margin: 0 0 clamp(26px, 3.4vw, 44px); }
.sec-rule::after { content: ""; flex: 1; height: 1px; background: var(--hair-2); }
.sec-rule .kicker { margin: 0; }
.sec-rule .kicker::before { display: none; }

/* how a card works */
.how { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.how-head { position: sticky; top: 108px; }
.how-head .lede { margin: 22px 0 0; }
.parts { list-style: none; margin: 0; padding: 0; }
.part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); gap: 12px clamp(24px, 3vw, 44px); align-items: start; padding: 28px 0 30px; border-top: 1px solid var(--hair); }
.part:last-child { border-bottom: 1px solid var(--hair); }
.part-label { grid-column: 1; margin: 0; font: 500 .72rem/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-3); }
.part h3 { margin: 0 0 8px; font-size: clamp(1.4rem, 1.15rem + .8vw, 1.85rem); }
.part p { margin: 0; color: var(--chalk-2); }
.part-text { grid-column: 1; }
.part-spec { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; }
.spec-link { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.spec-word { font: 780 1.6rem/1 var(--display); font-variation-settings: "wdth" 92; letter-spacing: .01em; color: var(--chalk); }
.spec-ll { font: 500 .7rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-3); }
.spec-cap { max-width: 200px; font: italic 400 1.05rem/1.45 var(--body); color: var(--chalk); text-align: right; }
.spec-cap b { font-style: normal; font-family: var(--display); font-weight: 700; letter-spacing: .02em; }
.spec-grades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 180px; }
.spec-grades span { display: block; padding: 7px 0; border: 2px solid; border-radius: 10px; text-align: center; font: 650 .88rem/1 var(--display); color: var(--chalk); }
.spec-grades .again { border-color: var(--again); }
.spec-grades .hard { border-color: var(--hard); }
.spec-grades .good { border-color: var(--good); }
.spec-grades .easy { border-color: var(--easy); }

/* how studying works: one word's hops, each longer than the last */
.study-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px clamp(28px, 5vw, 88px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.study-head .lede { margin: 0; }
.hops { list-style: none; margin: 0; padding: 0 28px 46px 0; display: flex; align-items: flex-end; position: relative; }
.hops::before { content: ""; position: absolute; left: 0; right: 0; bottom: 46px; height: 2px; background: var(--hair-2); border-radius: 2px; }
.hops li { position: relative; flex: var(--g) 1 0; min-width: 0; height: calc(var(--g) * 4px + 26px); }
.hops .hop-start { flex: 0 0 0; height: 1px; }
.hops li:nth-child(2) { min-width: 150px; }
.arc { position: absolute; inset: 0 0 0 0; width: 100%; height: 100%; overflow: visible; }
.arc path { fill: none; stroke: var(--chalk); stroke-width: 2; stroke-dasharray: 1 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hops li::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--chalk); }
.hops .hop-start::after { left: -5px; right: auto; background: var(--sticker); }
.hops li:last-child::after { background: var(--sticker); }
.hop-t { position: absolute; top: calc(100% + 18px); right: 0; transform: translateX(50%); font: 500 .8rem/1 var(--mono); letter-spacing: .04em; color: var(--chalk); white-space: nowrap; }
.hop-start .hop-t { left: 0; right: auto; transform: none; color: var(--chalk-2); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 88px); margin: clamp(48px, 6vw, 80px) 0 0; }
.facts > div { min-width: 0; padding: 22px 0 28px; border-top: 1px solid var(--hair); }
.facts dt { margin: 0 0 8px; font: 700 1.25rem/1.2 var(--display); letter-spacing: -0.01em; color: var(--chalk); }
.facts dd { margin: 0; color: var(--chalk-2); max-width: 36em; }

/* the sets */
.sets-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px clamp(28px, 5vw, 88px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sets-head .lede { margin: 0; }
.sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); }
.set { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.pinned { position: relative; border-radius: 6px; background: var(--paper); box-shadow: var(--pinned); transform: rotate(var(--tilt, -.8deg)); }
.set + .set .pinned { --tilt: .9deg; }
.pinned img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.pinned::before { content: ""; position: absolute; z-index: 1; top: 10px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 36% 34%, #FFF1B8 0 18%, var(--sticker) 46%, var(--sticker-dim) 100%); box-shadow: 0 4px 5px rgba(0, 0, 0, .35); }
.set-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.set-meta { margin: 0; font: 500 .75rem/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--chalk-2); }
.set h3 { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem); font-weight: 740; font-variation-settings: "wdth" 90; letter-spacing: -0.02em; }
.set-body > p:not(.set-meta) { margin: 0; color: var(--chalk-2); max-width: 32em; }
.set-buy { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; border-top: 1px solid var(--hair); }
.price { margin: 0; display: inline-flex; align-items: baseline; gap: 8px; }
.price .amt { font: 760 2.6rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--chalk); }
.price .once { font: 500 .72rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-2); }
.bundle { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px 36px; padding: 24px 0; border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.bundle-name h3 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.8rem); }
.bundle-name p { margin: 4px 0 0; color: var(--chalk-2); }
.fine { margin: 18px 0 0; font-size: .95rem; color: var(--chalk-2); }

/* questions */
.qa { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.qa-head { position: sticky; top: 108px; }
.qa-head .lede { margin: 18px 0 0; }
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font: 650 1.15rem/1.3 var(--display); color: var(--chalk); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 1em; height: 1em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .35s var(--ease-settle); }
.faq summary:hover::after { transform: translateY(2px); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0 0 22px; max-width: var(--measure); color: var(--chalk-2); }

/* the page ends */
.coda { padding: clamp(56px, 8vw, 128px) 0 clamp(44px, 5vw, 72px); }
.coda-line { margin: 0; font: 760 clamp(2.6rem, 1.4rem + 5vw, 5.6rem)/.95 var(--display); font-variation-settings: "wdth" 88; letter-spacing: -0.025em; color: var(--chalk); }

.foot { background: var(--board-2); border-top: 1px solid var(--hair); padding: 28px 0 40px; font-size: .95rem; color: var(--chalk-2); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot .credit { margin: 0 auto 0 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- pages: legal, support, restore, unlock, 404 ---------- */
.page { padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 112px); }
.page-short { display: flex; flex-direction: column; justify-content: center; }
.page-short .page-head { margin-bottom: 0; }
.page-head { max-width: 860px; margin-bottom: clamp(32px, 4vw, 56px); }
.page-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.8rem); margin-bottom: 20px; }
.page-head .lede { margin: 0; }
.clause { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, var(--measure)); gap: 6px clamp(28px, 5vw, 72px); padding: 24px 0 8px; border-top: 1px solid var(--hair); }
.clause h2 { font-size: 1.2rem; font-weight: 700; font-variation-settings: "wdth" 100; letter-spacing: -0.005em; line-height: 1.35; padding-top: 1px; }
.clause > :not(h2) { grid-column: 2; color: var(--chalk-2); }
.clause p { margin: 0 0 16px; }
.clause strong { color: var(--chalk); }
.addr { color: var(--chalk-3); font-size: .95rem; }

.card-box { position: relative; max-width: 560px; padding: calc(var(--rule) * 2) 26px var(--rule); border-radius: 8px; color: var(--paper-ink); box-shadow: var(--pinned); }
.card-box::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--rule); background: var(--paper); border-bottom: 2px solid var(--paper-red); border-radius: 8px 8px 0 0; }
.card-box a { color: var(--paper-ink); }
.card-box :focus-visible { outline-color: var(--paper-ink); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; }
.field label { font: 500 .74rem/var(--rule) var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-muted); }
input[type=email], input[type=text], input[type=number] { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1.5px solid var(--hair-2); background: var(--board-2); color: var(--chalk); font: 400 1.05rem/1.3 var(--body); }
.card-box input { background: #FFFFFF; border-color: rgba(31, 40, 51, .35); color: var(--paper-ink); }
input:focus-visible { outline: 3px solid var(--sticker); outline-offset: 2px; border-color: var(--chalk); }
.card-box input:focus-visible { outline-color: var(--paper-ink); border-color: var(--paper-ink); }
.card-box .btn-primary { background: var(--board); color: var(--chalk); border-color: var(--board); }
.card-box .btn-primary:hover { background: var(--board-3); }
.card-box .btn-ghost { color: var(--paper-ink); border-color: rgba(31, 40, 51, .3); }
.notice { margin: 18px 0 0; padding: 12px 16px; border-radius: 8px; border: 1.5px solid var(--good); line-height: 1.5; color: var(--chalk); }
.notice.bad { border-color: var(--again); }
.card-box .notice { background: color-mix(in srgb, var(--good) 24%, var(--paper)); border-color: color-mix(in srgb, var(--good) 70%, var(--paper-ink)); color: var(--paper-ink); }
.card-box .notice.bad { background: color-mix(in srgb, var(--again) 22%, var(--paper)); border-color: color-mix(in srgb, var(--again) 70%, var(--paper-ink)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "form" "after"; column-gap: clamp(32px, 6vw, 104px); }
.split > .page-head { grid-area: head; }
.split > .card-box { grid-area: form; width: 100%; }
.split > .after { grid-area: after; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 28px 0 0; }
.after { margin: 26px 0 0; color: var(--chalk-2); }
code { font: 400 .92em var(--mono); background: var(--chalk-ghost); padding: 1px 6px; border-radius: 4px; }
.keys kbd { font: 500 .85em var(--mono); border: 1px solid var(--hair-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: var(--board-2); }

/* ---------- the study app ---------- */
.app { width: 100%; max-width: 640px; margin: 0 auto; padding: 4px 16px 160px; }
.topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 64px; margin-bottom: 14px; border-bottom: 1px solid var(--hair); }
.topbar .back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font: 600 .95rem/1 var(--display); color: var(--chalk-2); text-decoration: none; white-space: nowrap; }
.topbar .back:hover { color: var(--chalk); }
.topbar .back.wordmark { font-size: 1.1rem; font-weight: 800; color: var(--chalk); gap: 9px; }
.topbar .back.wordmark .mark { width: 26px; height: 26px; font-size: 1rem; }
.topbar .title { font: 700 1.08rem/1.2 var(--body); text-align: center; color: var(--chalk); }
.topbar .counts { justify-self: end; font: 400 .78rem/1 var(--mono); letter-spacing: .02em; color: var(--chalk-2); white-space: nowrap; }
.counts b { color: var(--chalk); font-weight: 600; }
.panel { margin: 14px 0; padding: 22px 22px 20px; background: var(--board-2); border: 1px solid var(--hair); border-radius: 10px; }
.panel h2 { margin: 0 0 6px; font-size: 1.6rem; }
.panel .meta { margin: 0 0 14px; font-size: .95rem; color: var(--chalk-2); }
.panel .meta b { color: var(--chalk); }
.bar { height: 6px; margin: 12px 0 18px; border-radius: 3px; background: var(--hair); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1.5px solid var(--good); border-radius: 999px; font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--good); }
.pill.free { border-color: var(--sticker); color: var(--sticker); background: var(--sticker-ghost); }
.pill.lock { border-color: var(--hair-2); color: var(--chalk-2); }
.app-links { justify-content: center; gap: 26px; margin: 26px 0 0; font: 600 .95rem/1 var(--display); }
.study-card { margin: 6px 0 0; }
.grades, .reveal-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--board-2) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--hair); }
.grades .inner { max-width: 608px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.reveal-bar .inner { max-width: 608px; margin: 0 auto; }
.reveal-bar .btn { min-height: 56px; font-size: 1.05rem; }
.reveal-bar .btn-yellow { background: var(--chalk); color: var(--board); border-color: var(--chalk); border-radius: 12px; }
.reveal-bar .btn-yellow:hover { background: #FFF9EC; border-color: #FFF9EC; transform: none; }
.panel .score { font: 760 2.6rem/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin: 0 0 10px; }
.quiz-q { margin: 0 0 14px; font: 700 1.35rem/1.3 var(--display); color: var(--chalk); }
.options { display: grid; gap: 10px; }
.option { padding: 14px 16px; border-radius: 12px; border: 2px solid var(--hair-2); background: transparent; color: var(--chalk); text-align: left; font: 650 1.08rem/1.3 var(--display); cursor: pointer; transition: border-color .25s var(--ease-settle), background-color .25s var(--ease-settle); }
.option:hover:not([disabled]) { border-color: var(--chalk); background: var(--chalk-ghost); }
.option .muted { font-family: var(--mono); color: var(--chalk-2); }
.option.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }
.option.wrong { border-color: var(--again); background: color-mix(in srgb, var(--again) 14%, transparent); }
.option[disabled] { cursor: default; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--hair); }
.list li:first-child { border-top: 0; }
.list.panel { padding: 6px 22px; }
.list .w { flex: 1; font: 700 1rem/1.3 var(--display); letter-spacing: .01em; color: var(--chalk); }
.list .st { font: 500 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); }
.list .t { font: 400 .78rem/1 var(--mono); color: var(--chalk-2); white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stat { min-width: 0; padding: 16px 14px; background: var(--board-2); border: 1px solid var(--hair); border-radius: 10px; }
.stat .n { font: 760 2rem/1 var(--display); font-variant-numeric: tabular-nums; color: var(--chalk); }
.stat .l { margin-top: 8px; font: 500 .68rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-2); }
.toast { position: fixed; left: 50%; bottom: 104px; z-index: 40; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 10px; background: var(--chalk); color: var(--board); font: 650 .95rem/1.3 var(--display); text-align: center; transform: translateX(-50%); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hair); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting .l { font: 700 1.05rem/1.3 var(--display); color: var(--chalk); }
.setting .d { font-size: .9rem; color: var(--chalk-2); }
.setting input[type=number] { width: 92px; text-align: center; font-family: var(--mono); }
.panel .field label { color: var(--chalk-2); }
.diag { max-height: 200px; overflow: auto; padding: 10px; border-radius: 8px; background: var(--board); font: 400 .78rem/1.5 var(--mono); white-space: pre-wrap; }
.loading { padding: 48px 0; text-align: center; color: var(--chalk-2); }

@media (min-width: 900px) {
  .app { max-width: 712px; }
  .topbar { position: relative; border-bottom: 0; margin-bottom: 26px; }
  .topbar::after { content: ""; position: absolute; left: -16px; right: -16px; bottom: -10px; height: 10px; background: var(--board-2); border-bottom: 1px solid var(--hair-2); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3); }
  /* the art as big as it can be while the word, the answer and the grade row fit one screen,
     by narrowing the card, never by cropping the drawing */
  .app { --card-w: min(680px, max(460px, calc((100vh - 500px) * 4 / 3))); }
  .app:has(.study-card) { max-width: calc(var(--card-w) + 32px); }
  .grades .inner, .reveal-bar .inner { max-width: 680px; }
  body:has(.study-card) .grades .inner, body:has(.study-card) .reveal-bar .inner { max-width: var(--card-w); }
}

/* ---------- reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); filter: blur(5px); transition: opacity .8s var(--ease-settle) var(--d, 0ms), transform .8s var(--ease-settle) var(--d, 0ms), filter .8s var(--ease-settle) var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
/* the hops draw themselves: each arc chalks in after the one before, then its dot lands */
.js .hops[data-draw] .arc { clip-path: inset(-6px 100% -6px -6px); transition: clip-path calc(.3s + var(--g, 0) * 16ms) var(--ease-settle) calc(var(--i, 0) * 260ms - 120ms); }
.js .hops[data-draw] li::after { transform: scale(0); transition: transform .45s var(--ease-settle) calc(var(--i, 0) * 260ms + 140ms); }
.js .hops[data-draw] .hop-t { opacity: 0; transition: opacity .5s var(--ease-settle) calc(var(--i, 0) * 260ms + 180ms); }
.js .hops[data-draw].in .arc { clip-path: inset(-6px -6px -6px -6px); }
.js .hops[data-draw].in li::after { transform: none; }
.js .hops[data-draw].in .hop-t { opacity: 1; }

/* ---------- widths ---------- */
@media (min-width: 1000px) {
  .face-back { --rule: 40px; }
  .face-back .back-head { padding-bottom: 9px; }
  .face-back .back-head .word { font-size: 1.6rem; }
  .face-back .def { font-size: 1.75rem; letter-spacing: -0.005em; }
  .face-back .cap { font-size: 1.3rem; }
  .face-back .ex li { font-size: 1.1rem; padding-left: 20px; }
  .face-back .ex li::before { width: 7px; height: 7px; }
  .face-back .ex-label { font-size: .76rem; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-areas: "head form" "after form"; align-items: start; }
  .split > .card-box { align-self: center; }
}
@media (max-width: 1099px) {
  .note-tap, .note-grade { display: none; }
  .note-line { display: block; }
  .stage { padding-top: 0; }
}
@media (max-width: 999px) {
  .board-in { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .stage { order: -1; justify-self: start; max-width: 720px; }
  .pitch { max-width: 640px; }
  .how, .qa { grid-template-columns: minmax(0, 1fr); }
  .how-head, .qa-head { position: static; }
  .study-head, .sets-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 860px) {
  .nav-link { display: none; }
  .mast .btn + .btn { margin-left: 0; }
  .mast nav { gap: 8px; }
}
@media (max-width: 760px) {
  .sets { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .bundle { grid-template-columns: minmax(0, 1fr) auto; }
  .bundle .btn { grid-column: 1 / -1; }
  .clause { grid-template-columns: minmax(0, 1fr); }
  .clause > :not(h2) { grid-column: 1; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mast-in { min-height: 60px; gap: 10px; }
  .wordmark { font-size: 1.15rem; gap: 9px; }
  .mark { width: 26px; height: 26px; font-size: 1rem; }
  .mast .btn { min-height: 38px; padding: 0 12px; font-size: .9rem; }
  .part { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .part-label { margin: 0; }
  .part-label, .part-text, .part-spec { grid-column: 1; grid-row: auto; }
  .part-spec { justify-self: start; margin-top: 10px; }
  .spec-link { align-items: flex-start; }
  .spec-cap { text-align: left; max-width: none; }
  .hops { flex-direction: column; align-items: stretch; padding: 0 0 0 30px; }
  .hops::before { left: 9px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .hops li, .hops .hop-start { flex: none; height: calc(var(--g, 0) * 3px + 22px); }
  .hops .hop-start { height: 18px; }
  .arc { display: none; }
  .hops li::after, .hops .hop-start::after { left: -26px; right: auto; bottom: 0; }
  .hop-t, .hop-start .hop-t { top: auto; bottom: -4px; left: 0; right: auto; transform: none; }
  .grade-row { gap: 8px; }
  .face-front .toon-body { min-height: 138px; }
  .grade { min-height: 58px; }
  .price .amt { font-size: 2.3rem; }
  .card-box { padding-left: 18px; padding-right: 18px; }
  .panel { padding: 18px 16px 16px; }
  .panel .row > .btn { flex: 1 1 auto; }
  .topbar:has(.back.wordmark) .title { visibility: hidden; }
  .set-buy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 20px; }
  .set-buy .btn { width: 100%; }
  .set-buy .arrow-link { grid-column: 1 / -1; justify-self: start; }
  .foot-nav a:first-child { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .pitch .kicker::before { display: none; }
}

/* ---------- reduced motion: no flip, no slide, no rise ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .flip, .flip.is-flipped { transform: none !important; }
  /* the answer fades in over a front that stays opaque, so the board never shows through */
  .flip > .face { -webkit-backface-visibility: visible; backface-visibility: visible; }
  .face-back { z-index: 1; transform: none; opacity: 0; visibility: hidden; transition: opacity .3s linear, visibility 0s linear .3s !important; }
  .flip.is-flipped .face-back { opacity: 1; visibility: visible; transition: opacity .3s linear, visibility 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .js .hops[data-draw] .arc { clip-path: none; }
  .js .hops[data-draw] li::after { transform: none; }
  .js .hops[data-draw] .hop-t { opacity: 1; }
  .note > span, .note-line, .note-arrow path, .slap .hl { animation: none; }
}
