:root {
  --brand: #597f5b;
  --brand-hover: #496a4b;
  --brand-active: #3f5c41;
  --ink: #17211d;
  --muted: #66736d;
  --line: #dbe3dd;
  --surface: #ffffff;
  --soft: #f6f8f6;
  --warn: #a15c00;
  --decline: #2d6f8f;
  --increase: #b24938;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
a { color: var(--brand); }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; z-index: 10; background: var(--surface); padding: .5rem; }
.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1.5rem; padding: .65rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); flex-wrap: wrap; }
.brand { justify-self: start; display: flex; align-items: center; gap: .75rem; font-size: clamp(1.2rem, 2vw, 1.8rem); font-weight: 800; text-decoration: none; color: #000; white-space: nowrap; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-section { color: var(--brand); }
.site-title { justify-self: center; color: var(--ink); font-size: clamp(1.15rem, 2vw, 1.75rem); font-weight: 800; text-align: center; white-space: nowrap; }
nav { justify-self: end; display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: clamp(1rem, 1.45vw, 1.3rem); }
nav a { color: #37413b; text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--brand); }
main { padding: 0 clamp(1rem, 4vw, 3rem) 3rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 28rem); gap: 1rem; padding: 1.3rem 0 .7rem; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 750; text-transform: uppercase; font-size: .78rem; letter-spacing: .08em; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: .25rem 0 1rem; letter-spacing: 0; }
h2 { margin: 0; font-size: 1.2rem; }
.lede { max-width: 70rem; color: var(--muted); font-size: 1rem; line-height: 1.45; margin: .45rem 0 0; }
.freshness, .kpi, .detail-panel, .chart-section, .table-section { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.freshness { padding: .8rem 1rem; color: var(--muted); font-size: .92rem; line-height: 1.35; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: .65rem 0 .75rem; }
.kpi { padding: .75rem .85rem; min-height: 5.5rem; }
.kpi span { display: block; color: var(--muted); font-size: .78rem; }
.kpi .kpi-label { font-weight: 650; margin-bottom: .4rem; }
.kpi-pair { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: .75rem; align-items: center; }
.kpi-pair > div:not(.kpi-divider) { min-width: 0; }
.kpi strong { display: block; font-size: clamp(1.05rem, 1.45vw, 1.45rem); line-height: 1.1; overflow-wrap: anywhere; }
.kpi-divider { width: 1px; height: 2.5rem; background: var(--line); }
.kpi-note { margin-top: .35rem; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; align-items: end; margin: .65rem 0 .9rem; }
.toolbar-controls, .filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.toolbar-controls label:first-child { flex: 1 1 14rem; }
.toolbar-controls label:not(:first-child) { flex: 0 1 7rem; }
.metric-explainer { align-self: stretch; padding: .85rem 1rem; border-left: 3px solid var(--brand); background: rgba(255, 255, 255, .55); border-radius: 0 8px 8px 0; }
.metric-explainer h2 { color: var(--brand-active); font-size: 1rem; }
.metric-explainer p { margin: .45rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
label { display: grid; gap: .35rem; color: var(--muted); font-weight: 650; font-size: .86rem; }
select, input { min-height: 2.4rem; border: 1px solid var(--line); border-radius: 6px; padding: .45rem .65rem; background: white; color: var(--ink); }
button, .button { border: 1px solid var(--brand); background: var(--brand); color: white; border-radius: 6px; padding: .6rem .8rem; text-decoration: none; font-weight: 750; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.map-panel { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; margin: .8rem 0 .55rem; }
.section-heading p { margin: 0; color: var(--muted); max-width: 50rem; }
.map { min-height: 34rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.legend { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .75rem; color: var(--muted); }
.legend-swatch { width: 2.5rem; height: .7rem; border-radius: 999px; display: inline-block; }
.detail-panel { padding: 1rem; }
.toolbar-detail { width: 100%; align-self: stretch; min-height: 0; padding: .85rem 1rem; }
.toolbar-detail h2 { font-size: 1.05rem; }
.toolbar-detail p { margin: .45rem 0 0; line-height: 1.3; }
.toolbar-detail .quality { margin-top: .45rem; }
.toolbar-detail .detail-grid { gap: .45rem .75rem; margin-top: .65rem; }
.toolbar-detail .detail-grid span { font-size: .72rem; }
.toolbar-detail .detail-grid strong { font-size: .9rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.detail-grid span { color: var(--muted); font-size: .78rem; display: block; }
.detail-grid strong { display: block; margin-top: .2rem; }
.quality { display: inline-flex; margin-top: .75rem; padding: .3rem .5rem; border-radius: 999px; background: var(--soft); color: var(--brand); font-weight: 750; }
.chart-section, .table-section { margin-top: 1rem; padding: 1rem; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 78rem; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: .7rem .75rem; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--soft); cursor: pointer; white-space: nowrap; }
td { font-size: .92rem; }
.content-page { max-width: 96rem; padding: 2rem 0; line-height: 1.65; }
.content-page h1 { font-size: 2.5rem; }
.content-page h2 { margin-top: 2rem; }
:focus-visible { outline: 3px solid #82b89b; outline-offset: 2px; }
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr; justify-items: start; }
  .site-title { justify-self: start; }
  nav { justify-self: start; }
  .hero, .dashboard-grid, .toolbar { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map { min-height: 26rem; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .brand { white-space: normal; }
  .site-title { white-space: normal; }
}
