:root {
  color-scheme: light;
  --paper: #f5f3f8;
  --white: #fffefc;
  --ink: #1d1832;
  --muted: #5a5270;
  --line: #ddd7e8;
  --purple: #332a63;
  --lilac: #cdbdf7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
a { color: #403283; text-underline-offset: .19em; }
a:hover { color: #5a47ad; }
code { font-size: .94em; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: white; background: var(--purple); border: 1px solid transparent; border-radius: .55rem; min-height: 2.75rem; padding: .55rem .9rem; font-weight: 700; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #8468e0; outline-offset: 4px; }
.frame { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 3; position: fixed; top: .5rem; left: .5rem; background: white; padding: .65rem; }
.mast { background: var(--white); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.nav a { text-decoration: none; }
.nav > div { display: flex; gap: clamp(.6rem, 2.6vw, 2rem); font-size: .9rem; font-weight: 650; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1.09rem; font-weight: 820; white-space: nowrap; }
.brand-dim { color: var(--muted); font-weight: 650; }
.brand img { border-radius: 8px; }
.banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: stretch; gap: .75rem; margin-block: 1rem; }
.star { color: #211a40; background: #e3d8fb; border: 1px solid #c6b2f2; text-decoration: none; display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; border-radius: .75rem; min-height: 76px; }
.star:hover { color: #211a40; background: #d8c9f8; }
.star strong, .star small { display: block; }
.star strong { font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.24; }
.star small { color: #4a3c80; font-size: .81rem; }
.star-icon { font-size: 1.6rem; }
.star-arrow { margin-left: auto; font-weight: 750; }
.ad { min-width: 0; display: grid; place-items: center; min-height: 76px; }
.ad #carbonads { max-width: 100%; margin: 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); align-items: center; gap: clamp(1rem, 4vw, 4rem); min-height: 25rem; padding: clamp(1.4rem, 5vw, 4rem); color: var(--white); border-radius: 1.15rem; background: #211a40; }
.hero a { color: #cdbdf7; }
.kicker { margin: 0 0 .7rem; font: 700 .73rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; color: #6c6190; }
.hero .kicker { color: #b3a3e8; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 5.2rem); font-weight: 840; letter-spacing: -.055em; line-height: 1; }
h2 { margin: 0 0 .62rem; font-size: clamp(1.42rem, 2.6vw, 2.15rem); letter-spacing: -.032em; line-height: 1.15; }
.intro { max-width: 39ch; font-size: clamp(1rem, 1.7vw, 1.22rem); color: #e4deef; }
.search { margin-top: 1.4rem; }
.search label, .release-picker label, .target-controls label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .35rem; }
.search > div { display: flex; gap: .45rem; }
.search input { min-width: 0; flex: 1; padding: .68rem .8rem; border: 1px solid transparent; border-radius: .55rem; }
.search button { color: #211a40; background: var(--lilac); white-space: nowrap; }
.search ul { list-style: none; padding: .6rem .8rem; margin: .5rem 0 0; border-radius: .5rem; background: #332a63; }
.search li a { display: block; padding: .3rem .25rem; text-decoration: none; color: #ece7f8; }
.search li small { display: block; color: #b3a3e8; font-size: .78rem; }
#search-status { font-size: .83rem; color: #c6baea; margin-block: .35rem; }
#search-status:empty { display: none; }
.examples { display: flex; flex-wrap: wrap; gap: .65rem; font-size: .87rem; }
.coverage { border: 1px solid #4b3f80; padding: clamp(1.1rem, 3vw, 2.1rem); border-radius: 1rem; background: #2b2350; }
.figure { margin: 0; color: var(--lilac); font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 820; line-height: 1.05; letter-spacing: -.055em; }
.figure-label { margin: .4rem 0 1.1rem; }
.coverage dl { margin: 0; }
.coverage dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .7rem; padding-block: .58rem; border-top: 1px solid #4e4382; }
.coverage dt { color: #c3b8e5; }
.coverage dd { margin: 0; font-weight: 650; }
.section { margin-block: 2.4rem; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .8rem; }
.section-title h2 { margin-bottom: 0; }
.cards, .directory { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: .7rem; }
.cards a, .directory a { display: block; padding: .85rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: .65rem; text-decoration: none; overflow-wrap: anywhere; }
.cards a:hover, .directory a:hover { border-color: #8e7ac2; }
.cards strong, .cards span, .directory small { display: block; }
.cards span, .directory small { color: var(--muted); font-size: .83rem; margin-top: .2rem; }
.engine-cards li, .engine-list li { padding: .85rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: .65rem; list-style: none; }
.engine-list { padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: .7rem; }
.engine-cards strong, .engine-list strong { display: block; margin-bottom: .2rem; }
.engine-cards span, .engine-list span { color: var(--muted); font-size: .86rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.steps li { padding: .7rem .9rem; background: var(--white); border: 1px solid var(--line); border-radius: .6rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; color: var(--muted); font-size: .84rem; }
.crumbs li { min-width: 0; overflow-wrap: anywhere; }
.crumbs li + li::before { content: "/"; margin-right: .45rem; color: #8a7fab; }
.page-title { margin-block: 2rem 1.35rem; }
.page-title h1 { font-size: clamp(2rem, 5vw, 4rem); }
.page-title > p:not(.kicker) { color: var(--muted); font-size: 1.08rem; }
.text-link { font-weight: 700; }
.package-panel { background: var(--white); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(.85rem, 3vw, 1.7rem); }
.release-picker select, .target-controls select, .target-controls input { max-width: min(40vw, 15rem); min-height: 2.75rem; padding: .38rem .5rem; border: 1px solid #8778ab; border-radius: .4rem; background: #f8f6fb; color: var(--ink); }
.table-scroll { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .57rem .6rem; border-bottom: 1px solid var(--line); text-align: left; }
.quants th:first-child { min-width: 7.6rem; }
.quants small { display: block; color: var(--muted); font-weight: 500; font-size: .76rem; }
.quants tr.fits .estimate { background: #dcf0cc; color: #204e2c; font-weight: 750; }
.quants tr.tight .estimate { background: #fbe9bf; color: #6b4c05; font-weight: 750; }
.context-note { font-weight: 500; color: var(--muted); font-size: .78rem; }
.history { background: var(--white); }
.history small { font-weight: 500; color: var(--muted); }
.history th small { display: block; }
.fine { color: var(--muted); font-size: .88rem; }
.target-check { border-block: 1px solid var(--line); padding-block: 1rem; margin-block: 1.1rem; }
.target-check h3 { margin: 0 0 .65rem; }
.target-controls { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: .6rem; }
#budget-result:empty { display: none; }
.names { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.pagination { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem 3rem; }
.prose { max-width: 72ch; margin-bottom: 3rem; }
.prose h2 { margin-top: 1.6rem; font-size: 1.4rem; }
.footer { border-top: 1px solid var(--line); margin-top: 2.8rem; }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1.2rem; padding-block: 1.5rem; font-size: .9rem; }
.footer-sites { padding-block: 0 1.8rem; }
.footer-sites-label { margin: 0 0 .5rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.footer-sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: .5rem .9rem; }
.footer-sites-grid a { font-size: .87rem; font-weight: 650; text-decoration: none; }
.footer-sites-grid small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.analytics-panel { z-index: 2; position: fixed; bottom: .8rem; right: .8rem; width: min(24rem, calc(100% - 1.6rem)); padding: 1rem; background: var(--white); border: 1px solid #938aae; box-shadow: 0 8px 32px #1d183230; border-radius: .7rem; }
.analytics-panel h2 { font-size: 1.2rem; }
.analytics-panel button[value="off"] { background: white; border-color: var(--purple); color: var(--purple); }
@media (max-width: 770px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .frame { width: calc(100% - 1.15rem); }
  .nav { gap: .4rem; }
  .nav > div { font-size: .8rem; }
  .brand { gap: .3rem; font-size: .97rem; }
  .brand img { width: 29px; height: 29px; }
  .banner { grid-template-columns: 1fr; gap: .45rem; margin-block: .65rem; }
  .star { min-height: 58px; }
  .ad { min-height: 62px; }
  .hero { padding: 1.15rem .9rem; }
  .section-title { align-items: start; }
  th, td { padding: .45rem .45rem; }
  .target-controls select, .target-controls input { max-width: 100%; }
}
.recalls { list-style: none; padding: 0; display: grid; gap: .7rem; }
.recalls li { padding: .9rem 1.05rem; background: var(--white); border: 1px solid var(--line); border-radius: .65rem; }
.recalls h3 { margin: 0 0 .15rem; font-size: 1.05rem; }
.recalls p { margin: .35rem 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); gap: .6rem; margin: 0 0 1.2rem; }
.stats div { padding: .7rem .9rem; background: var(--white); border: 1px solid var(--line); border-radius: .6rem; }
.stats dt { color: var(--muted); font-size: .8rem; }
.stats dd { margin: .1rem 0 0; font-size: 1.5rem; font-weight: 780; letter-spacing: -.03em; }
.bars { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .4rem; }
.bars li { display: grid; grid-template-columns: minmax(7.5rem, 14rem) minmax(0, 1fr) 3.5rem; align-items: center; gap: .6rem; font-size: .9rem; }
.bar { display: block; height: .7rem; border-radius: .35rem; background: #8e7ac2; }
.bar-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 560px) { .bars li { grid-template-columns: minmax(5.5rem, 9rem) minmax(0, 1fr) 2.8rem; font-size: .84rem; } }
.facts { padding-left: 1.2rem; }
.facts li { margin-block: .35rem; }
.stats dd.text { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.nav > div a { white-space: nowrap; }
@media (max-width: 430px) { .nav > div a[href="/methodology/"], .nav > div a[href="/metros/"] { display: none; } }
@media (max-width: 360px) { .nav > div { gap: .45rem; font-size: .76rem; } }
.callout { display: block; padding: 1.1rem 1.3rem; background: #e3d8fb; border: 1px solid #c6b2f2; border-radius: .8rem; color: #211a40; text-decoration: none; }
.callout:hover { background: #d8c9f8; color: #211a40; }
.callout strong { display: block; font-size: 1.2rem; }
.callout span { display: block; color: #4a3c80; margin-top: .2rem; }
.checker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: .8rem; align-items: end; padding: clamp(.9rem, 3vw, 1.5rem); background: var(--white); border: 1px solid var(--line); border-radius: 1rem; }
.checker label, .compare-filter { display: grid; gap: .3rem; font-size: .85rem; font-weight: 700; }
.checker select, .checker input, .compare-filter select { min-width: 0; width: 100%; min-height: 2.75rem; padding: .4rem .55rem; border: 1px solid #8778ab; border-radius: .45rem; background: #f8f6fb; color: var(--ink); font-weight: 500; }
.checker p { grid-column: 1 / -1; margin: 0; }
.checker p:empty { display: none; }
.compare-filter { max-width: 18rem; margin-bottom: .8rem; }
.result { padding: clamp(.9rem, 3vw, 1.5rem); background: var(--white); border: 1px solid var(--line); border-left: .4rem solid var(--purple); border-radius: .8rem; }
.result .stats { margin-bottom: 0; }
.stats div.reached { background: #e3d8fb; border-color: #8e7ac2; }
tr.chosen th, tr.chosen td { background: #efe8fc; font-weight: 700; }
/* Charts: build-time SVG (h1bfacts/charts.py) with interaction from charts.js. Palette validated for colour
   vision deficiency; violet is LCAs, orange the comparison series. */
.chart { --s1: #6a4ce2; --s2: #d9480f; margin: 0 0 1.2rem; padding: clamp(.7rem, 2.5vw, 1.1rem); max-width: 40rem; background: var(--white); border: 1px solid var(--line); border-radius: .8rem; position: relative; }
.chart.map { max-width: 52rem; }
.chart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .9rem; margin-bottom: .5rem; }
.chart figcaption strong { flex: 1 1 18rem; font-size: 1.02rem; line-height: 1.3; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font: 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; touch-action: manipulation; }
.chart svg:focus-visible { outline-offset: 2px; }
.chart text { fill: var(--muted); }
.chart .panel { font-weight: 650; fill: var(--ink); }
.chart .value { font-weight: 700; fill: var(--ink); }
.chart .row-label { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: #ebe7f1; stroke-width: 1; }
.chart .s-lca, .chart .s-ok { fill: var(--s1); }
.chart .s-perm, .chart .s-no { fill: var(--s2); }
.chart .line { fill: none; stroke: var(--purple); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--purple); stroke: var(--white); stroke-width: 1.5; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit[data-href], .chart .bubble[data-href], .chart a .st, .chart .pt { cursor: pointer; }
.chart .hit.on { fill: #6a4ce214; }
.chart .xhair { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; visibility: hidden; pointer-events: none; }
.chart .off { opacity: 0; pointer-events: none; }
.chart path, .chart circle, .chart rect, .chart use { transition: opacity .25s, fill .45s; }
.chart .whisker { stroke: var(--purple); stroke-width: 2; }
.chart .box { fill: #c4b3f5; stroke: var(--purple); stroke-width: 1.5; }
.chart .median { stroke: var(--ink); stroke-width: 3; }
.chart .compare { stroke: var(--s2); stroke-width: 2.5; stroke-dasharray: 4 2; }
.chart .compare-label { fill: #b23a0b; font-weight: 650; }
.chart .band { fill: #d9480f1f; }
.chart .lv-label { fill: var(--ink); font-weight: 700; font-size: 10px; pointer-events: none; }
.chart .lv-label.on-dark { fill: #fff; }
.chart .st { stroke: var(--white); stroke-width: 1; }
.chart .st.on { stroke: var(--ink); stroke-width: 2; }
.chart .bubble { fill: #fffefc99; stroke: var(--ink); stroke-width: 1.3; }
.chart .bubble.on, .chart .pt.on { stroke: var(--s2); stroke-width: 2.5; }
.chart .pt { fill: #6a4ce2bb; stroke: var(--white); stroke-width: 1; }
.chart .mine line { stroke: var(--ink); stroke-width: 2.5; }
.chart .mine text { fill: var(--ink); font-weight: 750; }
.chart-note { margin: .5rem 0 0; color: var(--muted); font-size: .82rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: .84rem; }
.key { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .45rem; border-radius: .4rem; }
.key[role="button"] { cursor: pointer; border: 1px solid var(--line); min-height: 1.9rem; }
.key[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; }
.sw-lca, .sw-ok { background: #6a4ce2; }
.sw-perm, .sw-no { background: #d9480f; }
.chart-tools { display: flex; gap: .35rem; }
.chart-tools button { min-height: 2rem; padding: .2rem .6rem; font-size: .8rem; color: var(--purple); background: var(--white); border-color: #b9aed3; }
.chart-tip { position: absolute; z-index: 4; max-width: 17rem; padding: .45rem .6rem; background: var(--ink); color: #f4f1fb; border-radius: .45rem; font-size: .82rem; line-height: 1.35; pointer-events: none; box-shadow: 0 6px 20px #1d183240; }
.chart-tip strong, .chart-tip span { display: block; }
.chart-tip span { color: #dcd3f5; }
tr.hl th, tr.hl td { background: #efe8fc; }
.map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; font-size: .86rem; }
.switch { display: inline-flex; border: 1px solid #b9aed3; border-radius: .5rem; overflow: hidden; }
.switch button, .map-controls .play { min-height: 2.4rem; padding: .3rem .7rem; font-size: .84rem; border-radius: 0; color: var(--purple); background: var(--white); }
.switch button[aria-pressed="true"] { color: white; background: var(--purple); }
.map-controls .play { border: 1px solid #b9aed3; border-radius: .5rem; }
.map-controls .year { display: flex; align-items: center; gap: .5rem; font-weight: 650; }
.map-controls output { min-width: 5.5rem; font-variant-numeric: tabular-nums; }
.map-controls input[type="range"] { width: min(12rem, 40vw); accent-color: var(--purple); }
.map-key { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem .9rem; padding: 0; margin: .6rem 0 0; font-size: .8rem; color: var(--muted); }
.map-key li { display: flex; align-items: center; gap: .35rem; }
.map-key i { width: 1rem; height: .8rem; border-radius: 2px; border: 1px solid #0000001a; }
.map-key i.nodata { background: repeating-linear-gradient(45deg, #f4f2f7 0 3px, #c9c3d6 3px 5px); }
.map-key i.ring { border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; }
.mine-form { display: grid; gap: .3rem; margin-top: .7rem; font-size: .85rem; font-weight: 700; }
.mine-form label { display: grid; gap: .3rem; max-width: 16rem; }
.mine-form input { min-height: 2.75rem; padding: .4rem .55rem; border: 1px solid #8778ab; border-radius: .45rem; background: #f8f6fb; color: var(--ink); font-weight: 500; }
.mine-out { margin: 0; font-weight: 500; }
.mine-out:empty { display: none; }
.dotcol { min-width: 8rem; width: 9rem; }
.dothead { display: block; font-size: .78rem; white-space: nowrap; }
.dotscale { display: flex; justify-content: space-between; gap: .3rem; font-size: .7rem; font-weight: 500; color: var(--muted); }
.dotcell { display: block; width: 100%; height: 14px; }
.dotcell line { stroke: var(--line); stroke-width: 1; }
.dotcell circle { fill: #6a4ce2cc; }
tr.hl .dotcell circle { fill: #d9480f; }
@media (prefers-reduced-motion: reduce) { .chart path, .chart circle, .chart rect, .chart use { transition: none; } }
