/* Der Pulsgeber – Website nach CI. Leitidee: EKG-Papier. */

@font-face { font-family: "Montserrat"; font-weight: 800; font-display: optional; src: url("fonts/montserrat-v800.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: optional; src: url("fonts/open-sans-v400.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: optional; src: url("fonts/open-sans-v600.woff2") format("woff2"); }

:root {
  --petrol: #0F4C5C;
  --petrol-tief: #0A3844;
  --koralle: #FF6B5B;
  --papier: #F3F7F7;
  --raster-fein: #DCE8EA;
  --raster-grob: #C3D8DC;
  --weiss: #FFFFFF;
  --warnrot: #C2412F;
  --koralle-hell: #FFE3DF;
  --dunkelrot: #8A2A1E;
  --linie: #B9CFD3;
  --placeholder: #3E6670;
  --heading: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --body: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --breit: 1120px;
  --text: 68ch;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); font-size: 1.125rem; line-height: 1.65; color: var(--petrol); background: var(--weiss); }
img, svg { display: block; max-width: 100%; }
a { color: var(--petrol); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--koralle); }
a:hover { color: var(--warnrot); }
:focus-visible { outline: 3px solid var(--koralle); outline-offset: 3px; }
p, ul, ol { margin: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 800; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }
button, input { font-family: inherit; font-size: inherit; color: inherit; }

.wrap { max-width: var(--breit); margin: 0 auto; padding: 0 24px; }
.ueberspringen { position: absolute; left: -9999px; }
.ueberspringen:focus { left: 16px; top: 16px; background: var(--weiss); padding: 8px 12px; z-index: 10; }

/* EKG-Raster: 1-mm- und 5-mm-Linien */
.raster {
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--raster-grob) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster-grob) 1px, transparent 1px),
    linear-gradient(var(--raster-fein) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster-fein) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

/* Kopf */
.kopf { background: var(--petrol); color: var(--weiss); }
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 32px; padding-top: 14px; padding-bottom: 14px; }
.marke { display: flex; align-items: center; gap: 12px; color: var(--weiss); text-decoration: none; font-family: var(--heading); font-weight: 800; font-size: 1.2rem; min-height: 48px; }
.marke:hover { color: var(--weiss); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.nav a { color: var(--weiss); text-decoration: none; font-weight: 600; font-size: 1rem; min-height: 48px; display: inline-flex; align-items: center; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--weiss); border-bottom-color: var(--koralle); }
.nav a[aria-current="page"] { border-bottom-color: var(--koralle); }

/* Start: Monitorstreifen */
.monitor { border-bottom: 1px solid var(--linie); }
.monitor .wrap { padding-top: clamp(48px, 9vw, 104px); padding-bottom: 32px; }
.monitor h1 { max-width: 15ch; }
.monitor .unter { font-size: clamp(1.15rem, 2.4vw, 1.4rem); max-width: 34ch; margin-top: 24px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.knopf { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 10px; font-family: var(--heading); font-weight: 800; font-size: 1.05rem; text-decoration: none; border: 3px solid var(--petrol); }
.knopf.voll { background: var(--petrol); color: var(--weiss); }
.knopf.voll:hover { background: var(--petrol-tief); color: var(--weiss); }
.knopf.rand { background: transparent; color: var(--petrol); }
.knopf.rand:hover { background: var(--weiss); color: var(--petrol); }
.streifen { width: 100%; height: clamp(90px, 14vw, 150px); margin-top: 40px; }
.streifen path { fill: none; stroke: var(--koralle); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: zeichnen 2.4s ease-out 0.3s forwards; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .streifen path { animation: none; stroke-dashoffset: 0; } }

/* Notrufnummern */
.nummern { background: var(--petrol); color: var(--weiss); }
.nummern .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nummer { padding: 22px 0; display: flex; align-items: baseline; gap: 16px; }
.nummer + .nummer { border-top: 1px solid rgba(255,255,255,0.18); }
@media (min-width: 600px) { .nummer + .nummer { border-top: 0; border-left: 1px solid rgba(255,255,255,0.18); padding-left: 28px; } }
.nummer b { font-family: var(--heading); font-weight: 800; font-size: 2rem; color: var(--koralle); line-height: 1; white-space: nowrap; }

/* Abschnitte */
.abschnitt { padding: clamp(56px, 8vw, 96px) 0; }
.abschnitt + .abschnitt { padding-top: 0; }
.abschnitt h2 { margin-bottom: 20px; }
.einleitung { max-width: var(--text); font-size: 1.15rem; margin-bottom: 36px; }

/* Themenverzeichnis */
.verzeichnis { list-style: none; padding: 0; border-top: 3px solid var(--petrol); }
.verzeichnis li { border-bottom: 1px solid var(--linie); }
.verzeichnis a { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline; padding: 22px 4px; text-decoration: none; }
.verzeichnis a:hover { background: var(--papier); color: var(--petrol); }
.verzeichnis a:hover .titel { text-decoration: underline; text-decoration-color: var(--koralle); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.verzeichnis .titel { font-family: var(--heading); font-weight: 800; font-size: clamp(1.2rem, 2.6vw, 1.55rem); line-height: 1.2; }
.verzeichnis .kurz { grid-column: 1; color: var(--petrol); max-width: 60ch; }
.verzeichnis .art { grid-row: 1; grid-column: 2; font-size: 0.95rem; font-weight: 600; color: var(--warnrot); white-space: nowrap; }
.verzeichnis .bald .titel, .verzeichnis .bald .kurz { opacity: 0.85; }
@media (max-width: 560px) { .verzeichnis a { grid-template-columns: 1fr; } .verzeichnis .art { grid-row: auto; grid-column: 1; } }

/* Für wen: drei Spalten Fließtext, durch Linien getrennt */
.drei { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px 40px; }
.drei > div { border-top: 3px solid var(--koralle); padding-top: 18px; }
.drei h3 { margin-bottom: 8px; }

/* Zitat-Block */
.haltung { background: var(--papier); }
.haltung .wrap { padding-top: clamp(56px, 8vw, 96px); }
.haltung blockquote { margin: 0; font-family: var(--heading); font-weight: 800; font-size: clamp(1.6rem, 4.2vw, 2.6rem); line-height: 1.18; max-width: 22ch; }
.haltung p { max-width: var(--text); margin-top: 24px; }

/* Themenseite */
.themenkopf { border-bottom: 1px solid var(--linie); }
.themenkopf .wrap { padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(32px, 5vw, 56px); }
.pfad { font-size: 0.95rem; margin-bottom: 20px; }
.pfad a { font-weight: 600; }
.themenkopf h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); max-width: 18ch; }
.themenkopf .unter { font-size: clamp(1.1rem, 2.3vw, 1.3rem); max-width: 44ch; margin-top: 18px; }

.inhalt { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.inhalt .wrap > * + * { margin-top: 56px; }
.lauftext { max-width: var(--text); }
.lauftext > * + * { margin-top: 14px; }

.schritte { list-style: none; padding: 0; display: grid; gap: 0; border-top: 3px solid var(--petrol); max-width: 820px; }
.schritte li { display: grid; grid-template-columns: 88px 1fr; gap: 20px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--linie); }
.schritte .zeichen { width: 72px; height: 72px; border-radius: 50%; background: var(--koralle); color: var(--petrol); font-family: var(--heading); font-weight: 800; font-size: 2.2rem; display: flex; align-items: center; justify-content: center; }
.schritte h3 { margin-bottom: 4px; }
.schritte .frage { font-weight: 600; color: var(--warnrot); margin-top: 6px; }

.alarm { background: var(--petrol); color: var(--weiss); border-radius: 18px; padding: clamp(24px, 4vw, 40px); max-width: 820px; }
.alarm h2 { color: var(--weiss); margin-bottom: 16px; }
.alarm b.gross { display: block; font-family: var(--heading); font-weight: 800; font-size: clamp(2.6rem, 8vw, 4rem); color: var(--koralle); line-height: 1; margin-bottom: 18px; }
.alarm ul { padding-left: 1.2em; display: grid; gap: 8px; }

.liste-ok, .liste-nein { list-style: none; padding: 0; display: grid; gap: 14px; max-width: 760px; }
.liste-ok li, .liste-nein li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.marker { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.liste-ok .marker { background: var(--petrol); }
.liste-nein .marker { background: var(--warnrot); }
.liste-nein.abstand-klein { margin-top: 14px; }

.vorsicht { background: var(--koralle-hell); color: var(--dunkelrot); border-radius: 14px; padding: 20px 24px; font-weight: 600; max-width: 760px; }
.vorsicht.abstand { margin-top: 20px; }

.quellen { border-top: 1px solid var(--linie); padding-top: 24px; font-size: 0.98rem; max-width: var(--text); }
.quellen h2 { font-size: 1.15rem; margin-bottom: 10px; }
.quellen ul { padding-left: 1.1em; display: grid; gap: 6px; }

.drucken { font: inherit; font-weight: 600; background: transparent; color: var(--petrol); border: 2px solid var(--petrol); border-radius: 10px; min-height: 48px; padding: 0 20px; cursor: pointer; }
.drucken:hover { background: var(--papier); }

.checkliste { list-style: none; padding: 0; display: grid; gap: 0; max-width: 760px; border-top: 3px solid var(--petrol); }
.checkliste li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linie); }
.kaestchen { width: 22px; height: 22px; border: 2.5px solid var(--petrol); border-radius: 4px; margin-top: 4px; }

.block-titel { margin-bottom: 20px; }
.hinweis { margin-top: 28px; margin-bottom: 0; }

/* Suche und Filter, serverseitig, per HTMX beschleunigt */
.suche { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 8px; }
.suche label { flex: 1 1 100%; font-weight: 600; }
.feld { flex: 1 1 240px; min-height: 52px; border: 3px solid var(--petrol); border-radius: 10px; padding: 0 16px; background: var(--weiss); }
.feld::placeholder { color: var(--placeholder); opacity: 1; }
.filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.filter a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--petrol); text-decoration: none; font-weight: 600; }
.filter a[aria-current="page"] { background: var(--petrol); color: var(--weiss); }
.filter a:hover { background: var(--papier); color: var(--petrol); }
.filter a[aria-current="page"]:hover { background: var(--petrol-tief); color: var(--weiss); }
.katalog h2:not(:first-of-type) { margin-top: 56px; }
.leer { max-width: var(--text); margin-top: 28px; }
body.htmx-request { cursor: progress; }

/* Rechtsseiten */
.recht .wrap { max-width: 780px; }
.recht h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
.recht h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.platzhalter { background: var(--koralle-hell); color: var(--dunkelrot); padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Fuß */
.fuss { background: var(--petrol-tief); color: var(--weiss); padding: 44px 0 36px; font-size: 0.98rem; }
.fuss .wrap { display: grid; gap: 24px; }
@media (min-width: 720px) { .fuss .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.fuss h2 { font-size: 1rem; margin-bottom: 10px; color: var(--weiss); }
.fuss a { color: var(--weiss); }
.fuss a:hover { color: var(--koralle); }
.fuss ul { list-style: none; padding: 0; display: grid; gap: 0; }
.fuss li a { display: inline-flex; align-items: center; min-height: 48px; }
.fuss .klein { opacity: 0.85; max-width: 38ch; }

/* Druck: Themenseiten als Kühlschrank-Zettel */
@media print {
  .kopf, .fuss, .nummern, .drucken, .pfad, .streifen { display: none !important; }
  body { font-size: 12pt; }
  .raster { background: none; }
  .alarm { background: none; color: #000; border: 3px solid #000; }
  .alarm h2, .alarm b.gross { color: #000; }
  a { text-decoration: none; }
}
