/* ═══════════════════════════════════════════════════════════════════════════
   lesson.css — a lesson page: the reading column, examples, exercises.
   ═══════════════════════════════════════════════════════════════════════ */
.page-lesson { --top: calc(var(--bar-h) + var(--bar-gap) * 2); }
.ls-hero { padding: calc(var(--top) + clamp(16px, 4vh, 40px)) 0 clamp(20px, 3vh, 32px); }
.ls-hero .wrap { display: grid; gap: 14px; max-width: 860px; }
.ls-hero .crumb { font-size: .92rem; color: var(--ink-2); }
.ls-hero .crumb a { color: var(--ink-2); text-decoration: none; }
.ls-hero .crumb a:hover { color: var(--ink); }
.ls-hero h1 { font-size: clamp(2rem, 1.3rem + 3.6vw, 4.4rem); letter-spacing: -.03em; line-height: 1; }
.ls-hero .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ls-hero .tags span { font-family: var(--f-display); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--cyc-2); color: var(--ink-2); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 650; }
.ls-hero .tags span.prem { background: var(--pen); color: var(--ink); }
.ls-hero .lede { max-width: 60ch; }
.ls-body { padding: clamp(16px, 3vh, 32px) 0 clamp(48px, 8vh, 96px); }
.ls-body .wrap { max-width: 860px; }
.lesson-body { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.65; display: grid; gap: 18px; }
.lesson-body > div, .lesson-body > section { display: contents; }
.lesson-body section { display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px) 0 0; border-top: 1px solid var(--line); }
.lesson-body section:first-child { border-top: 0; padding-top: 0; }
.lesson-body section > div > * + * { margin-top: 12px; }
.lesson-body h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); letter-spacing: -.025em; }
.lesson-body h3 { font-size: clamp(1.2rem, 1.05rem + .8vw, 1.5rem); letter-spacing: -.02em; }
.lesson-body h4 { font-size: 1.05rem; }
.lesson-body p { margin: 0; text-wrap: pretty; }
.lesson-body p.em { font-style: italic; color: var(--ink-2); }
.lesson-body .muted { color: var(--ink-2); font-size: .95em; }
.lesson-body .eyebrow { font-size: .72rem; }
.lesson-body ul, .lesson-body ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.lesson-body li { padding-left: 4px; }
.lesson-body blockquote { margin: 0; padding: 16px 20px; border-left: 4px solid var(--pen); background: var(--cyc-2); border-radius: 0 12px 12px 0; }
.lesson-body blockquote > * + * { margin-top: 8px; }
.lesson-body blockquote span, .lesson-body p span { display: inline; }
.lesson-body .box { padding: 16px 20px; border-radius: 14px; background: var(--cyc-2); }
.lesson-body .box > * + * { margin-top: 10px; }
.lesson-body .box .box { background: var(--cyc); border: 1px solid var(--line); }
.lesson-body .hl { color: var(--sound); font-weight: 600; }
.lesson-body .mono { font-family: var(--f-mono); font-size: .92em; }
.lesson-body .strike { text-decoration: line-through; color: var(--ink-3); }
.lesson-body strong { font-weight: 700; }
.lesson-body .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lesson-body .cols > div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--cyc); }
.lesson-body .cols > div > * + * { margin-top: 8px; }
.lesson-body .cols > div > span { display: inline-block; margin: 0 2px 0 0; font-family: var(--f-display); font-size: 1.15rem; font-variation-settings: 'opsz' 24, 'wdth' 100, 'wght' 650; }
.lesson-body table { border-collapse: collapse; width: 100%; font-size: .95em; }
.lesson-body th, .lesson-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lesson-body th { font-family: var(--f-display); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 650; }
.lesson-body .ipa, .lesson-body .sym { font-family: var(--f-ipa); }
/* exercises: buttons and tappable syllables get their behaviour from lesson.js */
.lesson-body button { font: inherit; padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--cyc); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease-out); }
.lesson-body button:hover:not(:disabled) { border-color: var(--ink); transform: translateY(-1px); }
.lesson-body button.right { border-color: var(--sound); background: var(--sound-soft); }
.lesson-body button.wrong { border-color: var(--live); background: var(--live-soft); }
.lesson-body button.dim { opacity: .5; }
/* A tap target has to look like one. These were invisible until you hovered,
   which is no use at all on a phone, where there is no hover. */
.lesson-body .tap { cursor: pointer; display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--cyc); transition: background .2s, border-color .2s, transform .25s var(--ease-out); }
.lesson-body .tap:hover { border-color: var(--ink); transform: translateY(-1px); }
.lesson-body .tap:focus-visible { outline: 2px solid var(--sound); outline-offset: 2px; }
.lesson-body .box > p:has(> .tap) { margin: 0; }
.lesson-body .box:has(.tap) { display: grid; gap: 8px; background: transparent; padding: 0; }
.lesson-body .tap.right { background: var(--sound-soft); border-color: var(--sound); color: var(--sound); font-weight: 600; }
.lesson-body .tap.wrong { background: var(--live-soft); border-color: var(--live); }
.ls-ex { display: grid; gap: 12px; padding: 18px 20px; border-radius: 14px; background: var(--cyc-2); border-left: 4px solid var(--sound); }
.ls-ex .prompt { font-weight: 500; }
.ls-ex .opts { display: grid; gap: 8px; }
.ls-ex .fb { font-family: var(--f-text); font-size: 1rem; line-height: 1.55; min-height: 1.4em; max-width: 62ch; margin-top: 4px; font-weight: 400; }
.ls-ex .fb b { font-family: var(--f-display); font-variation-settings: 'opsz' 24, 'wdth' 100, 'wght' 700; }
.ls-ex .fb.good { color: var(--sound); } .ls-ex .fb.bad { color: var(--live); }
.ls-ex .btn { justify-self: start; padding: 12px 18px; font-size: .95rem; }
.ls-say { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ls-say small { color: var(--ink-3); }
.ls-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.ls-next a { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--cyc); text-decoration: none; color: var(--ink); transition: transform .3s var(--ease-out), box-shadow .3s; }
.ls-next a:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); color: var(--ink); }
.ls-next a:last-child { text-align: right; }
.ls-next span { font-family: var(--f-display); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-variation-settings: 'opsz' 12, 'wdth' 90, 'wght' 650; }
.ls-next b { font-family: var(--f-display); font-size: 1rem; letter-spacing: -.01em; font-variation-settings: 'opsz' 24, 'wdth' 100, 'wght' 650; }
.ls-lock { display: grid; gap: 14px; justify-items: start; padding: 24px 26px; border-radius: 16px; background: var(--cyc-2); border-left: 4px solid var(--pen); max-width: 640px; }
.ls-lock h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.ls-lock form { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.ls-lock input { flex: 1 1 220px; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); font: inherit; }
.ls-lock .msg { font-size: .95rem; color: var(--ink-2); }
@media (max-width: 600px) { .ls-next { grid-template-columns: minmax(0, 1fr); } .ls-next a:last-child { text-align: left; } }

/* ── a rule worth remembering ───────────────────────────────────────────────
   Lessons kept burying their one memorable idea in a paragraph. This gives it
   somewhere to sit: dark card, big number, the key words in the highlighter. */
.lesson-body .rule { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 22px 24px; border-radius: 18px; background: var(--ink); color: var(--cyc); margin: 6px 0; }
.lesson-body .rule > .n { font-family: var(--f-display); font-size: 2.2rem; line-height: .9; color: var(--pen); font-variation-settings: 'opsz' 40, 'wdth' 88, 'wght' 800; }
.lesson-body .rule > div > * + * { margin-top: 10px; }
.lesson-body .rule p { color: #C9CEDA; }
.lesson-body .rule p:first-child { color: var(--cyc); font-family: var(--f-display); font-size: clamp(1.15rem, 1.05rem + .5vw, 1.45rem); line-height: 1.25; font-variation-settings: 'opsz' 28, 'wdth' 96, 'wght' 750; }
.lesson-body .rule .hl { color: var(--pen); font-weight: 600; }
.lesson-body .rule b { color: var(--cyc); }

/* ── what people say, and what to say instead ──────────────────────────────
   Every lesson has a handful of these. Side by side beats a paragraph. */
.lesson-body .swap { display: grid; gap: 8px; margin: 6px 0; }
.lesson-body .swap > div { display: grid; grid-template-columns: 3.2rem 1fr; gap: 14px; align-items: baseline; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--cyc); }
.lesson-body .swap > div p { margin: 0; }
.lesson-body .swap .no, .lesson-body .swap .yes { font-family: var(--f-display); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-variation-settings: 'wght' 700; }
.lesson-body .swap .no { color: var(--live); }
.lesson-body .swap .yes { color: var(--sound); }
.lesson-body .swap s { color: var(--ink-3); text-decoration-thickness: 1.5px; }
.lesson-body .swap > div:has(.yes) { background: var(--sound-soft); border-color: #C9D6FF; }
