@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --line: #e8e7e0;
  --line-strong: #c9c8bf;
  --ink: #1c1c1a;
  --ink-2: #4d4d47;
  --ink-3: #66665f;
  --temp: #c4621a;
  --temp-light: #f2c7a0;
  --temp-band: rgba(196, 98, 26, 0.16);
  --rain: #3b7bbf;
  --wind: #0a9a6e;
  --pressure: #9050c8;
  --cold: #3b7bbf;
  --warn-bg: #fff4e5;
  --warn-ink: #7a3d00;
  --radius: 12px;
  --gap: clamp(16px, 2.4vw, 28px);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  caret-color: var(--temp);
}

::selection { background: var(--temp-light); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

h1, h2, h3, p { margin: 0; }
b { font-weight: 650; color: var(--ink); }

.top, main, .foot { width: min(1240px, 100% - 2 * var(--gap)); margin-inline: auto; }

.top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 22px 0 6px;
}
.top h1 { font-size: 15px; font-weight: 650; letter-spacing: 0.01em; }
.status { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wind); }
.status.stale .dot { background: var(--temp); }

.banner {
  width: min(1240px, 100% - 2 * var(--gap)); margin: 12px auto 0;
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0d2a8;
  border-radius: var(--radius); padding: 12px 16px; font-size: 15px;
}

main { display: grid; gap: clamp(40px, 6vw, 72px); padding: 18px 0 40px; }

/* Aktuell */
.now { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }

.temp {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: clamp(5rem, 15vw, 7.5rem); font-weight: 220; line-height: 0.92; letter-spacing: -0.04em;
  margin: 6px 0 14px;
}
.temp .u { font-size: 2rem; font-weight: 400; letter-spacing: 0; color: var(--ink-2); margin-top: 0.35em; }
.sub, .extremes { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 16px; color: var(--ink-2); }
.extremes { margin-top: 6px; }
.extremes small { font-size: 13px; color: var(--ink-3); }
.extremes .lo b { color: var(--cold); }
.extremes .hi b { color: var(--temp); }
.hero .chart { margin-top: 18px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px 15px; min-width: 0;
}
.tile h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.big { font-size: 28px; font-weight: 450; line-height: 1.2; margin-top: 4px; letter-spacing: -0.01em; }
.big .u { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.note { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.wind-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.compass { width: 44px; height: 44px; flex: none; }
.compass circle { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.compass text { font-size: 7px; font-weight: 700; fill: var(--ink-3); text-anchor: middle; }
.compass path { fill: var(--wind); }
.compass line { stroke: var(--wind); stroke-width: 2; stroke-linecap: round; }
.compass #arrow { transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1); transform-origin: 24px 24px; }
.sums { display: flex; gap: 14px; margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line); }
.sums div { min-width: 0; }
.sums dt { font-size: 12px; color: var(--ink-3); }
.sums dd { margin: 0; font-size: 15px; font-weight: 600; }

/* Verlauf */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -0.015em; }

.seg { display: inline-flex; background: #efeee8; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  font: inherit; font-size: 14px; font-weight: 550; color: var(--ink-2); background: transparent;
  border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(28, 28, 26, 0.12); }

.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px var(--gap); transition: opacity 200ms ease-out; }
.charts[aria-busy="true"] { cursor: progress; }
.fig { margin: 0; min-width: 0; }
.fig.wide { grid-column: 1 / -1; }
.fig[hidden] { display: none; }
.charts.two .fig:not(.wide) { grid-column: span 1; }
.charts.monthly { grid-template-columns: minmax(0, 1fr); }
figcaption { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
figcaption h3 { font-size: 16px; font-weight: 650; }
.hint { font-size: 13px; color: var(--ink-3); }
.legend { display: inline-flex; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 5px; }
.legend i.dash { border-top-style: dashed; }
.legend i.box { width: 10px; height: 10px; border: 0; border-radius: 3px; }
.legend i.dot { width: 9px; height: 9px; border: 0; border-radius: 50%; }

/* Grafiken */
.chart { position: relative; width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .grid.zero { stroke: var(--line-strong); stroke-dasharray: none; }
.chart .axis text { font-size: 12px; fill: var(--ink-3); font-family: inherit; }
.chart .band { opacity: 1; }
.chart .ring { stroke: var(--bg); stroke-width: 2; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart .hit { cursor: crosshair; outline: none; }
.chart .col .hit { cursor: default; }
.chart .col .mark { transition: opacity 120ms ease-out; }
.chart .col.on .mark { opacity: 0.75; }
.chart .mark.partial { fill-opacity: 0.55; }
.chart .col .hit:focus-visible { outline: none; }
.chart .col:has(.hit:focus-visible) .mark { outline: none; opacity: 0.7; }
.chart .hit:focus-visible { stroke: var(--ink); stroke-width: 1.5; }
.chart-empty { font-size: 14px; color: var(--ink-3); padding: 28px 0; }

.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 140px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(28, 28, 26, 0.12); padding: 9px 11px; font-size: 13px;
}
.tip-title { color: var(--ink-3); margin-bottom: 3px; white-space: nowrap; }
.tip-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tip-row i { display: inline-block; width: 12px; height: 0; border-top: 2px solid; border-color: inherit; }
.tip-row i { border-top-color: currentColor; }
.tip-row strong { font-weight: 650; }
.tip-row span { color: var(--ink-2); }

.table-view { margin-top: 6px; font-size: 13px; }
.table-view summary { cursor: pointer; color: var(--ink-3); width: max-content; }
.table-view summary:hover { color: var(--ink); }
.table-view table { border-collapse: collapse; margin-top: 8px; max-height: 320px; display: block; overflow: auto; }
.table-view caption { text-align: left; color: var(--ink-3); padding-bottom: 4px; }
.table-view th, .table-view td { text-align: right; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-view th:first-child, .table-view td:first-child { text-align: left; }

/* Rekorde */
.pick select {
  font: inherit; font-size: 15px; font-weight: 550; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231c1c1a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 38px 8px 16px;
  appearance: none; cursor: pointer;
}
.records > .hint { margin: -8px 0 18px; }
.rec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.rec > div { padding: 18px 20px 20px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rec dt { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.rec dd { margin: 4px 0 0; }
.rec .val { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 350; letter-spacing: -0.02em; line-height: 1.15; }
.rec .val.hot { color: var(--temp); }
.rec .val.cold { color: var(--cold); }
.rec .when { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.foot { padding: 18px 0 34px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }

@media (max-width: 980px) {
  .now { grid-template-columns: minmax(0, 1fr); }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .rec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .temp { font-size: clamp(4.5rem, 24vw, 6rem); }
  .tiles { gap: 8px; }
  .tile { padding: 12px 13px 13px; }
  .big { font-size: 24px; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 7px 6px; font-size: 13px; }
  .rec > div { padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
.note:empty { display: none; }
.tip-row i.dash { border-top-style: dashed; }
.sums dd { white-space: nowrap; }
@media (max-width: 560px) {
  .sums { gap: 10px; justify-content: space-between; }
  .sums dd { font-size: 14px; }
}
