/* The Data Bulletin v5 "Annotated Atlas" stylesheet (Phase 3, 2026-08-29). Promoted from the Phase 1 proof approved at Gate 1.
   Atlas Ink palette (decision #80), two modes (light and ink navy), one accent, Instrument Sans, Caveat for annotations only.
   Mode classes live on <html>: .mode-dark (shared key "tdb-mode" with the legacy pages). Legacy pages use assets/site.css. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/v5/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/v5/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/v5/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/v5/fonts/caveat-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Atlas Ink, regular mode */
  --page: #F8F6F1;
  --surface: #FFFDF8;
  --ink: #1F2A30;
  --ink-2: #566268;
  --rule: #D8D8D2;
  --rule-soft: #E6E5DF;
  --blue: #2F5D73;
  --blue-ink: #2F5D73;       /* text on paper: 6.6:1 */
  --teal: #4E7C74;
  --clay: #B85C44;
  --clay-text: #A64F39;      /* 4.9:1 on paper, for the one annotation */
  --ochre: #A97716;
  --ochre-wash: rgba(226, 185, 101, 0.32);
  --graphite: #3B4246;
  --on-accent: #F8F6F1;
  --shadow: 0 1px 0 rgba(31, 42, 48, 0.06);

  --sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --r: 6px;
  --r-pill: 999px;
  --maxw: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

html.mode-dark {
  --page: #12191D;
  --surface: #1A2429;
  --ink: #F2F0E9;
  --ink-2: #ADB7B8;
  --rule: #344249;
  --rule-soft: #26333A;
  --blue: #78A9C0;
  --blue-ink: #8DB8CD;
  --teal: #7FB0A5;
  --clay: #DF8064;
  --clay-text: #E48C72;
  --ochre: #E2B965;
  --ochre-wash: rgba(226, 185, 101, 0.22);
  --graphite: #C9CFD0;
  --on-accent: #12191D;
  --shadow: 0 1px 0 rgba(0,0,0,0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  font-feature-settings: "tnum" 1, "kern" 1; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.35rem, 1rem + 1.2vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0; }
a, button, summary, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: var(--r); z-index: 50; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30; height: var(--nav-h);
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand span { font-size: 1.02rem; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav span.soon {
  position: relative; color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 8px 10px; border-radius: var(--r);
}
.nav a:hover { background: var(--rule-soft); }
.nav span.soon, .topics span.soon, .subnav span.soon { color: var(--ink-2); opacity: 0.55; cursor: default; }
.nav a[aria-current="page"] { color: var(--blue-ink); font-weight: 600; }
/* the annotated slice: a short pencil arc under the active item, not a tab underline */
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 6px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'><path d='M1 4.5 C 14 1.2, 30 0.6, 59 3.2' fill='none' stroke='%23B85C44' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}
html.mode-dark .nav a[aria-current="page"]::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'><path d='M1 4.5 C 14 1.2, 30 0.6, 59 3.2' fill='none' stroke='%23DF8064' stroke-width='1.6' stroke-linecap='round'/></svg>");
}
.nav .more { display: none; }
.mode-btn {
  margin-left: 8px; inline-size: 36px; block-size: 36px; display: inline-grid; place-items: center;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: var(--r-pill); cursor: pointer;
}
.mode-btn:hover { border-color: var(--ink-2); }
.mode-btn svg { width: 18px; height: 18px; }
.mode-btn .sun { display: none; }
html.mode-dark .mode-btn .sun { display: block; }
html.mode-dark .mode-btn .moon { display: none; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav > :not(.keep):not(.mode-btn) { display: none; }
  .nav .more { display: inline-block; }
  .site-header .wrap { gap: 12px; }
  .nav { gap: 0; }
  .nav a { padding: 8px 8px; }
  .brand span { font-size: 0.95rem; }
  .mode-btn { margin-left: 4px; }
}

/* ---------- hero (home) ---------- */
.home-hero { padding: 56px 0 28px; }
.home-hero .lockup { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.home-hero .lockup svg { width: 56px; height: 56px; }
.home-hero .wordmark { font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.trust { color: var(--ink-2); font-size: 0.95rem; }
.lead { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.lead .kicker { color: var(--ink-2); font-size: 0.9rem; margin-bottom: 6px; }
.lead .value { font-size: clamp(3.4rem, 2rem + 6vw, 6.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; color: var(--blue-ink); }
.lead .sentence { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem); margin-top: 12px; max-width: 26ch; text-wrap: pretty; }
.lead .meta { color: var(--ink-2); font-size: 0.9rem; margin-top: 12px; }
.lead .spark { height: 200px; }
@media (max-width: 760px) { .lead { grid-template-columns: 1fr; } .lead .spark { height: 150px; } }

/* ---------- number strip ---------- */
.strip { margin-top: 36px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--rule-soft); }
.strip > a {
  padding: 18px 16px 16px; color: inherit; text-decoration: none; min-width: 0; background: var(--page);
}
.strip > a:hover { background: var(--surface); }
.strip > a { position: relative; }
.strip > a::after, .topics > a::after { content: ""; position: absolute; right: 14px; top: 20px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2); border-top: 1.5px solid var(--ink-2); transform: rotate(45deg); opacity: 0.6; }
.strip > a:hover::after, .topics > a:hover::after { opacity: 1; border-color: var(--blue-ink); }
.strip .label { font-size: 0.85rem; color: var(--ink-2); display: block; }
.strip .num { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 2px; }
.strip .delta { font-size: 0.85rem; }
.strip .period { display: block; font-size: 0.8rem; color: var(--ink-2); margin-top: 4px; }
.up, .down, .flat { color: var(--ink-2); }
.good { color: var(--teal); } .bad { color: var(--clay-text); }
@media (max-width: 1000px) { .strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head p { color: var(--ink-2); max-width: 52ch; }

/* ---------- takeaways ---------- */
.takeaways { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(400px, 82vw); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px 2px 20px; margin: 0;
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.rail { list-style: none; margin: 0; }
.rail > li { scroll-snap-align: start; display: grid; }
.rail > li > .card { height: 100%; }
.rail-ctl { display: flex; gap: 6px; }
.rail-ctl button {
  inline-size: 36px; block-size: 36px; border-radius: var(--r-pill); border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.rail-ctl button:hover { border-color: var(--ink-2); }
.rail-ctl button:disabled { opacity: 0.4; cursor: default; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--rule-soft); border-radius: var(--r); padding: 22px 22px 18px;
  box-shadow: var(--shadow); display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; min-height: 300px; color: inherit; text-decoration: none;
}
.card:hover { border-color: var(--rule); }
.card .topic { font-size: 0.85rem; color: var(--ink-2); }
.card .big { position: relative; display: inline-block; font-size: 3.2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
/* annotated slice framing the number */
.card .big::before {
  content: ""; position: absolute; left: -14px; top: -10px; width: 30px; height: 30px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path d='M27 4 A 20 20 0 0 0 4 26' fill='none' stroke='%23B85C44' stroke-width='1.8' stroke-linecap='round' stroke-dasharray='40 6' /></svg>") no-repeat center / contain;
}
html.mode-dark .card .big::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path d='M27 4 A 20 20 0 0 0 4 26' fill='none' stroke='%23DF8064' stroke-width='1.8' stroke-linecap='round' stroke-dasharray='40 6'/></svg>"); }
.card .say { font-size: 1.05rem; line-height: 1.4; text-wrap: pretty; }
.card .sketch { height: 78px; align-self: end; }
.card .sketch svg { width: 100%; height: 100%; overflow: visible; }
.card .src { font-size: 0.8rem; color: var(--ink-2); }
mark { background: var(--ochre-wash); color: inherit; padding: 0 0.15em; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- topic grid (home) ---------- */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
.topics > a, .topics > span.soon { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 20px 28px 20px 8px; position: relative; color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-soft); }
.topics > * > span:first-child { display: block; min-width: 0; }
.topics .t-name, .topics .t-sub { display: block; }
.topics a:hover .t-name { color: var(--blue-ink); }
.topics .t-name { font-weight: 600; font-size: 1.15rem; }
.topics .t-sub { color: var(--ink-2); font-size: 0.9rem; margin-top: 2px; }
.topics .t-mini { width: 92px; height: 34px; }
@media (max-width: 800px) { .topics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .topics { grid-template-columns: 1fr; } }

/* ---------- topic page hero ---------- */
.topic-hero { padding: 40px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 32px; align-items: start; }
.topic-hero .purpose { color: var(--ink-2); font-size: 1.1rem; margin-top: 8px; max-width: 48ch; text-wrap: pretty; }
.topic-hero .illo { width: 200px; height: 150px; justify-self: end; }
.topic-hero .illo svg { width: 100%; height: 100%; overflow: visible; }
@media (max-width: 720px) { .topic-hero { grid-template-columns: 1fr; } .topic-hero .illo { width: 150px; height: 112px; justify-self: start; order: -1; } }

.subnav {
  position: sticky; top: var(--nav-h); z-index: 20; background: color-mix(in srgb, var(--page) 94%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule-soft); margin-top: 24px;
}
.subnav ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: inline-flex; gap: 8px; align-items: baseline; padding: 12px 12px; white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 0.95rem; border-bottom: 2px solid transparent; }
.subnav a .n { color: var(--ink-2); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.subnav a:hover { color: var(--blue-ink); }
.subnav a.is-active { color: var(--blue-ink); border-bottom-color: var(--blue); font-weight: 600; }

.chart-section { padding: 48px 0 24px; border-bottom: 1px solid var(--rule-soft); scroll-margin-top: calc(var(--nav-h) + 52px); }
.chart-section:last-of-type { border-bottom: 0; }
.stat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 18px; }
.stat-row .value { font-size: clamp(2.6rem, 1.6rem + 3vw, 4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.stat-row .value small { font-size: 0.45em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.stat-row .change { margin-top: 6px; font-size: 1rem; }
.stat-row .period { color: var(--ink-2); font-size: 0.9rem; }
.controls { display: flex; flex-wrap: wrap; gap: 6px; }
.ctl-wrap { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.block { scroll-margin-top: calc(var(--nav-h) + 52px); }
.pill, .expand-btn, .about summary, .subnav a { scroll-margin-top: 130px; }
.pill {
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 7px 14px; font: inherit; font-size: 0.9rem; cursor: pointer; line-height: 1.2; min-height: 36px;
}
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--on-accent); }
.pill.sw[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--blue)) 14%, var(--surface)); color: var(--ink); border-color: var(--c, var(--blue)); box-shadow: inset 0 0 0 1px var(--c, var(--blue)); }
.pill.sw[aria-pressed="false"] .dot { opacity: 0.35; }
.pill .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--blue)); margin-right: 6px; vertical-align: -1px; }
.chart { height: 380px; width: 100%; }
.chart.tall { height: 420px; }
@media (max-width: 720px) { .chart, .chart.tall { height: 300px; } .stat-row { grid-template-columns: 1fr; align-items: start; } }
.reading { margin-top: 14px; font-size: 1.02rem; max-width: 70ch; text-wrap: pretty; }
.source { margin-top: 8px; font-size: 0.85rem; color: var(--ink-2); }
.source a { color: inherit; }
details.about { margin-top: 12px; font-size: 0.92rem; }
details.about summary { cursor: pointer; color: var(--blue-ink); width: max-content; min-height: 32px; display: flex; align-items: center; }
details.about summary:hover { text-decoration: underline; }
details.about .body { margin-top: 8px; color: var(--ink-2); max-width: 70ch; }
details.about table { margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
details.about th, details.about td { text-align: left; padding: 4px 14px 4px 0; border-bottom: 1px solid var(--rule-soft); }
details.about th { color: var(--ink-2); font-weight: 600; }

/* ---------- analyst annotation (one per page) ---------- */
.anno { position: absolute; pointer-events: none; font-family: var(--hand); color: var(--clay-text); font-size: 1.35rem; line-height: 1.1; max-width: 200px; transform: rotate(-2deg); }
.anno svg { position: absolute; overflow: visible; }
.chart-wrap { position: relative; }
@media (max-width: 720px) { .anno { font-size: 1.15rem; max-width: 150px; } }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--rule); padding: 32px 0 40px; color: var(--ink-2); font-size: 0.9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.site-footer nav a { margin-right: 18px; }
.site-footer .lab { color: var(--ink-2); }
@media (max-width: 640px) { .site-footer .wrap { grid-template-columns: 1fr; } }


/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .nav a, .pill, .card, .mode-btn { transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease); }
  .draw path.d { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s var(--ease) 0.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- approved mark ---------- */
.art { width: 100%; height: auto; display: block; }
.brand [data-logo] { display: inline-block; width: 34px; height: 34px; }
.brand [data-logo] svg { width: 34px; height: 34px; }
.home-hero .lockup [data-logo] { width: 76px; height: 76px; }
:root { --blue-side: #234A5C; }
html.mode-dark { --blue-side: #4E8299; }

/* ---------- honest states: loading, unavailable, snapshot ---------- */
.state { color: var(--ink-2); font-size: 0.95rem; }
.state.unavail { padding: 14px 16px; background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--r); }
.chart.is-empty { display: grid; place-items: center; min-height: 160px; height: auto; }
[hidden] { display: none !important; }
.skeleton { background: linear-gradient(90deg, var(--rule-soft), var(--surface), var(--rule-soft)); background-size: 200% 100%; border-radius: var(--r); }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } }
.strip > a .num.skeleton { height: 1.7rem; width: 5ch; }
.strip > .unavail { color: var(--ink-2); }
.strip > .unavail .num { font-size: 1rem; font-weight: 500; color: var(--ink-2); }
/* ---------- expand dialog (click-to-expand stays) ---------- */
dialog.expand { overscroll-behavior: contain;  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); padding: 20px; width: min(1100px, 94vw); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.45); }
dialog.expand::backdrop { background: rgba(18, 25, 29, 0.55); }
dialog.expand .head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
dialog.expand .chart { height: min(62vh, 560px); }
dialog.expand .close { border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 6px 12px; cursor: pointer; font: inherit; min-height: 36px; }
dialog.expand .close:hover { border-color: var(--ink-2); background: var(--rule-soft); }
.expand-btn { border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); border-radius: var(--r-pill); padding: 7px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; line-height: 1.2; min-height: 36px; margin-left: 6px; }
.expand-btn.floating { position: absolute; right: 0; top: -34px; padding: 4px 10px; min-height: 32px; margin-left: 0; }
.expand-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.chart-wrap { position: relative; }
/* ---------- section variants ---------- */
.block + .block { margin-top: 36px; padding-top: 28px; border-top: 1px dashed var(--rule-soft); }
.block h3 { font-size: 1.2rem; margin-bottom: 8px; }
.site-footer .lab { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 36px; }
.site-footer .lab:hover { color: var(--ink); text-decoration: underline; }

/* ---------- "More" menu (details/summary: works without JS, keyboard and touch) ---------- */
.nav details.more { position: relative; }
.nav details.more summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: var(--r); font-size: 0.95rem; color: var(--ink); white-space: nowrap; }
.nav details.more summary::-webkit-details-marker { display: none; }
.nav details.more summary::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 0 3px 7px; }
.nav details.more summary:hover, .nav details.more[open] summary { background: var(--rule-soft); }
.nav .more-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 6px; box-shadow: var(--shadow); z-index: 40; }
.nav .more-menu a { display: block; padding: 9px 12px; color: var(--ink); text-decoration: none; border-radius: var(--r); font-size: 0.95rem; }
.nav .more-menu a:hover { background: var(--rule-soft); }
.nav .more-menu a[aria-current="page"] { color: var(--blue-ink); font-weight: 600; }
.nav .more-menu .m-only { display: none; }
@media (max-width: 900px) {
  .nav .more-menu .m-only { display: block; }
  .nav .more-menu { min-width: 220px; }
}

/* ---------- recently updated ---------- */
.recent { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.recent li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 4px; border-bottom: 1px solid var(--rule-soft); }
.recent li a { display: inline-flex; align-items: center; min-height: 36px; }
.recent li span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 32px; }

/* ---------- mark sizing ---------- */
.brand [data-mark] { display: inline-block; width: 30px; height: 30px; }
.brand [data-mark] svg { width: 30px; height: 30px; display: block; }
.home-hero .lockup [data-mark] { width: 84px; height: 84px; flex: none; }
.home-hero .lockup { align-items: center; }
.nav details.more { display: block; }

/* ---------- shared controls for the topic pages (Phase 4) ---------- */
.field { display: inline-flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--ink-2); }
.field select, .field input[type="search"], .field input[type="text"] {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 7px 10px; min-height: 36px; min-width: 9ch;
}
.field select:hover, .field input:hover { border-color: var(--ink-2); }
.picker-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 6px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 5px 10px 5px 12px; font: inherit; font-size: 0.85rem; min-height: 32px; cursor: default; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--blue)); }
.chip button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 1rem; line-height: 1; padding: 2px 4px; cursor: pointer; min-width: 24px; min-height: 24px; border-radius: 50%; }
.chip button:hover { color: var(--clay-text); background: var(--rule-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--ink-2); margin: 8px 0 4px; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--c, var(--blue)); vertical-align: middle; margin-right: 6px; }
.legend i.dashed { background: none; border-top: 2px dashed var(--c, var(--ink-2)); height: 0; }
.note { font-size: 0.85rem; color: var(--ink-2); margin-top: 6px; }
.chart.short { height: 260px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.data-table { border-collapse: collapse; font-variant-numeric: tabular-nums; width: 100%; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.data-table th { color: var(--ink-2); font-weight: 600; }
.data-table td.num, .data-table th.num { text-align: right; }
.prose { max-width: 70ch; }
.prose p + p { margin-top: 12px; }
.prose h2 { margin-top: 40px; margin-bottom: 10px; }
.prose ul { padding-left: 20px; } .prose li { margin: 6px 0; }
