/* seite.css · Österreich in echtem Maßstab
 * Lesart: Papierweiß und Druckschwarz wie ein amtlicher Bericht, darin ein einziges rotes Band in echtem Maßstab,
 * daneben ein Maßband. Schmale Grotesk (Saira Condensed) für Zahlen und Überschriften, Public Sans für Text:
 * sachlich wie ein Amtsbericht, mit klaren Ziffern ohne durchgestrichene Null.
 *
 * Maßstab: 1 CSS-Pixel Fläche = 1.000 €. Die Bandbreite ist je Bildschirm fest (250 / 500 / 1.000 Pixel), daraus folgt,
 * wie viele Pixel eine Milliarde hoch ist (--px-mrd). Jede Lage im Band steht in Milliarden (--mrd) im HTML und wird
 * hier in Pixel umgerechnet; so stimmt das Band auch ohne JavaScript. */

@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira Condensed"; src: url("../fonts/saira-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("../fonts/public-sans-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bandbreite: 250;            /* Pixel, als Zahl */
  --px-mrd: 4000;               /* Pixel Höhe je Milliarde = 1.000.000 / Bandbreite */
  --lineal: 40px;               /* Breite des Maßbands rechts vom Band */
  --band-weiss: #fffdfa;
  --band-weiss-2: rgba(255, 255, 255, 0.78);
  --zahl-gross: clamp(4.4rem, 1.2rem + 14vw, 13.5rem);
}
@media (min-width: 640px) { :root { --bandbreite: 500; --px-mrd: 2000; --lineal: 52px; } }
@media (min-width: 1180px) { :root { --bandbreite: 1000; --px-mrd: 1000; --lineal: 56px; } }

body { font-variant-numeric: lining-nums; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
.kopf-fest .kopfzeile { backdrop-filter: none; }
.marke { font-size: 1.2rem; font-weight: 700; letter-spacing: 0; }
.marke::before { content: ""; width: 7px; height: 22px; margin-right: 10px; background: var(--akzent); }

/* ---------- Erster Bildschirm: Zahl als Held, das Band ragt unten herein */
.anfang { min-height: calc(100svh - clamp(72px, 12svh, 120px)); align-items: center; padding-bottom: clamp(28px, 5svh, 56px); }
.anfang-raster { display: grid; gap: 28px clamp(32px, 5vw, 80px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .anfang-raster { grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); align-items: end; } }
.titel { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 4.4rem); line-height: 0.95; letter-spacing: -0.01em; font-weight: 600; }
.titel-zahl { display: block; margin-top: 0.08em; font-size: var(--zahl-gross); font-weight: 700; line-height: 0.86; letter-spacing: -0.025em; white-space: nowrap; }
.titel-zahl small { font-size: 0.42em; letter-spacing: -0.005em; }
.unterzeile { max-width: 38rem; color: var(--text-2); }
.beleg strong { font-variant-numeric: tabular-nums; }
.anfang-text .knopf--rahmen { color: var(--text); }

/* Pro-Kopf-Anteil: ein echtes Quadrat von 7 × 7 Pixeln */
.anteil { margin: 0; padding: 22px 0 0; border-top: 2px solid var(--text); display: grid; gap: 8px; }
.anteil-quadrat { display: inline-block; width: 6.9px; height: 6.9px; margin-left: 0.35em; vertical-align: 0.1em; background: var(--akzent); }
.anteil-zahl { font-family: var(--schrift-display); font-weight: 700; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.anteil figcaption { color: var(--text-2); font-size: 0.98rem; line-height: 1.45; }
@media (max-width: 999px) { .anteil { max-width: 30rem; } }

@media (prefers-reduced-motion: no-preference) {
  .js .anfang-text { transform: translateY(calc(var(--p, 0) * -70px)); opacity: calc(1 - var(--p, 0) * 0.9); }
  .js .anteil { transform: translateY(calc(var(--p, 0) * -30px)); }
}

/* ---------- Das Band */
.band-abschnitt { position: relative; padding-bottom: 0; }
.band-raster { display: grid; grid-template-columns: calc(var(--bandbreite) * 1px) var(--lineal); justify-content: start; }
.band { position: relative; width: calc(var(--bandbreite) * 1px); height: calc(var(--mrd-gesamt) * var(--px-mrd) * 1px); color: var(--band-weiss);
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0) 7px, rgba(0, 0, 0, 0) calc(100% - 7px), rgba(0, 0, 0, 0.10)),
    var(--akzent); }
/* Lage im Band: --mrd Milliarden vom Anfang */
.im-band { position: absolute; left: 0; right: 0; top: calc(var(--mrd) * var(--px-mrd) * 1px); }

/* Anfang des Bandes: Erklärung dort, wo sie gilt */
.band-start { top: 0; padding: clamp(18px, 3vw, 40px) clamp(16px, 3vw, 44px) 0; }
.band-start h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 0.95; }
.band-start p { max-width: 36rem; margin-top: 14px; color: var(--band-weiss); }
.band-start .zahl-hier { font-variant-numeric: tabular-nums; }
.nur-klein, .nur-mittel, .nur-gross { display: none; }
.nur-klein { display: inline; }
@media (min-width: 640px) { .nur-klein { display: none; } .nur-mittel { display: inline; } }
@media (min-width: 1180px) { .nur-mittel { display: none; } .nur-gross { display: inline; } }

/* Eine Million Euro als weiße Fläche: so hoch wie 1.000.000 € bei dieser Bandbreite */
.zeile-million { height: calc(1000px / var(--bandbreite)); }
.zeile-million::before { content: ""; position: absolute; inset: 0; background: var(--band-weiss); }
.zeile-million + .notiz, .notiz { position: absolute; left: clamp(16px, 3vw, 44px); right: clamp(16px, 3vw, 44px); font-size: 0.95rem; line-height: 1.45; color: var(--band-weiss); }
.notiz-ueber { bottom: 100%; padding-bottom: 10px; }
.notiz-unter { top: 100%; padding-top: 10px; }
.notiz strong { font-family: var(--schrift-display); font-weight: 700; font-size: 1.35rem; display: block; line-height: 1.1; }

/* Der eigene Anteil im Band: weißes Quadrat 7 × 7 */
.quadrat-im-band { position: absolute; left: clamp(16px, 3vw, 44px); width: 7px; height: 7px; background: var(--band-weiss); }

/* Milliarden-Striche innen am linken Rand (Beschriftung setzt band.js) */
.band::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--band-weiss-2) 0 1px, transparent 1px calc(var(--px-mrd) * 1px)); }
.mrd-marke { position: absolute; left: 18px; transform: translateY(-50%); font-family: var(--schrift-display); font-weight: 600; font-size: 0.8rem; line-height: 1; color: var(--band-weiss-2); font-variant-numeric: tabular-nums; pointer-events: none; }

/* Jahresmarken: weiße Linie quer, darüber Jahr und Stand */
.jahr { height: 0; border-top: 2px solid var(--band-weiss); scroll-margin-top: 50svh; }
.jahr-text { position: absolute; bottom: 100%; left: clamp(36px, 4vw, 60px); right: 12px; padding-bottom: 10px; }
.jahr h3 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.3rem); line-height: 0.95; color: var(--band-weiss); }
.jahr p { margin-top: 4px; font-size: 0.98rem; line-height: 1.4; color: var(--band-weiss); max-width: 34rem; }
.jahr .stand { font-family: var(--schrift-display); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* Vergleiche: eine weiße Klammer am rechten Innenrand, genau so hoch wie der Betrag */
.vergleich { height: calc(var(--hoehe-mrd) * var(--px-mrd) * 1px); }
.vergleich::before { content: ""; position: absolute; top: 0; bottom: 0; right: clamp(10px, 2vw, 24px); width: 10px; border: 2px solid var(--band-weiss); border-left: 0; }
.vergleich-text { position: sticky; top: calc(var(--kopf-hoehe) + 24px); margin: 18px clamp(44px, 5vw, 70px) 0 clamp(36px, 4vw, 60px); max-width: 30rem; padding: 14px 16px; background: var(--text); color: var(--band-weiss); font-size: 0.98rem; line-height: 1.45; }
.vergleich-text strong { display: block; font-family: var(--schrift-display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; }
.vergleich-text a { color: var(--band-weiss); }

/* Ende des Bandes */
.band-ende { top: auto; bottom: 0; }
.band-ende-text { position: absolute; top: 100%; left: 0; right: 0; padding-top: 10px; color: var(--text); }

/* Maßband rechts: Striche je Zentimeter, länger je 10 cm, Zahl je Meter (band.js setzt die Meter genau) */
.lineal { position: relative; height: 100%; border-left: 1px solid var(--text); background:
  repeating-linear-gradient(to bottom, var(--text) 0 1px, transparent 1px 37.7953px) left top / 9px 100% no-repeat; }
.js .lineal { background: none; }
.meter { position: absolute; left: 0; width: 100%; height: 3779.5276px;
  background:
    linear-gradient(var(--text), var(--text)) left top / 100% 2px no-repeat,
    repeating-linear-gradient(to bottom, var(--text) 0 1px, transparent 1px 377.95276px) left top / 22px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--text) 0 1px, transparent 1px 37.795276px) left top / 9px 100% no-repeat; }
.meter span { position: absolute; top: 6px; right: 4px; font-family: var(--schrift-display); font-weight: 700; font-size: 0.82rem; line-height: 1; font-variant-numeric: tabular-nums; }

/* Zeiger am Maßband: auf halber Bildschirmhöhe, dort wird gemessen */
.zeiger { position: fixed; top: 50%; z-index: 30; width: calc(var(--lineal) + 12px); height: 2px; margin-top: -1px; background: var(--text); pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.zeiger::after { content: ""; position: absolute; right: -2px; top: 50%; border-block: 7px solid transparent; border-right: 10px solid var(--text); transform: translateY(-50%); }
.im-band-aktiv .zeiger { opacity: 1; }

/* Anzeige: was bis zum Zeiger zusammengekommen ist */
.anzeige { position: fixed; z-index: 40; right: var(--kante); bottom: 16px; width: min(320px, calc(100% - 2 * var(--rand))); padding: 14px 18px 16px; background: var(--grund); color: var(--text); border: 2px solid var(--text); font-variant-numeric: tabular-nums; contain: layout paint; }
.js .anzeige { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 0.3s ease, transform 0.3s var(--aus), visibility 0s linear 0.3s; }
.js.im-band-aktiv .anzeige { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s ease, transform 0.3s var(--aus), visibility 0s; }
.anzeige-betrag { display: block; font-family: var(--schrift-display); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.anzeige-zeile { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 0.92rem; color: var(--text-2); }
.anzeige-meter { color: var(--text); font-weight: 650; }
.anzeige-knoepfe { display: flex; gap: 8px; margin-top: 12px; }
.anzeige-knoepfe .knopf { min-height: 44px; padding: 0 16px; font-size: 0.95rem; flex: 1 1 auto; }
@media (max-width: 639px) {
  .anzeige { left: 0; right: 0; bottom: 0; width: auto; border-width: 2px 0 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; }
  .anzeige-betrag { font-size: 1.7rem; }
  .anzeige-zeile { grid-column: 1; margin: 0; font-size: 0.85rem; }
  .anzeige-knoepfe { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .anzeige-knoepfe [data-sprung="anfang"] { display: none; }
}
/* Ohne JavaScript steht die Anzeige nicht da (sie hätte nichts zu zählen) */
html:not(.js) .anzeige, html:not(.js) .zeiger { display: none; }

/* Sprungleiste am Anfang des Bandes */
.sprungleiste { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.sprungleiste a { min-height: 44px; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1.5px solid var(--band-weiss); color: var(--band-weiss); font-family: var(--schrift-display); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .sprungleiste a:hover { background: var(--band-weiss); color: var(--akzent); } }
.band :focus-visible, .vergleich-text :focus-visible { outline-color: var(--band-weiss); }

/* ---------- Nach dem Band: drei Zahlen, groß gesetzt */
.ende { padding-top: clamp(120px, 14vw, 200px); }
.ende h2 { font-size: var(--t-gross); max-width: 18ch; }
.ende-satz { margin-top: 18px; max-width: 40rem; color: var(--text-2); }
.zahlenband { margin: clamp(40px, 6vw, 80px) 0 0; padding: 0; list-style: none; display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); border-top: 2px solid var(--text); }
@media (min-width: 800px) { .zahlenband { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.zahlenband li { padding: 26px 24px 30px 0; border-bottom: 1px solid var(--linie); }
@media (min-width: 800px) { .zahlenband li + li { padding-left: 24px; border-left: 1px solid var(--linie); } }
.zahlenband b { display: block; font-family: var(--schrift-display); font-weight: 700; font-size: clamp(3rem, 2rem + 3.4vw, 5.6rem); line-height: 0.92; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.zahlenband span { display: block; margin-top: 10px; color: var(--text-2); max-width: 26ch; }
@media (prefers-reduced-motion: no-preference) {
  .js .zahlenband li { transform: translateY(calc((1 - var(--p, 1)) * 60px)); }
  .js .zahlenband li:nth-child(2) { transform: translateY(calc((1 - var(--p, 1)) * 110px)); }
  .js .zahlenband li:nth-child(3) { transform: translateY(calc((1 - var(--p, 1)) * 160px)); }
}

/* ---------- Quellen: Liste mit Stand und Link */
.quellen h2 { font-size: var(--t-gross); max-width: 20ch; }
.quellen-satz { margin-top: 16px; max-width: 42rem; color: var(--text-2); }
.quellen-liste { margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; list-style: none; counter-reset: q; }
.quellen-liste li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 32px; padding: 20px 0; }
@media (min-width: 900px) { .quellen-liste li { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.quellen-liste li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--text); transform-origin: left; }
.quellen-liste .wert { font-family: var(--schrift-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.quellen-liste .was { display: block; font-family: var(--schrift-text); font-weight: 400; font-size: 0.98rem; color: var(--text-2); }
.quellen-liste .woher { color: var(--text-2); font-size: 0.98rem; }
.quellen-liste a { color: var(--text); text-decoration-color: var(--akzent); text-decoration-thickness: 2px; overflow-wrap: anywhere; }
.rechnung { margin-top: clamp(32px, 4vw, 48px); max-width: 46rem; padding: 20px 22px; background: var(--grund-2); color: var(--text-2); font-size: 0.98rem; }
.rechnung strong { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .js .quellen-liste li::after { transform: scaleX(calc(0.15 + var(--p, 1) * 1.4)); }
}

/* ---------- Kontakt: ein rotes Stück Band wächst auf volle Breite */
.kontakt h2 { font-size: var(--t-gross); max-width: 18ch; }
.kontakt-streifen { height: 14px; margin-bottom: clamp(32px, 5vw, 56px); background: var(--akzent); transform-origin: left; }
.kontakt-satz { margin-top: 16px; max-width: 40rem; color: var(--text-2); }
.kontakt .handlung { margin-top: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .js .kontakt-streifen { transform: scaleX(calc(0.04 + min(1, var(--p, 1) * 1.8) * 0.96)); }
}

/* ---------- Fußzeile */
.fuss { text-align: center; }

/* ---------- Lage jeder Marke im Band, in Milliarden Euro vom Anfang (Quellen: Abschnitt „Quellen“ der Seite) */
.band { --mrd-gesamt: 438.856; }                       /* Schuldenstand Ende Juni 2026, 438.856 Mio. € */
#million { --mrd: 0.75; }
#milliarde-1 { --mrd: 1; }
#vergleich-koralmbahn { --mrd: 10; --hoehe-mrd: 6.139; }
#vergleich-zinsen { --mrd: 30; --hoehe-mrd: 8.187; }
#vergleich-bildung { --mrd: 50; --hoehe-mrd: 12.5475; }
#vergleich-pension { --mrd: 75; --hoehe-mrd: 20.2928; }
#jahr-1995 { --mrd: 120.650; }
#budget { --mrd: 125.852; }
#jahr-2000 { --mrd: 141.543; }
#jahr-2005 { --mrd: 175.204; }
#jahr-2008 { --mrd: 202.915; }
#halbzeit { --mrd: 219.428; }
#jahr-2009 { --mrd: 231.173; }
#jahr-2015 { --mrd: 292.874; }
#jahr-2016 { --mrd: 296.693; }
#jahr-2020 { --mrd: 316.360; }
#jahr-2021 { --mrd: 334.731; }
#jahr-2022 { --mrd: 351.144; }
#jahr-2023 { --mrd: 371.618; }
#jahr-2024 { --mrd: 395.047; }
#jahr-2025 { --mrd: 418.374; }
#jahr-2026 { --mrd: 438.856; }
.jahr--fein { border-top-style: dashed; border-top-width: 2px; }
.jahr--fein h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.3rem); }
.jahr--ende { border-top: 0; }
.mrd-marke { top: calc(var(--k) * var(--px-mrd) * 1px); }

/* Rechtliches: ein Link allein in einer Zeile bekommt eine volle Tippfläche */
.lesetext dd > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }
