/* Vasconomics Macro Dashboard, Milestone 1. Design system copied from Rhyme (Market Overlay Charts): a black
   masthead, a single 1180px research-desk column, hairline cards, Observable Plot charts. Colours are tokens;
   nothing below the token blocks names a colour. Fonts are self-hosted (no Google request). */

@font-face { font-family: "Newsreader"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/Newsreader-600.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("fonts/PublicSans-400-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/IBMPlexMono-400.woff2") format("woff2"); }

:root {
  --paper: #f5f6f8; --surface: #ffffff; --sunk: #eef0f3; --ink: #141920; --ink-2: #4f5966; --line: #dce0e6;
  --navy: #1f3a5f; --link: #1f5d99; --signal: #c8553d; --signal-text: #a8402a; --good: #1b7a49; --bad: #b3432b;
  --cat-1: #0b6fa8; --cat-2: #a8740a; --cat-3: #b14d86;
  --s1: #8e4c5b; --s2: #c76171; --s3: #3595a4; --s4: #a07ff5; --s5: #336893; --s6: #8231bf; --s7: #a38a45; --s8: #847430; --s9: #ef54af; --s10: #4862ed;
  --amber: #8a5d00; --amber-bg: #fbf2dd; --focus: var(--cat-1);
  --mast: #0b0d10; --mast-ink: #f2f4f7; --mast-ink-2: #9aa3ae; --mast-line: #1d232b; --mast-btn-line: #2a313a;
  --na: #e4e4e4; --heat-min: 7; --heat-max: 74; --shadow-ink: rgba(10, 20, 35, 0.35);
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1180px; --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1116; --surface: #151a21; --sunk: #1b222b; --ink: #e8ecf1; --ink-2: #9ba5b2; --line: #28303a;
    --navy: #9dbbe0; --link: #7fb2e6; --signal: #e3826a; --signal-text: #e3826a; --good: #4cc489; --bad: #ef8a6f;
    --cat-1: #4aa6e0; --cat-2: #e1a83c; --cat-3: #e08abb;
  --s1: #e78d02; --s2: #ca7197; --s3: #efc469; --s4: #c2c5fe; --s5: #33ebb6; --s6: #f44f62; --s7: #997be9; --s8: #75acd2; --s9: #4ad0ba; --s10: #f485fe;
  --amber: #e1a83c; --amber-bg: #2a2314;
    --mast: #05070a; --mast-ink-2: #8d97a3; --na: #2b2b2b; --heat-min: 7; --heat-max: 74; --shadow-ink: rgba(0, 0, 0, 0.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1116; --surface: #151a21; --sunk: #1b222b; --ink: #e8ecf1; --ink-2: #9ba5b2; --line: #28303a;
  --navy: #9dbbe0; --link: #7fb2e6; --signal: #e3826a; --signal-text: #e3826a; --good: #4cc489; --bad: #ef8a6f;
  --cat-1: #4aa6e0; --cat-2: #e1a83c; --cat-3: #e08abb;
  --s1: #e78d02; --s2: #ca7197; --s3: #efc469; --s4: #c2c5fe; --s5: #33ebb6; --s6: #f44f62; --s7: #997be9; --s8: #75acd2; --s9: #4ad0ba; --s10: #f485fe;
  --amber: #e1a83c; --amber-bg: #2a2314;
  --mast: #05070a; --mast-ink-2: #8d97a3; --na: #2b2b2b; --heat-min: 7; --heat-max: 74; --shadow-ink: rgba(0, 0, 0, 0.6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.55; overflow-x: hidden; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 1.9rem; line-height: 1.15; }
h2.h2, h2 { font-size: 1.65rem; line-height: 1.2; }
h2.h2s { font-size: 1.1rem; margin: 0 0 10px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal-text, var(--signal)); }
.muted { color: var(--ink-2); }
.small { font-size: 0.88rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }

.mast { background: var(--mast); color: var(--mast-ink); border-bottom: 1px solid var(--mast-line); }
.mast .wrap { display: flex; align-items: center; justify-content: space-between; gap: 4px 20px; padding-block: 6px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.brand .v { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.01em; }
.brand .t { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mast-ink-2); font-weight: 600; }
.theme-btn { background: none; border: 1px solid var(--mast-btn-line); color: var(--mast-ink-2); border-radius: 4px; padding: 5px 12px; min-height: 44px; min-width: 44px; font: inherit; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.theme-btn:hover { color: var(--mast-ink); }

main { padding-block: 28px 56px; }
.block { margin-bottom: 44px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 10px; }
.asof { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-2); }
.lede { max-width: 70ch; margin-bottom: 14px; }
.note { margin-top: 10px; max-width: 80ch; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.warn { color: var(--amber); background: var(--amber-bg); }
.notice { border-left: 3px solid var(--cat-2); background: var(--sunk); padding: 10px 12px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.88rem; }
.notice.bad { border-left-color: var(--bad); }
#banner { margin-bottom: 20px; }
.warnline { color: var(--amber); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
table.periods th, table.periods td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.periods th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; }
table.periods tbody tr:nth-child(even) td { background: var(--sunk); }
table.periods tr:last-child td { border-bottom: 0; }
.yn { font-weight: 600; }

table.heat { min-width: 820px; border-collapse: separate; border-spacing: 0; }
table.heat thead th { position: sticky; top: 0; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; padding: 10px 6px; text-align: center; background: var(--surface); border-bottom: 1px solid var(--line); }
table.heat tbody th { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; padding: 6px 12px; min-width: 188px; max-width: 220px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 600; }
table.heat thead th:first-child { position: sticky; left: 0; z-index: 3; text-align: left; padding-left: 12px; border-right: 1px solid var(--line); }
table.heat tbody th .tk { display: block; font-family: var(--font-data); font-size: 0.75rem; font-weight: 400; color: var(--ink-2); }
table.heat td { padding: 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--paper); text-align: center; }
table.heat td .cell { display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 62px; padding: 4px 6px; font-family: var(--font-data); font-variant-numeric: tabular-nums; font-size: 0.86rem; color: var(--ink); cursor: default; background: var(--cell-bg, transparent); }
table.heat td .cell.na { background: var(--na); color: var(--ink-2); }
table.heat tr:last-child th, table.heat tr:last-child td { border-bottom: 0; }
/* Volatility table (13 Nov 2026): what each index measures under its name; the Latest column is a level, never tinted */
table.heat tbody th .desc { display: block; font-size: 0.74rem; font-weight: 400; line-height: 1.3; color: var(--ink-2); margin-top: 2px; }
table.heat td .cell.latest { font-weight: 700; border-right: 1px solid var(--line); }
table.yields td .sub { margin-left: 6px; font-family: var(--font-body); font-size: 0.66rem; color: var(--ink-2); }
.stale-dot { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -12px -8px -12px 0; vertical-align: middle; cursor: help; float: right; }
.stale-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }

#tip { position: fixed; z-index: 50; max-width: min(320px, calc(100vw - 24px)); background: var(--mast); color: var(--mast-ink); font-size: 0.82rem; line-height: 1.4; padding: 8px 10px; border-radius: var(--radius); box-shadow: 0 6px 22px var(--shadow-ink); pointer-events: none; }

.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 340px; overflow: hidden; }
.chart svg { display: block; max-width: 100%; height: auto; font-family: var(--font-body); }
/* Plot's hover tooltip fills with --plot-background (white by default): in the dark theme the light ink was unreadable on it
   (found 13 Nov 2026). The surface colour follows the theme. */
.chart svg { --plot-background: var(--surface); }
.legend { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; gap: 6px 22px; flex-wrap: wrap; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; }
.legend i.dash { border-top-style: dashed; }
a.source { display: inline-flex; align-items: center; min-height: 44px; }
#pe-source { margin-top: 6px; }

.foot { border-top: 1px solid var(--line); padding-block: 18px 28px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 4px 28px; justify-content: space-between; }

@media (max-width: 720px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }
  html { font-size: 16px; }
  table.heat tbody th { min-width: 150px; }
}
@media print { .theme-btn { display: none; } .table-wrap { overflow: visible; } }

/* Yield-curve section (milestone 1 design test) */
.yield-table-wrap { margin-top: 12px; }
table.yields { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.yields th, table.yields td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: right; }
table.yields th:first-child, table.yields td:first-child { text-align: left; }
table.yields thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; vertical-align: bottom; }
table.yields thead th .sub { display: block; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 0.72rem; }
table.yields td.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
table.yields td.na { color: var(--ink-2); }
table.yields td sup { font-size: 0.62rem; margin-left: 2px; color: var(--ink-2); font-family: var(--font-body); }
table.yields tbody tr:last-child th, table.yields tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 520px) {
  table.yields { font-size: 0.8rem; }
  table.yields th, table.yields td { padding: 6px 5px; }
  table.yields thead th { font-size: 0.66rem; letter-spacing: 0.03em; }
}

/* Dark theme, strong cells: the tint goes up to 74% (as in the light theme), where the theme's light ink would fall below 4.5:1.
   Text on a heatmap cell is therefore pure white on darker fills and pure black on lighter fills, chosen from the cell's own
   fill by WCAG relative luminance Y (from linear sRGB channels): black when Y > 0.179, the point where white and black give the
   same contrast (4.58:1), so every fill has at least 4.5:1. Browsers without relative colour syntax keep the ink colour. */
@supports (color: color(from red srgb-linear r g b)) {
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) table.heat td .cell:not(.na) {
      color: color(from var(--cell-bg) srgb-linear clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1) clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1) clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1));
    }
  }
  :root[data-theme="dark"] table.heat td .cell:not(.na) {
    color: color(from var(--cell-bg) srgb-linear clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1) clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1) clamp(0, (0.2126 * r + 0.7152 * g + 0.0722 * b - 0.179) * -1000, 1));
  }
}


/* ---- Pages (milestone 2): navigation, page head, selectors, placeholder ---- */
.mast .nav { flex: 1 1 auto; order: 2; min-width: 0; }
.mast .theme-btn { order: 3; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a, .nav .dd > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; color: var(--mast-ink-2); text-decoration: none;
  font: inherit; font-size: 0.9rem; font-weight: 600; background: none; border: 0; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.nav a:hover, .nav .dd > button:hover { color: var(--mast-ink); }
.nav a[aria-current="page"], .nav .dd > button.has-current { color: var(--mast-ink); box-shadow: inset 0 -2px 0 var(--signal); border-radius: 4px 4px 0 0; }
.nav .dd { position: relative; }
.nav .dd > button .chev { transition: transform 0.12s; }
.nav .dd > button[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav .dd ul { list-style: none; margin: 0; padding: 6px; position: absolute; left: 0; top: 100%; z-index: 40; min-width: 230px; background: var(--mast);
  border: 1px solid var(--mast-btn-line); border-radius: var(--radius); box-shadow: 0 10px 28px var(--shadow-ink); }
.nav .dd ul[hidden] { display: none; }
.nav .dd ul a { display: flex; width: 100%; justify-content: flex-start; }
html:not(.js) .nav .dd > button { display: none; }
html:not(.js) .nav .dd ul { position: static; box-shadow: none; border: 0; padding: 0; display: flex; flex-wrap: wrap; }
@media (max-width: 720px) {
  .mast .wrap { padding-block: 4px; }
  .mast .nav { order: 4; flex: 1 1 100%; margin: 0 -8px; }
  .mast .theme-btn { order: 2; }
  .nav a, .nav .dd > button { padding: 0 9px; font-size: 0.86rem; }
  .nav .dd ul { left: 0; min-width: 210px; }
}

.pagehead { margin-bottom: 28px; }
.pagehead .lede { margin: 8px 0 0; }
h2.h2 { font-size: 1.4rem; }
/* On pages with several blocks the sections (Returns, Performance, ...) are h3 under the block's h2: same look as the h2 sections elsewhere, a step smaller. */
h3.h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0; }
h3.h3s { font-size: 0.95rem; font-weight: 700; margin: 18px 0 8px; font-family: var(--font-body); }
.ctl { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.ctl .asof { margin: 0; }
select { font: inherit; font-size: 0.9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; min-height: 44px; padding: 0 30px 0 12px; max-width: 100%; }
select[hidden] { display: none; }
.placeholder { display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; border: 1.5px dashed var(--ink-2); border-radius: var(--radius); background: var(--sunk); color: var(--ink-2); }
.placeholder strong { color: var(--ink); font-size: 0.95rem; }

table.periods td:nth-child(2) { white-space: normal; min-width: 200px; max-width: 300px; }

/* ---- Round B: rebased chart, indicator chart, Home text ---- */
.chartblock { margin-top: 18px; }
.chartblock > h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.chartblock .head { margin-bottom: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--surface); }
.seg[hidden] { display: none; }   /* P/E block without data: no period buttons (13 Nov 2026) */
.seg button { font: inherit; font-size: 0.85rem; color: var(--ink-2); background: transparent; border: 0; border-right: 1px solid var(--line); min-height: 44px; min-width: 44px; padding: 0 12px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked="true"] { background: var(--navy); color: var(--surface); font-weight: 600; }
.seg button:focus-visible, .legend button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.legend.toggle button { font: inherit; font-size: 0.85rem; color: var(--ink); background: transparent; border: 0; padding: 4px 6px; min-height: 32px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border-radius: 4px; }
.legend.toggle button[aria-pressed="false"] { color: var(--ink-2); text-decoration: line-through; opacity: 0.8; }
.legend.toggle button[aria-pressed="false"] i { opacity: 0.35; }
@media (pointer: coarse) { .legend.toggle button { min-height: 44px; } }
.legend i.dot { border-top-style: dotted; }
.chart.tall { min-height: 360px; }
.chart.rsi { min-height: 190px; margin-top: 8px; }
.chart.price { min-height: 300px; }
.chartblock .note { margin: 8px 0 0; }
.intro .notice ul { margin: 6px 0 0 18px; padding: 0; }
.intro .notice li + li { margin-top: 4px; }
.intro h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 18px 0 6px; }
.pagelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px 28px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pagelist li { font-size: 0.92rem; }
.pagelist a { font-weight: 600; }
.indblock { margin-top: 30px; }
.intro p.small { margin: 0 0 10px; max-width: 78ch; }

/* ---- Round C ---- */
.legend.toggle button svg.sw { flex: none; }
.chart.dimming g[aria-label="line"]:not(.hot) { opacity: 0.16; }
.chart.dimming g[aria-label="line"].hot path { stroke-width: 2.6; }

/* Buttons, skip link, focus */
.btn { font: inherit; font-size: 0.85rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; min-height: 44px; min-width: 44px; padding: 0 14px; cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.series-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.series-ctl .btn { min-height: 36px; padding: 0 12px; font-size: 0.8rem; }
.actions { margin-top: 10px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); color: var(--ink); border: 2px solid var(--focus); border-radius: 4px; padding: 10px 14px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table-wrap:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Blocks of a page: each holds Returns, Performance, Indicators and Valuation */
.pblock { margin-bottom: 54px; }
.pblock + .pblock { border-top: 1px solid var(--line); padding-top: 34px; }
h2.blockhead { font-size: 2rem; margin: 0 0 22px; }
.sub { margin: 0 0 10px; max-width: 80ch; }
.source { margin: 8px 0 0; color: var(--ink-2); }
.png-msg { color: var(--ink-2); }
.png-msg.bad { color: var(--bad-text, var(--bad)); }
td.fname { min-width: 22ch; }
.foot a { color: var(--link); }
.print-head { display: none; }

/* Phone: a Menu button replaces the row of links; the Equities group opens inside the list */
.menu-btn { display: none; }
@media (max-width: 720px) {
  .mast .wrap { flex-wrap: wrap; }
  .js .menu-btn { display: inline-flex; align-items: center; background: none; border: 1px solid var(--mast-btn-line); color: var(--mast-ink); border-radius: 4px; padding: 5px 14px; min-height: 44px; min-width: 44px; font: inherit; font-size: 0.9rem; cursor: pointer; order: 1; margin-left: auto; margin-right: 8px; }
  .js .menu-btn[hidden] { display: inline-flex; }
  .js .mast .theme-btn { order: 2; }
  .js .mast .nav { order: 4; flex: 1 1 100%; margin: 0; display: none; border-top: 1px solid var(--mast-line); padding-bottom: 6px; }
  .js .mast.open .nav { display: block; }
  .js .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav a, .js .nav .dd > button { justify-content: flex-start; width: 100%; padding: 0 12px; min-height: 48px; }
  .js .nav .dd > button .chev { margin-left: auto; }
  .js .nav .dd ul { position: static; box-shadow: none; border: 0; border-left: 2px solid var(--mast-btn-line); border-radius: 0; margin: 0 0 4px 12px; padding: 0 0 0 4px; min-width: 0; background: transparent; }
  .js .nav a[aria-current="page"], .js .nav .dd > button.has-current { box-shadow: inset 3px 0 0 var(--signal); border-radius: 0; }
  .ctl { width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 0; min-width: 40px; padding: 0 4px; }
  .ctl select { flex: 1 1 140px; }
  .head .asof { width: 100%; }
  .toc a { padding: 0 8px; }
  table.heat tbody th { min-width: 132px; max-width: 150px; }
  table.heat { min-width: 760px; }
}

/* Print: A4, light theme (set by print.js), no controls, charts redrawn at the printed width */
@page { size: A4; margin: 14mm; }
@media print {
  html { font-size: 12.5px; }
  body { background: #fff; color: #000; overflow: visible; }
  .mast, .skip, .foot .small.muted, #tip, #banner[hidden], .actions, .toc, .btn, .ctl, select, .seg, .menu-btn, .theme-btn, #themeBtn, .placeholder, .series-ctl, .stale-dot::before { display: none !important; }
  .print-head { display: block; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 14px; break-after: avoid; }
  .ph-brand { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #4f5966; }
  .ph-title { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; font-weight: 600; margin: 2px 0 4px; }
  .ph-meta { display: flex; flex-direction: column; gap: 1px; font-size: 0.8rem; color: #4f5966; }
  .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  main { padding-block: 0; }
  .block { margin-bottom: 20px; }
  h1, h2, h3, .eyebrow, .head { break-after: avoid; }
  .pagehead { display: none; }
  .pagehead .lede { display: none; }
  .chart, .chartblock .note, .notice, .table-wrap, .intro { break-inside: avoid; }
  .chart { border: 0; padding: 0; min-height: 0; overflow: visible; }
  .chart svg { max-width: 100%; }
  .table-wrap { overflow: visible; border: 0; }
  table.heat { min-width: 0; width: 100%; table-layout: fixed; font-size: 0.75rem; }
  table.heat thead th { position: static; padding: 4px 1px; font-size: 0.62rem; letter-spacing: 0; }
  table.heat tbody th { position: static; min-width: 0; max-width: none; width: 24%; padding: 3px 5px; }
  table.heat td .cell { min-height: 0; min-width: 0; padding: 3px 1px; font-size: 0.72rem; }
  table.heat tr, table.periods tr, table.yields tr { break-inside: avoid; }
  table.periods th, table.periods td { padding: 3px 6px; font-size: 0.72rem; white-space: normal; }
  .legend.toggle button { display: inline-flex !important; border: 0; padding: 0 4px; min-height: 0; }
  .legend.toggle button[aria-pressed="false"] { display: none !important; }
  .legend { margin: 2px 0 6px; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; transition: none !important; }
}
