/* ==========================================================================
   Verantwortung ohne Ausführung · interaktive Web-App zum Grundlagenpapier
   mib Management Institut Bochum · Designsprache: mib (Roboto Slab, Open Sans)
   ========================================================================== */

:root {
  /* mib-Palette (Marke) */
  --mib-rot: #C0143C;
  --mib-orange: #EF8200;
  --mib-petrol: #00677F;
  --mib-grau: #616265;

  /* Flächen und Tinte, hell */
  --bg: #F3F3F1;
  --panel: #FFFFFF;
  --panel-2: #F8F8F6;
  --ink: #1D1D1F;
  --ink-2: #45454A;
  --ink-3: #6B6B70;
  --line: #DCDCD8;
  --line-2: #ECECE9;

  /* Semantische Akzente: Fläche, Text auf Grund, weiche Fläche */
  --rot: #C0143C;
  --rot-text: #C0143C;
  --rot-soft: #FBECEF;
  --orange: #EF8200;
  --orange-text: #A85C00;
  --orange-soft: #FFF3E3;
  --petrol: #00677F;
  --petrol-text: #00677F;
  --petrol-soft: #E4F0F3;
  --grau: #616265;
  --grau-text: #55565A;
  --grau-soft: #EEEEEC;

  --dark: #1D1D1F;
  --dark-2: #2A2A2E;
  --on-dark: #F4F4F2;
  --on-dark-2: #C9C9CC;
  --stat: #C0143C;
  --focus: #00677F;
  --shadow: 0 1px 2px rgba(29, 29, 31, .06), 0 8px 24px rgba(29, 29, 31, .06);

  --font-display: "Roboto Slab", "Rockwell", "Georgia", serif;
  --font-body: "Open Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --radius: 6px;
  --maxw: 1120px;
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141416;
    --panel: #1F1F23;
    --panel-2: #26262B;
    --ink: #F2F2F0;
    --ink-2: #D0D0D3;
    --ink-3: #A0A0A6;
    --line: #37373D;
    --line-2: #2C2C31;
    --rot-text: #F06A85;
    --rot-soft: #3A1B23;
    --orange-text: #FFA640;
    --orange-soft: #3A2A14;
    --petrol-text: #5EC0D6;
    --petrol-soft: #10313B;
    --grau-text: #B9B9BE;
    --grau-soft: #2C2C31;
    --dark: #0D0D0F;
    --dark-2: #1A1A1E;
    --stat: #EF8200;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141416;
  --panel: #1F1F23;
  --panel-2: #26262B;
  --ink: #F2F2F0;
  --ink-2: #D0D0D3;
  --ink-3: #A0A0A6;
  --line: #37373D;
  --line-2: #2C2C31;
  --rot-text: #F06A85;
  --rot-soft: #3A1B23;
  --orange-text: #FFA640;
  --orange-soft: #3A2A14;
  --petrol-text: #5EC0D6;
  --petrol-soft: #10313B;
  --grau-text: #B9B9BE;
  --grau-soft: #2C2C31;
  --dark: #0D0D0F;
  --dark-2: #1A1A1E;
  --stat: #EF8200;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Grundgerüst
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  padding-inline: var(--gutter);
  padding-block: 0;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--petrol-text); text-underline-offset: 3px; }
a:hover { color: var(--rot-text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
p { margin: 0 0 1em; max-width: 68ch; }
ul, ol { padding-left: 1.3em; max-width: 68ch; }
li { margin-bottom: .35em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
  text-wrap: balance;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
.wrap { max-width: var(--maxw); margin-inline: auto; }
.narrow { max-width: 760px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Die mib-Signatur: „//" als Marke */
.mark { font-family: var(--font-display); font-weight: 700; color: var(--rot-text); font-style: italic; letter-spacing: -.05em; }
.eyebrow {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .9em;
  display: flex; gap: .55em; align-items: center;
}
.eyebrow.rot { color: var(--rot-text); }
.eyebrow.petrol { color: var(--petrol-text); }
.eyebrow.orange { color: var(--orange-text); }

/* --------------------------------------------------------------------------
   Kopfleiste und Fortschritt
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand .mark { font-size: 1.5rem; }
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.brand .sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.stations { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; flex: 1; -webkit-overflow-scrolling: touch; padding-inline: 6px; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
.stations::-webkit-scrollbar { display: none; }
.stations a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .7rem; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-size: .86rem; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.stations a .n { font-family: var(--font-display); font-size: .78rem; color: var(--ink-3); }
.stations a:hover { background: var(--panel-2); color: var(--ink); }
.stations a.active { background: var(--rot); color: #fff; box-shadow: 0 1px 0 var(--rot); }
.stations a.active .n { color: rgba(255,255,255,.8); }
.stations a.route::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.topbar .tools { display: flex; gap: .4rem; align-items: center; }
.iconbtn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer;
}
.iconbtn:hover { border-color: var(--ink-3); }
.progress { height: 3px; background: transparent; margin-inline: calc(-1 * var(--gutter)); }
.progress > i { display: block; height: 100%; width: 0; background: var(--rot); transition: width .15s linear; }

/* --------------------------------------------------------------------------
   Bühne (Hero)
   -------------------------------------------------------------------------- */
.hero { padding-block: 56px 40px; }
.hero .grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: start; }
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent { color: var(--rot-text); }
.hero .authors { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-3); font-size: .92rem; margin-top: 1.4rem; }
.hero .authors b { color: var(--ink); font-weight: 600; }

.frage {
  background: var(--dark); color: var(--on-dark);
  border-radius: var(--radius); padding: 1.6rem 1.7rem; box-shadow: var(--shadow);
}
.frage .eyebrow { color: var(--on-dark-2); }
.frage .q { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.35; margin: 0 0 1.1rem; }
.frage .btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.frage .btn { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,.35); }
.frage .btn:hover, .frage .btn[aria-pressed="true"] { background: var(--mib-rot); border-color: var(--mib-rot); color: #fff; }
.frage .reveal { margin-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.18); padding-top: 1rem; }
.frage .reveal p { max-width: none; color: var(--on-dark-2); }
.frage .reveal .big { color: var(--on-dark); font-family: var(--font-display); font-size: 1.1rem; }
.frage .reveal .stat { color: var(--mib-orange); }

/* --------------------------------------------------------------------------
   Bausteine: Knöpfe, Chips, Karten
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.05rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn-primary:hover { background: #A5102F; border-color: #A5102F; }
.btn-ghost { background: transparent; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: .5rem .95rem; cursor: pointer; font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); color: #fff; }
.chip .ico { width: 18px; height: 18px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.card.flat { box-shadow: none; }
.stripe { border-left: 4px solid var(--grau); }
.stripe.rot { border-left-color: var(--rot); }
.stripe.orange { border-left-color: var(--orange); }
.stripe.petrol { border-left-color: var(--petrol); }
.topline { border-top: 4px solid var(--grau); }
.topline.rot { border-top-color: var(--rot); }
.topline.orange { border-top-color: var(--orange); }
.topline.petrol { border-top-color: var(--petrol); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.stack { display: grid; gap: 1.2rem; }

.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 700; padding: .3rem .65rem; border-radius: 4px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2);
}
.badge .lbl { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.badge.rot { background: var(--rot); border-color: var(--rot); color: #fff; }
.badge.rot .lbl { color: rgba(255,255,255,.8); }
.badge.orange { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-text); }
.badge.petrol { background: var(--petrol-soft); border-color: var(--petrol); color: var(--petrol-text); }
.badge.grau { background: var(--grau-soft); border-color: var(--grau); color: var(--grau-text); }

.stat { font-family: var(--font-display); font-weight: 700; color: var(--stat); font-variant-numeric: tabular-nums; }
.stat.xl { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; }
.stat.lg { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.05; }

/* Fazit-Block, dunkel, mit // */
.fazit {
  background: var(--dark); color: var(--on-dark); border-radius: var(--radius);
  padding: 1.8rem 2rem; display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start;
}
.fazit .mark { font-size: 2.4rem; line-height: 1; color: #fff; }
.fazit .eyebrow { color: var(--on-dark-2); margin-bottom: .4em; }
.fazit p { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.35; margin: 0; max-width: 60ch; color: var(--on-dark); }
.fazit p .accent { color: var(--mib-orange); }
.fazit.rot { background: var(--mib-rot); }
.fazit.rot .mark, .fazit.rot .eyebrow { color: rgba(255,255,255,.85); }
.fazit.rot p .accent { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 4px; }

/* Zitat aus dem Papier */
.zitat {
  border-left: 4px solid var(--rot); padding: .2rem 0 .2rem 1.2rem; margin: 1.4rem 0;
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1.45; color: var(--ink); max-width: 62ch;
}
.zitat .src { display: block; font-family: var(--font-body); font-size: .8rem; color: var(--ink-3); margin-top: .5rem; letter-spacing: .06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Stationen (Abschnitte)
   -------------------------------------------------------------------------- */
.station { padding-block: 72px; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.station.alt { background: var(--panel); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.station-head { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start; margin-bottom: 2.2rem; }
.station-head .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 4rem); line-height: .9; color: var(--rot-text); }
.station-head .num small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-body); margin-bottom: .4rem; }
.block { margin-block: 2.6rem; }
.block > h3 { margin-bottom: 1rem; }

/* Perspektiv-Hinweise: nur für die gewählte Rolle sichtbar */
.persp-note {
  display: none; margin: 1.2rem 0; padding: 1rem 1.2rem; border-radius: var(--radius);
  background: var(--orange-soft); border: 1px solid var(--orange); border-left-width: 4px;
}
.persp-note.show { display: block; }
.persp-note .eyebrow { color: var(--orange-text); margin-bottom: .35em; }
.persp-note p { margin: 0; max-width: 70ch; }
.persp-banner {
  display: none; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--orange-soft); border: 1px solid var(--orange); border-radius: var(--radius);
  padding: .7rem 1rem; margin-block: 1rem;
}
.persp-banner.show { display: flex; }
.persp-banner b { color: var(--orange-text); }

/* Perspektiven-Station */
.persp-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.persp-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.4rem; }
.persp-panel .einwand {
  background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 1.5rem 1.6rem;
}
.persp-panel .einwand .eyebrow { color: var(--on-dark-2); }
.persp-panel .einwand blockquote { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.35; }
.persp-panel .einwand .kern { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); color: var(--on-dark-2); }
.persp-panel .einwand .kern b { color: var(--mib-orange); }
.persp-panel .tun ol { padding-left: 1.2em; }
.persp-panel .tun li { margin-bottom: .6em; }
.persp-panel .route { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.persp-panel .route a { text-decoration: none; }

/* Vier Fragen als Kompass */
.kompass { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.kompass a {
  text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-top: 4px solid var(--rot); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .5rem;
}
.kompass a:nth-child(2) { border-top-color: var(--petrol); }
.kompass a:nth-child(3) { border-top-color: var(--orange); }
.kompass a:nth-child(4) { border-top-color: var(--grau); }
.kompass a:hover { border-color: var(--ink-3); border-top-width: 4px; }
.kompass .q { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.kompass .s { font-size: .82rem; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Kurzfilm (animierte Sequenz)
   -------------------------------------------------------------------------- */
.film {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.film .film-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.film .film-head .t { font-family: var(--font-display); font-weight: 600; }
.film .film-head .dur { color: var(--ink-3); font-size: .85rem; }
.film .screen { background: var(--panel-2); aspect-ratio: 16 / 8.4; max-width: 100%; position: relative; }
.film .screen svg { width: 100%; height: 100%; display: block; }
.film .caption { padding: 1rem 1.1rem; min-height: 4.6rem; border-top: 1px solid var(--line-2); }
.film .caption p { margin: 0; max-width: none; }
.film .caption .sc { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .2rem; }
.film .controls { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-top: 1px solid var(--line-2); }
.film .controls .dots { display: flex; gap: .35rem; margin-left: auto; }
.film .controls .dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--ink-3); background: transparent; padding: 0; cursor: pointer; }
.film .controls .dots button[aria-current="true"] { background: var(--rot); border-color: var(--rot); }
.film .bar { height: 3px; background: var(--line-2); }
.film .bar > i { display: block; height: 100%; width: 0; background: var(--rot); }
.film .bar > i.run { transition: width linear; }

/* SVG-Text und Animationen in Filmen */
.film svg text { font-family: var(--font-body); fill: var(--ink); }
.film svg .disp { font-family: var(--font-display); font-weight: 700; }
.film svg .lbl { font-size: 13px; fill: var(--ink-2); }
.film svg .tiny { font-size: 11px; fill: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.film svg .node { fill: var(--panel); stroke: var(--ink-3); stroke-width: 1.5; }
.film svg .node.rot { stroke: var(--rot); stroke-width: 2; }
.film svg .node.petrol { stroke: var(--petrol); stroke-width: 2; }
.film svg .node.dark { fill: var(--dark); stroke: var(--dark); }
.film svg .node.dark ~ text, .film svg text.on-dark { fill: var(--on-dark); }
.film svg .arrow { stroke: var(--ink-3); stroke-width: 2; fill: none; }
.film svg .arrow.broken { stroke: var(--rot); stroke-dasharray: 6 6; }
.film svg .x { stroke: var(--rot); stroke-width: 3; }
.film svg .ok { fill: var(--petrol); }
.film svg .fail { fill: var(--rot); }
.film svg .barmark { fill: var(--petrol); }
.film svg .pillar { fill: var(--grau-soft); stroke: var(--line); }
.film svg .warn { fill: var(--rot-soft); stroke: var(--rot); }
.film svg .f-in { opacity: 0; animation: fIn .55s ease forwards; animation-delay: var(--d, 0s); }
.film svg .f-pop { opacity: 0; transform-origin: center; transform-box: fill-box; animation: fPop .45s cubic-bezier(.2,.8,.3,1.2) forwards; animation-delay: var(--d, 0s); }
.film svg .f-fade { animation: fOut .6s ease forwards; animation-delay: var(--d, 0s); }
.film svg .f-grow { transform-origin: bottom; transform-box: fill-box; transform: scaleY(0); animation: fGrow .5s ease forwards; animation-delay: var(--d, 0s); }
@keyframes fIn { to { opacity: 1; } }
@keyframes fPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fOut { to { opacity: .18; } }
@keyframes fGrow { to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .film svg .f-in, .film svg .f-pop { opacity: 1; animation: none; }
  .film svg .f-grow { transform: none; animation: none; }
  .film svg .f-fade { opacity: .18; animation: none; }
  .film .bar > i.run { transition: none; }
}

/* --------------------------------------------------------------------------
   Fünf Funktionen
   -------------------------------------------------------------------------- */
.fn-list { display: grid; gap: .6rem; }
.fn-row {
  display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 1rem; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius);
  padding: .9rem 1.1rem; cursor: pointer; text-align: left; width: 100%;
}
.fn-row .no { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.fn-row .ttl { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.fn-row .en { color: var(--ink-3); font-size: .85rem; margin-left: .5rem; font-family: var(--font-body); font-weight: 400; }
.fn-row[aria-expanded="true"] { background: var(--panel-2); }
.fn-detail { display: none; padding: 1rem 1.2rem 1.2rem 4.6rem; }
.fn-detail.open { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.fn-detail h4 { margin-bottom: .3rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-body); }
.fn-detail p { margin: 0; }
.fn-summary { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 1.4rem; align-items: center; }

/* --------------------------------------------------------------------------
   Allokations-Check
   -------------------------------------------------------------------------- */
.check { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.4rem; align-items: start; }
.check .q-list { display: grid; gap: .9rem; }
.check .q {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem;
}
.check .q .t { display: flex; gap: .6rem; align-items: baseline; margin-bottom: .55rem; }
.check .q .t .k { font-family: var(--font-display); font-weight: 700; color: var(--rot-text); }
.check .q .t b { font-weight: 600; }
.check .q .opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.check .q .opts label { cursor: pointer; }
.check .q .opts input { position: absolute; opacity: 0; pointer-events: none; }
.check .q .opts span {
  display: inline-block; padding: .38rem .75rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; font-weight: 600; background: var(--panel);
}
.check .q .opts input:checked + span { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.check .q .opts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check .q .inline { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.check .q input[type="number"], .calc input[type="number"] {
  font: inherit; padding: .4rem .6rem; width: 7.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.verdict { position: sticky; top: 76px; }
.verdict .stage-big { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.verdict .stage-big .s { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: #fff; background: var(--rot); padding: .4rem .8rem; border-radius: 6px; }
.verdict .stage-big .s.grau { background: var(--grau); } .verdict .stage-big .s.petrol { background: var(--petrol); } .verdict .stage-big .s.orange { background: var(--orange); } .verdict .stage-big .s.dark { background: var(--dark); }
.verdict ul { margin: .6rem 0 0; padding-left: 1.1em; }
.verdict li { margin-bottom: .45em; font-size: .95rem; }
.verdict .kand { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

/* --------------------------------------------------------------------------
   Autonomiestufen
   -------------------------------------------------------------------------- */
.stufen { display: grid; grid-template-columns: 1fr 1fr 1fr 30px 1fr 1fr; gap: .5rem; margin-bottom: 1.2rem; position: relative; }
.stufe-btn {
  border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: .8rem .6rem; cursor: pointer; text-align: left;
  border-top: 4px solid var(--grau); display: grid; gap: .25rem;
}
.stufe-btn .s { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.stufe-btn .t { font-size: .85rem; font-weight: 600; line-height: 1.25; }
.stufe-btn .pips { display: flex; gap: 3px; }
.stufe-btn .pips i { width: 9px; height: 12px; background: var(--line); display: block; }
.stufe-btn[data-s="0"] { border-top-color: var(--grau); } .stufe-btn[data-s="0"] .s { color: var(--grau-text); }
.stufe-btn[data-s="1"] { border-top-color: var(--petrol); } .stufe-btn[data-s="1"] .s { color: var(--petrol-text); }
.stufe-btn[data-s="2"] { border-top-color: var(--orange); } .stufe-btn[data-s="2"] .s { color: var(--orange-text); }
.stufe-btn[data-s="3"] { border-top-color: var(--rot); } .stufe-btn[data-s="3"] .s { color: var(--rot-text); }
.stufe-btn[data-s="4"] { border-top-color: var(--dark); background: var(--dark); color: var(--on-dark); } .stufe-btn[data-s="4"] .s { color: var(--mib-orange); }
.stufe-btn[data-s="0"] .pips i.on { background: var(--grau); } .stufe-btn[data-s="1"] .pips i.on { background: var(--petrol); }
.stufe-btn[data-s="2"] .pips i.on { background: var(--orange); } .stufe-btn[data-s="3"] .pips i.on { background: var(--rot); } .stufe-btn[data-s="4"] .pips i.on { background: var(--mib-orange); }
.stufe-btn[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.sollbruch { display: flex; align-items: center; justify-content: center; color: var(--rot-text); font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); border-right: 2px dashed var(--rot); padding: .3rem 0; white-space: nowrap; }
.stufe-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.stufe-detail ul { margin: .4rem 0 0; }

/* --------------------------------------------------------------------------
   Rechner
   -------------------------------------------------------------------------- */
.calc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; display: grid; gap: 1rem; }
.calc .row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.calc label { font-weight: 600; font-size: .95rem; }
.calc .hint { color: var(--ink-3); font-size: .85rem; font-weight: 400; display: block; }
.calc input[type="range"] { width: 100%; accent-color: var(--rot); }
.calc .val { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.calc .out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.calc .out .tile { background: var(--panel-2); border-radius: var(--radius); padding: .9rem 1rem; border: 1px solid var(--line-2); }
.calc .out .tile .k { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .2rem; }
.calc .out .tile .v { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc .out .tile .v.rot { color: var(--rot-text); } .calc .out .tile .v.petrol { color: var(--petrol-text); } .calc .out .tile .v.orange { color: var(--orange-text); }
.calc .note { font-size: .9rem; color: var(--ink-2); margin: 0; max-width: none; }
.calc .verdict-line { padding: .8rem 1rem; border-radius: var(--radius); font-weight: 600; border: 1px solid var(--line); }
.calc .verdict-line.ok { background: var(--petrol-soft); border-color: var(--petrol); color: var(--petrol-text); }
.calc .verdict-line.no { background: var(--rot-soft); border-color: var(--rot); color: var(--rot-text); }
.calc .verdict-line.warn { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-text); }
.calc svg text { font-family: var(--font-body); fill: var(--ink-2); font-size: 12px; }
.calc svg .grid { stroke: var(--line-2); }
.calc svg .axis { stroke: var(--line); }
.dots100 { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.dots100 i { aspect-ratio: 1; border-radius: 50%; background: var(--petrol); display: block; opacity: .85; }
.dots100 i.f { background: var(--rot); opacity: 1; }

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
table.compact { min-width: 0; }
table.compact th, table.compact td { padding: .55rem .7rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--panel-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td b { font-weight: 600; }
.cmp th:first-child, .cmp td:first-child { width: 22%; color: var(--ink-3); }

/* Gestern / Morgen Umschalter */
.flip { display: grid; gap: 1rem; }
.flip .row { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.flip .row .k { font-family: var(--font-display); font-weight: 700; color: var(--rot-text); }
.flip .row .g, .flip .row .m { display: none; }
.flip[data-mode="gestern"] .row .g { display: block; }
.flip[data-mode="morgen"] .row .m { display: block; }
.flip .row .g { color: var(--ink-3); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: .5rem 1rem; cursor: pointer; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }

/* --------------------------------------------------------------------------
   Zeitstrahl
   -------------------------------------------------------------------------- */
.timeline-wrap { overflow-x: auto; }
.timeline { min-width: 760px; }
.timeline text { font-family: var(--font-body); fill: var(--ink-2); font-size: 12px; }
.timeline .date { font-weight: 700; fill: var(--ink); font-family: var(--font-display); font-size: 13px; }
.timeline .past { fill: var(--petrol); } .timeline .future { fill: var(--panel); stroke: var(--rot); stroke-width: 2; }
.timeline .line { stroke: var(--line); stroke-width: 3; }
.timeline .today { stroke: var(--orange); stroke-width: 2; stroke-dasharray: 4 4; }
.timeline .todaylbl { fill: var(--orange-text); font-weight: 700; font-size: 11px; letter-spacing: .1em; }

/* --------------------------------------------------------------------------
   Vertrauensarchitektur, Selbstcheck
   -------------------------------------------------------------------------- */
.bausteine { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.baustein {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.05rem; display: grid; gap: .5rem; align-content: start;
}
.baustein .no { font-family: var(--font-display); font-weight: 700; color: var(--rot-text); font-size: 1.3rem; }
.baustein .t { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }
.baustein .d { font-size: .9rem; color: var(--ink-2); }
.baustein .scale { display: flex; gap: 3px; margin-top: .3rem; }
.baustein .scale button {
  flex: 1; height: 30px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: .78rem; font-weight: 700; color: var(--ink-3);
}
.baustein .scale button:first-child { border-radius: 4px 0 0 4px; } .baustein .scale button:last-child { border-radius: 0 4px 4px 0; }
.baustein .scale button[aria-pressed="true"] { background: var(--rot); border-color: var(--rot); color: #fff; }
.baustein.guard { border-color: var(--orange); }
.profil { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.profil .bars { display: grid; gap: .5rem; margin-top: .8rem; }
.profil .bar { display: grid; grid-template-columns: 11rem 1fr 3rem; gap: .8rem; align-items: center; font-size: .9rem; }
.profil .bar .tr { height: 14px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.profil .bar .tr i { display: block; height: 100%; background: var(--petrol); border-radius: 3px; width: 0; transition: width .3s ease; }
.profil .bar.weak .tr i { background: var(--rot); }
.profil .bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.profil .lesart { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }

/* Offene Fragen */
.offen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; counter-reset: offen; }
.offen .card { display: grid; gap: .4rem; }
.offen .card .t { font-family: var(--font-display); font-weight: 600; }
.offen .card .d { font-size: .95rem; color: var(--ink-2); }

/* Infografiken */
.galerie { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.galerie button { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: .6rem; cursor: pointer; display: grid; gap: .5rem; text-align: left; }
.galerie img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 3px; border: 1px solid var(--line-2); }
.galerie .t { font-size: .88rem; font-weight: 600; }
.lightbox { position: fixed; inset: 0; background: rgba(10,10,12,.86); z-index: 100; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 92vh; max-width: 100%; width: auto; border-radius: 4px; background: #fff; }
.lightbox .close { position: absolute; top: 1rem; right: 1rem; }

/* Fußzeile */
footer { border-top: 1px solid var(--line); padding-block: 2.4rem 3rem; color: var(--ink-3); font-size: .9rem; }
footer .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
footer p { max-width: none; }
footer b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .topbar .wrap { min-height: 0; padding-top: .35rem; row-gap: 0; }
  .brand { flex: 1; }
  .stations { order: 3; flex-basis: 100%; padding-block: .1rem .45rem; }
  .hero .grid, .persp-panel, .check, .stufe-detail, .fn-detail.open, footer .wrap { grid-template-columns: 1fr; }
  .kompass, .galerie, .bausteine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verdict { position: static; }
  .brand .name { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .station { padding-block: 52px; }
  .grid-2, .grid-3, .grid-4, .kompass, .offen, .galerie, .bausteine { grid-template-columns: 1fr; }
  .stufen { grid-template-columns: repeat(3, minmax(0, 1fr)) 20px repeat(2, minmax(0, 1fr)); gap: .25rem; }
  .stufe-btn { padding: .55rem .3rem; } .stufe-btn .t { display: none; } .stufe-btn .s { font-size: 1.2rem; }
  .stufe-btn .pips i { width: 6px; height: 10px; } .sollbruch { font-size: .52rem; }
  .station-head { grid-template-columns: 1fr; gap: .4rem; }
  .fazit { grid-template-columns: 1fr; gap: .6rem; padding: 1.3rem 1.3rem; }
  .fn-row { grid-template-columns: 2.2rem 1fr; } .fn-row .badge { grid-column: 2; }
  .fn-detail { padding-left: 1.1rem; }
  .flip .row { grid-template-columns: 1fr; gap: .3rem; }
  .profil .bar { grid-template-columns: 1fr; gap: .25rem; }
  .profil .bar .v { text-align: left; }
  .frage { padding: 1.2rem 1.2rem; }
  .brand .sub { display: none; }
  .dots100 { grid-template-columns: repeat(10, 1fr); }
}

/* --------------------------------------------------------------------------
   Rechtstexte, Betrieb
   -------------------------------------------------------------------------- */
.legal { max-width: 780px; padding-block: 48px 72px; }
.legal h1 { margin-bottom: .2em; }
.legal .stand { color: var(--ink-3); margin-bottom: 2rem; }
.legal h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal table { min-width: 0; margin: .6rem 0 1.2rem; }
.legal th { width: 32%; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink-2); background: transparent; }
.legal .kurz { background: var(--petrol-soft); border-left: 4px solid var(--petrol); padding: 1rem 1.2rem; border-radius: var(--radius); margin: 1.4rem 0 2rem; }
.legal .kurz p { margin: 0; max-width: none; }
.legal code { font-size: .9em; background: var(--panel-2); padding: .1em .35em; border-radius: 3px; }
.legal-links { margin-top: .6rem; }
.linklike { background: none; border: 0; padding: 0; color: var(--petrol-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.linklike:hover { color: var(--rot-text); }
.env { position: sticky; top: 0; z-index: 60; background: #0D0D0F; color: #fff; text-align: center; font-size: .82rem; padding: .35rem .8rem; }
.env b { color: var(--mib-orange); }
.p404 { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 64px; }
.p404 .stat { display: block; }
