/* Educational Superintelligence. Workbook paper: slow down, show every step. */

/* The font files hold only the letters, numbers and marks this site uses, and only the weights
   it sets. unicode-range names that set: tests/pages.test.mjs fails if a page steps outside it. */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-text-normal.woff2") format("woff2");
  font-weight: 400 650;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+00D7, U+00F7, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+2212;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-text-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+00D7, U+00F7, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+2212;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-next-text-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00B7, U+00D7, U+00F7, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+2212;
}

:root {
  --paper: #fbf4e6;
  --paper-2: #f5ead4;
  --paper-3: #eedfc2;
  --page: #fffaf0;
  --ink: #14324a;
  --ink-2: #3d566a;
  --sun: #f0a92b;
  --ray: #d94f29;
  --ember: #b83d18;
  --ember-deep: #9c3112;
  --leaf: #276b5e;
  --night: #0f2a40;
  --night-2: #17395a;
  --dawn-text: #fdf3de;
  --dawn-text-2: #c9d6df;
  --rule: rgb(20 50 74 / 0.16);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --wide: 72rem;
}

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

html {
  color-scheme: only light;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 106.25%;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ink-2) var(--paper-2);
  caret-color: var(--ray);
  accent-color: var(--ember);
}
body { margin: 0; overflow-x: clip; }

::selection { background: var(--sun); color: var(--night); }

a { color: inherit; text-decoration-color: var(--ray); text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--ray); outline-offset: 3px; border-radius: 4px; }
p, li, dd, figcaption { text-wrap: pretty; }

h1, h2, h3 { font-family: var(--display); font-weight: 480; line-height: 1.06; letter-spacing: -0.022em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7.2vw, 5.1rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 560; }
p { margin: 0; }
cite { font-style: normal; color: var(--ink-2); }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--night); color: var(--dawn-text); padding: 0.6rem 1rem; border-radius: 8px; z-index: 5; }
.skip:focus { top: 1rem; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; max-width: var(--wide); margin: 0 auto; padding: 1.25rem var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; min-height: 44px; }
.brand-name { font-family: var(--display); font-weight: 560; font-size: clamp(0.92rem, 0.5rem + 1.6vw, 1.02rem); line-height: 1.05; letter-spacing: -0.01em; }
.brand-name span { display: block; }
.mark-third { fill: var(--sun); }
.mark-quarter { fill: var(--ray); }
.mark-line { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.top-join { font-weight: 640; font-size: 0.9rem; white-space: nowrap; text-decoration: none; padding: 0.62rem clamp(0.8rem, 3vw, 1.05rem); border-radius: 999px; background: var(--ink); color: var(--paper); min-height: 44px; display: inline-flex; align-items: center; transition: background-color 0.2s var(--ease); }

/* Hero */
.hero { max-width: var(--wide); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 6rem); display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
/* A grid child may not grow past its column, so a wide drawing can never push the page sideways. */
.hero > *, .moves > * { min-width: 0; }
.lede { font-size: clamp(1.12rem, 1.7vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 34rem; margin-top: 1.4rem; }
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

/* Waitlist form */
.join { margin-top: 2rem; max-width: 33rem; }
.join label { display: block; font-weight: 640; font-size: 0.9rem; margin-bottom: 0.45rem; }
.join-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.join input[type="email"] { flex: 1 1 14rem; min-width: 0; font: inherit; color: var(--ink); background: var(--page); border: 1.5px solid var(--ink); border-radius: 12px; padding: 0.82rem 1rem; min-height: 52px; transition: box-shadow 0.2s var(--ease); }
.join input[type="email"]::placeholder { color: var(--ink-2); opacity: 1; }
.join input[type="email"]:focus-visible { outline: 3px solid transparent; box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ray); }
.join input[aria-invalid="true"] { border-color: var(--ember-deep); }
.join button { flex: 0 0 auto; font: inherit; font-weight: 700; color: #fff; background: var(--ember); border: 0; border-radius: 12px; padding: 0.82rem 1.4rem; min-height: 52px; cursor: pointer; box-shadow: 0 10px 22px -12px rgb(156 49 18 / 0.75); transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.join button:active { transform: translateY(0); }
.join button[aria-disabled="true"] { background: var(--ink-2); box-shadow: none; cursor: progress; transform: none; }
/* A finger has no hover, so the lift is kept for pointers that do. */
@media (hover: hover) {
  .top-join:hover { background: var(--night-2); }
  .join button:hover { background: var(--ember-deep); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgb(156 49 18 / 0.8); }
}
.join-status { min-height: 1.6em; margin-top: 0.6rem; font-weight: 640; font-size: 0.95rem; }
.join-status[data-state="error"] { color: var(--ember-deep); }
.join-note { font-size: 0.9rem; color: var(--ink-2); }
.join-done { font-family: var(--display); font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.012em; margin-top: 2rem; max-width: 30rem; }
@media (prefers-reduced-motion: no-preference) { .join-done { animation: land 0.5s var(--ease) both; } }
.join-done:focus { outline: none; }
.join-done:focus-visible { outline: 2px dotted currentColor; outline-offset: 6px; }
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 30rem) { .join button { flex: 1 1 100%; } }

/* A worksheet. The picture comes before the rule. */
.sheet { margin: 0; background: var(--page); border-radius: 14px; box-shadow: 0 1px 2px rgb(20 50 74 / 0.08), 0 24px 48px -28px rgb(20 50 74 / 0.4); padding: clamp(1.4rem, 3.4vw, 2.4rem); }
.sheet-q { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
.sheet svg { display: block; width: 100%; height: auto; margin-top: 1.5rem; overflow: visible; }
/* Each bar carries an ink outline, as a pencil would leave it, so the pale one still reads on the page. */
.bar { stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bar-third { fill: var(--sun); }
.bar-quarter { fill: var(--ray); }
.bar-label { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 28px; fill: var(--ink); }
.rule-line, .ticks path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.tick-label { font-family: var(--display); font-weight: 560; font-size: 27px; fill: var(--ink-2); }
/* Fractions are stacked, the way a workbook prints them. */
.frac path { fill: none; stroke: var(--ink-2); stroke-width: 2.5; stroke-linecap: round; }
/* The answer is written under the picture, and its first words are underlined in red pencil. */
.sheet-a { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.3; margin-top: 0.9rem; }
.sheet-a strong { font-weight: 600; padding-bottom: 0.1em; background: linear-gradient(var(--ray), var(--ray)) no-repeat left bottom / 100% 0.09em; }
.sheet figcaption { color: var(--ink-2); font-size: 0.95rem; margin-top: 0.6rem; }
/* The drawing shrinks with a phone, so its lettering is set larger there to stay readable. */
@media (max-width: 34rem) { .bar-label { font-size: 36px; } .tick-label { font-size: 34px; } }
@media (max-width: 24rem) { .bar-label { font-size: 40px; } .tick-label { font-size: 36px; } }
/* Beside the headline the drawing is small again, so its lettering is set larger there too. */
@media (min-width: 62rem) { .bar-label { font-size: 36px; } .tick-label { font-size: 32px; } }

/* Motion explains, never decorates. On load each bar grows to its length, then its tick and its
   fraction land where the bar ends, so the eye sees one third pass one quarter. Every hidden
   start state lives inside a guard: with motion off, the finished picture is simply there. */
@media (prefers-reduced-motion: no-preference) {
  .bar { transform-box: fill-box; transform-origin: left center; animation: grow 1.1s var(--ease) both; }
  .bar-quarter { animation-delay: 0.25s; }
  .bar-label { animation: name 0.6s var(--ease) both; }
  .bar-label-third { animation-delay: 0.8s; }
  .bar-label-quarter { animation-delay: 1.05s; }
  .tick-third, .tick-quarter { transform-box: fill-box; transform-origin: center; animation: tick 0.4s var(--ease) both; }
  .tick-third { animation-delay: 1s; }
  .tick-quarter { animation-delay: 1.25s; }
  .frac { animation: land 0.5s var(--ease) both; }
  .frac-third { animation-delay: 1.2s; }
  .frac-quarter { animation-delay: 1.45s; }
  .sheet-a { animation: land 0.5s var(--ease) 1.9s both; }
  .sheet-a strong { animation: ink 0.6s var(--ease) 2.3s both; }
}
@keyframes grow { from { transform: scaleX(0.05); } }
@keyframes name { from { opacity: 0; transform: translateX(-10px); } }
@keyframes tick { from { opacity: 0; transform: scaleY(0); } }
@keyframes land { from { opacity: 0; transform: translateY(-6px); } }

/* The picture */
.picture { background: var(--paper-2); padding: clamp(3rem, 8vw, 6.5rem) var(--gutter); display: grid; grid-template-columns: minmax(0, calc(var(--wide) - 2 * var(--gutter))); justify-content: center; }
.picture p { font-family: var(--display); font-weight: 420; font-size: clamp(1.55rem, 3.6vw, 2.6rem); line-height: 1.22; letter-spacing: -0.018em; max-width: 22em; }
.picture-note { background: var(--paper-3); }

/* How it teaches: six rules. The lead words are underlined, the way a workbook marks its vocabulary. */
.teach { max-width: var(--wide); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
.teach-head { display: grid; gap: 2.25rem; }
.teach-head > * { min-width: 0; }
@media (min-width: 62rem) { .teach-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: end; } }
.teach-lede { margin-top: 1.3rem; max-width: 36rem; font-size: 1.12rem; }
/* First principles, drawn: both fractions cut into the same twelve pieces, so the pieces can be counted. */
.strip { margin: 0; max-width: 34rem; }
.strip svg { display: block; width: 100%; height: auto; overflow: visible; }
.strip-grid { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.strip-quarter rect { fill: var(--ray); }
.strip-third rect { fill: var(--sun); }
.strip-label { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 28px; fill: var(--ink); }
.strip figcaption { color: var(--ink-2); font-size: 0.95rem; margin-top: 0.8rem; }
@media (max-width: 34rem) { .strip-label { font-size: 36px; } }
.rules-intro { margin-top: clamp(2rem, 4vw, 3.25rem); font-family: var(--display); font-weight: 560; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.01em; }
.rules { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; border-bottom: 1px solid var(--rule); }
.rules li { border-top: 1px solid var(--rule); padding: 1.15rem 0; font-size: clamp(1.06rem, 1.5vw, 1.18rem); line-height: 1.45; }
.rules b { font-family: var(--display); font-weight: 600; font-size: 1.16em; letter-spacing: -0.01em; text-decoration: underline; text-decoration-color: var(--ray); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; margin-right: 0.3em; }
.teach-source { margin-top: 1.6rem; max-width: 34rem; color: var(--ink-2); font-size: 0.97rem; }
@media (min-width: 48rem) { .rules { grid-template-columns: 1fr 1fr; column-gap: clamp(2.5rem, 5vw, 5rem); } }

/* The tutor's question */
.moves { max-width: var(--wide); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); }
.moves-intro p { margin-top: 1.3rem; max-width: 34rem; }
.moves-intro .aside { color: var(--ink-2); font-size: 0.97rem; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
@media (min-width: 62rem) {
  .moves { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); align-items: start; }
  .moves-intro { position: sticky; top: 2.5rem; }
}

/* A workbook page: ruled lines and a margin line belong to the paper. */
.notebook { --line: 1.9rem; --margin: 5.3rem; position: relative; margin: 0; background-color: var(--page); background-image: linear-gradient(to bottom, transparent calc(var(--line) - 1px), rgb(20 50 74 / 0.13) calc(var(--line) - 1px)); background-size: 100% var(--line); background-position: 0 calc(var(--line) * 0.72); border-radius: 14px; box-shadow: 0 1px 2px rgb(20 50 74 / 0.08), 0 24px 48px -28px rgb(20 50 74 / 0.4); padding: calc(var(--line) * 1.72) clamp(0.8rem, 3vw, 2rem) calc(var(--line) * 1.28) 0; line-height: var(--line); font-size: 1rem; }
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin); width: 1px; background: rgb(217 79 41 / 0.6); }
.nb-student { font-family: var(--display); font-style: italic; font-size: 1.22rem; line-height: var(--line); padding-left: calc(var(--margin) + 0.9rem); margin-bottom: var(--line); }
.nb-student span { display: block; font-family: var(--body); font-style: normal; font-size: 0.86rem; font-weight: 640; color: var(--ink-2); }
.nb-student q { quotes: none; }
.notebook dl { margin: 0; }
.notebook dl > div { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); margin-bottom: var(--line); }
.notebook dt { font-family: var(--display); font-style: italic; font-weight: 560; font-size: 1rem; color: var(--ember-deep); text-align: right; padding-right: 0.6rem; }
.notebook dd { margin: 0; padding-left: 0.9rem; }
/* The tutor's question, drawn. The picture is three ruled lines tall, so the page keeps its lines. */
.pies { display: block; height: calc(var(--line) * 3); width: auto; max-width: 100%; }
.slice-quarter { fill: var(--ray); }
.slice-third { fill: var(--sun); }
.pie-lines { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.notebook figcaption { padding-left: calc(var(--margin) + 0.9rem); font-size: 0.88rem; color: var(--ink-2); }
@media (min-width: 40rem) { .notebook { --margin: 8.4rem; font-size: 1.03rem; } .notebook dt { font-size: 1.2rem; } }
/* On a phone the speaker's name sits above its line, so the writing keeps a readable width. */
@media (max-width: 30rem) {
  .notebook { --margin: 2.2rem; }
  .notebook dl > div { grid-template-columns: minmax(0, 1fr); padding-left: var(--margin); }
  .notebook dt { text-align: left; padding: 0 0 0 0.9rem; }
}

/* What the school owns: the stack. The picture comes first, then one band for each layer. */
.layers { --edge: max(var(--gutter), calc(50% - var(--wide) / 2 + var(--gutter))); background: var(--paper-2); padding: clamp(4rem, 9vw, 7.5rem) 0 0; }
.layers-head { padding: 0 var(--edge); display: grid; gap: 2.25rem; }
.layers-head p { margin-top: 1.3rem; max-width: 34rem; }
.stack { display: block; width: min(100%, 21.5rem); height: auto; overflow: visible; }
.slab rect { stroke: var(--ink); stroke-width: 2; }
.slab-tutor rect { fill: var(--page); }
.slab-ai rect { fill: var(--paper-3); }
.slab-computer rect { fill: #e4d2ae; }
.slab text, .stack-yours text { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 22px; fill: var(--ink); }
.stack-yours path { fill: none; stroke: var(--ray); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.stack-yours text { font-weight: 600; font-size: 24px; }
@media (min-width: 62rem) { .layers-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4rem; } }
.strata { margin: clamp(2.5rem, 5vw, 4rem) 0 0; }
.strata > div { padding: clamp(1.6rem, 3.4vw, 2.6rem) var(--gutter) clamp(1.6rem, 3.4vw, 2.6rem) var(--edge); border-top: 1px solid var(--rule); }
.strata > div:nth-child(1) { background: var(--page); }
.strata > div:nth-child(2) { background: var(--paper-3); }
.strata > div:nth-child(3) { background: #e4d2ae; }
.strata dt { font-family: var(--display); font-weight: 480; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.strata dt span { display: block; font-family: var(--body); font-size: 0.86rem; font-weight: 640; letter-spacing: 0; line-height: 1.4; color: var(--ink-2); margin-bottom: 0.3rem; }
.strata dd { margin: 0.5rem 0 0; max-width: 34rem; }
@media (min-width: 48rem) {
  .strata > div { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 34rem); column-gap: 2rem; align-items: baseline; }
  .strata dd { margin: 0; }
}

/* Fit */
.fit { max-width: var(--wide); margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); }
.fit-cols { display: grid; gap: 2.75rem; margin-top: clamp(2rem, 4vw, 3.25rem); }
.fit ul { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.fit li { position: relative; padding: 0.85rem 0 0.85rem 2.4rem; border-top: 1px solid var(--rule); }
.fit li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 1.5rem; height: 1.05rem; background: no-repeat left center / contain; }
.fit .yes li::before { background-image: url("/assets/mark-yes.svg"); }
@media (min-width: 48rem) { .fit-cols { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(3rem, 6vw, 6rem); } }

/* Today */
.today { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) clamp(4rem, 9vw, 7.5rem); }
.today-lede { margin-top: 1.3rem; max-width: 36rem; font-size: 1.12rem; }
.ledger { margin: clamp(2rem, 4vw, 3rem) 0 0; border-bottom: 1px solid var(--rule); }
.ledger > div { border-top: 1px solid var(--rule); padding: 1.3rem 0; display: grid; gap: 0.35rem; }
.ledger dt { font-family: var(--display); font-weight: 560; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.01em; }
.ledger > div:first-child dt { color: var(--leaf); }
.ledger dd { margin: 0; max-width: 34rem; }
.ledger ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
@media (min-width: 48rem) { .ledger > div { grid-template-columns: 13rem minmax(0, 1fr); align-items: baseline; } }
.grounds { margin-top: clamp(2rem, 4vw, 3rem); display: grid; gap: 1.5rem; }
.grounds p { max-width: 34rem; }
@media (min-width: 62rem) { .grounds { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* Close */
.close { position: relative; background: var(--night); color: var(--dawn-text); padding: clamp(4.5rem, 10vw, 8rem) var(--gutter); overflow: hidden; }
.close-inner { position: relative; max-width: 40rem; margin: 0 auto; }
.close p { color: var(--dawn-text-2); margin-top: 1.2rem; max-width: 34rem; }
.close .join label { color: var(--dawn-text); }
.close .join input[type="email"] { border-color: transparent; }
.close .join input[type="email"]:focus-visible { box-shadow: 0 0 0 3px var(--night), 0 0 0 6px var(--sun); }
.close .join-note, .close .join-status { color: var(--dawn-text-2); margin-top: 0.6rem; }
.close .join-status[data-state="error"] { color: #ffb59a; }
.close .join-done { color: var(--dawn-text); }
.close a { text-decoration-color: var(--sun); }
.close :focus-visible { outline-color: var(--sun); }

/* Footer */
.foot { background: var(--night); color: var(--dawn-text-2); border-top: 1px solid rgb(253 243 222 / 0.16); padding: 2rem var(--gutter) 2.5rem; font-size: 0.92rem; display: grid; gap: 0.35rem; justify-items: center; text-align: center; }
.foot-name { font-family: var(--display); font-size: 1.1rem; color: var(--dawn-text); }
.foot a { text-decoration-color: var(--sun); margin: 0 0.5rem; display: inline-block; padding: 0.6rem 0; }
.foot p:nth-child(2) a { margin: 0; }
.foot :focus-visible { outline-color: var(--sun); }

/* Plain text pages */
.plain { max-width: 35rem; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) clamp(4rem, 9vw, 7rem); }
.plain h1 { font-size: clamp(2.2rem, 5.4vw, 3.4rem); }
.plain h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.plain p, .plain ul { margin-top: 1rem; }
.plain ul { padding-left: 1.2rem; }
.plain li { margin-top: 0.4rem; }

/* Further down, things arrive as they are read: the twelve pieces counted in one at a time, so
   the third's fourth piece lands alone; the ink under each rule's lead words; the stack set down
   one layer at a time from the computer up; and the tutor's question after the student's line.
   A drawing is built once all of it is on screen. A browser without scroll timelines, or a
   visitor with motion off, gets the finished page. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rules b { text-decoration: none; padding-bottom: 0.14em; background: linear-gradient(var(--ray), var(--ray)) no-repeat left bottom / 100% 0.08em; animation: ink linear both; animation-timeline: view(); animation-range: entry 40% cover 32%; }
    .notebook dl > div { animation: arrive linear both; animation-timeline: view(); animation-range: entry 0% cover 16%; }
    .stack { view-timeline-name: --stack; }
    .slab, .stack-yours { animation: set linear both; animation-timeline: --stack; }
    .slab-computer { animation-range: entry 40% entry 100%; }
    .slab-ai { animation-range: entry 100% contain 12%; }
    .slab-tutor { animation-range: contain 10% contain 22%; }
    .stack-yours { animation-name: arrive; animation-range: contain 20% contain 32%; }
    .strip svg { view-timeline-name: --strip; }
    .strip-fill rect { animation: count linear both; animation-timeline: --strip; }
    .strip-fill rect:nth-child(1) { animation-range: entry 60% entry 100%; }
    .strip-fill rect:nth-child(2) { animation-range: entry 100% contain 10%; }
    .strip-fill rect:nth-child(3) { animation-range: contain 8% contain 18%; }
    .strip-fill rect:nth-child(4) { animation-range: contain 18% contain 30%; }
  }
}
@keyframes ink { from { background-size: 0% 0.08em; } }
@keyframes arrive { from { opacity: 0; transform: translateY(0.7rem); } }
@keyframes set { from { opacity: 0; transform: translateY(-1rem); } }
@keyframes count { from { opacity: 0; } }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
@media print {
  *, *::before, *::after { animation: none !important; }
  .rules b, .sheet-a strong { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
