/* Styles for the pre-rendered, search-friendly lesson pages (/learn/...). No scripts, no web fonts. */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #eef0f7; --text: #1b2333; --muted: #5a6478;
  --border: #dfe3ee; --primary: #4f46e5; --primary-soft: #eceafe; --cta: #ea580c;
  --success: #1c7c45; --success-soft: #e3f6ea; --hl: #fff3bf;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --surface: #171e2e; --surface-2: #1f2840; --text: #e8ecf5; --muted: #a3adc2;
    --border: #2a3450; --primary: #a5b4fc; --primary-soft: #262d55; --success: #5fd08f; --success-soft: #123224; --hl: #4a3f12;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 16px; }
a { color: var(--primary); }
h1, h2, h3 { font-family: ui-rounded, system-ui, sans-serif; line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: .3em 0 .4em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
h2 a { text-decoration: none; }
h3 { font-size: 1.08rem; margin: 0 0 .4em; }
code, kbd { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }
.hl { background: var(--hl); padding: 0 .2em; border-radius: 4px; }
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand small { color: var(--muted); font-size: .75rem; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; }
.btn-primary { background: var(--cta); border-color: var(--cta); color: #fff; }
main { padding: 8px 16px 48px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3em; padding: 0; margin: 16px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .3em; }
.kicker { color: var(--muted); font-weight: 700; font-size: .85rem; margin: 1rem 0 0; }
.lead { font-size: 1.12rem; color: var(--muted); }
.release { display: inline-block; background: var(--success-soft); color: var(--success); font-weight: 700; font-size: .85rem; padding: .3em .85em; border-radius: 999px; }
.cta { margin: 1.2rem 0; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; margin: 1rem 0; }
.box > :last-child { margin-bottom: 0; }
.kid { border-color: #f5d76e; }
.callout { border-left: 5px solid var(--primary); }
.callout-warning { border-left-color: #d97706; }
.callout-tip, .callout-real { border-left-color: var(--success); }
.example { border-style: dashed; }
.try { background: var(--primary-soft); border-color: transparent; }
.flow li { margin: .35em 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: .92rem; }
caption { text-align: left; font-weight: 700; padding: .4em 0; }
th, td { border: 1px solid var(--border); padding: .45em .6em; text-align: left; vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.terms div { margin: .5em 0; }
.terms dt { font-weight: 700; }
.terms dd { margin: 0 0 0 1em; color: var(--muted); }
.sources { font-size: .9rem; overflow-wrap: anywhere; }
.lesson-list { padding-left: 1.3em; }
.lesson-list li { margin: .8em 0; }
.lesson-list span { display: block; color: var(--muted); font-size: .95rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 2rem; flex-wrap: wrap; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; }
.foot { border-top: 1px solid var(--border); background: var(--surface); font-size: .85rem; padding: 12px 0 24px; }
.muted { color: var(--muted); }
