:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #18212b;
  --muted: #667085;
  --border: #d9dee7;
  --emergency-soft: #fee2e2;
  --flash-soft: #ffedd5;
  --flood-soft: #dbeafe;
  --watch-soft: #dcfce7;
  --river-soft: #ede9fe;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

.page {
  max-width: 1460px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 20px;
  margin-bottom: 18px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.08;
}

.subhead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.count-card {
  color: white;
  border-radius: 14px;
  padding: 18px;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.count-label {
  font-size: 14px;
  opacity: .92;
}

.count-value {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  margin-top: 8px;
}

.emergency { background: linear-gradient(180deg, #7f1d1d, #b91c1c); }
.flash-warning { background: linear-gradient(180deg, #9a3412, #ea580c); }
.flood-warning { background: linear-gradient(180deg, #1e3a8a, #2563eb); }
.flood-watch { background: linear-gradient(180deg, #166534, #16a34a); }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.controls input,
.controls select {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-size: 15px;
}

.controls button {
  border: 0;
  background: #111827;
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

.last-updated {
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #111827;
  color: white;
}

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

tr:hover td {
  background: #fafbfc;
}

.loading,
.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px;
}

.type-pill {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.type-pill.emergency { background: var(--emergency-soft); color: #991b1b; }
.type-pill.ffw { background: var(--flash-soft); color: #9a3412; }
.type-pill.fw { background: var(--flood-soft); color: #1d4ed8; }
.type-pill.fwatch { background: var(--watch-soft); color: #15803d; }
.type-pill.river { background: var(--river-soft); color: #6d28d9; }

.states { font-weight: 700; }
.summary { max-width: 420px; }
.area { max-width: 320px; color: var(--muted); }
.map-link a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef2ff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .meta-row { flex-direction: column; align-items: stretch; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 1120px; }
}
