  :root {
    color-scheme: light;
    --page: #f9f9f7; --surface: #fcfcfb; --card: #ffffff;
    --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
    --grid: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11,11,11,0.10);
    --pkw: #2a78d6; --lkw: #eb6834; --rad: #d9a400; --laerm: #4a3aa7; --dunkel: #a9a7a0;
    --accent: #b42318; --accent-wash: rgba(208,59,59,0.10); --band: rgba(11,11,11,0.045);
    --hero-bg: #0f2a3d; --hero-ink: #ffffff; --hero-ink-2: #c9d6e0;
  }
  @media (prefers-color-scheme: dark) {
    :root:where(:not([data-theme="light"])) {
      color-scheme: dark;
      --page: #0d0d0d; --surface: #1a1a19; --card: #1a1a19;
      --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
      --grid: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10);
      --pkw: #3987e5; --lkw: #d95926; --rad: #f2c230; --laerm: #9085e9; --dunkel: #6c6b66;
      --accent: #ff8a80; --accent-wash: rgba(230,103,103,0.16); --band: rgba(255,255,255,0.05);
      --hero-bg: #0b1e2c;
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --card: #1a1a19;
    --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --ring: rgba(255,255,255,0.10);
    --pkw: #3987e5; --lkw: #d95926; --rad: #f2c230; --laerm: #9085e9; --dunkel: #6c6b66;
    --accent: #ff8a80; --accent-wash: rgba(230,103,103,0.16); --band: rgba(255,255,255,0.05);
    --hero-bg: #0b1e2c;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--page); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
  a { color: inherit; }
  .wrap { max-width: 64rem; margin: 0 auto; padding: 0 16px; }


  header.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--grid); }
  header.top .wrap { display: flex; align-items: center; gap: 1.2rem; height: 52px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .logo { font-weight: 800; letter-spacing: -.01em; }
  nav a { text-decoration: none; color: var(--ink-2); font-size: .92rem; margin-right: 1rem; }
  nav a:hover { color: var(--ink); }

  .hero { background: var(--hero-bg); color: var(--hero-ink); padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: clamp(1.8rem, 4.6vw, 2.8rem); line-height: 1.12; margin: 0 0 .8rem; letter-spacing: -.015em; max-width: 22ch; }
  .hero p.lead { color: var(--hero-ink-2); font-size: 1.1rem; max-width: 40rem; margin: 0 0 2rem; }
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 12px; }
  .tile { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 1rem 1rem 1.1rem; }
  .tile .zahl { font-size: 2.3rem; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; }
  .tile .zahl small { font-size: 1rem; font-weight: 600; margin-left: .2rem; }
  .tile p { margin: .45rem 0 0; color: var(--hero-ink-2); font-size: .93rem; line-height: 1.45; }
  .tile .wann { display: inline-block; margin-top: .6rem; font-size: .78rem; color: var(--hero-ink-2); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: .1rem .5rem; }
  .stand { margin-top: 1.2rem; font-size: .82rem; color: var(--hero-ink-2); }

  section.kap { padding: 3rem 0 1rem; }
  .kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 .3rem; }
  h2 { font-size: clamp(1.4rem, 3.2vw, 1.9rem); line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.01em; max-width: 30ch; }
  .text { max-width: 40rem; color: var(--ink-2); }
  .text strong { color: var(--ink); }

  .card { background: var(--card); border: 1px solid var(--ring); border-radius: 12px; padding: 1rem 1rem .6rem; margin: 1.2rem 0; }
  .card h3 { font-size: 1rem; margin: 0 0 .15rem; }
  .card .sub { font-size: .85rem; color: var(--ink-2); margin: 0 0 .6rem; }
  .legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .82rem; color: var(--ink-2); margin: .2rem 0 .5rem; }
  .legend span { display: inline-flex; align-items: center; gap: .35rem; }
  .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
  .sw.line { height: 2px; width: 14px; border-radius: 1px; }
  .chart { position: relative; }
  .chart svg { display: block; width: 100%; overflow: visible; }
  .chart text { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
  .chart .lbl { fill: var(--ink-2); font-size: 11.5px; }
  .tip { position: absolute; pointer-events: none; background: var(--card); color: var(--ink); border: 1px solid var(--ring); border-radius: 8px; padding: .45rem .6rem; font-size: .8rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.12); min-width: 11rem; opacity: 0; transition: opacity .1s; z-index: 2; }
  .tip b { display: block; margin-bottom: .15rem; }
  .tip .r { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-2); }
  .tip .r span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
  .zonen { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--ink-2); margin: .4rem 0 .2rem; }
  .zonen i { font-style: normal; display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ink); color: var(--page); font-size: .7rem; font-weight: 700; margin-right: .3rem; }
  details.tabelle { font-size: .85rem; color: var(--ink-2); margin: .4rem 0 .4rem; }
  details.tabelle summary { cursor: pointer; }
  details.tabelle table { border-collapse: collapse; margin-top: .5rem; font-variant-numeric: tabular-nums; }
  details.tabelle td, details.tabelle th { padding: .15rem .6rem; border-bottom: 1px solid var(--grid); text-align: right; }

  .zwei { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; align-items: start; }
  @media (max-width: 52rem) { .zwei { grid-template-columns: 1fr; } }

  .split { display: flex; height: 34px; border-radius: 6px; overflow: hidden; gap: 2px; margin: .4rem 0 .4rem; }
  .split div { display: flex; align-items: center; padding: 0 .6rem; font-size: .85rem; font-weight: 600; color: #fff; }
  .split .a { background: var(--pkw); }
  .split .b { background: var(--dunkel); color: var(--ink); }

  .pegel { margin: .6rem 0 .2rem; }
  .pegel .row { display: grid; grid-template-columns: 9.5rem 1fr 4.6rem; gap: .6rem; align-items: center; margin: .55rem 0; font-size: .88rem; }
  .pegel .track { position: relative; height: 22px; }
  .pegel .track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--grid); }
  .pegel .gw { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
  .pegel .who { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dotted var(--muted); }
  .pegel .dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--laerm); box-shadow: 0 0 0 2px var(--card); }
  .pegel .over { position: absolute; top: 9px; height: 4px; background: var(--accent); opacity: .55; border-radius: 2px; }
  .pegel .v { text-align: right; font-variant-numeric: tabular-nums; }
  .pegel .v b { display: block; }
  .pegel .v small { color: var(--accent); font-weight: 600; }
  .skala { display: grid; grid-template-columns: 9.5rem 1fr 4.6rem; gap: .6rem; font-size: .75rem; color: var(--muted); }
  .skala div { position: relative; height: 1rem; }
  .skala div span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
  @media (max-width: 34rem) {
    .pegel .row, .skala { grid-template-columns: 6.6rem 1fr 4rem; gap: .5rem; }
  }
  .recht { font-size: .78rem; color: var(--ink-2); margin: .7rem 0 0; line-height: 1.45; }
  .forderung { display: flex; gap: .7rem; align-items: flex-start; background: var(--accent-wash); border-radius: 10px; padding: .8rem 1rem; margin: 1rem 0 0; max-width: 40rem; }
  .forderung b { color: var(--accent); white-space: nowrap; }

  .hbars { margin: .2rem 0 .3rem; }
  .hbar { display: grid; grid-template-columns: 9.5rem 1fr 3.4rem; align-items: center; gap: .6rem; margin: .5rem 0; font-size: .9rem; }
  .hbar .track { height: 14px; background: var(--grid); border-radius: 0 4px 4px 0; }
  .hbar .fill { height: 14px; background: var(--accent); border-radius: 0 4px 4px 0; }
  .hbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

  .liste { list-style: none; padding: 0; margin: .4rem 0; font-size: .9rem; }
  .liste li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--grid); }
  .liste li span:last-child { font-weight: 700; white-space: nowrap; }
  .mehr { font-size: .9rem; font-weight: 600; }

  .forderungen { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 12px; margin: 1.2rem 0; }
  .fk { background: var(--card); border: 1px solid var(--ring); border-radius: 12px; padding: 1rem; }
  .fk .nr { font-size: .8rem; font-weight: 700; color: var(--accent); }
  .fk h3 { margin: .2rem 0 .3rem; font-size: 1.05rem; }
  .fk p { margin: 0; font-size: .9rem; color: var(--ink-2); }

  .sensoren { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 12px; margin: 1.2rem 0; }
  .sensoren .fk p + p { margin-top: .4rem; }
  .status-ok { color: #0a7d0a; font-weight: 600; }
  .status-pruef { color: #9a6700; font-weight: 600; }
  footer { margin-top: 3rem; padding: 2rem 0 3rem; border-top: 1px solid var(--grid); font-size: .85rem; color: var(--ink-2); }
  footer a { margin-right: 1.2rem; }

  /* Ergänzungen für die Live-Seite und Unterseiten */
  .leer { color: var(--muted); font-size: .9rem; padding: 1rem 0; }
  .hinweis-daten { font-size: .8rem; color: var(--ink-2); margin: .5rem 0 0; }
  .seite { padding: 2.5rem 0 1rem; }
  .seite h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 .6rem; }
  .seite h2 { margin-top: 2rem; }
  .seite p, .seite li { color: var(--ink-2); max-width: 42rem; }
  .platzhalter { background: #fff4d6; color: #5c4400; padding: 0 .3rem; border-radius: 4px; }
  .knopf { display: inline-block; font-weight: 600; text-decoration: none; border: 1px solid var(--ring); background: var(--card); border-radius: 8px; padding: .5rem .9rem; margin: .3rem .4rem .3rem 0; }
  .knopf:hover { border-color: var(--ink-2); }
