/* Schrift liegt lokal, damit keine Daten an fremde Server fließen. Lizenz: fonts/Inter-LICENSE.txt */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --page: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #0f1b2d;
  --ink-2: #445061;
  --muted: #6b7686;
  --line: #dde2e8;
  --line-strong: #b6bfca;
  --accent: #0b6b43;
  --accent-dark: #084d30;
  --accent-soft: #e6f2ec;
  --warn: #8a4b00;
  --warn-soft: #fdf1dc;
  --footer: #0f1b2d;
  /* Diagrammfarben, auf Unterscheidbarkeit bei Farbfehlsichtigkeit geprüft */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #e6eaee;
  --axis: #b6bfca;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* Kopf */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 32px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 15px; font-weight: 500; }
.site-nav a { padding: 12px 0 10px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Seitenkopf */
main { padding-bottom: 72px; }
.page-head { padding: 28px 0 24px; }
.crumbs { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
h1 { margin: 0; max-width: 780px; font-size: clamp(1.8rem, 4.2vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.lead { margin: 14px 0 0; max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.19rem); color: var(--ink-2); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { flex: none; }

h2 { margin: 0 0 16px; font-size: clamp(1.35rem, 3vw, 1.625rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
h3 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 600; }
.section { margin-top: 44px; }
.kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* Rechner */
.calc { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.calc-form { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; padding: 28px; background: var(--surface-2); border-right: 1px solid var(--line); }
.calc-results { flex: 999 1 520px; min-width: 0; padding: 28px 32px 32px; }
@media (max-width: 720px) {
  .calc-form { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 18px; }
  .calc-results { padding: 22px 18px 26px; }
}
.calc-results.loading { opacity: 0.6; transition: opacity 0.2s 0.15s; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.field-row .field { min-width: 0; }
input[type="number"], select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
input::placeholder { color: var(--muted); }
input[type="number"]:hover, select:hover { border-color: var(--ink-2); }
select:disabled { opacity: 0.5; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.group { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
/* Die Speicherfelder erscheinen nur, wenn der Speicher angehakt ist. */
.battery-fields { display: none; flex-direction: column; gap: 14px; }
.group:has(#WithBattery:checked) .battery-fields { display: flex; }
details.more > summary { min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
details.more[open] > summary { margin-bottom: 8px; }
details.more .inner { display: flex; flex-direction: column; gap: 14px; }
.submit { height: 48px; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; }
.submit:hover { background: var(--accent-dark); }
/* Mit JavaScript rechnet die Seite bei jeder Eingabe neu, der Knopf ist dann überflüssig. */
.js .submit { display: none; }
/* Die Geräteauswahl füllt Felder per JavaScript vor und ist ohne JavaScript wirkungslos. */
html:not(.js) .js-only { display: none; }

/* Ergebnis */
.verdict { margin: 10px 0 0; font-size: clamp(1.6rem, 4vw, 2.125rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.verdict .yes { color: var(--accent); }
.verdict .no { color: var(--warn); }
.verdict-sub { margin: 8px 0 0; color: var(--ink-2); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 24px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics > div { padding: 16px 16px 16px 0; }
.metrics > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.metrics dt { font-size: 14px; color: var(--ink-2); }
.metrics dd { margin: 0; font-size: 1.6rem; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.metrics .sub { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.callout { margin: 20px 0 0; padding: 16px 18px; background: var(--accent-soft); border-radius: 10px; }
.callout.warn { background: var(--warn-soft); }
.callout h3 { margin: 0 0 4px; }
.callout p { margin: 0; color: var(--ink); font-size: 15px; }
.callout p + p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }

/* Diagramme */
.chart { margin-top: 28px; }
.chart h3 { margin: 0; font-size: 1rem; }
.chart .subtitle { margin: 2px 0 8px; font-size: 14px; color: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px; font-size: 14px; color: var(--ink-2); }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 7px; border-radius: 2px; background: var(--swatch); }
.plot { position: relative; }
.plot svg { display: block; width: 100%; overflow: visible; }
.plot text { font: 12px "Inter", system-ui, sans-serif; fill: var(--muted); font-variant-numeric: tabular-nums; }
.plot text.end-label { fill: var(--ink); font-weight: 600; }
.tooltip { position: absolute; z-index: 2; min-width: 160px; padding: 8px 10px; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(15, 27, 45, 0.14); pointer-events: none; }
.tooltip[hidden] { display: none; }
.tooltip .t-title { margin-bottom: 2px; font-weight: 600; }
.tooltip .t-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.tooltip .t-row b { color: var(--ink); font-weight: 600; }
.tooltip .t-key::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--swatch); }
.table-view { margin-top: 10px; }
.table-view > summary { min-height: 36px; display: flex; align-items: center; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; padding-left: 0; }
th { font-weight: 600; color: var(--ink-2); }

/* Karten und Abschnitte */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.card p { margin: 0; font-size: 15px; color: var(--ink-2); }
.card p + p { margin-top: 8px; }
a.card { display: block; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--line-strong); color: var(--ink); }
.card .tag { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.card .title { display: block; margin: 4px 0 6px; font-size: 1.125rem; font-weight: 600; }
.card .title::after { content: " →"; color: var(--accent); }
.card.planned { border-style: dashed; border-color: var(--line-strong); }
.card.planned .title::after { content: none; }

.panel { display: flex; flex-wrap: wrap; gap: 32px 48px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 720px) { .panel { padding: 22px 18px; } }
.panel > .main { flex: 2 1 420px; min-width: 0; }
.panel > .side { flex: 1 1 260px; min-width: 0; padding-left: 24px; border-left: 3px solid var(--line); }
@media (max-width: 820px) { .panel > .side { padding: 20px 0 0; border-left: 0; border-top: 3px solid var(--line); } }
.panel p { margin: 0 0 12px; color: var(--ink-2); }
.panel p:last-child { margin-bottom: 0; }
.panel .name { margin: 10px 0 2px; font-weight: 600; color: var(--ink); }

.spec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.spec table { font-size: 15px; }
.spec th, .spec td { padding: 11px 18px; }
.spec th { font-weight: 400; color: var(--ink); text-align: left; padding-left: 18px; white-space: normal; }
.spec td { font-weight: 600; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px 48px; }
@media (max-width: 480px) { .two-col { grid-template-columns: 1fr; } }
.two-col > * { min-width: 0; }
.two-col p { margin: 0 0 12px; color: var(--ink-2); }

/* Größenvergleich im Speicher-Rechner */
table.sizes tr.current td { font-weight: 700; background: var(--accent-soft); }
table.sizes td:first-child, table.sizes th:first-child { padding-left: 10px; }
.group > .kicker { margin-bottom: -2px; }

/* Bundesland-Seiten */
.section-lead { margin: -6px 0 16px; max-width: 720px; color: var(--ink-2); }
.spec.matrix th, .spec.matrix td, .spec.ranking th, .spec.ranking td { padding: 10px 14px; }
.spec.matrix tr:first-child th, .spec.ranking tr:first-child th { font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; }
.spec.matrix tr:first-child th:first-child, .spec.ranking tr:first-child th:first-child { text-align: left; }
.spec.matrix td { font-weight: 400; }
.spec.matrix td.best { font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.spec.ranking td { font-weight: 400; }
.spec.ranking tr.current th, .spec.ranking tr.current td { font-weight: 700; background: var(--accent-soft); }
.panel .verdict { color: var(--ink); }
.panel .metrics { margin-top: 18px; }
.panel .metrics dd { color: var(--ink); }
.cta { margin: 20px 0 0; }
.button { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 8px; text-decoration: none; }
.button:hover { color: #fff; background: var(--accent-dark); }
.link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.link-list a { display: inline-flex; align-items: center; min-height: 36px; font-weight: 500; }

/* Werbung: immer als solche gekennzeichnet */
.offers { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.offers .ad-label { display: inline-block; margin-bottom: 8px; padding: 2px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 4px; }
.offers .ad-reason { margin: 0; color: var(--ink-2); }
.offers ul { margin: 8px 0 0; padding: 0; list-style: none; }
.offers li { padding: 12px 0; border-top: 1px solid var(--line); }
.offers li a { font-weight: 600; }
.offers li span { display: block; font-size: 14px; color: var(--ink-2); }
.offers .ad-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }

/* Fließtext */
.prose { max-width: 720px; }
.prose p, .prose li { color: var(--ink-2); }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 24px; }
.prose .formula { margin: 12px 0; padding: 12px 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 15px; }
.faq h3 { margin: 22px 0 6px; }
.faq p { margin: 0; max-width: 720px; color: var(--ink-2); }
.faq p + p { margin-top: 10px; }

/* Startseite */
.hero { padding: 48px 0 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px 40px; margin: 0; padding: 0; list-style: none; }
.principles h3 { margin: 0 0 4px; }
.principles p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* Fuß */
.site-footer { background: var(--footer); color: #c9d1db; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 32px; padding-bottom: 32px; }
.site-footer a { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Hinweise, die innerhalb der Beschriftung stehen */
.field label .hint { display: block; margin-top: 2px; font-weight: 400; }
details.more > .field { margin-bottom: 14px; }

/* Auf kurzen Seiten bleibt der Fuß am unteren Fensterrand. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
