:root {
  --bg: #f6f4ef;
  --paper: #fffdfa;
  --ink: #171716;
  --muted: #64605a;
  --line: #ded8cc;
  --red: #b63434;
  --red-soft: #f3d8d2;
  --teal: #0d746b;
  --teal-soft: #d5ece8;
  --gold: #b77a1b;
  --gold-soft: #f3e2bf;
  --blue: #334d6f;
  --shadow: 0 18px 48px rgba(43, 37, 28, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--blue);
}

.site-header {
  background: #171716;
  color: #fffdfa;
  border-bottom: 6px solid var(--red);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 380px;
  padding: 44px 22px 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 12px;
  color: #d9caa9;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 1rem;
  line-height: 1.2;
}

.lede {
  max-width: 760px;
  margin-bottom: 0;
  color: #ebe3d4;
  font-size: 1.08rem;
}

.status-box {
  border: 1px solid rgba(255, 253, 250, 0.24);
  border-left: 5px solid var(--teal);
  padding: 20px;
  background: rgba(255, 253, 250, 0.08);
}

.status-label,
.metric span,
.filter span {
  display: block;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-box strong {
  display: block;
  margin: 6px 0;
  font-size: 3.4rem;
  line-height: 1;
}

.status-box span:last-child {
  color: #d9caa9;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 22px 44px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -54px;
}

.metric,
.panel,
.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 120px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  font-size: 2.15rem;
  line-height: 1;
}

.panel p,
.section-heading p,
footer p {
  color: var(--muted);
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  margin: 18px 0;
}

.dashboard-grid.bottom {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  padding: 18px;
  overflow: hidden;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.chart {
  width: 100%;
  min-height: 320px;
  overflow: hidden;
}

.chart.compact {
  min-height: 245px;
}

svg {
  display: block;
  width: 100%;
  height: auto;
}

.axis,
.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.cases-section {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 12px;
}

.filter {
  width: min(420px, 100%);
}

.filter span {
  color: var(--muted);
  margin-bottom: 5px;
}

.filter input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eee8dc;
  color: #48433d;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.name {
  font-weight: 800;
}

.subtext {
  color: var(--muted);
  font-size: 0.9rem;
}

.microtext {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.1;
}

.subtext a,
.microtext a {
  color: var(--blue);
  font-weight: 650;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.yes {
  border-color: #7fb9ad;
  background: var(--teal-soft);
  color: #064b45;
}

.pill.no {
  border-color: #dfa59b;
  background: var(--red-soft);
  color: #762121;
}

.pill.unknown {
  border-color: #dfc27f;
  background: var(--gold-soft);
  color: #70470c;
}

.count-list {
  display: grid;
  gap: 10px;
}

.count-item {
  border-left: 4px solid var(--blue);
  background: #f7f2e8;
  padding: 10px 12px;
}

.count-item strong {
  display: block;
}

.count-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.rules {
  margin: 0;
  padding-left: 20px;
  color: #3c3833;
}

.technical-note {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.technical-note h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

.technical-note p {
  margin: 0;
  color: var(--muted);
}

.rules li + li {
  margin-top: 10px;
}

footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 42px;
}

.feedback {
  margin-top: 10px;
  font-size: 0.92rem;
}

.feedback a {
  font-weight: 750;
}

@media (max-width: 900px) {
  .header-inner,
  .dashboard-grid,
  .dashboard-grid.bottom {
    grid-template-columns: 1fr;
  }

  .header-inner {
    min-height: 0;
    padding-top: 34px;
  }

  .status-box {
    max-width: 360px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -28px;
  }

  .panel.wide {
    grid-column: auto;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 98px;
  }

  .chart {
    min-height: 260px;
  }
}
