/* Layout: field-report ledger. Masthead, executive read, state tile map, per-category ranked ledgers, then a working explorer. */
:root {
  --bg: #f7f5f2; --surface: #ffffff; --ink: #1f1a16; --muted: #6b625a; --line: #e4ded6;
  --accent: #b45309; --accent-soft: #fdf0dc; --accent-ink: #7c3a06;
  --crit: #b42318; --high: #d9620b; --mod: #b98a12; --low: #6f7b6a;
  --tile0: #ece7e0; --tile1: #f6dcb4; --tile2: #eeb36b; --tile3: #d9782c; --tile4: #a8461a;
  --p-mfg: #2f6b57; --p-trans: #6e9a5c; --p-mixed: #c08a1e; --p-disp: #9a3b2c; --p-unclear: #cfc6bb;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #15120f; --p-mfg: #4fa585; --p-trans: #93c07f; --p-mixed: #e0aa3e; --p-disp: #e0705c; --p-unclear: #4a423b; --surface: #1e1a16; --ink: #f3eee8; --muted: #a89d92; --line: #342d27;
  --accent: #f59e0b; --accent-soft: #3a2a12; --accent-ink: #fcd38d;
  --crit: #f0645a; --high: #f58d3d; --mod: #e2b33c; --low: #9aa592;
  --tile0: #2a2420; --tile1: #4a3519; --tile2: #7a4e1c; --tile3: #b5651f; --tile4: #e08a35;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #15120f; --p-mfg: #4fa585; --p-trans: #93c07f; --p-mixed: #e0aa3e; --p-disp: #e0705c; --p-unclear: #4a423b; --surface: #1e1a16; --ink: #f3eee8; --muted: #a89d92; --line: #342d27;
  --accent: #f59e0b; --accent-soft: #3a2a12; --accent-ink: #fcd38d;
  --crit: #f0645a; --high: #f58d3d; --mod: #e2b33c; --low: #9aa592;
  --tile0: #2a2420; --tile1: #4a3519; --tile2: #7a4e1c; --tile3: #b5651f; --tile4: #e08a35;
  color-scheme: dark; }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); padding-inline: 16px; padding-block: 0 48px; }
.wrap { max-width: 1120px; margin: 0 auto; }
a { color: var(--accent-ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
header.mast { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px 16px; border-bottom: 2px solid var(--ink); }
.word { display: flex; align-items: center; gap: 10px; font: 800 26px/1 var(--display); letter-spacing: -0.01em; }
.word em { font-style: normal; color: var(--accent); }
.word svg { flex: none; }
.meta { font: 12px/1.4 var(--mono); color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill { font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; background: var(--accent-soft); color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; max-width: 22ch; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; }
.eyebrow { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
section { padding-block: 28px 4px; display: grid; gap: 16px; min-width: 0; }
section > *, .intro > *, .mapbox > *, .wrap > * { min-width: 0; }
.tablewrap { max-width: 100%; }
.meta span { overflow-wrap: anywhere; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.intro p { margin: 0; max-width: 65ch; }
.intro-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; align-items: center; }
.intro-top .note { max-width: 52ch; }
.read.summary-cols { display: block; column-count: 2; column-gap: 36px; }
.summary-cols p { max-width: none; break-inside: avoid; margin: 0 0 14px; }
.summary-cols p:last-child { margin-bottom: 0; }
.read { display: grid; gap: 12px; }
.read p b { font-family: var(--display); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.kpi { padding: 14px 12px; display: grid; gap: 4px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .n { font: 800 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--muted); }
.mapbox { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.tile { aspect-ratio: 1; max-width: 100%; border: 0; border-radius: 3px; background: var(--tile0); color: var(--ink); font: 600 11px/1 var(--mono); display: grid; place-content: center; gap: 2px; cursor: pointer; padding: 0; }
.tile small { font-weight: 400; font-size: 10px; opacity: .8; }
.tile.l1 { background: var(--tile1); } .tile.l2 { background: var(--tile2); } .tile.l3 { background: var(--tile3); color: #fff; } .tile.l4 { background: var(--tile4); color: #fff; }
.tile.pending { background: transparent; outline: 1px dashed var(--line); color: var(--muted); }
.tile[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.legend .sw { display: flex; gap: 3px; } .legend .sw span { width: 22px; height: 12px; border-radius: 2px; }
.ptile { color: #fff; } .ptile.manufacturing { background: var(--p-mfg); } .ptile.transition_pathway { background: var(--p-trans); } .ptile.mixed { background: var(--p-mixed); } .ptile.disposal { background: var(--p-disp); } .ptile.unclear { background: var(--p-unclear); color: var(--ink); }
.pkey { display: grid; gap: 6px; font-size: 13px; } .pkey span { display: flex; gap: 8px; align-items: center; } .pkey i { width: 14px; height: 14px; border-radius: 2px; flex: none; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: grid; gap: 8px; min-width: 0; }
.pcard p { margin: 0; max-width: 65ch; font-size: 14px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.cat header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cat header span { font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.cat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat li button { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 4px; border-radius: 3px; cursor: pointer; }
.cat li button:hover { background: var(--accent-soft); }
.cat li button:focus-visible { outline: 2px solid var(--accent); }
.cat .t { font-size: 14px; line-height: 1.35; }
.cat .s { font-size: 12px; color: var(--muted); }
.cat .none { font-size: 13px; color: var(--muted); }
.score { font: 600 13px/1 var(--mono); font-variant-numeric: tabular-nums; text-align: center; padding: 5px 0; border-radius: 3px; color: #fff; background: var(--low); }
.score.crit { background: var(--crit); } .score.high { background: var(--high); } .score.mod { background: var(--mod); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.controls label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.controls select, .controls input { font: 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 7px 8px; min-width: 0; }
.controls input { width: min(260px, 100%); }
.controls button { font: 600 13px var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px; cursor: pointer; }
.count { font: 12px var(--mono); color: var(--muted); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); position: sticky; top: 0; background: var(--surface); }
th button { all: unset; cursor: pointer; } th button:focus-visible { outline: 2px solid var(--accent); }
tbody tr { cursor: pointer; } tbody tr:hover { background: var(--accent-soft); }
td.num { font-variant-numeric: tabular-nums; width: 54px; }
td .sub { font-size: 12px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; }
dialog::backdrop { background: rgba(20, 14, 8, .5); }
.dlg { padding: 22px; display: grid; gap: 16px; }
.dlg .top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.dlg .close { font: 600 13px var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 6px 10px; cursor: pointer; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 12px var(--mono); padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.sev { display: grid; gap: 8px; }
.sev div { display: grid; grid-template-columns: 120px 34px minmax(0, 1fr); gap: 10px; font-size: 13px; align-items: baseline; }
.sev .k { color: var(--muted); }
.dots { font: 600 13px var(--mono); color: var(--accent); letter-spacing: 2px; }
.dlg ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.dlg p { margin: 0; max-width: 65ch; }
.note { font-size: 12px; color: var(--muted); }
footer { margin-top: 40px; padding-block: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 820px) { .intro, .mapbox, .intro-top { grid-template-columns: minmax(0, 1fr); } .read.summary-cols { column-count: 1; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(3) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 480px) { .tile small { display: none; } .sev div { grid-template-columns: 90px 30px minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .tile, .cat li button, tbody tr { transition: background-color .12s; } }

/* Site additions: navigation, theme toggle, page layouts */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
.word { color: var(--ink); text-decoration: none; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; font-size: 14px; }
.topnav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { border-bottom-color: var(--line); }
.topnav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
.theme-toggle { font: 600 12px var(--mono); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; cursor: pointer; }
.crumbs { font: 12px var(--mono); color: var(--muted); padding-block: 16px 0; }
.crumbs a { color: var(--muted); }
.narrow { max-width: 820px; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { margin-top: 28px; }
.prose table { min-width: 0; }
.loading { color: var(--muted); font-size: 14px; padding-block: 24px; }
.error-box { border: 1px solid var(--crit); color: var(--ink); background: var(--surface); padding: 12px 14px; border-radius: 4px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.section-head a { font-size: 14px; }
.dossier { display: grid; gap: 18px; max-width: 860px; }
.dossier .dlg { padding: 0; }
.ptable td { font-size: 14px; }
.ptable .pill-p { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.state-head { display: grid; gap: 8px; }
.group h3 { margin-block: 18px 6px; }
.group ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.group li a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 4px; border-radius: 3px; color: var(--ink); text-decoration: none; }
.group li a:hover { background: var(--accent-soft); }
a.tile { text-decoration: none; }

/* ---------- Visual layer: validated chart palettes (dataviz validator, light and dark) ---------- */
:root {
  --sev-1: #e9a15b; --sev-2: #d67a32; --sev-3: #b0521d; --sev-4: #7a3010;
  --post-manufacturing: #2a78d6; --post-disposal: #eb6834; --post-transition_pathway: #1baf7a; --post-mixed: #eda100; --post-unclear: #cfc9c0;
  --viz-1: #b0521d; --viz-2: #2a78d6; --flow: #1f1a16;
  --map-empty: #ece7e0; --map-line: #d9d2c8; --grid: #e7e1d9; --axis: #c8bfb3;
  --hero-ink: #ffffff; --hero-shade: rgba(20, 14, 8, .62);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --sev-1: #8a4a1c; --sev-2: #b8662a; --sev-3: #e08b3f; --sev-4: #f6b878;
  --post-manufacturing: #3987e5; --post-disposal: #d95926; --post-transition_pathway: #199e70; --post-mixed: #c98500; --post-unclear: #4a433c;
  --viz-1: #e08b3f; --viz-2: #3987e5; --flow: #f3eee8;
  --map-empty: #2a2420; --map-line: #3a322b; --grid: #2e2823; --axis: #4a423a;
} }
:root[data-theme="dark"] {
  --sev-1: #8a4a1c; --sev-2: #b8662a; --sev-3: #e08b3f; --sev-4: #f6b878;
  --post-manufacturing: #3987e5; --post-disposal: #d95926; --post-transition_pathway: #199e70; --post-mixed: #c98500; --post-unclear: #4a433c;
  --viz-1: #e08b3f; --viz-2: #3987e5; --flow: #f3eee8;
  --map-empty: #2a2420; --map-line: #3a322b; --grid: #2e2823; --axis: #4a423a;
}
/* severity chips now use the validated ramp */
.score { background: var(--sev-1); color: #1f1a16; }
.score.mod { background: var(--sev-2); color: #fff; } .score.high { background: var(--sev-3); color: #fff; } .score.crit { background: var(--sev-4); color: #fff; }
.score.low { background: var(--sev-1); color: #1f1a16; }
:root[data-theme="dark"] .score.crit, :root[data-theme="dark"] .score.high { color: #1f1a16; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .score.crit, :root:not([data-theme="light"]) .score.high { color: #1f1a16; } }

.viz { position: relative; min-width: 0; }
.viz svg { display: block; overflow: visible; }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font-size: 13px; line-height: 1.4; max-width: 280px; box-shadow: 0 6px 20px rgba(0,0,0,.14); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.viz-legend small { color: var(--muted); opacity: .8; }
.state-shape { transition: opacity .12s; }
.map-label, .chart-axis { font: 11px var(--mono); fill: var(--muted); }
.chart-label { font: 13px var(--body); fill: var(--ink); }
.chart-value { font: 600 12px var(--mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.baseline { stroke: var(--axis); stroke-width: 1; }
.bar-row.is-hover .chart-label { font-weight: 600; }
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg-toggle button { font: 600 12px var(--body); color: var(--muted); background: transparent; border: 0; padding: 6px 10px; cursor: pointer; }
.seg-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel h3 { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }

/* photos */
.photo { margin: 0; display: grid; gap: 6px; min-width: 0; }
.photo img { width: 100%; height: auto; border-radius: 4px; display: block; background: var(--map-empty); object-fit: cover; }
.photo figcaption { font-size: 12px; color: var(--muted); line-height: 1.45; }
.photo figcaption .cap { color: var(--ink); }
.photo figcaption a { color: var(--muted); }
.photo.wide img { aspect-ratio: 21 / 9; }
.photo.card img { aspect-ratio: 3 / 2; }
.photo.tall img { aspect-ratio: 4 / 3; }
.cat .photo img { aspect-ratio: 16 / 7; }
.cat .photo figcaption { font-size: 11px; }

/* hero band */
.hero-band { position: relative; margin-inline: -16px; overflow: hidden; }
.hero-band .photo img { aspect-ratio: auto; height: clamp(260px, 46vw, 520px); border-radius: 0; }
.hero-band .photo figcaption { position: absolute; right: 12px; bottom: 8px; max-width: 70%; text-align: right; color: #f3eee8; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.hero-band .photo figcaption a, .hero-band .photo figcaption .cap { color: #f3eee8; }
.hero-band .over { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 40px; background: linear-gradient(to top, var(--hero-shade), transparent); }
.hero-band .over h1 { color: var(--hero-ink); max-width: 20ch; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hero-band .over .eyebrow { color: #f3e3cc; }
@media (min-width: 1152px) { .hero-band { margin-inline: calc(-1 * (100vw - 1120px) / 2 - 0px); } }

/* findings map */
.fmap { position: relative; width: 100%; height: clamp(360px, 62vh, 640px); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--map-empty); }
.fmap.small { height: 300px; }
.fmap .loading { padding: 16px; }
/* MapLibre's own stylesheet loads after this one (with the library), so the popup rules carry !important. */
.fmap .maplibregl-popup-content { background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font: 14px/1.45 var(--body); padding: 12px 28px 12px 14px; }
.fmap .maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; border-left-color: var(--surface) !important; border-right-color: var(--surface) !important; }
.fmap .maplibregl-popup-close-button { color: var(--ink) !important; font-size: 18px; padding: 2px 8px; }
.fmap .maplibregl-popup-close-button:hover { background: var(--accent-soft) !important; }
.pop a { color: var(--accent-ink); font-weight: 600; }
.pop .note { color: var(--muted); font-size: 13px; }
.pop .note { margin-top: 4px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.map-list { max-height: 640px; overflow: auto; display: grid; gap: 2px; }
.map-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 6px 4px; border-radius: 3px; color: var(--ink); text-decoration: none; font-size: 13px; }
.map-list a:hover, .map-list a.is-sel { background: var(--accent-soft); }
@media (max-width: 900px) { .map-layout { grid-template-columns: minmax(0, 1fr); } .map-list { max-height: 360px; } }

/* infographic */
.ig section { padding-block: 40px 8px; }
.ig .big { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 0; border-block: 2px solid var(--ink); }
.ig .big div { padding: 20px 14px; display: grid; gap: 6px; }
.ig .big div + div { border-left: 1px solid var(--line); }
.ig .big b { font: 800 clamp(34px, 5vw, 56px)/1 var(--display); font-variant-numeric: tabular-nums; }
.ig .big span { font-size: 14px; color: var(--muted); max-width: 26ch; }
.ig .chapter { font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.ig h2 { font-size: clamp(24px, 3.4vw, 36px); max-width: 26ch; }
.ig .lede { font-size: 17px; max-width: 62ch; margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.story-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; align-content: start; }
.story .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.story .photo figcaption { padding-inline: 14px; }
.story .photo img { border-radius: 0; }
.story a.t { color: var(--ink); font: 600 16px/1.3 var(--display); text-decoration: none; }
.story a.t:hover { text-decoration: underline; }
.fact { border-left: 4px solid var(--accent); padding: 4px 0 4px 14px; display: grid; gap: 4px; max-width: 62ch; }
.fact b { font: 800 28px/1.1 var(--display); }

/* feedstock matrix */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.matrix { border-collapse: separate; border-spacing: 2px; min-width: 860px; font-size: 12px; }
.matrix th { font: 600 11px var(--mono); color: var(--muted); text-transform: none; letter-spacing: 0; padding: 6px 4px; vertical-align: bottom; position: sticky; top: 0; background: var(--surface); }
.matrix th.rot { height: 120px; white-space: nowrap; }
.matrix th.rot span { display: inline-block; transform: rotate(-50deg); transform-origin: left bottom; width: 26px; translate: 14px 0; }
.matrix td { padding: 0; border: 0; }
.matrix td.st { padding: 4px 8px; font: 600 12px var(--mono); white-space: nowrap; }
.matrix td.st a { color: var(--ink); }
.matrix td.yr { padding: 4px 8px; font: 12px var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.cell { display: block; width: 28px; height: 22px; border-radius: 3px; cursor: default; }
.fs-manufacturing_feedstock { background: var(--post-manufacturing); }
.fs-limited { background: var(--post-mixed); }
.fs-case_by_case { background: var(--post-transition_pathway); }
.fs-solid_waste { background: var(--post-disposal); }
.fs-prohibited { background: var(--crit); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 3px, transparent 3px 7px); }
.fs-unclear { background: var(--post-unclear); }
.flow-diagram svg text { font: 600 14px var(--body); fill: var(--ink); }
.flow-diagram svg .grp { font: 600 11px var(--mono); letter-spacing: .14em; fill: var(--muted); }
.flow-diagram svg .cnt { font: 600 12px var(--mono); fill: var(--muted); }
.disclosure { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; max-width: 75ch; }
.hero-band.no-photo { margin-inline: 0; }
.hero-band.no-photo .over { position: static; background: none; padding: 24px 0 8px; }
.hero-band.no-photo .over h1 { color: var(--ink); text-shadow: none; }
.hero-band.no-photo .over .eyebrow { color: var(--muted); }
.pill-p { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.ig .big b { color: var(--ink); }
.panel { align-content: start; }
[hidden] { display: none !important; }
/* Shown instead of repeating a photo already on the page */
.photo-fallback { aspect-ratio: 3 / 2; border-radius: 4px; display: grid; place-items: center; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: repeating-linear-gradient(135deg, var(--map-empty) 0 10px, transparent 10px 20px); border: 1px solid var(--map-line); }
.photo-fallback.wide { aspect-ratio: 21 / 9; }

/* ---------- Waste flows page (palettes validated: facility pair and diverging poles, light and dark) ---------- */
:root {
  --fl-arc: #7a3010; --fl-arc-hi: #2a78d6; --fl-landfill: #b0521d; --fl-wte: #2a78d6;
  --fl-exp-1: #f3c4bd; --fl-exp-2: #e8807a; --fl-exp-3: #c23b3a; --fl-mid: #f0efec;
  --fl-imp-1: #c3d8f3; --fl-imp-2: #79a9e8; --fl-imp-3: #2a78d6;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --fl-arc: #f6b878; --fl-arc-hi: #3987e5; --fl-landfill: #d0702e; --fl-wte: #3987e5;
  --fl-exp-1: #5c2a28; --fl-exp-2: #a8403f; --fl-exp-3: #e66767; --fl-mid: #383835;
  --fl-imp-1: #1f3a5c; --fl-imp-2: #2f64a8; --fl-imp-3: #3987e5; } }
:root[data-theme="dark"] {
  --fl-arc: #f6b878; --fl-arc-hi: #3987e5; --fl-landfill: #d0702e; --fl-wte: #3987e5;
  --fl-exp-1: #5c2a28; --fl-exp-2: #a8403f; --fl-exp-3: #e66767; --fl-mid: #383835;
  --fl-imp-1: #1f3a5c; --fl-imp-2: #2f64a8; --fl-imp-3: #3987e5;
}
.fl-controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.fl-controls fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.fl-controls legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 4px; width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 7px 12px; font-size: 14px; cursor: pointer; background: var(--surface); }
.seg input:checked + span { background: var(--ink); color: var(--surface); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.fl-controls .chk { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; margin-right: 8px; }
.fl-controls input[type=range] { width: 160px; }
.fl-controls input[type=search] { min-width: 220px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; }
.fl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.fl-mapwrap { position: relative; min-width: 0; }
.fl-map { height: clamp(420px, 70vh, 720px); }
.fl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; padding: 8px 0 0; }
.fl-legend b { font-weight: 600; width: 100%; }
.fl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fl-legend .sw { width: 14px; height: 14px; border-radius: 2px; display: inline-block; border: 1px solid var(--line); }
.fl-legend .sw.hatch { background: repeating-linear-gradient(135deg, var(--axis) 0 1.5px, transparent 1.5px 5px); }
.fl-panel { max-height: clamp(420px, 70vh, 720px); overflow: auto; position: relative; }
.fl-panel h3 { padding-right: 56px; }
.fl-panel h4 { margin: 8px 0 0; font-size: 14px; }
.fl-close { position: absolute; top: 10px; right: 10px; display: none; }
.fl-back { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.fl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.fl-stats div { background: var(--bg); border-radius: 4px; padding: 8px; }
.fl-stats dt { font-size: 12px; color: var(--muted); }
.fl-stats dd { margin: 2px 0 0; font-weight: 600; }
.fl-ptable { min-width: 0; width: 100%; font-size: 13px; }
.fl-ptable td, .fl-ptable th { padding: 4px 6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-cov { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.fl-src { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.fl-spark { margin: 4px 0 0; }
.fl-spark text { font-size: 9px; fill: var(--muted); }
.fl-spark figcaption { font-size: 12px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink, var(--ink)); text-decoration: underline; cursor: pointer; }
.fl-method dt { font-weight: 600; margin-top: 8px; }
.fl-method dd { margin: 2px 0 0; }
@media (max-width: 900px) {
  .fl-layout { grid-template-columns: minmax(0, 1fr); }
  .fl-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 55vh; border-radius: 12px 12px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.18); transform: translateY(calc(100% - 52px)); transition: transform .2s ease; }
  .fl-layout.sheet-open .fl-panel { transform: none; }
  .fl-close { display: inline-block; }
  .fl-panel::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -6px auto 4px; }
}

/* Feedstock-law classes (app.js wasteClass) reuse the validated posture slots */
:root { --post-considering: var(--post-mixed); --post-waste_regulated: var(--post-disposal); }

/* ---------- Circularity index (tier ramp: orange arm, neutral, blue arm from the validated palettes) ---------- */
:root { --ci-0: #b0521d; --ci-1: #e9a15b; --ci-2: #cfc9c0; --ci-3: #79a9e8; --ci-4: #2a78d6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ci-0: #e08b3f; --ci-1: #8a4a1c; --ci-2: #4a433c; --ci-3: #2f64a8; --ci-4: #3987e5; } }
:root[data-theme="dark"] { --ci-0: #e08b3f; --ci-1: #8a4a1c; --ci-2: #4a433c; --ci-3: #2f64a8; --ci-4: #3987e5; }
.ci-hero h1 { max-width: 22ch; }
.big.small b { font-size: 34px; }
.ci-test { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ci-stack { display: flex; gap: 2px; height: 26px; }
.ci-stack i { display: flex; align-items: center; justify-content: center; border-radius: 3px; font-style: normal; font-size: 12px; font-weight: 600; min-width: 22px; }
.ci-stack i.full { background: var(--ci-4); color: #fff; } .ci-stack i.part { background: var(--ci-2); color: var(--ink); } .ci-stack i.none { background: var(--ci-0); color: #fff; }
.ci-gap { display: grid; gap: 3px; }
.ci-g { display: grid; grid-template-columns: 170px 1fr 36px 150px; gap: 10px; align-items: center; color: inherit; text-decoration: none; font-size: 13px; padding: 2px 4px; border-radius: 3px; }
.ci-g:hover, .ci-g:focus-visible { background: var(--accent-soft); }
.ci-bar { height: 12px; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--map-empty) 0 6px, transparent 6px 12px); border: 1px solid var(--line); overflow: hidden; }
.ci-bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.ci-v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ci-sim-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 20px; align-items: start; }
.ci-sim fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; display: grid; gap: 10px; }
.ci-sim legend { font-weight: 600; padding: 0 4px; }
.ci-sim .chk { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 14px; }
.ci-premise { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ci-premise > div { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.ci-premise .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ci-4); color: #fff; font-weight: 700; font-size: 13px; }
.ci-premise h3 { margin: 8px 0 4px; font-size: 16px; } .ci-premise p { margin: 0; font-size: 14px; }
.ci-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.ci-card > p { grid-column: 1 / -1; }
.ci-score { display: grid; align-content: start; gap: 2px; }
.ci-score b { font-size: 48px; line-height: 1; font-family: var(--display); }
.ci-tier { display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 99px; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; justify-self: start; }
.ci-bars { display: grid; gap: 8px; }
.ci-row { display: grid; grid-template-columns: 190px 1fr 46px; gap: 4px 10px; align-items: center; font-size: 13px; }
.ci-row .ci-why { grid-column: 1 / -1; margin-top: -2px; }
.ci-track { height: 10px; background: var(--map-empty); border-radius: 3px; overflow: hidden; }
.ci-track i { display: block; height: 100%; background: var(--ci-4); }
.ci-n { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .ci-test, .ci-sim-grid, .ci-card { grid-template-columns: 1fr; }
  .ci-g { grid-template-columns: 110px 1fr 30px; } .ci-g .ci-t { display: none; }
  .ci-row { grid-template-columns: 1fr 40px; } .ci-row .ci-track { grid-column: 1 / -1; grid-row: 2; }
}

/* Search: header box, /search results, explorer's extra filters */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sitesearch { flex: 0 1 240px; min-width: 0; }
.sitesearch input { width: 100%; font: 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 6px 8px; }
.sitesearch input:focus, .controls input:focus, .controls select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.more-filters { margin-top: 10px; }
.more-filters summary { cursor: pointer; font: 600 13px var(--body); color: var(--ink); padding: 4px 0; }
.more-filters[open] summary { margin-bottom: 8px; }
.sresults { display: grid; gap: 8px; margin-top: 12px; }
.sresult h2 { margin-block: 18px 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sresult .s { font-size: 13px; color: var(--muted); }
.schips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.schips a { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--ink); text-decoration: none; }
.schips a:hover { border-color: var(--accent); }
.slist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.slist li { min-width: 0; overflow-wrap: anywhere; }
mark { background: var(--accent-soft); color: var(--ink); padding: 0 1px; border-radius: 2px; }
@media (max-width: 640px) { .sitesearch { flex-basis: 100%; } }
td .score { display: inline-block; min-width: 28px; }
.sitesearch { margin-left: auto; }

/* regions and world maps */
.region-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rtile { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: inherit; text-decoration: none; min-width: 0; }
.rtile b { font: 800 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.rtile:hover { border-color: var(--ink); }
.cmaps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.cmaps section { display: grid; gap: 8px; min-width: 0; }
.state-shape.ctx { pointer-events: none; }
@media (max-width: 820px) { .cmaps { grid-template-columns: minmax(0, 1fr); } }
