* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --navy: #0a1628;
  --navy-light: #132240;
  --blue: #1a56db;
  --blue-light: #e8eefb;
  --blue-mid: #2563eb;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --red: #dc2626;
  --red-light: #fef2f2;
  --green: #059669;
  --green-light: #ecfdf5;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.03);
  --max-w: 1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Header ── */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid rgba(255,255,255,0.06);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; padding: 0.7rem 0;
}

.site-title {
  font-size: 1.15rem; font-weight: 700;
  color: var(--white);
  display: flex; align-items: center; gap: 0.5rem;
  letter-spacing: -0.01em;
}
.site-title .drop { font-size: 1.3rem; }

.main-nav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--gray-400);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.main-nav a.active { color: var(--white); background: var(--blue); }

/* ── Page header ── */
.page-header {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.page-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.page-header p { opacity: 0.7; margin-top: 0.6rem; font-size: 1rem; max-width: 650px; margin-left: auto; margin-right: auto; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.hero .urgent {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.15; letter-spacing: -0.03em; }
.hero p { font-size: 1.1rem; opacity: 0.8; max-width: 650px; margin: 0 auto 1.5rem; }

/* ── Sections ── */
section { padding: 3rem 0; }
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: -0.01em;
}
.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}
.meta { font-size: 0.85rem; color: var(--gray-500); }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.75rem; color: var(--navy); }
.card p { font-size: 0.92rem; color: var(--gray-600); line-height: 1.65; }
.card .meta { font-size: 0.8rem; margin-top: 0.75rem; display: block; }
.card .tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-right: 0.3rem;
}
.card .tag.urgent-tag { background: var(--red-light); color: var(--red); }
.card .tag.orange-tag { background: var(--accent-light); color: var(--accent); }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.stat-card .stat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.stat-card .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--gray-500); font-weight: 500; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--blue); border-radius: 3px;
}
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 1.5rem; }
.timeline-item::before {
  content: '';
  position: absolute; left: -2.35rem; top: 0.35rem;
  width: 14px; height: 14px;
  background: var(--blue); border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
}
.timeline-item .date { font-size: 0.82rem; font-weight: 700; color: var(--blue); margin-bottom: 0.25rem; }
.timeline-item h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.timeline-item p { font-size: 0.88rem; color: var(--gray-500); }
.timeline-item .meta { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.3rem; display: block; }
.timeline-item.warning::before { background: #f59e0b; border-color: #f59e0b; }
.timeline-item.warning .date { color: #d97706; }
.timeline-item.danger::before { background: #ef4444; border-color: #ef4444; }
.timeline-item.danger .date { color: #dc2626; }

/* ── Tables ── */
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.info-table thead { background: var(--navy); }
.info-table th {
  color: var(--white);
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.info-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--gray-100); }
.info-table tbody tr:last-child td { border-bottom: none; }
.info-table tbody tr:hover td { background: var(--gray-50); }
.info-table a { color: var(--blue); text-decoration: none; font-weight: 500; }
.info-table a:hover { text-decoration: underline; }

/* ── Alert Banner ── */
.alert-banner {
  background: var(--gray-50);
  border-left: 4px solid var(--blue);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.alert-banner.red { background: var(--red-light); border-left-color: var(--red); }
.alert-banner.green { background: var(--green-light); border-left-color: var(--green); }
.alert-banner h4 { font-size: 0.95rem; margin-bottom: 0.3rem; color: var(--navy); }
.alert-banner p { font-size: 0.88rem; color: var(--gray-600); }
.alert-banner a { color: var(--blue); }

/* ── Tips ── */
.tips-list { list-style: none; padding: 0; }
.tips-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.tips-list li:last-child { border-bottom: none; }
.tips-list .tip-icon { font-size: 1.4rem; flex-shrink: 0; width: 2rem; text-align: center; }
.tips-list .tip-text strong { color: var(--navy); }

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer strong { color: var(--gray-300); }
.site-footer a { color: var(--blue-mid); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Links ── */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}
.back-link:hover { text-decoration: underline; }

.source-list { list-style: none; padding: 0; }
.source-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--gray-100); }
.source-list a { color: var(--blue); text-decoration: none; font-weight: 500; }
.source-list a:hover { text-decoration: underline; }
.source-list .source-meta { font-size: 0.8rem; color: var(--gray-500); display: block; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .page-header h1 { font-size: 1.4rem; }
  .section-title { font-size: 1.2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; text-align: center; }
  .site-title { font-size: 1rem; }
  .main-nav { justify-content: center; }
  .main-nav a { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
  .info-table { font-size: 0.78rem; }
  .info-table th, .info-table td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .stat-card { padding: 1rem 0.6rem; }
  .stat-card .stat-number { font-size: 1.5rem; }
}

/* ── Dashboard-specific (moved from inline) ── */
.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; margin-bottom:2rem; }
.dashboard-card {
  background:var(--white); border:1px solid var(--gray-200); border-radius:var(--radius);
  padding:1.5rem; box-shadow:var(--shadow);
}
.dashboard-card h3 { margin-top:0; font-size:1rem; display:flex; align-items:center; gap:0.5rem; color:var(--navy); }
.dashboard-card.full { grid-column:1 / -1; }
.chart-container { position:relative; width:100%; margin-top:1rem; }
.chart-container canvas { width:100% !important; }
.stat-row { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:1.5rem; }
.stat-box { flex:1; min-width:140px; background:var(--white); border:1px solid var(--gray-200); border-radius:var(--radius); padding:1rem; text-align:center; }
.stat-box .value { font-size:1.6rem; font-weight:700; line-height:1.2; color:var(--navy); }
.stat-box .label { font-size:0.8rem; color:var(--gray-500); margin-top:0.25rem; }
.status-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:0.4rem; }
.dot-green { background:var(--green); }
.dot-yellow { background:var(--accent); }
.dot-red { background:var(--red); }
.dot-gray { background:var(--gray-300); }
.data-table {
  width:100%; border-collapse:collapse; font-size:0.85rem;
  border:1px solid var(--gray-200); border-radius:var(--radius); overflow:hidden;
}
.data-table th, .data-table td { padding:0.55rem 0.75rem; border-bottom:1px solid var(--gray-100); text-align:left; }
.data-table th { font-weight:600; background:var(--gray-50); font-size:0.75rem; text-transform:uppercase; letter-spacing:0.03em; }
.data-table tbody tr:hover { background:var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom:none; }
.note-box { background:var(--blue-light); border-left:3px solid var(--blue); border-radius:4px; padding:1rem; margin:1rem 0; font-size:0.9rem; }
.latest-row { display:flex; justify-content:space-between; gap:1rem; margin:1rem 0; flex-wrap:wrap; }
.station-card {
  background:var(--white); border:1px solid var(--gray-200); border-radius:var(--radius);
  padding:0.75rem 1rem; flex:1; min-width:180px; box-shadow:var(--shadow);
}
.station-card .name { font-weight:600; font-size:0.82rem; color:var(--gray-700); }
.station-card .val { font-size:1.2rem; font-weight:700; }
.station-card .meta { font-size:0.75rem; color:var(--gray-400); margin-top:0.15rem; }
.up { color:var(--green); } .down { color:var(--red); } .stable { color:var(--accent); }
