@font-face { font-family: "DM Sans"; src: url("./fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("./fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("./fonts/dm-sans-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("./fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("./fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("./fonts/newsreader-latin-500-italic.woff2") format("woff2"); font-style: italic; font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f2efe6;
  --paper-2: #e9e4d8;
  --ink: #16241f;
  --muted: #657069;
  --line: #c9c5b9;
  --forest: #173f35;
  --forest-2: #245f4d;
  --lime: #d7ee8a;
  --orange: #e8633b;
  --sky: #7aaeb2;
  --panel: rgba(255, 255, 255, .42);
  --shadow: 0 18px 50px rgba(22, 36, 31, .08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111914;
  --paper-2: #19221c;
  --ink: #eef1e7;
  --muted: #a9b2aa;
  --line: #354139;
  --forest: #d7ee8a;
  --forest-2: #91bfa8;
  --lime: #d7ee8a;
  --orange: #ff805a;
  --sky: #85c5ca;
  --panel: rgba(255, 255, 255, .035);
  --shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  transition: background .25s, color .25s;
}
button, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: var(--paper); padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px);
}
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .65rem; font-size: 17px; letter-spacing: -.02em; }
.lab-logo { display: block; position: relative; flex: none; overflow: hidden; background: #fff; }
.lab-logo img { position: absolute; left: 50%; top: 50%; max-width: none; transform: translate(-50%, -50%); }
.lab-logo-header { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 4px; }
.lab-logo-header img { width: 108px; height: 108px; }
.lab-logo-footer { width: 128px; height: 128px; margin-left: auto; border: 1px solid var(--line); }
.lab-logo-footer img { width: 290px; height: 290px; }
nav { display: flex; gap: 1.75rem; }
.nav-link, .text-button { background: none; border: 0; padding: .25rem 0; cursor: pointer; color: var(--muted); }
.nav-link { position: relative; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.55rem; height: 2px; background: var(--orange); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.source-pill { display: inline-flex; align-items: center; gap: .5rem; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.source-pill span { width: 7px; height: 7px; border-radius: 50%; background: #63a66d; box-shadow: 0 0 0 4px color-mix(in srgb, #63a66d 20%, transparent); }
.icon-button { border: 1px solid var(--line); background: transparent; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; display: grid; place-items: center; }

main { min-height: calc(100vh - 170px); }
.hero, .dashboard-section, .status-bar { width: min(1340px, calc(100% - 40px)); margin-inline: auto; }
.hero { padding: clamp(70px, 10vw, 138px) 0 58px; }
.eyebrow, .kicker { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; font-weight: 600; }
.hero-grid { display: grid; grid-template-columns: 1fr 220px; gap: 2rem; align-items: end; }
h1 { margin: 1.1rem 0 1.4rem; font-size: clamp(54px, 8vw, 112px); line-height: .84; letter-spacing: -.07em; font-weight: 500; max-width: 1040px; }
h1 em { font-family: "Newsreader", Georgia, serif; color: var(--orange); font-weight: 500; }
.hero p { max-width: 600px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.hero-note { border-left: 1px solid var(--line); padding-left: 1.4rem; margin-bottom: 1.6rem; }
.hero-note .note-number { font-family: "Newsreader", serif; color: var(--orange); font-size: 34px; }
.hero-note p { font-size: 14px; margin: .7rem 0 0; }
.atlas-search { position: relative; width: min(680px, 100%); margin-top: 2.2rem; }
.atlas-search > label { display: block; margin-bottom: .5rem; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.search-box { min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 0 1rem; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; }
.search-box kbd { border: 1px solid var(--line); color: var(--muted); padding: .1rem .45rem; font: inherit; font-size: 11px; }
.search-results { position: absolute; z-index: 15; inset: calc(100% + 6px) 0 auto; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.search-results button { width: 100%; display: flex; justify-content: space-between; gap: 1rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: .8rem 1rem; text-align: left; cursor: pointer; }
.search-results button:last-child { border-bottom: 0; }
.search-results button:hover { background: var(--paper-2); }
.search-results small { color: var(--muted); }

.filter-shell {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 72px);
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1.15fr 1.15fr .65fr auto;
  gap: 0;
  align-items: end;
}
[data-theme="dark"] .filter-shell { background: #e8ebdf; color: #16241f; }
.filter-group { padding: 0 1.5rem; border-left: 1px solid color-mix(in srgb, currentColor 24%, transparent); }
.filter-group:first-child { padding-left: 0; border-left: 0; }
.filter-group label { display: block; text-transform: uppercase; letter-spacing: .12em; opacity: .65; font-size: 10px; margin-bottom: .4rem; }
.filter-group select, .compare-toolbar select { appearance: none; border: 0; color: inherit; width: 100%; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23828c84'/%3E%3C/svg%3E") no-repeat right center; padding: .1rem 1.4rem .1rem 0; font-weight: 600; }
.primary-button, .outline-button { border-radius: 0; cursor: pointer; min-height: 42px; padding: .7rem 1.1rem; font-weight: 600; }
.primary-button { background: var(--lime); color: #16241f; border: 1px solid var(--lime); }
.primary-button:hover { filter: brightness(.95); }
.outline-button { background: transparent; color: inherit; border: 1px solid var(--line); }
.outline-button:hover { border-color: var(--ink); }
.filter-shell .primary-button { margin-left: 1.5rem; min-width: 170px; }

.status-bar { display: flex; align-items: center; gap: .6rem; padding: 1rem 0; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d59b36; }
.status-dot.live { background: #63a66d; }
.status-dot.demo { background: var(--orange); }
.status-bar .text-button { text-decoration: underline; }
.status-bar #api-key-button { margin-left: auto; }

body[data-section="topics"] .hero, body[data-section="topics"] .filter-shell,
body[data-section="map"] .hero, body[data-section="map"] .filter-shell,
body[data-section="compare"] .hero, body[data-section="compare"] .filter-shell { display: none; }
body[data-section="about"] .hero, body[data-section="about"] .filter-shell, body[data-section="about"] .status-bar { display: none; }
body[data-section="topics"] .status-bar, body[data-section="map"] .status-bar,
body[data-section="compare"] .status-bar { margin-top: 18px; }

.dashboard-section { padding: 64px 0 100px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 34px; }
.section-heading h2 { margin: .3rem 0 0; font-size: clamp(36px, 4vw, 58px); letter-spacing: -.05em; line-height: 1; font-weight: 500; }
.section-heading > p { color: var(--muted); max-width: 440px; }
.section-meta { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: 13px; }
.section-meta span { margin-right: .7rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.kpi-card { min-height: 190px; padding: 23px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.kpi-card::before { content: attr(data-index); position: absolute; right: 18px; top: 18px; color: var(--muted); font-family: "Newsreader", serif; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: clamp(30px, 3vw, 46px); letter-spacing: -.05em; line-height: 1; margin: 1.25rem 0 .7rem; }
.kpi-note { font-size: 11px; color: var(--muted); }
.kpi-note strong { color: var(--forest-2); font-weight: 600; }
.skeleton { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 7%, transparent), transparent); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.profile-context { margin-top: 32px; display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.profile-context h3 { margin: .35rem 0 0; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.context-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.context-grid article { padding: 1rem; display: grid; gap: .35rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.context-grid span, .context-grid small { color: var(--muted); font-size: 11px; }
.context-grid strong { font-size: 15px; }

.editorial-grid { display: grid; grid-template-columns: 2fr 1fr; margin-top: 32px; gap: 22px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 22px; gap: 22px; }
.panel { border: 1px solid var(--line); background: var(--panel); padding: clamp(22px, 3vw, 38px); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.panel h3, .method-grid h3 { margin: .25rem 0 0; font-size: 24px; letter-spacing: -.035em; font-weight: 500; }
.metric-toggle { display: flex; border: 1px solid var(--line); }
.metric-toggle button { border: 0; background: transparent; padding: .45rem .75rem; cursor: pointer; color: var(--muted); font-size: 12px; }
.metric-toggle button.active { background: var(--ink); color: var(--paper); }
.chart { height: 280px; margin-top: 1.5rem; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-dasharray: 3 5; }
.chart-line { fill: none; stroke: var(--orange); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-area { fill: url(#area); opacity: .2; }
.chart-dot { fill: var(--paper); stroke: var(--orange); stroke-width: 2; }
.chart-label { fill: var(--muted); font-size: 10px; font-family: "DM Sans", sans-serif; }
.chart-value { fill: var(--ink); font-size: 10px; font-weight: 600; font-family: "DM Sans", sans-serif; }
.chart-note { margin: .9rem 0 0; color: var(--muted); font-size: 11px; }
.insight-panel { background: var(--forest); color: var(--paper); box-shadow: none; }
[data-theme="dark"] .insight-panel { color: #16241f; }
.insight-panel .kicker, .insight-panel .fine-print { color: color-mix(in srgb, currentColor 67%, transparent); }
blockquote { margin: 2rem 0; font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.12; }
.insight-rule { width: 45px; height: 3px; background: var(--orange); margin: 2rem 0; }
.fine-print { font-size: 11px; }

.bar-list, .profile-list { margin-top: 2rem; display: grid; gap: 1.1rem; }
.bar-row-head, .profile-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.bar-row-head { margin-bottom: .45rem; font-size: 12px; }
.bar-track { height: 8px; background: var(--paper-2); }
.bar-fill { height: 100%; background: var(--forest-2); transform-origin: left; animation: grow .7s ease both; }
.bar-row:nth-child(2n) .bar-fill { background: var(--sky); }
.bar-row:nth-child(3n) .bar-fill { background: var(--orange); }
.profile-row { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border: 0; padding-bottom: 0; }
.profile-row span:first-child { color: var(--muted); }
.profile-row strong { font-size: 18px; }

.topics-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.topic-card { min-height: 300px; position: relative; padding: clamp(24px, 3vw, 40px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topic-number { position: absolute; top: 24px; right: 26px; color: var(--muted); font-family: "Newsreader", serif; font-size: 22px; }
.topic-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--orange); font-size: 20px; }
.topic-card h3 { margin: 1.4rem 0 .5rem; font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.topic-card > p { max-width: 500px; color: var(--muted); }
.topic-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.topic-actions button { border: 1px solid var(--line); background: transparent; padding: .5rem .7rem; cursor: pointer; font-size: 12px; }
.topic-actions button:hover { border-color: var(--orange); }
.topic-actions button span { color: var(--orange); margin-left: .35rem; }

.map-panel { margin-top: 22px; box-shadow: none; }
.map-explorer-grid .map-panel { margin-top: 0; }
.map-heading p { color: var(--muted); margin: .45rem 0 0; }
.map-heading select, .map-toolbar select, .compare-toolbar select { appearance: none; border: 1px solid var(--line); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23828c84'/%3E%3C/svg%3E") no-repeat calc(100% - 12px) center; color: var(--ink); padding: .65rem 2.2rem .65rem .8rem; }
.map-toolbar { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.map-toolbar label { display: grid; gap: .35rem; }
.map-toolbar label > span { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.map-explorer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, .75fr); gap: 22px; align-items: start; }
.map-context { display: grid; gap: 16px; }
.map-summary { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.map-summary > div { min-height: 90px; display: grid; gap: .2rem; padding: .9rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-summary span { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.map-summary strong { font-size: 20px; }
.distribution-chart { min-height: 150px; margin-top: 1rem; }
.histogram { height: 140px; display: flex; align-items: end; gap: 3px; }
.histogram > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; min-width: 0; }
.histogram i { display: block; height: var(--height); background: var(--forest-2); }
.histogram span { overflow: hidden; margin-top: .35rem; color: var(--muted); font-size: 8px; white-space: nowrap; }
.empty-note { color: var(--muted); font-size: 12px; }
.ranking-panel ol { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: ranking; }
.ranking-panel li { counter-increment: ranking; border-top: 1px solid var(--line); }
.ranking-panel button { width: 100%; display: grid; grid-template-columns: 24px 1fr auto; gap: .5rem; border: 0; background: transparent; padding: .7rem 0; text-align: left; cursor: pointer; }
.ranking-panel button::before { content: counter(ranking, decimal-leading-zero); color: var(--muted); font-size: 10px; }
.ranking-panel strong { font-size: 12px; }
.state-map { position: relative; margin: 2.2rem auto 1.4rem; width: min(100%, 900px); display: grid; grid-template-columns: repeat(13, minmax(38px, 1fr)); grid-template-rows: repeat(8, minmax(38px, 1fr)); gap: 5px; }
.state-tile { aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); background: color-mix(in srgb, var(--forest-2) var(--shade), var(--paper)); color: var(--ink); display: grid; place-items: center; cursor: pointer; font-size: clamp(9px, 1.2vw, 12px); font-weight: 700; transition: transform .15s, border-color .15s; }
.state-tile:hover, .state-tile:focus-visible { transform: translateY(-2px); border-color: var(--orange); z-index: 2; }
.state-tile.selected { outline: 3px solid var(--orange); outline-offset: 1px; }
.state-tile.no-data { background: var(--paper-2); color: var(--muted); }
.geo-map { position: relative; width: min(100%, 980px); min-height: 320px; margin: 1.5rem auto 1rem; }
.geo-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.geo-state { fill: color-mix(in srgb, var(--forest-2) var(--shade), var(--paper)); stroke: var(--paper); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .15s, stroke .15s, filter .15s; }
.geo-state:hover, .geo-state:focus { stroke: var(--orange); stroke-width: 3; filter: brightness(1.08); outline: none; }
.geo-state.selected { stroke: var(--orange); stroke-width: 4; }
.geo-state.no-data { fill: var(--paper-2); }
.map-tooltip { position: absolute; z-index: 5; pointer-events: none; padding: .55rem .7rem; border: 1px solid var(--line); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font-size: 12px; font-weight: 600; white-space: nowrap; }
.map-tooltip[hidden] { display: none; }
.map-loading { min-height: 320px; display: grid; place-items: center; color: var(--muted); }
.map-empty { min-height: 420px; display: grid; place-items: center; text-align: center; }
.map-empty > div { max-width: 360px; }
.map-empty p { color: var(--muted); }
.map-footer { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: 11px; }
.map-gradient { width: 120px; height: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--forest-2) 14%, var(--paper)), var(--forest-2)); }
.map-footer #map-status { margin-left: auto; }

.compare-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; max-width: 900px; margin-bottom: 2rem; }
.compare-toolbar select { border: 1px solid var(--line); padding: .7rem 2.4rem .7rem .8rem; }
.compare-toolbar > select { width: auto; min-width: 190px; }
.compare-toolbar #compare-state-select,
.compare-toolbar #compare-county-select { min-width: 240px; }
.compare-control { display: grid; gap: .35rem; }
.compare-control > span { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.comparison-cards { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.comparison-chip { border: 1px solid var(--line); padding: .55rem .7rem .55rem .9rem; display: inline-flex; gap: .8rem; align-items: center; background: var(--panel); }
.comparison-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.table-panel { padding: 0; box-shadow: none; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: right; border-bottom: 1px solid var(--line); padding: 1rem 1.2rem; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
td:first-child { font-weight: 600; }
.comparison-delta { display: block; margin-top: .25rem; color: var(--muted); font-size: 10px; font-weight: 400; white-space: nowrap; }

.explorer-grid { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.5fr); gap: 22px; align-items: start; }
.query-panel textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: .9rem; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.query-panel textarea:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
.query-panel .primary-button { width: 100%; margin-top: .8rem; }
.query-message { min-height: 1.5rem; margin-top: .8rem; color: var(--muted); font-size: 12px; }
.query-message.error { color: var(--orange); }
.explorer-results-panel { padding: 0; overflow: hidden; }
.explorer-results-panel .panel-heading { padding: 28px; border-bottom: 1px solid var(--line); }
.explorer-results-panel th, .explorer-results-panel td { text-align: left; }
.explorer-results-panel td:first-child, .explorer-results-panel th:first-child { position: static; background: transparent; }
code { background: var(--paper-2); padding: .1rem .25rem; font-size: .9em; }

.methodology { max-width: 1100px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.method-grid article { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 30px; }
.method-grid article > span { color: var(--orange); font-family: "Newsreader", serif; font-size: 25px; }
.method-grid p { color: var(--muted); }
.source-link { display: inline-flex; gap: 1rem; margin-top: 2rem; color: var(--ink); text-underline-offset: 5px; }
.about-section { max-width: 1000px; min-height: 65vh; }
.about-content { max-width: 760px; }
.about-content > p { font-family: "Newsreader", Georgia, serif; font-size: clamp(22px, 2.5vw, 31px); line-height: 1.35; }
.about-privacy { border-top: 1px solid var(--line); margin-top: 4rem; padding-top: 1.5rem; }
.about-privacy p { max-width: 650px; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 30px clamp(20px, 4vw, 64px); display: flex; justify-content: space-between; align-items: center; gap: 2rem; color: var(--muted); font-size: 12px; }
footer .brand { color: var(--ink); }
dialog { width: min(540px, calc(100% - 32px)); border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 0; box-shadow: 0 40px 100px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10,20,16,.55); backdrop-filter: blur(4px); }
dialog form { padding: 30px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-heading h2 { margin: .3rem 0; font-size: 34px; letter-spacing: -.04em; }
dialog p { color: var(--muted); }
.export-actions { display: flex; gap: .7rem; margin-top: 1.5rem; }
.input-label { display: block; margin: 1.5rem 0 .45rem; font-size: 12px; font-weight: 600; }
.key-input-row { display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
.key-input-row input { min-width: 0; width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: .75rem .85rem; font: inherit; }
.key-input-row input:focus { outline: 3px solid var(--orange); outline-offset: 2px; }
.key-help { font-size: 12px; }
.key-help a { color: var(--ink); text-underline-offset: 3px; }
.key-actions { flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 50; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }

@media (max-width: 900px) {
  .topbar { height: auto; min-height: 104px; grid-template-columns: 1fr auto; grid-template-rows: 62px 42px; }
  nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; align-self: start; }
  nav { overflow-x: auto; white-space: nowrap; }
  .source-pill { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-note { display: none; }
  .filter-shell { grid-template-columns: 1fr 1fr; gap: 1rem 0; }
  .filter-group.compact { padding-left: 0; border-left: 0; }
  .filter-shell .primary-button { margin-left: 1.5rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .profile-context { grid-template-columns: 1fr; }
  .context-grid { grid-template-columns: 1fr 1fr; }
  .editorial-grid, .detail-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .map-toolbar { grid-template-columns: 1fr 1fr; }
  .map-explorer-grid { grid-template-columns: 1fr; }
  .explorer-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .state-map { grid-template-columns: repeat(13, minmax(28px, 1fr)); gap: 3px; }
}

@media (max-width: 560px) {
  .topbar { padding-inline: 18px; }
  nav { gap: .8rem; font-size: 12px; overflow-x: auto; justify-content: flex-start; padding-inline: .5rem; }
  .hero, .dashboard-section, .status-bar { width: min(100% - 28px, 1340px); }
  .hero { padding-top: 60px; }
  h1 { font-size: 52px; }
  .filter-shell { grid-template-columns: 1fr; padding: 20px; }
  .filter-group, .filter-group.compact { padding: .6rem 0; border: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
  .filter-shell .primary-button { margin: .5rem 0 0; }
  .kpi-grid { grid-template-columns: 1fr; }
  .context-grid, .map-toolbar { grid-template-columns: 1fr; }
  .kpi-card { min-height: 150px; }
  .section-meta { width: 100%; flex-wrap: wrap; }
  .section-meta span { width: 100%; }
  .metric-toggle { display: none; }
  .method-grid { grid-template-columns: 1fr; }
  .state-map { grid-template-columns: repeat(13, minmax(20px, 1fr)); gap: 2px; }
  .state-tile { font-size: 8px; }
  .map-footer #map-status { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
  .lab-logo-footer { margin-left: 0; }
}
