body[data-city-stat] { --stat-accent: #176c67; --stat-secondary: #b45a31; }
.stat-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--line-strong); }
.stat-summary > div { min-width: 0; }
.stat-summary > div > span { display: block; color: var(--ink-2); font-size: 13px; }
.stat-summary strong { display: block; margin-top: 2px; font: 600 34px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-summary small { font-size: 16px; font-weight: 500; }
.stat-summary > div:last-child strong { color: var(--stat-secondary); }
.stat-section { margin-top: 38px; }
.stat-section h2 { font-size: 17px; line-height: 1.4; }
.stat-section > p { margin-top: 11px; color: var(--ink-2); font-size: 14px; }
.stat-section > p a { color: var(--stat-accent); text-underline-offset: 2px; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stat-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat-controls label { font-size: 13px; font-weight: 600; }
.stat-controls select { max-width: 100%; min-height: 38px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.stat-segments { display: inline-flex; border: 1px solid var(--line-strong); background: var(--surface); }
.stat-segments button { min-height: 36px; padding: 5px 13px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.stat-segments button:first-child { border-left: 0; }
.stat-segments button:hover { background: rgba(23, 108, 103, .08); }
.stat-segments button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.stat-chart-wrap { margin-top: 18px; border: 1px solid var(--line-strong); background: var(--surface); }
.stat-chart { display: block; width: 100%; height: 320px; touch-action: pan-y; cursor: crosshair; }
.stat-chart:focus-visible { outline: 2px solid var(--stat-accent); outline-offset: 2px; }
.stat-chart text { fill: var(--ink-2); font: 11px var(--font-mono); }
.stat-chart .grid { stroke: var(--line); stroke-width: 1; }
.stat-chart .trace { fill: none; stroke-width: 2.8; stroke-linejoin: round; stroke-linecap: round; }
.stat-chart .marker { fill: var(--surface); stroke-width: 3; }
.stat-chart .guide { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; }
.stat-range { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 14px; margin-top: 19px; }
.stat-range label { font-size: 13px; font-weight: 600; }
.stat-range input { width: 100%; accent-color: var(--stat-accent); cursor: pointer; }
.stat-range output { grid-column: 2; min-height: 22px; font: 500 13px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-insight { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.stat-insight p + p:not(:empty) { margin-top: 4px; }
.stat-insight a { color: var(--stat-accent); font-size: 12px; text-underline-offset: 2px; }
.stat-insight div:not(:empty) { margin-top: 4px; }
.stat-trend-readout { margin-top: 14px !important; font: 500 13px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; color: var(--ink-2); font-size: 12px; }
.stat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stat-legend i { width: 18px; border-top: 3px solid var(--legend-color); }
.stat-bars { display: grid; gap: 16px; margin-top: 20px; }
.stat-bar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 100px; gap: 13px; align-items: center; font-size: 13px; }
.stat-bar > span:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-bar-track { height: 13px; background: var(--line); }
.stat-bar-fill { height: 100%; background: var(--stat-accent); }
.stat-caption { margin-top: 14px !important; color: var(--ink-3) !important; font-size: 12px !important; }
.stat-data { margin-top: 34px; border-top: 1px solid var(--line-strong); }
.stat-data summary { padding: 16px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.stat-data .t-table-wrap { margin-top: 0; }
.stat-data .t-table { width: 100%; }
.stat-data caption { padding: 9px 14px; color: var(--ink-2); font-size: 12px; text-align: left; }
.stat-data td, .stat-data th { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .stat-summary { gap: 12px; padding: 22px 0; }
  .stat-summary strong { font-size: 25px; }
  .stat-summary small { font-size: 13px; }
  .stat-head { display: block; }
  .stat-head .stat-controls { margin-top: 13px; }
  .stat-chart { height: 280px; }
  body[data-city-stat="metro"] .stat-data .t-table th,
  body[data-city-stat="metro"] .stat-data .t-table td { padding-inline: 8px; }
  .stat-bar { grid-template-columns: 88px minmax(0, 1fr) 72px; gap: 8px; font-size: 11px; }
}
