:root {
  color-scheme: light;
  --bg: #eef3f5;
  --panel: #ffffff;
  --text: #15202b;
  --muted: #5f6f82;
  --line: #d7e0ea;
  --accent: #126f7a;
  --accent-dark: #0c4b52;
  --green: #1f7a4d;
  --yellow: #b7791f;
  --orange: #c4502c;
  --red: #b4233c;
  --purple: #6345a3;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "IBM Plex Sans", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(236, 187, 90, .18), transparent 28%),
    radial-gradient(circle at 94% 8%, rgba(18, 111, 122, .16), transparent 26%),
    linear-gradient(180deg, #f7faf9 0, var(--bg) 360px);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 3vw, 38px);
  border-bottom: 1px solid var(--line);
  background: rgba(250, 252, 251, .92);
  backdrop-filter: blur(16px);
}
.brand {
  font-family: var(--font-heading);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
}
nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.top-search,
.hero-search,
.search-page-form {
  position: relative;
  display: flex;
}
.top-search {
  width: min(440px, 34vw);
}
.top-search input,
.hero-search input,
.search-page-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid #c9d5e0;
  border-radius: 999px;
  padding: 0 106px 0 18px;
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}
.top-search input {
  height: 36px;
  padding-right: 88px;
  font-size: 14px;
}
.top-search input:focus,
.hero-search input:focus,
.search-page-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 110, 154, .12);
}
.top-search button,
.hero-search button,
.search-page-form button {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 92px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 800 13px/1 var(--font-body);
  cursor: pointer;
}
.top-search button {
  min-width: 74px;
  height: 28px;
  font-size: 12px;
}
main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 680px;
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}
h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0;
}
.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 18px);
}
.hero-search {
  width: 100%;
  margin: 10px 0 16px;
}
.ticker {
  width: 100%;
  height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.ticker div {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: ticker 36s linear infinite;
}
.ticker:hover div,
.ticker:focus-within div {
  animation-play-state: paused;
}
.ticker a {
  padding: 10px 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0 22px;
  align-items: start;
}
.control-rail {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(190, 205, 214, .95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72)),
    radial-gradient(circle at top right, rgba(196, 80, 44, .13), transparent 36%),
    radial-gradient(circle at bottom left, rgba(18, 111, 122, .16), transparent 34%);
  box-shadow: 0 22px 44px rgba(21, 32, 43, .08);
}
.control-rail h1 {
  font-size: clamp(34px, 3.2vw, 44px);
  line-height: 1.05;
}
.control-rail p {
  color: var(--muted);
  margin-bottom: 0;
}
.legend-block {
  display: grid;
  grid-template-columns: 16px auto 1fr;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}
.legend-dot.extreme { background: var(--purple); }
.legend-dot.severe { background: var(--red); }
.legend-dot.moderate { background: var(--orange); }
.legend-dot.minor { background: var(--yellow); }
.legend-block em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}
.rail-events {
  display: grid;
  gap: 8px;
}
.rail-events a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(215,224,234,.78);
  text-decoration: none;
  font-size: 14px;
}
.rail-events span {
  color: var(--muted);
}
.rail-update {
  margin-top: auto;
  font-size: 13px;
}
.js-local-time {
  white-space: nowrap;
}
.map-column {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}
.metric-strip span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 78px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  font-size: 13px;
}
.metric-strip strong {
  color: var(--text);
  font-size: 22px;
}
.alert-map-card {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  background: #dce8ec;
  box-shadow: 0 20px 50px rgba(21, 32, 43, .08);
}
#alertMap {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.leaflet-container {
  font-family: var(--font-body);
}
.leaflet-control-attribution {
  font-size: 10px;
}
.map-summary {
  position: absolute;
  left: 52px;
  top: 18px;
  z-index: 4;
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid rgba(215, 224, 234, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 26px rgba(21, 32, 43, .10);
}
.map-summary span,
.map-legend span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.map-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 27px;
  line-height: 1.08;
}
.map-state-signal {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 130px;
  pointer-events: none;
}
.map-state-signal a,
.map-state-signal > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  text-decoration: none;
  pointer-events: auto;
}
.map-state-signal strong {
  color: var(--accent);
}
.map-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 6px;
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: none;
  font-weight: 700;
}
.map-fallback {
  position: absolute;
  z-index: 5;
  left: 18px;
  right: 18px;
  bottom: 18px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
}
.map-load-error {
  position: absolute;
  z-index: 6;
  left: 18px;
  top: 94px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.leaflet-popup-content {
  min-width: 220px;
  color: var(--text);
}
.leaflet-popup-content strong,
.leaflet-popup-content span,
.leaflet-popup-content a {
  display: block;
}
.leaflet-popup-content p {
  margin: 8px 0 10px;
  color: var(--muted);
}
.map-popup-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat,
.alert-card,
.side-panel,
.table-wrap,
.detail,
.page-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.stat {
  min-height: 96px;
  padding: 15px 16px;
}
.stat span,
.stat em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.stat strong {
  display: block;
  margin: 5px 0 4px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1;
}
.section {
  padding: 28px 0;
}
.section.no-top {
  padding-top: 0;
}
.muted-band {
  border-top: 1px solid var(--line);
}
.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: start;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head a,
.source-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.alert-list {
  display: grid;
  gap: 12px;
}
.alert-list.wide {
  padding-bottom: 48px;
}
.alert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.alert-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  padding: 0;
  overflow: hidden;
}
.alert-level {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 164px;
  padding: 14px;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(150deg, rgba(255,255,255,.20), transparent 42%),
    var(--level-color, var(--accent));
}
.alert-card.extreme { --level-color: var(--purple); }
.alert-card.severe { --level-color: var(--red); }
.alert-card.moderate { --level-color: var(--orange); }
.alert-card.minor { --level-color: var(--yellow); }
.alert-card.unknown { --level-color: var(--accent); }
.alert-level span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.alert-level strong {
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 1;
}
.alert-main {
  min-width: 0;
  padding: 16px 16px 16px 0;
}
.alert-main h2 {
  margin: 8px 0 10px;
  font-size: 19px;
  line-height: 1.28;
}
.alert-main h2 a {
  text-decoration: none;
}
.alert-main p {
  color: var(--muted);
  margin-bottom: 12px;
}
.record-meta,
.alert-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.fact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fact-row span {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fact-row strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}
.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e9eef4;
  color: #2b3948;
  font-size: 12px;
  font-weight: 800;
}
.pill.extreme { background: #eee9ff; color: var(--purple); }
.pill.severe { background: #fde6ea; color: var(--red); }
.pill.moderate { background: #ffeadf; color: var(--orange); }
.pill.minor { background: #fff5d8; color: var(--yellow); }
.alert-visual {
  position: relative;
  overflow: hidden;
  width: 126px;
  aspect-ratio: 1.12;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.2)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.24) 0 9px, transparent 9px 18px),
    var(--visual-color, #dbe7f1);
}
.alert-visual.extreme { --visual-color: #d8cdf7; }
.alert-visual.severe { --visual-color: #f6c8d0; }
.alert-visual.moderate { --visual-color: #f6d5bf; }
.alert-visual.minor { --visual-color: #f4e5b7; }
.alert-visual.unknown { --visual-color: #cde5ef; }
.state-mark {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
}
.scan-line {
  position: absolute;
  inset: -40%;
  background: linear-gradient(90deg, transparent 40%, rgba(255,255,255,.56), transparent 60%);
  animation: scan 3s ease-in-out infinite;
}
@keyframes scan {
  from { transform: translateX(-30%) rotate(24deg); }
  to { transform: translateX(30%) rotate(24deg); }
}
.cell {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 0 8px rgba(255,255,255,.18);
  animation: pulse 2.8s ease-in-out infinite;
}
.cell-a { right: 22px; top: 30px; }
.cell-b { left: 38px; bottom: 24px; animation-delay: .7s; }
@keyframes pulse {
  50% { transform: scale(1.18); opacity: .7; }
}
.side-panel {
  padding: 18px;
}
.event-list {
  display: grid;
  gap: 8px;
}
.event-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.event-list span {
  color: var(--muted);
}
.state-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}
.state-tile {
  min-height: 86px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
}
.state-tile span {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
}
.state-tile strong {
  justify-self: end;
  color: var(--accent);
}
.state-tile em {
  grid-column: 1 / -1;
  align-self: end;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.state-tile.low { background: #f2fbf7; border-color: #c8e8d8; }
.state-tile.medium { background: #fff7e5; border-color: #f2d39a; }
.state-tile.high { background: #fde9ee; border-color: #f1b3c0; }
.page-title {
  padding: 42px 0 24px;
}
.page-title h1 {
  font-size: clamp(34px, 4vw, 46px);
}
.page-title p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}
.search-page-form {
  width: min(760px, 100%);
  margin: 16px 0 12px;
}
.detail {
  margin: 36px 0 48px;
  padding: clamp(20px, 4vw, 42px);
  border-top-width: 5px;
}
.detail.extreme { border-top-color: var(--purple); }
.detail.severe { border-top-color: var(--red); }
.detail.moderate { border-top-color: var(--orange); }
.detail.minor { border-top-color: var(--yellow); }
.detail-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 22px;
}
.detail-visual {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}
.detail-visual .alert-visual {
  width: 150px;
}
.detail-visual strong,
.detail-visual span {
  display: block;
}
.detail-visual span {
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 30px;
}
.bulletin-sections {
  display: grid;
  gap: 10px;
}
.bulletin-lead,
.bulletin-section {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}
.bulletin-section h3 {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-family: var(--font-heading);
  font-size: 13px;
  text-transform: uppercase;
}
.bulletin-section p {
  margin-bottom: 0;
  color: var(--muted);
}
dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 14px;
}
dt {
  color: var(--muted);
  font-weight: 800;
}
dd {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
  margin-bottom: 48px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 13px;
}
.status.ok {
  color: var(--green);
  background: #e1f2e9;
}
.status.bad {
  color: var(--red);
  background: #fde6ea;
}
.legal-title {
  max-width: 760px;
}
.legal-page {
  display: grid;
  gap: 14px;
  padding-bottom: 48px;
}
.page-card {
  padding: clamp(18px, 3vw, 26px);
}
.page-card code {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
}
.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.footer {
  border-top: 1px solid var(--line);
  padding: 26px clamp(16px, 4vw, 48px);
  color: var(--muted);
  font-size: 13px;
}
.footer p {
  margin-bottom: 10px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.footer-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 1040px) {
  .dashboard-hero,
  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .control-rail {
    position: static;
    min-height: 0;
  }
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .state-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  nav {
    margin-left: 0;
    overflow-x: auto;
  }
  .top-search {
    width: 100%;
  }
  .alert-grid {
    grid-template-columns: 1fr;
  }
  .state-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .alert-map-card {
    min-height: 320px;
  }
  .fact-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1180px);
  }
  h1 {
    font-size: 34px;
  }
  .metric-strip,
  .alert-card,
  .detail-visual {
    grid-template-columns: 1fr;
  }
  .alert-level {
    min-height: 76px;
    flex-direction: row;
    align-items: end;
  }
  .alert-main {
    padding: 14px;
  }
  .alert-visual,
  .detail-visual .alert-visual {
    width: 100%;
    aspect-ratio: 16 / 8;
  }
  .state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .map-state-signal {
    padding-right: 0;
  }
  .map-legend {
    display: none;
  }
  dl {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}