/* ==========================================================================
   AVWS-Test-Kompass – Stylesheet
   Corporate Design Diakonie: Violett als Primärfarbe, Cyan als Akzent,
   Kreuzflächen-Prinzip, Helvetica/Arial, Headlines nie schwarz.
   ========================================================================== */

:root {
  --violett: #5C2874;
  --violett-2: #312A74;
  --violett-3: #702673;
  --violett-4: #482974;
  --cyan: #009FE3;
  --weiss: #FFFFFF;
  --schwarz: #000000;

  /* Aufhellungen (laut CD 80 % / 90 % erlaubt) */
  --violett-tint: #EFE9F1;
  --violett-tint-2: #DED4E3;
  --cyan-tint: #E5F5FC;
  --cyan-tint-2: #BFE6F8;

  /* Neutrale mit leichtem Violettstich */
  --grau-1: #F7F5F8;
  --grau-2: #E9E4EC;
  --grau-3: #C9C1CE;
  --grau-4: #6E6675;
  --text: #000000;
  --text-muted: #55495E;

  /* Zusatzfarben für Orientierung: je Fachgebiet eine Farbe, je Filtergruppe eine Farbe.
     Alle sind hell genug für dunkle Schrift (Kontrast > 7:1). */
  --fach-audiologie: #FFBB60;
  --fach-logopaedie: #FF87AB;
  --fach-psychologie: #B7AEFF;
  --akzent-gelb: #EADD68;
  --akzent-hellgruen: #87CC7E;
  --akzent-gruen: #76B729;
  --akzent-rosa: #FFD3E1;
  --akzent-orange: #FFE1B0;
  --akzent-lila: #DCD8FF;
  --text-auf-farbe: #1A1026;
  /* Filtergruppen -> Farbe (Schlüssel wie in schema.json) */
  --fc-teilleistungen: var(--akzent-gelb);
  --fc-ebene: var(--akzent-hellgruen);
  --fc-screening: var(--akzent-gruen);
  --fc-sprachfrei: var(--cyan-tint-2);
  --fc-stimuli: var(--akzent-orange);
  --fc-praesentation: var(--akzent-rosa);
  --fc-testgeraet: var(--akzent-lila);
  --fc-alter: var(--violett-tint-2);
  --fc-kognitive_anforderung: var(--akzent-gelb);
  --fc-ergebnis_art: var(--akzent-hellgruen);
  --fc-pc_auswertung: var(--akzent-lila);
  --fc-sprachen: var(--akzent-orange);
  --fc-guetekriterien: var(--akzent-gruen);
  --fc-adaptiv: var(--akzent-rosa);
  --fc-normen_fuer: var(--cyan-tint-2);
  --fc-altersbereich: var(--violett-tint-2);
  --fc-zg: #D2F1FF;
  /* Altersbereich (abgeleitet) – neben den Fachgebieten die einzigen farbigen Kennzeichen */
  --zg-kinder: #EADD68;
  --zg-jugendliche: #87CC7E;
  --zg-erwachsene: #76B729;

  /* Textfarbe für Links: Violett hat ausreichend Kontrast, Cyan nicht (WCAG) */
  --link: #5C2874;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 2px;
  --header-h: 80px;
  --maxw: 1320px;
  --shadow: 0 1px 2px rgba(49, 42, 116, 0.08), 0 4px 16px rgba(49, 42, 116, 0.06);
}

/* Überschriftenschrift Montserrat, lokal eingebunden (variable Schrift, Latin) */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}
:root { --font-head: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--weiss);
}

h1, h2, h3, h4, .brand-text strong, .stats b, .overlay-title { font-family: var(--font-head); line-height: 1.2; margin: 0; color: var(--violett); font-weight: 700; letter-spacing: -0.01em; }
.brand-text strong, .stats b { color: #fff; }   /* stehen auf Violett bzw. Cyan */
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--violett-2); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
button { font: inherit; }
code { font-family: Consolas, "Courier New", monospace; font-size: .92em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   Header (violett, Logo links, Navigation rechts)
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--violett);
  color: #fff;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  gap: 1rem;
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: .9rem; color: #fff; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 64px; height: 64px; flex: 0 0 auto;
  background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.brand-mark img { width: 92%; height: 92%; object-fit: contain; display: block; }
.brand-mark:has(img) .brand-mark-text { display: none; }   /* Logo vorhanden: Platzhaltertext ausblenden */
.brand-mark-text { color: var(--cyan); font-weight: 700; font-size: .8rem; letter-spacing: .04em; }
.brand-compass { width: 30px; height: 30px; flex: 0 0 auto; color: #fff; margin-left: -.35rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.15rem; }
.brand-sub { font-size: .8rem; opacity: .85; font-weight: 300; }

.site-nav { display: flex; gap: .25rem; align-items: center; }
.site-nav a {
  color: #fff; text-decoration: none; padding: .55rem .85rem; border-radius: var(--radius);
  font-weight: 400; display: inline-flex; align-items: center; gap: .4rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover { background: var(--violett-4); color: #fff; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--cyan); font-weight: 700; }
.badge {
  background: var(--cyan); color: #fff; font-size: .72rem; font-weight: 700;
  min-width: 1.35em; height: 1.35em; padding: 0 .35em; border-radius: 1em;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 8px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: #fff; }

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-mark-text { font-size: .6rem; }
  .brand-sub { display: none; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--violett-4); flex-direction: column; align-items: stretch; padding: .5rem 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .8rem 1.5rem; border-bottom: 0; border-left: 4px solid transparent; }
  .site-nav a[aria-current="page"] { border-left-color: var(--cyan); }
}
@media (max-width: 480px) { :root { --header-h: 53px; } }

/* --------------------------------------------------------------------------
   Main
   -------------------------------------------------------------------------- */
.site-main { min-height: 60vh; }
.loading { padding: 3rem; text-align: center; color: var(--text-muted); }
/* Inhaltsbereich nutzt die volle Breite (Textseiten begrenzen sich selbst über .page auf lesbare Zeilenlänge) */
.wrap { max-width: none; margin: 0; padding: 0 clamp(1rem, 3vw, 2.5rem); }

/* Kreuzflächen-Einstieg auf der Startseite */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-rows: auto auto;
}
.hero-f1 { grid-column: 1; grid-row: 1; background: var(--violett); color: #fff; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem); border-top: 1px solid rgba(255,255,255,.35); }
.hero-f1 h1 { color: #fff; font-weight: 300; max-width: 26ch; }
.hero-f1 h1 strong { font-weight: 700; }
.hero-f1 p { max-width: 60ch; font-size: 1.05rem; margin: 1rem 0 0; }
.hero-f2 { grid-column: 2; grid-row: 1; background: var(--cyan); color: #fff; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2.5rem); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-f3 { grid-column: 1; grid-row: 2; background: var(--weiss); padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem); }
.hero-f4 { grid-column: 2; grid-row: 2; background: var(--violett-3); color: #fff; padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem); }
.hero-f4 h2, .hero-f2 h2 { color: #fff; font-size: 1.1rem; margin-bottom: .5rem; }
.hero-f4 p { margin: 0; font-size: .95rem; }
.stats { display: flex; gap: 2rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; line-height: 1.15; }
.stats b { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats span { font-size: .85rem; }
.stats li[data-fach]::before { content: ""; display: block; width: 2.2rem; height: 4px; border-radius: 2px; margin-bottom: .3rem; background: rgba(255,255,255,.5); }
.stats li[data-fach="audiologie"]::before { background: var(--fach-audiologie); }
.stats li[data-fach="logopaedie"]::before { background: var(--fach-logopaedie); }
.stats li[data-fach="psychologie"]::before { background: var(--fach-psychologie); }
.hero-f3 h2 { font-size: 1.1rem; color: var(--violett); margin-bottom: .5rem; }
.hero-f3 p { margin: 0; max-width: 70ch; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-f1, .hero-f2, .hero-f3, .hero-f4 { grid-column: 1; }
  .hero-f1 { grid-row: 1; } .hero-f2 { grid-row: 2; } .hero-f3 { grid-row: 3; } .hero-f4 { grid-row: 4; }
}

/* Suchleiste */
.searchbar { display: flex; gap: .5rem; align-items: stretch; margin: 0; }
.searchbar input[type="search"] {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1.05rem; padding: .7rem .9rem;
  border: 2px solid var(--violett); border-radius: var(--radius); background: #fff; color: var(--text);
}
.searchbar input[type="search"]::placeholder { color: var(--grau-4); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: var(--radius); border: 2px solid var(--violett);
  background: var(--violett); color: #fff; text-decoration: none; cursor: pointer; font-weight: 700; line-height: 1.2;
  white-space: nowrap;
}
.btn:hover { background: var(--violett-2); border-color: var(--violett-2); color: #fff; }
.btn-secondary { background: #fff; color: var(--violett); }
.btn-secondary:hover { background: var(--violett-tint); color: var(--violett); border-color: var(--violett); }
.btn-cyan { background: var(--cyan); border-color: var(--cyan); }
.btn-cyan:hover { background: #0086C2; border-color: #0086C2; }
.btn-small { padding: .35rem .7rem; font-size: .9rem; font-weight: 400; }
.btn[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--violett); padding: .35rem .5rem; font-weight: 400; }
.btn-ghost:hover { background: var(--violett-tint); border-color: transparent; color: var(--violett); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Übersicht: Filter + Ergebnisse
   -------------------------------------------------------------------------- */
.browse { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; padding-bottom: 3rem; align-items: start; }
.filters { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; padding-right: .35rem; scrollbar-width: thin; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.filters-head h2 { font-size: 1.1rem; }
.filter-toggle { display: none; }
.filter-group { border-top: 1px solid var(--grau-2); padding: .6rem 0; }
.filter-group summary { cursor: pointer; font-weight: 700; color: var(--violett); padding: .3rem 0; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.filter-group summary .label { flex: 0 1 auto; }
.tip-wrap { display: inline-flex; }
/* Tooltip schwebt fest über der Seite (position: fixed), damit die scrollbare Filterspalte ihn nicht abschneidet; Position setzt app.js */
.help-tip { position: fixed; left: 0; top: 0; z-index: 70; width: min(340px, 80vw); background: #fff; color: var(--text); font-weight: 400; font-size: .85rem; line-height: 1.45; border: 1px solid var(--grau-3); border-top: 3px solid var(--cyan); box-shadow: 0 6px 24px rgba(49, 42, 116, .25); padding: .5rem .7rem; border-radius: var(--radius); display: none; cursor: default; }
.help-tip.show { display: block; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group .filter-options input { accent-color: var(--violett); }
.filter-group .filter-options label:has(input:checked) { background: var(--violett-tint); }
.filter-options .dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--fg); flex: 0 0 auto; margin-top: .35rem; }
.more-filters { --fg: var(--grau-2); }
.more-filters[open] { background: transparent; }
.more-filters .filter-group { border-left-width: 4px; }
.filter-group summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(45deg); transition: transform .15s; flex: 0 0 auto; margin-right: .25rem; margin-left: auto; order: 5; }
.filter-group[open] summary::after { transform: rotate(-135deg); }
.filter-group .count-active { font-size: .75rem; background: var(--cyan); color: #fff; border-radius: 1em; padding: 0 .5em; }
.filter-options { list-style: none; margin: .35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.filter-options label { display: flex; align-items: flex-start; gap: .5rem; padding: .25rem .25rem; border-radius: var(--radius); cursor: pointer; line-height: 1.35; }
.filter-options label:hover { background: var(--violett-tint); }
.filter-options input { margin: .2rem 0 0; accent-color: var(--violett); flex: 0 0 auto; }
.filter-options .n { margin-left: auto; color: var(--grau-4); font-size: .85rem; font-variant-numeric: tabular-nums; padding-left: .5rem; }
.filter-options .t { flex: 1 1 auto; }
.filter-help { font-size: .85rem; color: var(--text-muted); margin: .25rem 0 .25rem; }
.age-field { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.age-field input { width: 6rem; font: inherit; padding: .4rem .5rem; border: 1px solid var(--grau-3); border-radius: var(--radius); }
.more-filters > summary { font-weight: 700; color: var(--violett); }

.results-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.results-count { font-weight: 700; color: var(--violett); }
.results-tools { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.results-tools label { font-size: .9rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: .4rem; }
.results-tools select { font: inherit; padding: .35rem .5rem; border: 1px solid var(--grau-3); border-radius: var(--radius); background: #fff; }
.view-switch { display: inline-flex; border: 2px solid var(--violett); border-radius: var(--radius); overflow: hidden; }
.view-switch button { background: #fff; color: var(--violett); border: 0; padding: .35rem .7rem; cursor: pointer; font-weight: 700; }
.view-switch button[aria-pressed="true"] { background: var(--violett); color: #fff; }

.segments { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.segments button { --fc: var(--violett-tint); border: 2px solid var(--violett); background: #fff; color: var(--violett); padding: .4rem .9rem; border-radius: 2em; cursor: pointer; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.segments button[aria-pressed="true"] { background: var(--violett); color: #fff; }
.segments button .n { font-weight: 400; opacity: .8; }
/* Fachdisziplin-Knöpfe in derselben Farbe wie die Chips auf den Karten; gewählt = violetter Rahmen + Häkchen */
.segments button[data-fach]:not([data-fach=""]) { background: var(--fc); border-color: var(--fc); color: var(--text-auf-farbe); opacity: .8; }
.segments button[data-fach]:not([data-fach=""]):hover { opacity: 1; }
.segments button[data-fach]:not([data-fach=""])[aria-pressed="true"] { opacity: 1; border-color: var(--violett); box-shadow: inset 0 0 0 2px #fff; }
.segments button[data-fach]:not([data-fach=""])[aria-pressed="true"]::before { content: "✓"; font-size: .85em; line-height: 1; }
.segments button[data-fach="Audiologie"] { --fc: var(--fach-audiologie); }
.segments button[data-fach="Logopädie"] { --fc: var(--fach-logopaedie); }
.segments button[data-fach="Psychologie"] { --fc: var(--fach-psychologie); }

.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.active-filters .chip-x { background: var(--fg, var(--violett-tint)); border: 1px solid transparent; color: var(--text-auf-farbe); border-radius: 2em; padding: .2rem .35rem .2rem .7rem; display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; font-size: .9rem; }
.active-filters .chip-x:hover { border-color: var(--violett); }
.active-filters .chip-x b { font-weight: 400; opacity: .75; }
.active-filters .chip-x span[aria-hidden] { font-weight: 700; padding: 0 .3rem; }

/* Karten */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.card { background: #fff; border: 1px solid var(--grau-2); border-top: 4px solid var(--violett); border-radius: var(--radius); padding: 1rem 1.1rem 1rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: var(--shadow); }
.card[data-fach="audiologie"] { border-top-color: var(--fach-audiologie); }
.card[data-fach="logopaedie"] { border-top-color: var(--fach-logopaedie); }
.card[data-fach="psychologie"] { border-top-color: var(--fach-psychologie); }
.card-top { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .82rem; }
.card h3 { font-size: 1.2rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card-name { color: var(--text-muted); font-size: .95rem; margin: 0; }
.card-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; font-size: .9rem; }
.card-facts dt { color: var(--grau-4); font-weight: 400; }
.card-facts dd { margin: 0; }
.card-actions { margin-top: auto; display: flex; gap: .4rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px solid var(--grau-2); }
.card-actions .btn { font-size: .9rem; }

.chip { display: inline-block; background: var(--violett-tint); color: var(--violett); border-radius: 2em; padding: .1rem .6rem; font-size: .85rem; line-height: 1.5; }
.values { line-height: 1.5; }
.tag-text { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.chip-fach { font-weight: 700; color: var(--text-auf-farbe); background: var(--violett-tint); }
.chip-fach[data-fach="audiologie"] { background: var(--fach-audiologie); }
.chip-fach[data-fach="logopaedie"] { background: var(--fach-logopaedie); }
.chip-fach[data-fach="psychologie"] { background: var(--fach-psychologie); }
.chip-cyan { background: var(--cyan-tint); color: #005A82; }
.chip-c { background: var(--fg, var(--violett-tint)); color: var(--text-auf-farbe); }
.chip-zg { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.year { color: var(--grau-4); margin-left: auto; font-variant-numeric: tabular-nums; }

/* Tabelle */
.tablewrap { overflow-x: auto; border: 1px solid var(--grau-2); border-radius: var(--radius); }
table.results { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 900px; }
table.results th { background: var(--violett); color: #fff; text-align: left; padding: .6rem .7rem; font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
table.results th button { background: none; border: 0; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0; display: inline-flex; gap: .3rem; align-items: center; }
table.results th button[aria-sort]::after { content: "↕"; opacity: .6; font-size: .8em; }
table.results th button[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
table.results th button[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
table.results td { padding: .55rem .7rem; border-bottom: 1px solid var(--grau-2); vertical-align: top; }
table.results tbody tr:nth-child(even) td { background: var(--grau-1); }
table.results td.actions { white-space: nowrap; }
table.results td.actions .btn { margin-right: .25rem; }

.empty { padding: 3rem 1rem; text-align: center; color: var(--text-muted); border: 1px dashed var(--grau-3); border-radius: var(--radius); }
.empty h3 { margin-bottom: .5rem; }

@media (max-width: 960px) {
  .browse { grid-template-columns: 1fr; gap: 1rem; }
  .filters { position: static; }
  .filter-toggle { display: inline-flex; }
  .filters-body { display: none; background: var(--grau-1); padding: .5rem 1rem; border-radius: var(--radius); }
  .filters-body.open { display: block; }
}

/* --------------------------------------------------------------------------
   Detailseite
   -------------------------------------------------------------------------- */
.detail-head { background: var(--violett); color: #fff; padding: 1.5rem 0 1.75rem; border-top: 1px solid rgba(255,255,255,.35); }
.detail-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: end; }
.detail-head h1 { color: #fff; }
.detail-head .name { font-size: 1.15rem; font-weight: 300; margin: .35rem 0 0; max-width: 70ch; }
.detail-head .meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; font-size: .9rem; }
.detail-head .id { opacity: .75; font-size: .85rem; }
.detail-head .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.detail-head .btn-secondary { background: #fff; }
.breadcrumb { font-size: .9rem; margin: 1rem 0; }
.breadcrumb a { color: var(--violett); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 2rem; padding-bottom: 3rem; align-items: start; }
.detail-nav { position: sticky; top: 1rem; border-left: 3px solid var(--cyan); padding-left: 1rem; font-size: .92rem; }
.detail-nav h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau-4); margin-bottom: .5rem; }
.detail-nav ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.detail-nav a { text-decoration: none; }
.detail-nav a:hover { text-decoration: underline; }
.detail-tools { margin-top: 1.25rem; font-size: .9rem; }
.detail-tools label { display: flex; gap: .5rem; align-items: center; }
.cluster { margin: 1.75rem 0 0; scroll-margin-top: 1rem; }
.cluster h2 { font-size: 1.3rem; padding-bottom: .4rem; border-bottom: 2px solid var(--cyan); margin-bottom: .75rem; }
.fields { margin: 0; display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 0; }
.fields > div { display: contents; }
.fields dt { padding: .65rem .75rem .65rem 0; border-bottom: 1px solid var(--grau-2); color: var(--text-muted); font-weight: 400; display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; }
.fields dd { margin: 0; padding: .65rem 0 .65rem .5rem; border-bottom: 1px solid var(--grau-2); }
.fields dd p { margin: 0 0 .5em; }
.fields dd p:last-child { margin: 0; }
.fields dd.empty-value { color: var(--grau-4); }
.help-btn { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1.5px solid var(--cyan); color: var(--cyan); background: #fff; font-size: .68rem; font-weight: 700; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto; }
.help-btn[aria-expanded="true"] { background: var(--cyan); color: #fff; }
.help-text { flex-basis: 100%; font-size: .85rem; color: var(--text-muted); background: var(--cyan-tint); padding: .4rem .6rem; border-radius: var(--radius); margin-top: .2rem; }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--grau-2); flex-wrap: wrap; }
.prevnext a { text-decoration: none; max-width: 45%; }
.prevnext a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .detail-body { grid-template-columns: 1fr; }
  .detail-nav { position: static; order: -1; }
  .detail-head .wrap { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .fields dt { border-bottom: 0; padding-bottom: .1rem; padding-top: .8rem; }
  .fields dd { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   Vergleich
   -------------------------------------------------------------------------- */
.compare-page { padding-top: 1.5rem; padding-bottom: 3rem; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.page-head .lead { max-width: 70ch; color: var(--text-muted); margin: .4rem 0 0; }
.compare-toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; padding: .75rem 1rem; background: var(--grau-1); border-left: 4px solid var(--cyan); margin-bottom: 1rem; }
.compare-toolbar label { display: inline-flex; align-items: center; gap: .4rem; font-size: .95rem; }
.compare-toolbar select { font: inherit; padding: .4rem .5rem; border: 1px solid var(--grau-3); border-radius: var(--radius); background: #fff; max-width: min(60vw, 420px); }
.compare-toolbar .spacer { flex: 1 1 auto; }
.compare-toolbar input[type="checkbox"] { accent-color: var(--violett); }
.compare-full { color: var(--text-muted); font-size: .9rem; }
.compare-legend { font-size: .9rem; color: var(--text-muted); display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem; }
.diff-mark { display: inline-block; width: 1rem; height: 1rem; background: var(--akzent-gelb); border-left: 4px solid var(--akzent-gruen); }
.compare-wrap { max-height: calc(100vh - 120px); overflow: auto; border: 1px solid var(--grau-2); }
table.compare { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .93rem; }
table.compare th, table.compare td { padding: .55rem .7rem; border-bottom: 1px solid var(--grau-2); vertical-align: top; text-align: left; min-width: 220px; }
table.compare thead th { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 2px solid var(--violett); border-top: 5px solid var(--violett-tint-2); }
table.compare thead th[data-fach="audiologie"] { border-top-color: var(--fach-audiologie); }
table.compare thead th[data-fach="logopaedie"] { border-top-color: var(--fach-logopaedie); }
table.compare thead th[data-fach="psychologie"] { border-top-color: var(--fach-psychologie); }
table.compare thead th.corner { z-index: 4; left: 0; background: var(--violett); color: #fff; border-top-color: var(--violett); min-width: 180px; }
table.compare tbody th { position: sticky; left: 0; z-index: 2; background: var(--grau-1); color: var(--text-muted); font-weight: 400; min-width: 180px; max-width: 260px; display: table-cell; }
table.compare tbody th span:first-child { display: inline; }
table.compare tr.cluster-row th { background: var(--violett-tint); color: var(--violett); font-family: var(--font-head); font-weight: 700; font-size: 1rem; position: sticky; left: 0; z-index: 2; }
table.compare tr.diff th, table.compare tr.diff td { background: color-mix(in srgb, var(--akzent-gelb) 30%, #fff); }
table.compare tr.diff th { box-shadow: inset 4px 0 0 var(--akzent-gruen); }
table.compare td.empty-value { color: var(--grau-4); }
table.compare td p { margin: 0 0 .4em; }
table.compare td p:last-child { margin: 0; }
.cmp-head { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.cmp-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; text-decoration: none; }
.cmp-name:hover { text-decoration: underline; }
.cmp-full { font-weight: 400; color: var(--text-muted); font-size: .85rem; }
.cmp-actions { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .2rem; }
table.compare .help-text:not([hidden]) { display: block; margin-top: .3rem; }
@media (max-width: 720px) {
  table.compare th, table.compare td { min-width: 180px; }
  table.compare tbody th, table.compare thead th.corner { position: static; }
}
@media print {
  .compare-toolbar, .cmp-actions { display: none !important; }
  .compare-wrap { max-height: none; overflow: visible; border: 0; }
  table.compare thead th, table.compare tbody th { position: static; }
}

/* --------------------------------------------------------------------------
   Merklisten
   -------------------------------------------------------------------------- */
.lists-page { padding-top: 1.5rem; padding-bottom: 3rem; }
.backup { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 3px solid var(--cyan); outline-offset: 2px; }
.import-panel { background: var(--cyan-tint); border-left: 4px solid var(--cyan); padding: .8rem 1rem; margin-bottom: 1rem; }
.import-panel .warn { color: #8A4B00; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.lists-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2rem; align-items: start; }
.lists-nav { position: sticky; top: 1rem; }
.lists-nav h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.lists-menu { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.lists-menu a { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .5rem .7rem; text-decoration: none; border-radius: var(--radius); border-left: 4px solid var(--grau-2); background: var(--grau-1); color: var(--text); }
.lists-menu a:hover { background: var(--violett-tint); }
.lists-menu a.active { border-left-color: var(--cyan); background: var(--violett-tint); font-weight: 700; color: var(--violett); }
.lists-menu .n { background: #fff; border-radius: 1em; padding: 0 .55em; font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.list-new { display: flex; gap: .4rem; }
.list-new input { flex: 1 1 auto; min-width: 0; font: inherit; padding: .45rem .6rem; border: 1px solid var(--grau-3); border-radius: var(--radius); }
.list-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; padding-bottom: 1rem; border-bottom: 2px solid var(--cyan); margin-bottom: 1rem; }
.list-head h2 { font-size: 1.5rem; }
.list-head .count { font-family: var(--font); font-weight: 400; font-size: .95rem; color: var(--text-muted); margin-left: .4rem; }
.list-note { color: var(--text-muted); margin: .3rem 0 0; max-width: 70ch; white-space: pre-line; }
.list-tools { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.tools-group { display: inline-flex; gap: 2px; }
.tools-group .btn { border-radius: 0; }
.tools-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.tools-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.btn.disabled { opacity: .5; pointer-events: none; }
.list-rename { display: grid; grid-template-columns: auto 1fr; gap: .5rem .75rem; align-items: center; flex: 1 1 420px; max-width: 640px; }
.list-rename label { color: var(--text-muted); font-size: .9rem; }
.list-rename input, .list-rename textarea { font: inherit; padding: .45rem .6rem; border: 1px solid var(--grau-3); border-radius: var(--radius); width: 100%; }
.list-rename .form-actions { grid-column: 2; margin-top: 0; }
.list-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.list-row { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; padding: .8rem 1rem; background: #fff; border: 1px solid var(--grau-2); border-left: 5px solid var(--violett-tint-2); border-radius: var(--radius); }
.list-row[data-fach="audiologie"] { border-left-color: var(--fach-audiologie); }
.list-row[data-fach="logopaedie"] { border-left-color: var(--fach-logopaedie); }
.list-row[data-fach="psychologie"] { border-left-color: var(--fach-psychologie); }
.list-row-main { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1 1 320px; }
.list-row-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.list-row-name:hover { text-decoration: underline; }
.list-row-full { color: var(--text-muted); font-size: .9rem; }
.list-row-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.list-row-actions select { font: inherit; font-size: .9rem; padding: .35rem .5rem; border: 1px solid var(--grau-3); border-radius: var(--radius); background: #fff; max-width: 200px; }
@media (max-width: 860px) { .lists-layout { grid-template-columns: 1fr; } .lists-nav { position: static; } }

/* Popover „In Merkliste aufnehmen“ */
.bm-pop { position: fixed; z-index: 45; width: 320px; max-width: calc(100vw - 16px); background: #fff; border-top: 4px solid var(--akzent-gelb); box-shadow: 0 8px 30px rgba(49,42,116,.3); padding: .75rem .9rem; font-size: .95rem; }
.bm-pop[hidden] { display: none; }
.bm-head { margin-bottom: .5rem; }
.bm-lists { list-style: none; margin: 0 0 .6rem; padding: 0; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: .15rem; }
.bm-lists label { display: flex; align-items: center; gap: .5rem; padding: .3rem .35rem; border-radius: var(--radius); cursor: pointer; }
.bm-lists label:hover { background: var(--violett-tint); }
.bm-lists label:has(input:checked) { background: var(--akzent-gelb); color: var(--text-auf-farbe); }
.bm-lists input { accent-color: var(--violett); }
.bm-lists .n { margin-left: auto; font-size: .8rem; color: var(--text-muted); }
.bm-new { display: flex; gap: .4rem; margin-bottom: .5rem; }
.bm-new input { flex: 1 1 auto; min-width: 0; font: inherit; padding: .4rem .5rem; border: 1px solid var(--grau-3); border-radius: var(--radius); }
.bm-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .9rem; }

/* Druckansicht einer Merkliste */
.print-page { padding-top: 1.5rem; padding-bottom: 3rem; max-width: 900px; }
.print-head { border-bottom: 3px solid var(--violett); padding-bottom: .75rem; margin-bottom: 1rem; }
.print-meta { color: var(--text-muted); font-size: .9rem; margin: .25rem 0 0; }
.print-test { break-inside: avoid; page-break-inside: avoid; margin: 0 0 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--grau-2); }
.print-test h2 { font-size: 1.3rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.print-test h3 { font-size: .95rem; color: var(--head-2, var(--cyan)); text-transform: uppercase; letter-spacing: .05em; margin: .9rem 0 .2rem; }
.print-test .name { color: var(--text-muted); margin: .2rem 0 0; }
.print-test .fields { font-size: .92rem; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); }
.print-test .fields dt, .print-test .fields dd { padding-top: .3rem; padding-bottom: .3rem; }
@media print {
  .no-print, .site-header, .site-footer { display: none !important; }
  .print-page { max-width: none; padding: 0; }
  .print-test .fields { grid-template-columns: 200px 1fr; }
}

/* --------------------------------------------------------------------------
   Statische Seiten, Platzhalter
   -------------------------------------------------------------------------- */
.page { padding-top: 2rem; padding-bottom: 3rem; max-width: calc(76ch + 2 * clamp(1rem, 3vw, 2.5rem)); }
.page h1 { margin-bottom: 1rem; }
.page h2 { font-size: 1.25rem; margin: 1.5rem 0 .5rem; }
.notice { background: var(--cyan-tint); border-left: 3px solid var(--cyan); padding: .8rem 1rem; margin: 1rem 0; }

/* Melde-Formular */
.melden-form { background: var(--grau-1); border-left: 4px solid var(--cyan); padding: 1.25rem 1.5rem; margin: 1rem 0 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.melden-form fieldset { border: 0; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .3rem; }
.melden-form legend { font-weight: 700; color: var(--violett); margin-bottom: .3rem; }
.melden-form fieldset label { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.melden-form > label { font-weight: 700; color: var(--violett); margin-top: .5rem; }
.melden-form .opt { font-weight: 400; color: var(--text-muted); font-size: .9rem; }
.melden-form input[type="text"], .melden-form input[type="email"], .melden-form select, .melden-form textarea { width: 100%; font: inherit; padding: .55rem .65rem; border: 1px solid var(--grau-3); border-radius: var(--radius); background: #fff; }
.melden-form textarea { resize: vertical; }
.melden-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.melden-form .two label { font-weight: 700; color: var(--violett); display: block; margin-bottom: .25rem; }
/* Honigtopf gegen Spam-Roboter: fuer Menschen unsichtbar, fuer Programme ausfuellbar.
   Gilt fuer alle Formulare (Melden, Vorschlag, Fragebogen) - nicht auf einen Container einschraenken. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.melden-form .consent { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; font-size: .95rem; }
.melden-form .consent input { margin-top: .25rem; }
.melden-form .form-actions { align-items: center; }
@media (max-width: 640px) { .melden-form .two { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Footer (Kreuzflächen-Anordnung)
   -------------------------------------------------------------------------- */
.site-footer { margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); }
.footer-block { padding: 1.5rem clamp(1rem, 3vw, 2.5rem); font-size: .9rem; }
.footer-block p { margin: .35rem 0 0; }
.footer-violett { background: var(--violett); color: #fff; }
.footer-cyan { background: var(--cyan); color: #fff; }
.footer-white { background: var(--violett-tint); color: var(--text); }
.footer-white a { color: var(--violett); }
.footer-meta { color: var(--text-muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Detail-Fenster (verschiebbares Overlay über der Übersicht)
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed; z-index: 40;
  top: 90px; left: max(1rem, calc(50vw - 380px));
  width: 760px; max-width: calc(100vw - 2rem);
  height: min(80vh, 900px); max-height: calc(100vh - 2rem); min-height: 240px; min-width: 320px;
  background: #fff; border-top: 9px solid var(--cyan);
  box-shadow: 0 8px 40px rgba(49, 42, 116, 0.35), 0 2px 8px rgba(0,0,0,.15);
  display: flex; flex-direction: column;
  resize: both; overflow: hidden;
}
.overlay[hidden] { display: none; }
.overlay[data-fach="audiologie"] { border-top-color: var(--fach-audiologie); }
.overlay[data-fach="logopaedie"] { border-top-color: var(--fach-logopaedie); }
.overlay[data-fach="psychologie"] { border-top-color: var(--fach-psychologie); }
.overlay-titlebar {
  background: var(--violett); color: #fff; cursor: move; touch-action: none; user-select: none;
  display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem .55rem 1rem; flex: 0 0 auto;
}
.overlay-titlebar .grip { opacity: .6; font-size: 1rem; letter-spacing: -2px; }
.overlay-title { color: #fff; font-size: 1.05rem; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overlay-hint { font-size: .75rem; opacity: .75; white-space: nowrap; }
.overlay-close { background: transparent; border: 0; color: #fff; width: 36px; height: 36px; border-radius: var(--radius); cursor: pointer; font-size: 1.4rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.overlay-close:hover { background: var(--violett-4); }
.overlay-head { padding: 1rem 1.25rem .75rem; border-bottom: 1px solid var(--grau-2); background: var(--grau-1); flex: 0 0 auto; }
.overlay-head .meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; margin-bottom: .4rem; }
.overlay-head .id { color: var(--grau-4); }
.overlay-head .overlay-headline { font-size: 1.4rem; }
.overlay-head .name { color: var(--text-muted); margin: .25rem 0 .6rem; font-size: .98rem; }
.overlay-head .actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.overlay-head .actions label { font-size: .85rem; color: var(--text-muted); margin-left: auto; display: inline-flex; gap: .4rem; align-items: center; }
.overlay-body { overflow: auto; flex: 1 1 auto; padding: 0 1.25rem 1.25rem; overscroll-behavior: contain; }
.overlay-body .cluster { margin-top: 1.25rem; }
.overlay-body .cluster h3 { font-size: 1.1rem; color: var(--violett); padding-bottom: .4rem; border-bottom: 2px solid var(--cyan); margin-bottom: .75rem; position: sticky; top: 0; background: #fff; z-index: 1; padding-top: .4rem; }
.overlay-body .fields { grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); font-size: .95rem; }
.overlay-body .fields dt { padding-right: .5rem; }
.section-links { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding: .75rem 0 0; font-size: .85rem; }
.section-links a { text-decoration: none; color: var(--violett); border-bottom: 1px solid var(--cyan); }
.section-links a:hover { color: var(--cyan); }
.overlay .prevnext { margin-top: 1.25rem; }
.overlay-resize-hint { position: absolute; right: 4px; bottom: 2px; font-size: .7rem; color: var(--grau-4); pointer-events: none; }
@media (max-width: 720px) {
  .overlay { top: 0 !important; left: 0 !important; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; resize: none; border-top: 0; }
  .overlay-titlebar { cursor: default; }
  .overlay-hint, .overlay-resize-hint { display: none; }
  .overlay-body .fields { grid-template-columns: 1fr; }
}
@media print {
  body.overlay-open > *:not(.overlay) { display: none !important; }
  .overlay { position: static; width: auto; height: auto; max-height: none; box-shadow: none; border: 0; overflow: visible; }
  .overlay-titlebar, .overlay-close, .overlay-head .actions, .section-links, .overlay .prevnext, .overlay-resize-hint { display: none !important; }
  .overlay-body { overflow: visible; }
  .overlay-body .cluster h3 { position: static; }
}

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); background: var(--violett-2); color: #fff; padding: .7rem 1.2rem; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 50; max-width: min(90vw, 40rem); }

/* Druck */
@media print {
  .site-header, .site-footer, .filters, .results-tools, .card-actions, .detail-head .actions, .detail-nav, .prevnext, .breadcrumb, .toast, .help-btn { display: none !important; }
  .detail-head { background: none; color: var(--violett); border: 0; padding: 0; }
  .detail-head h1, .detail-head .name { color: var(--violett); }
  .detail-body { grid-template-columns: 1fr; }
  a { color: inherit; text-decoration: none; }
}

/* --------------------------------------------------------------------------
   Feedback-Fenster (modal)
   -------------------------------------------------------------------------- */
.nav-feedback { margin-left: .6rem; }
@media (max-width: 860px) { .nav-feedback { margin: .5rem 1.5rem; } }
.fb-backdrop { position: fixed; inset: 0; background: rgba(26, 16, 38, .55); z-index: 80; }
.fb-backdrop[hidden] { display: none; }
.fb-modal {
  position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 2rem)); max-height: min(88vh, 900px);
  background: #fff; border-top: 9px solid var(--cyan); box-shadow: 0 12px 50px rgba(49, 42, 116, .4);
  display: flex; flex-direction: column;
}
.fb-modal[hidden] { display: none; }
.fb-head { background: var(--violett); color: #fff; display: flex; align-items: center; gap: .75rem; padding: .7rem .7rem .7rem 1.5rem; flex: 0 0 auto; }
.fb-title { color: #fff; font-size: 1.4rem; flex: 1 1 auto; }
.fb-body { overflow: auto; padding: 1.25rem 1.5rem 1.5rem; overscroll-behavior: contain; }
.fb-intro { background: var(--cyan-tint); border-left: 3px solid var(--cyan); padding: .8rem 1rem; margin: 0 0 1.25rem; }
.fb-hinweis { font-size: .88rem; color: var(--text-muted); margin: 1rem 0 0; }
.fb-q { margin: 0 0 1.4rem; border: 0; padding: 0; }
.fb-q > label, .fb-q legend { display: block; font-weight: 700; color: var(--violett); margin-bottom: .4rem; padding: 0; }
.fb-q .req { color: #C62828; }
.fb-nr { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--violett-tint); color: var(--violett); font-size: .85rem; margin-right: .5rem; }
.fb-q input[type="text"], .fb-q textarea { width: 100%; font: inherit; padding: .55rem .65rem; border: 1px solid var(--grau-3); border-radius: var(--radius); background: #fff; resize: vertical; }
.stars { display: flex; gap: .2rem; }
.stars .star { cursor: pointer; line-height: 1; }
.stars .star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-glyph { font-size: 2.6rem; color: var(--grau-3); transition: color .1s; display: block; }
.stars .star.on .star-glyph { color: #E8A400; }
.stars .star:hover .star-glyph { color: var(--akzent-gelb); }
.stars .star input:focus-visible + .star-glyph { outline: 3px solid var(--cyan); outline-offset: 2px; }
.fb-scale-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-muted); max-width: 15rem; margin-top: .1rem; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.likert-opt { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; font-size: .82rem; padding: .5rem .3rem; border: 1px solid var(--grau-2); border-radius: var(--radius); cursor: pointer; background: #fff; }
.likert-opt:hover { background: var(--violett-tint); }
.likert-opt:has(input:checked) { background: var(--violett-tint); border-color: var(--violett); font-weight: 700; }
.likert-opt input { accent-color: var(--violett); }
@media (max-width: 560px) { .likert { grid-template-columns: 1fr; } .likert-opt { flex-direction: row; justify-content: flex-start; text-align: left; } }
body.fb-open { overflow: hidden; }

/* Melde-Seite: zwei Spalten und Vorschlagsliste */
.melden-page { max-width: none; }
.melden-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.melden-cols h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.melden-cols > section { min-width: 0; }
@media (max-width: 900px) { .melden-cols { grid-template-columns: 1fr; } }
.feature-list-wrap { margin-top: 2rem; max-width: 76ch; }
.feature-list-wrap .lead { color: var(--text-muted); }
.feature-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.feature-item { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--grau-2); border-radius: var(--radius); padding: .9rem 1.1rem; }
.feature-item h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.feature-item p { margin: 0; }
.feature-text { min-width: 0; }
.feature-answer { margin-top: .5rem; font-size: .92rem; background: var(--cyan-tint); padding: .5rem .7rem; border-radius: var(--radius); }
.vote { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 3.4rem; padding: .45rem .3rem; background: #fff; border: 2px solid var(--violett); border-radius: var(--radius); color: var(--violett); cursor: pointer; font-weight: 700; }
.vote:hover:not(:disabled) { background: var(--violett-tint); }
.vote:disabled { opacity: .65; cursor: default; background: var(--violett-tint); }
.vote-arrow { font-size: .9rem; line-height: 1; }
.vote-n { font-size: 1.25rem; font-variant-numeric: tabular-nums; line-height: 1; }
.melden-form .consent span { flex: 1 1 auto; }
