/* CNCTD · Kern-Stil. Bleibt in jedem Kapitel gleich: Wortmarke, Satz, Signatur, Schrift, Abstände, Aufbau.
   Farben und Licht kommen nur über Variablen; ein Kapitel setzt sie in seiner eigenen Datei (kapitel1.css). */

:root {
  /* Standardwerte. Das Kapitel überschreibt sie. */
  --grund: #0d0e10;
  --flaeche: #16181c;
  --rand: #2a2d33;
  --text: #ecebe8;
  --text-leise: #b3b1ac;
  --licht: #ffffff;
  --licht-text: #0d0e10;
  --linie: #8a93a3;
  --fokus: #ffffff;
  --glanz: transparent;
  --leuchten: none;
  --leuchten-linie: none;

  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --abstand: 1.5rem;
  --breite: 72rem;
  --breite-text: 40rem;
  --runde: 0.75rem;
  --tippflaeche: 2.75rem; /* 44 px */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: var(--licht); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem); }
h2 { font-size: 1.25rem; margin-top: 2.5rem; }
p { margin: 0 0 1rem; }

/* Sprungmarke für Tastatur */
.sprung {
  position: absolute; left: 1rem; top: -4rem;
  padding: 0.75rem 1rem; background: var(--licht); color: var(--licht-text); z-index: 10;
}
.sprung:focus { top: 1rem; }

/* ---------- Kopf: Zeichen, Satz, Kapitel-Zeile ---------- */
.kopf { border-bottom: 1px solid var(--rand); }
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: 1.25rem var(--abstand) 0.75rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem;
}
.marke {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: var(--tippflaeche); color: var(--text); text-decoration: none;
}
.wortmarke { font-weight: 800; font-size: 1.125rem; letter-spacing: 0.32em; margin-right: -0.32em; }
.signatur { width: 2.75rem; height: auto; overflow: visible; }
.signatur-linie { stroke: var(--linie); stroke-width: 1.5; }
.signatur-punkt { fill: var(--licht); filter: var(--leuchten); }
.satz { margin: 0; color: var(--text-leise); font-size: 0.9375rem; flex: 1 1 12rem; }
.navigation { display: flex; gap: 0.25rem; margin-left: -0.75rem; }
.navigation a, .fuss-links a {
  display: inline-flex; align-items: center; min-height: var(--tippflaeche);
  padding: 0 0.75rem; color: var(--text); text-decoration: none; border-radius: 0.5rem;
}
.navigation a:hover, .fuss-links a:hover { color: var(--licht); }
.kapitel {
  max-width: var(--breite); margin: 0 auto; padding: 0 var(--abstand) 1rem;
  color: var(--text-leise); font-size: 0.875rem; letter-spacing: 0.04em;
}

/* ---------- Inhalt ---------- */
.inhalt { max-width: var(--breite); margin: 0 auto; padding: 2.5rem var(--abstand) 4rem; }
.text, .auftakt { max-width: var(--breite-text); }
.auftakt { margin-bottom: 2.5rem; }
.einleitung { font-size: 1.1875rem; }
.hinweis, .leer, figcaption { color: var(--text-leise); }

.schritte {
  list-style: none; margin: 1.5rem 0; padding: 0;
  display: grid; gap: 0.75rem;
}
.schritte li { display: flex; align-items: center; gap: 0.875rem; }
.schritt-zahl {
  display: inline-grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--licht); color: var(--licht); font-size: 0.9375rem; font-weight: 650;
}

.zaehler, .bilanz {
  margin-top: 1.75rem; font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums;
}
.bilanz--gross { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem); color: var(--licht); }
.trenner { color: var(--text-leise); padding: 0 0.25rem; }

.meldungen { list-style: none; padding: 1rem 1.25rem; margin: 0 0 2rem; border: 1px solid var(--rand);
  border-left: 3px solid var(--licht); border-radius: var(--runde); background: var(--flaeche); }
.fehler { padding: 0.875rem 1.25rem; border: 1px solid var(--rand); border-left: 3px solid var(--licht);
  border-radius: var(--runde); background: var(--flaeche); font-weight: 600; }
ul.fehler { list-style: none; }

/* ---------- Knöpfe und Formulare ---------- */
button, .knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tippflaeche); padding: 0.625rem 1.25rem;
  font: inherit; font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none;
  color: var(--licht-text); background: var(--licht); border: 1px solid var(--licht);
  border-radius: 999px; cursor: pointer;
}
button:hover, .knopf:hover { box-shadow: 0 0 0 4px var(--glanz); }
.knopf--leise { color: var(--text); background: transparent; border-color: var(--rand); }

label { display: block; font-weight: 600; margin-bottom: 1.25rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.375rem;
  min-height: var(--tippflaeche); padding: 0.5rem 0.875rem;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 0.5rem;
}
input:focus-visible, select:focus-visible { border-color: var(--fokus); }
input[type="checkbox"] {
  display: inline-block; width: 1.375rem; height: 1.375rem; min-height: 0; margin: 0 0.75rem 0 0;
  vertical-align: middle; accent-color: var(--licht);
}
label.haken { display: flex; align-items: center; min-height: var(--tippflaeche); font-weight: 400; }
.reservieren { max-width: var(--breite-text); margin-top: 2rem; }

.filter { display: grid; gap: 0 1rem; margin-bottom: 2rem; }
.filter label { margin-bottom: 1rem; }
.filter button { align-self: end; margin-bottom: 1rem; }

/* Honeypot: für Menschen unsichtbar */
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Wunsch-Karten ---------- */
.wunsch-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.wunsch {
  display: flex; flex-direction: column;
  padding: 1.5rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--runde);
}
.wunsch-alter { color: var(--licht); font-size: 0.875rem; font-weight: 650; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.wunsch-text { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; }
.wunsch-wert, .wunsch-ort { color: var(--text-leise); margin-bottom: 0.25rem; }
.wunsch .knopf { margin-top: auto; align-self: stretch; }
.wunsch-liste .wunsch-ort { margin-bottom: 1.25rem; }
article.wunsch { max-width: var(--breite-text); }

/* ---------- Tabellen (Einrichtung, Verwaltung) ---------- */
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--rand); }
th { color: var(--text-leise); font-weight: 600; font-size: 0.875rem; }
td form { margin: 0 0 0.5rem; }
code { overflow-wrap: anywhere; }

/* ---------- Karte ---------- */
.karte { margin: 0 0 2.5rem; }
.karte svg { display: block; width: 100%; height: auto; max-height: 80vh; }
.kreis { fill: var(--flaeche); stroke: var(--rand); stroke-width: 2; }
.kreis-name { fill: var(--text-leise); font-family: var(--schrift); font-size: 22px; }
.linie { fill: none; stroke: var(--linie); stroke-width: 1.5; opacity: 0.6; }
.linie--abgegeben { stroke: var(--licht); stroke-width: 2.5; opacity: 1; filter: var(--leuchten-linie); }
.punkt { fill: var(--licht); filter: var(--leuchten); }
.verbindungen { padding-left: 1.25rem; }
.verbindungen li { margin-bottom: 0.375rem; }
@media (prefers-reduced-motion: no-preference) {
  .linie--abgegeben { animation: einblenden 1.2s ease-out both; }
}
@keyframes einblenden { from { opacity: 0; } }

/* ---------- Fuß ---------- */
.fuss {
  max-width: var(--breite); margin: 0 auto; padding: 2rem var(--abstand) 3rem;
  border-top: 1px solid var(--rand); color: var(--text-leise); font-size: 0.9375rem;
}
.fuss-satz { margin-bottom: 0.5rem; }
.fuss-links { display: flex; flex-wrap: wrap; margin-left: -0.75rem; }

/* ---------- Breitere Bildschirme ---------- */
@media (min-width: 40em) {
  :root { --abstand: 2rem; }
  .filter { grid-template-columns: repeat(2, minmax(0, 14rem)) auto; justify-content: start; }
  .wunsch-liste { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.25rem; }
  .schritte { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0.75rem 2rem; }
}
@media (min-width: 64em) {
  .navigation { margin-left: auto; }
  .inhalt { padding-top: 3.5rem; }
}
