/* Slate & Plum presentation mode for the web: each study reads as a living deck.
   Values follow ~/.claude/skills/slate-plum/slides/deck-template.html and the --deck-* tokens. */
@font-face { font-family: Archivo; src: url(fonts/archivo.woff2) format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(fonts/plex-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(fonts/plex-mono.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: var(--deck-bg); --bg-2: var(--deck-bg-alt); --card: var(--deck-card); --card-2: var(--deck-card-alt);
  --ink: var(--deck-ink); --lilac: var(--deck-lilac); --lilac-2: var(--deck-lilac-2); --hi: var(--deck-highlight);
  --bar: var(--deck-bar); --rule: var(--deck-rule); --pos: var(--deck-pos); --neg: var(--deck-neg);
  --old: #67406A;                 /* oldest period bar, as in the deck */
  --display: var(--deck-font-display); --text: var(--deck-font-text); --label: var(--deck-font-label);
  --gutter: clamp(16px, 5vw, 72px); --head-h: 68px; --logo-min: 36px; --logo-max: clamp(72px, 9vw, 156px); --head-max: calc(var(--logo-max) + 56px);
  /* Map ramp on aubergine: light (low) to plum (high), as on the deck covers. */
  --m0: #F3E8F3; --m1: #E0C8E1; --m2: #CBA8CD; --m3: #B288B5; --m4: #986A9C; --m5: #7F4F84; --m6: #66356B;
  --m-none: #6F6872;
  /* Signed change on aubergine: magnitude grows away from the background. */
  --c0: #FF8A80; --c1: #C96E6C; --c2: #8F5462; --c3: #574058; --c4: #4B6D68; --c5: #65A28F; --c6: #7FD3B6;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 8px); -webkit-text-size-adjust: 100%; }
body.deck-page { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.deck-page) :where(p, h1, h2, h3, figure, ol) { margin: 0; }
.deck-page a { color: inherit; }
.deck-page :focus-visible { outline: 3px solid var(--focus-ring-on-dark); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.o { color: var(--hi); }

/* ---------- header ---------- */
/* The header opens tall with a big logo and no rule. As the reader scrolls, studies.js / analysis.js
   set --k from 0 to 1: the logo and bar shrink to their compact size, then the rule and backdrop return. */
body.deck-page { padding-top: var(--head-max); }
.deck-head { --k: 0; position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: rgba(46, 23, 48, calc(.94 * var(--k))); border-bottom: 1px solid transparent; transition: border-color .25s; }
.deck-head.settled { border-bottom-color: rgba(106, 68, 102, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.head-inner { height: calc(var(--head-max) - (var(--head-max) - var(--head-h)) * var(--k)); max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; flex-shrink: 0; }
.brand img { height: calc(var(--logo-max) - (var(--logo-max) - var(--logo-min)) * var(--k)); width: auto; display: block; }
.head-kick { flex: 1; display: flex; justify-content: center; gap: 22px; font: 500 12px var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--lilac); white-space: nowrap; overflow: hidden; }
.head-n { color: var(--ink); letter-spacing: .16em; min-width: 6ch; }
.deck-head nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.deck-head nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--lilac); padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; }
.deck-head nav a:hover { color: var(--ink); }
.deck-head nav a.pdf { color: var(--ink); border-color: var(--rule); }
.deck-head nav a.pdf:hover { border-color: var(--lilac-2); }
.progress { height: 2px; background: transparent; opacity: var(--k); }
.progress i { display: block; height: 100%; width: 100%; background: var(--hi); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* ---------- slides ---------- */
.slide { background: var(--bg); padding: clamp(64px, 9vw, 128px) 0; scroll-margin-top: var(--head-h); }
.slide.alt { background: var(--bg-2); }
.slide.alt .card { background: var(--card-2); }
.inner { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.kick { display: flex; justify-content: space-between; gap: 24px; font: 500 13px var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--lilac); margin-bottom: clamp(32px, 4vw, 56px); }
.kick .n { letter-spacing: .2em; white-space: nowrap; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(38px, 4.3vw, 68px); }
.eyebrow { font: 500 14px var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--hi); margin-bottom: 22px; }
.sub { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.42; color: var(--lilac); margin-top: 26px; max-width: 46ch; }
.note { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.38; font-weight: 600; margin-top: 22px; }
.src { font-size: 15px; line-height: 1.5; color: var(--lilac); margin-top: clamp(40px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--rule); }
.src a { color: var(--ink); text-underline-offset: 3px; }

.split { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
.r > * { min-width: 0; }
@media (min-width: 1080px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(56px, 6vw, 104px); align-items: start; }
  .split > .l { position: sticky; top: calc(var(--head-h) + 48px); }
  .solo .split { grid-template-columns: minmax(0, 1fr); max-width: 1040px; }
  .solo .split > .l { position: static; }
}
.solo h2 { font-size: clamp(42px, 5.6vw, 92px); }
.solo .sub { max-width: 52ch; margin-top: 34px; }
.r { min-width: 0; display: grid; gap: 40px; }

/* ---------- cover ---------- */
.cover { padding-top: clamp(48px, 6vw, 96px); background: var(--bg); }
.cover-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1080px) { .cover-grid { grid-template-columns: minmax(0, 4.3fr) minmax(0, 6fr); gap: clamp(40px, 4.5vw, 80px); } }
.cover h1 { font-size: clamp(48px, 5.6vw, 96px); line-height: .98; }
.cover h1 .o { display: block; }
.cover-logo { display: block; height: clamp(64px, 7vw, 108px); width: auto; margin-bottom: clamp(32px, 4vw, 56px); }
/* Cover art: the headline number as the deck's column bars. */
.cover-art .cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: clamp(20px, 3vw, 48px); align-items: end; height: clamp(300px, 34vw, 480px); border-bottom: 2px solid var(--rule); }
.col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.col-v { font: 800 clamp(30px, 3.4vw, 52px)/1 var(--display); letter-spacing: -.04em; text-align: center; margin-bottom: 14px !important; color: var(--lilac); font-variant-numeric: tabular-nums; }
.col-bar { display: block; height: var(--h); background: var(--bar); border-radius: 8px 8px 0 0; transition: height 1.1s cubic-bezier(.2, .7, .2, 1); }
.col.hl .col-bar { background: var(--hi); }
.col.hl .col-v { color: var(--hi); font-size: clamp(40px, 4.6vw, 72px); }
.col-y { font-weight: 700; font-size: 20px; text-align: center; padding-top: 12px; position: relative; top: 46px; margin-top: -32px !important; }
html.js .cover-art:not(.seen) .col-bar { height: 0; }
.cover-art figcaption { margin-top: 64px; }
.cover-change { font: 800 22px var(--display); letter-spacing: -.02em; }
.cover-art figcaption p:last-child { font-size: 15px; color: var(--lilac); margin-top: 4px !important; }
.cover-sub { font-size: clamp(21px, 2vw, 30px); line-height: 1.32; font-weight: 500; margin-top: 32px; max-width: 30ch; }
.key { display: flex; align-items: center; gap: 22px; margin-top: 40px; padding: 22px 0; border-block: 1px solid var(--rule); }
.key-v { font: 800 clamp(56px, 6vw, 84px)/1 var(--display); letter-spacing: -.05em; color: var(--hi); font-variant-numeric: tabular-nums; }
.key-l { font-size: 17px; font-weight: 600; line-height: 1.35; }
.key-c { font-size: 15px; color: var(--lilac); margin-top: 4px; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 8px; background: var(--ink); color: var(--bg) !important; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid var(--ink); }
.btn:hover { background: var(--lilac); border-color: var(--lilac); }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--lilac-2); background: rgba(214, 179, 226, .08); }
.byline { font-size: 15px; color: var(--lilac); margin-top: 28px; }
.byline b { color: var(--ink); font-weight: 600; }
.cover-kpis .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .cover-kpis .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .cover-kpis .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- map ---------- */
.cover-map svg { width: 100%; height: auto; display: block; overflow: visible; }
.state { stroke: var(--bg); stroke-width: .7; stroke-linejoin: round; transition: opacity .2s, stroke .15s; cursor: pointer; }
.m0 { fill: var(--m0); background: var(--m0); } .m1 { fill: var(--m1); background: var(--m1); } .m2 { fill: var(--m2); background: var(--m2); }
.m3 { fill: var(--m3); background: var(--m3); } .m4 { fill: var(--m4); background: var(--m4); } .m5 { fill: var(--m5); background: var(--m5); } .m6 { fill: var(--m6); background: var(--m6); }
.c0 { fill: var(--c0); background: var(--c0); } .c1 { fill: var(--c1); background: var(--c1); } .c2 { fill: var(--c2); background: var(--c2); }
.c3 { fill: var(--c3); background: var(--c3); } .c4 { fill: var(--c4); background: var(--c4); } .c5 { fill: var(--c5); background: var(--c5); } .c6 { fill: var(--c6); background: var(--c6); }
.state.none { fill: var(--m-none); }
svg:hover .state:not(:hover):not(.selected) { opacity: .72; }
.state:hover { stroke: var(--ink); stroke-width: 1.4; }
.state.selected { stroke: var(--hi); stroke-width: 2.6; opacity: 1; }
.cover-map figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-top: 20px; }
.map-key p { font-size: 15px; color: var(--lilac); }
.ramp { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; font: 500 13px var(--label); color: var(--lilac); white-space: nowrap; }
.ramp-bands { display: flex; gap: 3px; }
.ramp-bands i { width: clamp(22px, 3vw, 38px); height: 14px; border-radius: 2px; }
.map-none { display: flex; align-items: center; gap: 8px; font-size: 13px !important; }
.map-none i { width: 14px; height: 14px; border-radius: 2px; background: var(--m-none); }
.readout { min-width: 210px; text-align: right; }
.readout-k { font: 500 12px var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--lilac); }
.readout-name { font-size: 19px; font-weight: 600; margin-top: 6px; }
.readout-v { font: 800 44px/1.05 var(--display); letter-spacing: -.04em; color: var(--hi); }
.readout-rank { font-size: 14px; color: var(--lilac); margin-top: 4px; }

/* ---------- legend + controls ---------- */
.exhibit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; margin-bottom: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 16px; font-weight: 600; color: var(--lilac); }
.legend span { display: inline-flex; align-items: center; gap: 9px; }
.legend i { width: 13px; height: 13px; border-radius: 50%; display: block; }
.legend .metric { font-weight: 400; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: var(--radius-button); gap: 2px; }
.seg[hidden] { display: none; }
.seg button { font: 600 13px var(--text); color: var(--lilac); background: transparent; border: 0; border-radius: var(--radius-control); padding: 7px 12px; min-height: 34px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: rgba(214, 179, 226, .18); color: var(--ink); }
.seg button:focus-visible { outline-offset: 0; }

/* ---------- bars ---------- */
.s-old { background: var(--old); --lab: var(--lilac-2); }
.s-prior { background: var(--bar); --lab: var(--lilac); }
.s-now { background: var(--hi); --lab: var(--hi); }
.bars { border-bottom: 1px solid var(--rule); }
.bar-row { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px 8px 16px 0; border-top: 1px solid var(--rule); position: relative; transition: background .15s; }
.bar-row:hover, .bar-row:focus-visible { background: rgba(214, 179, 226, .06); }
.bar-row:focus-visible { outline-offset: -3px; }
.bar-name { font-size: clamp(17px, 1.4vw, 21px); font-weight: 600; line-height: 1.2; padding-left: 8px; }
.bar-name small { display: block; font-size: 14px; font-weight: 400; color: var(--lilac); margin-top: 3px; }
.bar-track { padding-right: 84px; display: grid; gap: 5px; }
.bar { height: 17px; width: var(--w); min-width: 2px; border-radius: 3px; position: relative; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.bar b { position: absolute; left: calc(100% + 9px); top: 50%; transform: translateY(-50%); font: 800 18px var(--display); letter-spacing: -.02em; color: var(--lab); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar.none { width: 0; min-width: 0; }
.bar.none b { left: 0; font: 500 13px var(--text); color: var(--lilac-2); }
.bars[data-rows="1"] .bar { height: 22px; }
.scale { font-size: 14px; color: var(--lilac-2); margin-top: 14px; }
html.js .exhibit:not(.seen) .bar { width: 0; }
html.js .exhibit:not(.seen) .bar b { opacity: 0; }
.bar b { transition: opacity .4s .5s; }
.data-pane { margin-top: 28px; }
html.js .data-pane { display: none; margin-top: 0; }
html.js .exhibit.show-table .data-pane { display: block; }
html.js .exhibit.show-table [data-pane="chart"], html.js .exhibit.show-table .scale { display: none; }

/* ---------- stacked ---------- */
.k-focus { background: var(--hi); color: var(--bg); }
.k-second { background: var(--lilac); color: var(--bg); }
.k-third { background: var(--bar); color: var(--ink); }
.k-rest { background: var(--old); color: var(--ink); }
.stack-group { font-size: 20px; font-weight: 600; padding: 22px 0 12px; border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
.stack-group:first-child { padding-top: 0; }
.stack-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; padding: 5px 0; border-radius: 6px; }
.stack-year { font-size: 18px; font-weight: 600; color: var(--lilac); }
.stack-track { display: flex; align-items: center; min-width: 0; padding-right: 110px; position: relative; }
.stack-seg { height: 46px; width: var(--w); display: flex; align-items: center; justify-content: center; font: 800 17px var(--display); letter-spacing: -.02em; transition: width .9s cubic-bezier(.2, .7, .2, 1), filter .15s; overflow: hidden; }
.stack-seg:first-child { border-radius: 5px 0 0 5px; } .stack-seg:last-of-type { border-radius: 0 5px 5px 0; }
.stack-seg:hover { filter: brightness(1.12); }
.stack-total { margin-left: 14px; line-height: 1.15; white-space: nowrap; }
.stack-total b { display: block; font: 800 22px var(--display); letter-spacing: -.02em; }
.stack-total small { font-size: 14px; font-weight: 600; color: var(--hi); }
html.js .exhibit:not(.seen) .stack-seg { width: 0 !important; }

/* ---------- cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.card { background: var(--card); border-radius: 12px; padding: 22px 22px 20px; }
.lbl { font-size: 16px; line-height: 1.3; color: var(--lilac); min-height: 2.6em; }
.big { font: 800 clamp(38px, 3.6vw, 54px)/1.05 var(--display); letter-spacing: -.04em; margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.cards:not(.has-focal) .card:first-child .big, .cards .card.focal .big { color: var(--hi); }
.from { font-size: 15px; color: var(--lilac); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; position: relative; }
.stack-seg b.clip { visibility: hidden; }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.t th[scope="col"] { font: 500 12px var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); text-align: right; padding: 0 0 12px 14px; vertical-align: bottom; }
table.t th[scope="col"]:first-child { text-align: left; padding-left: 0; }
.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; min-height: 28px; }
.sort i { width: 9px; height: 9px; display: inline-block; opacity: .35; }
.sort i::before { content: "↕"; font-style: normal; font-size: 11px; }
th[aria-sort="descending"] .sort i::before { content: "↓"; }
th[aria-sort="ascending"] .sort i::before { content: "↑"; }
th[aria-sort] .sort { color: var(--ink); } th[aria-sort] .sort i { opacity: 1; }
.sort:focus-visible { outline: 3px solid var(--focus-ring-on-dark); outline-offset: 2px; }
table.t td, table.t tbody th { font-size: clamp(16px, 1.35vw, 20px); padding: 13px 0 13px 14px; border-top: 1px solid var(--rule); text-align: right; font-weight: 500; white-space: nowrap; }
table.t tbody th { text-align: left; font-weight: 600; padding-left: 0; white-space: normal; }
table.t tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
table.t tbody tr:hover > * { background: rgba(214, 179, 226, .06); }
table.t td.y, table.t .now { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; color: var(--hi); }
table.t td.muted, table.t .was { color: var(--lilac); }
table.t td.d { color: var(--lilac); }
table.t .arrow { color: var(--lilac-2); }
table.t td:last-child:not(.y):not(.pair):not(.d) { white-space: normal; min-width: 12ch; }
.table-only { margin-top: 0; }

/* ---------- methods / so what ---------- */
.methods { display: grid; gap: 0 40px; }
@media (min-width: 760px) { .methods { grid-template-columns: 1fr 1fr; } }
.m { padding: 16px 0; border-top: 1px solid var(--rule); }
.k { font: 500 13px var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--hi); margin-bottom: 6px; }
.v { font-size: 17px; line-height: 1.5; }
.sowhat { padding-block: clamp(88px, 12vw, 176px); }

/* ---------- every state ranked ---------- */
.head-row { display: grid; gap: 28px; align-items: end; margin-bottom: 28px; }
@media (min-width: 1080px) { .head-row { grid-template-columns: minmax(0, 1fr) auto; } }
.states h2 { font-size: clamp(38px, 4.3vw, 68px); }
.states .sub { max-width: 60ch; }
.state-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.search { display: grid; gap: 6px; font-size: 13px; color: var(--lilac); }
.search input { font: 500 16px var(--text); color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-button); padding: 10px 12px; min-height: 42px; width: 240px; }
.search input::placeholder { color: var(--lilac-2); }
.search input:focus-visible { outline: none; border-color: var(--focus-ring-on-dark); box-shadow: inset 0 0 0 1px var(--focus-ring-on-dark); }
.result-count { font-size: 14px; color: var(--lilac-2); margin-bottom: 14px; }
.state-list { list-style: none; padding: 0; columns: 1; column-gap: 40px; }
@media (min-width: 720px) { .state-list { columns: 2; } }
@media (min-width: 1180px) { .state-list { columns: 3; } }
.state-list li { break-inside: avoid; border-top: 1px solid var(--rule); }
.state-list button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(44px, 28%) 60px; gap: 10px; align-items: center; padding: 9px 6px; cursor: pointer; border-radius: 4px; }
.state-list button:hover { background: rgba(214, 179, 226, .07); }
.state-list button:focus-visible { outline: 3px solid var(--focus-ring-on-dark); outline-offset: -3px; }
.state-list button[aria-pressed="true"] { background: var(--card-2); }
.state-list button[aria-pressed="true"] .nm, .state-list button[aria-pressed="true"] .vl { color: var(--hi); }
.rk { font: 500 12px var(--label); color: var(--lilac-2); }
.nm { font-size: 15px; font-weight: 600; line-height: 1.2; }
.tr { height: 8px; background: rgba(214, 179, 226, .08); border-radius: 2px; overflow: hidden; }
.fill { display: block; height: 100%; width: var(--w); background: var(--bar); border-radius: 2px; }
.fill.neg { background: var(--neg); }
.states[data-unit="change"] .fill:not(.neg) { background: var(--pos); }
button[aria-pressed="true"] .fill { background: var(--hi); }
.vl { font: 800 16px var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--lilac); padding: 16px 0; }

/* ---------- tooltip ---------- */
.tip { position: fixed; z-index: 40; max-width: 300px; background: var(--card-2); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; box-shadow: 0 18px 40px rgba(12, 4, 14, .5); pointer-events: none; display: grid; gap: 3px; }
.tip[hidden] { display: none; }
.tip strong { font-size: 16px; }
.tip span { font-size: 14px; color: var(--lilac); }
.tip em { font-style: normal; font: 800 15px var(--display); }
.tip em:empty { display: none; }
.tip em.up { color: var(--pos); } .tip em.down { color: var(--neg); } .tip em.flat { color: var(--lilac); }
.tip small { font-size: 12px; color: var(--lilac-2); }

/* ---------- slide rail ---------- */
.rail { display: none; }
@media (min-width: 1360px) {
  .rail { display: block; position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 20; }
  .rail ol { list-style: none; padding: 0; display: grid; gap: 4px; }
  .rail a { display: flex; align-items: center; justify-content: flex-end; width: 22px; height: 18px; position: relative; text-decoration: none; }
  .rail a::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lilac-2); opacity: .45; transition: all .2s; }
  .rail a:hover::after { opacity: 1; }
  .rail a[aria-current="true"]::after { background: var(--hi); opacity: 1; width: 9px; height: 9px; }
  .rail span { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--card-2); border: 1px solid var(--rule); color: var(--ink); font-size: 13px; padding: 5px 10px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
  .rail a:hover span, .rail a:focus-visible span { opacity: 1; }
}

/* ---------- footer ---------- */
.deck-foot { background: var(--bg); border-top: 1px solid var(--rule); padding: 0 var(--gutter) 56px; }
.series { max-width: 1440px; margin: 0 auto; display: grid; gap: 1px; background: var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .series { grid-template-columns: 1fr 1fr; } }
.series > * { background: var(--bg); }
.series-link { display: grid; gap: 6px; padding: 36px 0; text-decoration: none; }
.series-link:last-child:nth-child(2) { text-align: right; }
@media (min-width: 760px) { .series-link:first-child { padding-right: 32px; } .series-link:last-child { padding-left: 32px; } }
.series-link .k { font: 500 12px var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--hi); }
.series-link b { font: 800 clamp(22px, 2.2vw, 32px)/1.12 var(--display); letter-spacing: -.03em; }
.series-link .s { font-size: 14px; color: var(--lilac); }
.series-link:hover b { color: var(--lilac); }
.foot-row { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 40px; flex-wrap: wrap; }
.who { font: 700 24px var(--display); letter-spacing: -.01em; }
.ct { font-size: 17px; color: var(--lilac); margin-top: 6px !important; }
.ct a, .cr a { color: inherit; text-underline-offset: 3px; }
.cr { font: 500 13px var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--lilac); margin-top: 14px !important; }
.foot-logo img { height: 44px; width: auto; display: block; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  :root { --head-h: 58px; --logo-min: 30px; --logo-max: clamp(46px, 14vw, 60px); --head-max: calc(var(--logo-max) + 32px); }
  .head-kick { display: none; }
  .hide-s { display: none; }
  .deck-head nav a { padding: 8px 9px; font-size: 13px; }
  .head-inner { justify-content: space-between; gap: 12px; }
  .head-inner .brand img { max-width: 52vw; object-fit: contain; object-position: left; }
  .kick { font-size: 11px; letter-spacing: .18em; }
  .bar-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 0; }
  .bar-name { padding-left: 0; }
  .bar-track { padding-right: 70px; }
  .cover-map figcaption { grid-template-columns: minmax(0, 1fr); }
  .readout { text-align: left; }
  .stack-row { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .stack-track { padding-right: 86px; }
  .stack-seg { height: 38px; font-size: 14px; }
  .stack-total b { font-size: 18px; } .stack-total small { font-size: 12px; }
  .search input { width: 100%; }
  .state-tools, .search { width: 100%; }
  .key { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 16px; }
  .big { font-size: 34px; }
  .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar, .stack-seg, .bar b, .state, .progress i, .col-bar { transition: none !important; }
}

/* ---------- explore: the live map beside the ranked list ---------- */
.explore { display: grid; gap: 32px; }
@media (min-width: 1080px) {
  .explore { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
  .explore-map { position: sticky; top: calc(var(--head-h) + 32px); }
  .explore .state-list { columns: 2; }
}
.explore-map .cover-map figcaption { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.explore-map .readout { text-align: left; }
.deck-foot address.ct { font-style: normal; margin-top: 2px !important; }
/* Very narrow phones: the logo links home, so only the primary header action stays. */
@media (max-width: 400px) { .deck-head nav a:not(.pdf) { display: none; } }
.ct a, .cr a { display: inline-block; padding: 4px 0; }

/* ---------- wide stacked bars: one labeled row per carrier or state (sortable) ---------- */
.stacked.wide .stack-row { grid-template-columns: minmax(120px, 28%) minmax(0, 1fr); padding: 7px 0; border-top: 1px solid var(--rule); border-radius: 0; }
.stacked.wide .stack-row:last-child { border-bottom: 1px solid var(--rule); }
.stacked.wide .stack-year { color: var(--ink); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.2; }
.stacked.wide .stack-seg { height: 38px; }
.stacked.wide .stack-track { padding-right: 150px; }
.stacked.wide .stack-total small { display: block; }
@media (max-width: 760px) {
  .stacked.wide .stack-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stacked.wide .stack-track { padding-right: 112px; }
}
/* Long tables (every carrier, every state) scroll inside the slide with a fixed header. */
.data-pane.tall .table-scroll { max-height: 560px; overflow-y: auto; }
.data-pane.tall thead th { position: sticky; top: 0; background: var(--bg-2); z-index: 1; }
.slide:not(.alt) .data-pane.tall thead th { background: var(--bg); }

/* ---------- people grid cover: one figure per 100K members ---------- */
.people svg { width: 100%; height: auto; display: block; }
.fig { fill: var(--lilac); fill-opacity: .55; transform-box: fill-box; transform-origin: center bottom; transition: opacity .5s, transform .5s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i) * 22ms); }
.fig.focal { fill: var(--hi); fill-opacity: 1; }
html.js .people:not(.seen) .fig { opacity: 0; transform: translateY(14px); }
.people figcaption { margin-top: 22px; }
.people-key { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: clamp(18px, 1.6vw, 24px); color: var(--lilac); margin-bottom: 6px !important; }
.people-key span { display: inline-flex; align-items: center; gap: 10px; }
.people-key i { width: 18px; height: 18px; border-radius: 3px; background: var(--lilac); opacity: .55; }
.people-key b { font: 800 1.15em var(--display); letter-spacing: -.02em; color: var(--lilac); }
.people-key .focal i { background: var(--hi); opacity: 1; }
.people-key .focal b { color: var(--hi); }
.people figcaption > p:last-child { font-size: 15px; color: var(--lilac); }
@media (prefers-reduced-motion: reduce) { .fig { transition: none; } }
.agent { margin-top: 28px !important; padding: 16px 20px; border: 1px solid var(--hi); border-radius: 10px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; color: var(--lilac); max-width: 52ch; }
.agent b { color: var(--hi); font-weight: 700; }
/* Segmented controls wrap inside their box rather than overflow narrow screens. */
.controls { max-width: 100%; }
.seg { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 760px) { table.t td:last-child { white-space: normal; min-width: 9ch; } }

/* ---------- share preview (og:image) mode: ?og renders the cover as a 1200x630 card ---------- */
html.og, html.og body { width: 1200px; height: 630px; overflow: hidden; }
html.og body.deck-page { padding-top: 0; }
html.og .deck-head { position: static; background: none; border: 0; backdrop-filter: none; }
html.og .head-inner { height: auto; max-width: none; padding: 40px 64px 0; }
html.og .brand img { height: 50px; }
html.og .deck-head nav, html.og .head-kick, html.og .progress, html.og .rail, html.og .deck-foot, html.og .skip,
html.og main > :not(:first-child) { display: none; }
html.og main > .slide:first-child { padding: 22px 0 0; }
html.og main > .slide:first-child > .inner { max-width: none; padding: 0 64px; }
html.og .kick { font-size: 13px; margin-bottom: 18px; }
html.og .kick .n { display: none; }
html.og .cover-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: center; }
html.og .cover h1 { font-size: 60px; }
html.og .cover-sub { font-size: 21px; margin-top: 18px; }
html.og .cover-actions, html.og .byline, html.og .cover > .inner > .src { display: none; }
html.og .cover-art .cols { height: 300px; }
html.og .cover-art figcaption { margin-top: 48px; }
html.og .people figcaption > p:last-child { display: none; }
html.og *, html.og *::before, html.og *::after { transition: none !important; animation: none !important; }

/* ---------- deck cover art (the deck's own SVG): words fade in, then the stamp lands ---------- */
.deck-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.deck-art text { transition: opacity .9s ease; }
.deck-art .stamp { transform-box: fill-box; transform-origin: center; transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) .9s, opacity .2s linear .9s; }
html.js .deck-art:not(.seen) text { opacity: 0; }
html.js .deck-art:not(.seen) .stamp { opacity: 0; transform: scale(1.5); }
@media (prefers-reduced-motion: reduce) { .deck-art text, .deck-art .stamp { transition: none; } }

/* ---------- per-state carrier drilldown (beside the ranked list) ---------- */
.cp-hint { font-size: 15px; color: var(--lilac); margin-top: 18px !important; max-width: 40ch; }
.carrier-panel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--head-h) + 16px); }
.cp-k { font: 500 12px var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--lilac); }
.carrier-panel h3 { font: 800 28px/1.1 var(--display); letter-spacing: -.03em; margin-top: 4px; }
.cp-sum { font-size: 15px; color: var(--lilac); margin-top: 6px !important; }
.cp-list { list-style: none; padding: 0; margin-top: 14px !important; max-height: min(52vh, 460px); overflow-y: auto; padding-right: 6px; }
.cp-list li { padding: 10px 0; border-top: 1px solid var(--rule); }
.cp-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cp-top b { font-size: 16px; font-weight: 600; }
.cp-v { font: 800 20px var(--display); color: var(--hi); font-variant-numeric: tabular-nums; }
.cp-bar { height: 6px; border-radius: 3px; background: rgba(214, 179, 226, .12); margin: 6px 0; overflow: hidden; }
.cp-bar i { display: block; height: 100%; width: var(--w); background: var(--hi); border-radius: 3px; }
.cp-meta { font-size: 13px; color: var(--lilac); }
.cp-d { font-weight: 700; margin-left: 4px; white-space: nowrap; }
.cp-d.up { color: var(--pos); } .cp-d.down { color: var(--neg); }
.cp-new { color: var(--lilac-2); margin-left: 4px; }
.cp-note { font-size: 12px; color: var(--lilac-2); margin-top: 10px !important; }
@media (min-width: 1080px) { .explore-map { max-height: calc(100vh - var(--head-h) - 48px); overflow-y: auto; } }
