
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:200 800;font-display:swap;src:url(fonts/bricolage-grotesque.woff2) format("woff2-variations")}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:200 900;font-display:swap;src:url(fonts/source-serif-4.woff2) format("woff2-variations")}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:200 900;font-display:swap;src:url(fonts/source-serif-4-italic.woff2) format("woff2-variations")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/atkinson-400.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/atkinson-700.woff2) format("woff2")}
@font-face{font-family:"OpenDyslexic";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/opendyslexic-400.woff2) format("woff2")}
@font-face{font-family:"OpenDyslexic";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/opendyslexic-700.woff2) format("woff2")}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:100 800;font-display:swap;src:url(fonts/jetbrains-mono.woff2) format("woff2-variations")}
/* ===== tokens ===== */
:root, :root[data-theme="light"] {
  --paper: #F4F6FA;
  --surface: #FFFFFF;
  --ink: #0F2547;
  --text: #1E2B45;
  --muted: #55627B;
  --line: #D7DDE8;
  --line-strong: #B4BED0;
  --accent: #2850E8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7ECFE;
  --pass: #12805C;
  --pass-soft: #DCF2E9;
  --run: #7A4D00;
  --run-soft: #FBEBC5;
  --fail: #C0322A;
  --fail-soft: #FBE3E0;
  --lock: #7B869C;
  --code-bg: #0E1A33;
  --code-line: #1E2D4D;
  --code-text: #DCE6F7;
  --code-dim: #9FB0CB;
  --shadow: 0 1px 2px rgba(15, 37, 71, .06);
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #0B1220;
  --surface: #111B2F;
  --ink: #EAF0FB;
  --text: #CBD6E8;
  --muted: #94A1BA;
  --line: #22304B;
  --line-strong: #364A72;
  --accent: #8CA6FF;
  --accent-ink: #0B1220;
  --accent-soft: #1A2A55;
  --pass: #3DD6A0;
  --pass-soft: #11332B;
  --run: #F5B83D;
  --run-soft: #3A2D10;
  --fail: #FF8A80;
  --fail-soft: #3C1A1A;
  --lock: #70809F;
  --code-bg: #0A1020;
  --code-line: #1B2845;
  --code-text: #DCE6F7;
  --code-dim: #8E9EBB;
  --shadow: none;
  color-scheme: dark;
}

/* ===== base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 16px/1.55 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); line-height: 1.15; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 10px; }
.wrap { width: 100%; max-width: min(1680px, 100%); margin: 0 auto; padding: 0 clamp(20px, 3.2vw, 56px); }
.narrow { max-width: 760px; }
.small { font-size: 14px; color: var(--muted); }
main { min-height: 70vh; outline: none; }

/* ===== buttons and chips ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  font: 600 15px/1.2 var(--sans); border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-quiet { background: transparent; }
.btn-disabled { opacity: .65; cursor: not-allowed; background: var(--paper); color: var(--muted); border-style: dashed; }
.btn-disabled:hover { border-color: var(--line-strong); }
.btn.danger { color: var(--fail); }
.btn.file { position: relative; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.btn.file:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon-btn { padding: 8px; min-width: 40px; justify-content: center; }
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-strong); }
.chip.pass { color: var(--pass); border-color: var(--pass); background: var(--pass-soft); }
kbd { font: 500 12px var(--mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; color: var(--muted); background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ===== top bar ===== */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.brand b { font-weight: 800; }
.brand img { border-radius: 6px; display: block; }
.topnav { display: flex; gap: 2px; margin-right: auto; }
.topnav a { color: var(--text); text-decoration: none; padding: 8px 10px; white-space: nowrap; border-radius: 8px; font-weight: 500; }
.topnav a:hover { background: var(--accent-soft); }
.topnav a.on { color: var(--ink); background: var(--accent-soft); font-weight: 700; }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-btn { color: var(--muted); font-weight: 500; }
.search-btn kbd { margin-left: 4px; }
.streak { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.streak.on { color: var(--run); background: var(--run-soft); }
.menu-btn { display: none; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }

/* ===== hero ===== */
.hero { padding: 56px 0 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: end; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; max-width: 17em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38em; margin-top: 16px; }
.today { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; overflow: hidden; }
.today > div { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.today > div:last-child { border-bottom: 0; }
.today dt { color: var(--muted); font-size: 14px; }
.today dd { margin: 0; font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.today dd small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.today.wide { grid-template-columns: repeat(4, 1fr); }
.today.wide > div { border-bottom: 0; border-right: 1px solid var(--line); flex-direction: column; align-items: flex-start; }
.today.wide > div:last-child { border-right: 0; }

/* ===== pipeline ===== */
.pipe-panel { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px 24px 18px; }
.pipe-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.tabs { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.tab { font: 600 14px var(--sans); border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 7px; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--ink); color: var(--paper); }
.pipe-meta { margin: 0; color: var(--muted); font-size: 14px; }
.pipe-foot { margin: 18px 0 0; font-size: 14px; }
.pipe { list-style: none; margin: 0; padding: 0; display: flex; }
.stage { flex: 1 1 0; min-width: 0; }
.stage:last-child { flex: 0 1 auto; min-width: 110px; }
.stage > a { display: block; color: inherit; text-decoration: none; padding-right: 10px; border-radius: 8px; }
.stage > a:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.rail { display: flex; align-items: center; height: 30px; }
.dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); color: var(--lock); }
.line { flex: 1; height: 2px; margin: 0 8px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.line i { position: absolute; inset: 0; background: var(--pass); transform: scaleX(0); transform-origin: left; }
.stage:last-child .line { visibility: hidden; }
.name { display: block; margin-top: 10px; font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
.sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.s-pass .dot { background: var(--pass); border-color: var(--pass); color: #fff; }
.s-pass .line i { transform: scaleX(1); }
.s-run .dot { border: 0; background: conic-gradient(var(--run) calc(var(--p, 0) * 1%), var(--run-soft) 0); }
.s-run .dot::after { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); }
.s-ready .dot { border-color: var(--accent); }
.s-ready .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.s-lock .dot { background: var(--paper); }
.s-lock .name { color: var(--muted); font-weight: 600; }
.run-anim .s-pass .line i { transform: scaleX(0); }
.run-anim.go .s-pass .line i { transform: scaleX(1); transition: transform .5s cubic-bezier(.3, .7, .2, 1) calc(var(--i) * .14s); }

/* ===== sections ===== */
.band { padding: 56px 0; margin-top: 56px; border-top: 1px solid var(--line); }
.band.alt { background: var(--surface); }
.band-head { margin-bottom: 28px; }
.band h2, .sub-h { font-size: 1.7rem; font-weight: 800; }
.band-head p { color: var(--muted); max-width: 40em; margin-top: 8px; }
.sub-h { margin: 44px 0 16px; font-size: 1.35rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.two p { color: var(--muted); }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) 150px; gap: 28px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.row h3 { font-size: 1.3rem; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover { text-decoration: underline; }
.row p { color: var(--muted); margin: 6px 0 0; }
.row-mods { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.row-mods li { font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--text); }
.row-mods li.m-pass { border-color: var(--pass); color: var(--pass); background: var(--pass-soft); }
.row-mods li.m-run { border-color: var(--run); color: var(--run); background: var(--run-soft); }
.row-stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.row-stat b { font-size: 1.25rem; color: var(--ink); }
.row-stat span { color: var(--muted); font-size: 14px; }
.bar { width: 100%; height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--pass); border-radius: 6px; }
.bar.wide { max-width: 560px; margin: 20px 0 0; }
.planned { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.planned li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.planned span { color: var(--muted); }
.planned em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 99px; padding: 2px 10px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--ink); text-decoration: none; font-weight: 600; background: var(--paper); }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.steps { margin: 18px 0 0; padding-left: 1.2em; }
.steps li { margin-bottom: 12px; padding-left: 6px; color: var(--muted); }
.steps strong { color: var(--ink); }
.note-panel { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 22px 24px; background: var(--surface); }
.note-panel h3 { font-size: 1.15rem; margin-bottom: 8px; }
.note-panel p { color: var(--muted); }
.prose-narrow { max-width: 42em; color: var(--muted); font-size: 1.1rem; margin-top: 12px; }

/* ===== page heads, crumbs, facts ===== */
.page-head { padding: 44px 20px 8px; }
.page-head.wrap { max-width: min(1680px, 100%); }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs a + a::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 24px 0 0; }
.facts div { min-width: 120px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); max-width: 28em; }
.gate { margin-top: 20px; padding: 14px 18px; border-left: 4px solid var(--lock); background: var(--surface); border-radius: 0 8px 8px 0; }
.outcomes { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 40px; }
.outcomes li { margin-bottom: 8px; break-inside: avoid; }
.stage-list { border-top: 1px solid var(--line); }
.srow { display: grid; grid-template-columns: 28px minmax(0, 1fr) 120px; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.srow h3 { font-size: 1.15rem; }
.srow h3 a { color: var(--ink); text-decoration: none; }
.srow h3 a:hover { text-decoration: underline; }
.srow p { margin: 4px 0 0; color: var(--muted); }
.srow p.small { margin-top: 6px; }
.srow .dot { margin-top: 2px; }

/* ===== lesson list (jobs) ===== */
.jobs { list-style: none; margin: 32px 0 0; padding: 0; max-width: 820px; }
.job > a { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 18px; color: inherit; text-decoration: none; }
.job .rail { flex-direction: column; align-items: center; height: auto; }
.job .line { width: 2px; height: auto; flex: 1; min-height: 20px; margin: 4px 0; background: var(--line); }
.job:last-child .line { visibility: hidden; }
.job.j-done .line { background: var(--pass); }
.j-done .dot { background: var(--pass); border-color: var(--pass); color: #fff; }
.j-open .dot { border-color: var(--accent); }
.j-open .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.j-locked .dot { background: var(--paper); }
.job-body { display: block; padding-bottom: 22px; }
.job-title { display: block; font-weight: 700; font-size: 1.1rem; color: var(--ink); letter-spacing: -.01em; }
.job > a:hover .job-title { text-decoration: underline; text-underline-offset: 3px; }
.j-locked .job-title { color: var(--muted); }
.job-sum { display: block; color: var(--muted); margin-top: 2px; max-width: 46em; }
.job-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.job-state { font-weight: 700; }
.j-done .job-state { color: var(--pass); }
.j-open .job-state { color: var(--accent); }

/* ===== lesson ===== */
.lesson { padding-top: 36px; padding-bottom: 40px; }
.lesson-head h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 800; letter-spacing: -.03em; max-width: 22em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 68ch) 230px; gap: 64px; margin-top: 28px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: 14px; border-left: 2px solid var(--line); padding-left: 16px; }
.toc p { margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0 0 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.prose { font-family: var(--serif); font-size: 1.125rem; line-height: 1.7; color: var(--text); font-variant-numeric: lining-nums; }
.prose > * + * { margin-top: 1.1em; margin-bottom: 0; }
.prose h2 { font-family: var(--sans); font-size: 1.55rem; font-weight: 800; margin-top: 2.2em; }
.prose h3 { font-family: var(--sans); font-size: 1.2rem; font-weight: 700; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose p { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose code { font: .86em var(--mono); background: var(--accent-soft); color: var(--ink); padding: .12em .4em; border-radius: 5px; overflow-wrap: anywhere; }
.prose a { overflow-wrap: anywhere; }
.prose blockquote { margin-left: 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--line-strong); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; font: 15px/1.45 var(--sans); }
.table-wrap th, .table-wrap td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { background: var(--paper); color: var(--ink); font-weight: 700; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td code, .table-wrap th code { font-size: .88em; }

/* code */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 10px; font-family: var(--mono); }
.code::before { content: attr(data-lang); position: absolute; left: 14px; top: 8px; font: 500 12px var(--sans); color: var(--code-dim); }
.code pre { margin: 0; padding: 34px 16px 16px; overflow-x: auto; }
.code code, .code .hljs { font: 13.5px/1.65 var(--mono); background: none; color: var(--code-text); padding: 0; display: block; white-space: pre; tab-size: 2; }
.prose .code code { background: none; color: var(--code-text); padding: 0; font-size: 13.5px; }
.copy { position: absolute; right: 8px; top: 6px; font: 600 12px var(--sans); color: var(--code-dim); background: transparent; border: 1px solid var(--code-line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.copy:hover { color: #fff; border-color: var(--code-dim); }
.console .ln { display: block; }
.console .ln.out { color: var(--code-dim); }
.console .ps { color: #6F82A6; user-select: none; }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in { color: #8CB4FF; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #8BE0B0; }
.hljs-comment, .hljs-quote { color: #8190AC; font-style: italic; }
.hljs-number, .hljs-literal, .hljs-symbol { color: #F2C078; }
.hljs-title, .hljs-section, .hljs-function .hljs-title { color: #C7A6FF; }
.hljs-attr, .hljs-attribute, .hljs-name, .hljs-bullet { color: #7FD8F0; }
.hljs-variable, .hljs-template-variable, .hljs-params, .hljs-deletion { color: #F29BAA; }
.hljs-meta, .hljs-type { color: #E5B567; }

/* callouts */
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; padding: 14px 18px; font-family: var(--sans); font-size: 16px; line-height: 1.55; }
.callout > * + * { margin-top: .6em; }
.callout p { margin: 0; }
.callout-title { font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.callout code { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.callout-warning, .callout-danger, .callout-caution { position: relative; border-left-width: 8px; border-color: var(--fail); background: var(--fail-soft); padding-left: 52px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fail) 35%, transparent); }
.callout-warning::before, .callout-danger::before, .callout-caution::before { content: "!"; position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--fail); color: var(--surface); font: 800 18px/28px var(--sans); text-align: center; }
.callout-warning .callout-title, .callout-danger .callout-title { color: var(--fail); }
.callout-danger { background: repeating-linear-gradient(135deg, var(--fail-soft) 0 14px, color-mix(in srgb, var(--fail) 14%, var(--fail-soft)) 14px 28px); }
.callout-danger .callout-title::after { content: " - destructive or irreversible"; font-weight: 600; font-size: .85em; }
.callout-caution { border-color: var(--run); background: var(--run-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--run) 35%, transparent); }
.callout-caution::before { background: var(--run); }
.callout-caution .callout-title { color: var(--ink); }
.callout-incident { border-color: var(--run); background: var(--run-soft); }
.callout-why-it-matters { border-color: var(--pass); background: var(--pass-soft); }

/* check and cards */
.check, .cardsec { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 760px; }
.check h2, .cardsec h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; }
.qprog { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.qprog i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.qcount { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.qtext { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-bottom: 16px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; font: 500 16px/1.45 var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt .key { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--paper); border: 1px solid var(--line-strong); color: var(--muted); }
.opt.right { border-color: var(--pass); background: var(--pass-soft); }
.opt.right .key { background: var(--pass); border-color: var(--pass); color: #fff; }
.opt.wrong { border-color: var(--fail); background: var(--fail-soft); }
.opt.wrong .key { background: var(--fail); border-color: var(--fail); color: #fff; }
.feedback { margin-top: 14px; }
.feedback p { margin: 0 0 12px; }
.feedback .ok strong { color: var(--pass); }
.feedback .bad strong { color: var(--fail); }
.result { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 22px 24px; }
.result h3 { font-size: 1.4rem; margin-bottom: 6px; }
.result.pass { border-color: var(--pass); }
.result.pass h3 { color: var(--pass); }
.result.fail { border-color: var(--fail); }
.result.fail h3 { color: var(--fail); }
.result p { margin: 0 0 8px; }
.result .actions { margin-top: 14px; }
.stage-pass { padding: 10px 14px; background: var(--pass-soft); border-radius: 8px; }
.card { display: flex; flex-direction: column; justify-content: center; gap: 10px; width: 100%; min-height: 190px; padding: 26px 28px; text-align: left; font-family: var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; box-shadow: var(--shadow); }
.card.back { background: var(--accent-soft); border-color: var(--accent); }
.card .side { font-size: 13px; color: var(--muted); font-weight: 600; }
.card .txt { font-size: 1.3rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
.card .hint { font-size: 13px; color: var(--muted); }
.rate { display: flex; gap: 12px; margin-top: 14px; }
.rate[hidden] { display: none; }
.pager { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.empty { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 28px; background: var(--surface); }
.empty h3 { font-size: 1.25rem; margin-bottom: 6px; }
.field input { width: 100%; max-width: 420px; margin-top: 20px; font: 16px var(--sans); padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }

/* cheat sheets */
.sheet-page { padding-bottom: 48px; }
.sheet-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.sheet-list li { border-bottom: 1px solid var(--line); }
.sheet-list a { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; padding: 16px 4px; text-decoration: none; color: inherit; }
.sheet-list a:hover strong { text-decoration: underline; color: var(--accent); }
.sheet-list strong { color: var(--ink); font-size: 1.1rem; }
.sheet-list span { color: var(--muted); }
.sheet { margin-top: 28px; font-size: 15px; line-height: 1.55; }
.sheet h2 { font-size: 1.2rem; font-weight: 800; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); break-after: avoid; }
.sheet h2:first-child { margin-top: 0; }
.sheet h3 { font-size: 1rem; margin: 18px 0 6px; break-after: avoid; }
.sheet p { margin: 0 0 .7em; color: var(--muted); }
.sheet ul { padding-left: 1.2em; margin: 0 0 .8em; }
.sheet code { font: .88em var(--mono); background: var(--accent-soft); color: var(--ink); padding: .08em .35em; border-radius: 4px; }
.sheet .code { margin: 0 0 14px; break-inside: avoid; }
.sheet .code pre { padding: 30px 14px 12px; }
.sheet .code code, .sheet .code .hljs { background: none; color: var(--code-text); font-size: 13px; padding: 0; }
.sheet .table-wrap { margin: 0 0 14px; break-inside: avoid; }
.sheet .table-wrap table { font-size: 14px; }
.sheet .table-wrap td:first-child { white-space: nowrap; }
@media (min-width: 1000px) { .sheet { column-count: 2; column-gap: 36px; } }

/* progress */
.heat { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { display: block; background: var(--line); border-radius: 3px; }
.heat i.on { background: var(--pass); }
.heat i.pad { background: transparent; }
.modbars { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.modbars a { display: grid; grid-template-columns: 180px 1fr 56px; gap: 16px; align-items: center; padding: 10px 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.modbars a:hover span:first-child { text-decoration: underline; color: var(--accent); }
.modbars .bar { margin: 0; }
.modbars b { text-align: right; color: var(--ink); }

/* search, toast, footer */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(8, 16, 34, .55); }
.modal-box { position: relative; width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal-box input { width: 100%; font: 18px var(--sans); padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); }
#sres { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
#sres li { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
#sres li.sel, #sres li:hover { background: var(--accent-soft); }
#sres .k { grid-row: 1 / 3; font-size: 13px; color: var(--muted); padding-top: 2px; }
#sres .t { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
#sres .s { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-box .small { margin: 10px 4px 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: min(560px, 92vw); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }
.foot-note { margin-left: auto; }

/* ===== responsive ===== */
@media (max-width: 1100px) {
  .lesson-grid { grid-template-columns: minmax(0, 68ch); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .search-btn span, .search-btn kbd { display: none; }
  .topnav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 20px 14px; margin: 0; }
  .topnav.open { display: flex; }
  .hero { padding-top: 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 1fr; gap: 12px; }
  .two { grid-template-columns: 1fr; gap: 28px; }
  .planned li { grid-template-columns: 1fr auto; }
  .planned span { grid-column: 1 / -1; grid-row: 2; }
  .outcomes { columns: 1; }
  .today.wide { grid-template-columns: repeat(2, 1fr); }
  .today.wide > div:nth-child(2) { border-right: 0; }
  .today.wide > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .sheet-list a { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 760px) {
  .pipe-panel { padding: 18px; }
  .pipe { flex-direction: column; }
  .stage, .stage:last-child { flex: none; min-width: 0; }
  .stage > a { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; padding: 0; }
  .stage .rail { flex-direction: column; align-items: center; height: auto; grid-row: 1 / 3; }
  .stage .line { width: 2px; height: auto; flex: 1; min-height: 22px; margin: 4px 0; }
  .stage .line i { transform: scaleY(0); transform-origin: top; }
  .s-pass .line i { transform: scaleY(1); }
  .run-anim .s-pass .line i { transform: scaleY(0); }
  .run-anim.go .s-pass .line i { transform: scaleY(1); }
  .name { margin-top: 3px; }
  .stage .sub { padding-bottom: 12px; }
  .srow { grid-template-columns: 28px 1fr; }
  .srow .row-stat { grid-column: 2; flex-direction: row; gap: 10px; align-items: baseline; }
  .modbars a { grid-template-columns: 1fr 70px 44px; gap: 10px; }
  .prose { font-size: 1.05rem; }
  .foot-note { margin-left: 0; width: 100%; }
}
@media (max-width: 520px) {
  .brand .bn { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .page-head { padding: 32px 16px 4px; }
  .today.wide { grid-template-columns: 1fr 1fr; }
  .brand span { font-size: 15px; }
  .topbar-in { gap: 12px; }
  .tools { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===== print and PDF (watermarked) ===== */
@page { size: A4; margin: 18mm 14mm 20mm;
  @bottom-center { content: "MARGA by EknathaLabs \00b7  marga.eknathalabs.com \00b7  Free forever"; font: 8pt sans-serif; color: #666; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 8pt sans-serif; color: #666; } }
.print-only { display: none; }
@media print {
  :root, :root[data-theme="dark"] { --paper: #fff; --surface: #fff; --ink: #000; --text: #111; --muted: #444; --line: #ccc; --line-strong: #999; --accent-soft: #eee; --code-bg: #fff; --code-line: #bbb; --code-text: #111; --code-dim: #555; --pass: #0a5c42; --run: #6b4200; }
  html, body { background: #fff !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { font-size: 11pt; }
  /* The watermark: fixed elements repeat on every printed page. */
  body::before { content: "MARGA by EknathaLabs"; position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-32deg); font: 700 54pt/1 var(--sans); letter-spacing: .02em; color: rgba(15, 37, 71, .085); white-space: nowrap; z-index: 2147483000; pointer-events: none; }
  body::after { content: "marga.eknathalabs.com"; position: fixed; left: 50%; top: 56%; transform: translate(-50%, -50%) rotate(-32deg); font: 600 22pt/1 var(--sans); color: rgba(15, 37, 71, .085); white-space: nowrap; z-index: 2147483000; pointer-events: none; }
  .topbar, .foot, .actions, .copy, .skip, #toast, #search-root, .crumbs, .menu-btn, .voice, .say-row, .say, .toc, .check, .cardsec, .pager, .iv-filters, .iv-tools, .pipe-panel, .lesson-tools, .search-btn, .bar, .gate { display: none !important; }
  .print-only { display: block; }
  .wrap { max-width: none; padding: 0; }
  .sheet { column-count: 2; column-gap: 20px; font-size: 9.5pt; }
  .lesson-grid { display: block; }
  .prose { max-width: none; font-size: 10.5pt; }
  h1, h2, h3 { break-after: avoid; }
  pre, .iv, .refs li, table, blockquote { break-inside: avoid; }
  .code pre { white-space: pre-wrap; }
  .code code, .code .hljs { color: #111 !important; white-space: pre-wrap; }
  .hljs-keyword, .hljs-string, .hljs-comment, .hljs-number, .hljs-title, .hljs-attr, .hljs-built_in, .hljs-variable, .hljs-literal { color: #111 !important; }
  a { color: #000; text-decoration: none; }
  .refs a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #444; word-break: break-all; }
  .iv-a[hidden] { display: block !important; }
  .iv-rate { display: none !important; }
  .iv { border: 0; border-top: 1px solid #bbb; padding: 8px 0; }
  .topics a::after { content: ""; }
}

/* ===== voice bar ===== */
.voice { margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.voice-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.voice .btn { min-height: 38px; padding: 6px 14px; }
.v-field { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); font-weight: 600; }
.v-field select { min-height: 38px; max-width: 260px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--text); font: inherit; font-weight: 500; }
.voice-msg:empty { display: none; }
.voice-msg { margin: 8px 0 0; }
.voice.speaking { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.say-row { margin: 6px 0 10px; }
.say-row .btn { min-height: 34px; padding: 4px 12px; font-size: 14px; }

/* ===== references ===== */
.refs { margin: 40px 0 8px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); }
.refs h2 { margin: 0 0 4px; font-size: 1.15rem; }
.refs ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.refs li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.refs a { font-weight: 600; }
.refs .host { color: var(--muted); font-size: 13px; font-family: var(--mono); }

/* ===== path topics ===== */
.topics { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: t; }
.topics li { counter-increment: t; }
.topics a { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: 13.5px; color: var(--text); text-decoration: none; background: var(--paper); }
.topics a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== InterviewHub ===== */
.iv-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; align-items: end; }
.iv-filters .field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.iv-filters select, .iv-filters input { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 500; }
.iv-filters .grow { flex: 1 1 220px; }
.iv-filters .grow input { width: 100%; }
.iv { margin: 0 0 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.iv.r-know { border-left: 4px solid var(--pass); }
.iv.r-review { border-left: 4px solid var(--run); }
.iv-q { margin: 0 0 8px; font-size: 1.1rem; line-height: 1.35; color: var(--ink); }
.iv-meta { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.iv-a { margin: 10px 0; padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); font-family: var(--serif); }
.iv-a > :first-child { margin-top: 0; } .iv-a > :last-child { margin-bottom: 0; }
.iv-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.iv-rate { display: inline-flex; gap: 8px; }
.iv-tools .btn { min-height: 38px; padding: 6px 14px; }
.chip.warn { color: var(--run); border-color: var(--run); background: var(--run-soft); }
.chip.lvl-senior { border-style: dashed; }

/* ===== footer promise ===== */
.foot-promise { flex-basis: 100%; margin: 6px 0 0; font-weight: 600; color: var(--ink); letter-spacing: .01em; }

.visitors { font-variant-numeric: tabular-nums; }
.visitors::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pass); margin-right: 8px; vertical-align: middle; }

/* ===== accessibility options (html[data-a-*] set by a11y.js) ===== */
html[data-a-fs="115"] { zoom: 1.15; } html[data-a-fs="130"] { zoom: 1.3; } html[data-a-fs="150"] { zoom: 1.5; }
html[data-a-font="atkinson"][data-a-font="atkinson"]:root { --sans: "Atkinson Hyperlegible", system-ui, sans-serif; --serif: "Atkinson Hyperlegible", system-ui, sans-serif; }
html[data-a-font="dyslexic"][data-a-font="dyslexic"]:root { --sans: "OpenDyslexic", "Comic Sans MS", system-ui, sans-serif; --serif: "OpenDyslexic", "Comic Sans MS", system-ui, sans-serif; }
html[data-a-font] :is(h1, h2, h3, h4) { letter-spacing: 0; }
html[data-a-font="dyslexic"] body { font-size: 15px; }
html[data-a-lh="relaxed"] :is(body, .prose, p, li, dd, dt, td) { line-height: 1.85; }
html[data-a-lh="loose"] :is(body, .prose, p, li, dd, dt, td) { line-height: 2.1; }
html[data-a-sp="wide"] body { letter-spacing: .05em; word-spacing: .16em; }
html[data-a-sp="wide"] :is(h1, h2, h3, h4) { letter-spacing: .02em; }
html[data-a-sp="wide"] :is(pre, code, .code) { letter-spacing: 0; word-spacing: 0; }
html[data-a-motion="reduce"] *, html[data-a-motion="reduce"] *::before, html[data-a-motion="reduce"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html[data-a-links="underline"] a:not(.btn):not(.brand) { text-decoration: underline !important; text-underline-offset: 3px; }
html[data-a-focus="strong"] :focus-visible { outline: 4px solid var(--ink) !important; outline-offset: 3px; box-shadow: 0 0 0 7px var(--accent); }
html[data-a-contrast="high"][data-theme="light"] { --paper: #FFFFFF; --surface: #FFFFFF; --ink: #000000; --text: #000000; --muted: #1A1A1A; --line: #000000; --line-strong: #000000; --accent: #0B2BD6; --accent-soft: #E3E8FF; --pass: #005A3C; --pass-soft: #D4F0E4; --run: #5C3800; --run-soft: #FFE9A8; --fail: #A00000; --fail-soft: #FFD9D6; --lock: #333333; }
html[data-a-contrast="high"][data-theme="dark"] { --paper: #000000; --surface: #000000; --ink: #FFFFFF; --text: #FFFFFF; --muted: #E6E6E6; --line: #FFFFFF; --line-strong: #FFFFFF; --accent: #9DB4FF; --accent-ink: #000000; --accent-soft: #14214D; --pass: #5CFFC0; --pass-soft: #00331F; --run: #FFD36B; --run-soft: #3B2A00; --fail: #FF9E96; --fail-soft: #3B0000; --lock: #CCCCCC; }
html[data-a-contrast="high"] .btn { border-width: 2px; }
html[data-a-contrast="high"] :is(.case, .drill, .iv, .calc, .voice, .refs) { border-width: 2px; }
.a11y-btn b { font: 800 15px/1 var(--sans); letter-spacing: 0; }
.a11y-panel { position: fixed; top: 64px; right: 16px; z-index: 60; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); }
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.a11y-head h2 { font-size: 1.15rem; }
.a11y-grid { display: grid; gap: 12px; margin-top: 8px; }
.a11y-f { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.a11y-f select, .iv-filters select, .mock-setup select { font: 15px var(--sans); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.say-now { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ===== practice hub, cases, drills, mock interview, flashcards, calculators ===== */
.prac { list-style: none; margin: 8px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.prac a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; }
.prac a:hover { border-color: var(--accent); }
.prac strong { font: 700 1.1rem var(--sans); color: var(--ink); }
.prac span { color: var(--muted); font-size: 15px; }
.prac em { margin-top: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--accent); }
.case, .drill { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 18px; margin: 0 0 12px; }
.case.read { border-left: 4px solid var(--pass); }
.drill.solved { border-left: 4px solid var(--pass); }
.case h3, .drill h3 { font-size: 1.15rem; }
.case-toggle { all: unset; cursor: pointer; display: block; width: 100%; font: 700 1.1rem/1.25 var(--sans); color: var(--ink); }
.case-toggle:hover { color: var(--accent); }
.case-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.case-toggle::after { content: " +"; color: var(--muted); }
.case-toggle[aria-expanded="true"]::after { content: " \2212"; }
.case-dl dt { margin-top: 12px; font: 700 13px var(--sans); color: var(--muted); }
.case-dl dd { margin: 2px 0 0; }
.case-lesson { font-weight: 600; color: var(--ink); }
.evidence { margin: 12px 0; padding: 14px 16px; overflow: auto; max-height: 360px; border-radius: 10px; background: var(--code-bg); color: var(--code-text); font: 13.5px/1.55 var(--mono); border: 1px solid var(--code-line); }
.evidence code { font: inherit; white-space: pre; }
.drill-q { border: 0; margin: 14px 0 0; padding: 0; }
.drill-q legend { font-weight: 700; color: var(--ink); margin-bottom: 8px; padding: 0; }
.opt-r { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; background: var(--paper); }
.opt-r:hover { border-color: var(--accent); }
.opt-r input { margin-top: 4px; accent-color: var(--accent); }
.opt-r.good { border-color: var(--pass); background: var(--pass-soft); }
.opt-r.bad { border-color: var(--fail); background: var(--fail-soft); }
.drill-res { margin-top: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-strong); }
.drill-res[hidden] { display: none; }
.drill-res.ok { border-color: var(--pass); background: var(--pass-soft); }
.drill-res.no { border-color: var(--fail); background: var(--fail-soft); }
.drill-res p { margin: 0 0 .6em; }
.drill-group h2 { margin: 28px 0 12px; font-size: 1.4rem; }
.mock-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; align-items: end; margin: 16px 0 24px; }
.mock-setup .field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mock-setup .actions, .mock-setup .small, .mock-setup .chk { grid-column: 1 / -1; margin-top: 0; }
.chk { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.mock-q h2 { font-size: 1.5rem; margin: 14px 0 8px; outline: none; }
.mk-time { margin-left: 12px; font-weight: 700; color: var(--accent); }
textarea { width: 100%; font: 15px/1.5 var(--sans); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.mock-q .field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.mk-score { margin-top: 14px; padding-top: 6px; }
.mk-miss { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 8px 0; background: var(--surface); }
.mk-miss summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.mock-hist { list-style: none; padding: 0; }
.mock-hist li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.mock-res h2 { outline: none; }
.sub-h { margin: 28px 0 10px; font-size: 1.2rem; }
.fc { margin: 8px 0 30px; }
.fc-card { display: block; position: relative; width: 100%; min-height: 260px; margin: 14px 0; padding: 0; border: 2px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; perspective: 1200px; }
.fc-face { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 256px; padding: 28px; font: 600 1.25rem/1.45 var(--sans); }
.fc-face small { font: 700 12px var(--sans); color: var(--muted); text-transform: none; }
.fc-back { display: none; font-weight: 500; background: var(--accent-soft); border-radius: 14px; color: var(--ink); }
.fc-card.flipped .fc-front { display: none; }
.fc-card.flipped .fc-back { display: flex; animation: fcflip .28s ease-out; }
@keyframes fcflip { from { transform: rotateY(90deg); opacity: .2; } to { transform: rotateY(0); opacity: 1; } }
.calc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px; margin: 14px 0; }
.calc h3 { font-size: 1.25rem; margin-bottom: 4px; }
.calc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 14px 0; }
.calc-f { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.calc-f input { font: 16px var(--sans); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); width: 100%; }
.calc-out { margin: 0; display: grid; gap: 8px; }
.calc-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }
.calc-row dt { font-weight: 700; color: var(--ink); }
.calc-row dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.calc-row dd b { font: 800 1.15rem var(--sans); color: var(--accent); }
.calc-row dd span { font-size: 14px; color: var(--muted); }
.calc-note { margin: 12px 0 0; }
.calc-sec h2 { margin: 28px 0 8px; }
.arch h2 { font-size: 1.45rem; }
.arch ul { padding-left: 1.2em; }
@media (max-width: 640px) { .calc-row { grid-template-columns: 1fr; } .fc-face { padding: 20px; font-size: 1.1rem; } .a11y-panel { top: 56px; right: 8px; } }
@media (prefers-reduced-motion: reduce) { .fc-card.flipped .fc-back { animation: none; } }
html[data-a-motion="reduce"] .fc-card.flipped .fc-back { animation: none; }
@media print {
  html { zoom: 1 !important; }
  .a11y-panel, .a11y-btn, #a11y-root, .mock-setup, .fc, .opt-r input { display: none !important; }
  .case-body[hidden] { display: block !important; }
  .case, .drill { break-inside: avoid; border-color: #999; }
  .evidence { max-height: none; overflow: visible; background: #f3f3f3 !important; color: #000 !important; }
  .evidence code { white-space: pre-wrap; }
  .calc-slot, .calc-sec { break-inside: avoid; }
}
.calc-f input, .mock-setup .field input { margin-top: 0; max-width: none; }

/* narrow screens and large text: header and tabs wrap instead of overflowing */
@media (max-width: 480px) {
  .topbar-in { height: auto; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .tools { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
  .tab { padding: 8px 10px; }
}
.iv-filters .field, .mock-setup .field, .calc-f, .a11y-f { min-width: 0; max-width: 100%; }
.iv-filters select, .mock-setup select, .calc-f select, .a11y-f select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.prac { grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.drill, .drill-group, .case, .case-body { min-width: 0; max-width: 100%; }
.evidence { max-width: 100%; box-sizing: border-box; }
.iv-filters { max-width: 100%; }
h1, h2, h3, h4, .page-head p { overflow-wrap: anywhere; }
@media (max-width: 480px) { html[data-a-font] h1, html[data-a-fs] h1 { font-size: clamp(1.5rem, 8vw, 2.2rem); } }
html[data-a-fs="115"] .a11y-panel { max-height: calc((100vh - 90px) / 1.15); }
html[data-a-fs="130"] .a11y-panel { max-height: calc((100vh - 90px) / 1.3); }
html[data-a-fs="150"] .a11y-panel { max-height: calc((100vh - 90px) / 1.5); }
[hidden] { display: none !important; }
.topbar-in { gap: 14px; }
.topnav a { padding: 8px 9px; }
@media (min-width: 761px) and (max-width: 1260px) { .search-btn span, .search-btn kbd { display: none; } }

/* ===== round 3: search, glossary, explainers, playgrounds ===== */
.sfilters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.schip { font: 600 13px var(--sans); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; min-height: 32px; }
.schip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.schip span { opacity: .75; font-weight: 500; }
.srecent-h { padding: 8px 10px 2px; font-size: 13px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
#sres li.srecent-h:hover, #sres li.srecent:hover { background: transparent; cursor: default; }
#sres li.srecent { display: block; padding: 0; }
.srecent-b { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 8px 10px; cursor: pointer; border-radius: 8px; color: var(--text); }
.srecent-b:hover, .srecent-b:focus-visible { background: var(--accent-soft); outline: none; }
#sres mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
#sres .s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gl { border-bottom: 2px dotted var(--accent); cursor: help; }
.gl:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.eli-note { color: var(--muted); font-style: italic; font-size: .92em; }
.eli-bar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 14px auto 6px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.eli-l { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; color: var(--ink); }
.eli-l input { width: 20px; height: 20px; accent-color: var(--accent); }
.gl-tip { position: fixed; z-index: 70; display: none; box-sizing: border-box; padding: 12px 14px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 10px 34px rgba(0, 0, 0, .25); font: 15px/1.45 var(--sans); }
.gl-tip p { margin: 6px 0 0; } .gl-tip .gl-plain { color: var(--ink); font-weight: 600; } .gl-tip .gl-def { color: var(--muted); font-size: 14px; }
.gl-mod { font-size: 12px; color: var(--muted); margin-left: 6px; }
.gl-letter { margin: 28px 0 6px; font-size: 1.6rem; color: var(--accent); }
.gl-entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.gl-entry h3 { font-size: 1.15rem; margin: 0 0 4px; } .gl-entry p { margin: 4px 0; }
.gl-entry.focus { background: var(--accent-soft); padding: 12px; border-radius: 8px; border-bottom-color: transparent; }
.dc-stats { margin-top: 14px; }
.dd-row { list-style: none; display: flex; gap: 6px; padding: 0; margin: 8px 0 20px; flex-wrap: wrap; }
.dd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.dd.ok { background: var(--pass); border-color: var(--pass); } .dd.no { background: var(--muted); border-color: var(--muted); }
.today-case { margin: 8px 0; }
/* explainers */
.ex-ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0; }
.ex-rangef input { width: 100%; max-width: none; margin: 0; }
.ex-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 520px; margin: 8px 0; }
.ex-svg { display: block; min-width: 640px; width: 100%; height: auto; font-family: var(--sans); }
.ex-actor rect { fill: var(--accent-soft); stroke: var(--line-strong); } .ex-actor text { fill: var(--ink); font-size: 14px; font-weight: 700; }
.ex-actor.act rect { fill: var(--accent); stroke: var(--accent); } .ex-actor.act text { fill: #fff; }
.ex-life { stroke: var(--line-strong); stroke-dasharray: 4 5; }
.ex-step { opacity: 0; } .ex-step.shown { opacity: .55; } .ex-step.cur { opacity: 1; }
.ex-line { stroke: var(--accent); stroke-width: 2.5; } .ex-step.cur .ex-line { stroke-width: 3.5; }
.ex-arrowhead { fill: var(--accent); }
.ex-lbl { fill: var(--ink); font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.ex-self { fill: var(--accent-soft); stroke: var(--accent); }
.ex-pkt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; } .ex-pkt.self { opacity: 0; }
.ex-note { padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; margin: 10px 0 20px; }
.ex-note h2 { font-size: 1.2rem; margin: 2px 0 6px; } .ex-note p { margin: 0 0 4px; }
.ex-say { align-self: end; }
/* playgrounds */
.editor { width: 100%; box-sizing: border-box; font: 14px/1.5 var(--mono); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--code-bg); color: var(--code-text); tab-size: 2; resize: vertical; }
.sn section.calc { margin-bottom: 18px; }
.sn textarea { width: 100%; box-sizing: border-box; font: 14px/1.5 var(--mono); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.calc-f.wide { grid-column: 1 / -1; }
.sn-bits { font: 600 17px var(--mono); letter-spacing: .04em; margin: 12px 0 2px; word-break: break-all; }
.sn-bits .nb { color: var(--accent); } .sn-bits .hb { color: var(--muted); } .sn-bits i { font-style: normal; color: var(--muted); padding: 0 3px; }
.sn-list { columns: 3 180px; list-style: none; padding: 0; margin: 8px 0; max-height: 360px; overflow: auto; }
.calc-err { color: var(--fail); font-weight: 600; margin: 8px 0; }
.calc-big { font-size: 1.2rem; font-weight: 800; margin: 10px 0 2px; } .calc-big.ok { color: var(--pass); } .calc-big.no { color: var(--fail); }
.tbl-wrap { overflow-x: auto; } .tbl { border-collapse: collapse; width: 100%; font-size: 15px; } .tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); } .tbl thead th { color: var(--muted); font-size: 13px; }
.yp-find { list-style: none; padding: 0; margin: 10px 0; } .yp-find li { padding: 8px 12px; margin: 6px 0; border-radius: 8px; border-left: 4px solid var(--line-strong); background: var(--surface); }
.yp-find .f-error { border-left-color: var(--fail); } .yp-find .f-warn { border-left-color: #b45309; } .yp-find .f-info { border-left-color: var(--accent); }
.py-task { background: var(--accent-soft); padding: 10px 14px; border-radius: 8px; }
@media (max-width: 640px) { .ex-ctl { gap: 8px; } .sn-list { columns: 2 140px; } }
@media print { .eli-bar, .gl-tip, .ex-ctl, .ex-rangef, .sfilters { display: none !important; } .gl { border-bottom: 0; } .eli-note { color: #333; } }
.topbar-in { gap: 20px; }
@media (min-width: 761px) and (max-width: 1340px) { .search-btn span, .search-btn kbd { display: none; } }
.ex-ctl .field, .pyp .field, .yp .field { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ex-ctl select, .pyp select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.ex-ctl .opt-r { margin: 0; }
.iv-filters .field input, .iv-filters .grow input { margin-top: 0; }

/* ---- landing page, round 4 ---- */
.hero2 { padding: 56px 0 48px; }
.hero-grid2 { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.hero2 h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); line-height: 1.05; max-width: 14em; }
.hero2 .lede { max-width: 30em; }
.roles { display: grid; gap: 10px; margin: 0 0 22px; }
.role { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; font: inherit; color: var(--text); cursor: pointer; }
.role:hover { border-color: var(--line-strong); }
.role.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.role .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.role.on .dot { border: 5px solid var(--accent); }
.role strong { color: var(--ink); font-size: 1.05rem; }
.role span { margin-left: auto; color: var(--muted); font-size: .92rem; }
.hero2 .today { margin-top: 20px; }
.term { background: var(--code-bg); border-radius: 14px; box-shadow: 0 18px 50px rgba(15, 37, 71, .25); overflow: hidden; font: 14px/1.6 var(--mono); color: var(--code-text); min-width: 0; }
.tbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--code-line); color: var(--code-dim); font-size: 12.5px; }
.tbar i { width: 10px; height: 10px; border-radius: 50%; background: #3b4a6b; display: inline-block; }
.tbar span { margin-left: 8px; }
.tb { padding: 16px 18px 18px; overflow-x: auto; }
.tb p { margin: 0; white-space: pre; }
.tb .pr, .tb .ok { color: #7CE0B0; } .tb .dim { color: var(--code-dim); } .tb .bad { color: #FF8E86; } .tb .warn { color: #F5C26B; }
.tb .cur { display: inline-block; width: 8px; height: 16px; background: var(--code-text); vertical-align: text-bottom; }
.tl-l.pend { visibility: hidden; }
.term-hint { margin-top: 12px; padding: 10px 12px; border-left: 3px solid #F5C26B; background: #16264a; border-radius: 0 8px 8px 0; font: 13.5px/1.5 var(--sans); color: var(--code-text); white-space: normal; }
.tcap { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--code-line); font: 12.5px var(--sans); color: var(--code-dim); }
.tcap a { color: #9FB6FF; font-weight: 700; }
.stats { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.stats div { border-left: 1px solid var(--line); padding-left: 18px; }
.stats div:first-child { border: 0; padding: 0; }
.stats b { display: block; font: 800 2rem/1.1 var(--sans); color: var(--ink); }
.stats span { color: var(--muted); font-size: .92rem; }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.tl-card h3 { margin: 0 0 12px; font-size: 1rem; color: var(--ink); }
.tl-card ul { margin: 0; padding: 0; list-style: none; }
.tl-card li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.tl-card li:last-child { border: 0; }
.tl-card time { font: 600 .85rem var(--mono); color: var(--muted); }
.tl-card li.x span { color: var(--fail); font-weight: 600; }
.pl-res { list-style: none; padding: 0; margin: 12px 0; }
.pl-res li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .hero-grid2 { grid-template-columns: minmax(0, 1fr); gap: 28px; } .role span { margin-left: 32px; flex-basis: 100%; } }

/* ---- utility strip with the visitor count, top right ---- */
.utilbar { background: var(--surface); border-bottom: 1px solid var(--line); font: 500 .82rem/1 var(--sans); color: var(--muted); }
.utilbar-in { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.util-promise { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.utilbar .visitors { margin-left: auto; color: var(--ink); font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { .util-promise { display: none; } .utilbar-in { justify-content: flex-end; } }

/* ---- skill trees ---- */
.tree-wrap { margin-top: 6px; }
.tree-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 18px; font: 500 .95rem var(--sans); color: var(--muted); }
.tree-meta b { color: var(--ink); }
.tree { position: relative; display: grid; gap: 26px; padding: 6px 0 4px; }
.tree-lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.tree-lines .ln { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 5; }
.tree-lines .ln.done { stroke: var(--pass); stroke-dasharray: none; }
.tree-lines .ln.active { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 8 7; filter: drop-shadow(0 0 4px var(--accent)); animation: flow 1.2s linear infinite; }
.tree-lines .ln.active.run { stroke: var(--run); filter: drop-shadow(0 0 4px var(--run)); }
@keyframes flow { to { stroke-dashoffset: -30; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 8px 2px transparent; } 50% { box-shadow: 0 0 0 5px var(--accent-soft), 0 0 16px 5px var(--accent); } }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.node.s-ready .ring, .node.s-run .ring { animation: glow 2.4s ease-in-out infinite; }
.node.s-run .ring { box-shadow: 0 0 0 4px var(--run-soft); }
.node.just { animation: pop .5s ease-out; }
@media (prefers-reduced-motion: reduce) { .tree-lines .ln.active { animation: none; } .node.s-ready .ring, .node.s-run .ring, .node.just { animation: none; } }
.tier { position: relative; z-index: 1; }
.tier-name { margin: 0 0 8px; font: 600 .82rem var(--sans); color: var(--muted); text-align: center; }
.tier-nodes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 16px; }
.node { width: 148px; }
.node a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; height: 100%; }
.node a:hover { border-color: var(--accent); }
.node .ring { --c: var(--accent); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.node .badge { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 800 1.1rem var(--sans); color: var(--ink); }
.node .badge svg { width: 22px; height: 22px; }
.node .name { font: 700 .95rem/1.2 var(--sans); color: var(--ink); }
.node .sub { font: .8rem/1.3 var(--sans); color: var(--muted); }
.node.s-pass .ring { --c: var(--pass); } .node.s-pass a { border-color: var(--pass); } .node.s-pass .badge { color: var(--pass); background: var(--pass-soft); }
.node.s-ready .ring { --c: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.node.s-ready a { border-color: var(--accent); }
.node.s-run .ring { --c: var(--run); } .node.s-run a { border-color: var(--run); }
.node.s-lock a { background: transparent; border-style: dashed; opacity: .85; }
.node.s-lock .ring { background: var(--line); } .node.s-lock .badge { color: var(--lock); }
.tree-legend { margin: 14px 0 0; text-align: center; }
@media (max-width: 560px) { .node { width: calc(50% - 8px); } .tier-nodes { gap: 14px 12px; } }
@media print { .callout-warning, .callout-danger, .callout-caution { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fff; border: 2px solid #000; border-left-width: 10px; } .callout-warning::before, .callout-danger::before, .callout-caution::before { background: #000; color: #fff; } .callout-danger .callout-title::before { content: "DANGER: "; } .callout-warning .callout-title::before { content: "WARNING: "; } }

/* ---- predict then reveal ---- */
.predict { margin: 22px 0; padding: 16px 18px; border: 1px solid var(--line-strong); border-left: 6px solid var(--accent); border-radius: 12px; background: var(--surface); font-family: var(--sans); }
.predict > * + * { margin-top: 10px; }
.predict-q { margin: 0; font-size: 1.05rem; }
.predict-code { margin: 10px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--code-bg, #0f172a); color: var(--code-fg, #e2e8f0); overflow-x: auto; font: 0.9rem/1.5 var(--mono); white-space: pre-wrap; }
.predict-l { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.predict-guess { font: 1rem/1.4 var(--sans); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); width: 100%; box-sizing: border-box; resize: vertical; }
.predict-out { padding: 12px 14px; border-radius: 8px; background: var(--pass-soft); border: 1px solid var(--pass); }
.predict-out p { margin: 0; }
.predict-out p + p { margin-top: 8px; }

/* ---- clickable diagrams ---- */
.dg { margin: 24px 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dg-title { font: 700 1rem var(--sans); color: var(--ink); margin-bottom: 8px; }
.dg-stage { position: relative; height: calc(var(--rows, 2) * 104px); margin: 6px 0; }
.dg-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dg-stage line { stroke: var(--line-strong); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 5 4; }
.dg-node { position: absolute; transform: translate(-50%, -50%); min-height: 48px; min-width: 64px; padding: 6px 8px; border-radius: 10px; border: 2px solid var(--line-strong); background: var(--surface); z-index: 1; color: var(--ink); font: 600 .82rem/1.2 var(--sans); text-align: center; cursor: pointer; box-sizing: border-box; }
.dg-node:hover { border-color: var(--accent); }
.dg-node[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.dg-live { min-height: 3.2em; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); font-family: var(--sans); }
.dg-live:empty { display: none; }
.dg-live p { margin: 0; } .dg-live p + p { margin-top: 6px; }
.dg-list { margin: 12px 0 0; font: .92rem/1.5 var(--sans); }
.dg-item { padding: 8px 0; border-top: 1px solid var(--line); }
.dg-item dt { font-weight: 700; color: var(--ink); }
.dg-item dd { margin: 2px 0 0; color: var(--muted); }
.dg-item.on { background: var(--accent-soft); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.dg-k { font-weight: 700; color: var(--ink); }
@media (max-width: 560px) { .dg-stage { height: calc(var(--rows, 2) * 120px); } .dg-node { font-size: .74rem; padding: 4px 5px; min-width: 56px; } }

/* ---- explain it to me like ---- */
.levels { margin: 14px 0 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-family: var(--sans); }
.levels-h { margin: 0 0 8px; font-size: 1rem; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-b { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .92rem var(--sans); cursor: pointer; }
.seg-b[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); font-weight: 800; }
.levels-body { margin-top: 10px; }
.levels-body p { margin: 0; } .levels-body p + p { margin-top: 6px; }

/* ---- reading mode ---- */
html[data-a-read="on"] .toc, html[data-a-read="on"] .lesson-tools .btn:not([data-act=read-toggle]), html[data-a-read="on"] .voice, html[data-a-read="on"] .cardsec, html[data-a-read="on"] .foot { display: none; }
html[data-a-read="on"] .lesson-grid { display: block; }
html[data-a-read="on"] .prose { max-width: 66ch; margin: 0 auto; font-size: 1.1875rem; line-height: 1.85; }
html[data-a-read="on"] .prose p, html[data-a-read="on"] .prose li { max-width: none; }
html[data-a-read="on"] .levels, html[data-a-read="on"] .check, html[data-a-read="on"] .pager { max-width: 66ch; margin-left: auto; margin-right: auto; }
html[data-a-read="on"] .prose h2 { margin-top: 2.2em; }
#read-bar { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 60; background: transparent; }
#read-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
@media (prefers-reduced-motion: reduce) { #read-bar i { transition: none; } }
.predict-code code { background: none; padding: 0; color: inherit; border-radius: 0; }

/* search: stage filter */
.sstage { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font: 600 13px var(--sans); }
.sstage select { font: 500 13px var(--sans); padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); min-height: 32px; max-width: 70%; }

/* lesson next-step panel */
.nextstep { margin: 28px 0 8px; padding: 18px 18px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.nextstep h2 { margin: 0 0 10px; font-size: 1.15rem; }
.ns-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.ns-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ns-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.ns-list a:hover, .ns-list a:focus-visible { border-color: var(--accent); }
.ns-k { font: 600 12px var(--sans); color: var(--accent); }
.ns-t { font-size: .95rem; }
@media print { .nextstep { display: none; } }

.about h2 { margin-top: 1.6em; }
.about-pledge { font-size: 1.1rem; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 6px; }

/* brand: larger and highlighted */
.brand b { font-size: 1.65rem; font-weight: 800; letter-spacing: .05em; line-height: 1; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 9px; box-shadow: inset 0 -3px 0 var(--accent); }
.brand img { width: 32px; height: 32px; }
@media (max-width: 640px) { .brand b { font-size: 1.3rem; padding: 4px 9px; } .brand img { width: 26px; height: 26px; } }

/* wrong-answer explanation */
.wrong-pick, .wrong-right { margin: 6px 0; }
.why-others { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.why-others summary { cursor: pointer; font-weight: 600; }
.why-others ul { margin: 8px 0 0 18px; padding: 0; }

/* playground learning aids */
.aids { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.aids-h { margin: 0 0 8px; }
.aids .seg-b.suggest { box-shadow: inset 0 -3px 0 var(--accent); }
.aids-ladder { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
#aids-steps { margin: 0 0 8px 18px; padding: 0; }
#aids-steps li { margin: 6px 0; }

/* capstone projects */
.cap-list { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.cap-list li { margin: .35rem 0; }
.cap-step { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; line-height: 1.5; }
.cap-step:hover { border-color: var(--accent); }
.cap-step input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); flex: none; }
.cap-step input:checked + span { color: var(--muted); text-decoration: line-through; }
.cap-body ol.cap-list { counter-reset: none; }
.lede-s { color: var(--muted); margin: 0 0 .8rem; }
.cap-cards { border-top: 1px solid var(--line); }

/* reading lists and incident games */
.reading { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.reading li { padding: .65rem 0; border-top: 1px solid var(--line); line-height: 1.5; }
.gm-intro { font-size: 1.05rem; line-height: 1.6; padding: .8rem 1rem; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.gm-scene { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; line-height: 1.6; margin: .8rem 0; }
.gm-choices { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.gm-choice { width: 100%; text-align: left; white-space: normal; line-height: 1.45; }
.gm-fb { padding: 1rem 1.1rem; border-radius: 10px; border: 1px solid var(--line); margin: .8rem 0; line-height: 1.55; }
.gm-fb.gm-2 { border-color: #1a8f4c; }
.gm-fb.gm-1 { border-color: #b7791f; }
.gm-fb.gm-0 { border-color: #c0392b; }
.gm-end { padding: 1rem 1.1rem; border-radius: 10px; border: 2px solid var(--line); line-height: 1.6; }
.gm-end-win { border-color: #1a8f4c; }
.gm-end-ok { border-color: #b7791f; }
.gm-end-fail { border-color: #c0392b; }
.gm-log { padding-left: 1.2rem; }
.gm-log li { margin: .5rem 0; }
.gm-list { margin: 0 0 1rem; }
p code, li code, td code { overflow-wrap: anywhere; }
.predict-q, .predict-ans { overflow-wrap: anywhere; }

/* ===== badges ===== */
.bd-caution { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--run); background: var(--run-soft); color: var(--text); border-radius: 8px; max-width: 70ch; }
.bd-grid { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.bd-card a { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 14px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; height: 100%; }
.bd-card a:hover, .bd-card a:focus-visible { border-color: var(--accent); }
.bd-card.on a { border-color: var(--pass); }
.bd-card strong { color: var(--ink); font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.bd-off { opacity: .8; }
.bd-locked { display: grid; justify-items: start; gap: 8px; padding: 12px 0; }
.bd-show { border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.bd-show svg, .bd-reveal svg { display: block; width: 100%; height: auto; }
.bd-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 14px 0 4px; }
.bd-tools .actions { margin: 0; }
.bd-form { display: grid; gap: 8px; max-width: 460px; }
.bd-form label { font-weight: 600; color: var(--ink); }
.bd-form input, .bd-form select { font: 16px var(--sans); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 100%; }
.bd-res { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-strong); }
.bd-res.ok { background: var(--pass-soft); border-color: var(--pass); }
.bd-res.bad { background: var(--fail-soft); border-color: var(--fail); }
.bd-modal { align-items: center; padding: 16px; overflow-y: auto; }
.bd-box { max-height: calc(100vh - 32px); overflow-y: auto; width: min(560px, 100%); }
.bd-box h2 { margin: 12px 0 4px; font-size: 20px; }
.bd-name { margin-top: 28px; }
.bd-reveal { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bd-reveal .bd-ring { stroke-dasharray: 900; stroke-dashoffset: 900; animation: bd-draw 1.1s ease-out .15s forwards; }
.bd-reveal .bd-fill { opacity: 0; animation: bd-fade .7s ease-out .55s forwards; }
.bd-reveal .bd-sym { opacity: 0; animation: bd-fade .6s ease-out .9s forwards; }
@keyframes bd-draw { to { stroke-dashoffset: 0; } }
@keyframes bd-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bd-reveal .bd-ring, .bd-reveal .bd-fill, .bd-reveal .bd-sym { animation: none; opacity: 1; stroke-dashoffset: 0; } }
:root[data-a-motion="reduce"] .bd-reveal .bd-ring, :root[data-a-motion="reduce"] .bd-reveal .bd-fill, :root[data-a-motion="reduce"] .bd-reveal .bd-sym { animation: none; opacity: 1; stroke-dashoffset: 0; }
@media (max-width: 520px) { .bd-grid { grid-template-columns: repeat(2, 1fr); } .bd-tools .btn { width: 100%; } }

/* ===== terminal labs ===== */
.tl-banner { margin: 0 0 18px; border-style: solid; background: var(--accent-soft); }
.tl-banner p { color: var(--text); margin: 0; }
.tl-filter { margin: 10px 0 8px; }
.tl-filter a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tl-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.tl-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.tl-item h3 { font-size: 1.05rem; margin: 0 0 4px; }
.tl-item p { margin: 0 0 4px; }
.tl-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.tl-side { min-width: 0; }
.tl-termwrap { min-width: 0; position: sticky; top: 12px; }
.tl-goals { margin: 0 0 14px; padding-left: 1.2rem; }
.tl-goals li { margin-bottom: 6px; }
.tl-hints { margin: 10px 0; padding-left: 1.2rem; }
.tl-hints li { margin-bottom: 6px; }
.tl-results { list-style: none; margin: 8px 0 0; padding: 0; }
.tl-results li { padding: 4px 0; }
.tl-results .ok strong { color: var(--pass); }
.tl-results .no strong { color: var(--fail); }
.tl-explain { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.tl-term { background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-line); border-radius: 10px; overflow: hidden; }
.tl-bar { padding: 8px 14px; border-bottom: 1px solid var(--code-line); font: 600 13px/1.2 var(--sans); color: var(--code-dim); }
.tl-out { font: 13px/1.5 var(--mono); height: 340px; overflow: auto; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.tl-out:focus-visible, .tl-in:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tl-cmd { color: #fff; }
.tl-e { color: #FFB4AB; }
.tl-note { color: var(--code-dim); }
.tl-line { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--code-line); font: 13px/1.4 var(--mono); }
.tl-ps { flex: none; color: #8BE0B4; white-space: pre; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.tl-in { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: inherit; padding: 4px 0; }
.tl-keys { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.tl-keys .btn { min-height: 40px; padding: 4px 14px; background: var(--code-line); color: var(--code-text); border-color: var(--code-line); }
.tl-edit { padding: 12px 14px; border-top: 1px solid var(--code-line); background: var(--surface); color: var(--text); }
.tl-help { padding: 0 14px 12px; margin: 0; color: var(--code-dim); }
.tl-jump { margin: 0 0 12px; }
@media (max-width: 860px) {
  .tl-grid { grid-template-columns: minmax(0, 1fr); }
  .tl-termwrap { position: static; }
  .tl-out { height: 280px; }
  .tl-item { flex-direction: column; gap: 8px; }
}
@media print { .tl-term, .tl-keys { display: none; } }

.hero-free { font-size: 1.1rem; margin: 0 0 10px; color: var(--ink); }

.gm-ex { margin: .5rem 0 0; padding: .5rem .75rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.gm-why { margin: .35rem 0 0; font-size: .95rem; color: var(--text); }
.gm-why .gm-ex { font-size: .92rem; }

/* hero rotating demo */
.hd { display: flex; flex-direction: column; }
.hd-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 8px 8px 0; background: var(--code-line); }
.hd-tab { font: 600 13px var(--sans); color: var(--code-dim); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; min-height: 40px; cursor: pointer; border-radius: 8px 8px 0 0; }
.hd-tab:hover { color: var(--code-text); }
.hd-tab.on { color: #fff; border-bottom-color: #9FB6FF; background: rgba(255, 255, 255, .06); }
.hd-tab:focus-visible, .hd-pause:focus-visible { outline: 2px solid #9FB6FF; outline-offset: 2px; }
.hd .tbar { padding: 8px 14px; }
.hd-stage { min-height: 292px; }
.hd-stage .tl-l { white-space: normal; }
.hd-flow { display: flex; align-items: center; gap: 10px; margin: 4px 0 !important; }
.hd-flow b { flex: 0 0 auto; min-width: 7.5em; padding: 2px 8px; border: 1px solid var(--code-line); border-radius: 6px; font-weight: 600; background: #16264a; text-align: center; }
.hd-flow span { flex: 1 1 auto; color: #9FB6FF; border-bottom: 1px dashed #4a5f8f; text-align: center; font-size: 13px; padding-bottom: 2px; }
.hd-node { margin: 4px 0 !important; }
.hd-node b { display: inline-block; padding: 2px 10px; border: 1px solid #4a5f8f; border-radius: 6px; background: #16264a; font-weight: 600; }
.hd-node.bad b { border-color: #FF8E86; color: #FF8E86; }
.hd-node:not(:first-child)::before { content: ""; display: block; width: 2px; height: 8px; margin: 0 0 4px 22px; background: #4a5f8f; }
.hd-ch { display: flex; gap: 10px; align-items: center; margin: 5px 0 !important; padding: 6px 10px; border: 1px solid var(--code-line); border-radius: 8px; }
.hd-ch i { flex: 0 0 12px; height: 12px; border-radius: 50%; border: 2px solid #4a5f8f; }
.hd-ch.pick { border-color: #7CE0B0; background: rgba(124, 224, 176, .1); }
.hd-ch.pick i { background: #7CE0B0; border-color: #7CE0B0; }
.hd-stage .tl-l:not(.pend) { animation: hd-in .25s ease-out; }
@keyframes hd-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.hd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.hd-ctl { display: inline-flex; align-items: center; gap: 14px; }
.hd-pause { font: 600 12.5px var(--sans); color: var(--code-text); background: transparent; border: 1px solid #4a5f8f; border-radius: 6px; padding: 4px 10px; min-height: 28px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .hd-stage .tl-l:not(.pend) { animation: none; } }
@media (max-width: 520px) { .hd-tab { padding: 8px 8px; font-size: 12.5px; } .hd-flow b { min-width: 5.5em; } .hd-stage { min-height: 330px; } }

/* two ways to learn: skills page, doors, plan builder, test-out */
.doors-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.door { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.door h3 { margin: 0; font: 700 1.35rem var(--sans); color: var(--ink); }
.door p { margin: 0; }
.door .chips { margin-top: 2px; }
.door .actions { margin-top: auto; padding-top: 6px; }
.door-paths { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.door-paths a { display: grid; gap: 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--paper); }
.door-paths a:hover { border-color: var(--accent); }
.door-paths strong { color: var(--ink); }
.door-paths span { color: var(--muted); font-size: .9rem; }
.door-bar { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.door-bar i { display: block; height: 100%; background: var(--pass); }
.goals { margin-top: 12px; margin-bottom: 8px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin: 4px 0 32px; }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.skill p { margin: 0; }
.skill-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.skill h3 { margin: 0; font: 700 1.15rem var(--sans); }
.skill h3 a { color: var(--ink); text-decoration: none; }
.skill h3 a:hover { color: var(--accent); }
.skill.s-pass { border-color: var(--pass); }
.skill .actions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.two-col { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 32px; align-items: start; }
.plan-pick fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--surface); }
.plan-pick legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.pick:hover { background: var(--paper); }
.pick input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.pick span { display: grid; gap: 2px; }
.pick small { color: var(--muted); }
.plan-meta { margin: 0 0 12px; }
.plan-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.plan-steps .step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.plan-steps .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.plan-steps .step.s-pass .n { background: var(--pass-soft); color: var(--pass); }
.plan-steps .step div { display: grid; gap: 4px; }
.plan-steps a { color: var(--ink); }
.choose-note { margin-top: 28px; }
@media (max-width: 860px) {
  .doors-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .skills-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Certifications icon link in the top navigation */
.topnav a.nav-certs { display: inline-flex; align-items: center; gap: 6px; padding: 8px 9px; }
.topnav a.nav-certs svg { display: block; }
@media (max-width: 900px) { .topnav a.nav-certs::after { content: "Certifications"; } .topnav a.nav-certs .sr { display: none; } }
