/* ==========================================================================
   Citizen V Life – Stylesheet
   Schriften: Barlow / Barlow Condensed (SIL OFL, lokal in assets/fonts/)
   Zwei Darstellungen: Nacht (Standard bei dunklem System) und Tag.
   ========================================================================== */

@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/barlow-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/barlow-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-500-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-600-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(../fonts/barlow-condensed-latin-ext-700-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  --font-body: 'Barlow', 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Barlow', sans-serif;

  --fs-0: 0.875rem;
  --fs-1: 1rem;
  --fs-2: 1.2rem;
  --fs-3: 1.55rem;
  --fs-4: 2.1rem;
  --fs-5: 2.9rem;
  --fs-6: clamp(3rem, 7.2vw, 5.6rem);

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 6px;
  --radius-lg: 12px;
  --space: clamp(3rem, 7vw, 5.5rem);

  /* Tag (hell) – Dunst über der Stadt */
  --bg: #eef1f5;
  --bg-2: #e3e8ef;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #d3dae4;
  --line-strong: #b8c2d0;
  --ink: #15213a;
  --ink-2: #3b4860;
  --muted: #5e6b82;
  --amber: #f2b84b;
  --amber-ink: #1a1406;
  --amber-text: #9a6305;
  --amber-soft: #fff1d6;
  --ok: #1f8a4c;
  --ok-soft: #dcf3e5;
  --bad: #b3362f;
  --bad-soft: #fbe3e1;
  --focus: #b9780a;

  --map-water: #d9e3ee;
  --map-block: #e6ebf2;
  --map-minor: #cfd8e3;
  --map-road: #b8c4d4;
  --map-major: #9fb0c6;
  --map-freeway: #8ea1ba;
  --map-freeway-line: #eef1f5;
  --map-park: #d3e5d7;
  --map-light: #d9941b;
  --map-text: #8794a8;
  color-scheme: light;
}

/* Nacht (dunkel) – Mitternachtsblau, Natriumdampflicht */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121b2b;
    --bg-2: #0f1724;
    --surface: #182538;
    --surface-2: #1d2b41;
    --line: #2a3a54;
    --line-strong: #3b4e6d;
    --ink: #eceef3;
    --ink-2: #c5cbd8;
    --muted: #97a3b8;
    --amber: #f2b84b;
    --amber-ink: #1a1406;
    --amber-text: #f2b84b;
    --amber-soft: #3a2d12;
    --ok: #6ccb8a;
    --ok-soft: #173424;
    --bad: #ee8b84;
    --bad-soft: #42201e;
    --focus: #f2b84b;

    --map-water: #172a44;
    --map-block: #1b283d;
    --map-minor: #27374f;
    --map-road: #364a69;
    --map-major: #4a5f82;
    --map-freeway: #4f6688;
    --map-freeway-line: #121b2b;
    --map-park: #1c3a39;
    --map-light: #f2b84b;
    --map-text: #6b7c99;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121b2b;
  --bg-2: #0f1724;
  --surface: #182538;
  --surface-2: #1d2b41;
  --line: #2a3a54;
  --line-strong: #3b4e6d;
  --ink: #eceef3;
  --ink-2: #c5cbd8;
  --muted: #97a3b8;
  --amber: #f2b84b;
  --amber-ink: #1a1406;
  --amber-text: #f2b84b;
  --amber-soft: #3a2d12;
  --ok: #6ccb8a;
  --ok-soft: #173424;
  --bad: #ee8b84;
  --bad-soft: #42201e;
  --focus: #f2b84b;

  --map-water: #172a44;
  --map-block: #1b283d;
  --map-minor: #27374f;
  --map-road: #364a69;
  --map-major: #4a5f82;
  --map-freeway: #4f6688;
  --map-freeway-line: #121b2b;
  --map-park: #1c3a39;
  --map-light: #f2b84b;
  --map-text: #6b7c99;
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (max-width: 640px) { body { font-size: 16px; } }
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--amber-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
code, .ts { font-family: var(--font-body); font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; font-size: 0.95em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.muted { color: var(--muted); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.02; margin: 0 0 0.5em; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-4); }
h3 { font-size: var(--fs-3); font-weight: 600; }
h4 { font-size: var(--fs-2); font-weight: 600; }
p { margin: 0 0 1em; }
.lead { font-size: var(--fs-2); line-height: 1.45; color: var(--ink-2); max-width: 36em; }

.skip { position: absolute; left: 0; top: -100px; background: var(--amber); color: var(--amber-ink); padding: 0.6rem 1rem; z-index: 100; font-weight: 600; }
.skip:focus { top: 0; }

/* --------------------------------------------------------------------------
   Buttons, Pills
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 1rem/1.2 var(--font-body);
  padding: 0.7rem 1.15rem; border-radius: var(--radius);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  color: var(--ink); background: var(--surface); border-color: var(--line-strong);
}
.btn:hover { border-color: var(--ink-2); text-decoration: none; }
.btn-primary { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.btn-primary:hover { background: #ffc85f; border-color: #ffc85f; }
.btn-lg { font-size: 1.1rem; padding: 0.9rem 1.5rem; }
.btn-head { padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 0.35rem 0.75rem 0.35rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.status-pill:hover { border-color: var(--line-strong); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.is-online .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.is-offline .dot { background: var(--bad); }

.tag { display: inline-block; font: 600 0.8rem/1 var(--font-body); padding: 0.3rem 0.55rem; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink-2); }
.tag-changelog { border-color: color-mix(in srgb, var(--amber) 60%, var(--line)); color: var(--amber-text); }

/* --------------------------------------------------------------------------
   Kopf
   -------------------------------------------------------------------------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.head-row { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-name { font: 700 1.45rem/1 var(--font-display); letter-spacing: 0.01em; white-space: nowrap; }
.brand-v { font-weight: 500; color: var(--amber-text); }
.mark-bg { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; }
.mark-road { stroke: var(--ink-2); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.mark-light { fill: var(--amber); }

.nav-main { margin-left: 0.5rem; }
.nav-main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.1rem; }
.nav-main a {
  display: block; padding: 0.55rem 0.7rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  font-weight: 500; border-radius: var(--radius); border-bottom: 2px solid transparent;
}
.nav-main a:hover { color: var(--ink); background: var(--surface); }
.nav-main a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--amber); border-radius: var(--radius) var(--radius) 0 0; }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle { background: transparent; border: 1px solid var(--line); color: var(--ink-2); width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.tt-moon { display: none; }
:root[data-theme="dark"] .tt-moon { display: block; }
:root[data-theme="dark"] .tt-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tt-moon { display: block; }
  :root:not([data-theme="light"]) .tt-sun { display: none; }
}

.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger { display: grid; gap: 4px; }
.burger i { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-mobile[open] summary { background: var(--surface); }
.nav-mobile ul {
  list-style: none; margin: 0; padding: 0.5rem; position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px -12px rgba(5, 10, 25, 0.45);
}
.nav-mobile li a { display: block; padding: 0.6rem 0.8rem; text-decoration: none; color: var(--ink); border-radius: var(--radius); font-weight: 500; }
.nav-mobile li a:hover, .nav-mobile li a[aria-current="page"] { background: var(--surface-2); }
.nav-mobile li a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--amber); }

@media (max-width: 1120px) {
  .head-row { gap: 0.75rem; }
  .nav-main { margin-left: 0; }
  .nav-main a { padding: 0.55rem 0.5rem; font-size: 0.95rem; }
  .head-tools { gap: 0.5rem; }
}
@media (max-width: 900px) {
  .nav-main { display: none; }
  .nav-mobile { display: block; }
  .btn-head { display: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1.25rem; }
  .status-pill { padding-inline: 0.5rem; font-size: 0.85rem; }
}

/* Wartungsbanner */
.maint { background: var(--amber); color: var(--amber-ink); }
.maint .wrap { display: flex; gap: 0.75rem; align-items: flex-start; padding-block: 0.7rem; }
.maint p { margin: 0; font-weight: 500; }
.maint svg { flex: none; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Startseite
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.hero-map {
  position: absolute; top: 0; bottom: 0; right: 0; width: 62%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
  mask-image: linear-gradient(to right, transparent 0, #000 38%);
}
.hero-map .citymap { width: 100%; height: 100%; display: block; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 2rem; align-items: end; min-height: 580px; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero-copy h1 { font-size: var(--fs-6); margin-bottom: 0.3em; }
.hero-copy .lead { margin-bottom: 1.6rem; }
.hero-side { display: grid; gap: 1rem; align-self: end; }

.status-tile {
  display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.9rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1rem 1.15rem; text-decoration: none; color: var(--ink); max-width: 360px;
}
.status-tile:hover { border-color: var(--line-strong); }
.status-tile .dot { width: 12px; height: 12px; grid-row: span 2; }
.status-tile .st-label { font: 700 var(--fs-3)/1 var(--font-display); }
.status-tile .st-text { color: var(--ink-2); font-size: 0.95rem; }
.status-tile .st-meta { grid-column: 2; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; padding-top: 7rem; }
  .hero-map { width: 100%; height: 300px; bottom: auto; opacity: 0.8;
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 30%, transparent 100%); }
  .hero-side { align-self: start; }
}

/* Karten-Elemente – Farben aus den Tokens */
.citymap .m-water { fill: var(--map-water); }
.citymap .m-block { fill: var(--map-block); }
.citymap .m-minor { stroke: var(--map-minor); stroke-width: 1.2; fill: none; }
.citymap .m-road { stroke: var(--map-road); stroke-width: 2; fill: none; }
.citymap .m-major { stroke: var(--map-major); stroke-width: 4; fill: none; stroke-linecap: round; }
.citymap .m-freeway { stroke: var(--map-freeway); stroke-width: 9; fill: none; stroke-linecap: round; }
.citymap .m-freeway-line { stroke: var(--map-freeway-line); stroke-width: 1.2; fill: none; stroke-dasharray: 10 8; }
.citymap .m-park { fill: var(--map-park); }
.citymap .m-light { fill: var(--map-light); }
.citymap .m-halo { fill: var(--map-light); opacity: 0.18; }
.citymap .m-scale path { stroke: var(--map-text); fill: none; stroke-width: 1.5; }
.citymap .m-scale text { fill: var(--map-text); font: 600 12px var(--font-display); }
@keyframes halo { 0%, 100% { opacity: 0.12; transform: scale(0.9); } 50% { opacity: 0.3; transform: scale(1.25); } }
@media (prefers-reduced-motion: no-preference) {
  .citymap .m-halo { transform-box: fill-box; transform-origin: center; animation: halo 4s ease-in-out infinite; }
  .citymap .m-halo:nth-of-type(2) { animation-delay: 1.3s; }
  .citymap .m-halo:nth-of-type(3) { animation-delay: 2.6s; }
}

.section { padding-block: var(--space); }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); }

.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; border-top: 1px solid var(--line-strong); }
.ledger > div { padding: 1.4rem 0 1.6rem; border-bottom: 1px solid var(--line); }
.ledger h3 { margin-bottom: 0.35rem; }
.ledger p { margin: 0; color: var(--ink-2); max-width: 32em; }
@media (max-width: 640px) { .ledger { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { position: relative; padding-top: 0.75rem; border-top: 3px solid var(--amber); }
.steps li::before { counter-increment: step; content: counter(step); display: block; font: 700 var(--fs-4)/1 var(--font-display); color: var(--amber-text); margin-bottom: 0.35rem; }
.steps h3 { margin-bottom: 0.3rem; }
.steps p { margin: 0 0 0.6rem; color: var(--ink-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 1.5rem; } }

.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.news-list li { display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.news-list time { font: 600 1.05rem/1.4 var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.news-list .tag { margin-top: 0.3rem; }
.news-list h3 { margin: 0 0 0.25rem; font-size: var(--fs-2); }
.news-list h3 a { color: var(--ink); text-decoration: none; }
.news-list h3 a:hover { text-decoration: underline; }
.news-list p { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .news-list li { grid-template-columns: 1fr; } .news-list time { display: inline-block; margin-right: 0.75rem; } }

.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 1.5rem; color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.shot { margin: 0; }
.shot .frame { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 1rem; }
.shot .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .frame span { color: var(--muted); font-size: 0.9rem; }
.shot .frame code { display: block; margin-top: 0.4rem; font-size: 0.8rem; }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }

.cta-band { background: var(--surface); border-block: 1px solid var(--line); }
.cta-band .wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding-block: 2.5rem; }
.cta-band h2 { margin-bottom: 0.3rem; }
.cta-band p { margin: 0; color: var(--ink-2); max-width: 38em; }
@media (max-width: 760px) { .cta-band .wrap { grid-template-columns: 1fr; } }

.discord-widget { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.discord-widget iframe { display: block; width: 100%; height: 420px; border: 0; }
.widget-consent { padding: 1.5rem; }
.widget-consent p { max-width: 42em; color: var(--ink-2); }
.widget-consent .btn-group { margin: 0; }

/* --------------------------------------------------------------------------
   Unterseiten
   -------------------------------------------------------------------------- */
.page-intro { border-bottom: 1px solid var(--line); background: var(--surface); }
.page-intro .wrap { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-intro h1 { margin-bottom: 0.35rem; }
.page-intro .lead { margin: 0; }

.prose { max-width: 42rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--muted); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.aside h2, .aside h3 { font-size: var(--fs-2); margin-bottom: 0.6rem; }
.aside ul { padding-left: 1.2rem; margin: 0; }
.aside li { margin-bottom: 0.35rem; }
.aside p:last-child { margin-bottom: 0; }

.note { border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 0.9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.note p:last-child { margin-bottom: 0; }
.todo { background: var(--amber-soft); border: 1px dashed var(--amber-text); color: var(--ink); padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 600; }

/* Features: Gruppen als Liste, keine Kartenwand */
.feature-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2.5rem; }
.feature-groups section { border-top: 2px solid var(--line-strong); padding-top: 1rem; }
.feature-groups h2 { font-size: var(--fs-3); margin-bottom: 0.6rem; }
.feature-groups p { color: var(--ink-2); margin-bottom: 0.7rem; }
.feature-groups ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.feature-groups li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.feature-groups li:last-child { border-bottom: 0; }
@media (max-width: 900px) { .feature-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-groups { grid-template-columns: 1fr; gap: 1.5rem; } }

.fact-row { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0; padding: 0; list-style: none; }
.fact-row li { display: grid; }
.fact-row b { font: 700 var(--fs-4)/1 var(--font-display); }
.fact-row span { color: var(--muted); font-size: 0.9rem; }

/* Regeln */
.rules-toc { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.rules-toc a { display: inline-block; padding: 0.35rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.rules-toc a:hover { border-color: var(--ink-2); }
.rule { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 2rem; padding: 2rem 0; border-top: 1px solid var(--line); max-width: 56rem; }
.rule:first-of-type { border-top: 0; }
.rule .para { font: 700 var(--fs-4)/1 var(--font-display); color: var(--amber-text); position: sticky; top: 1rem; }
.rule h2 { margin-top: 0.15rem; }
.rule ol { padding-left: 1.5rem; margin: 0; }
.rule li { margin-bottom: 0.7rem; padding-left: 0.2rem; }
.rule li::marker { color: var(--muted); font-weight: 600; }
.rule p.lead { font-size: 1.05rem; margin-bottom: 1rem; }
@media (max-width: 640px) { .rule { grid-template-columns: 1fr; gap: 0.25rem; } .rule .para { position: static; } }

/* Formulare */
.form { max-width: 44rem; display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: 0.9rem; margin: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0.7rem 0.85rem; width: 100%;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.4rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input[type="file"] { font: inherit; color: var(--ink-2); width: 100%; padding: 0.5rem 0; }
.field input[type="file"]::file-selector-button { font: 600 0.95rem var(--font-body); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.5rem 0.9rem; margin-right: 0.8rem; cursor: pointer; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--amber-text); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--bad); }
.field .error { color: var(--bad); font-weight: 600; margin: 0; font-size: 0.95rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--amber-text); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: var(--radius-lg); padding: 1rem 1.2rem; border: 1px solid; }
.alert-bad { background: var(--bad-soft); border-color: var(--bad); }
.alert-ok { background: var(--ok-soft); border-color: var(--ok); }
.alert h2 { font-size: var(--fs-3); margin-bottom: 0.3rem; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.code-box { display: inline-block; font: 700 var(--fs-4)/1 var(--font-display); letter-spacing: 0.06em; background: var(--surface); border: 2px dashed var(--amber-text); padding: 0.75rem 1.1rem; border-radius: var(--radius-lg); margin: 0.5rem 0 1rem; user-select: all; }

/* Status-Seite */
.status-big { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.2rem; align-items: center; margin-bottom: 2rem; }
.status-big .dot { width: 18px; height: 18px; grid-row: span 2; }
.status-big .st-label { font: 700 var(--fs-5)/1 var(--font-display); }
.status-big .st-text { color: var(--ink-2); font-size: var(--fs-2); }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem 0.6rem; }
.chart-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; margin-bottom: 0.5rem; }
.chart-head h2 { font-size: var(--fs-3); margin: 0; }
.chart-head span { color: var(--muted); font-size: 0.9rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .c-grid { stroke: var(--line); stroke-width: 1; }
.chart .c-area { fill: var(--amber); opacity: 0.2; }
.chart .c-line { stroke: var(--amber-text); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-dot { fill: var(--amber-text); }
.chart .c-text { fill: var(--muted); font: 500 13px var(--font-body); }
.chart .c-ymax { fill: var(--ink-2); font: 600 13px var(--font-body); }
.chart .c-narrow { display: none; }
@media (max-width: 560px) { .chart .c-wide { display: none; } .chart .c-narrow { display: block; } }
.chart figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* FAQ */
.faq { max-width: 46rem; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font: 600 var(--fs-2)/1.3 var(--font-display); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 0.4rem; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--amber-text); }
.faq .answer { padding: 0 0 1.2rem; max-width: 40rem; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Team */
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem 2rem; list-style: none; margin: 0; padding: 0; }
.roles li { border-top: 2px solid var(--line-strong); padding-top: 0.8rem; }
.roles h3 { margin-bottom: 0.3rem; }
.roles p { margin: 0; color: var(--ink-2); }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; }
.members li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; display: grid; }
.members b { font: 600 var(--fs-2)/1.2 var(--font-display); }
.members span { color: var(--muted); font-size: 0.9rem; }

/* News-Detail */
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; color: var(--muted); margin-bottom: 1.5rem; }
.article-body { max-width: 42rem; }
.article-body h2 { font-size: var(--fs-3); margin-top: 1.8rem; }
.article-body h3 { font-size: var(--fs-2); margin-top: 1.4rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li { margin-bottom: 0.35rem; }
.article-body a { word-break: break-word; }
.pager { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* --------------------------------------------------------------------------
   Fuß
   -------------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: auto; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-block: 2.5rem 1.5rem; }
.foot-brand p { color: var(--muted); margin: 0.9rem 0 0; max-width: 28em; font-size: 0.95rem; }
.site-foot h2 { font: 600 var(--fs-2)/1.2 var(--font-display); margin-bottom: 0.6rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.4rem; font-size: 0.95rem; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { padding-block: 1rem 2rem; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--muted); }
.foot-legal p { margin: 0 0 0.4rem; max-width: 70em; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: span 2; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } .foot-brand { grid-column: auto; } }

/* --------------------------------------------------------------------------
   Druck
   -------------------------------------------------------------------------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #111; --muted: #444; --line: #bbb; --line-strong: #888; --amber-text: #000; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .site-head, .site-foot, .maint, .skip, .rules-toc, .btn, .status-pill, .theme-toggle, .nav-mobile, .page-intro .lead, .no-print { display: none !important; }
  .page-intro { border: 0; background: none; }
  .page-intro .wrap, .section { padding-block: 0.5rem; }
  .rule { break-inside: avoid; page-break-inside: avoid; grid-template-columns: 4rem 1fr; padding: 0.8rem 0; max-width: none; }
  .rule .para { position: static; color: #000; }
  .rule h2 { font-size: 16pt; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* --------------------------------------------------------------------------
   Ergänzungen: Fortschritt, Tabellen, Tastatur
   -------------------------------------------------------------------------- */
kbd { font: 600 0.9em var(--font-body); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.progress { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; counter-reset: none; }
.progress li { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding-top: 0.5rem; border-top: 4px solid var(--line); }
.progress li.done { border-top-color: var(--ok); color: var(--ink-2); }
.progress li.current { border-top-color: var(--amber); color: var(--ink); }
@media (max-width: 480px) { .progress { grid-template-columns: repeat(2, 1fr); } }
.data-table { border-collapse: collapse; width: 100%; max-width: 24rem; margin-top: 0.5rem; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; color: var(--muted); padding-bottom: 0.4rem; }
.data-table th, .data-table td { text-align: left; padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--line); }
.data-table td:last-child, .data-table th:last-child { text-align: right; }
.chart details summary { cursor: pointer; color: var(--amber-text); font-weight: 500; }
