:root {
  --bg: #e7efee;
  --panel: #f4f8f7;
  --ink: #0f3640;
  --muted: #557178;
  --grid: #c9d9d8;
  --thermal: #0b8794;
  --sauna: #c4410f;
  --parking: #5b5f8f;
  --focus: #0b8794;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1f24;
    --panel: #12292f;
    --ink: #dcebea;
    --muted: #8aa8ad;
    --grid: #24424a;
    --thermal: #3fc0cb;
    --sauna: #f2793f;
    --parking: #a3a8e0;
    --focus: #3fc0cb;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 "Schibsted Grotesk", system-ui, sans-serif;
}
svg, .tip, .day small { font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.top, main, .foot { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.top {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  justify-content: space-between; align-items: center;
  padding-top: 20px;
}
.brand { margin: 0; font-weight: 700; }
.brand span { color: var(--muted); font-weight: 400; margin-left: .35em; }

.range { display: inline-flex; border: 1px solid var(--grid); border-radius: 999px; padding: 3px; }
.range button {
  border: 0; background: none; padding: 4px 12px; border-radius: 999px;
  font-size: 14px; color: var(--muted);
}
.range button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Die Antwort auf die eigentliche Frage ist das Erste, was man sieht */
.hero { padding: 56px 0 28px; }
.hero h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(30px, 5.2vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 17em;
  text-wrap: balance;
}
.hero h1 b { white-space: nowrap; }
.hero h1 b { font-weight: 800; }
.hero h1 .v-thermal { color: var(--thermal); }
.hero h1 .v-sauna { color: var(--sauna); }
.hero h1 .v-parking { color: var(--parking); }
.subline { margin: 16px 0 0; color: var(--muted); font-size: 18px; max-width: 60ch; }

.focus { padding: 24px 0 8px; }
.focus-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
h2 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }

.key { margin: 4px 0 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key span[class^="k-"] { width: 22px; height: 0; border-top: 2.5px solid var(--ink); }
.key .k-forecast { border-top-style: dashed !important; opacity: .6; margin-left: 10px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--grid); border-radius: 999px;
  padding: 4px 12px 4px 10px; font-size: 14px;
}
.chip i { width: 14px; height: 3px; border-radius: 2px; background: currentColor; }
.chip[data-key="thermal"] i { background: var(--thermal); }
.chip[data-key="sauna"] i { background: var(--sauna); }
.chip[data-key="parking"] i { background: var(--parking); }
.chip[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; opacity: .7; }

.chart-wrap { position: relative; margin-top: 16px; }
#focus-chart { width: 100%; height: clamp(260px, 42vw, 420px); display: block; overflow: visible; }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; min-height: 1.5em; }

.week { padding: 48px 0 24px; }
.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.day {
  text-align: left;
  background: var(--panel);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 10px 6px;
}
.day:hover { border-color: var(--grid); }
.day[aria-pressed="true"] { border-color: var(--ink); }
.day .name { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.day .name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.day svg { width: 100%; height: 84px; display: block; margin-top: 6px; }

/* SVG */
.gridline { stroke: var(--grid); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 12px; }
.line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.line.forecast { stroke-width: 2; stroke-dasharray: 5 5; opacity: .6; }
.line.real { stroke-width: 2.75; }
.mini .line { stroke-width: 1.5; }
.s-thermal { --c: var(--thermal); }
.s-sauna { --c: var(--sauna); }
.s-parking { --c: var(--parking); }
.line { stroke: var(--c); }
.dot, .endlabel { fill: var(--c); }
.now { stroke: var(--ink); stroke-dasharray: 2 3; opacity: .5; }
.endlabel { font-size: 13px; font-weight: 700; stroke: none; }
.cursor { stroke: var(--ink); opacity: .35; }
.empty { fill: var(--muted); font-size: 14px; }

.tip {
  position: absolute; top: 0; pointer-events: none;
  background: var(--ink); color: var(--bg);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; line-height: 1.45;
  white-space: nowrap; transform: translateX(-50%);
}
.tip b { display: block; }
.tip span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); }

.foot { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 40px; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .top, main, .foot { padding: 0 16px; }
  .top { padding-top: 16px; }
  .hero { padding-top: 36px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
