/* flood.netcivic.com */

:root {
  --bg: #0a0e13;
  --surface: #0d1117;
  --ink: #e6edf3;
  --ink-muted: #8b949e;
  --ink-hint: #484f58;
  --border: #21262d;
  --green: #3fb950;
  --green-dim: rgba(63, 185, 80, 0.08);
  --amber: #d29922;
  --amber-dim: rgba(210, 153, 34, 0.08);
  --red: #f85149;
  --red-dim: rgba(248, 81, 73, 0.08);
  --blue: #58a6ff;

  --font-display: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --space: 1.5rem;
  --max-w: 920px;
}

[data-theme="light"] {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --ink: #0e1525;
  --ink-muted: #4b5563;
  --ink-hint: #9ca3af;
  --border: #d1d5db;
  --green: #2d8a4e;
  --green-dim: rgba(45, 138, 78, 0.06);
  --amber: #b07a1a;
  --amber-dim: rgba(176, 122, 26, 0.06);
  --red: #c53030;
  --red-dim: rgba(197, 48, 48, 0.06);
  --blue: #3d6b8e;
}


/* Reset */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}


/* Layout */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space);
}


/* Navigation */

.site-nav {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  line-height: 1;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.logo-dot {
  color: var(--green);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--ink-hint);
  font-size: 0.85rem;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--ink-muted);
  border-color: var(--ink-hint);
}


/* Hero */

.hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.hero-sync {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-hint);
  margin-top: 0.5rem;
}


/* River sections */

.river-section {
  padding: 1.75rem 0;
}

.river-section + .river-section {
  border-top: 1px solid var(--border);
}

.river-label {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}


/* Gauge cards */

.gauge-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gauge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.gauge-card--flooding {
  background: var(--red-dim);
  border-color: var(--red);
}

.gauge-card--near-flood {
  background: var(--amber-dim);
}

.gauge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.gauge-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.gauge-status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gauge-status--normal     { color: var(--green); }
.gauge-status--rising     { color: var(--amber); }
.gauge-status--near-flood { color: var(--amber); }
.gauge-status--flooding   { color: var(--red); font-weight: 600; }
.gauge-status--monitoring { color: var(--ink-hint); }
.gauge-status--offline    { color: var(--ink-hint); }

.gauge-reading {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.gauge-height {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.gauge-unit {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.gauge-trend {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  margin-left: 0.5rem;
  color: var(--ink-muted);
}

.gauge-trend--rising { color: var(--amber); }
.gauge-trend--falling { color: var(--blue); }

.gauge-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.gauge-flow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.gauge-flood {
  font-size: 0.75rem;
  color: var(--ink-hint);
}

.gauge-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-hint);
}


/* No data */

.no-data {
  padding: 3rem 0;
}

.no-data p {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  text-align: center;
}


/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-source {
  font-size: 0.75rem;
  color: var(--ink-hint);
}

.footer-source a {
  border-bottom: 1px solid var(--border);
}

.footer-source a:hover {
  color: var(--ink-muted);
}

.footer-meta {
  font-size: 0.75rem;
  color: var(--ink-hint);
}

.footer-meta a {
  border-bottom: 1px solid var(--border);
}

.footer-meta a:hover {
  color: var(--ink-muted);
}


/* Responsive */

@media (max-width: 640px) {
  :root { --space: 1.25rem; }

  .hero { padding: 2rem 0 1.5rem; }

  .gauge-card {
    padding: 0.875rem 1rem;
  }

  .gauge-height {
    font-size: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
