/* ==========================================================================
   Tierärztlicher Notdienst Rheinland-Pfalz – öffentliche Seiten

   Gestaltung: das Gelb des bisherigen Auftritts als Bühne, darauf weiße
   Karten mit weichen Schatten; Haarlinien statt Balken; eine Schrift in
   wenigen, fein abgestuften Stärken. Alle Textfarben erfüllen WCAG 2.1 AA.
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  --yellow: #f9db6d;
  --yellow-tint: #fdf4d3;
  --ink: #1d1d1b;
  --muted: #5d5a52;          /* Nebentext: auf Weiß 6,9:1, auf Gelb 4,9:1 */
  --faint: #86827a;          /* Rahmen von Eingabefeldern, 3,8:1 */
  --coral: #f95738;
  --coral-deep: #b3301a;
  --coral-tint: #fdebe6;
  --teal-deep: #0a5f61;
  --blush: #f7f3f0;
  --white: #fff;
  --line: rgb(29 29 27 / 0.12);
  --line-strong: rgb(29 29 27 / 0.24);

  --shadow-s: 0 1px 2px rgb(60 45 0 / 0.06), 0 3px 10px -3px rgb(60 45 0 / 0.12);
  --shadow-m: 0 2px 4px rgb(60 45 0 / 0.05), 0 16px 36px -18px rgb(60 45 0 / 0.3);
  --shadow-l: 0 2px 6px rgb(60 45 0 / 0.06), 0 30px 70px -30px rgb(60 45 0 / 0.5);

  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --text-xs: 0.8125rem;
  --text-s: 0.9rem;
  --text: 1.0625rem;
  --text-l: 1.1875rem;
  --title: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 5px var(--white);
}
main:focus { outline: none; box-shadow: none; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 2000;
  padding: 0.7rem 1rem; border-radius: 0.75rem;
  background: var(--ink); color: var(--white); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.icon { flex: none; }

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap;
  padding-block: 0.8rem;
}
.logo { display: block; flex: none; border-radius: 4px; }
.logo img { width: clamp(9.75rem, 18vw, 12.25rem); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.1rem; list-style: none; }
.site-nav a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 99rem;
  color: var(--ink); font-size: var(--text-s); font-weight: 500; text-decoration: none;
  transition: background-color 0.15s;
}
.site-nav a:hover { background: var(--blush); }

.nav-toggle {
  display: none; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0 0.95rem;
  border: 1px solid var(--faint); border-radius: 99rem; background: var(--white);
  font-size: var(--text-s); font-weight: 600; cursor: pointer;
}

@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; flex-basis: 100%; }
  .js .site-nav.is-open { display: block; }
  .site-nav { flex-basis: 100%; }
  .js .site-nav ul { flex-direction: column; border-top: 1px solid var(--line); padding-top: 0.4rem; }
  .js .site-nav a { padding: 0.75rem 0.25rem; border-radius: 0.5rem; font-size: 1rem; }
}

/* --------------------------------------------------------------------------
   Schaltflächen
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.4rem 1.15rem;
  border: 1px solid transparent; border-radius: 99rem;
  font-size: 0.975rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn-call { background: var(--ink); color: var(--white); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.btn-call:hover { background: #000; box-shadow: var(--shadow-s); }
.btn-line { background: var(--white); border-color: var(--faint); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: 0.8rem; font-weight: 500; }
.btn-quiet:hover { background: var(--blush); color: var(--ink); }

.link-button {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0;
  border: 0; background: none; color: var(--ink); font-size: var(--text-s); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; cursor: pointer;
}
.link-button:hover { text-decoration-thickness: 2px; }
.link-button:disabled { opacity: 0.6; cursor: progress; }

/* --------------------------------------------------------------------------
   Meldungen: Leiste und Overlay
   -------------------------------------------------------------------------- */
.banner { background: var(--ink); color: var(--white); font-size: var(--text-s); }
.banner-inner { display: flex; gap: 0.65rem; align-items: flex-start; padding-block: 0.7rem; }
.banner .icon { margin-top: 0.2rem; color: var(--yellow); }
.banner strong { margin-right: 0.25rem; }

.overlay {
  width: min(33rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  padding: 0; border: 0; border-radius: 1.5rem; background: transparent; color: var(--ink); overflow: visible;
}
.overlay::backdrop { background: rgb(29 29 27 / 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.overlay-card {
  max-height: calc(100dvh - 2rem); overflow-y: auto;
  padding: clamp(1.5rem, 5vw, 2.25rem); border-radius: 1.5rem; background: var(--white); box-shadow: var(--shadow-l);
}
.overlay-mark {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--coral-tint); color: var(--coral-deep);
}
.overlay h2 { margin-top: 1.1rem; font-size: 1.5rem; letter-spacing: -0.025em; }
.overlay-body p { margin-top: 0.8rem; }
.overlay-actions { display: flex; margin-top: 1.6rem; }
.overlay-actions .btn { min-width: 9rem; }
.overlay[open] .overlay-card { animation: overlay-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1); }
.overlay[open]::backdrop { animation: fade-in 0.2s ease-out; }
/* Nur Bewegung, keine Deckkraft: Die Meldung ist sofort lesbar, auch wenn die Animation nicht läuft. */
@keyframes overlay-in { from { transform: translateY(0.9rem) scale(0.97); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 30rem) { .overlay-actions .btn { width: 100%; } }

/* Ohne JavaScript steht die Meldung als Kasten am Seitenanfang. */
.no-js .overlay { display: block; position: static; width: min(100% - 2 * var(--gutter), var(--wrap)); margin: 1rem auto; }
.no-js .overlay-card { box-shadow: none; border: 1px solid var(--line-strong); }
.no-js .overlay-actions { display: none; }

/* --------------------------------------------------------------------------
   Hero: Tag, Kalenderleiste, Kliniken und Karte
   -------------------------------------------------------------------------- */
.hero { background: var(--yellow); padding-block: clamp(1.75rem, 4.5vw, 3.75rem) clamp(2.25rem, 5vw, 4.5rem); }

.hero-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "map" "list";
}
.hero-head { grid-area: head; min-width: 0; }
.hero-map { grid-area: map; min-width: 0; }
.hero-list { grid-area: list; min-width: 0; }

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "head map" "list map";
    grid-template-rows: auto 1fr;
    column-gap: clamp(2rem, 4.5vw, 4.5rem);
    row-gap: 1.75rem;
  }
  .hero-map { position: sticky; top: 1.5rem; align-self: start; }
}

.hero-topic {
  display: block; margin-bottom: 0.85rem;
  font-size: var(--text); font-weight: 600; letter-spacing: 0; line-height: 1.3;
}
.hero-date {
  display: block; font-size: clamp(2.5rem, 1.4rem + 5vw, 4.25rem); font-weight: 600;
  line-height: 1.02; letter-spacing: -0.045em;
}
.hero-rel, .hero-day { display: block; }
.hero-day { white-space: nowrap; }
/* Datum an die Spaltenbreite koppeln, damit „30. September" nie umbricht */
@supports (font-size: 1cqi) {
  .hero-head { container-type: inline-size; }
  .hero-date { font-size: clamp(2.3rem, 12.2cqi, 4.25rem); }
}

.hero-summary { margin-top: 1.1rem; max-width: 30rem; font-size: var(--text-l); line-height: 1.45; }

/* Kalenderleiste */
.days { display: flex; align-items: stretch; gap: 0.35rem; margin-top: 1.5rem; }
.days-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; flex: 1; list-style: none; min-width: 0; }
.day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  min-height: 4.1rem; padding: 0.45rem 0.1rem 0.5rem;
  border: 1px solid rgb(29 29 27 / 0.16); border-radius: 0.9rem; background: rgb(255 255 255 / 0.38);
  color: var(--ink); text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.day:hover { background: var(--white); border-color: transparent; box-shadow: var(--shadow-s); }
.day-wd { font-size: 0.75rem; font-weight: 500; line-height: 1.1; color: var(--muted); }
.day-num { font-size: 1.25rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.day-dots { display: flex; gap: 3px; height: 4px; margin-top: 0.1rem; }
.day-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); opacity: 0.55; }
.day.is-empty { background: transparent; border-style: dashed; border-color: rgb(29 29 27 / 0.55); }
.day.is-selected { background: var(--ink); border-color: var(--ink); color: var(--white); box-shadow: var(--shadow-m); }
.day.is-selected .day-wd { color: rgb(255 255 255 / 0.78); }
.day.is-selected .day-dots i { background: var(--yellow); opacity: 1; }

.days-arrow {
  display: grid; place-items: center; flex: none; width: 2.5rem;
  border: 1px solid rgb(29 29 27 / 0.16); border-radius: 0.9rem; color: var(--ink); background: rgb(255 255 255 / 0.38);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.days-arrow:hover { background: var(--white); border-color: transparent; box-shadow: var(--shadow-s); }
.days-arrow.is-disabled { opacity: 0.3; background: transparent; }

@media (max-width: 30rem) {
  .days { gap: 0.25rem; }
  .days-arrow { width: 2.1rem; border-radius: 0.75rem; }
  .days-list { gap: 0.25rem; }
  .day { border-radius: 0.75rem; }
  .day-wd { font-size: 0.7rem; }
  .day-num { font-size: 1.1rem; }
}

.hero-back { margin-top: 0.9rem; font-size: var(--text-s); }
.hero-back a { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 2rem; color: var(--ink); font-weight: 600; }

/* Kliniken im Dienst */
.duty-list { list-style: none; display: grid; gap: 0.75rem; }
.duty {
  padding: 1.15rem 1.25rem 1.25rem; border-radius: 1.25rem; background: var(--white);
  box-shadow: var(--shadow-s); scroll-margin-top: 1.5rem;
  transition: box-shadow 0.2s;
}
.duty.is-highlighted { box-shadow: 0 0 0 2px var(--ink), var(--shadow-m); }
.duty-top { display: flex; align-items: center; gap: 0.7rem; }
.duty-num, .pin, .legend-pin {
  display: grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--ink); color: var(--white);
  font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.duty-num { width: 1.6rem; height: 1.6rem; font-size: 0.82rem; }
.duty-name { flex: 1; min-width: 0; font-size: 1.22rem; letter-spacing: -0.02em; }
.duty-name a { color: inherit; text-decoration: none; }
.duty-name a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.duty-distance {
  flex: none; padding: 0.15rem 0.6rem; border-radius: 99rem; background: var(--blush);
  font-size: var(--text-xs); font-weight: 600; white-space: nowrap;
}
.duty-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.65rem; margin-top: 0.7rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0.7rem 0.2rem 0.6rem;
  border-radius: 99rem; background: var(--blush); font-size: 0.86rem; font-weight: 600; line-height: 1.35;
}
.dot { position: relative; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--muted); }
.is-now .status { background: var(--coral-tint); color: var(--coral-deep); }
.is-now .dot { background: var(--coral-deep); }
.is-now .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--coral-deep); animation: pulse 2.4s ease-out infinite;
}
.is-on-request .status { background: var(--yellow-tint); color: var(--ink); }
.is-on-request .dot { background: var(--ink); }
.is-on-request .dot::after { display: none; }
.duty-until { font-size: var(--text-s); color: var(--muted); }
.duty-address { margin-top: 0.5rem; font-size: 0.97rem; color: var(--muted); }
.duty-note { margin-top: 0.65rem; padding: 0.5rem 0.8rem; border-radius: 0.7rem; background: var(--yellow-tint); font-size: var(--text-s); }
.duty-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.95rem; }
.duty.is-ended { box-shadow: none; background: rgb(255 255 255 / 0.55); }
.duty.is-ended .duty-num { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.duty.is-ended .duty-name { color: var(--muted); }

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.9; }
  70%, 100% { transform: scale(2.8); opacity: 0; }
}

.duty-empty { padding: 1.4rem 1.5rem; border-radius: 1.25rem; background: var(--white); box-shadow: var(--shadow-s); }
.duty-empty h2 { font-size: 1.22rem; margin-bottom: 0.4rem; }
.duty-empty p { color: var(--muted); }

.hero-tools { margin-top: 1rem; display: grid; gap: 0.2rem; justify-items: start; }
.hero-tools-note { font-size: var(--text-xs); color: var(--muted); }

/* Karte */
.map-frame { position: relative; padding: 0.4rem; border-radius: 1.75rem; background: var(--white); box-shadow: var(--shadow-l); }
.map {
  position: relative; z-index: 0; width: 100%; height: clamp(14rem, 36vh, 20rem);
  border-radius: 1.4rem; overflow: hidden; background: #e3e4da; isolation: isolate;
}
@media (min-width: 62rem) {
  .hero .map { height: min(calc(100vh - 6.5rem), 44rem); min-height: 27rem; }
}
.map-fallback { padding: 2rem; }
.map .leaflet-tile-pane { filter: saturate(0.5) contrast(0.95) brightness(1.04); }
.map.leaflet-container { font-family: var(--font); font-size: 0.92rem; }
.map .leaflet-control-attribution { font-size: 0.68rem; background: rgb(255 255 255 / 0.8); padding: 0.05rem 0.5rem; border-top-left-radius: 0.5rem; color: var(--muted); }
.map .leaflet-control-attribution a { color: inherit; }
.map .leaflet-top.leaflet-right { top: 0.35rem; right: 0.35rem; }
.map .leaflet-bar { border: 0; border-radius: 0.8rem; overflow: hidden; box-shadow: var(--shadow-s); }
.map .leaflet-bar a {
  width: 2.5rem; height: 2.5rem; line-height: 2.5rem; font-size: 1.15rem; font-weight: 500;
  color: var(--ink); background: var(--white); border-bottom-color: var(--line);
}
.map .leaflet-bar a:hover { background: var(--blush); }
.map .leaflet-bar a:focus-visible { outline-offset: -3px; box-shadow: none; }
.map .leaflet-popup-content-wrapper { border-radius: 1rem; box-shadow: var(--shadow-m); color: var(--ink); }
.map .leaflet-popup-content { margin: 0.85rem 1.1rem; line-height: 1.45; }
.map .leaflet-popup-content strong { display: block; font-size: 1rem; }
.map .leaflet-popup-content span { color: var(--muted); }
.map .leaflet-popup-content a { font-weight: 600; }
.map .leaflet-container a.leaflet-popup-close-button { width: 2.2rem; height: 2.2rem; font-size: 1.25rem; color: var(--muted); }

.pin-wrap { background: none; border: 0; }
.pin-wrap:focus-visible { outline: none; box-shadow: none; }
.pin-wrap:focus-visible .pin, .pin-wrap:focus-visible .pin-off { outline: 2px solid var(--ink); outline-offset: 3px; }
.pin {
  position: relative; width: 1.9rem; height: 1.9rem; margin: 0.125rem; font-size: 0.85rem;
  border: 2.5px solid var(--white); box-shadow: 0 2px 8px rgb(29 29 27 / 0.4);
  animation: pin-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
  animation-delay: calc(var(--i, 0) * 80ms + 100ms);
  transition: transform 0.2s;
}
.pin.is-now::after {
  content: ""; position: absolute; inset: -2.5px; border-radius: 50%;
  border: 2px solid var(--coral); animation: pulse 2.4s ease-out infinite; pointer-events: none;
}
.pin.is-ended { background: var(--white); color: var(--ink); border-color: var(--ink); }
.pin.is-single::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--yellow); }
.pin-wrap.is-highlighted .pin { transform: scale(1.22); }
.pin-off {
  display: block; width: 0.8rem; height: 0.8rem; margin: 0.675rem; border-radius: 50%;
  background: var(--white); border: 2px solid #6b6760; box-shadow: 0 1px 3px rgb(29 29 27 / 0.3);
}
.pin-me {
  display: block; width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--teal-deep); border: 2.5px solid var(--white); box-shadow: 0 0 0 1.5px var(--teal-deep), 0 2px 6px rgb(0 0 0 / 0.3);
}
/* Nur die Größe wird animiert: Der Pin ist von Anfang an sichtbar und an der richtigen Stelle. */
@keyframes pin-pop { from { transform: scale(0.45); } }

/* Ortsname neben dem Pin */
.map .pin-label {
  padding: 0.1rem 0.5rem; border: 0; border-radius: 0.5rem; background: var(--white); color: var(--ink);
  font-size: 0.78rem; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-s); white-space: nowrap;
}
.map .pin-label::before { display: none; }

.map-legend {
  position: absolute; left: 0.95rem; bottom: 0.95rem; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; padding: 0.35rem 0.7rem; list-style: none;
  border-radius: 0.7rem; background: rgb(255 255 255 / 0.92); box-shadow: var(--shadow-s);
  font-size: 0.75rem; font-weight: 500; color: var(--muted); max-width: calc(100% - 9rem);
}
.map-legend li { display: flex; align-items: center; gap: 0.4rem; }
.legend-pin { width: 1.05rem; height: 1.05rem; font-size: 0.62rem; }
.legend-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--white); border: 2px solid #6b6760; }
.no-js .map-legend { display: none; }
@media (max-width: 40rem) {
  /* Auf kleinen Bildschirmen steht die Legende unter der Karte statt darauf. */
  .map-legend { position: static; max-width: none; padding: 0.5rem 0.6rem 0.25rem; background: none; box-shadow: none; }
}

/* Tageswechsel: Datum und Liste gleiten weich hinein */
@supports (view-transition-name: none) {
  .hero-date { view-transition-name: hero-date; }
  .hero-list { view-transition-name: hero-list; }
  ::view-transition-old(hero-date) { animation: slide-out 0.18s ease-in both; }
  ::view-transition-new(hero-date) { animation: slide-in 0.3s 0.1s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
  ::view-transition-old(hero-list) { animation: fade-out 0.14s ease-in both; }
  ::view-transition-new(hero-list) { animation: rise-in 0.3s 0.08s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
}
@keyframes slide-out { to { transform: translateY(0.6rem); opacity: 0; } }
@keyframes slide-in { from { transform: translateY(-0.5rem); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { from { transform: translateY(0.6rem); opacity: 0; } }

/* --------------------------------------------------------------------------
   Abschnitte
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 7.5vw, 6rem); }
.section-title { font-size: var(--title); letter-spacing: -0.03em; }
.lead { color: var(--muted); max-width: 34rem; }
.split { display: grid; gap: 1.75rem clamp(2rem, 5vw, 5rem); }
@media (min-width: 58rem) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; } }
.split-intro .lead { margin-top: 0.9rem; }

/* Bevor Sie losfahren – echte Reihenfolge, daher nummeriert und verbunden */
.steps-list {
  list-style: none; counter-reset: step; margin-top: 2.25rem;
  display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}
.steps-list li { position: relative; counter-increment: step; padding-top: 3.1rem; }
.steps-list li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--white);
  font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.steps-list li::after {
  content: ""; position: absolute; top: 1.1rem; left: 2.9rem; right: -1.3rem; height: 1px; background: var(--line-strong);
}
.steps-list li:last-child::after { display: none; }
@media (max-width: 61.99rem) { .steps-list li::after { display: none; } }
.steps-list h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
.steps-list p { margin-top: 0.35rem; font-size: 0.97rem; color: var(--muted); }
.steps-list a { font-weight: 600; }

/* Notfall erkennen */
.signs { background: var(--blush); }
.signs-not { margin-top: 2rem; padding: 1.1rem 1.25rem 1.2rem; border-radius: 1.1rem; background: var(--white); border: 1px solid var(--line); }
.signs-not h3 { font-size: 1rem; letter-spacing: 0; }
.signs-not p { margin-top: 0.3rem; font-size: 0.95rem; color: var(--muted); }
.signs-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); column-gap: 2.5rem; align-content: start; }
.signs-list li { position: relative; padding: 0.8rem 0 0.85rem 1.2rem; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.signs-list li::before { content: ""; position: absolute; left: 0; top: 1.32rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--coral); }
.signs-list strong { display: block; color: var(--ink); font-size: 1rem; }

/* Kosten */
.costs { padding-block: clamp(2rem, 5vw, 4rem); }
.costs-panel {
  display: grid; gap: 2rem clamp(2rem, 5vw, 5rem);
  padding: clamp(1.75rem, 4.5vw, 3.5rem); border-radius: 1.75rem; background: var(--ink); color: var(--white);
}
@media (min-width: 58rem) { .costs-panel { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; } }
.costs-intro p { margin-top: 0.9rem; color: rgb(255 255 255 / 0.74); font-size: 0.97rem; }
.costs-facts { margin: 0; display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.costs-facts div { border-top: 1px solid rgb(255 255 255 / 0.24); padding-top: 0.9rem; }
.costs-facts dt { font-size: var(--text-s); font-weight: 500; color: rgb(255 255 255 / 0.74); }
.costs-facts dd { margin: 0.3rem 0 0; font-size: 1.7rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.03em; color: var(--yellow); }
.costs-facts dd span { display: block; margin-top: 0.35rem; font-size: var(--text-s); font-weight: 400; letter-spacing: 0; line-height: 1.4; color: rgb(255 255 255 / 0.74); }

/* Plan */
.table-scroll { overflow-x: auto; }
.plan-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.plan-table thead th { text-align: left; font-size: var(--text-xs); font-weight: 500; padding: 0 0.85rem 0.6rem; color: var(--muted); }
.plan-table tbody th, .plan-table td { padding: 0.7rem 0.85rem; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.plan-table tbody th { white-space: nowrap; width: 8.5rem; font-weight: 600; }
.plan-table tbody th a { color: var(--ink); display: inline-flex; gap: 0.6rem; padding-block: 0.2rem; text-decoration-color: var(--line-strong); }
.plan-table tbody th a:hover { text-decoration-color: currentColor; }
.plan-wd { display: inline-block; width: 1.5rem; color: var(--muted); font-weight: 500; }
.plan-table tr.is-selected th, .plan-table tr.is-selected td { background: var(--yellow-tint); }
.plan-table tr.is-selected th { border-radius: 0.6rem 0 0 0.6rem; }
.plan-table tr.is-selected td { border-radius: 0 0.6rem 0.6rem 0; }
.plan-none, .plan-request { color: var(--muted); }

/* Kliniken im Verbund */
.network { background: var(--blush); }
.network-list { list-style: none; margin-top: 2.25rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.network-list a {
  display: block; height: 100%; padding: 1.15rem 1.3rem 1.25rem; border-radius: 1.1rem;
  background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.network-list a:hover { border-color: var(--ink); box-shadow: var(--shadow-s); }
.network-city { display: block; font-size: 1.18rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.network-name { display: block; margin-top: 0.35rem; font-size: 0.97rem; font-weight: 500; }
.network-address { display: block; font-size: var(--text-s); color: var(--muted); }

/* Fragen */
.faq-list details { border-top: 1px solid var(--line-strong); }
.faq-list details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 0; cursor: pointer; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h3 { font-size: 1.06rem; letter-spacing: -0.01em; line-height: 1.3; }
.faq-list summary::after {
  content: ""; flex: none; width: 0.85rem; height: 0.85rem; margin-right: 0.2rem;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat;
  transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding-bottom: 1.3rem; max-width: 40rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Klinikseite
   -------------------------------------------------------------------------- */
.clinic-head { background: var(--yellow); padding-block: clamp(1.5rem, 4vw, 2.75rem) clamp(2rem, 5vw, 3.5rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; font-size: var(--text-s); }
.crumbs a { color: var(--ink); font-weight: 600; }
.clinic-head h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.5rem); letter-spacing: -0.04em; line-height: 1.04; }
.clinic-status { margin-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; }
.clinic-status .status { background: var(--white); }
.clinic-status.is-now .status { background: var(--white); }
.clinic-hint { margin-top: 1.1rem; font-size: var(--text-s); }
.clinic-hint a { color: var(--ink); font-weight: 600; }
.clinic-head .duty-actions { margin-top: 1.4rem; }
.clinic-grid { display: grid; gap: 2.5rem clamp(2rem, 5vw, 5rem); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
@media (min-width: 58rem) { .clinic-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.clinic-facts h2 { font-size: 1.3rem; margin-bottom: 0.9rem; }
.clinic-facts h2:not(:first-child) { margin-top: 2.5rem; }
.clinic-facts dl { margin: 0; display: grid; grid-template-columns: minmax(8rem, auto) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.clinic-facts dt, .clinic-facts dd { margin: 0; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.clinic-facts dt { color: var(--muted); padding-right: 1.5rem; font-size: 0.97rem; }
.clinic-facts dd { font-weight: 500; overflow-wrap: anywhere; }
.clinic-facts dd a { display: inline-flex; align-items: center; gap: 0.3rem; }
.clinic-note { margin-top: 1.25rem; padding: 0.9rem 1.1rem; border-radius: 0.9rem; background: var(--blush); }
.clinic-duties { list-style: none; font-variant-numeric: tabular-nums; }
.clinic-duties li { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.clinic-duties li:last-child { border-bottom: 1px solid var(--line); }
.clinic-duties time { font-weight: 600; }
.clinic-map .map-frame { box-shadow: var(--shadow-m); border: 1px solid var(--line); }
.clinic-map .map { height: clamp(18rem, 55vh, 30rem); }

/* --------------------------------------------------------------------------
   Textseiten
   -------------------------------------------------------------------------- */
.text-page { padding-block: clamp(2.5rem, 6vw, 5rem); }
.prose { max-width: 42rem; }
.prose h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3rem); letter-spacing: -0.04em; line-height: 1.06; margin-bottom: 1.75rem; overflow-wrap: break-word; hyphens: auto; }
.prose h2 { font-size: 1.3rem; margin: 2.5rem 0 0.7rem; }
.prose p { margin-top: 0.85rem; }
.prose ul { margin-top: 0.85rem; padding-left: 1.2rem; }
.prose li { margin-top: 0.4rem; }
.prose li::marker { color: var(--coral-deep); }
.prose a { overflow-wrap: anywhere; }
.prose a.btn { color: var(--white); }
.prose-meta { margin-top: 2.5rem !important; color: var(--muted); font-size: var(--text-s); }

/* --------------------------------------------------------------------------
   Fußbereich
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 2.75rem; font-size: var(--text-s); }
.site-footer-inner { display: grid; gap: 2rem 4rem; }
@media (min-width: 48rem) { .site-footer-inner { grid-template-columns: minmax(0, 1fr) auto; } }
.site-footer-about img { width: 11.5rem; }
.site-footer-about p { margin-top: 1rem; max-width: 28rem; color: var(--muted); }
.site-footer ul { list-style: none; display: grid; gap: 0.05rem; }
.site-footer nav a { display: inline-block; padding: 0.35rem 0; color: var(--ink); font-weight: 500; text-decoration-color: var(--line-strong); }
.site-footer nav a:hover { text-decoration-color: currentColor; }
.site-footer-note { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--text-xs); }

/* --------------------------------------------------------------------------
   Weniger Bewegung, hoher Kontrast, Druck
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .is-now .dot::after, .pin.is-now::after { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

@media (forced-colors: active) {
  .btn, .day, .days-arrow, .duty, .duty-num, .pin, .status, .network-list a, .overlay-card { border: 1px solid CanvasText; }
  .day.is-selected { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

@media print {
  .site-header nav, .nav-toggle, .hero-map, .days, .hero-tools, .site-footer nav, .skip-link, .btn-line, .btn-quiet, .overlay { display: none !important; }
  .hero, .signs, .network, .clinic-head { background: none !important; }
  .costs-panel { background: none; color: #000; border: 1px solid #000; }
  .costs-facts dd, .costs-facts dd span, .costs-facts dt, .costs-intro p { color: #000; }
  .duty { box-shadow: none; border: 1px solid #999; }
  .section { padding-block: 1.5rem; }
  .btn-call { border: 0; background: none; color: #000; padding: 0; min-height: 0; }
  a { color: #000; }
}
