:root {
  --blue-900: #123b6b;
  --blue-700: #1f5ea8;
  --blue-500: #4d84d8;
  --ink: #172033;
  --muted: #64748b;
  --line: #d8e0ea;
  --surface: #ffffff;
  --background: #f4f7fb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at top right, rgba(77,132,216,.11), transparent 36rem), var(--background);
}
button, a { font: inherit; }
.topbar {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: white;
  box-shadow: 0 4px 20px rgba(18,59,107,.23);
}
.topbar__inner {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 150px;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.eyebrow, .section-kicker {
  margin: 0 0 6px;
  font-size: .75rem;
  letter-spacing: .14em;
  font-weight: 800;
}
.eyebrow { color: #cfe2ff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.75rem,4vw,3rem); line-height: 1.08; }
.subtitle { margin-bottom: 0; color: #dbeafe; }
.status-box { display: grid; justify-items: end; gap: 10px; min-width: 240px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 9px 14px; font-size: .88rem; font-weight: 800;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24);
}
.status-pill::before { content:""; width:9px; height:9px; border-radius:50%; background:currentColor; box-shadow:0 0 0 4px rgba(255,255,255,.12); }
.status-pill--ok { color:#bdfbd5; }
.status-pill--warning { color:#ffe1a1; }
.status-pill--error { color:#ffc1c1; }
.status-pill--loading { color:#dbeafe; }
.last-update { font-size:.9rem; color:#dbeafe; text-align:right; }
.page { width:min(1480px,calc(100% - 32px)); margin:0 auto; padding:34px 0 60px; }
.section-heading, .panel__header { display:flex; align-items:end; justify-content:space-between; gap:24px; margin-bottom:18px; }
.section-kicker { color:var(--blue-700); }
h2 { margin-bottom:0; font-size:clamp(1.35rem,2vw,1.85rem); }
.archive-info, .note { color:var(--muted); font-size:.9rem; }
.archive-info { text-align:right; margin-bottom:0; }
.note { margin:14px 2px 32px; }
.metrics-grid { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); gap:12px; }
.metric-card, .loading-panel { background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 8px 24px rgba(24,39,75,.06); }
.loading-panel { grid-column:1/-1; min-height:160px; display:grid; place-items:center; color:var(--muted); padding:24px; text-align:center; }
.metric-card { min-height:214px; overflow:hidden; }
.metric-card__header { padding:12px 14px; border-bottom:1px solid var(--line); color:var(--blue-900); font-size:.92rem; font-weight:800; }
.metric-card__value { min-height:72px; padding:15px 12px 11px; display:flex; align-items:baseline; justify-content:center; gap:5px; font-size:clamp(1.35rem,2.1vw,2rem); font-weight:900; text-align:center; }
.metric-card__unit { font-size:.82rem; color:var(--muted); font-weight:700; }
.metric-table { width:100%; border-collapse:collapse; font-size:.78rem; }
.metric-table th, .metric-table td { border-top:1px solid #edf1f6; padding:7px 6px; text-align:right; white-space:nowrap; }
.metric-table th { text-align:left; color:var(--muted); font-weight:700; }
.metric-max { color:#dc2626; }
.metric-min { color:#2563eb; }
.metric-single { text-align:center!important; color:var(--ink); font-weight:800; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:0 12px 32px rgba(24,39,75,.07); padding:22px; margin-top:24px; }
.toolbar { display:flex; align-items:center; gap:12px; }
.range-selector { display:flex; padding:3px; border:1px solid var(--line); border-radius:10px; background:#f7f9fc; }
.range-button, .download-button { border-radius:8px; padding:8px 12px; font-size:.85rem; font-weight:800; cursor:pointer; }
.range-button { border:0; background:transparent; color:var(--muted); }
.range-button.is-active { color:white; background:var(--blue-700); }
.download-button { text-decoration:none; border:1px solid var(--blue-700); color:var(--blue-700); background:white; }
.download-button:hover { color:white; background:var(--blue-700); }
.charts-message { margin:8px 0 16px; padding:12px 14px; border-radius:10px; background:#fff7e7; color:#8a5100; }
.charts-stack { display:grid; gap:15px; }
.chart-card, .wind-card { border:1px solid var(--line); border-radius:13px; background:#fff; overflow:hidden; }
.chart-card h3, .wind-card h3 { margin:0; padding:12px 14px 4px; font-size:.95rem; }
.chart-card canvas { display:block; width:100%; height:250px; }
.wind-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.wind-card canvas { display:block; width:100%; height:410px; }
.about { margin:32px auto 0; max-width:900px; text-align:center; color:var(--muted); }
.about h2 { color:var(--ink); margin-bottom:10px; }
footer { padding:26px 16px 38px; text-align:center; color:var(--muted); font-size:.85rem; }
footer p { margin:0; }
@media (max-width:1280px) { .metrics-grid { grid-template-columns:repeat(4,1fr); } }
@media (max-width:820px) {
  .topbar__inner, .section-heading, .panel__header { align-items:flex-start; flex-direction:column; }
  .status-box { justify-items:start; min-width:0; }
  .last-update, .archive-info { text-align:left; }
  .metrics-grid { grid-template-columns:repeat(2,1fr); }
  .wind-grid { grid-template-columns:1fr; }
  .toolbar { width:100%; justify-content:space-between; flex-wrap:wrap; }
}
@media (max-width:520px) {
  .page, .topbar__inner { width:min(100% - 20px,1480px); }
  .metrics-grid { grid-template-columns:1fr; }
  .panel { padding:14px 8px; }
  .chart-card canvas { height:225px; }
}
