/* Grundgerüst: Layout, Typografie, Kopfband, Fuß. Nur semantische Tokens aus tokens.css. */

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

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

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--seite);
}

h1, h2, h3 { color: var(--text-stark); line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
strong, b { font-weight: 700; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--flaeche); color: var(--text-stark); padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
main:focus { outline: none; }

/* Bauchbinde (rot) mit gelber Wortmarke – in beiden Modi unverändert (CD).
   Kompakt (56 px), rechts Hilfe und Sonne/Mond (Design-Entscheidung 1). */
.kopfband { background: var(--kopf-flaeche); }
.kopfband-innen {
  max-width: 960px; margin: 0 auto; min-height: 56px; box-sizing: border-box; padding: 6px 10px 6px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.kopf-logo { display: block; line-height: 0; }
.kopf-logo svg { display: block; width: 150px; height: auto; }
.kopf-logo:focus-visible { outline-color: var(--dlrg-gelb); }
.kopf-aktionen { display: flex; gap: 6px; }
/* Bewusste CD-Abweichung: Gelb außerhalb der Wortmarke, nur für diese beiden Symbole. */
.kopf-knopf {
  width: 40px; height: 40px; box-sizing: border-box; display: grid; place-items: center; padding: 0;
  border-radius: 4px; border: 2px solid rgba(255, 237, 0, .55); background: transparent;
  color: var(--dlrg-gelb); cursor: pointer; text-decoration: none; font: inherit;
}
.kopf-knopf svg { width: 20px; height: 20px; }
.kopf-knopf:hover { background: rgba(0, 0, 0, .16); border-color: var(--dlrg-gelb); }
.kopf-knopf:focus-visible { outline: 2px solid var(--dlrg-gelb); outline-offset: 2px; }
/* Mond im hellen Modus (wechselt zu dunkel), Sonne im dunklen. */
.kopf-knopf .symbol-sonne { display: none; }
:root[data-theme="dark"] .kopf-knopf .symbol-sonne { display: block; }
:root[data-theme="dark"] .kopf-knopf .symbol-mond { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kopf-knopf .symbol-sonne { display: block; }
  :root:not([data-theme="light"]) .kopf-knopf .symbol-mond { display: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rahmen);
  border-radius: 8px;
  box-shadow: var(--schatten);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Hinweis-, Warn-, Fehler- und Erfolgsboxen (Design-Entscheidung 8): Rahmen rundum, helle Fläche
   in der Farbe der Art, Symbol links auf Höhe der ersten Zeile. Das Symbol ist eine Maske, die Farbe
   kommt aus background-color – so bleibt es in beiden Modi in der Farbe der Art.
   Rollen im HTML: Hinweis/Warnung role="note", Fehler role="alert", Erfolg role="status". */
.hinweis, .box {
  position: relative; border: 1px solid; border-radius: 8px; padding: 12px 14px 12px 44px; margin: 0 0 1.25rem;
  line-height: 1.45; background: var(--hinweis-flaeche); border-color: var(--hinweis-rand); color: var(--hinweis-text);
}
.hinweis::before, .box::before {
  content: ""; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.box.warnung { background: var(--warn-flaeche); border-color: var(--warn-rand); color: var(--warn-text); }
.box.warnung::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.5 17h-19z'/%3E%3Cpath d='M12 10v5M12 17.8v.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.5 17h-19z'/%3E%3Cpath d='M12 10v5M12 17.8v.01'/%3E%3C/svg%3E"); }
/* Fehler: rötliche Fläche, Rahmen DLRG-Rot, Symbol rot, Text dunkel – kein Weiß auf Rot. */
.box.fehler { background: var(--fehler-flaeche); border-color: var(--akzent); color: var(--text-stark); }
.box.fehler::before { background-color: var(--fehler-text); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9 9l6 6M15 9l-6 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9 9l6 6M15 9l-6 6'/%3E%3C/svg%3E"); }
.box.erfolg { background: var(--erfolg-flaeche); border-color: var(--erfolg-rand); color: var(--text-stark); }
.box.erfolg::before { background-color: var(--erfolg-rand); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8 12.3l2.8 2.8L16.2 9.3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8 12.3l2.8 2.8L16.2 9.3'/%3E%3C/svg%3E"); }
.hinweis a, .box a { color: inherit; font-weight: 700; }
.box.fehler a { color: var(--fehler-text); }
.box :is(strong, b) { color: inherit; }
.box > :last-child, .hinweis > :last-child { margin-bottom: 0; }
.box h2 { color: inherit; margin-top: 0; }
.box ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.box li + li { margin-top: 2px; }
.box:focus { outline: none; }
@media (max-width: 640px) {
  .hinweis, .box { padding: 12px 12px 12px 42px; }
  .hinweis::before, .box::before { left: 12px; }
}
@media print { .hinweis::before, .box::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.seitenfuss {
  border-top: 1px solid var(--rahmen);
  color: var(--text-gedaempft);
  font-size: .9rem;
  padding: 1rem 0 2rem;
}
.fuss-innen { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }

@media print {
  .seitenfuss, .skip-link { display: none; }
  .karte { box-shadow: none; }
}
