/* App pages (library, lesson, sign-in, checkout, legal): the landing's header and tokens on a light reading band (the reference's .theme--light). */
@import url(/fonts.css);
*, *::before, *::after { box-sizing: border-box; }
body.app { margin: 0; background: var(--paper); color: var(--ink-on-light); font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; --muted: var(--muted-on-light); --line: var(--hairline-light); --surface: var(--paper-1); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-sans); font-weight: var(--fw-medium); margin: 0; letter-spacing: var(--track-tight); }
.wrap { max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--gutter); }
main.narrow-read { max-width: calc(var(--wrap-narrow) + var(--gutter) * 2); padding-block: var(--band-y); }
main.wide { padding-block: var(--band-y); }
.hp { position: absolute; left: -9999px; }
.fine { font-size: var(--fs-sm); color: var(--muted); }
.lead { font-size: var(--fs-md); color: var(--muted); }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
form.inline { display: inline; }
.langs { display: inline-flex; gap: 10px; font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; }
.langs a { text-decoration: none; opacity: .62; transition: opacity var(--dur) var(--ease); }
.langs a:hover { opacity: 1; }
/* Pills: dark on the light band, white in the dark header */
.pill, .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--pill-gap); padding: var(--pill-pad); min-height: var(--pill-h); border-radius: var(--r-pill); border: 1px solid var(--ink-on-light); background: var(--ink-on-light); color: #fff; font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: var(--fs-sm); letter-spacing: var(--track-wide); text-decoration: none; cursor: pointer; transition: background-color var(--dur) var(--ease), opacity var(--dur) var(--ease); white-space: nowrap; }
.pill:hover, .btn:hover { background: rgba(11,10,10,.8); }
.pill-small, .btn.small { padding: var(--pill-pad-sm); min-height: var(--pill-h-sm); }
.btn.ghost { background: transparent; color: var(--ink-on-light); }
/* Forms */
input[type=email], input[type=search] { width: 100%; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid rgba(11,10,10,.25); background: #fff; color: var(--ink-on-light); font: inherit; font-size: var(--fs-base); }
input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: grid; gap: 8px; font-size: var(--fs-sm); color: var(--muted); margin: 14px 0; }
.narrow { max-width: 520px; }
.narrow h1, .lib-head h1, .lesson h1 { font-size: var(--fs-xxl); line-height: var(--lh-heading); letter-spacing: var(--track-display); margin-bottom: var(--stack); }
.ok { background: #eef6e9; padding: 14px 16px; border-radius: var(--r-sm); }
.err { background: #fbeaea; padding: 14px 16px; border-radius: var(--r-sm); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: var(--fs-sm); color: var(--ink-on-light); }
.consent input { margin-top: 5px; }
/* Library */
.lib-head { margin-bottom: calc(var(--stack) * 2); }
.search { display: flex; gap: 8px; align-items: center; margin: 14px 0; max-width: 640px; }
.search input { flex: 1; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--stack); }
.cat { border-radius: var(--r-frame); padding: 24px; background: var(--surface); }
.cat h2 { font-size: var(--fs-md); margin-bottom: 4px; }
.cat h2 a { text-decoration: none; }
.cat > p { color: var(--muted); font-size: var(--fs-sm); }
.cat ol { padding-left: 22px; margin: 12px 0 0; }
.cat li { margin: 10px 0; }
.cat li.is-done > a { color: var(--muted); text-decoration: line-through; }
.snippet { color: var(--muted); font-size: var(--fs-sm); }
.crumbs { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.crumbs a { text-decoration: none; }
.kind { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 6px; }
.lesson .lead { margin-bottom: var(--stack); }
.prose { font-size: var(--fs-base); }
.prose h2 { margin-top: 40px; font-size: var(--fs-lg); line-height: 1.1; }
.prose h3 { margin-top: 28px; font-size: var(--fs-md); }
.prose p, .prose li { max-width: 68ch; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); margin: 16px 0; }
.prose th, .prose td { border-top: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.prose pre { background: var(--surface); padding: 14px; overflow: auto; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.prose blockquote { border-left: 3px solid var(--ink-on-light); margin: 16px 0; padding: 4px 16px; color: var(--muted); }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; word-break: break-word; }
.downloads { border-radius: var(--r-frame); padding: 18px 22px; margin: 22px 0; background: var(--surface); }
.downloads h2 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; font-family: var(--font-mono); margin-bottom: 8px; color: var(--muted); }
.downloads ul { margin: 0; padding-left: 18px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; border-top: 1px solid var(--line); padding-top: 18px; font-family: var(--font-sans); }
.pager a { text-decoration: none; }
.done { margin: 28px 0; }
.band { padding: var(--band-y) 0; }
.band h2 { font-size: var(--fs-lg); margin-bottom: var(--stack); }

/* Language select, header, phone menu and footer: public/chrome.css (one header and one footer on every page, 2026-09-27). */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Wide tables in lessons scroll sideways on phones instead of widening the page (2026-09-27). */
@media (max-width: 699px) { .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }
.lang-note { background: var(--paper-1); border-radius: var(--r-sm); padding: 10px 14px; font-size: var(--fs-sm); }
/* Not found and message pages with more than one way out */
.nf-exits, .exits { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 24px 0 0; }
.nf-exits a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: var(--r-pill); border: 1px solid var(--ink-on-light); font-family: var(--font-sans); font-size: 15px; text-decoration: none; }
.nf-exits li:first-child a { background: var(--ink-on-light); color: #fff; }
/* Short pages (404, sign in) keep the footer at the bottom of the screen. */
body.app { min-height: 100vh; display: flex; flex-direction: column; }
body.app > main { flex: 1 0 auto; width: 100%; }
/* The free lessons (audit 2026-09-27, items 26, 28, 30, 31). The chart: one series, the site's accent (#b56ed9, checked
   with the dataviz validator on white), bars 20 px, 4 px rounded end, square at the baseline, a lighter wash for a range;
   labels in ink, never in the bar colour. Tables slide on a phone and say so. */
.crumbs, .kind, .downloads h2 { font-family: var(--font-sans); }
.stair { margin: 28px 0 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; }
.stair figcaption { display: grid; gap: 4px; margin-bottom: 14px; font-family: var(--font-sans); }
.stair figcaption b { font-size: var(--fs-md); font-weight: var(--fw-medium); }
.stair figcaption span { font-size: var(--fs-sm); color: var(--muted); }
.stair-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stair-label { margin: 0 0 4px; font-size: var(--fs-sm); line-height: 1.35; }
.stair-label b { font-weight: var(--fw-semi); }
.stair-label span { color: var(--muted); }
.stair-bar { display: block; }
.stair-fill { fill: var(--accent); }
.stair-range { fill: var(--accent); fill-opacity: .35; }
.stair-zero { fill: var(--ink-on-light); fill-opacity: .35; }
.table-hint { display: none; font-size: var(--fs-sm); color: var(--muted); margin-top: -8px; }
@media (max-width: 699px) { .table-hint { display: block; } }
.free-exits { margin-top: 20px; }
.free-lesson .band .btn { font-size: var(--fs-sm); }
.free-lesson .ip-cta .buy-form { flex: none; }
