:root {
  --orange: #e55a18; --orange-dark: #a63c0b; --ink: #1d2430; --muted: #60656d;
  --line: #d2c8be; --soft: #eee8e1; --paper: #faf8f5; --charcoal: #4a4a4a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.42; }
.app-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 30px; }
.visual-header { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.brand-line,.eyebrow { color: var(--orange-dark); font-size: 11px; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.brand-line span { color: var(--charcoal); margin: 0 5px; }
h1,h2,p { margin-top: 0; } h1 { margin: 5px 0 5px; font-size: clamp(27px, 4vw, 42px); line-height: 1.08; }
h2 { margin-bottom: 6px; font-size: clamp(21px, 2.8vw, 28px); line-height: 1.18; }
.visual-header p,.measure-note,.detail-note,.data-footer { color: var(--muted); }
.visual-header p { margin-bottom: 0; max-width: 900px; }
.controls { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; padding: 16px 0; }
.controls label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--charcoal); }
select,button { min-height: 40px; border: 1px solid #9c9994; border-radius: 3px; background: #fff; color: var(--ink); font: inherit; }
select { width: 100%; padding: 7px 10px; } button { padding: 7px 17px; font-weight: 700; cursor: pointer; }
button:hover,button:focus-visible,select:focus-visible { border-color: var(--orange); outline: 2px solid rgba(229,90,24,.18); outline-offset: 1px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 28px; align-items: start; }
.measure-note { margin-bottom: 7px; font-size: 13px; }
#map { display: block; width: 100%; height: auto; min-height: 530px; background: var(--soft); border: 1px solid var(--line); }
.county { stroke: #f5f0eb; stroke-width: 1; vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity .15s ease, stroke-width .15s ease; }
.county:hover,.county:focus-visible { stroke: var(--ink); stroke-width: 2.2; outline: none; }
.county.is-selected { stroke: var(--orange-dark); stroke-width: 3.4; }
.legend { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }.swatch { width: 17px; height: 10px; border: 1px solid rgba(0,0,0,.12); }
.detail-panel { margin-top: 27px; padding: 20px; background: var(--soft); border-top: 4px solid var(--orange); }
.detail-metrics { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 16px 0; }
.metric { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 12px; background: #fff; align-items: baseline; }
.metric-label { color: var(--muted); font-size: 12px; }.metric-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.detail-note { margin-bottom: 0; font-size: 13px; }
.data-footer { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; font-size: 11px; }
.data-footer h2 { color: var(--ink); font-size: 17px; margin-bottom: 10px; }
.data-footer p { margin-bottom: 7px; } a { color: var(--orange-dark); text-underline-offset: 2px; }
.tooltip { position: fixed; z-index: 10; max-width: 280px; padding: 9px 11px; background: var(--ink); color: white; border-radius: 3px; box-shadow: 0 5px 18px rgba(0,0,0,.22); font-size: 12px; pointer-events: none; }
.tooltip strong { display: block; margin-bottom: 2px; }.tooltip-measure { color: #f1c1a7; margin-bottom: 5px; }.tooltip-row { display: flex; justify-content: space-between; gap: 16px; }
@media (max-width: 760px) {
 .app-shell { width: min(100% - 20px, 1120px); padding-top: 16px; }
 .controls,.map-layout { grid-template-columns: 1fr; }
 .controls { gap: 9px; }.map-layout { gap: 8px; }.detail-panel { margin-top: 10px; }
 #map { min-height: 440px; }
}
