/*
 * gasspeicher-deutschland.de – Gestaltung
 *
 * Aufbau: Grundlagen, Kopfzeile, Startseite, Diagramme, Tabellen, Textseiten, Fußzeile, kleine Bildschirme
 * Farben, Abstände und Schriftgrößen stehen als Variablen am Anfang.
 */

:root {
    --bg: #f3f6f8;
    --surface: #ffffff;
    --ink: #13293d;
    --ink-soft: #33495e;
    --muted: #5d7082;
    --line: #d9e2ea;
    --line-soft: #e8eef3;
    --navy: #0b2a4a;
    --petrol: #0f7f8b;
    --petrol-dark: #0a5b64;
    --petrol-soft: #e2f1f2;
    --pos: #0e8a6d;
    --neg: #c6392f;
    --amber: #a86a12;
    --amber-soft: #fdf3df;
    --radius: 16px;
    --radius-sm: 10px;
    --font: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --wrap: 76rem;
}

/* Grundlagen ------------------------------------------------------------------ */

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-400.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-500.woff2") format("woff2");
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/ibm-plex-sans-latin-600.woff2") format("woff2");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
    color: var(--navy);
    line-height: 1.2;
    letter-spacing: -0.012em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

a {
    color: var(--petrol-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--navy);
}

:focus-visible {
    outline: 2px solid var(--petrol);
    outline-offset: 2px;
}

::selection {
    background: var(--petrol-soft);
    color: var(--petrol-dark);
}

.wrap {
    width: min(var(--wrap), 100% - 2.5rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--navy);
    color: #fff;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    left: 0;
    color: #fff;
}

.eyebrow {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--petrol-dark);
}

.lead {
    margin: 0;
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.lead strong {
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.page-head {
    max-width: 52rem;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}
.page-head h1 {
    margin: 0.4rem 0 0.9rem;
    font-size: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
}

/* Kopfzeile -------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--navy);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-decoration: none;
}
.brand:hover {
    color: var(--navy);
}
.brand-mark {
    flex: none;
    color: var(--navy);
    display: block;
}
.brand-accent {
    color: var(--petrol);
    margin-left: 0.26em;
}

.site-nav ul {
    display: flex;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-nav a {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav a:hover {
    background: var(--line-soft);
    color: var(--navy);
}
.site-nav a[aria-current="page"] {
    color: var(--petrol-dark);
    box-shadow: inset 0 -2px 0 var(--petrol);
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--navy);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
}
.nav-toggle::before {
    content: "";
    width: 1rem;
    height: 0.7rem;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}
.nav-toggle[aria-expanded="true"]::before {
    height: 1rem;
    border: 0;
    background:
        linear-gradient(45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, currentColor 45%, currentColor 55%, transparent 55%);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--petrol-soft);
    color: var(--petrol-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.status-pill:hover {
    color: var(--navy);
}
.status-dot {
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--petrol);
    box-shadow: 0 0 0 3px rgba(15, 127, 139, 0.16);
}
.status-pill.is-stale {
    background: var(--amber-soft);
    color: #7a4c08;
}
.status-dot.is-stale {
    background: var(--amber);
    box-shadow: 0 0 0 3px rgba(168, 106, 18, 0.18);
}

/* Startseite: Kopfbereich ------------------------------------------------------ */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 2rem 2.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.hero h1 {
    margin: 0.3rem 0 0;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
}

.hero-figure {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0.5rem 0 0.25rem;
}
.figure-value {
    font-size: clamp(4.5rem, 2.6rem + 8.5vw, 8.5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.045em;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}
.figure-unit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding-bottom: 0.5rem;
    font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
    font-weight: 500;
    color: var(--muted);
}

.hero-meta {
    margin: 0.4rem 0 0;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}
.hero-sub {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}
.hero-sub strong {
    color: var(--navy);
    font-weight: 600;
}

.hero-gauge {
    width: clamp(8.5rem, 6rem + 7vw, 12.5rem);
}
.tank {
    display: block;
    width: 100%;
    height: auto;
}
.tank-label {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    fill: var(--muted);
}
.gauge-note {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
}

.tag {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: 0.12em;
}
.tag-ok {
    background: var(--petrol-soft);
    color: var(--petrol-dark);
}
.tag-est {
    background: var(--amber-soft);
    color: var(--amber);
}

.data-status {
    margin-top: 1rem;
    padding: 0 0.35rem;
    color: var(--ink-soft);
    font-size: 0.9375rem;
}
.status-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0;
}
.status-line .status-dot {
    align-self: center;
}

.notice {
    margin: 0.5rem 0 0;
    padding: 0.6rem 0.9rem;
    border: 1px solid #f1dcb2;
    border-radius: var(--radius-sm);
    background: var(--amber-soft);
    color: #6d4508;
    font-size: 0.9375rem;
}
.notice-template {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--amber);
    border-radius: var(--radius);
    background: #fff8e6;
    color: #6d4508;
    max-width: 52rem;
}
.notice-template strong {
    display: block;
    margin-bottom: 0.2rem;
}

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.kpi {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 1.1rem 1.4rem;
    border-left: 1px solid var(--line);
}
.kpi:first-child {
    border-left: 0;
}
.kpi-label {
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.kpi-value {
    color: var(--navy);
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.kpi-note {
    color: var(--muted);
    font-size: 0.8125rem;
}
.kpi-pos .kpi-value::before,
.kpi-neg .kpi-value::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 0.45em;
    border-left: 0.32em solid transparent;
    border-right: 0.32em solid transparent;
    vertical-align: 0.18em;
}
.kpi-pos .kpi-value::before {
    border-bottom: 0.45em solid var(--pos);
}
.kpi-neg .kpi-value::before {
    border-top: 0.45em solid var(--neg);
}

/* Karten und Diagramme --------------------------------------------------------- */

.card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.card > h2 {
    margin: 0;
    font-size: 1.375rem;
}
.card > h2 + .card-sub,
.card-sub {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.9375rem;
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}
.card-head h2 {
    margin: 0;
    font-size: 1.375rem;
}

.range-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.1rem;
    padding: 0.2rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
}
.range-btn {
    appearance: none;
    padding: 0.3rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}
.range-btn:hover {
    background: var(--surface);
    color: var(--navy);
}
.range-btn[aria-pressed="true"] {
    background: var(--navy);
    color: #fff;
}
.range-switch-small {
    background: var(--surface);
}

.chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}
.toolbar-label {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.875rem;
    cursor: pointer;
}
.chip:hover {
    border-color: #b9c8d5;
}
.chip:has(input:checked) {
    border-color: #b5dbe0;
    background: var(--petrol-soft);
    color: var(--petrol-dark);
}
.chip input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--petrol);
}
.chip:has(input:disabled) {
    opacity: 0.45;
    cursor: not-allowed;
}

.chart-frame {
    position: relative;
}
.chart {
    width: 100%;
    height: 24rem;
    transition: opacity 0.2s;
}
.chart-tall {
    height: 31rem;
}
.chart[data-busy="true"] {
    opacity: 0.45;
}

.chart-block + .chart-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
}
.chart-title {
    margin: 0 0 0.75rem;
    font-size: 1.0625rem;
}

.chart-note {
    max-width: 70ch;
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.875rem;
}
.chart-note strong {
    color: var(--ink-soft);
    font-weight: 600;
}
.chart-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}
.chart-foot .chart-note {
    flex: 1 1 24rem;
}
.chart-message {
    margin: 0.5rem 0 0;
    color: #7a4c08;
    font-size: 0.9375rem;
}
.text-link {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* ECharts-Tooltip (Inhalt wird vom Skript gesetzt) */
.gas-tooltip .tt-date {
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.gas-tooltip .tt-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    white-space: nowrap;
}
.gas-tooltip .tt-row.is-current {
    font-weight: 600;
}
.gas-tooltip .swatch {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    vertical-align: 0.05em;
}
.gas-tooltip .swatch-line {
    width: 1rem;
    height: 0;
    border-top: 2px solid currentColor;
    border-radius: 0;
}
.gas-tooltip .tt-note {
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}
.gas-tooltip .pos {
    color: var(--pos);
}
.gas-tooltip .neg {
    color: var(--neg);
}

/* Tabellen --------------------------------------------------------------------- */

.table-wrap {
    margin-top: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}
.data-table caption {
    padding-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.8125rem;
    text-align: left;
}
.data-table th,
.data-table td {
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    white-space: nowrap;
}
.data-table th {
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
    vertical-align: bottom;
}
.data-table th:first-child,
.data-table td:first-child {
    padding-left: 0;
}
.data-table .num {
    text-align: right;
}
.data-table tbody tr:hover {
    background: #f7fafb;
}
.data-table tr.is-current td {
    background: var(--petrol-soft);
    font-weight: 600;
}
.data-table small {
    color: var(--muted);
    font-size: 0.8125rem;
}
.data-table-text td,
.data-table-text th {
    white-space: normal;
}
.data-table code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
}

.data-details {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line-soft);
}
.data-details summary {
    color: var(--petrol-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
}

/* Startseite: Lagebeschreibung, Einstiege, Fragen --------------------------------- */

.summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 2rem;
}
.summary-copy h2 {
    margin: 0 0 0.75rem;
    font-size: 1.375rem;
}
.summary-copy p {
    margin: 0 0 0.85rem;
}
.summary-copy p:first-of-type {
    font-size: 1.1875rem;
    line-height: 1.55;
}
.fact-list {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    margin: 0;
    padding-left: 2rem;
    border-left: 1px solid var(--line);
}
.fact {
    display: grid;
    gap: 0.05rem;
}
.fact dt {
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.fact dd {
    margin: 0;
    color: var(--navy);
    font-size: 1.125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.fact dd small {
    display: block;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 400;
}

.teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.teaser {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.25rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s;
}
.teaser:hover {
    border-color: var(--petrol);
}
.teaser h2 {
    margin: 0;
    font-size: 1.125rem;
}
.teaser p {
    flex: 1;
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}
.teaser-more {
    color: var(--petrol-dark);
    font-size: 0.9375rem;
    font-weight: 500;
}
.teaser-more::after {
    content: "›";
    margin-left: 0.35em;
}

.faq {
    margin-top: 2.5rem;
    max-width: 52rem;
}
.faq h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}
.faq-item {
    border-bottom: 1px solid var(--line);
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    color: var(--navy);
    font-size: 1.0625rem;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    flex: none;
    color: var(--petrol);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item p {
    max-width: 70ch;
    margin: 0 0 1.25rem;
    color: var(--ink-soft);
}

.basis-card p {
    margin: 0.5rem 0 0;
    color: var(--ink-soft);
}

/* Textseiten --------------------------------------------------------------------- */

.prose {
    max-width: 70ch;
}
.prose h2 {
    margin: 0 0 0.75rem;
    font-size: 1.375rem;
}
.prose p {
    margin: 0 0 1rem;
}
.prose ul,
.prose ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}
.prose li {
    margin-bottom: 0.4rem;
}
.prose li::marker {
    color: var(--petrol);
    font-weight: 600;
}
.prose code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--bg);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.875em;
}
.prose blockquote {
    margin: 0 0 1rem;
    padding: 0.75rem 1.1rem;
    border-left: 3px solid var(--petrol);
    border-radius: 0 8px 8px 0;
    background: var(--petrol-soft);
    color: var(--petrol-dark);
}
.prose blockquote p {
    margin: 0;
}
.prose address {
    font-style: normal;
}
/* Angaben des Anbieters (Impressum, Datenschutz): Den Text füllt legal.js in data-legal-p.
   Ohne JavaScript (dann fehlt „js" an html) bleiben die Absätze leer – das Bild übernimmt. */
html:not(.js) [data-legal-p] {
    display: none;
}
.legal-image {
    display: block;
    max-width: 100%;
    height: auto;
}
.formula {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
}
.hint {
    color: var(--muted);
    font-size: 0.875rem;
    font-style: italic;
}
.source-note {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 0.8125rem;
}

.toc {
    max-width: 52rem;
    margin-top: 1.5rem;
    padding: 1rem 1.4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}
.toc-title {
    margin: 0 0 0.25rem;
    font-weight: 600;
}
.toc ol {
    columns: 2;
    column-gap: 3rem;
    margin: 0;
    padding-left: 1.2rem;
}
.toc li {
    margin-bottom: 0.15rem;
    break-inside: avoid;
}
.toc a {
    text-decoration: none;
}
.toc a:hover {
    text-decoration: underline;
}

.record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}
.record {
    display: grid;
    gap: 0.1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.record-label {
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
}
.record-value {
    color: var(--navy);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.record-note {
    color: var(--ink-soft);
    font-size: 0.875rem;
}

.link-list {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}
.link-list a {
    font-weight: 500;
}

.error-card {
    max-width: 46rem;
    margin-top: 2rem;
}
.error-card h1 {
    margin: 0.35rem 0 0.75rem;
    font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}
.error-detail {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.8125rem;
    white-space: pre-wrap;
}

/* Fußzeile ------------------------------------------------------------------------ */

.site-footer {
    margin-top: 3rem;
    background: var(--navy);
    color: #c9d6e2;
}
.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.5rem 0 1.75rem;
}
.footer-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-weight: 600;
}
.footer-title .brand-mark {
    color: #fff;
}
.footer-title .brand-accent {
    color: #74c8d0;
}
.footer-brand p {
    max-width: 40ch;
    margin: 0.9rem 0 0;
    font-size: 0.9375rem;
}
.footer-column h2 {
    margin: 0 0 0.75rem;
    color: #8fa3b6;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.footer-column ul {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-column a {
    color: #dbe6ef;
    text-decoration: none;
}
.footer-column a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding: 1rem 0 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #8fa3b6;
    font-size: 0.8125rem;
}
.footer-base p {
    margin: 0;
}
.footer-base a {
    color: #c9d6e2;
}

/* Kleine Bildschirme -------------------------------------------------------------- */

@media (max-width: 64rem) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .summary-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
    .fact-list {
        padding-left: 0;
        padding-top: 1.25rem;
        border-left: 0;
        border-top: 1px solid var(--line);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 62rem) {
    .brand-name {
        display: inline-flex;
        flex-direction: column;
        font-size: 0.98rem;
        line-height: 1.15;
    }
    .brand-accent {
        margin-left: 0;
    }
    html.js .nav-toggle {
        display: inline-flex;
    }
    html.js .status-pill {
        margin-left: 0;
    }
    html.js .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }
    html.js .site-nav.is-open {
        display: block;
    }
    html.js .site-nav ul {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.5rem 1.25rem 1rem;
    }
    html.js .site-nav a {
        padding: 0.7rem 0.75rem;
        font-size: 1rem;
    }
    html.js .site-nav a[aria-current="page"] {
        border-radius: 8px;
        background: var(--petrol-soft);
        box-shadow: none;
    }
    html:not(.js) .header-inner {
        flex-wrap: wrap;
        padding-bottom: 0.4rem;
    }
    html:not(.js) .site-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.35rem;
    }
    html:not(.js) .status-pill {
        margin-left: auto;
    }
}

@media (max-width: 54rem) {
    .teaser-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        padding: 1.5rem 1.5rem 1.75rem;
    }
    .hero-gauge {
        width: 8.5rem;
        margin: 0 auto;
    }
    .toc ol {
        columns: 1;
    }
}

@media (max-width: 48rem) {
    .data-table {
        font-size: 0.875rem;
    }
    .data-table th,
    .data-table td {
        padding: 0.45rem 0.6rem;
    }
    .data-table th {
        white-space: normal;
        vertical-align: bottom;
    }
    .table-wrap.is-scrollable::before {
        content: "Tabelle seitlich scrollbar \2192";
        display: block;
        margin-bottom: 0.35rem;
        color: var(--petrol-dark);
        font-size: 0.75rem;
        font-weight: 500;
    }
    .kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kpi:nth-child(3) {
        border-left: 0;
    }
    .kpi:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }
    .card {
        padding: 1.15rem;
    }
    .chart {
        height: 19rem;
    }
    .chart-tall {
        height: 25rem;
    }
    .card-head {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 26rem) {
    body {
        font-size: 1rem;
    }
    .wrap {
        width: calc(100% - 1.5rem);
    }
    html.js .status-pill {
        display: none;
    }
    .kpi {
        padding: 0.9rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

@media print {
    .site-header,
    .site-footer,
    .range-switch,
    .chart-toolbar,
    .chart-foot,
    .skip-link {
        display: none !important;
    }
    body {
        background: #fff;
        font-size: 11pt;
    }
    .card,
    .hero,
    .kpi-strip {
        break-inside: avoid;
        border-color: #999;
    }
}
