/* pragfuersenioren.com — Grundstil
   Alle Werte hier sind Vorgaben aus dem Konzept, nicht Geschmack:
   Fliesstext 19-20 px, Zeilenhoehe ab 1.6, Klickflaechen 44x44,
   Kontrast nach WCAG AA, angestrebt AAA. */

/* Alle Kontrastwerte unten sind im Browser nachgerechnet, nicht geschaetzt.
   Nachrechnen: pruefung/kontrast.py */
:root {
  --grund: #ffffff;
  --text: #14181d;          /* auf Weiss 17.82:1 — AAA */
  --text-leise: #4a5560;    /* auf Weiss  7.61:1 — AAA */
  --linie: #c9d1d9;
  --akzent: #7d4000;        /* auf Weiss  8.06:1 — AAA; auf --akzent-flaeche 7.35:1 — AAA.
                               Der zweite Wert zaehlt: der aktive Navigationslink
                               steht auf dieser Flaeche. */
  --akzent-flaeche: #fdf3e7;
  --beleg: #1d5c2e;         /* auf Weiss  8.01:1 — AAA */
  --luecke-flaeche: #f4f6f8;
  --fokus: #0b3d91;         /* auf Weiss 10.04:1 */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #14181d;
    --text: #f2f5f7;
    --text-leise: #c3ccd5;
    --linie: #3a444f;
    --akzent: #ffb266;
    --akzent-flaeche: #2a1f13;
    --beleg: #7fd196;
    --luecke-flaeche: #1e242b;
    --fokus: #9dc4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;          /* Fliesstext, nicht 16 */
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* Kein Effekt, der beim Scrollen springt. Wer Bewegung abgestellt hat,
   bekommt sie auch nicht ueber Umwege zurueck. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sprungmarke {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--grund);
  color: var(--text);
  padding: 1rem 1.25rem;
  border: 3px solid var(--fokus);
  z-index: 100;
}
.sprungmarke:focus { left: 0; }

:focus-visible {
  outline: 4px solid var(--fokus);
  outline-offset: 3px;
}

.rahmen {
  max-width: 44rem;         /* rund 70 Zeichen je Zeile */
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

header.kopf {
  border-bottom: 2px solid var(--linie);
  margin-bottom: 2rem;
  padding-top: 1rem;
}

nav.haupt ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
nav.haupt a {
  display: flex;
  align-items: center;
  min-height: 44px;         /* Klickflaeche */
  min-width: 44px;
  padding: 0.5rem 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--akzent);
}
nav.haupt a[aria-current="page"] {
  background: var(--akzent-flaeche);
  text-decoration: none;
  font-weight: 700;
}

h1 { font-size: 2.1rem; line-height: 1.25; margin: 0.6em 0 0.4em; }
h2 { font-size: 1.55rem; line-height: 1.3; margin: 2em 0 0.5em; }
h3 { font-size: 1.2rem; line-height: 1.35; margin: 1.6em 0 0.4em; }

p, li { font-size: 1rem; }
li { margin-bottom: 0.4em; }

a { color: var(--akzent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

/* Fakt: Wert gross, Beleg direkt darunter — nie in einer Fusszeile. */
.fakt {
  border-top: 1px solid var(--linie);
  padding: 1rem 0;
  margin: 0;
}
.fakt dt {
  font-weight: 700;
  font-size: 1rem;
}
.fakt dd {
  margin: 0.25rem 0 0;
  font-size: 1rem;
}
.beleg {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-leise);
  line-height: 1.5;
}
.beleg a { color: var(--text-leise); }

/* Die Luecke wird NICHT kleiner oder blasser gesetzt als eine Angabe.
   Sie ist das Produkt, kein Makel. */
.luecke {
  font-size: 1rem;
  font-style: normal;
  color: var(--text);
  background: var(--luecke-flaeche);
  padding: 0.2rem 0.5rem;
  border-left: 4px solid var(--text-leise);
}

.marke {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 2px solid currentColor;
}
.marke-belegt { color: var(--beleg); }
.marke-offen { color: var(--text-leise); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 0.6rem;
  font-size: 1rem;
}
th, td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--linie);
  vertical-align: top;
}
th { background: var(--luecke-flaeche); }

/* Breite Inhalte scrollen in sich selbst, nie die Seite. */
.breit { overflow-x: auto; }

.hinweis {
  background: var(--akzent-flaeche);
  border-left: 5px solid var(--akzent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.hinweis > :first-child { margin-top: 0; }
.hinweis > :last-child { margin-bottom: 0; }

.karte-figur { margin: 1.5rem 0; }
.karte-figur svg { max-width: 100%; height: auto; display: block; }
figcaption { font-size: 0.9rem; color: var(--text-leise); margin-top: 0.6rem; }

footer.fuss {
  border-top: 2px solid var(--linie);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-leise);
}

/* --- Druck: diese Zielgruppe druckt wirklich aus --- */
@media print {
  :root {
    --grund: #fff; --text: #000; --text-leise: #333;
    --linie: #999; --akzent: #000; --akzent-flaeche: #fff;
    --luecke-flaeche: #fff; --beleg: #000;
  }
  body { font-size: 11pt; line-height: 1.45; }
  nav.haupt, .sprungmarke, .nicht-drucken { display: none !important; }
  .rahmen { max-width: none; padding: 0; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }
  tr, .fakt, figure { break-inside: avoid; page-break-inside: avoid; }
  /* Ziel jedes Links ausschreiben - auf Papier nuetzt eine Unterstreichung nichts */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8.5pt;
    word-break: break-all;
  }
  .luecke { border-left: 3px solid #000; }
  .hinweis { border: 1px solid #000; border-left-width: 4px; }
}
