:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16191d;
  --muted: #5d6670;
  --border: #e2e5e9;
  --grid: #e9ecef;
  --smhi: #2563eb;
  --yr: #0d9488;
  --klart: #e8590c;
  --past: rgba(0, 0, 0, 0.035);
  --ok: #15803d;
  --bad: #b91c1c;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1a1e23;
    --text: #e8eaed;
    --muted: #9aa3ad;
    --border: #2b3138;
    --grid: #262c33;
    --smhi: #60a5fa;
    --yr: #2dd4bf;
    --klart: #fb923c;
    --past: rgba(255, 255, 255, 0.04);
    --ok: #4ade80;
    --bad: #f87171;
      color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
a { color: var(--smhi); }
h1 { font-size: 1.75rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
h3 { font-size: 0.95rem; margin: 20px 0 6px; color: var(--muted); font-weight: 600; }
section { margin-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { font-size: 0.9em; background: var(--surface); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }

.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.top p { margin: 4px 0 0; }

.src-smhi { --c: var(--smhi); }
.src-yr { --c: var(--yr); }
.src-klart { --c: var(--klart); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); margin-right: 8px; vertical-align: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; border-top: 3px solid var(--c, var(--border)); }
.card-head { font-weight: 600; }
.card-main { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.sym { font-size: 1.9rem; line-height: 1; }
.temp { font-size: 2.2rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 10px 0 0; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.legend { display: flex; gap: 16px; font-size: 0.9rem; }
.chart-box { position: relative; height: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.chart-box.short { height: 180px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: none; }
thead th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
tbody th { font-weight: 600; }
.days td { min-width: 150px; }
.day-cell { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.day-cell .sym { font-size: 1.4rem; }
.tmax { font-weight: 650; }
.tmin { color: var(--muted); }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; cursor: help; }

footer { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 12px; }
footer p { margin: 4px 0; }

.arrow { display: inline-block; margin-right: 3px; font-weight: 700; line-height: 1; }


.chart-note { margin: 0 0 8px; }
