/* The lessons site's look (2026-10-24): the tools site's stylesheet with ruled paper in place of graph paper.
   It is generator/assets/style.css with the lesson Reels' ruled writing paper in place of
   the graph grid, in the Reels' colours (media/lib/stage.css: paper #fbfaf4, rules #e3dfd2, margin #e8a39b), plus the
   parts a lesson page has. release/lessons-cut.mjs copies it to the site's root, beside fonts/ (the tools site's three
   fonts, SIL Open Font License beside them); every page links it, so the paper is set in this one file.
   Latin letters only in the three fonts: anything else falls back to the system font. */
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/kalam-700-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; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/caveat-700-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; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/jetbrainsmono-700-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 {
  color-scheme: light;
  --bg: #fbfaf4;
  --rule: #e3dfd2;
  --line: 28px;
  /* the text column's wash: the paper, nearly opaque, so the ruled lines barely show under the words */
  --wash: rgb(251 250 244 / .86);
  --margin: #e8a39b;
  --pen: #1d1c1a;
  --red: #c8372a;
  --surface: #fffef9;
  --code-bg: #f6f3e9;
  --text: #1d1c1a;
  --muted: #5d5950;
  --border: #ddd7c6;
  --accent: #0b6b5d;
  --focus: #1f5fd6;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* ruled writing paper: a line every 28 px, always (a dark-mode screen gets the same paper) */
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); overflow-wrap: break-word;
  background-image: repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px) var(--line)); background-position: 0 12px; }
/* the red margin line, near the screen's left edge (12 to 64 px in); on a narrow screen the text starts just right of it */
body::before { content: ""; position: fixed; top: 0; bottom: 0; left: clamp(12px, 4vw, 64px); width: 2px; background: var(--margin); pointer-events: none; }
main { max-width: 46rem; margin: 0 auto; padding: 20px 16px 96px; background: var(--wash); box-shadow: 0 0 32px 32px var(--wash); }
@media (max-width: 900px) { main { padding-left: calc(clamp(12px, 4vw, 64px) + 14px); } }
a { color: var(--accent); }
h1 { font-size: 1.85rem; line-height: 1.2; margin: .4rem 0 .5rem; letter-spacing: -0.01em; }
/* labels in black pen */
h2 { font: 700 1.6rem/1.2 Kalam, var(--sans); color: var(--pen); margin: 2rem 0 .5rem; }
h3 { font: 700 1.25rem/1.25 Kalam, var(--sans); color: var(--pen); margin: 1.2rem 0 .3rem; }
/* the series label, as on the Reels: FREE-PUBLIC-LESSONS */
h1.label { font: 700 1.7rem/1.2 "JetBrains Mono", var(--mono); color: var(--accent); letter-spacing: .06em; text-transform: uppercase; overflow-wrap: anywhere; }
p { margin: .5rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--code-bg); border: 1px solid var(--border); border-radius: 5px; padding: .05em .3em; overflow-wrap: anywhere; }
pre { margin: .6rem 0; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius); font: 13px/1.5 var(--mono); white-space: pre; overflow: auto; max-width: 100%; tab-size: 4; overflow-wrap: normal; }
pre code { border: 0; padding: 0; background: transparent; font-size: inherit; overflow-wrap: normal; }
a:focus-visible, .btn:focus-visible, pre:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; font-size: .95rem; margin: .7rem 0; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
/* the back link at the left and the page's kind at the far right, in red pen */
.topline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.crumbs a { font: 700 1.35rem/1.2 Caveat, cursive; color: var(--red); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: .5rem; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .8rem; font-weight: 600; color: var(--muted); }
.badge.kind { padding: 0; border: 0; border-radius: 0; background: none; font: 700 1.45rem/1 Caveat, cursive; color: var(--red); transform: rotate(-3deg); }
.summary { font-size: 1.05rem; color: var(--muted); }
.why { margin: .9rem 0 0; padding: .6rem .85rem; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.why p { margin: .3rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions.aside { align-items: center; column-gap: 12px; }
.aside-why { flex: 1 1 16rem; font-size: .9rem; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 .95rem/1.2 var(--sans); text-decoration: none; text-align: center; max-width: 100%; }
.btn:hover { border-color: var(--accent); }
footer, .foot { margin-top: 3rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1rem; }
/* the home page's lessons, newest first: each lesson's picture, title and first line, the whole card a link */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.card { margin: 0; }
.card .badges { margin: 0 0 6px; }
.card a.title { display: block; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 22px rgb(0 0 0 / .08); transition: transform .15s, box-shadow .15s; }
.card a.title:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 2px 4px rgb(0 0 0 / .08), 0 14px 30px rgb(0 0 0 / .12); }
.card .art { display: block; background: #ffffff; border-bottom: 1px solid var(--border); padding: 10px; }
.card .art img { display: block; width: 100%; height: auto; }
.card .words { display: block; padding: 10px 16px 14px; }
.card h3 { margin: 0 0 .2rem; font: 700 1.2rem/1.3 var(--sans); color: var(--text); }
.card .hook { display: block; color: var(--muted); }
/* a lesson with a Reel: its title over the card, beside its badges; the card its Reel's cover, phone-shaped, with a play
   mark, since the Reel is the lesson's front, and its picture beside it, the two the same height (the columns in the
   ratio of their widths at one height: 9/16 to 963/830, 1 to 2.0626) */
.card .head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; margin: 0 0 6px; }
.card .head .badges { margin: 0; }
.card .head h3 { margin: 0; font: 700 1.35rem/1.25 Kalam, var(--sans); }
.card .head h3 a { color: var(--pen); text-decoration: none; }
.card .head h3 a:hover { text-decoration: underline; }
.card a.title.has-reel { display: grid; grid-template-columns: 1fr 2.0626fr; }
.card .art.cover { position: relative; padding: 0; border-bottom: 0; border-right: 1px solid var(--border); background: var(--bg); }
.card .art.pic { padding: 0; border-bottom: 0; }
.card .art.cover .play { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgb(29 28 26 / .72); }
.card .art.cover .play::after { content: ""; position: absolute; left: 19px; top: 14px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fffef9; }/* a lesson page: the picture on white, the boxes ("Simplified on purpose", "Your turn") as panels */
figure { margin: 1rem 0; }
figure .art { background: #ffffff; border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
figure img { display: block; width: 100%; height: auto; }
figcaption { font-size: .875rem; color: var(--muted); margin-top: .4rem; }
/* the lesson's Reel, under its title, on a strip of the Reel's own ruled paper across the screen: the strip's lines are
   the video's, carried out past both its sides at the same scale and height. --h is the video's height: 736.4 px puts its
   lines 28 px apart, as the page's are (the Reel's are 73 px apart at 1920 px tall, from 110 px down; media/lib/stage.css
   #rules), less on a short or narrow screen. --pad is one of its lines, above and below. */
.reel { --h: min(736.4px, 82vh, calc((100vw - 64px) * 16 / 9)); --step: calc(var(--h) * 73 / 1920); --pad: var(--step);
  margin: 1.2rem calc(50% - 50vw); padding: var(--pad) 0; background-color: var(--bg);
  background-image: repeating-linear-gradient(transparent 0 calc(var(--step) * 70 / 73), var(--rule) calc(var(--step) * 70 / 73) var(--step));
  background-position: 0 calc(var(--pad) + var(--h) * 40 / 1920); }
.reel video { display: block; margin: 0 auto; height: var(--h); width: calc(var(--h) * 9 / 16); background: var(--bg); }
/* on a narrow screen the column's left padding is wider than its right (main, below 900 px): the strip shifts by half the
   difference to start at the screen's edge; and the page clips sideways, since 100vw counts a scrollbar */
@media (max-width: 900px) { .reel { margin-left: calc(50% - 50vw - (clamp(12px, 4vw, 64px) - 2px) / 2); margin-right: calc(50% - 50vw + (clamp(12px, 4vw, 64px) - 2px) / 2); } }
html { overflow-x: clip; }
.box { margin: 2rem 0 0; padding: .4rem 1rem .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.box h2 { margin-top: .4rem; }
.featured { font-size: 1.1rem; font-weight: 600; margin: .4rem 0 .2rem; }
.cta { color: var(--muted); margin: 0 0 .6rem; }
.tier { font-weight: 600; }
.stones .said { font-style: italic; }
.stones .where { color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .card a.title { transition: none; } .card a.title:hover { transform: none; } }
/* No programming ligatures: a font such as Cascadia Code draws "-->" as an arrow, and the page must show the characters
   a reader copies. Keep this last: the font shorthand above resets ligatures. */
pre, code { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
