/* EquiScape Learning Center — course chrome + lesson components.
   Built on site.css tokens. Stage colors grow light to deep: 1 leaf, 2 mid green, 3 deep EquiScape green. */

:root { --st1: var(--leaf); --st1-ink: var(--on-leaf); --st2: #6FA552; --st2-ink: #10240F; --st3: #2E6B30; --st3-ink: #FFFFFF; }
/* Stages grow light → deep in EquiScape greens. Fixed values so dark mode keeps the same order (its --brand turns light). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st3: #3F7F3F; } }
:root[data-theme="dark"] { --st3: #3F7F3F; }

/* ---------- course bar (sticky progress under the header) ---------- */
.lc-bar { position: sticky; top: 0; z-index: 30; background: var(--surface-card); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-card); }
.lc-bar-row { display: flex; align-items: center; gap: var(--space-4); min-height: 52px; padding-block: 6px; }
.lc-bar-home { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; flex: none; }
.lc-bar-home b { font-size: 13px; color: var(--brand); }
.lc-bar-home span { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.lc-track { flex: 1; display: grid; grid-template-columns: 6fr 8fr 8fr; gap: 6px; min-width: 0; }
.lc-track-stage { display: flex; gap: 2px; }
.lc-seg { flex: 1; height: 10px; border-radius: 2px; background: var(--border); position: relative; display: block; min-width: 4px; }
.lc-seg:hover { outline: 2px solid var(--border-strong); outline-offset: 1px; }
.lc-seg.done[data-stage="1"] { background: var(--st1); }
.lc-seg.done[data-stage="2"] { background: var(--st2); }
.lc-seg.done[data-stage="3"] { background: var(--st3); }
.lc-seg.current { box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--ink); }
.lc-bar-count { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-bar-count span { color: var(--ink-muted); font-weight: 600; }
@media (max-width: 640px) {
  .lc-bar-row { flex-wrap: wrap; gap: 4px 12px; min-height: 0; padding-block: 8px; }
  .lc-bar-home { flex-direction: row; gap: 8px; align-items: baseline; }
  .lc-bar-count { margin-left: auto; }
  .lc-track { order: 3; flex-basis: 100%; }
  .lc-seg { height: 8px; pointer-events: none; }
  .lc-seg:hover { outline: none; }
  .lc-bar-home { min-height: 44px; align-items: center; }
}

/* ---------- lesson header ---------- */
.lc-hero { background: var(--surface-card); border-bottom: 3px solid var(--brand); padding-block: clamp(24px, 4vw, 40px) clamp(20px, 3vw, 28px); }
.lc-hero .wrap { display: grid; gap: var(--space-3); }
.lc-crumbs { font-size: 13px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 4px 6px; }
.lc-crumbs a { text-decoration: none; }
.lc-hero h1 { max-width: 22ch; }
.lc-hero .lede { color: var(--ink-muted); }
.lc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-muted); align-items: center; }
.lc-meta b { color: var(--ink); }
.lc-meta a { font-weight: 700; }
.lc-stage-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-radius: var(--radius-full); padding: 3px 10px; }
.lc-stage-tag[data-stage="1"] { background: var(--st1); color: var(--st1-ink); }
.lc-stage-tag[data-stage="2"] { background: var(--st2); color: var(--st2-ink); }
.lc-stage-tag[data-stage="3"] { background: var(--st3); color: var(--st3-ink); }
.lc-done-badge { display: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand); }
.lc-done-badge .ic { width: 16px; height: 16px; }
.is-complete .lc-done-badge { display: inline-flex; }

/* ---------- lesson body ---------- */
.lc-main { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px); }
.lc-body { display: grid; gap: clamp(32px, 4vw, 44px); }
.lc-body > * { min-width: 0; }
.lc-sec { display: grid; gap: var(--space-4); }
.lc-sec > * { min-width: 0; }
.lc-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-4); flex-wrap: wrap; }
.lc-sec-head h2 { font-size: clamp(20px, 2.6vw, 24px); }
.lc-sec-head .lc-aside { font-size: 13px; color: var(--ink-muted); }
.lc-intro { font-size: 17px; max-width: 70ch; }
.lc-p { max-width: 70ch; }
.lc-note { font-size: 13px; color: var(--ink-muted); max-width: 90ch; }
.lc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.lc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.lc-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--space-6); align-items: start; }
@media (max-width: 860px) { .lc-grid-3, .lc-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .lc-grid-2 { grid-template-columns: minmax(0, 1fr); } }
.num, .lc-num { font-variant-numeric: tabular-nums; }
.lc-pos { color: var(--brand); font-weight: 700; }
.lc-neg { color: var(--alert); font-weight: 700; }

/* stat tiles */
.lc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); }
.lc-stat { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.lc-stat b { font-size: clamp(22px, 3vw, 28px); line-height: 1.15; font-weight: 800; color: var(--ink-heading); font-variant-numeric: tabular-nums; }
.lc-stat span { font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.lc-stat.is-gold { background: var(--surface-cream); border: 1.5px dashed var(--gold); }
.lc-stat.is-gold b { color: var(--gold-text); }
.lc-stat.is-brand { background: var(--surface-mint); border: 1.5px solid var(--brand); }
.lc-stat.is-brand b { color: var(--brand); }

/* stacked bar */
.lc-stack { display: grid; gap: 8px; }
.lc-stack-label { font-size: 13px; font-weight: 700; color: var(--brand); text-align: right; }
.lc-stack-bar { display: flex; height: 40px; border-radius: var(--radius-sm); overflow: hidden; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-stack-bar > span { display: grid; place-items: center; white-space: nowrap; overflow: hidden; min-width: 0; padding-inline: 2px; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-muted); list-style: none; margin: 0; padding: 0; }
.lc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lc-legend i { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.c-brand { background: var(--brand); color: var(--on-brand); }
.c-leaf { background: var(--leaf); color: var(--on-leaf); }
.c-neutral { background: var(--neutral); color: var(--on-neutral); }
.c-light { background: var(--border); color: var(--ink); }
.c-gold { background: var(--gold); color: var(--on-gold); }
.c-alert { background: var(--alert); color: var(--on-alert); }

/* term rows: icon | term + meaning | what goes in it | example */
.lc-rows { display: grid; gap: 8px; }
.lc-rows-head { display: grid; grid-template-columns: 44px minmax(0, 1.25fr) minmax(0, 1fr) minmax(120px, .6fr); gap: var(--space-4); padding: 0 16px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.lc-rows-head > :last-child { text-align: right; }
.lc-row { display: grid; grid-template-columns: 44px minmax(0, 1.25fr) minmax(0, 1fr) minmax(120px, .6fr); gap: var(--space-4); align-items: center; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
.lc-op { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--brand); color: var(--on-brand); }
.lc-op.c-leaf, .lc-hbar .lc-hbar-fill.c-leaf { background: var(--leaf); color: var(--on-leaf); }
.lc-op.c-neutral, .lc-hbar .lc-hbar-fill.c-neutral { background: var(--neutral); color: var(--on-neutral); }
.lc-op.c-light, .lc-hbar .lc-hbar-fill.c-light { background: var(--border); color: var(--ink); }
.lc-op.c-gold, .lc-hbar .lc-hbar-fill.c-gold { background: var(--gold); color: var(--on-gold); }
.lc-op.c-alert, .lc-hbar .lc-hbar-fill.c-alert { background: var(--alert); color: var(--on-alert); }
.lc-hbar .lc-hbar-fill.c-brand { background: var(--brand); }
.lc-row h3 { font-size: 17px; color: var(--brand); }
.lc-row .lc-desc { font-size: 14px; line-height: 1.45; color: var(--ink-muted); margin-top: 2px; }
.lc-row .lc-what { font-size: 14px; line-height: 1.45; color: var(--ink); }
.lc-row .lc-ex { text-align: right; }
.lc-row .lc-ex b { display: block; font-size: 21px; font-weight: 800; color: var(--ink-heading); font-variant-numeric: tabular-nums; line-height: 1.2; }
.lc-row .lc-ex span { display: block; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.lc-row.is-lead { background: var(--brand); border-color: var(--brand); }
.lc-row.is-lead h3, .lc-row.is-lead .lc-desc, .lc-row.is-lead .lc-what, .lc-row.is-lead .lc-ex b, .lc-row.is-lead .lc-ex span { color: var(--on-brand); }
.lc-row.is-lead .lc-op { background: var(--on-brand); color: var(--brand); }
.lc-row.is-total { background: var(--surface-mint); border: 1.5px solid var(--brand); }
.lc-row.is-total .lc-ex b { color: var(--brand); }
.lc-row.is-total .lc-what { font-weight: 600; }
.lc-row.is-ratio { background: var(--surface-cream); border: 1.5px dashed var(--gold); padding-block: 10px; }
.lc-row.is-ratio h3, .lc-row.is-ratio .lc-ex b { color: var(--gold-text); }
.lc-row.is-ratio .lc-op { background: var(--gold); color: var(--on-gold); }
.lc-row.is-ratio .lc-what { font-weight: 600; }
.lc-row.is-alert .lc-ex b { color: var(--alert); }
@media (max-width: 760px) {
  .lc-rows-head { display: none; }
  .lc-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; }
  .lc-row .lc-op { grid-row: span 2; width: 32px; height: 32px; font-size: 15px; }
  .lc-row .lc-what { grid-column: 2 / 4; grid-row: 2; font-size: 13px; color: var(--ink-muted); }
  .lc-row.is-lead .lc-what { color: var(--on-brand); }
  .lc-row .lc-ex { grid-column: 3; grid-row: 1; }
  .lc-row .lc-ex b { font-size: 18px; }
}

/* ledger box: titled list of lines with a total (e.g. "Cost to OWN it") */
.lc-ledger { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.lc-ledger > h3 { background: var(--brand); color: var(--on-brand); font-size: 15px; padding: 10px 16px; }
.lc-ledger > h3 small { font-weight: 500; opacity: .85; }
.lc-ledger.is-neutral > h3 { background: var(--neutral); color: var(--on-neutral); }
.lc-ledger.is-gold > h3 { background: var(--gold); color: var(--on-gold); }
.lc-ledger ul { list-style: none; margin: 0; padding: 0; }
.lc-ledger li { display: flex; justify-content: space-between; gap: var(--space-4); padding: 9px 16px; border-top: 1px solid var(--border); font-size: 15px; font-variant-numeric: tabular-nums; }
.lc-ledger li:first-child { border-top: 0; }
.lc-ledger li > :last-child { font-weight: 700; text-align: right; white-space: nowrap; }
.lc-ledger li.is-total { background: var(--surface-mint); color: var(--brand); font-weight: 700; }
.lc-ledger li.is-strong { font-weight: 700; }
.lc-ledger li.is-lead { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.lc-ledger .lc-ledger-foot { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-muted); }

/* horizontal bar chart */
.lc-hbars { display: grid; gap: 8px; }
.lc-hbar { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr); gap: var(--space-3); align-items: center; font-size: 14px; }
.lc-hbar > span:first-child { color: var(--ink-muted); font-weight: 600; }
.lc-hbar .lc-hbar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lc-hbar .lc-hbar-fill { height: 24px; border-radius: 3px; background: var(--border); flex: none; max-width: calc(100% - 72px); }
.lc-hbar .lc-hbar-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-hbar.is-hl > span:first-child, .lc-hbar.is-hl .lc-hbar-val { color: var(--brand); font-weight: 800; }

/* data table */
.lc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-card); -webkit-overflow-scrolling: touch; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.lc-table th { background: var(--brand); color: var(--on-brand); text-align: left; font-size: 12px; font-weight: 700; padding: 10px 12px; white-space: nowrap; }
.lc-table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.lc-table .r, .lc-table th.r { text-align: right; }
.lc-table tr.is-hl td { background: var(--surface-mint); color: var(--brand); font-weight: 700; }
.lc-table tr.is-total td { background: var(--surface-mint); font-weight: 700; }
.lc-table tr.is-section td { background: var(--surface-cream); color: var(--gold-text); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.lc-table tr.is-stage1 td { background: var(--st1); color: var(--st1-ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-block: 5px; }
.lc-table tr.is-stage2 td { background: var(--st2); color: var(--st2-ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-block: 5px; }
.lc-table tr.is-stage3 td { background: var(--st3); color: var(--st3-ink); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding-block: 5px; }
.lc-table td small { display: block; color: var(--ink-muted); font-size: 12px; }
.lc-table.is-compact td { padding: 7px 10px; font-size: 13px; }

/* cards (tips, warnings, how-to) */
.lc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-4); }
.lc-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.lc-card h3 { font-size: 16px; color: var(--brand); }
.lc-card p, .lc-card li { font-size: 14px; line-height: 1.5; }
.lc-card ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.lc-card .lc-big { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lc-card.is-warn { background: var(--surface-cream); border: 1.5px dashed var(--gold); }
.lc-card.is-warn h3 { color: var(--gold-text); }
.lc-card.is-alert { background: var(--surface-cream); border: 1.5px dashed var(--alert); }
.lc-card.is-alert h3, .lc-card.is-alert .lc-big { color: var(--alert); }
.lc-card.is-mint { background: var(--surface-mint); border: 1.5px solid var(--brand); }
.lc-card.is-brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lc-card.is-brand h3, .lc-card.is-brand p { color: var(--on-brand); }
.lc-card.is-brand .lc-eyebrow { color: var(--leaf); }
.lc-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }

/* formula box */
.lc-formula { background: var(--brand); color: var(--on-brand); border-radius: var(--radius-md); padding: 18px 20px; display: grid; gap: 6px; }
.lc-formula .lc-eyebrow { color: var(--leaf); }
.lc-formula b { font-size: clamp(18px, 2.4vw, 22px); font-weight: 800; line-height: 1.3; }
.lc-formula p { font-size: 14px; font-variant-numeric: tabular-nums; }

/* numbered steps */
.lc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); list-style: none; margin: 0; padding: 0; counter-reset: lcstep; }
.lc-steps > li { counter-increment: lcstep; display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; }
.lc-steps > li::before { content: counter(lcstep); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.lc-steps > li b { color: var(--brand); font-size: 16px; }
.lc-steps > li span { font-size: 14px; line-height: 1.5; color: var(--ink); }
.lc-steps > li.is-hl { background: var(--surface-mint); border: 1.5px solid var(--brand); }
.lc-steps > li.is-hl::before { background: var(--gold); color: var(--on-gold); }

/* timeline */
.lc-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.lc-timeline li { border-top: 5px solid var(--leaf); padding-top: 10px; display: grid; gap: 4px; }
.lc-timeline li:nth-child(2) { border-color: color-mix(in srgb, var(--leaf) 50%, var(--brand)); }
.lc-timeline li:nth-child(3) { border-color: var(--brand); }
.lc-timeline li:nth-child(4) { border-color: var(--gold); }
.lc-timeline b { color: var(--brand); }
.lc-timeline li:nth-child(4) b { color: var(--gold-text); }
.lc-timeline span { font-size: 14px; line-height: 1.5; }

/* interactive checklist (state saved in this browser) */
.lc-check { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.lc-check > h3 { background: var(--brand); color: var(--on-brand); font-size: 15px; padding: 10px 16px; display: flex; justify-content: space-between; gap: 8px; }
.lc-check.is-neutral > h3 { background: var(--neutral); color: var(--on-neutral); }
.lc-check > h3 .lc-check-count { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .9; }
.lc-check ul { list-style: none; margin: 0; padding: 8px 8px 10px; display: grid; gap: 2px; }
.lc-check label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.45; cursor: pointer; }
.lc-check label:hover { background: var(--surface-mint); }
.lc-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.lc-check input:checked + span { color: var(--ink-muted); }
.lc-checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 700px) { .lc-checks-grid { grid-template-columns: minmax(0, 1fr); } }
.lc-score { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; background: var(--surface-mint); border: 1.5px solid var(--brand); border-radius: var(--radius-md); padding: 14px 18px; }
.lc-score b.lc-score-num { font-size: 30px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.lc-score p { max-width: 60ch; font-size: 14px; }

/* bullet list with dots (what they own) */
.lc-dots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lc-dots li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 14px; line-height: 1.5; }
.lc-dots li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.lc-chips li { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--surface-mint); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 3px 10px; }

/* KPI cards with your-target + traffic light */
.lc-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 700px) { .lc-kpis { grid-template-columns: minmax(0, 1fr); } }
.lc-kpi { background: var(--surface-card); border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: var(--radius-md); padding: 14px 16px; display: grid; gap: 4px; }
.lc-kpi[data-group="productivity"] { border-top-color: var(--neutral); }
.lc-kpi[data-group="cash"] { border-top-color: var(--gold); }
.lc-kpi-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lc-kpi-top h3 { font-size: 16px; color: var(--brand); }
.lc-kpi-top b { font-size: 20px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc-kpi p { font-size: 13px; color: var(--ink-muted); }
.lc-kpi p.lc-kpi-q { color: var(--ink); font-size: 14px; }
.lc-kpi-you { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13px; }
.lc-kpi-you input { width: 110px; padding: 6px 8px; font-size: 14px; }
.lc-lights { display: inline-flex; gap: 6px; margin-left: auto; }
.lc-lights button { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid currentColor; background: transparent; cursor: pointer; padding: 0; }
.lc-lights button[data-l="g"] { color: var(--brand); }
.lc-lights button[data-l="y"] { color: var(--gold); }
.lc-lights button[data-l="r"] { color: var(--alert); }
.lc-lights button[aria-pressed="true"] { background: currentColor; }

/* calculators */
.lc-calc { background: var(--surface-card); border: 1.5px solid var(--brand); border-radius: var(--radius-lg); overflow: hidden; }
.lc-calc-head { background: var(--surface-mint); border-bottom: 1px solid var(--border); padding: 14px 18px; display: flex; gap: 12px; align-items: center; }
.lc-calc-head .ic { width: 26px; height: 26px; color: var(--brand); flex: none; }
.lc-calc-head h3 { font-size: 17px; color: var(--brand); }
.lc-calc-head p { font-size: 13px; color: var(--ink-muted); }
.lc-calc-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--space-6); padding: 18px; }
@media (max-width: 760px) { .lc-calc-body { grid-template-columns: minmax(0, 1fr); } }
.lc-calc-inputs { display: grid; gap: var(--space-3); align-content: start; }
.lc-calc .field label { font-size: 13px; }
.lc-calc .field input[type="number"] { font-weight: 600; font-variant-numeric: tabular-nums; }
.lc-calc input[type="range"] { width: 100%; accent-color: var(--brand); }
.lc-calc-out { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.lc-calc-reset { font: 600 13px var(--font-sans); color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.lc-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); }
.lc-result span { font-size: 14px; font-weight: 600; }
.lc-result span small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.lc-result b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lc-result.is-brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lc-result.is-brand span small { color: var(--on-brand); opacity: .85; }
.lc-result.is-mint { background: var(--surface-mint); border-color: var(--brand); }
.lc-result.is-mint b { color: var(--brand); }
.lc-result.is-warn { background: var(--surface-cream); border: 1.5px dashed var(--gold); }
.lc-result.is-warn b { color: var(--gold-text); }
.lc-result.is-alert { background: var(--surface-cream); border: 1.5px dashed var(--alert); }
.lc-result.is-alert b { color: var(--alert); }
.lc-calc-msg { font-size: 14px; line-height: 1.5; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--surface-cream); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* key idea + end of lesson */
.lc-keyidea { background: var(--brand); color: var(--on-brand); border-radius: var(--radius-md); padding: 18px 22px; font-size: 17px; line-height: 1.5; }
.lc-keyidea b { font-weight: 800; color: var(--leaf); }
.lc-end { display: grid; gap: var(--space-4); margin-top: clamp(32px, 4vw, 44px); }
.lc-complete { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius-md); border: 1.5px dashed var(--border-strong); color: var(--ink-muted); font-size: 15px; }
.lc-complete .lc-complete-ic { width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; flex: none; }
.lc-complete .lc-complete-ic .ic { width: 18px; height: 18px; opacity: 0; }
.is-complete .lc-complete { border: 1.5px solid var(--brand); background: var(--surface-mint); color: var(--brand); }
.is-complete .lc-complete .lc-complete-ic { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.is-complete .lc-complete .lc-complete-ic .ic { opacity: 1; }
.lc-complete b { color: inherit; }

/* stage checkpoint */
.lc-checkpoint { border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 26px); display: grid; gap: var(--space-3); border: 1.5px dashed var(--brand); background: var(--surface-mint); }
.lc-checkpoint[data-stage="3"] { border-color: var(--st3); background: var(--surface-mint); }
.lc-checkpoint h2 { font-size: 22px; }
.lc-checkpoint .lc-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* pager */
.lc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.lc-pager a { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; text-decoration: none; background: var(--surface-card); display: grid; gap: 2px; color: var(--brand); }
.lc-pager a:hover { border-color: var(--brand); background: var(--surface-mint); }
.lc-pager a small { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.lc-pager a.next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .lc-pager { grid-template-columns: 1fr; } .lc-pager a.next { grid-column: 1; } }

/* sub-pages (role sheets inside guide 19) */
.lc-subnav { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.lc-subnav a { display: block; font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface-card); }
.lc-subnav a:hover { border-color: var(--brand); }
.lc-subnav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* ---------- glossary term popover ---------- */
.lc-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; border-bottom: 1.5px dotted var(--brand); text-align: inherit; line-height: inherit; }
.lc-term:hover, .lc-term[aria-expanded="true"] { color: var(--brand); background: var(--surface-mint); }
.lc-pop { position: absolute; z-index: 80; width: min(340px, calc(100vw - 24px)); background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-panel); padding: 14px 16px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.lc-pop h4 { font-size: 16px; color: var(--brand); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lc-pop h4 small { font-size: 12px; color: var(--ink-muted); font-weight: 700; }
.lc-pop .lc-pop-f { font-size: 13px; background: var(--surface); border-radius: var(--radius-sm); padding: 6px 8px; }
.lc-pop a { font-size: 13px; }

/* ---------- toast ---------- */
.lc-toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 90; background: var(--brand); color: var(--on-brand); border-radius: var(--radius-md); padding: 12px 18px; box-shadow: var(--shadow-panel); font-size: 15px; display: flex; gap: 10px; align-items: center; transition: transform .35s ease; max-width: calc(100vw - 24px); }
.lc-toast.show { transform: translate(-50%, 0); }
.lc-toast a { color: var(--on-brand); }

/* ---------- library download modal ---------- */
.lc-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(15, 25, 15, .55); }
.lc-modal[hidden] { display: none; }
.lc-modal-box { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr); }
.lc-modal-head { background: var(--brand); color: var(--on-brand); padding: 20px 22px; display: grid; gap: 6px; position: relative; }
.lc-modal-head h2 { color: var(--on-brand); font-size: 22px; }
.lc-modal-head p { font-size: 14px; opacity: .92; }
.lc-modal-head .lc-eyebrow { color: var(--leaf); }
.lc-modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--on-brand); background: transparent; color: var(--on-brand); font-size: 20px; line-height: 1; cursor: pointer; }
.lc-modal-body { padding: 20px 22px 22px; display: grid; gap: var(--space-4); }
.lc-modal-body .form { display: grid; gap: var(--space-3); }
.lc-incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.lc-incl li::before { content: "✓ "; color: var(--brand); font-weight: 800; }
.lc-unlocked { display: grid; gap: var(--space-3); justify-items: start; }

/* ---------- Learning Center home ---------- */
.lc-home-hero { background: var(--surface-card); border-bottom: 3px solid var(--brand); padding-block: clamp(36px, 6vw, 64px); }
.lc-home-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 900px) { .lc-home-grid { grid-template-columns: minmax(0, 1fr); } }
.lc-home-hero h1 { font-size: clamp(32px, 5.4vw, 48px); }
.lc-home-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.lc-progress-card { background: var(--surface-mint); border: 1.5px solid var(--brand); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: var(--space-3); }
.lc-progress-card .lc-big { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }
.lc-progress-card .lc-big small { font-size: 18px; color: var(--ink-muted); font-weight: 700; }
.lc-pbar { height: 10px; border-radius: var(--radius-full); background: var(--surface-card); border: 1px solid var(--border); overflow: hidden; }
.lc-pbar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .5s; }
.lc-stage-mini { display: grid; gap: 6px; font-size: 13px; }
.lc-stage-mini div { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; }
.lc-stage-mini .lc-pbar { height: 8px; }
.lc-stage-mini [data-stage="1"] i { background: var(--st1); }
.lc-stage-mini [data-stage="3"] i { background: var(--st3); }
.lc-stage-mini [data-stage="2"] i { background: var(--st2); }
.lc-stage-mini b { text-align: right; font-variant-numeric: tabular-nums; }

.lc-how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); list-style: none; padding: 0; margin: 0; counter-reset: lchow; }
@media (max-width: 960px) { .lc-how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lc-how { grid-template-columns: minmax(0, 1fr); } }
.lc-how li { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; display: grid; gap: 6px; align-content: start; counter-increment: lchow; }
.lc-how li::before { content: counter(lchow); width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; }
.lc-how b { font-size: 16px; color: var(--ink-heading); }
.lc-how span { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

.lc-example-co { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--space-6); align-items: center; }
@media (max-width: 860px) { .lc-example-co { grid-template-columns: minmax(0, 1fr); } }

.lc-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
@media (max-width: 960px) { .lc-map { grid-template-columns: minmax(0, 1fr); } }
.lc-stage { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-card); overflow: hidden; display: grid; }
.lc-stage-head { padding: 16px 18px; display: grid; gap: 2px; }
.lc-stage[data-stage="1"] .lc-stage-head { background: var(--st1); color: var(--st1-ink); }
.lc-stage[data-stage="2"] .lc-stage-head { background: var(--st2); color: var(--st2-ink); }
.lc-stage[data-stage="3"] .lc-stage-head { background: var(--st3); color: var(--st3-ink); }
.lc-stage-head .lc-eyebrow { color: inherit; opacity: .85; }
.lc-stage-head h3 { font-size: 22px; color: inherit; }
.lc-stage-head p { font-size: 14px; font-style: italic; opacity: .9; }
.lc-stage-head .lc-stage-prog { font-size: 12px; font-weight: 700; font-style: normal; opacity: 1; margin-top: 4px; }
.lc-stage ol { list-style: none; margin: 0; padding: 10px; display: grid; gap: 6px; }
.lc-g { display: grid; grid-template-columns: 34px 1fr auto; gap: 2px 10px; align-items: center; text-decoration: none; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--ink); background: var(--surface-card); }
.lc-g:hover { border-color: var(--brand); background: var(--surface-mint); }
.lc-g-n { grid-column: 1; grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 2px solid var(--border-strong); color: var(--ink-muted); background: var(--surface-card); }
.lc-g b { grid-column: 2; font-size: 15px; color: var(--brand); line-height: 1.3; }
.lc-g span:not(.lc-g-n) { font-size: 13px; color: var(--ink-muted); line-height: 1.35; grid-column: 2; }
.lc-g-s { grid-row: 1 / 3; grid-column: 3; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.lc-g.done .lc-g-n { border-color: transparent; }
.lc-stage[data-stage="1"] .lc-g.done .lc-g-n { background: var(--st1); color: var(--st1-ink); }
.lc-stage[data-stage="2"] .lc-g.done .lc-g-n { background: var(--st2); color: var(--st2-ink); }
.lc-stage[data-stage="3"] .lc-g.done .lc-g-n { background: var(--st3); color: var(--st3-ink); }
.lc-g.done .lc-g-s { color: var(--brand); }
.lc-g.next { border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px var(--surface-mint); }
.lc-g.next .lc-g-s { color: var(--brand); }
.lc-ready { margin: 4px 10px 12px; padding: 12px 14px; border: 1.5px dashed var(--brand); border-radius: var(--radius-md); background: var(--surface-mint); font-size: 14px; }
.lc-stage[data-stage="3"] .lc-ready { border-color: var(--st3); background: var(--surface-mint); }
.lc-ready .lc-eyebrow { display: block; margin-bottom: 2px; }
.lc-stage[data-stage="3"] .lc-ready .lc-eyebrow { color: var(--brand); }
.lc-ready.met { border-style: solid; }

.lc-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 760px) { .lc-shelf { grid-template-columns: minmax(0, 1fr); } }
a.lc-card { text-decoration: none; color: var(--ink); font-weight: 400; }
a.lc-card:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--surface-mint); }
a.lc-card .link-arrow { margin-top: 4px; }
.lc-lib-band { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: var(--space-6); align-items: center; }
@media (max-width: 860px) { .lc-lib-band { grid-template-columns: minmax(0, 1fr); } }
.lc-book { aspect-ratio: 8.5 / 11; max-width: 240px; width: 100%; justify-self: center; border-radius: 6px; background: var(--surface-card); border: 1px solid var(--border); box-shadow: 10px 10px 0 var(--leaf), var(--shadow-panel); padding: 22px 20px; display: grid; align-content: space-between; color: var(--ink); }
.lc-book .lc-eyebrow { font-size: 9px; }
.lc-book b { font-size: 24px; line-height: 1.1; color: var(--ink-heading); font-weight: 800; }
.lc-book b em { font-style: normal; color: var(--brand); }
.lc-book i { display: block; height: 3px; background: var(--brand); margin: 10px 0; }
.lc-book span { font-size: 11px; color: var(--ink-muted); }
.lc-book ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 10px; font-weight: 700; }
.lc-book ul li:nth-child(1) { color: var(--st1-ink); background: var(--st1); padding: 2px 6px; border-radius: 3px; }
.lc-book ul li:nth-child(2) { color: var(--st2-ink); background: var(--st2); padding: 2px 6px; border-radius: 3px; }
.lc-book ul li:nth-child(3) { color: var(--st3-ink); background: var(--st3); padding: 2px 6px; border-radius: 3px; }

/* ---------- glossary page ---------- */
.lc-gl-tools { display: grid; gap: var(--space-3); position: sticky; top: 52px; z-index: 5; background: var(--surface); padding-block: 12px; border-bottom: 1px solid var(--border); }
.lc-gl-search { width: 100%; font-size: 16px; padding: 12px 14px; }
.lc-gl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-gl-filters button { font: 600 13px var(--font-sans); padding: 6px 12px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface-card); color: var(--ink); cursor: pointer; }
.lc-gl-filters button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.lc-gl-cat { display: grid; gap: var(--space-3); scroll-margin-top: 180px; }
.lc-gl-cat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 3px solid var(--brand); padding-bottom: 6px; }
.lc-gl-cat-head h2 { font-size: 22px; }
.lc-gl-cat-head span { font-size: 13px; color: var(--ink-muted); }
.lc-gl-list { display: grid; gap: 8px; }
.lc-gl-term { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 24px; scroll-margin-top: 190px; }
.lc-gl-term:target { border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px var(--surface-mint); }
@media (max-width: 760px) { .lc-gl-term { grid-template-columns: minmax(0, 1fr); } }
.lc-gl-term h3 { font-size: 17px; color: var(--brand); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.lc-gl-term h3 small { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.lc-gl-dir { font-size: 11px; font-weight: 800; letter-spacing: .04em; border-radius: var(--radius-full); padding: 1px 8px; background: var(--surface-mint); color: var(--brand); }
.lc-gl-dir.is-lower { background: var(--surface-cream); color: var(--gold-text); }
.lc-gl-dir.is-balance { background: var(--surface); color: var(--ink-muted); border: 1px solid var(--border); }
.lc-gl-term p { font-size: 14px; line-height: 1.5; }
.lc-gl-term .lc-gl-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); display: block; }
.lc-gl-guides { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lc-gl-guides a { font-size: 12px; font-weight: 700; text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 1px 8px; }
.lc-gl-empty { padding: 24px; text-align: center; color: var(--ink-muted); }
.lc-gl-acr { columns: 2 320px; column-gap: 32px; }
.lc-gl-acr div { break-inside: avoid; display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.lc-gl-acr b { color: var(--brand); }
.lc-gl-acr small { display: block; color: var(--ink-muted); font-size: 13px; }

@media print {
  .site-header, .lc-bar, .site-footer, .lc-pager, .cta-band, .lc-checkpoint .lc-actions, .lc-toast, .lc-modal { display: none !important; }
}

.lc-card .link-arrow { color: var(--brand); }

/* ---------- manual progress: learners check guides off themselves ---------- */
button.lc-complete { width: 100%; text-align: left; font: inherit; background: transparent; cursor: pointer; }
button.lc-complete:hover { border-color: var(--brand); color: var(--brand); }
button.lc-complete:focus-visible, .lc-bar-mark:focus-visible, .lc-g-check:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lc-complete .lc-complete-ic .ic { opacity: .35; }
.is-complete .lc-complete .lc-complete-ic .ic { opacity: 1; }
.lc-complete-sub { display: block; font-size: 14px; font-weight: 500; }
.lc-bar-mark { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-full); border: 1.5px solid var(--brand);
  background: var(--surface-card); color: var(--brand); font: 700 13px/1.2 var(--font-sans); cursor: pointer; white-space: nowrap; }
.lc-bar-mark[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.lc-bar-mark span:empty { display: none; }
@media (max-width: 720px) { .lc-bar-mark { padding: 4px 10px; font-size: 12px; } }
.lc-g-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: stretch; }
.lc-g-check { width: 44px; border-radius: var(--radius-md); border: 1.5px dashed var(--border-strong); background: var(--surface-card); color: var(--border-strong); display: grid; place-items: center; cursor: pointer; padding: 0; }
.lc-g-check .ic { width: 20px; height: 20px; }
.lc-g-check:hover { border-color: var(--brand); color: var(--brand); }
.lc-g-check[aria-pressed="true"] { border: 1.5px solid var(--brand); background: var(--brand); color: var(--on-brand); }
.lc-toast-undo { margin-left: 8px; background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
@media print { .lc-bar-mark, .lc-g-check { display: none !important; } }
.lc-toast { display: block; width: max-content; max-width: calc(100vw - 32px); line-height: 1.45; }
/* hidden always wins over display rules (modal panels, restart button) */
[hidden]:not([hidden=until-found i]) { display: none !important; }
