/* Prosa-Layout für Impressum und Datenschutz.
   Ergänzt die Haupt-CSS, ersetzt sie nicht, Navigation, Footer und Farbvariablen
   kommen von dort und liegen beim Besucher ohnehin schon im Cache. */

.legal {
  max-width: 68ch;
  margin: 0 auto;
  padding: clamp(88px, 12vw, 140px) clamp(20px, 5vw, 32px) clamp(64px, 10vw, 110px);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.68;
}

/* Die Haupt-CSS stylt den blanken Selektor `nav` als fixierte Glas-Pille.
   Das trifft auch die Brotkrumen. <nav> bleibt trotzdem das semantisch
   richtige Element fuer Brotkrumen, also wird die Regel hier zurueckgesetzt. */
.legal nav.krumen {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  z-index: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
}

.legal .krumen {
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.legal .krumen a { color: var(--ink2); text-decoration: none; }
.legal .krumen a:hover { color: var(--accent); text-decoration: underline; }
.legal .krumen span[aria-hidden] { opacity: .45; }

.legal h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.025em;
  font-weight: 800;
  margin: 0 0 10px;
  text-wrap: balance;
}

.legal .stand {
  font-size: 13px;
  color: var(--ink2);
  margin: 0 0 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.legal h2 {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 25px);
  line-height: 1.2;
  letter-spacing: -.015em;
  font-weight: 700;
  margin: 46px 0 12px;
  text-wrap: balance;
}

/* Die Quelltexte gliedern mit h3/h4, hier eine Ebene tiefer gesetzt,
   damit die Seite genau eine h1 behält und die Kette lückenlos bleibt. */
.legal h3 {
  font-family: var(--display);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.22;
  letter-spacing: -.012em;
  font-weight: 700;
  margin: 44px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  text-wrap: balance;
}
.legal h3:first-of-type { border-top: 0; padding-top: 0; margin-top: 34px; }

.legal h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 26px 0 6px;
  letter-spacing: -.005em;
}

.legal p { margin: 0 0 16px; }
.legal strong { font-weight: 700; }

.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 7px; }

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: .06em;
  overflow-wrap: anywhere;
}
.legal a:hover { text-decoration-thickness: .12em; }

.legal .zurueck {
  margin: 54px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
}
.legal .zurueck a { text-decoration: none; }
.legal .zurueck a:hover { text-decoration: underline; }

.legal :focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Auf der Rechtsseite gibt es keine Sprungziele, die Anker der Startseite
   würden ins Leere zeigen, deshalb tragen sie dort einen /-Präfix. */
@media (max-width: 600px) {
  .legal { font-size: 15.5px; }
  .legal h3 { margin-top: 36px; padding-top: 22px; }
}

/* ── .seite ──────────────────────────────────────────────────────────────────
   Inhaltsseiten sprechen die Sprache der Startseite: derselbe 1200er Container
   wie .sect, dieselben Farb-Token, dieselbe Glas-Optik wie die Navigation.
   Cabinet Grotesk und JetBrains Mono liegen laengst im Cache, bis 03.09.2026
   zeigte --display aber auf system-ui, die Hausschrift lag also ungenutzt herum.

   Aufbau: build.py fasst jeden <h2>-Abschnitt in <section class="block"> mit
   Kopf- und Textspalte. Die Koepfe wechseln die Seite und laufen mit. */

.seite {
  max-width: 1200px;
  font-size: 17px;
  line-height: 1.68;
  padding: clamp(92px, 12vw, 148px) clamp(20px, 5vw, 32px) clamp(72px, 10vw, 120px);
  counter-reset: block;
}

.seite .krumen { margin-bottom: 26px; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .04em; }

/* ── Kopf: Aussage links, Antwort rechts ─────────────────────────────────── */
.seite .seiteKopf {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.seite .seiteKopf h1 {
  font-family: 'Cabinet Grotesk', var(--display);
  font-size: clamp(34px, 5.4vw, 66px);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}
.seite .intro .lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink2);
  margin-bottom: 18px;
}
/* Die Zielgruppen-Zeile als Glas-Chip, dasselbe Material wie die Navigation,
   damit der Kopf nicht wie ein zweiter Absatz aussieht. */
.seite .intro .wenfuer {
  display: inline-block;
  margin: 0;
  padding: 10px 18px;
  border-radius: 16px;
  border: 1px solid var(--glassbrd);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .08);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink2);
}

/* ── Abschnitte: Kopf links, dann rechts, dann links ─────────────────────── */
.seite .block {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(46px, 7vw, 92px) 0;
  border-top: 1px solid var(--hairline);
}
.seite .block:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
.seite .block:nth-of-type(even) .blockKopf { grid-column: 2; grid-row: 1; }
.seite .block:nth-of-type(even) .blockText { grid-column: 1; grid-row: 1; }

.seite .blockKopf {
  position: sticky;
  top: 92px;
  align-self: start;
  counter-increment: block;
}
/* Die Nummer ist keine Dekoration: diese Seiten sind eine Folge, woran du es
   merkst, was wir bauen, was es belegt, wofuer wir nicht taugen, was du fragst. */
.seite .blockKopf::before {
  content: counter(block, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  color: var(--accent);
}
.seite .block h2 {
  font-family: 'Cabinet Grotesk', var(--display);
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -.022em;
  font-weight: 800;
  margin: 0;
  border-top: 0;
  padding-top: 0;
  text-wrap: balance;
}

.seite .blockText > :first-child { margin-top: 0; }
.seite .blockText > p { max-width: 62ch; }

.seite h3, .seite h3:first-of-type {
  font-family: 'Cabinet Grotesk', var(--display);
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.18;
  letter-spacing: -.014em;
  font-weight: 700;
  border-top: 0;
  padding-top: 0;
  margin: 40px 0 10px;
}
.seite .blockText > h3:first-child { margin-top: 0; }

/* Eine verlinkte Ueberschrift bleibt eine Ueberschrift: der Akzent gehoert an
   die Unterkante, nicht in die Schriftfarbe, sonst liest sie sich wie ein
   Fliesstext-Link mitten in der Gliederung. */
.seite h3 a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size .25s var(--ease);
}
.seite h3 a:hover { background-size: 100% 100%; color: var(--bg); }

/* ── Merkmalsliste: zweispaltig, Haken in CSS gezeichnet ─────────────────── */
.seite .merkmale, .seite .nicht { list-style: none; padding-left: 0; margin: 6px 0 0; }
.seite .merkmale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 clamp(20px, 3vw, 44px);
}
.seite .merkmale li {
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--hairline);
  margin: 0;
  position: relative;
}
.seite .merkmale li::before {
  content: "";
  position: absolute;
  left: 3px; top: 1.15em;
  width: 9px; height: 9px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.seite .nicht li {
  padding: 18px 0 18px 32px;
  border-bottom: 1px solid var(--hairline);
  margin: 0;
  position: relative;
  max-width: 62ch;
}
/* Kein Kreuz, kein Verbotsschild: ein offener Rahmen sagt "nicht unser Feld",
   ohne dem Leser einen Fehler vorzuwerfen. */
.seite .nicht li::before {
  content: "";
  position: absolute;
  left: 3px; top: 1.42em;
  width: 9px; height: 9px;
  border: 2px solid var(--ink2);
  opacity: .38;
  border-radius: 2px;
}
.seite .merkmale li:last-child, .seite .nicht li:last-child { border-bottom: 0; }

/* ── Beispielkarte: haengt an der Textkante, statt in ihr zu stehen ──────── */
.seite .beispiel {
  position: relative;
  margin: 16px 0 8px;
  padding: 15px 18px 15px 20px;
  max-width: 58ch;
  border-radius: 0 14px 14px 0;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink2);
}
.seite .beispiel span {
  display: block;
  margin-bottom: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Beweiskarte: dieselbe Nacht wie die Tempo-Panels der Startseite.
   Bewusst in BEIDEN Farbschemata dunkel und deshalb mit festen Farbwerten, 
   ein Token, das mitkippt, wuerde die Karte im Dunkelmodus verschwinden lassen. */
.seite .beweis {
  margin: 30px 0 8px;
  padding: clamp(26px, 3.4vw, 40px);
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(0, 160, 208, .20), transparent 62%),
    var(--dark);
  border: 1px solid rgba(245, 245, 247, .10);
  box-shadow: 0 30px 80px rgba(6, 7, 15, .38);
  color: rgba(245, 245, 247, .74);
}
.seite .beweis h3 {
  margin: 0 0 14px;
  color: #f5f5f7;
  font-size: clamp(20px, 2.3vw, 26px);
}
.seite .beweis p { max-width: 60ch; }
.seite .beweis p + p { margin-top: 12px; }
.seite .beweis p:last-child { margin-bottom: 0; }
.seite .beweis strong { color: #f5f5f7; font-weight: 600; }

/* ── Abschluss ──────────────────────────────────────────────────────────── */
.seite .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.seite .cta a {
  text-decoration: none;
  border-radius: 999px;
  padding: 13px 26px;
  font-weight: 600;
  font-size: 15.5px;
  border: 1px solid var(--glassbrd);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
/* Nicht #fff: der helle Akzent des Dunkelmodus traegt keinen weissen Text.
   var(--bg) kippt mit dem Schema mit und bleibt in beiden Faellen lesbar. */
.seite .cta a:first-child { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.seite .cta a:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 105, 168, .22); border-color: var(--accent); }
.seite .cta a:active { transform: translateY(0); }

.seite .zurueck { margin-top: clamp(48px, 6vw, 80px); }

/* ── Bewegung: Abschnitte steigen beim Hereinscrollen auf ────────────────
   Reine CSS-Scroll-Zeitachse. Wo der Browser sie nicht kennt, passiert nichts
   und der Inhalt steht einfach da, kein JavaScript, kein Blindzustand. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes seiteAuf { from { opacity: 0; transform: translateY(22px) } to { opacity: 1; transform: none } }
    .seite .block > * {
      animation: seiteAuf linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
    .seite .blockText { animation-delay: .04s; }
  }
}

/* ── Schmale Schirme: eine Spalte, Koepfe laufen nicht mehr mit ──────────── */
@media (max-width: 860px) {
  .seite .seiteKopf { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .seite .block,
  .seite .block:nth-of-type(even) { grid-template-columns: 1fr; gap: 18px; }
  .seite .block:nth-of-type(even) .blockKopf,
  .seite .block:nth-of-type(even) .blockText { grid-column: 1; grid-row: auto; }
  .seite .blockKopf { position: static; }
}
@media (max-width: 600px) {
  .seite { font-size: 16px; }
  .seite .beispiel { max-width: none; }
}


/* Die aktuelle Seite im Menue kenntlich machen, bisher sah man nirgends,
   wo man ist. */
/* Die aktuelle Seite wird ueber die FARBE gekennzeichnet, nicht ueber die
   Staerke: fetter Text ist breiter, und die Kopfzeile wuerde beim Wechsel
   zwischen den Seiten die Breite aendern. */
nav .links a[aria-current="page"] { color: var(--ink); }


/* ── Rechner ────────────────────────────────────────────────────────────────
   Steht nur auf /calculator/. Alle Farben kommen aus den Tokens, damit die Karte
   in beiden Farbschemata haelt, ohne dass hier ein zweiter Block noetig wird. */
.seite .rechner {
  margin: 8px 0 4px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.seite .rFeld {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 12px 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.seite .rFeld label { color: var(--ink2); font-size: 15.5px; line-height: 1.45; }
.seite .rFeld label span { color: var(--ink2); opacity: .7; }
.seite .rFeld input {
  width: 100%;
  font: 600 19px/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: right;
}
.seite .rFeld input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}
.seite .rErgebnis {
  display: block;
  margin-top: 22px;
  padding: 22px clamp(18px, 2.4vw, 26px);
  border-radius: 16px;
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(0, 160, 208, .16), transparent 64%),
    var(--dark);
  color: rgba(245, 245, 247, .72);
}
.seite .rZeile {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  /* Die Zeilen sind Absaetze, und Absaetze bringen den Textabstand der Seite
     mit. Der wuerde die Zeilen im Kasten auseinanderziehen. */
  margin: 0;
  max-width: none;
}
.seite .rZeile + .rZeile { border-top: 1px solid rgba(245, 245, 247, .10); }
.seite .rZahl {
  font: 700 clamp(28px, 4vw, 40px)/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: #f5f5f7;
  min-width: 3.4ch;
  text-align: right;
}
.seite .rWas { font-size: 15.5px; }
.seite .rGeld .rZahl { color: #4fc3ea; }
.seite .rFuss { margin: 16px 0 0; font-size: 14.5px; color: var(--ink2); max-width: none; }

@media (max-width: 520px) {
  .seite .rFeld { grid-template-columns: 1fr; gap: 8px; }
  .seite .rFeld input { text-align: left; }
}
