@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --paper: #f7f7f7;
  --white: #fff;
  --orange: #171717;
  --orange-dark: #111;
  --orange-soft: #f1f1f1;
  --shadow: 0 12px 36px rgba(0, 0, 0, .045);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.topbar {
  height: 74px;
  padding: 0 max(28px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(231, 231, 231, .9);
  background: rgba(255, 255, 255, .94);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 12px; letter-spacing: .13em; }
.brand strong { font-weight: 700; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: 0; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; color: #696969; font-size: 12px; }
.status-dot { width: 7px; height: 7px; background: #171717; border-radius: 50%; }
.page-shell { max-width: 1060px; margin: 0 auto; padding: 62px 28px 50px; }
.intro { max-width: 700px; padding: 10px 0 35px; }
.eyebrow { margin: 0 0 12px; color: var(--orange-dark); font-size: 11px; font-weight: 700; letter-spacing: .15em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(36px, 6vw, 58px); letter-spacing: -.055em; line-height: 1.17; font-weight: 800; }
h1 span { color: var(--orange); }
.intro-copy { max-width: 520px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.filter-card, .metric-card, .chart-card, .table-card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }
.filter-card { padding: 24px 27px 27px; }
.section-heading, .chart-heading, .table-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading { margin-bottom: 22px; }
h2 { margin-bottom: 0; font-size: 18px; letter-spacing: -.035em; }
.section-heading .eyebrow, .chart-heading .eyebrow, .table-heading .eyebrow { margin-bottom: 7px; }
.record-count, .unit-label { color: var(--muted); font-size: 12px; }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 8px; color: #666; font-size: 12px; font-weight: 600; }
select { width: 100%; height: 48px; padding: 0 42px 0 14px; border: 1px solid #ddd; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; outline: none; }
select:focus { border-color: #171717; box-shadow: 0 0 0 3px rgba(0, 0, 0, .09); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
.metric-card { min-height: 146px; padding: 20px 22px; box-shadow: none; }
.metric-primary { border-color: #dedede; background: linear-gradient(135deg, #f4f4f4, #fff); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-value { margin: 13px 0 5px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -.05em; }
.metric-primary .metric-value { color: var(--orange-dark); }
.metric-note { color: #777; font-size: 11px; }
.chart-card, .table-card { padding: 25px 27px 20px; }
.citywide-card { margin-bottom: 16px; }
.citywide-table { margin-top: 12px; }
.chart-heading { align-items: flex-end; }
.chart-heading h2, .table-heading h2 { font-size: 19px; }
.chart-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.chart-wrap { height: 300px; margin-top: 18px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grid-line { stroke: #e8e8e8; stroke-width: 1; }
.axis-label { fill: #777; font: 11px 'DM Sans', 'Noto Sans KR', sans-serif; }
.trend-area { fill: url(#area-fill); }
.trend-segment { stroke-width: 3.5; stroke-linecap: round; }
.trend-point { fill: #fff; stroke-width: 3; }
.legend-scale { width: 64px; height: 7px; border-radius: 5px; background: linear-gradient(90deg, #0000ff, #ff0000); }
.chart-footnote { margin: 8px 0 0; color: #89837d; font-size: 11px; line-height: 1.6; }
.table-card { margin-top: 16px; padding-bottom: 9px; }
.table-heading { margin-bottom: 18px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-variant-numeric: tabular-nums; }
thead { background: #f4f4f4; }
th, td { padding: 13px 14px; text-align: right; font-size: 12px; }
th:first-child, td:first-child { text-align: left; }
th { color: #746d66; font-weight: 600; }
td { border-top: 1px solid #e9e9e9; color: #444; }
tbody tr:last-child td { font-weight: 600; }
.empty-row { padding: 25px 14px; text-align: center !important; color: #999; }
.data-note { display: flex; gap: 13px; margin: 16px 0 30px; padding: 17px 19px; border: 1px solid #e5e5e5; border-radius: 13px; background: #f5f5f5; }
.note-icon { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e5e5e5; color: #222; font-size: 12px; font-weight: 700; }
.data-note strong { font-size: 12px; }
.data-note p { margin: 5px 0 0; color: #77716b; font-size: 11px; line-height: 1.7; }
.footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 18px; border-top: 1px solid var(--line); color: #8b857e; font-size: 10px; }
.footer a { color: #444; text-decoration-color: #aaa; text-underline-offset: 3px; }
.error-banner { margin: 14px 0; padding: 13px 16px; border: 1px solid #f1c5b9; border-radius: 10px; background: #fff3ef; color: #a54127; font-size: 13px; }
.error-banner[hidden] { display: none; }
@media (max-width: 680px) {
  .topbar { height: 62px; padding: 0 18px; }
  .brand { font-size: 10px; }
  .source-pill { font-size: 10px; }
  .page-shell { padding: 41px 16px 35px; }
  .intro { padding-bottom: 27px; }
  .intro-copy { font-size: 13px; }
  .filter-card, .chart-card, .table-card { padding: 19px 17px; border-radius: 15px; }
  .section-heading { align-items: flex-end; }
  .record-count { max-width: 120px; text-align: right; line-height: 1.5; }
  .select-row { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { min-height: auto; padding: 16px 18px; }
  .metric-value { margin: 8px 0 3px; }
  .chart-heading { display: block; }
  .legend { margin-top: 15px; }
  .chart-wrap { height: 245px; margin-top: 15px; }
  .table-heading { align-items: flex-end; }
  .unit-label { text-align: right; font-size: 10px; }
  th, td { padding: 12px 10px; font-size: 11px; }
  .footer { display: grid; }
}
