/* Money with Mara — site styles
   Layout concept: the deck system on the web. Light (Mist) ground by default, Dark (Charcoal)
   for night readers, Green (Jungle) reserved for statement pieces: hero, section breaks, key lines.
   One Lime moment per section by default. Outline-first boxes. Labels sit on the thing they name. */

:root {
  /* Brand template palette (Money-With-Mara_Deck-Template.pptx) */
  --mist: #F2F5D6;
  --lime: #BCD45A;
  --jungle: #406B37;
  --charcoal: #1D1E1D;

  /* Roles — light ground */
  --bg: #F2F5D6;
  --surface: #FAFBEC;
  --fg: #1D1E1D;
  --muted: #4A5246;
  --rule: #CBD3A8;
  --accent-text: #406B37;     /* Jungle carries text links on Mist (Lime fails contrast on Mist) */
  --outline: #406B37;         /* outline boxes on Mist use Jungle; Lime outlines live on dark/green */
  --spark: #BCD45A;
  --focus: #406B37;
  color-scheme: light;

  --display: "Faculty Glyphic", "Iowan Old Style", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.7rem + 2vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 4.8rem);

  --radius: 6px;
  --wrap: 1120px;
  --read: 66ch;
}

/* The site follows the brand grounds, not the device's dark mode: pages stay light (Mist) and use Dark/Green
   grounds on purpose. A page can still opt in to dark with <html data-theme="dark">. (Mara, 2026-10-21) */
:root[data-theme="dark"] {
  --bg: #1D1E1D; --surface: #262826; --fg: #F2F5D6; --muted: #B9C0A6; --rule: #3B4038;
  --accent-text: #BCD45A; --outline: #BCD45A; --focus: #BCD45A; color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: var(--step-0); line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; max-width: var(--read); }
.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stack { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.stack-lg { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
.eyebrow {
  font: 600 var(--step--1)/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--muted); }
.source { font-size: var(--step--1); color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.skip {
  position: absolute; left: -999px; top: 0; background: var(--charcoal); color: var(--mist);
  padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { left: 16px; top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.8rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--fg); }
.brand-logo { height: 42px; width: auto; }
.footer-logo { height: 52px; width: auto; }
@media (max-width: 480px) { .brand-logo { height: 36px; } }
.nav { display: flex; align-items: center; gap: 0.25rem 1.1rem; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding-block: 0.3rem; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--outline); }
.lang { display: flex; gap: 0.4rem; font-size: var(--step--1); color: var(--muted); }
.lang a, .lang span { color: inherit; text-decoration: none; }
.lang [aria-current="true"] { color: var(--fg); font-weight: 600; }
.lang .soon { opacity: 0.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font: 600 0.95rem/1 var(--body);
  padding: 0.85rem 1.25rem; border-radius: 999px; text-decoration: none; border: 2px solid var(--outline);
  color: var(--fg); background: transparent; cursor: pointer;
}
.btn:hover { background: color-mix(in srgb, var(--outline) 12%, transparent); }
.btn-solid { background: var(--lime); border-color: var(--lime); color: var(--charcoal); }
.btn-solid:hover { background: #CBE06E; }

/* ---------- Grounds (Robert's leaf recipe) ---------- */
.ground-green { background: var(--jungle); color: var(--mist); }
.ground-dark  { background: var(--charcoal); color: var(--mist); }
.ground-green .eyebrow, .ground-dark .eyebrow { color: color-mix(in srgb, var(--mist) 78%, transparent); }
.ground-green .lede, .ground-dark .lede { color: color-mix(in srgb, var(--mist) 88%, transparent); }
.ground-green a, .ground-dark a { color: var(--lime); }
.ground-green .btn, .ground-dark .btn { color: var(--mist); border-color: var(--lime); }
.ground-green .btn-solid, .ground-dark .btn-solid { color: var(--charcoal); }
.leafed { position: relative; overflow: hidden; isolation: isolate; }
/* Drop Robert's emblem PNG at assets/img/emblem-lime.png — shows at 20% like the template. Missing file = nothing renders. */
.leafed::after {
  content: ""; position: absolute; z-index: -1; right: -6%; top: 50%; translate: 0 -50%;
  width: min(62vw, 640px); aspect-ratio: 1; background: url("../img/emblem-lime.png") center/contain no-repeat; opacity: 0.2;
}

/* ---------- Hero ---------- */
.hero .wrap { padding-block: clamp(3rem, 8vw, 6.5rem); display: grid; gap: 1.6rem; }
.hero h1 { max-width: 14ch; }
.hero h1 .hl { color: var(--lime); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.series-pill {
  display: inline-block; border: 1.5px solid currentColor; border-radius: 999px; padding: 0.25rem 0.75rem;
  font: 700 0.72rem/1.3 var(--body); letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head .stack { gap: 0.6rem; }

/* ---------- Myth vs reality (Data Playbook: myth vs. reality, Dark → Green split) ---------- */
.myth { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; }
.myth > div { padding: clamp(1.4rem, 4vw, 2.6rem); display: grid; gap: 0.8rem; align-content: start; }
.myth .m { background: var(--charcoal); color: var(--mist); }
.myth .r { background: var(--jungle); color: var(--mist); }
.myth .tag { font: 700 0.75rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.myth .m .tag { color: color-mix(in srgb, var(--mist) 70%, transparent); }
.myth .r .tag { color: var(--lime); }
.myth p.big { font-family: var(--display); font-size: var(--step-2); line-height: 1.2; }
.myth .m p.big { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--mist) 55%, transparent); }
@media (max-width: 680px) { .myth { grid-template-columns: 1fr; } }

/* ---------- Lesson cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.card {
  display: grid; grid-template-rows: auto 1fr auto; gap: 0.9rem; padding: 1.4rem; border: 1.5px solid var(--outline);
  border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--fg); min-width: 0;
  transition: translate 0.15s ease;
}
a.card:hover { translate: 0 -2px; }
.card h3 { font-size: var(--step-1); }
.card p { color: var(--muted); font-size: 0.97rem; }
.card .meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: var(--step--1); color: var(--muted); }
.card .series-pill { color: var(--accent-text); justify-self: start; }
.card.soon { border-style: dashed; }
.thumb {
  aspect-ratio: 16/9; border-radius: 4px; display: grid; place-items: center; padding: 1rem; text-align: center;
  font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.1;
}
.thumb .big { color: var(--lime); font-size: 1.5em; display: block; }

/* ---------- Stat tiles (Data Playbook: recap — numbers to remember) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.stat { border: 1.5px solid var(--outline); border-radius: var(--radius); padding: 1.2rem; display: grid; gap: 0.4rem; align-content: start; min-width: 0; }
.stat .n { font-family: var(--display); font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-weight: 600; }
.stat.focus { background: var(--lime); border-color: var(--lime); color: var(--charcoal); }
.stat.focus .source { color: #3A3F2E; }

/* ---------- Key idea spark (Data Playbook: key idea) ---------- */
.key-idea {
  /* Matches the plant & open book kit "Key idea" (Kits/mwm_plant_open_book_kit_claude): Lime outline, rounded,
     solid spark sitting on the top border with a gap cut around it, Caveat note at the bottom. */
  position: relative; border: 2.5px solid var(--lime); border-radius: 16px;
  padding: 2.4rem 2rem 1.8rem; display: grid; gap: 0.6rem; max-width: 52rem; margin-top: 1.4rem;
}
.key-idea svg { position: absolute; left: 1.6rem; top: -1.3rem; width: 2.6rem; height: 2.6rem; padding: 0 0.35rem; box-sizing: content-box; background: var(--bg); }
.key-idea svg path { fill: var(--jungle); stroke: none; }
.key-idea .eyebrow { color: var(--jungle); }
.key-idea .k { font-family: var(--display); font-size: var(--step-2); line-height: 1.2; color: var(--fg); }
.key-idea .note { font-family: var(--script); font-size: 1.6rem; color: var(--jungle); line-height: 1.2; margin-top: 0.8rem; }
.ground-dark .key-idea svg path, .ground-green .key-idea svg path { fill: var(--lime); }
.ground-dark .key-idea .eyebrow, .ground-dark .key-idea .note, .ground-green .key-idea .eyebrow, .ground-green .key-idea .note { color: var(--lime); }

/* ---------- Mara's take (opinion, kept visually separate from fact) ---------- */
.take { background: var(--lime); color: var(--charcoal); padding: 1.2rem 1.4rem; border-radius: 4px; rotate: -1.2deg; max-width: 30rem; box-shadow: 4px 6px 0 color-mix(in srgb, var(--charcoal) 18%, transparent); }
.take .who { font: 700 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.take p { font-family: var(--script); font-size: 1.6rem; line-height: 1.15; margin-top: 0.4rem; }

/* ---------- Learning path (Data Playbook: milestone timeline) ---------- */
.path { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 0; right: 0; top: 0.65rem; height: 2px; background: var(--rule); }
.path li { position: relative; padding: 2.2rem 1rem 0 0; display: grid; gap: 0.35rem; align-content: start; }
.path li::before { content: ""; position: absolute; top: 0; left: 0; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--outline); }
.path li.now::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 35%, transparent); }
.path .step { font: 700 var(--step--1)/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.path h3 { font-size: 1.2rem; }
.path p { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 760px) {
  .path { grid-template-columns: 1fr; gap: 1.6rem; }
  .path::before { left: 0.6rem; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .path li { padding: 0 0 0 2.6rem; }
}

/* ---------- Statement band (Jungle) ---------- */
.band .wrap { padding-block: clamp(2.6rem, 6vw, 4.2rem); display: grid; gap: 1rem; }
.band blockquote { margin: 0; font-family: var(--display); font-size: var(--step-3); line-height: 1.15; max-width: 22ch; }
.band blockquote em { font-style: normal; color: var(--lime); }

/* ---------- Printables ---------- */
.printable { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem; align-items: start; padding: 1.2rem; border: 1.5px solid var(--outline); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.paper { aspect-ratio: 8.5/11; border-radius: 3px; background: var(--mist); border: 1px solid #C9CFA6; box-shadow: 3px 4px 0 color-mix(in srgb, var(--charcoal) 15%, transparent); padding: 0.55rem; display: grid; gap: 0.3rem; align-content: start; color: var(--charcoal); }
.paper i { display: block; height: 4px; border-radius: 2px; background: #C9CFA6; }
.paper i.h { height: 9px; background: var(--jungle); width: 75%; }
.paper i.l { background: var(--lime); width: 45%; }
.printable .type { font: 700 0.72rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.printable .stack { gap: 0.55rem; }
@media (max-width: 420px) { .printable { grid-template-columns: 1fr; } .paper { width: 7.5rem; } }

/* ---------- Newsletter ---------- */
.signup { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; }
.signup form { display: grid; gap: 0.75rem; min-width: 0; }
.signup label { font-weight: 600; font-size: 0.95rem; }
.signup .row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; padding: 0.8rem 1rem; border-radius: 999px;
  border: 2px solid var(--lime); background: color-mix(in srgb, var(--charcoal) 25%, transparent); color: var(--mist);
}
.signup input::placeholder { color: color-mix(in srgb, var(--mist) 60%, transparent); }
.signup .fine { font-size: var(--step--1); }
.signup .status { min-height: 1.4em; font-weight: 600; color: var(--lime); }
@media (max-width: 760px) { .signup { grid-template-columns: 1fr; } }

/* ---------- Lesson page ---------- */
.lesson-head .wrap { padding-block: clamp(2.4rem, 6vw, 4.5rem); display: grid; gap: 1.2rem; }
.crumbs { font-size: var(--step--1); color: var(--muted); }
.crumbs a { color: inherit; }
.video { position: relative; aspect-ratio: 16/9; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--charcoal); color: var(--mist); }
.video button, .video a.poster {
  all: unset; position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.9rem;
  cursor: pointer; text-align: center; padding: 1rem;
}
.video .play { width: 4.4rem; height: 4.4rem; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.video .play svg { width: 1.6rem; height: 1.6rem; translate: 3px 0; }
.video .ttl { font-family: var(--display); font-size: var(--step-2); max-width: 20ch; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button:focus-visible, .video a.poster:focus-visible { outline: 3px solid var(--lime); outline-offset: -6px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 3rem; align-items: start; }
.lesson-grid aside { position: sticky; top: 5.5rem; display: grid; gap: 1.5rem; }
@media (max-width: 900px) { .lesson-grid { grid-template-columns: 1fr; } .lesson-grid aside { position: static; } }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; }
.chapters li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.6rem; padding-block: 0.55rem; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.chapters .t { font-variant-numeric: tabular-nums; color: var(--muted); }
.prose { display: grid; gap: 1.2rem; }
.prose h2 { font-size: var(--step-2); margin-top: 1.4rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--outline); }
.split > div { padding: 1.4rem; display: grid; gap: 0.4rem; align-content: start; }
.split > div + div { background: var(--jungle); color: var(--mist); }
.split > div + div .source { color: color-mix(in srgb, var(--mist) 78%, transparent); }
.split .n { font-family: var(--display); font-size: var(--step-3); line-height: 1; }
@media (max-width: 560px) { .split { grid-template-columns: 1fr; } }

/* Bar chart: debt held by the public as % of GDP (CBO). Labels sit on the bars. */
.bars { display: grid; gap: 0.7rem; }
.bar { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.8rem; align-items: center; }
.bar .yr { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar .track { position: relative; height: 2.3rem; }
.bar .fill { height: 100%; border-radius: 3px; background: var(--jungle); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.6rem; color: var(--mist); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.5rem; }
.bar.focus .fill { background: var(--lime); color: var(--charcoal); }
.bar .note { font-size: var(--step--1); color: var(--muted); }
.bars .gap { font-size: var(--step--1); color: var(--muted); padding-left: 5.3rem; }

.quiz { border: 1.5px solid var(--outline); border-radius: var(--radius); padding: 1.4rem; display: grid; gap: 0.9rem; }
.quiz .opts { display: grid; gap: 0.6rem; }
.quiz button { font: inherit; text-align: left; padding: 0.8rem 1rem; border-radius: var(--radius); border: 1.5px solid var(--outline); background: transparent; color: var(--fg); cursor: pointer; }
.quiz button[aria-pressed="true"].right { background: var(--lime); border-color: var(--lime); color: var(--charcoal); }
.quiz button[aria-pressed="true"].wrong { border-style: dashed; opacity: 0.75; }
.quiz .why { color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.portrait { aspect-ratio: 4/5; border-radius: var(--radius); background: var(--surface); border: 1.5px dashed var(--outline); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1rem; font-size: var(--step--1); }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.values li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; }
.values svg { width: 1.3rem; height: 1.3rem; margin-top: 0.25rem; }

/* ---------- Footer ---------- */
.site-footer .wrap { padding-block: 3rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1rem; font-family: var(--body); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.site-footer ul { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer .fine { font-size: var(--step--1); color: color-mix(in srgb, var(--mist) 72%, transparent); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Filter chips on the lessons index */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chips button { font: 600 0.85rem/1 var(--body); padding: 0.55rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--outline); background: transparent; color: var(--fg); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--outline); color: var(--bg); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===================== Grounds redesign (2026-10-21) ===================== */
/* Under-construction bar */
.building { background: var(--charcoal); color: var(--mist); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.6rem; font-size: 0.82rem; text-align: center;
  padding-block: 0.55rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.building-tag { background: var(--lime); color: var(--charcoal); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.14em; padding: 0.2rem 0.5rem; border-radius: 3px; }

/* Green header (Grounds) */
.site-header { background: var(--jungle); border-bottom: 0; }
.site-header .nav a { color: var(--mist); }
.site-header .nav a:hover, .site-header .nav a[aria-current="page"] { border-bottom-color: var(--lime); }
.site-header .nav a.nav-cta { background: var(--lime); color: var(--charcoal); padding: 0.45rem 1rem; border-radius: 999px; border: 0; font-weight: 600; }
.site-header .lang { color: color-mix(in srgb, var(--mist) 75%, transparent); }
.site-header .lang [aria-current="true"] { color: var(--mist); }

/* Grounds type */
.caps { text-transform: uppercase; }
.ground-light { background: var(--mist); color: var(--charcoal); }
.ground-light .eyebrow { color: var(--jungle); }
.ground-light h2 { color: var(--jungle); }
.hero h1 { max-width: 13ch; text-transform: uppercase; line-height: 1.02; }
.leafed-left::after { right: auto; left: -8%; top: auto; bottom: -30%; translate: 0 0; width: min(40vw, 380px); }
.ground-dark.leafed::after { background-image: url("../img/emblem-jungle.png"); opacity: 0.4; }

/* Series cards */
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1.25rem; }
.series-card { display: grid; gap: 0.8rem; align-content: start; padding: 1.6rem; border: 1.5px solid var(--jungle); border-radius: var(--radius); color: var(--charcoal); text-decoration: none; min-width: 0; }
.series-card .ch { font: 700 0.75rem/1 var(--body); letter-spacing: 0.16em; color: var(--jungle); }
.series-card .t { font-family: var(--display); font-size: 1.6rem; line-height: 1.12; color: var(--jungle); }
.series-card p { color: #4A5246; font-size: 0.97rem; }
.series-card.start { background: var(--jungle); border: 2px solid var(--lime); color: var(--mist); }
.series-card.start .ch, .series-card.start .go { color: var(--lime); }
.series-card.start .t { color: var(--mist); }
.series-card.start p { color: #E4EAC4; }
.series-card .go { font-weight: 600; font-size: 0.9rem; }

/* Live debt clock */
.clock-grid { display: flex; flex-wrap: wrap; gap: 3.5rem 5.5rem; align-items: flex-start; }
.clock-grid > * { flex: 1 1 340px; min-width: 0; }
.clock-grid > .clock-main { flex: 999 1 520px; container-type: inline-size; }
.clock-num { font: 700 clamp(1.7rem, 8.4cqi, 4.4rem)/1 var(--body); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 0; }
.clock-stats { display: flex; flex-wrap: wrap; border-top: 1px solid #3B4038; border-bottom: 1px solid #3B4038; }
.clock-stats > div { flex: 1 1 160px; padding: 1rem 1rem 1rem 0; display: grid; gap: 0.2rem; }
.clock-stats > div + div { border-left: 1px solid #3B4038; padding-left: 1rem; }
.clock-stats .v { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock-stats .v.hl { color: var(--lime); }
.clock-stats .k { font-size: 0.82rem; color: #B9C0A6; }
.ground-dark .source, .ground-dark .fine { color: #B9C0A6; }
.hbars { display: grid; gap: 0.6rem; }
.hbar { display: grid; grid-template-columns: 2.9rem 1fr; gap: 0.7rem; align-items: center; }
.hbar .yr { font-size: 0.88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar .fill { height: 2.2rem; border-radius: 3px; background: var(--jungle); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.6rem; font-weight: 700; font-size: 0.95rem; color: var(--mist); }
.hbar .fill.proj { background: transparent; border: 2px dashed var(--jungle); }
.hbar .fill.hl { background: var(--lime); color: var(--charcoal); }
.hbars .gapnote { padding-left: 3.6rem; font-size: 0.78rem; color: #8C937A; }

/* M2 chart */
.m2-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem; }
.callout { border: 2px solid var(--jungle); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; gap: 0.25rem; max-width: 19rem; }
.callout .n { font-family: var(--display); font-size: 2.5rem; line-height: 1; color: var(--jungle); }
.callout p { font-size: 0.9rem; color: #4A5246; }
.vbars-scroll { overflow-x: auto; }
.vbars { display: flex; align-items: flex-end; gap: clamp(6px, 1.4vw, 18px); height: 420px; min-width: 520px; border-bottom: 1.5px solid var(--charcoal); padding-top: 0.6rem; }
.vbar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.vbar .v { font-size: 0.92rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vbar .b { width: 100%; max-width: 92px; background: var(--jungle); border-radius: 3px 3px 0 0; }
.vbar.hl .b { background: var(--lime); }
.vbar.hl .v { color: var(--jungle); }
.vbar .y { font-size: 0.85rem; font-weight: 600; color: #4A5246; font-variant-numeric: tabular-nums; }
.ground-light .source { color: #4A5246; }

/* Dictionary */
.dict-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.25rem; }
.dict-search { display: grid; gap: 0.4rem; flex: 0 1 24rem; min-width: 0; }
.dict-search label { font-weight: 600; font-size: 0.9rem; }
.dict-search input { font: inherit; padding: 0.85rem 1.1rem; border-radius: 999px; border: 2px solid var(--jungle); background: #FFFFFF; color: var(--charcoal); }
.script-note { font-family: var(--script); font-size: 1.6rem; line-height: 1.15; color: var(--jungle); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.1rem; }
.term { border: 1.5px solid var(--jungle); border-radius: 4px; padding: 1.35rem; display: grid; gap: 0.6rem; align-content: start; background: #FAFBEC; color: var(--charcoal); min-width: 0; }
.term:target { box-shadow: 0 0 0 3px var(--lime); }
.term-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.term h3 { font-size: 1.6rem; }
.term-tag { font: 700 0.68rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--jungle); white-space: nowrap; }
.term p { font-size: 0.97rem; line-height: 1.55; color: #3A3F33; }
.dict-count { font-size: 0.9rem; color: #4A5246; }

/* Documentary */
.doc-grid { display: flex; flex-wrap: wrap; gap: 3.5rem; align-items: center; }
.doc-grid > * { flex: 1 1 380px; min-width: 0; }
.doc-card { aspect-ratio: 16/9; border: 2px solid var(--lime); border-radius: var(--radius); background: #262826; display: grid; place-content: center; justify-items: center; gap: 1rem; text-decoration: none; color: var(--mist); }
.doc-card .play { width: 5.2rem; height: 5.2rem; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.doc-card .play svg { width: 1.9rem; height: 1.9rem; translate: 3px 0; }
.doc-card .lbl { font: 700 0.8rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: #B9C0A6; }
.doc-card:hover { background: #2E312E; }

/* Tools */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.tool { display: grid; gap: 0.75rem; align-content: start; padding: 1.75rem; border: 2px solid var(--lime); border-radius: var(--radius); color: var(--mist); text-decoration: none; min-width: 0; }
.tool .t { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; }
.tool p { color: #E4EAC4; }
.pill { justify-self: start; font: 700 0.7rem/1 var(--body); letter-spacing: 0.14em; background: var(--lime); color: var(--charcoal); padding: 0.3rem 0.55rem; border-radius: 3px; }

/* Resources list */
.res-list { list-style: none; margin: 0; padding: 0; display: grid; }
.res-list li { display: grid; gap: 0.25rem; padding-block: 1rem; border-top: 1px solid var(--rule); }
.res-list li:last-child { border-bottom: 1px solid var(--rule); }
.res-list a { font-weight: 600; font-size: 1.05rem; }
.res-list .what { color: var(--muted); font-size: 0.95rem; }
.res-list .tag { font: 700 0.68rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }

/* Light-ground sections keep the Mist ground in dark mode on purpose: Grounds is a fixed brand world. */

/* Smaller emblem, e.g. behind the newsletter */
.leafed-small::after { width: min(28vw, 260px); left: -70px; bottom: -130px; }

/* Right-to-left languages (Arabic): mirror the decorative leaf and timeline rail */
[dir="rtl"] .leafed::after { right: auto; left: -6%; transform: scaleX(-1); }
[dir="rtl"] .leafed-left::after { left: auto; right: -8%; }
[dir="rtl"] .clock-stats > div + div { border-left: 0; border-right: 1px solid #3B4038; padding-left: 1rem; padding-right: 1rem; }

.fine { font-size: var(--step--1); }

/* Debt clock: one Dark ground split by the Lime stem + sprout (template "stem" divider).
   No emblem behind the numbers: the leaf never goes behind data. */
.clock-stem .clock-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: 0 clamp(2rem, 4vw, 4rem); align-items: stretch; }
.clock-stem .clock-grid > .clock-main, .clock-stem .clock-history { padding-block: clamp(3.5rem, 7vw, 5.5rem); margin: 0; align-content: start; min-width: 0; }
.clock-stem .clock-main { container-type: inline-size; }
.clock-stem .stem { position: relative; width: 2px; background: var(--lime); margin-top: 3.4rem; }
.clock-stem .sprout { position: absolute; top: -3.2rem; left: 50%; width: 4rem; height: auto; translate: -50% 0; }
.clock-history p.lead { font-family: var(--display); font-size: var(--step-1); line-height: 1.2; }
@media (max-width: 860px) {
  .clock-stem .clock-grid { grid-template-columns: 1fr; }
  .clock-stem .stem { width: 100%; height: 2px; margin: 2.8rem 0 0; }
  .clock-stem .sprout { top: -2.9rem; width: 3.6rem; }
  .clock-stem .clock-history { padding-top: 2.5rem; }
  .clock-stem .clock-grid > .clock-main { padding-bottom: 1rem; }
}

/* Phones: header scrolls away, menu stays on one swipeable row */
@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { gap: 0.6rem; }
  .site-header .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 1.1rem; padding-bottom: 0.2rem; scrollbar-width: none; }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .site-header .nav a { white-space: nowrap; }
}

/* Emblem behind the debt clock (left of the stem), like the template's stem divider slide */
.clock-stem .clock-main { position: relative; isolation: isolate; }
.clock-stem .clock-main::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -50%;
  width: min(80%, 420px); aspect-ratio: 1; background: url("../img/emblem-jungle.png") center/contain no-repeat; opacity: 0.35;
}

/* ===================== The People's Ledger (news & history page) ===================== */
.ledger-page { background: var(--mist); color: var(--charcoal); }
.ledger-page a { color: var(--charcoal); }
.ledger-page a:hover { color: var(--jungle); }
.ticker { background: var(--charcoal); color: var(--mist); font-size: 0.84rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker-row { display: flex; flex-wrap: wrap; gap: 0.4rem 2rem; padding-block: 0.6rem; }
.ticker b { color: var(--lime); font-weight: 700; margin-right: 0.3rem; }
.masthead { padding-top: 1.8rem; display: grid; }
.mast-top, .mast-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; color: #4A5246; }
.mast-top { font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding-bottom: 0.7rem; }
.mast-name { border-top: 4px solid var(--charcoal); border-bottom: 1px solid var(--charcoal); padding-block: 1.2rem 1rem; text-align: center; display: grid; gap: 0.4rem; }
.mast-name h1 { font-size: clamp(2.6rem, 1.5rem + 5.5vw, 6rem); line-height: 1; color: var(--charcoal); }
.mast-name p { font-family: var(--display); color: var(--jungle); margin-inline: auto; }
.mast-bottom { border-bottom: 4px solid var(--charcoal); padding-block: 0.5rem; }
.front { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 2.5rem; padding-block: 2.5rem 3rem; }
@media (max-width: 860px) { .front { grid-template-columns: 1fr; } }
.kicker { justify-self: start; font: 800 0.7rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--charcoal); }
.kicker.news { background: var(--charcoal); color: var(--mist); padding: 0.32rem 0.55rem; }
.lead { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
.lead h2 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.6rem); line-height: 1.02; color: var(--charcoal); }
.hl { background: linear-gradient(transparent 58%, var(--lime) 58%); }
.dek { font-size: var(--step-1); line-height: 1.45; color: #3A3F33; }
.figs { display: flex; flex-wrap: wrap; border-top: 1px solid var(--charcoal); border-bottom: 1px solid var(--charcoal); }
.figs > div { flex: 1 1 10rem; padding: 1rem 1rem 1rem 0; display: grid; gap: 0.2rem; }
.figs > div + div { border-left: 1px solid var(--charcoal); padding-left: 1rem; }
.figs .n { font-family: var(--display); font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.figs .n.jungle { color: var(--jungle); }
.figs .k { font-size: 0.85rem; color: #4A5246; }
.src { font-size: 0.78rem; color: #4A5246; }
.watch { justify-self: start; display: inline-flex; align-items: center; gap: 0.8rem; font-weight: 700; text-decoration: none; border: 2px solid var(--charcoal); padding: 0.5rem 1.1rem 0.5rem 0.5rem; border-radius: 999px; }
.watch .play { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.watch .play svg { width: 1rem; height: 1rem; translate: 2px 0; }
.rail { border-left: 1px solid var(--charcoal); padding-left: 1.6rem; display: grid; gap: 1.6rem; align-content: start; }
@media (max-width: 860px) { .rail { border-left: 0; padding-left: 0; border-top: 4px solid var(--charcoal); padding-top: 1.6rem; } }
.story { display: grid; gap: 0.55rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--charcoal); }
.story h3 { font-size: 1.6rem; line-height: 1.12; color: var(--charcoal); }
.story p { font-size: 0.96rem; color: #3A3F33; }
.story a { font-weight: 700; font-size: 0.92rem; }
.opinion { background: var(--jungle); color: var(--mist); padding: 1.3rem; display: grid; gap: 0.5rem; }
.opinion .kicker { color: var(--lime); }
.opinion p { font-family: var(--script); font-size: 1.9rem; line-height: 1.1; }
.corrections { border: 1px solid var(--charcoal); padding: 1rem; display: grid; gap: 0.4rem; }
.corrections p { font-size: 0.88rem; color: #4A5246; }
.below { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 2.5rem; border-top: 4px solid var(--charcoal); padding-top: 2rem; }
.below .story { border-bottom: 0; }
.coming { border-top: 1px solid var(--charcoal); padding-block: 2.5rem 3rem; display: grid; gap: 1.6rem; }
.coming-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem 2rem; }
.coming-head h2 { font-size: var(--step-2); color: var(--charcoal); }
.coming-head p { color: #4A5246; font-size: 0.95rem; }
.coming-head a { font-weight: 700; }
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); border-top: 1px solid var(--charcoal); }
.soon-card { position: relative; display: grid; gap: 0.5rem; align-content: start; padding: 1.3rem 1.3rem 3.2rem 0; border-bottom: 1px dashed var(--charcoal); }
.soon-card h3 { font-size: 1.35rem; line-height: 1.15; color: var(--charcoal); }
.soon-card p { font-size: 0.92rem; color: #3A3F33; }
.soon-card .kicker { color: var(--jungle); }
.stamp { position: absolute; left: 0; bottom: 1rem; font: 800 0.68rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; border: 1.5px solid var(--jungle); color: var(--jungle); padding: 0.3rem 0.5rem; rotate: -3deg; }
.sections-index { border-top: 4px solid var(--charcoal); padding-block: 2rem 3.5rem; display: grid; gap: 1.2rem; }
.sections-index h2 { font-size: var(--step-2); color: var(--charcoal); }
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); border-top: 1px solid var(--charcoal); }
.sec-grid a { display: grid; gap: 0.3rem; padding: 1.1rem 1.1rem 1.1rem 0; border-bottom: 1px solid var(--charcoal); text-decoration: none; }
.sec-grid .t { font-family: var(--display); font-size: 1.35rem; }
.sec-grid .k { font-size: 0.85rem; color: #4A5246; }

/* Data explainer gallery (Resources) */
.explainer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1.6rem; }
.explainer { margin: 0; display: grid; gap: 0.7rem; align-content: start; }
.explainer a { display: block; border: 1.5px solid var(--jungle); border-radius: var(--radius); overflow: hidden; background: #F2F5D6; transition: translate 0.15s ease, box-shadow 0.15s ease; }
.explainer a:hover { translate: 0 -2px; box-shadow: 6px 8px 0 var(--jungle); }
.explainer img { width: 100%; height: auto; }
.explainer figcaption { display: grid; gap: 0.2rem; }
.explainer .t { font-family: var(--display); font-size: 1.3rem; color: var(--jungle); }
.explainer .d { font-size: 0.92rem; color: #4A5246; }

/* Ledger: live ticker states */
.ticker a { color: var(--mist); text-decoration: underline dotted; }
.ticker .up { color: var(--lime); }
.ticker .down { color: #E8B4A0; }

/* Ledger: then vs. now drag comparison */
.thennow-wrap { border-top: 4px solid var(--charcoal); padding-block: 2.2rem 2.6rem; display: grid; gap: 1.2rem; }
.tn-head { display: grid; gap: 0.6rem; }
.tn-head h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); color: var(--charcoal); line-height: 1.05; }
.tn-head p { color: #4A5246; }
.thennow { position: relative; height: clamp(300px, 34vw, 380px); border-radius: var(--radius); overflow: hidden; user-select: none; touch-action: pan-y; }
.tn-side { position: absolute; inset: 0; display: grid; align-content: center; gap: 0.5rem; padding: 2rem clamp(1.25rem, 5vw, 4rem); }
.tn-now { background: var(--charcoal); color: var(--mist); justify-items: end; text-align: right; }
.tn-then { background: var(--lime); color: var(--charcoal); justify-items: start; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.tn-side .yr { font: 800 0.8rem/1 var(--body); letter-spacing: 0.18em; }
.tn-side .price { font-family: var(--display); font-size: clamp(3rem, 2rem + 6vw, 6.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.tn-side .row { font-size: 0.95rem; opacity: 0.85; }
.tn-side .mins { font-size: 1.15rem; }
.tn-side .mins b { font-family: var(--display); font-weight: 400; font-size: 2.2rem; }
.tn-now .mins b { color: var(--lime); }
.tn-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; translate: -50% 0; background: var(--mist); box-shadow: 0 0 0 1px var(--charcoal); pointer-events: none; }
.tn-handle span { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; translate: -50% -50%; border-radius: 50%; background: var(--mist); border: 2px solid var(--charcoal); }
.tn-handle span::before { content: "◂ ▸"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--charcoal); letter-spacing: 0.1em; }
.tn-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.tn-range:focus-visible + .tn-handle, .thennow:focus-within .tn-handle span { outline: 3px solid var(--jungle); outline-offset: 2px; }
@media (max-width: 640px) {
  .thennow { height: 440px; }
  .tn-then { align-content: start; }
  .tn-now { align-content: end; }
  .tn-side .price { font-size: 3.2rem; }
}

.ticker .asof { color: #B9C0A6; font-weight: 500; }

/* Ledger crossword */
.crossword-wrap { border-top: 4px solid var(--charcoal); padding-block: 2.2rem 2.8rem; display: grid; gap: 1.4rem; }
.crossword-wrap .tn-head a { font-weight: 700; }
.cw-layout { display: grid; grid-template-columns: minmax(0, auto) minmax(16rem, 1fr); gap: 2rem 3rem; align-items: start; }
@media (max-width: 900px) { .cw-layout { grid-template-columns: 1fr; } }
.cw-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 2.6rem)); gap: 0; border: 2px solid var(--charcoal); width: max-content; max-width: 100%; background: var(--charcoal); }
.cw-cell, .cw-block { aspect-ratio: 1; }
.cw-block { background: var(--charcoal); }
.cw-cell { position: relative; background: #FFFFFF; outline: 1px solid var(--charcoal); }
.cw-cell input { width: 100%; height: 100%; border: 0; padding: 0; background: transparent; text-align: center; font: 700 1.15rem/1 var(--body); text-transform: uppercase; color: var(--charcoal); caret-color: var(--jungle); }
.cw-cell input:focus { outline: none; background: var(--lime); }
.cw-cell input.wrong { color: #A33B20; background: #F6DCD3; }
.cw-n { position: absolute; top: 2px; left: 3px; font-size: 0.58rem; font-weight: 700; color: var(--charcoal); pointer-events: none; }
.cw-clues { display: grid; gap: 1.3rem; }
.cw-clues h3 { font-size: 1.3rem; color: var(--charcoal); border-bottom: 1px solid var(--charcoal); padding-bottom: 0.3rem; }
.cw-clues ol { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.cw-clues li { cursor: pointer; font-size: 0.95rem; color: #2E322B; }
.cw-clues li:hover { color: var(--jungle); }
.cw-clues li b { display: inline-block; min-width: 1.4rem; }
.cw-clues .len { color: #6A7062; font-size: 0.85rem; }
.cw-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cw-actions .btn { padding: 0.6rem 1.1rem; border-color: var(--charcoal); }
.cw-status { font-weight: 700; color: var(--jungle); min-height: 1.4em; }
@media (max-width: 480px) { .cw-grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); width: 100%; } .cw-cell input { font-size: 1rem; } }

/* Ledger almanac: This day in money history + Word of the day */
.almanac { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 0; border-top: 4px solid var(--charcoal); }
@media (max-width: 760px) { .almanac { grid-template-columns: 1fr; } }
.almanac > article { display: grid; gap: 0.6rem; align-content: start; padding: 1.8rem 2rem 2rem 0; }
.almanac > article + article { border-left: 1px solid var(--charcoal); padding-left: 2rem; padding-right: 0; }
@media (max-width: 760px) { .almanac > article + article { border-left: 0; border-top: 1px solid var(--charcoal); padding-left: 0; } }
.almanac-date { font-family: var(--display); font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); line-height: 1; color: var(--jungle); }
.almanac h3 { font-size: 1.7rem; line-height: 1.12; color: var(--charcoal); }
.almanac p { color: #3A3F33; }
.almanac a { font-weight: 700; }
.wotd-word { font-size: clamp(2rem, 1.5rem + 2vw, 3rem) !important; }
.almanac-wotd { background: transparent; }
.almanac p.almanac-date { color: var(--jungle); }

/* ===================== Textbook: open book spread (Template additions) ===================== */
.book-wrap { position: relative; overflow: hidden; isolation: isolate; }
.book-wrap::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -50%;
  width: min(120%, 1100px); aspect-ratio: 1; background: url("../img/emblem-lime.png") center/contain no-repeat; opacity: 0.2; }
.book { display: grid; grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr); gap: 0 clamp(2rem, 5vw, 4.5rem); padding-block: clamp(1rem, 3vw, 2rem); }
.book-page { display: grid; gap: 0.9rem; align-content: start; min-width: 0; }
.book-spine { background: var(--jungle); }
.book-word { font-size: clamp(2.8rem, 1.8rem + 4vw, 5rem); line-height: 1; color: var(--jungle); }
.book-def { font-size: var(--step-1, 1.25rem); max-width: 34ch; }
.book-series { font-size: 0.85rem; color: #4A5246; }
.book-example { font-family: var(--display); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.3; color: var(--jungle); }
.book-rows { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.book-rows td { padding: 0.55rem 0; border-bottom: 1px solid var(--jungle); }
.book-rows td + td { text-align: right; font-weight: 700; }
.book-note { font-family: var(--display); color: var(--jungle); font-size: 1.2rem; }
.book-link { font-weight: 700; color: var(--jungle); justify-self: start; }
@media (max-width: 720px) {
  .book { grid-template-columns: 1fr; }
  .book-spine { height: 2px; margin-block: 1.6rem; }
}

/* One leaf, two grounds: whole emblem centered across the split */
.leaf-split { position: relative; display: grid; grid-template-columns: 1fr 1fr; isolation: isolate; overflow: hidden; }
.leaf-split::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%;
  width: min(46%, 560px); aspect-ratio: 1; background: url("../img/emblem-lime.png") center/contain no-repeat; opacity: 0.2; pointer-events: none; }
.ls-half { position: relative; z-index: 2; padding: clamp(3rem, 8vw, 6.5rem) clamp(1.4rem, 5vw, 4.5rem); display: grid; gap: 1rem; align-content: center; color: var(--mist); }
.ls-dark { background: var(--charcoal); }
.ls-green { background: var(--jungle); }
.leaf-split .ls-dark::before, .leaf-split .ls-green::before { content: none; }
.leaf-split::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, var(--charcoal) 50%, var(--jungle) 50%); }
.ls-dark, .ls-green { background: transparent; }
.leaf-split .tag { font: 700 0.75rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.leaf-split .big { font-family: var(--display); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); line-height: 1.15; max-width: 18ch; }
.leaf-split .strike { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--mist) 55%, transparent); color: color-mix(in srgb, var(--mist) 80%, transparent); }
.leaf-split p:not(.big) { max-width: 44ch; }
@media (max-width: 720px) {
  .leaf-split { grid-template-columns: 1fr; }
  .leaf-split::after { background: linear-gradient(180deg, var(--charcoal) 50%, var(--jungle) 50%); }
  .leaf-split::before { width: 70%; }
}

/* Textbook table of contents */
.toc { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--jungle); }
.toc li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding-block: 1.2rem; border-bottom: 1px solid var(--jungle); }
.toc-n { font-family: var(--display); font-size: 2.4rem; color: var(--jungle); line-height: 1; }
.toc h3 { font-size: 1.35rem; }
.toc-s { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jungle); border: 1.5px solid var(--jungle); padding: 0.3rem 0.55rem; border-radius: 999px; white-space: nowrap; }
@media (max-width: 560px) { .toc li { grid-template-columns: 2.5rem minmax(0, 1fr); } .toc-s { grid-column: 2; justify-self: start; } }

/* Ledger: almanac with history only */
.almanac-solo { grid-template-columns: 1fr; }
.almanac-solo > article { padding-right: 0; max-width: 60rem; }

/* Ledger: Reserve Watch tile map (cartogram, dark ground like the SBR graphic) */
.reserve-watch { padding-block: 2.5rem; border-top: 4px solid var(--charcoal); display: grid; gap: 1.4rem; }
.rv { background: var(--charcoal); color: var(--mist); padding: clamp(1.2rem, 3.5vw, 2.4rem); display: grid; gap: 1.4rem; }
.rv-grid { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: clamp(3px, 0.5vw, 7px); }
.rv-tile { position: relative; aspect-ratio: 2.1; border-radius: 4px; padding: 0; cursor: pointer;
  font: 700 clamp(0.5rem, 0.35rem + 0.55vw, 0.85rem)/1 var(--body); letter-spacing: 0.02em;
  background: #262726; color: #6E736A; border: 1px solid #3A3C39; }
.rv-tile:hover { border-color: var(--mist); }
.rv-tile:focus-visible, .rv-tile.on { outline: 2px solid var(--mist); outline-offset: 2px; }
.rv-passed { background: var(--lime); border-color: var(--lime); color: var(--charcoal); }
.rv-pending { background: var(--jungle); border-color: #4F7D45; color: var(--mist); }
.rv-considering { background: #B08A4A; border-color: #B08A4A; color: var(--charcoal); }
.rv-failed { background: #A04E3E; border-color: #A04E3E; color: var(--mist); }
.rv-star { position: absolute; top: -8px; right: -8px; width: 17px; height: 17px; fill: var(--lime); stroke: var(--charcoal); stroke-width: 3.2px; paint-order: stroke; overflow: visible; }
.rv-star-open { fill: var(--charcoal); stroke: var(--lime); stroke-width: 2.6px; }
.rv-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; font-size: 0.9rem; color: color-mix(in srgb, var(--mist) 85%, transparent); }
.rv-legend li { display: flex; align-items: center; gap: 0.5rem; }
.rv-legend .rv-star { position: static; width: 15px; height: 15px; }
.rv-key { width: 1rem; height: 1rem; border-radius: 3px; background: #262726; border: 1px solid #3A3C39; }
.rv-key.rv-passed { background: var(--lime); } .rv-key.rv-pending { background: var(--jungle); }
.rv-key.rv-considering { background: #B08A4A; } .rv-key.rv-failed { background: #A04E3E; }
.rv-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.4rem; align-items: stretch; border-top: 1px solid #3A3C39; padding-top: 1.4rem; }
.rv-detail { font-size: 1rem; border-left: 3px solid var(--lime); padding-left: 0.9rem; margin: 0; align-self: start; min-height: 4.5em; }
.rv-detail b { color: var(--lime); }
.rv-fed { border: 1.5px solid var(--lime); padding: 1rem 1.2rem; display: grid; gap: 0.35rem; }
.rv-fed .kicker { color: var(--lime); }
.rv-fed-num { font-family: var(--display); font-size: 2.1rem; line-height: 1; color: var(--lime); }
.rv-fed p:last-child { font-size: 0.86rem; color: color-mix(in srgb, var(--mist) 80%, transparent); }
.rv-src { font-size: 0.78rem; color: color-mix(in srgb, var(--mist) 65%, transparent); }
.rv-src a { color: var(--lime); }
@media (max-width: 820px) { .rv-foot { grid-template-columns: 1fr; } .rv-star { width: 12px; height: 12px; top: -5px; right: -5px; } .rv-tile { aspect-ratio: 1.3; } }

/* Ledger: governments that hold bitcoin (ranked bars, dark ground) */
.wh { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.wh li { display: grid; grid-template-columns: 10rem minmax(0, 1fr) 10.5rem; gap: 0.3rem 1rem; align-items: center; }
.wh-name { font-weight: 700; display: grid; line-height: 1.2; }
.wh-name small { font-weight: 500; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.wh-bar { height: 1.4rem; background: #2B2C2A; }
.wh-bar i { display: block; height: 100%; background: var(--lime); }
.wh-val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.wh-note { grid-column: 2 / -1; font-size: 0.82rem; color: color-mix(in srgb, var(--mist) 75%, transparent); }
.wh-note a, .wh-ex a { color: var(--lime); }
.wh-ex { font-size: 0.88rem; border-left: 3px solid var(--lime); padding-left: 0.8rem; }
@media (max-width: 680px) { .wh li { grid-template-columns: 1fr auto; } .wh-bar { grid-column: 1 / -1; grid-row: 2; } .wh-note { grid-column: 1 / -1; } }

/* World tile map */
.wm-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); }
.wm-grid .rv-tile { aspect-ratio: 1.5; }
.wm-holds { background: var(--lime); border-color: var(--lime); color: var(--charcoal); }
.wm-building { background: var(--jungle); border-color: #4F7D45; color: var(--mist); }
.wm-reversed { background: #B08A4A; border-color: #B08A4A; color: var(--charcoal); }
.wm-banned { background: #A04E3E; border-color: #A04E3E; color: var(--mist); }
.rv-key.wm-holds { background: var(--lime); } .rv-key.wm-building { background: var(--jungle); }
.rv-key.wm-reversed { background: #B08A4A; } .rv-key.wm-banned { background: #A04E3E; }
.world-watch { padding-block: 2.5rem; border-top: 1px solid var(--charcoal); display: grid; gap: 1.4rem; }

/* Money history timeline on the stem */
.tl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 2.2rem; }
.tl::before { content: ""; position: absolute; left: 7.5rem; top: 0.4rem; bottom: 0; width: 2px; background: var(--lime); }
.tl li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 3rem; position: relative; }
.tl li::after { content: ""; position: absolute; left: calc(7.5rem - 7px); top: 0.55rem; width: 16px; height: 16px;
  background: var(--jungle); -webkit-mask: var(--star-mask) center/contain no-repeat; mask: var(--star-mask) center/contain no-repeat; }
.tl-year { font-family: var(--display); font-size: 2.1rem; line-height: 1; color: var(--jungle); text-align: right; }
.tl-body { display: grid; gap: 0.3rem; max-width: 42rem; }
.tl-date { font: 700 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: #4A5246; }
.tl-body h3 { font-size: 1.35rem; }
.tl-src { font-size: 0.82rem; color: var(--jungle); font-weight: 600; justify-self: start; }
@media (max-width: 600px) {
  .tl::before { left: 0.45rem; } .tl li { grid-template-columns: 1fr; gap: 0.4rem; padding-left: 2rem; }
  .tl li::after { left: 0; top: 0.4rem; } .tl-year { text-align: left; font-size: 1.7rem; }
}
/* "Follow the money": the site-wide rabbit-hole links (internal + external) */
.ftm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.9rem; font-size: 0.88rem; margin-top: 0.3rem; }
.ftm-k { display: inline-flex; align-items: center; gap: 0.35rem; font: 800 0.68rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--charcoal); }
.ftm-k::before { content: ""; width: 11px; height: 11px; background: var(--jungle); -webkit-mask: var(--star-mask) center/contain no-repeat; mask: var(--star-mask) center/contain no-repeat; }
.ftm a { color: var(--jungle); font-weight: 600; }
.ftm a[href^="http"]::after { content: " \2197"; font-size: 0.8em; }
.rv-detail a { color: var(--lime); }

/* ===================== Bitcoin hub (mockup) ===================== */
.pending { display: inline-block; justify-self: start; font: 700 0.66rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; padding: 0.3rem 0.5rem; border: 1px dashed currentColor; border-radius: 3px; color: #6B5A2E; }
.ground-dark .pending { color: #D7C08A; }
/* Price chart */
.pc { display: grid; gap: 0.8rem; background: var(--surface); border: 1px solid var(--rule); padding: clamp(1rem, 3vw, 1.8rem); }
.pc-mock { font-size: 0.82rem; font-weight: 600; color: #6B5A2E; border: 1px dashed #B08A4A; padding: 0.5rem 0.7rem; }
.pc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; }
.pc-price { font: 800 clamp(2rem, 1.4rem + 2.5vw, 3rem)/1 var(--body); color: var(--charcoal); font-variant-numeric: tabular-nums; }
.pc-date { font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; }
.pc-ctl { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pc-ctl button { font: 700 0.82rem/1 var(--body); padding: 0.5rem 0.8rem; border: 1.5px solid var(--jungle); background: transparent; color: var(--jungle); border-radius: 999px; cursor: pointer; }
.pc-ctl button[aria-pressed="true"] { background: var(--jungle); color: var(--mist); }
.pc-ctl [data-log] { margin-left: 0.6rem; }
.pc-svg { width: 100%; height: clamp(220px, 40vw, 340px); touch-action: pan-y; cursor: crosshair; display: block; }
.pc-legend { font-size: 0.8rem; color: var(--muted); }
.pc-h { display: inline-block; font-weight: 800; color: var(--jungle); }
/* Halving cards */
.hv { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.hv-card { border: 1.5px solid var(--jungle); padding: 1.2rem; display: grid; gap: 0.45rem; align-content: start; background: var(--surface); }
.hv-proj { border-style: dashed; background: transparent; }
.hv-date { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; color: var(--jungle); }
.hv-reward { font-size: 0.95rem; } .hv-reward b { font: 800 1.8rem/1 var(--body); color: var(--charcoal); margin-right: 0.25rem; }
.hv-bar { height: 0.55rem; background: #DDE3BB; } .hv-bar i { display: block; height: 100%; background: var(--jungle); }
.hv-mined, .hv-price { font-size: 0.82rem; color: var(--muted); }
/* Exchange graveyard */
.gy { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.gy-card { border: 1px solid #45473F; border-top: 4px solid #A04E3E; padding: 1.3rem 1.2rem; display: grid; gap: 0.5rem; align-content: start; background: #242523; }
.gy-survivor { border-top-color: var(--lime); }
.gy-years { font: 700 0.75rem/1 var(--body); letter-spacing: 0.14em; color: color-mix(in srgb, var(--mist) 65%, transparent); }
.gy-card h3 { font-size: 1.6rem; color: var(--mist); }
.gy-where { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lime); }
.gy-card p { color: color-mix(in srgb, var(--mist) 85%, transparent); font-size: 0.95rem; }
.gy-card .gy-lost { font: 800 1.15rem/1.2 var(--body); color: #E59A88; }
.gy-survivor .gy-lost { color: var(--lime); }
.gy-band { border: 1.5px solid var(--lime); padding: 1.4rem 1.6rem; display: grid; gap: 0.6rem; }
.gy-motto { font-family: var(--display); font-size: var(--step-2); color: var(--lime); }
.gy-band .ftm-k { color: var(--mist); } .gy-band .ftm-k::before { background: var(--lime); } .gy-band .ftm a { color: var(--lime); }
/* Bitcoin milestones reuse the timeline; tighter spacing */
.tl-btc { gap: 1.6rem; }

/* Ledger tidy-ups (Oct 21, chunk A) */
.mast-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 0.5rem 1.5rem; }
.mast-bottom > span:last-child { text-align: right; }
.mast-tag { font-family: var(--display); font-size: 1rem; color: var(--jungle); text-align: center; }
@media (max-width: 820px) { .mast-bottom { grid-template-columns: 1fr; } .mast-bottom > span, .mast-bottom > span:last-child { text-align: center; } .mast-tag { order: -1; } }
.almanac-archive h3 { font-size: 1.5rem; }
.price-watch { padding-block: 2.5rem; border-top: 4px solid var(--charcoal); display: grid; gap: 1.4rem; }
.rw-sub { display: grid; gap: 0.35rem; padding-top: 1.2rem; border-top: 1px solid var(--charcoal); scroll-margin-top: 5rem; }
.rw-sub:first-of-type { border-top: 0; padding-top: 0; }
.rw-sub h3 { font-size: var(--step-2); color: var(--charcoal); }
.rw-sub p { color: #4A5246; max-width: 48rem; }
/* Crossword buttons: always readable on the Mist ground */
.cw-actions .btn { color: var(--jungle); border-color: var(--jungle); background: transparent; font-weight: 700; }
.cw-actions .btn[data-cw="check"] { background: var(--jungle); color: var(--mist); }
.cw-actions .btn:hover { background: color-mix(in srgb, var(--jungle) 14%, transparent); }
.cw-actions .btn[data-cw="check"]:hover { background: #355A2D; }

/* Crossword: active word + clue, hinted squares, learn-the-words links */
.cw-cell.in-word { background: #E6EFB8; }
.cw-cell.hinted::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 6px; height: 6px; background: var(--jungle); -webkit-mask: var(--star-mask) center/contain no-repeat; mask: var(--star-mask) center/contain no-repeat; }
.cw-clues li.on { color: var(--charcoal); background: #E6EFB8; box-shadow: -0.4rem 0 0 #E6EFB8, 0.4rem 0 0 #E6EFB8; }
.cw-learn { border-top: 1px solid var(--charcoal); padding-top: 0.8rem; }

/* Textbook: myth as a question first */
[data-myth].js-ready .myth-reality > * { transition: opacity 0.4s, filter 0.4s; }
[data-myth].js-ready:not(.answered) .myth-reality > * { opacity: 0.12; filter: blur(6px); user-select: none; }
[data-myth].js-ready:not(.answered) .myth-reality::after { content: "Pick an answer to reveal"; position: absolute; inset: auto 0 50%; text-align: center; font: 700 0.8rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.myth-pick { display: none; gap: 0.6rem; }
[data-myth].js-ready .myth-pick { display: flex; }
.myth-pick .btn { color: var(--mist); border-color: var(--lime); }
.myth-pick .btn[aria-pressed="true"] { background: var(--lime); color: var(--charcoal); }
.myth-verdict { font-weight: 700; color: var(--lime); min-height: 1.4em; }
[data-myth].answered .myth-claim { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--mist) 55%, transparent); }
.toc-go { text-decoration: none; background: var(--jungle); color: var(--mist) !important; }
.toc-draft { border-style: dashed; color: var(--muted); border-color: var(--muted); }
/* Dictionary: Compare these terms */
.cmps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.2rem; }
.cmp { border: 1.5px solid var(--jungle); background: var(--surface); padding: 1.3rem 1.4rem; display: grid; gap: 0.8rem; align-content: start; scroll-margin-top: 6rem; }
.cmp h3 { font-size: 1.45rem; color: var(--jungle); }
.cmp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.cmp-pair > div + div { border-left: 2px solid var(--lime); padding-left: 1.2rem; }
.cmp-pair p { font-size: 0.92rem; color: var(--muted); margin-top: 0.3rem; }
.cmp-line, .cmp-ex { font-size: 0.97rem; }
.cmp-ex { background: #E6EFB8; padding: 0.6rem 0.8rem; }
.ftm a.ftm-cmp { font-style: italic; }
@media (max-width: 520px) { .cmp-pair { grid-template-columns: 1fr; gap: 0.8rem; } .cmp-pair > div + div { border-left: 0; padding-left: 0; border-top: 2px solid var(--lime); padding-top: 0.8rem; } }

/* Grounds own their colors: a Light ground (or the Ledger) stays light even when the visitor's device is in dark mode,
   and Dark/Green grounds keep dark-ground roles. Fixes components that use --surface / --muted / --rule. */
.ground-light, .ledger-page {
  --bg: #F2F5D6; --surface: #FAFBEC; --fg: #1D1E1D; --muted: #4A5246; --rule: #CBD3A8;
  --accent-text: #406B37; --outline: #406B37; --focus: #406B37; color-scheme: light;
}
.ground-dark, .ground-green {
  --surface: #262826; --fg: #F2F5D6; --muted: #B9C0A6; --rule: #3B4038;
  --accent-text: #BCD45A; --outline: #BCD45A; --focus: #BCD45A; color-scheme: dark;
}

/* Resources: Bitcoin starter pack */
.sp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 2rem 3rem; align-items: start; }
.sp-h { font-size: 1.5rem; color: var(--jungle); }
.sp-path { list-style: none; margin: 0; padding: 0; counter-reset: sp; display: grid; }
.sp-path li { counter-increment: sp; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; align-items: start; padding-block: 0.9rem; border-top: 1px solid var(--rule); position: relative; }
.sp-path li:last-child { border-bottom: 1px solid var(--rule); }
.sp-path li > div { display: grid; gap: 0.2rem; }
.sp-path a { font-weight: 600; font-size: 1.05rem; }
.sp-path .what, .sp-books .what { color: var(--muted); font-size: 0.93rem; }
.sp-n { justify-self: start; font: 700 0.72rem/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--mist); background: var(--jungle); padding: 0.4rem 0.55rem; border-radius: 999px; white-space: nowrap; margin-top: 0.15rem; }
.sp-n::before { content: counter(sp) " · "; }
.sp-books { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: 0.9rem; }
.sp-books li { display: grid; gap: 0.1rem; padding-left: 0.9rem; border-left: 3px solid var(--lime); }
.sp-books b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; color: var(--charcoal); }
.what-lede { color: var(--muted); }
.sp-short { margin-top: 1rem; padding: 0.8rem 1rem; background: #E6EFB8; font-size: 0.95rem; }
.sp-short a { font-weight: 600; }

/* Ledger: The Wall Street desk */
.wall-street { padding-block: 2.5rem; border-top: 4px solid var(--charcoal); display: grid; gap: 1.6rem; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0; border-top: 1px solid var(--charcoal); }
.ws-card { padding: 1.2rem 1.2rem 1.4rem 0; display: grid; gap: 0.5rem; align-content: start; }
.ws-card + .ws-card { border-left: 1px solid var(--charcoal); padding-left: 1.2rem; }
.ws-meta { display: flex; justify-content: space-between; gap: 0.5rem; font: 700 0.72rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #4A5246; }
.ws-who { color: var(--jungle); }
.ws-card h3 { font-size: 1.3rem; line-height: 1.2; color: var(--charcoal); }
.ws-card p:not(.ws-meta) { font-size: 0.93rem; color: #3A3F33; }
.ws-card a { font-size: 0.85rem; font-weight: 700; justify-self: start; }
@media (max-width: 760px) { .ws-card + .ws-card { border-left: 0; padding-left: 0; border-top: 1px solid var(--charcoal); } }
.ws-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.4rem; }
.ws-their { border: 1.5px dashed #B08A4A; padding: 1.2rem 1.3rem; display: grid; gap: 0.7rem; align-content: start; }
.ws-their .kicker { color: #6B5A2E; }
.ws-their ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; }
.ws-read { background: var(--charcoal); color: var(--mist); padding: 1.2rem 1.4rem; display: grid; gap: 0.7rem; align-content: start; }
.ws-read .kicker { color: var(--lime); }
.ws-read ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.ws-read b { color: var(--lime); }
.ws-read .ftm-k { color: var(--mist); } .ws-read .ftm-k::before { background: var(--lime); }
.ledger-page .ws-read .ftm a { color: var(--lime); }

/* Resources library: tabs (no-JS shows every panel) */
.lib-head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.5rem 3rem; align-items: start; }
@media (max-width: 820px) { .lib-head { grid-template-columns: 1fr; } }
.lib-pack { border: 1.5px solid var(--jungle); padding: 1.1rem 1.2rem; display: grid; gap: 0.4rem; background: var(--surface); }
.lib-pack-t { font-family: var(--display); font-size: 1.4rem; color: var(--jungle); }
.lib-pack p:not(.lib-pack-t) { font-size: 0.92rem; color: var(--muted); }
.tabs { display: grid; gap: 1.6rem; }
.tab-row { display: none; gap: 0.4rem; border-bottom: 2px solid var(--jungle); }
[data-tabs].js-ready .tab-row { display: flex; }
.tab-row button { font: 700 1rem/1 var(--body); padding: 0.8rem 1.3rem; border: 2px solid var(--jungle); border-bottom: 0; background: transparent; color: var(--jungle); border-radius: 8px 8px 0 0; cursor: pointer; margin-bottom: -2px; }
.tab-row button[aria-selected="true"] { background: var(--jungle); color: var(--mist); }
[data-tabs].js-ready .tab-panel:not(.on) { display: none; }
.lib-books { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.footer .verify, .site-footer .verify { font-weight: 600; }
.lib-dl { justify-self: start; margin-top: 0.4rem; padding: 0.65rem 1.1rem; }
.lib-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); column-gap: 3rem; }
.sp-books li { align-content: start; } .lib-books { align-items: start; } #p-read .sp-h { margin-top: 1rem; }
#official .stack { align-content: start; } #official .wrap > * { align-self: start; }

/* Nav dropdown: Resources -> Where the numbers come from / The library */
.nav-drop { position: relative; }
.nav-drop-btn { display: inline-flex; align-items: center; gap: 0.35rem; font: 500 0.95rem/1 var(--body); color: var(--mist); background: none; border: 0; border-bottom: 2px solid transparent; padding: 0.3rem 0; cursor: pointer; }
.nav-drop-btn svg { width: 0.65rem; height: 0.4rem; transition: rotate 0.2s; }
.nav-drop-btn[aria-current="page"], .nav-drop-btn:hover { border-bottom-color: var(--lime); }
.nav-drop.open .nav-drop-btn svg { rotate: 180deg; }
.nav-drop-panel { position: absolute; top: calc(100% + 0.6rem); left: -1rem; z-index: 50; min-width: 17rem; background: var(--charcoal); border: 1px solid #3B4038; border-top: 3px solid var(--lime); padding: 0.4rem 0; display: none; box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.nav-drop.open .nav-drop-panel { display: grid; }
.site-header .nav .nav-drop-panel a { padding: 0.7rem 1.1rem; border: 0; white-space: nowrap; }
.site-header .nav .nav-drop-panel a:hover, .site-header .nav .nav-drop-panel a[aria-current="page"] { background: #2B2D2A; color: var(--lime); }
.lib-teaser { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; }
.vbar.hl, .hbar .hl, .clock-stats .hl { background: none; } /* the text highlighter is only for words, not chart bars */
.myth-gap { height: clamp(2.5rem, 6vw, 4.5rem); } /* keeps the myth's Green half from running into the Green tools section */
.slogan { font-family: var(--script); font-size: 1.6rem; line-height: 1.2; color: var(--jungle); }
footer .slogan, .site-footer .slogan { color: var(--lime); }

/* ---------- Phones: logo + Menu button; links open as one grouped list ---------- */
.menu-btn { display: none; }
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; align-items: center; }
  .menu-btn { display: inline-flex; align-items: center; gap: 0.55rem; margin-left: auto; font: 600 0.95rem/1 var(--body); color: var(--charcoal); background: var(--lime); border: 0; border-radius: 999px; padding: 0.6rem 1rem; cursor: pointer; }
  .menu-ico { display: grid; gap: 3px; width: 16px; }
  .menu-ico i { display: block; height: 2px; background: currentColor; border-radius: 1px; transition: transform 0.2s, opacity 0.2s; }
  .menu-open .menu-ico i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-ico i:nth-child(2) { opacity: 0; }
  .menu-open .menu-ico i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
  .site-header .nav, .site-header .lang { display: none; }
  .menu-open .nav { display: grid; width: 100%; gap: 0; overflow: visible; padding: 0.4rem 0 0.2rem; border-top: 1px solid color-mix(in srgb, var(--mist) 25%, transparent); }
  .menu-open .lang { display: flex; flex-wrap: wrap; width: 100%; padding-bottom: 0.4rem; }
  .menu-open .nav > a, .menu-open .nav .nav-drop-panel a { display: block; padding: 0.75rem 0; border-bottom: 1px solid color-mix(in srgb, var(--mist) 14%, transparent); font-size: 1.05rem; }
  .menu-open .nav .nav-drop-btn { display: block; width: 100%; text-align: left; pointer-events: none; padding: 1rem 0 0.2rem; border: 0; font: 600 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
  .menu-open .nav .nav-drop-btn svg { display: none; }
  .menu-open .nav .nav-drop-panel { display: grid !important; position: static; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; }
  .menu-open .nav .nav-drop-panel a { padding-left: 0.9rem; }
  .site-header .nav .nav-drop-panel a[aria-current="page"], .menu-open .nav > a[aria-current="page"] { background: none; color: var(--lime); }
  .menu-open .nav a.nav-cta { justify-self: start; margin-top: 1rem; padding: 0.6rem 1.2rem; border: 0; }
  /* Ledger ticker: one swipeable row instead of a tall stack */
  .ticker-row { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; gap: 1.6rem; }
  .ticker-row::-webkit-scrollbar { display: none; }
}
/* Ledger masthead footer line: two short lines, left and right */
.mast-bottom { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .mast-bottom { grid-template-columns: 1fr 1fr; } .mast-bottom > span:first-child { text-align: left; } .mast-bottom > span:last-child { text-align: right; } }
@media (max-width: 520px) { .mast-bottom { grid-template-columns: 1fr; gap: 0.2rem; } .mast-bottom > span, .mast-bottom > span:last-child { text-align: center; } }

/* The logo star (curved sides, rounded points) used as a shape for small CSS marks */
:root { --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1.5Q17 1.5 17.4 3Q20 12 29 14.6Q30.5 15 30.5 16Q30.5 17 29 17.4Q20 20 17.4 29Q17 30.5 16 30.5Q15 30.5 14.6 29Q12 20 3 17.4Q1.5 17 1.5 16Q1.5 15 3 14.6Q12 12 14.6 3Q15 1.5 16 1.5Z'/%3E%3C/svg%3E"); }

/* Language picker: collapsed into one button (English ▾); other languages listed as coming soon */
.lang-btn { font-size: var(--step--1); color: var(--mist); }
.lang-btn .globe { width: 0.95rem; height: 0.95rem; }
.lang-panel { left: auto; right: 0; min-width: 13rem; }
.lang-panel > * { padding: 0.65rem 1.1rem; color: var(--mist); text-decoration: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; white-space: nowrap; }
.lang-panel .lang-on { color: var(--lime); font-weight: 600; }
.lang-panel .soon { opacity: 1; color: color-mix(in srgb, var(--mist) 70%, transparent); }
.lang-panel small { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: color-mix(in srgb, var(--mist) 50%, transparent); }
@media (max-width: 760px) {
  .menu-open .lang { display: grid; gap: 0; padding: 0.2rem 0 0.6rem; }
  .menu-open .lang .lang-btn { display: flex; pointer-events: none; padding: 1rem 0 0.3rem; font: 600 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); border: 0; }
  .menu-open .lang .lang-btn svg:last-child { display: none; }
  .menu-open .lang .lang-panel { display: grid !important; position: static; min-width: 0; background: none; border: 0; box-shadow: none; padding: 0; }
  .menu-open .lang .lang-panel > * { padding: 0.45rem 0 0.45rem 0.9rem; justify-content: flex-start; }
}
.lang-label { display: none; }
.site-header .lang-panel .lang-on { color: var(--lime); }
@media (max-width: 760px) {
  .menu-open .lang .lang-cur { display: none; } .menu-open .lang .lang-label { display: inline; }
  .site-header .nav .nav-drop-panel a:hover { background: none; }
}
/* Phones: library tabs share the width evenly instead of running off the screen */
.tabs { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) {
  .tab-row { gap: 0.25rem; }
  .tab-row button { flex: 1 1 0; min-width: 0; padding: 0.75rem 0.3rem; font-size: 0.9rem; }
}
/* Phones: the under-construction bar shrinks to just its tag (one short line) */
@media (max-width: 520px) {
  .building { padding-block: 0.4rem; }
  .building > span:not(.building-tag) { display: none; }
}
