/* =====================================================================
   Droplet Labs · 奥派之路 · Austrian Path — DESIGN SYSTEM v2 (2026-09)
   Brand language of Droplet Labs (shared with Satoshi / Options / Finance
   Path): brand paper #F2F2F0, ink type, Outfit throughout, hairline
   editorial layout, black floating pill nav, dark closing block.
   Course accent = gold (hard money), contrast hue = blue (mainstream /
   demand curves in figures).
   Content contract (lessons + demos use these names, keep them):
   --ink --muted --line --surface --surface-2 --orange(-ink/-soft/-line)
   --blue(-soft) --green(-soft) --red(-soft) --gold
   Here --orange* = the gold accent, --blue* = true blue.
   ===================================================================== */

:root {
  /* brand ground */
  --paper: #F2F2F0;
  --paper-2: #FAFAF8;
  --night: #080808;
  --night-text: #F2F2F0;
  --night-muted: #8A8A85;
  --night-line: rgba(255, 255, 255, .12);

  /* content contract */
  --bg: var(--paper);
  --surface: #FCFCFA;
  --surface-2: #ECECE8;
  --line: rgba(8, 8, 8, .13);
  --line-soft: rgba(8, 8, 8, .07);
  --text: #23231F;
  --ink: #0E0E0D;
  --muted: #6A6A65;
  --orange: #C08A1E;                    /* course accent: gold (fills, lines) */
  --orange-ink: #875A0C;                /* accent for text on paper (AA) */
  --orange-soft: rgba(192, 138, 30, .13);
  --orange-line: rgba(192, 138, 30, .48);
  --orange-hi: rgba(226, 172, 48, .30); /* highlighter */
  --wash: #F3E6C4;
  --btc: #F7931A;
  --btc-ink: #B45F06;
  --btc-soft: rgba(247, 147, 26, .14);
  --green: #1F8F66;
  --green-soft: rgba(31, 143, 102, .12);
  --red: #D1453B;
  --red-soft: rgba(209, 69, 59, .10);
  --gold: #C99A12;
  --blue: #2F6FB5;                      /* contrast hue (blue) */
  --blue-soft: rgba(47, 111, 181, .11);

  --font: "Outfit", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: var(--font);
  --mono: "Geist Mono", "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(8, 8, 8, .04), 0 2px 8px rgba(8, 8, 8, .04);
  --shadow-md: 0 12px 34px -12px rgba(8, 8, 8, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-top: 12px;
  --nav-h: 60px;
  --read: 17.5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--nav-top) + 20px); overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}
:lang(zh) body, html[lang="zh-CN"] body { letter-spacing: .01em; }
::selection { background: var(--orange-hi); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; }
a { color: var(--orange-ink); text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; }
#app, .closing { position: relative; z-index: 1; }

#app { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; padding: calc(var(--nav-top) + var(--nav-h) + 40px) 0 72px; min-height: 70vh; }

/* ---------- type primitives ---------- */
.label { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex: none; }
.chip-label { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
h1, h2, h3 { color: var(--ink); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 em, h2 em { font-style: normal; color: var(--orange-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 22px; min-height: 48px; border-radius: 12px; font-weight: 500; font-size: .98rem; line-height: 1.15; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease), box-shadow .3s var(--ease); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: .9rem; border-radius: 12px; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-text { display: block; min-width: 0; text-align: left; }
.btn-text small { display: block; font-size: .78rem; opacity: .65; font-weight: 400; margin-bottom: 2px; }

/* ---------- reading progress ---------- */
.readbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--orange); z-index: 80; transition: width .1s linear; }

/* =====================================================================
   NAV — black floating pill (Droplet Labs)
   ===================================================================== */
.nav { position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 60; pointer-events: none; }
.nav-inner { pointer-events: auto; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 14px; padding: 0 10px 0 18px; background: rgba(8, 8, 8, .96); color: var(--night-text);
  border-radius: 20px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45); }
@supports (backdrop-filter: blur(12px)) { .nav-inner { background: rgba(8, 8, 8, .88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); } }
.nav-brand { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; color: inherit; }
.nav-logo { height: 30px; width: auto; display: block; flex: none; }
.nav-sep { width: 1px; height: 22px; background: var(--night-line); flex: none; }
.nav-course { font-size: 1rem; font-weight: 400; color: var(--night-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.nav-course b { font-weight: 500; }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nav-prog { display: inline-flex; align-items: center; gap: 9px; padding: 0 12px; height: 38px; border-radius: 12px; color: rgba(242, 242, 240, .78); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ring { width: 22px; height: 22px; flex: none; }
.ring circle { fill: none; stroke-width: 3; }
.ring .bg { stroke: rgba(255, 255, 255, .16); }
.ring .fg { stroke: var(--orange); stroke-linecap: round; transition: stroke-dashoffset .5s var(--ease); }
.nav-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--night-line); background: transparent; color: var(--night-text); font-size: .9rem; cursor: pointer; transition: background .25s, border-color .25s; white-space: nowrap; }
.nav-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .24); }
.nav-btn.paper { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 500; }
.nav-btn.paper:hover { background: #fff; }
.nav-btn svg { width: 16px; height: 16px; }
.nav-menu-btn { display: none; }

/* =====================================================================
   HOME
   ===================================================================== */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; padding-bottom: 12px; }
.hero-copy .chip-label { margin-bottom: 26px; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5.1rem); letter-spacing: -.035em; line-height: 1.02; }
.hero-lede { font-size: clamp(1.08rem, 1.5vw, 1.28rem); color: #3A3A36; line-height: 1.6; margin: 24px 0 0; max-width: 54ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.hero-facts b { color: var(--ink); font-weight: 500; font-size: 1.35rem; letter-spacing: -.01em; margin-right: 6px; font-variant-numeric: tabular-nums; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-cta .btn-ink { max-width: 100%; }

.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); }
.prog-panel { position: relative; overflow: hidden; }
.prog-panel .mark { position: absolute; right: -34px; top: -30px; width: 170px; opacity: .10; pointer-events: none; }
.prog-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.prog-big { font-size: 3.4rem; line-height: 1; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.prog-big small { font-size: 1.1rem; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.prog-sub { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.progress-track { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 20px 0 6px; }
.progress-fill { height: 100%; background: var(--ink); border-radius: 99px; transition: width .6s var(--ease); }
.tier-meter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; }
.tier-meter i { height: 4px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; display: block; }
.tier-meter i b { position: absolute; inset: 0 auto 0 0; background: var(--c); border-radius: 3px; }
.next-up { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.next-up .label { margin-bottom: 10px; }
.next-up a { display: block; color: var(--ink); font-size: 1.05rem; line-height: 1.4; }
.next-up a:hover { color: var(--orange-ink); }
.next-up .code { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.goals { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.goals .label { margin-bottom: 12px; }
.goal-row { display: flex; flex-wrap: wrap; gap: 7px; }
.goal-chip { border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: .9rem; padding: 7px 14px; border-radius: 99px; cursor: pointer; transition: .2s; }
.goal-chip:hover { border-color: var(--ink); }
.goal-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.done-banner { background: var(--green-soft); border: 1px solid rgba(31, 143, 102, .35); color: #17664A; border-radius: var(--radius); padding: 16px 20px; margin: 28px 0 0; font-size: 1rem; font-weight: 500; }

/* editorial section grid (label column + body) */
.sec { margin-top: clamp(64px, 8vw, 104px); }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px clamp(24px, 4vw, 56px); border-top: 1px solid var(--line); padding-top: 26px; }
.sec-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-top: 14px; }
.sec-head p { color: var(--muted); margin: 12px 0 0; font-size: .98rem; max-width: 36ch; }

/* the four ideas */
.ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.idea { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 22px 22px 20px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.idea:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.idea-n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--wash); color: var(--orange-ink); font-weight: 500; font-size: 1.05rem; }
.idea h3 { font-size: 1.25rem; font-weight: 500; margin: 16px 0 8px; letter-spacing: -.01em; }
.idea p { margin: 0; color: #4A4A45; font-size: .97rem; line-height: 1.6; }
.idea .where { margin-top: 12px; font-size: .84rem; color: var(--muted); }

/* how a lesson works */
.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 12px; font-size: .92rem; color: var(--ink); line-height: 1.3; }
.steps li::before { content: "0" counter(st); display: block; font-size: .72rem; color: var(--muted); letter-spacing: .1em; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; margin-top: 26px; }
.principles h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 500; color: var(--ink); }
.principles p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }

/* roadmap */
.tier-nav { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 10px); z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px; margin: 0 -8px 8px; background: rgba(242, 242, 240, .86); border-radius: 16px; }
@supports (backdrop-filter: blur(10px)) { .tier-nav { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(242, 242, 240, .72); } }
.tier-nav::-webkit-scrollbar { display: none; }
.tier-nav a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); font-size: .86rem; white-space: nowrap; background: var(--paper-2); transition: .2s; }
.tier-nav a:hover { border-color: var(--ink); }
.tier-nav a i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tier-nav a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.tier { margin-top: 44px; scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 76px); }
.tier-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px clamp(24px, 4vw, 56px); border-top: 1px solid var(--line); padding-top: 22px; }
.tier-side { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 90px); align-self: start; }
.tier-side .label i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.tier-side h2 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); margin-top: 12px; letter-spacing: -.02em; }
.tier-side .tp { margin-top: 12px; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tier-side .tp .bar { height: 3px; background: var(--surface-2); border-radius: 3px; margin-top: 8px; overflow: hidden; max-width: 180px; }
.tier-side .tp .bar b { display: block; height: 100%; background: var(--c); }
.tier.focus .tier-grid { border-top-color: var(--btc); }
.focus-tag { display: inline-block; margin-top: 12px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--btc-ink); background: var(--btc-soft); padding: 5px 10px; border-radius: 99px; }

.stages-list { display: flex; flex-direction: column; gap: 14px; }
.stage { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; padding: 20px 20px 10px; }
.stage-top { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 12px; }
.stage-num { width: 44px; height: 44px; border-radius: 13px; flex: none; display: grid; place-items: center; color: #fff; font-size: 1.05rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stage.done .stage-num { background: var(--green) !important; }
.stage-body { flex: 1; min-width: 0; }
.stage-title { font-size: 1.28rem; font-weight: 500; color: var(--ink); letter-spacing: -.01em; line-height: 1.3; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.stage-count { font-size: .8rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-done-badge { font-size: .74rem; font-weight: 500; color: var(--green); background: var(--green-soft); border-radius: 99px; padding: 3px 9px; }
.stage-blurb { color: var(--muted); font-size: .93rem; margin: 5px 0 0; line-height: 1.55; }
.chips { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.chip { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 13px 6px; min-height: 52px; border: 0; border-bottom: 1px solid var(--line-soft); background: none; text-align: left; color: var(--ink); font-size: 1rem; line-height: 1.4; cursor: pointer; border-radius: 0; transition: background .2s, padding .3s var(--ease); }
.chip:last-child { border-bottom: 0; }
.chip:hover { background: var(--paper); padding-left: 12px; border-radius: 10px; }
.chip-code { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.chip-title { min-width: 0; }
.chip-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; color: #fff; }
.chip-mark.done { background: var(--green); border-color: var(--green); }
.chip-arrow { color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.chip:hover .chip-arrow { transform: translateX(3px); color: var(--ink); }
.chip.dim { opacity: .38; }
.rec-badge { font-size: .72rem; font-weight: 500; color: var(--orange-ink); background: var(--orange-soft); border-radius: 99px; padding: 3px 9px; }
.chip-soon { cursor: default; color: var(--muted); }
.soon-tag { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; }

/* difficulty */
.stars { display: inline-flex; gap: 3px; align-items: center; flex: none; }
.stars i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.stars i.off { background: var(--line); }
.stars .off { color: var(--line); }

/* =====================================================================
   LESSON
   ===================================================================== */
.lesson-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr) 208px; gap: clamp(28px, 3.4vw, 56px); align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 20px); max-height: calc(100vh - var(--nav-top) - var(--nav-h) - 36px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; padding: 4px 6px 24px 2px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sb-home { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .95rem; cursor: pointer; border: 0; background: none; padding: 6px 0; }
.sb-home:hover { color: var(--orange-ink); }
.sb-progress { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-close { display: none; }
.sb-stage { border-top: 1px solid var(--line-soft); }
.sb-stage summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 4px; font-size: .88rem; color: var(--ink); line-height: 1.35; }
.sb-stage summary::-webkit-details-marker { display: none; }
.sb-stage summary .n { width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center; font-size: .72rem; color: #fff; font-variant-numeric: tabular-nums; }
.sb-stage summary .t { flex: 1; min-width: 0; }
.sb-stage summary .c { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-stage summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .25s; margin-right: 4px; flex: none; }
.sb-stage[open] summary::after { transform: rotate(45deg); }
.sb-list { padding: 0 0 10px; }
.sb-lesson { display: grid; grid-template-columns: 16px 30px minmax(0, 1fr); gap: 6px; align-items: baseline; padding: 7px 8px; border-radius: 9px; font-size: .88rem; line-height: 1.4; color: #3A3A36; cursor: pointer; transition: background .2s; }
.sb-lesson:hover { background: rgba(8, 8, 8, .05); }
.sb-lesson .cd { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.sb-check { color: var(--green); font-size: .78rem; }
.sb-lesson.active { background: var(--ink); color: var(--paper); }
.sb-lesson.active .cd { color: rgba(242, 242, 240, .6); }
.sb-lesson.dim { opacity: .4; }
.sb-lesson.soon { cursor: default; }
.sb-t { min-width: 0; }
.scrim { position: fixed; inset: 0; background: rgba(8, 8, 8, .38); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .3s; }

.lesson-main { min-width: 0; max-width: 760px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); cursor: pointer; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .tierdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lsn-title { font-size: clamp(2rem, 3.8vw, 3rem); letter-spacing: -.03em; line-height: 1.08; font-weight: 400; color: var(--ink); margin: 0; }
.lsn-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.meta-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line-soft); font-size: .84rem; color: #3A3A36; white-space: nowrap; }
.meta-pill .stars { margin-right: 2px; }
.diff-badge { display: none; }
.lsn-tag { margin-top: 14px; font-size: .9rem; color: var(--muted); }
.lsn-tag a { color: var(--ink); border-bottom: 1px solid var(--line); }
.lsn-tag a:hover { border-color: var(--ink); }
.fallback-note { font-size: .86rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 14px; margin: 16px 0 0; }

.oneliner { margin: 28px 0 0; padding: 24px 26px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; font-size: clamp(1.06rem, 1.4vw, 1.2rem); line-height: 1.7; color: var(--ink); position: relative; }
.oneliner::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }

.view-switch { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-size: .86rem; color: var(--muted); cursor: pointer; transition: .2s; }
.seg button.on { background: var(--paper-2); color: var(--ink); box-shadow: var(--shadow-sm); }
.depth-toggle { display: none; }

/* reading sections */
.section { margin: 56px 0 0; scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 24px); }
.section-h { display: flex; align-items: baseline; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); margin: 0 0 22px; font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 400; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
.section-h .no { font-size: .8rem; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; transform: translateY(-4px); }
.prose, .section { font-size: var(--read); }
.section p { margin: 0 0 1.05em; line-height: 1.78; }
html[lang="zh-CN"] .section p, html[lang="zh-CN"] .section li { line-height: 1.9; }
.section ul { margin: 0 0 1.1em; padding-left: 1.25em; }
.section li { margin: .45em 0; line-height: 1.72; }
.section li::marker { color: var(--muted); }
.section code { font-family: var(--mono); font-size: .84em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.section blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--ink); color: #3A3A36; font-size: 1.04em; line-height: 1.7; }
.section .subhead { font-size: clamp(1.15rem, 1.8vw, 1.32rem); font-weight: 500; color: var(--ink); margin: 2.2em 0 .8em; letter-spacing: -.01em; line-height: 1.35; scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 24px); }
.section .subhead:first-of-type { margin-top: 0; }
.section.deep[hidden] { display: none; }
.section a:not(.xref) { color: var(--orange-ink); border-bottom: 1px solid var(--orange-line); }
.lesson-main strong { font-weight: 600; color: var(--ink); background-image: linear-gradient(180deg, transparent 60%, var(--orange-hi) 60%); padding: 0 1px; border-radius: 2px; }
.oneliner strong { font-weight: 600; background-image: linear-gradient(180deg, transparent 60%, var(--orange-hi) 60%); }

/* formula, figures, tables */
.section .formula { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 10px 22px; margin: 1.4em 0; color: var(--ink); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.formula .katex-display { margin: .7em 0; }
.formula .katex-display + .katex-display { padding-top: .7em; border-top: 1px dashed var(--line-soft); }
.katex { font-size: 1.12em; color: inherit; }
.section p .katex, .section li .katex, .oneliner .katex, .quiz-q .katex, .miscon .katex, .table-wrap .katex { font-size: 1.05em; }
.katex .text, .katex .mord.text, .katex .textrm { font-family: var(--font); }
.tex-err { color: var(--red); background: var(--red-soft); }
.demo .katex { font-size: 1.04em; }
.demo .katex-display { margin: .4em 0; overflow-x: auto; overflow-y: hidden; }
.lesson-main figure { margin: 1.8em 0; padding: 22px 20px 16px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 20px; overflow-x: auto; }
.lesson-main figure > svg { display: block; width: 100%; height: auto; margin: 0 auto; font-family: var(--font); }
.lesson-main figure > svg text { font-family: var(--font); }
.lesson-main figcaption { font-size: .86rem; color: var(--muted); margin-top: 14px; line-height: 1.6; text-align: left; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.table-wrap { margin: 1.4em 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; -webkit-overflow-scrolling: touch; }
.lesson-main .section table { width: 100%; border-collapse: collapse; font-size: .88em; margin: 0; }
.lesson-main .section > table { display: block; overflow-x: auto; margin: 1.4em 0; }
.lesson-main .section th, .lesson-main .section td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; line-height: 1.55; }
.lesson-main .section tr:last-child td { border-bottom: 0; }
.lesson-main .section th { color: var(--muted); font-weight: 500; font-size: .86em; letter-spacing: .02em; background: var(--paper-2); white-space: nowrap; }
.lesson-main .section td { font-variant-numeric: tabular-nums; }

/* misconceptions */
.miscon { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: mc; }
.miscon li { counter-increment: mc; position: relative; margin: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 16px 18px 16px 56px; font-size: .96em; line-height: 1.7; }
.miscon li::before { content: "✕"; position: absolute; left: 16px; top: 16px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: .8rem; font-weight: 600; }

/* quiz */
.quiz-q { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 20px; }
.quiz-stem { font-weight: 500; color: var(--ink); margin-bottom: 14px; line-height: 1.55; font-size: 1.02em; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; counter-reset: qo; }
.quiz-opt { counter-increment: qo; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; border: 1px solid var(--line); background: var(--paper-2); color: var(--text); border-radius: 12px; padding: 12px 14px; font-size: .95em; line-height: 1.55; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.quiz-opt::before { content: counter(qo, upper-alpha); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 500; }
.quiz-opt:hover:not(:disabled) { border-color: var(--ink); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.correct { background: var(--green-soft); border-color: var(--green); color: var(--ink); }
.quiz-opt.correct::before { content: "✓"; background: var(--green); color: #fff; }
.quiz-opt.wrong { background: var(--red-soft); border-color: var(--red); }
.quiz-opt.wrong::before { content: "✕"; background: var(--red); color: #fff; }
.quiz-explain { font-size: .92em; color: #3A3A36; margin-top: 14px; padding: 12px 14px; background: var(--paper); border-radius: 12px; line-height: 1.65; }

/* further reading */
.further { display: grid; gap: 8px; }
.further a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-soft); background: var(--surface); border-radius: 14px; color: var(--ink); font-size: .95em; line-height: 1.45; transition: border-color .2s, transform .3s var(--ease); }
.further a:hover { border-color: var(--ink); transform: translateY(-1px); }
.further a small { display: block; color: var(--muted); font-size: .8em; margin-top: 3px; }
.further a .ext { flex: none; color: var(--muted); }

/* complete + prev/next */
.complete { margin-top: 48px; width: 100%; min-height: 56px; font-size: 1.02rem; border-radius: 14px; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; font-weight: 500; transition: .25s; }
.complete:hover { background: #000; box-shadow: var(--shadow-md); }
.complete.done { background: var(--green-soft); color: var(--green); cursor: default; box-shadow: none; }
.lsn-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.navbtn { text-align: left; border: 1px solid var(--line-soft); background: var(--surface); border-radius: 16px; padding: 16px 18px; cursor: pointer; font-size: .8rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; transition: border-color .2s, transform .3s var(--ease); min-width: 0; }
.navbtn:hover { border-color: var(--ink); transform: translateY(-1px); }
.navbtn span { display: block; color: var(--ink); font-size: 1rem; letter-spacing: 0; text-transform: none; margin-top: 6px; line-height: 1.4; }
.navbtn-next { text-align: right; }
.navbtn.pulse { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.kbd-hint { margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }
.kbd-hint kbd { font-family: var(--mono); font-size: .75rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--paper-2); }

/* on this page (TOC) */
.toc { position: sticky; top: calc(var(--nav-top) + var(--nav-h) + 24px); font-size: .84rem; max-height: calc(100vh - var(--nav-top) - var(--nav-h) - 48px); overflow-y: auto; scrollbar-width: none; }
.toc .label { margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; transition: color .2s, border-color .2s; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--ink); border-left-color: var(--ink); }
.toc li.sub a { padding-left: 26px; font-size: .8rem; }
.toc .toc-actions { margin-top: 18px; display: grid; gap: 8px; }
.toc .toc-actions button { text-align: left; border: 0; background: none; color: var(--muted); font-size: .82rem; cursor: pointer; padding: 0; }
.toc .toc-actions button:hover { color: var(--ink); }

/* =====================================================================
   GLOSSARY CARDS & CROSS-REFERENCES (decorated by app.js)
   ===================================================================== */
.gloss { border-bottom: 1.5px dotted var(--orange); cursor: help; position: relative; }
.gloss:focus { outline: none; }
.gloss:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
.gloss-card { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: max-content; max-width: min(320px, 80vw); background: var(--ink); color: var(--paper); border-radius: 14px; box-shadow: 0 20px 40px -12px rgba(8, 8, 8, .45); padding: 12px 14px; font-size: .86rem; line-height: 1.6; font-weight: 400; text-align: left; white-space: normal; letter-spacing: 0; pointer-events: none; display: none; }
.gloss-card.flip { left: auto; right: 0; }
.gloss-card b { display: block; color: #8CCBEB; font-weight: 500; font-size: .86rem; margin-bottom: 4px; }
.gloss:hover > .gloss-card, .gloss:focus > .gloss-card, .gloss:focus-within > .gloss-card { display: block; animation: gloss-in .16s ease both; }
@keyframes gloss-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (hover: none) { .gloss { border-bottom-style: dashed; } }
a.xref { color: var(--orange-ink); text-decoration: none; border-bottom: 1px solid var(--orange-line); font-weight: 500; white-space: nowrap; }
a.xref:hover { background: var(--orange-soft); border-bottom-color: var(--orange); border-radius: 3px; }

/* =====================================================================
   DEMOS — shared widget kit (class names are part of the content contract)
   ===================================================================== */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 2.4vw, 26px); margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); box-shadow: var(--shadow-sm); }
.demo-head { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 0 0 18px; color: var(--ink); font-size: 1.08rem; line-height: 1.35; letter-spacing: -.005em; }
.demo-block { margin: 18px 0; }
.demo-block:first-of-type { margin-top: 0; }
.demo-label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 6px; font-weight: 400; line-height: 1.45; }
.demo-label b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.demo-ta, .demo-inp { width: 100%; background: var(--paper-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; font-family: var(--font); font-size: 15px; resize: vertical; }
.demo-ta:focus, .demo-inp:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.demo-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.demo-row { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; flex-wrap: wrap; gap: 8px; }
.demo-check { font-size: .88rem; color: var(--muted); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.demo-out { font-family: var(--mono); font-size: .86rem; word-break: break-word; line-height: 1.6; background: var(--paper); border-radius: 12px; padding: 14px; margin-top: 10px; color: var(--ink); }
.demo-out-sm { font-size: .8rem; color: var(--text); margin-top: 8px; }
.demo-tip { font-size: .88rem; color: #4A4A45; margin: 18px 0 0; line-height: 1.65; padding: 12px 14px 12px 40px; background: var(--wash); border-radius: 12px; position: relative; }
.demo-tip::before { content: "i"; position: absolute; left: 14px; top: 13px; width: 17px; height: 17px; border-radius: 50%; background: var(--orange-ink); color: #fff; font-size: .72rem; font-weight: 600; display: grid; place-items: center; font-style: italic; }
.demo-meta { font-size: .84rem; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.demo-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.demo-bar span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .3s; }
.demo-warn { background: var(--red-soft); border-radius: 12px; padding: 14px; color: var(--text); font-size: .92rem; }

/* sliders */
.demo-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; margin: 2px 0 0; cursor: pointer; accent-color: var(--orange); }
.demo-slider:focus { outline: none; }
.demo-slider::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--surface-2); }
.demo-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(8, 8, 8, .18); transition: transform .15s; }
.demo-slider:active::-webkit-slider-thumb, .demo-slider:focus-visible::-webkit-slider-thumb { transform: scale(1.15); border-color: var(--orange); }
.demo-slider::-moz-range-track { height: 4px; border-radius: 4px; background: var(--surface-2); }
.demo-slider::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
.demo-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); }

/* buttons & segmented controls */
.demo-btn { border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); border-radius: 10px; padding: 8px 14px; min-height: 38px; font-size: .88rem; cursor: pointer; transition: border-color .2s, background .2s, color .2s; font-weight: 400; line-height: 1.3; }
.demo-btn:hover { border-color: var(--ink); }
.demo-btn:disabled { opacity: .45; cursor: default; }
.demo-btn.active, .demo-btn.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.demo-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.demo-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); max-width: 100%; }
.demo-seg button { border: 0; background: none; padding: 7px 13px; border-radius: 9px; font-size: .86rem; cursor: pointer; color: var(--muted); line-height: 1.3; transition: .2s; }
.demo-seg button:hover { color: var(--ink); }
.demo-seg button.on { background: var(--ink); color: var(--paper); }
.demo-switch { display: flex; align-items: center; gap: 9px; font-size: .9rem; cursor: pointer; user-select: none; margin-bottom: 6px; }

/* logs, pills, stats */
.demo-log { background: var(--paper); border-radius: 12px; padding: 12px 14px; font-size: .88rem; min-height: 52px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.demo-log .ok { color: var(--green); }
.demo-log .bad { color: var(--red); }
.demo-log .warn { color: var(--btc-ink); }
.pill { display: inline-block; font-size: .76rem; padding: 3px 10px; border-radius: 99px; font-weight: 500; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin-top: 14px; }
.stat { min-width: 0; border-radius: 14px; padding: 12px 14px; background: var(--paper); text-align: left; }
.stat .k { font-size: .76rem; color: var(--muted); font-weight: 400; line-height: 1.35; }
.stat .v { font-size: 1.32rem; font-weight: 500; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.stat .v.pos { color: var(--green); }
.stat .v.neg { color: var(--red); }
.stat .v.acc { color: var(--orange-ink); }

/* compare cards, scenario cards */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cmp-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cmp-cell { border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; background: var(--paper-2); min-width: 0; }
.cmp-cell h5 { margin: 0 0 8px; font-size: .84rem; color: var(--muted); font-weight: 500; }
.cmp-cell.hl { border-color: var(--orange-line); background: var(--orange-soft); }
.cmp-cell.cold { border-color: rgba(47, 111, 181, .4); background: var(--blue-soft); }
.scn { border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; margin-top: 8px; background: var(--paper-2); }
.scn-q { font-size: .98rem; margin-bottom: 12px; color: var(--ink); line-height: 1.55; }
.scn-meta { font-size: .86rem; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* bars */
.bar2 { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.bar2 .lab { width: 96px; font-size: .84rem; color: var(--muted); flex: none; line-height: 1.3; }
.bar2 .track { flex: 1; height: 20px; background: var(--surface-2); border-radius: 6px; overflow: hidden; min-width: 0; }
.bar2 .fill { height: 100%; border-radius: 6px; transition: width .35s var(--ease); }
.bar2 .val { width: 76px; text-align: right; font-size: .84rem; flex: none; font-variant-numeric: tabular-nums; }
.stages { display: flex; flex-direction: column; gap: 7px; margin: 12px 0; }
.stage-bar { display: flex; align-items: center; gap: 10px; }
.stage-bar .lab { width: 118px; font-size: .82rem; color: var(--muted); flex: none; text-align: right; line-height: 1.3; }
.stage-bar .track { flex: 1; height: 20px; background: var(--surface-2); border-radius: 6px; overflow: hidden; position: relative; min-width: 0; }
.stage-bar .fill { height: 100%; border-radius: 6px; background: var(--orange); transition: width .35s var(--ease); }
.stage-bar .fill.ghost { position: absolute; top: 0; left: 0; background: none; border: 1.5px dashed var(--blue); box-sizing: border-box; }
.stage-bar .val { width: 66px; font-size: .82rem; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.strip { display: flex; flex-wrap: wrap; gap: 2px; margin: 10px 0; }
.strip-cell { width: 8px; height: 16px; border-radius: 2px; background: var(--surface-2); }
.strip-cell.on { background: var(--orange); }
.strip-cell.win { background: var(--green); }
.strip-cell.lose { background: var(--red); }

/* people, timeline, notes */
.person { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px; background: var(--paper-2); }
.person .yr { font-family: var(--mono); font-size: .78rem; color: var(--orange-ink); flex: none; min-width: 78px; }
.person b { color: var(--ink); font-weight: 500; }
.person p { margin: 3px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.55; }
.tl { position: relative; padding-left: 24px; margin: 12px 0; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; margin: 0 0 14px; font-size: .92rem; line-height: 1.55; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--ink); }
.tl-item.dim::before { border-color: var(--line); }
.tl-item .when { font-family: var(--mono); font-size: .78rem; color: var(--orange-ink); margin-right: 8px; }
.risk-note { border: 1px solid rgba(201, 154, 18, .45); background: rgba(201, 154, 18, .09); border-radius: 14px; padding: 14px 18px; margin: 20px 0 0; font-size: .88rem; line-height: 1.62; }
.risk-note b { color: var(--ink); }
.detail { border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; margin-top: 10px; font-size: .92rem; background: var(--paper-2); line-height: 1.6; }

/* charts (demos/_chart.js) */
.chart { margin-top: 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line2 { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line3 { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line4 { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line5 { fill: none; stroke: var(--btc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--orange-soft); }
.chart .dot { fill: var(--orange); }
.chart .marker { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 2 3; }
.chart .lbl, .chart .lbl-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .82rem; color: var(--muted); margin-top: 10px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }

/* =====================================================================
   CLOSING BLOCK (footer)
   ===================================================================== */
.closing { background: var(--night); color: var(--night-text); margin-top: 40px; border-radius: 28px 28px 0 0; }
.closing-inner { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(40px, 6vw, 64px) 0 26px; }
.closing-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--night-line); }
.closing h2 { color: var(--night-text); font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 20ch; }
.closing p { color: var(--night-muted); margin: 12px 0 0; font-size: .95rem; max-width: 52ch; line-height: 1.6; }
.closing-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.closing-links a { color: var(--night-text); }
.closing .btn-line { color: var(--night-text); border-color: var(--night-line); }
.closing .btn-line:hover { border-color: var(--night-text); }
.closing-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 24px; font-size: .84rem; color: var(--night-muted); }
.footer-logo { height: 58px; width: auto; display: block; }
.closing-bottom .legal { display: flex; flex-direction: column; gap: 4px; }
.closing-bottom button, .closing-bottom a { color: var(--night-text); background: none; border: 1px solid var(--night-line); border-radius: 99px; padding: 7px 14px; font-size: .84rem; cursor: pointer; }
.closing-bottom button:hover, .closing-bottom a:hover { border-color: var(--night-text); }
.closing-actions { display: flex; gap: 8px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1280px) {
  .lesson-layout { grid-template-columns: 264px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .principles { grid-template-columns: 1fr 1fr; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-main { max-width: 760px; margin: 0 auto; width: 100%; }
  .nav-menu-btn { display: inline-flex; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 75; width: min(360px, 88vw); max-height: none; background: var(--paper); padding: 22px 18px 40px; transform: translateX(-102%); transition: transform .38s var(--ease); box-shadow: 20px 0 40px -20px rgba(0, 0, 0, .3); border-radius: 0 22px 22px 0; }
  .sb-close { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 1.1rem; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .scrim { opacity: 1; pointer-events: auto; }
  body.sb-open { overflow: hidden; }
  body.sb-open #app { z-index: 65; } /* lift the drawer + scrim above the floating nav */
}
@media (max-width: 860px) {
  .sec-grid, .tier-grid { grid-template-columns: 1fr; gap: 16px; }
  .tier-side { position: static; }
  .tier-side h2 { margin-top: 8px; }
  .closing-top { grid-template-columns: 1fr; }
  .closing-links { justify-content: flex-start; }
}
@media (max-width: 640px) {
  :root { --nav-h: 56px; --nav-top: 10px; --read: 17px; }
  #app { padding-top: calc(var(--nav-top) + var(--nav-h) + 28px); padding-bottom: 56px; }
  .nav-inner { padding: 0 8px 0 14px; gap: 8px; border-radius: 18px; }
  .nav-logo { height: 24px; }
  .nav-sep, .nav-course { display: none; }
  .nav-prog { padding: 0 6px; }
  .nav-prog .t { display: none; }
  .nav-btn { padding: 0 11px; }
  .nav-btn .t { display: none; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3rem); }
  .hero-cta .btn { width: 100%; }
  .panel { padding: 20px; border-radius: 20px; }
  .prog-big { font-size: 2.8rem; }
  .ideas { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::before { margin-bottom: 8px; }
  .principles { grid-template-columns: 1fr; }
  .tier-nav { margin: 0 calc(-1 * var(--gutter)) 8px; border-radius: 0; padding: 8px var(--gutter); }
  .stage { padding: 16px 14px 6px; border-radius: 18px; }
  .stage-top { gap: 12px; }
  .stage-num { width: 38px; height: 38px; border-radius: 11px; font-size: .95rem; }
  .stage-title { font-size: 1.12rem; }
  .chip { grid-template-columns: 22px 34px minmax(0, 1fr) auto; gap: 10px; padding: 12px 2px; font-size: .96rem; }
  .chip .stars, .chip .rec-badge { display: none; }
  .chip:hover { padding-left: 6px; }
  .lsn-title { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .oneliner { padding: 18px 18px 18px 22px; border-radius: 18px; }
  .section { margin-top: 44px; }
  .lesson-main figure { padding: 14px 12px 12px; border-radius: 16px; margin-left: calc(-1 * var(--gutter) + 6px); margin-right: calc(-1 * var(--gutter) + 6px); }
  .lesson-main figure > svg { min-width: 540px; }
  .lesson-main figure.fit svg { min-width: 0; }
  .fig-hint { display: block; font-size: .74rem; color: var(--muted); margin: 0 0 8px; }
  .miscon li { padding: 14px 14px 14px 50px; }
  .miscon li::before { left: 13px; top: 14px; }
  .quiz-q { padding: 16px; }
  .lsn-nav { grid-template-columns: 1fr; }
  .demo { border-radius: 18px; margin-left: calc(-1 * var(--gutter) + 6px); margin-right: calc(-1 * var(--gutter) + 6px); }
  .demo-grid, .demo-grid-3, .cmp, .cmp-3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-bar .lab { width: 86px; }
  .bar2 .lab { width: 76px; }
  .demo-seg { display: flex; }
  .demo-seg button { flex: 1 1 auto; }
  .gloss-card { position: fixed; left: 12px !important; right: 12px !important; top: auto; bottom: 14px; max-width: none; width: auto; z-index: 90; }
  .closing { border-radius: 22px 22px 0 0; }
  .footer-logo { height: 48px; }
}
@media (min-width: 641px) { .fig-hint { display: none; } }
@media print {
  .nav, .sidebar, .toc, .closing, .readbar, .lsn-nav, .complete, .view-switch, .grain { display: none !important; }
  #app { padding-top: 0; }
  .lesson-layout { display: block; }
}
.demo svg, .demo svg text { font-family: var(--font); }
/* fixes after first review */
.closing-links a.btn-paper { color: var(--ink); }
.section .further a { color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.section .further a:hover { border-color: var(--ink); }
.demo table { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 640px) { .prog-panel .mark { display: none; } }
@media (max-width: 640px) { .chart .lbl, .chart .lbl-axis { font-size: 17px; } }
@media (hover: none) { .kbd-hint { display: none; } }
@media (max-width: 640px) { .section .formula { padding: 6px 14px; margin-left: calc(-1 * var(--gutter) + 6px); margin-right: calc(-1 * var(--gutter) + 6px); } .katex { font-size: 1.06em; } }

/* =====================================================================
   OPTIONS PATH v3 — Markdown lesson components (bridge, callouts, takeaways, next card),
   figure classes (fx-*), chart series (s0–s5), payoff charts (pf-*) and options widgets.
   Lessons and demos use ONLY these names + the variables at the top; never hex colours.
   ===================================================================== */
.lsn-title .lsn-num { display: inline-block; font-size: .42em; vertical-align: .55em; margin-right: .6em; padding: .28em .6em; border-radius: 10px; background: var(--ink); color: var(--paper); letter-spacing: 0; font-variant-numeric: tabular-nums; font-weight: 500; }
.stage-q { margin: 6px 0 0; color: var(--ink); font-size: .98rem; line-height: 1.5; }
.stage-q::before { content: "?"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--wash); color: var(--orange-ink); font-size: .72rem; font-weight: 600; margin-right: 8px; vertical-align: 1px; }
.tier-side .tier-blurb { margin: 10px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.55; max-width: 30ch; }

/* where we are */
.bridge { margin: 18px 0 0; padding: 18px 22px; border-radius: 18px; background: var(--wash); color: #2A3A44; font-size: 1rem; line-height: 1.75; }
.bridge p { margin: 0 0 .6em; }
.bridge p:last-child { margin-bottom: 0; }
.bridge-h { font-size: .74rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 8px; }

/* cross-reference chip */
a.xref { white-space: normal; }
.xref-num { display: inline-block; font-size: .72em; font-weight: 500; font-variant-numeric: tabular-nums; padding: 0 .4em; margin-right: .35em; border-radius: 5px; background: var(--orange-soft); color: var(--orange-ink); vertical-align: .08em; }
.xref-missing { color: var(--red); border-bottom: 1px dashed var(--red); }

/* callouts */
.callout { margin: 1.5em 0; padding: 16px 20px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); border-left: 3px solid var(--muted); font-size: .97em; }
.callout p { line-height: 1.72 !important; }
.callout-title { display: flex; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); margin-bottom: 8px; font-size: .95em; }
.callout-title .ci { width: 18px; height: 18px; flex: none; }
.callout .formula { background: var(--paper-2); }
.callout-key { border-left-color: var(--orange); }
.callout-key .callout-title { color: var(--orange-ink); }
.callout-example { border-left-color: var(--blue); }
.callout-example .callout-title { color: var(--blue); }
.callout-think { border-left-color: var(--gold); background: rgba(201, 154, 18, .06); }
.callout-think .callout-title { color: #8A6A0C; }
.callout-recall { border-left-color: var(--muted); }
.callout-warn { border-left-color: var(--red); background: var(--red-soft); }
.callout-warn .callout-title { color: var(--red); }
.callout-history { border-left-color: #8A6A0C; }
.callout-deep { border-left-color: var(--ink); background: var(--paper-2); }
.callout-fact { border-left-color: var(--green); }
.callout-fact .callout-title { color: var(--green); }
.callout-kai { border-left-color: var(--btc); background: var(--btc-soft); }
.callout-kai .callout-title { color: var(--btc-ink); }
.callout-formula { border-left-color: var(--orange); }
.reveal { margin: 4px 0 12px; }
.reveal summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: .88em; font-weight: 500; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; list-style: none; }
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::before { content: "→"; transition: transform .2s; }
.reveal[open] summary::before { transform: rotate(90deg); }
.reveal-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* headings inside sections */
.section h4.subhead { font-size: 1.05rem; margin: 1.8em 0 .6em; }
.section ol { margin: 0 0 1.1em; padding-left: 1.4em; }

/* code */
pre.code { background: var(--night); color: #E6E6E1; border-radius: 14px; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: .8em; line-height: 1.65; margin: 1.4em 0; position: relative; }
pre.code code { background: none !important; color: inherit !important; padding: 0 !important; font-size: 1em !important; }
pre.code[data-lang]::after { content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-size: .72rem; color: var(--night-muted); letter-spacing: .08em; text-transform: uppercase; }

/* takeaways */
ol.takeaways { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: tk; }
ol.takeaways li { counter-increment: tk; position: relative; margin: 0; padding: 14px 18px 14px 54px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; line-height: 1.65; }
ol.takeaways li::before { content: counter(tk); position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: .8rem; font-weight: 600; }

/* quiz extras */
.quiz-stem { display: flex; gap: 12px; align-items: baseline; }
.quiz-stem .qn { flex: none; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz-score { margin-top: 6px; padding: 14px 16px; border-radius: 14px; background: var(--wash); color: var(--ink); font-weight: 500; }
.further a em { display: block; font-style: normal; color: #4A4A45; font-size: .9em; margin-top: 3px; }
.further-plain { padding: 12px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }

/* next card */
.next-card { display: block; margin-top: 44px; padding: 22px 24px; border-radius: 20px; background: var(--ink); color: var(--paper); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.next-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.next-card .next-k { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--night-muted); }
.next-card .next-t { font-size: 1.3rem; margin-top: 8px; line-height: 1.35; letter-spacing: -.01em; }
.next-card .next-why { margin-top: 10px; color: rgba(242, 242, 240, .72); font-size: .95rem; line-height: 1.65; }
.next-card strong { color: var(--paper); background: none; }
.next-card.pulse { box-shadow: 0 0 0 5px var(--orange-soft); }
.complete { margin-top: 16px; }

/* demos: hosts and inline placement */
.demo-host { display: block; }
.demo-host + .demo-host { margin-top: 18px; }
.inline-demo { margin: 1.6em 0; }
.inline-demo .demo { box-shadow: none; }
.demo-field { margin: 10px 0; }
.demo-math { background: var(--paper); border-radius: 12px; padding: 4px 14px; margin: 12px 0; overflow-x: auto; }
.demo-inp, .demo-sel { background: var(--paper-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .92rem; }
.demo-inp.mono { font-family: var(--mono); }
.demo table { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; }
.demo th, .demo td { padding: 7px 9px; border-bottom: 1px solid var(--line-soft); text-align: right; }
.demo th { color: var(--muted); font-weight: 500; font-size: .8rem; background: var(--paper-2); }
.demo td:first-child, .demo th:first-child { text-align: left; }
.demo tr.hl td { background: var(--orange-soft); }
.demo tr.itm td { background: rgba(192, 138, 30, .07); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); font-variant-numeric: tabular-nums; }
.kv .v.hl { color: var(--orange-ink); font-weight: 500; }
.tag { display: inline-block; font-size: .74rem; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink); }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.bad { background: var(--red-soft); color: var(--red); }
.tag.hl { background: var(--orange-soft); color: var(--orange-ink); }
/* strategy legs */
.legs { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--paper-2); font-size: .88rem; }
.leg .side-long { color: var(--green); font-weight: 500; }
.leg .side-short { color: var(--red); font-weight: 500; }
/* terminal / code output inside demos */
.term { background: var(--night); color: #E6E6E1; border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: .8rem; line-height: 1.6; overflow-x: auto; white-space: pre; }

/* chart series (demos/_viz.js) */
.chart .s0, .chart .s1, .chart .s2, .chart .s3, .chart .s4, .chart .s5 { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .s0 { stroke: var(--orange); }
.chart .s1 { stroke: var(--blue); }
.chart .s2 { stroke: var(--red); }
.chart .s3 { stroke: var(--green); }
.chart .s4 { stroke: var(--btc); }
.chart .s5 { stroke: var(--muted); stroke-width: 1.6; }
.chart .f0 { fill: var(--orange); }
.chart .f1 { fill: var(--blue); }
.chart .f2 { fill: var(--red); }
.chart .f3 { fill: var(--green); }
.chart .f4 { fill: var(--btc); }
.chart .f5 { fill: var(--muted); }
.chart .dot-ring { stroke: var(--paper-2); stroke-width: 2; }
.chart .area0 { fill: var(--orange-soft); }
.chart .area1 { fill: var(--blue-soft); }
.chart .band0 { fill: var(--orange-soft); }
.chart .band1 { fill: var(--blue-soft); }
.chart .band2 { fill: var(--red-soft); }
.chart .band3 { fill: var(--green-soft); }
.chart .lbl-sm { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart-legend i.c0 { background: var(--orange); }
.chart-legend i.c1 { background: var(--blue); }
.chart-legend i.c2 { background: var(--red); }
.chart-legend i.c3 { background: var(--green); }
.chart-legend i.c4 { background: var(--btc); }
.chart-legend i.c5 { background: var(--muted); }
.chart-legend i.dashed { height: 3px; -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px); }
/* payoff charts */
.payoff .pf-profit { fill: var(--green-soft); }
.payoff .pf-loss { fill: var(--red-soft); }
.payoff .pf-line { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.payoff .pf-today { fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.payoff .pf-strike { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.payoff .pf-spot { stroke: var(--orange); stroke-width: 1.4; }
.payoff .pf-be { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2; }
.chart-legend i.pf-key-line { background: var(--ink); }
.chart-legend i.pf-key-today { background: var(--orange); height: 3px; -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px); }

/* lesson figures (inline SVG in Markdown): fx-* classes */
.fx-box { fill: var(--paper-2); stroke: var(--line); stroke-width: 1.2; }
.fx-box2 { fill: var(--surface-2); stroke: var(--line-soft); stroke-width: 1; }
.fx-hl { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 1.4; }
.fx-ok { fill: var(--green-soft); stroke: var(--green); stroke-width: 1.4; }
.fx-bad { fill: var(--red-soft); stroke: var(--red); stroke-width: 1.4; }
.fx-blue { fill: var(--blue-soft); stroke: var(--blue); stroke-width: 1.4; }
.fx-btc { fill: var(--btc-soft); stroke: var(--btc); stroke-width: 1.4; }
.fx-gold { fill: rgba(201, 154, 18, .12); stroke: var(--gold); stroke-width: 1.4; }
.fx-fill-orange { fill: var(--orange); }
.fx-fill-green { fill: var(--green); }
.fx-fill-red { fill: var(--red); }
.fx-fill-blue { fill: var(--blue); }
.fx-fill-btc { fill: var(--btc); }
.fx-fill-muted { fill: var(--muted); }
.fx-fill-ink { fill: var(--ink); }
.fx-area-ok { fill: var(--green-soft); stroke: none; }
.fx-area-bad { fill: var(--red-soft); stroke: none; }
.fx-area-hl { fill: var(--orange-soft); stroke: none; }
.fx-area-blue { fill: var(--blue-soft); stroke: none; }
.fx-line { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.fx-line-thick { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.fx-line-hl { fill: none; stroke: var(--orange); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.fx-line-ok { fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linejoin: round; }
.fx-line-bad { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linejoin: round; }
.fx-line-blue { fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linejoin: round; }
.fx-line-btc { fill: none; stroke: var(--btc); stroke-width: 2.2; stroke-linejoin: round; }
.fx-line-muted { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.fx-dash { stroke-dasharray: 6 4; }
.fx-grid { fill: none; stroke: var(--line-soft); stroke-width: 1; }
.fx-axis { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.fx-arrowhead { fill: var(--ink); }
.fx-arrowhead-hl { fill: var(--orange); }
.fx-t { fill: var(--text); font-size: 13px; }
.fx-t-b { fill: var(--ink); font-size: 13px; font-weight: 600; }
.fx-t-sm { fill: var(--muted); font-size: 11px; }
.fx-t-hl { fill: var(--orange-ink); font-size: 13px; font-weight: 500; }
.fx-t-ok { fill: var(--green); font-size: 13px; font-weight: 500; }
.fx-t-bad { fill: var(--red); font-size: 13px; font-weight: 500; }
.fx-t-blue { fill: var(--blue); font-size: 13px; font-weight: 500; }
.fx-t-btc { fill: var(--btc-ink); font-size: 13px; font-weight: 500; }
.fx-t-inv { fill: var(--paper); font-size: 13px; font-weight: 500; }
.fx-mono { font-family: var(--mono) !important; font-size: 12px; }
@media (max-width: 640px) {
  .bridge { padding: 16px 18px; }
  .callout { padding: 14px 16px 4px; }
  .next-card { padding: 18px 20px; }
  ol.takeaways li { padding: 13px 14px 13px 50px; }
}
@media (max-width: 640px) { .chart .lbl-sm { font-size: 15px; } .chart-legend { font-size: .86rem; } }
/* label halos: text stays readable where it crosses a line */
.chart .lbl, .chart .lbl-sm, .chart .lbl-axis { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.lesson-main figure > svg text:not(.fx-t-inv):not([fill="#fff"]) { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
/* demo logs: block flow so inline text, <b> and math stay on one line; each <div> is one log line */
.demo-log { display: block; }
.demo-log > div + div { margin-top: 6px; }
