:root {
  --paper: #F6F4EF;
  --paper-2: #EEEAE0;
  --ink: #1E2328;
  --muted: #4B545C;
  --line: #D9D4C7;
  --accent: #F2C230;
  --accent-ink: #1E2328;
  --green: #2F5D50;
  --red: #8E2C23;
  --max: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(180deg, #FBFAF7 0%, var(--paper) 60%, var(--paper-2) 100%);
  min-height: 100vh;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }

p + p { margin-top: 1rem; }

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

/* Notfall-Leiste */
.notfall {
  background: var(--red);
  color: #FFFFFF;
  font-size: 0.95rem;
}
.notfall .wrap {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding-top: 0.65rem; padding-bottom: 0.65rem;
}
.notfall strong { font-weight: 700; }

/* Kopf: Schriftzug über die ganze Breite, Wappen links und rechts */
header.kopf { border-bottom: 1px solid var(--line); }
.kopf-innen {
  max-width: 1400px; margin: 0 auto; padding: 1rem 1.25rem;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
}
.kopf .wappen { width: clamp(42px, 8vw, 104px); height: auto; display: block; }
.kopf .wappen:last-child { transform: scaleX(-1); }
.brand {
  font-family: Georgia, serif; font-weight: 700; text-align: center;
  font-size: clamp(1.15rem, 5vw, 3.6rem); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand span { box-shadow: inset 0 -0.42em 0 var(--accent); padding: 0 0.08em; }

/* Leiste mit Burger-Menü und Notfall, bleibt beim Scrollen oben */
.leiste {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 244, 239, 0.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.leiste .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.menue { position: relative; }
.menue summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: 6px; background: #FFFFFF;
}
.menue summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after {
  display: block; width: 1.2rem; height: 2px; background: var(--ink); border-radius: 1px; position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menue[open] .burger { background: transparent; }
.menue[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.menue[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.menue nav.main {
  position: absolute; top: calc(100% + 0.4rem); left: 0; min-width: 15rem;
  display: flex; flex-direction: column; padding: 0.4rem 0;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(30, 35, 40, 0.16);
}
nav.main a { color: var(--ink); text-decoration: none; padding: 0.6rem 1.1rem; font-size: 1rem; }
nav.main a:hover, nav.main a:focus-visible { background: var(--paper); }
.nav-notfall {
  color: #FFFFFF; background: var(--red); font-weight: 700; text-decoration: none;
  padding: 0.45rem 0.9rem; border-radius: 6px;
}
.nav-notfall:hover { background: #6F2019; }
@media (prefers-reduced-motion: reduce) { .burger, .burger::before, .burger::after { transition: none; } }

/* Hero */
.hero { padding: 4rem 0 3rem; }
.hero .kicker {
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); font-weight: 600; margin-bottom: 1rem;
}
.hero h1 { max-width: 30ch; }
.hero h1 mark {
  background: var(--accent); color: var(--accent-ink);
  padding: 0 0.12em; border-radius: 2px;
}
.hero .lead {
  margin-top: 1.25rem; max-width: 60ch;
  color: var(--muted); font-size: 1.15rem;
}
.hero .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block; padding: 0.8rem 1.3rem; border-radius: 4px;
  text-decoration: none; font-weight: 600; font-size: 1rem;
  border: 2px solid var(--ink);
}
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-dark:hover { background: #000; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #FFFFFF; }

/* Themenfeld: breite Leiste unter der Überschrift, je Gruppe Zeichen + Comic-Figur */
.themenfeld {
  max-width: 1400px; margin: 2.5rem auto 3.5rem; padding: 0 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem 1.25rem; justify-content: center;
}
/* Themengruppen: jede Gruppe so breit wie ihre Kacheln, Gruppen fliessen nebeneinander */
.gruppe { flex: 0 1 auto; min-width: 0; }
.gruppe-titel {
  margin: 0 0 0.6rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--ink);
  font-family: Georgia, serif; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.gruppe-felder { display: grid; grid-template-columns: repeat(var(--n), 175px); gap: 0.9rem; }
.feld {
  --farbe: var(--green);
  position: relative; display: flex; flex-direction: column;
  background: #FFFFFF; border: 1px solid var(--line); border-top: 5px solid var(--farbe);
  border-radius: 8px; overflow: hidden; color: var(--ink); text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feld:hover, .feld:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(30, 35, 40, 0.12); }
.feld:focus-visible { outline: 2px solid var(--farbe); outline-offset: 3px; }
.f-behaelter { --farbe: #F28C28; }
.f-atemschutz { --farbe: #245CA6; }
.f-hochdruck { --farbe: #F2C230; }
.f-posten { --farbe: #2F7A4F; }
.f-chemie { --farbe: #C0392B; }
.f-brand { --farbe: #D9480F; }
.f-unfall { --farbe: #1E2328; }
.f-absturz { --farbe: #7A4FA0; }
.f-abwasser { --farbe: #5B6B2F; }
.f-brandschutz { --farbe: #B02A2A; }
.f-erstehilfe { --farbe: #1E8449; }
.f-geruest { --farbe: #2E4A7D; }
.f-psa { --farbe: #E67E22; }
.f-industrie { --farbe: #4A4A4A; }
.f-unterweisung { --farbe: #1F6F78; }
.f-fahrzeug { --farbe: #D4A017; }
.f-zeichen { --farbe: #E8A317; }
.feld .zeichen { position: absolute; top: 0.6rem; left: 0.6rem; width: 2.6rem; height: 2.6rem; z-index: 1; }
.feld .zeichen svg { width: 100%; height: 100%; display: block; }
.feld .zeichen img { width: 100%; height: 100%; object-fit: contain; display: block; }
.feld .figur {
  height: 170px; display: flex; align-items: flex-end; justify-content: center;
  padding: 0.75rem 0.5rem 0;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--farbe) 18%, #FFFFFF) 0%, #FFFFFF 70%);
}
.feld .figur img { max-height: 100%; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
.feld .text { padding: 0.75rem 0.9rem 0.9rem; border-top: 1px solid var(--line); }
.feld strong { display: block; font-family: Georgia, serif; font-size: clamp(0.92rem, 1.1vw, 1.08rem); line-height: 1.25; hyphens: manual; }
.feld small { display: block; margin-top: 0.25rem; font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 640px) {
  .themenfeld { display: block; margin: 1.75rem auto 2.5rem; }
  .gruppe + .gruppe { margin-top: 1.5rem; }
  .gruppe-felder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .feld .figur { height: 130px; }
  .feld .text { padding: 0.65rem 0.7rem 0.75rem; }
  .feld strong { font-size: 0.98rem; }
  .feld .zeichen { width: 2.1rem; height: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { .feld { transition: none; } }

/* Schriftzug mit Wappen links und rechts */

/* Notfallkasten über den Themen */
.notfallkasten { padding: 0 0 3.5rem; scroll-margin-top: 4.5rem; }
.nk-rahmen {
  background: #FFFFFF; border: 2px solid var(--red); border-top-width: 10px;
  border-radius: 8px; padding: 1.5rem 1.75rem 1.75rem;
}
.nk-rahmen h2 { color: var(--red); margin-bottom: 0.5rem; }
.nk-regel { font-size: 1.1rem; max-width: 70ch; }
.nk-nummern { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-top: 1.25rem; }
.nk-nr {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.9rem 1rem; border-radius: 6px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
}
.nk-nr b { font-family: Georgia, serif; font-size: 2rem; line-height: 1.1; color: var(--red); }
.nk-nr span { font-size: 0.9rem; color: var(--muted); line-height: 1.35; hyphens: auto; overflow-wrap: anywhere; }
.nk-112 { background: var(--red); border-color: var(--red); }
.nk-112 b, .nk-112 span { color: #FFFFFF; }
.nk-gift { border-color: #6B3FA0; }
.nk-gift b { color: #6B3FA0; }
.nk-leise b { color: var(--ink); font-size: 1.6rem; }
a.nk-nr:hover { box-shadow: 0 4px 12px rgba(30, 35, 40, 0.12); }
.nk-unten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; margin-top: 1.5rem; }
.nk-liste { margin-top: 0.4rem; padding-left: 1.2rem; }
.nk-liste li { margin-bottom: 0.15rem; }
ul.nk-liste { columns: 2; column-gap: 1.5rem; }
.nk-klein { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 900px) { .nk-nummern { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) {
  .nk-rahmen { padding: 1.1rem 1.1rem 1.25rem; }
  .nk-unten { grid-template-columns: 1fr; }
  .nk-nr b { font-size: 1.6rem; }
}

/* Prinzip-Box */
.prinzip {
  margin-top: 3rem;
  border-left: 4px solid var(--green);
  padding: 1.25rem 1.5rem;
  background: #FFFFFF;
  border-radius: 0 6px 6px 0;
  max-width: 60ch;
}
.prinzip ol { margin-top: 0.75rem; padding-left: 1.25rem; }
.prinzip li { margin-bottom: 0.4rem; }

section.block { padding: 3.5rem 0; border-top: 1px solid var(--line); }
section.block .intro { color: var(--muted); max-width: 62ch; margin-bottom: 2rem; }

/* Themen als Liste, keine Kacheln */
.themen { list-style: none; }
.themen li {
  display: grid; grid-template-columns: 4rem 1fr;
  gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
.themen li:first-child { border-top: 1px solid var(--line); }
.themen .nr {
  font-family: Georgia, serif; font-size: 1.6rem; color: var(--green); font-weight: 700;
}
.themen h3 a { color: var(--ink); text-decoration: none; }
.themen h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.themen p { color: var(--muted); max-width: 62ch; }
.themen .regel {
  display: inline-block; margin-top: 0.5rem; font-size: 0.85rem;
  color: var(--green); font-weight: 600;
}

/* Hinweis-Box */
.hinweis {
  background: #FFFFFF; border: 1px solid var(--line);
  border-radius: 6px; padding: 1.25rem 1.5rem; max-width: 70ch;
}
.hinweis strong { color: var(--red); }

/* Über */
.ueber { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 70ch; }
.ueber ul { padding-left: 1.2rem; color: var(--muted); }
.ueber li { margin-bottom: 0.25rem; }

footer.site {
  border-top: 1px solid var(--line);
  background: var(--ink); color: #E7E3D8;
  padding: 2.5rem 0; font-size: 0.95rem;
}
footer.site a { color: #FFFFFF; }
footer.site .cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem;
}
footer.site h4 { font-family: Georgia, serif; color: #FFFFFF; font-size: 1.05rem; margin-bottom: 0.5rem; }
footer.site .small { margin-top: 1.5rem; font-size: 0.85rem; color: #B9B4A6; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .themen li { grid-template-columns: 2.5rem 1fr; }
  .prinzip { padding: 1rem 1.1rem; }
}

/* Rechtstexte (Impressum, Datenschutz) */
.legal { padding: 3rem 0 4rem; }
.legal .wrap > * { max-width: 70ch; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
.legal ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.legal li { margin-bottom: 0.3rem; }
.todo { background: #FFF3C4; border: 1px dashed var(--red); padding: 0 0.3em; border-radius: 3px; }
.entwurf { background: var(--red); color: #FFFFFF; padding: 0.75rem 1.25rem; font-weight: 600; }
.bald { display: inline-block; margin-left: 0.4rem; font-family: system-ui, sans-serif; font-size: 0.75rem; font-weight: 600; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: 0.05rem 0.4rem; vertical-align: middle; }

/* Fachbeiträge */
.artikel { padding: 2.5rem 0 4rem; }
.artikel .wrap > * { max-width: 70ch; }
.artikel .pfad { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; }
.artikel .pfad a { color: var(--muted); }
.artikel h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 0.75rem; }
.artikel .lead { color: var(--muted); font-size: 1.15rem; }
.artikel .regel { display: inline-block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--green); font-weight: 600; }
.artikel h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 2.75rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.artikel h3 { margin: 1.75rem 0 0.4rem; }
.artikel ul, .artikel ol { padding-left: 1.25rem; margin-top: 0.6rem; }
.artikel li { margin-bottom: 0.4rem; }
.artikel .kurz { margin-top: 2rem; border-left: 4px solid var(--green); padding: 1.1rem 1.4rem; background: #FFFFFF; border-radius: 0 6px 6px 0; }
.artikel .kurz ul { margin-top: 0.5rem; }
.artikel .praxis { margin-top: 1.5rem; border-left: 4px solid var(--accent); padding: 1rem 1.4rem; background: #FFFFFF; border-radius: 0 6px 6px 0; }
.artikel .praxis strong:first-child { display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.artikel .stopp { margin-top: 1.5rem; border: 1px solid var(--red); border-left-width: 4px; padding: 1rem 1.4rem; background: #FFFFFF; border-radius: 0 6px 6px 0; }
.artikel .stopp strong:first-child { color: var(--red); }
.artikel table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.95rem; background: #FFFFFF; }
.artikel th, .artikel td { text-align: left; vertical-align: top; padding: 0.5rem 0.65rem; border: 1px solid var(--line); }
.artikel th { background: var(--paper-2); }
.artikel .tabelle { overflow-x: auto; }
.artikel .quellen { font-size: 0.92rem; color: var(--muted); }
.artikel .quellen li { margin-bottom: 0.25rem; }
.artikel .stand { margin-top: 2rem; font-size: 0.85rem; color: var(--muted); }
.artikel .weiter { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Merke: banal klingende Tipps, die oft falsch gemacht werden */
.artikel .merke { margin-top: 1.5rem; border: 1px solid var(--accent); border-left-width: 4px; padding: 0.9rem 1.4rem; background: #FDF3CF; border-radius: 0 6px 6px 0; font-weight: 600; }
.artikel .merke::before { content: "Merke"; display: block; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; font-weight: 700; }

/* Daumenkino: Bildgeschichten */
.dk { margin-top: 2rem; max-width: 640px; outline: none; }
.dk:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.dk-rahmen { margin: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dk-titel { font-weight: 700; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.dk-buehne { position: relative; aspect-ratio: 480 / 300; cursor: pointer; background: #E9EEF1; }
.dk-bild { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.35s ease; }
.dk-bild.an { opacity: 1; }
.dk-text { padding: 0.8rem 1rem 0.2rem; min-height: 4.6em; font-size: 0.97rem; }
.dk-nr { display: inline-block; font-weight: 700; color: var(--green); margin-right: 0.3rem; }
.dk-steuer { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 1rem 0.8rem; }
.dk-steuer button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 4px; min-width: 2.2rem; height: 2.2rem; }
.dk-steuer button:hover { background: var(--paper-2); }
.dk-punkte { display: flex; gap: 0.35rem; flex: 1; justify-content: center; flex-wrap: wrap; }
.dk-steuer .dk-punkt { min-width: 0; width: 0.75rem; height: 0.75rem; padding: 0; border-radius: 50%; background: var(--line); border: none; }
.dk-steuer .dk-punkt.an { background: var(--green); }
@media (prefers-reduced-motion: reduce) { .dk-bild { transition: none; } }
@media print { .dk-steuer { display: none; } }

/* Aus Unfällen lernen */
.artikel .dummy-bild { display: block; width: 180px; height: auto; margin: 0.5rem 0 1rem; }
.artikel .fall-meta { font-size: 0.9rem; color: var(--muted); margin-top: -0.25rem; }
.artikel .analyse { margin-top: 1.25rem; border: 1px dashed var(--ink); border-radius: 6px; padding: 1rem 1.4rem 1.2rem; background: #FFFFFF; }
.artikel .analyse ul { margin: 0.5rem 0 0; }
.artikel .quellen { margin-top: 1rem; }

/* Themenseiten: rechte Spalte mit Figur und Video-Platzhalter */
.seite-rechts { display: flex; flex-direction: column; gap: 1.25rem; order: 99; margin-top: 2.5rem; }
.seitenfigur { margin: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1rem 0.75rem; text-align: center; }
.seitenfigur img { max-width: 100%; max-height: 260px; height: auto; mix-blend-mode: multiply; }
.seitenfigur figcaption { margin-top: 0.5rem; font-family: Georgia, serif; font-weight: 700; }
.video-platz {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  background: var(--ink); color: #E7E3D8; border-radius: 8px; text-align: center; padding: 1rem;
}
.video-platz small { color: #B9B4A6; font-size: 0.85rem; }
.video-platz .play {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--accent); position: relative; margin-bottom: 0.4rem;
}
.video-platz .play::after {
  content: ""; position: absolute; left: 1.25rem; top: 0.95rem;
  border-left: 1.1rem solid var(--ink); border-top: 0.65rem solid transparent; border-bottom: 0.65rem solid transparent;
}
@media (min-width: 1100px) {
  .artikel .wrap { display: grid; grid-template-columns: minmax(0, 70ch) 300px; column-gap: 3.5rem; align-items: start; }
  .artikel .wrap > * { grid-column: 1; }
  .artikel .wrap > .seite-rechts { grid-column: 2; grid-row: 1 / span 80; order: 0; margin-top: 4.5rem; position: sticky; top: 5rem; }
}
@media (max-width: 640px) {
  .seitenfigur img { max-height: 200px; }
}

/* Zeichen und Gefahrstoffe */
.gestis-suche { margin-top: 0.75rem; }
.gestis-suche label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.gestis-zeile { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gestis-zeile input { flex: 1 1 14rem; min-width: 0; font: inherit; padding: 0.7rem 0.9rem; border: 2px solid var(--ink); border-radius: 4px; background: #FFFFFF; }
#gestis-ergebnis { margin-top: 0.75rem; }
.gestis-liste { list-style: none; padding: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px; }
.gestis-liste li { padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--line); }
.gestis-liste li:last-child { border-bottom: 0; }
.gestis-liste small { color: var(--muted); margin-left: 0.4rem; }
.gestis-meldung { color: var(--muted); }
.gestis-hinweis { margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }
.zkarten { display: grid; gap: 0.75rem; margin-top: 1rem; }
.zkarte { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: start; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem 1rem; }
.zkarte img { width: 72px; height: 72px; }
.zkarte p { margin-top: 0.2rem; }
.zkarte small { color: var(--muted); }
.artikel .zregel { color: var(--muted); margin-top: -0.2rem; }
.zraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.zklein { margin: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem; text-align: center; }
.zklein img { width: 64px; height: 64px; object-fit: contain; }
.zklein figcaption { margin-top: 0.4rem; font-size: 0.85rem; line-height: 1.3; }
.zklein b { display: block; color: var(--muted); font-size: 0.78rem; }
.legal .ds-versprechen { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: #FFFFFF; border-left: 4px solid var(--green); border-radius: 0 6px 6px 0; font-size: 1.1rem; font-weight: 600; }

/* Heute arbeite ich mit ... (Stoffkarten) */
.stoffwahl { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.stoffwahl button { font: inherit; font-weight: 600; cursor: pointer; padding: 0.55rem 0.9rem; border-radius: 999px; border: 2px solid var(--ink); background: #FFFFFF; color: var(--ink); }
.stoffwahl button:hover { background: var(--paper-2); }
.stoffwahl button.an { background: var(--ink); color: #FFFFFF; }
.stoffwahl button.alle { border-style: dashed; }
.artikel .stoff-andere { margin-top: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.stoffkarten { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.stoffkarte { background: #FFFFFF; border: 1px solid var(--line); border-top: 6px solid var(--red); border-radius: 8px; padding: 1.1rem 1.3rem 1.2rem; }
.stoffkarte[hidden] { display: none; }
.artikel .stoffkarte h2 { margin: 0; padding: 0; border: 0; font-size: 1.5rem; }
.stoffkarte h2 small { font-family: system-ui, sans-serif; font-size: 0.95rem; color: var(--muted); font-weight: 600; margin-left: 0.3rem; }
.sk-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; }
.sk-ghs { display: flex; align-items: center; gap: 0.3rem; }
.sk-ghs img { width: 44px; height: 44px; }
.signal { margin-left: 0.4rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; padding: 0.2rem 0.5rem; border-radius: 4px; border: 2px solid var(--ink); }
.signal.gefahr { background: var(--red); border-color: var(--red); color: #FFFFFF; }
.artikel .sk-typisch { margin-top: 0.6rem; color: var(--muted); }
.artikel .stoffkarte h3 { margin: 1rem 0 0.35rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: system-ui, sans-serif; }
.sk-mindest dl { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.35rem 0.8rem; margin: 0; }
.sk-mindest dt { font-weight: 700; }
.sk-mindest dd { margin: 0; }
.sk-beachte { background: #FDF3CF; border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; padding: 0.1rem 1rem 0.6rem; margin-top: 1rem; }
.artikel .sk-beachte h3 { margin-top: 0.7rem; }
.artikel .sk-beachte ul { margin-top: 0.2rem; }
.artikel .sk-agw { margin-top: 0.3rem; font-weight: 700; color: var(--green); }
.sk-gestis { display: inline-block; margin-top: 0.9rem; font-weight: 600; }
@media (max-width: 640px) {
  .sk-mindest dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .sk-mindest dd { margin-bottom: 0.4rem; }
  .sk-ghs img { width: 36px; height: 36px; }
}

/* Kurze Begruessung auf Beitragsseiten (Figur + Thema), siehe themen_intro.py */
#themenintro { display: none; }
#themenintro.an {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #FFFFFF; cursor: pointer;
  animation: ti-aus 0.5s ease 2.4s forwards;
}
#themenintro .ti-buehne { text-align: center; padding: 0 1.5rem; }
#themenintro img {
  display: block; margin: 0 auto; width: auto; height: min(42vh, 320px); max-width: 80vw; object-fit: contain;
  mix-blend-mode: multiply; animation: ti-ein 0.6s ease both;
}
#themenintro .ti-titel {
  margin: 1rem 0 0; font-family: Georgia, serif; font-weight: 700; color: var(--ink);
  font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.2;
  opacity: 0; animation: ti-ein 0.5s ease 0.5s forwards;
}
#themenintro .ti-titel span {
  display: block; margin-top: 0.4rem; color: #F28C28; font-family: inherit; font-size: 0.45em;
  letter-spacing: 0.12em; text-transform: uppercase;
}
@keyframes ti-ein { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ti-aus { to { opacity: 0; visibility: hidden; } }
#themenintro.weg { display: none; }

/* Brandklassen-Piktogramme in Tabellen */
.tabelle td.bk { width: 64px; }
.tabelle td.bk img { display: block; width: 52px; height: 52px; }

/* Startseite: Kategorien mit Deckbild (kategorien.py) */
.kategorien {
  max-width: var(--max); margin: 2.5rem auto 3.5rem; padding: 0 1.25rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
}
.kat { --farbe: var(--green); display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--line);
  border-top: 5px solid var(--farbe); border-radius: 8px; overflow: hidden; }
.kat-bild { display: block; aspect-ratio: 3 / 2; background: color-mix(in srgb, var(--farbe) 12%, #FFFFFF); overflow: hidden; }
.kat-bild img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.kat-bild:hover img, .kat-bild:focus-visible img { transform: scale(1.03); }
.kat-text { padding: 0.9rem 1.1rem 1.1rem; }
.kat-text h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.kat-text p { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--muted); }
.kat-text ul { list-style: none; margin: 0; padding: 0; }
.kat-text li { border-top: 1px solid var(--line); }
.kat-text li a { display: block; padding: 0.45rem 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.kat-text li a::after { content: " ›"; color: var(--farbe); }
.kat-text li a:hover { color: var(--farbe); }
@media (max-width: 1000px) { .kategorien { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kategorien { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.75rem auto 2.5rem; } }
@media (prefers-reduced-motion: reduce) { .kat-bild img { transition: none; } }

/* Seitenmenue am linken Rand, nur wenn genug Platz ist (kategorien.py) */
main { position: relative; }
.seitenmenue { display: none; }
@media (min-width: 1500px) {
  .seitenmenue { display: block; position: absolute; left: 16px; top: 0; bottom: 0; width: 210px; z-index: 5; }
  .sm-innen { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 1rem 0.75rem;
    background: #FFFFFF; border: 1px solid var(--line); border-radius: 8px; font-size: 0.9rem; }
  .sm-start { display: block; margin-bottom: 0.5rem; font-weight: 700; color: var(--ink); text-decoration: none; }
  .sm-kat { border-top: 1px solid var(--line); }
  .sm-kat summary { cursor: pointer; padding: 0.45rem 0; font-weight: 700; list-style: none; border-left: 4px solid var(--farbe); padding-left: 0.5rem; }
  .sm-kat summary::-webkit-details-marker { display: none; }
  .sm-kat summary::after { content: "+"; float: right; color: var(--muted); }
  .sm-kat[open] summary::after { content: "–"; }
  .sm-kat nav { display: flex; flex-direction: column; padding: 0 0 0.5rem 0.9rem; }
  .sm-kat nav a { padding: 0.25rem 0; color: var(--ink); text-decoration: none; }
  .sm-kat nav a:hover { color: var(--farbe); }
  .sm-kat nav a[aria-current="page"] { font-weight: 700; color: var(--farbe); }
}
