/* =====================================================================
   ADHS & Betäubungsmittelrecht — Fachportal
   Design-System v3 „Klinische Referenz“
   Referenzniveau: AMBOSS · UpToDate · Ada Health · NICE (digital products)

   Prinzipien:
   - Produkthafte Kartenarchitektur mit weicher Tiefe (mehrschichtige,
     niedrig-opake Schatten) statt Haarlinien-Broadsheet.
   - Editoriale Serife (Source Serif 4) für Titel = medizinisch-publizistische
     Gravitas; Inter für UI/Fließtext; tabellarische Ziffern für Daten.
   - EIN Aktionsblau (klinisch, vertrauensbildend) + funktionales BtM-Gelb,
     abgeleitet vom gelben BtM-Rezeptformular (Muster 8) — nur für
     BtM-spezifische Marker (Warnungen, „A“-Kennzeichnung, Rezept-Panel).
   - Radius-Skala 8/12/16, ruhige Flächen, großzügiger Weißraum.
   - HTML-Klassenverträge und JS unverändert; reine CSS-Neuinterpretation
     (+ Hero-Panel auf der Startseite).
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Flächen */
  --canvas:   #f6f8fb;   /* Seitengrund, kühl-neutral */
  --paper:    #ffffff;   /* Karten / Inhalte */
  --paper-2:  #f1f5f9;   /* abgesetzte Zonen */

  /* Text */
  --ink:      #0e1b2c;   /* Titel */
  --ink-2:    #33415a;   /* Fließtext */
  --muted:    #5c6b84;   /* Meta, sekundär */

  /* Linien */
  --line:        #e3e9f1;
  --line-strong: #cbd5e3;

  /* Aktionsgrün (klinisch, dunkelgrün) */
  --accent:        #146a45;
  --accent-strong: #0e5234;
  --accent-deep:   #0d2a1c;   /* Dunkelgrün: Header-Marke, Footer, Tabellenkopf */
  --accent-tint:   #eaf4ee;
  --accent-tint-2: #d7e8dd;

  /* BtM-Gelb (Muster-8-Formular) — nur funktional */
  --btm-bg:   #fdf8ea;  --btm-line: #e7d9ae;  --btm-ink: #7c5c10;  --btm-bar: #d9a514;

  /* Semantik */
  --ok-bg:   #eaf5ee;  --ok-line:   #c9e3d2;  --ok-ink:   #1e6b40;
  --crit-bg: #fbefed;  --crit-line: #ecccc7;  --crit-ink: #9c3327;
  --warn-bg: var(--btm-bg); --warn-line: var(--btm-line); --warn-ink: var(--btm-ink);

  /* Form & Tiefe */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14,27,44,.05), 0 1px 3px rgba(14,27,44,.06);
  --shadow-md: 0 2px 4px rgba(14,27,44,.04), 0 8px 20px rgba(14,27,44,.08);
  --shadow-lg: 0 4px 8px rgba(14,27,44,.05), 0 18px 44px rgba(14,27,44,.12);

  /* Raster */
  --measure:      46rem;
  --measure-wide: 76rem;
  --gutter:       1.5rem;

  /* Typografie */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --transition: color .15s ease, background-color .15s ease, border-color .15s ease,
                box-shadow .2s ease, transform .2s ease;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--canvas); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--canvas);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Titel: editoriale Serife; UI-Überschriften bleiben grotesk */
h1, h2 { font-family: var(--font-display); color: var(--ink); margin: 0 0 .5em; font-weight: 600; }
h3, h4 { font-family: var(--font-sans); color: var(--ink); margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.15rem); line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.05rem); line-height: 1.2; letter-spacing: -0.01em; margin-top: 2.6rem; }
h3 { font-size: clamp(1.16rem, 1.05rem + .45vw, 1.32rem); line-height: 1.3; letter-spacing: -0.008em; margin-top: 1.8rem; }
h4 { font-size: 1.03rem; line-height: 1.35; margin-top: 1.3rem; }

p { margin: 0 0 1.05rem; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); transition: var(--transition); }
a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }

strong { font-weight: 650; color: var(--ink); }
small { font-size: .82rem; color: var(--muted); }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

ul, ol { margin: 0 0 1.05rem; padding-left: 1.3rem; }
li { margin: .35rem 0; }
li::marker { color: var(--accent); font-weight: 600; }

code, kbd { font-family: var(--font-mono); font-size: .88em; background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; padding: .08em .4em; }

img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

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

.skip-link { position: absolute; left: 8px; top: -52px; z-index: 1000; background: var(--accent-deep); color: #fff; padding: .7rem 1.1rem; text-decoration: none; border-radius: var(--r-sm); transition: top .15s ease; }
.skip-link:focus { top: 8px; color: #fff; }

/* ---------- Layout ---------- */
.wrap  { width: min(100% - 2 * var(--gutter), var(--measure-wide)); margin-inline: auto; }
.prose { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
main { display: block; padding-bottom: 4rem; }
section { scroll-margin-top: 108px; }

/* Artikelseiten: Inhalt als ruhige weiße Lesefläche auf dem Canvas */
main > .prose {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 1rem + 2.5vw, 3rem) clamp(1.2rem, .8rem + 3vw, 3.4rem);
  margin-top: 1.6rem;
}
main > .prose + .prose { margin-top: 1.2rem; }

/* ---------- Utility-Bar (HWG-Hinweis, per JS eingefügt) ---------- */
.utility-bar { background: var(--accent-deep); color: rgba(255,255,255,.78); font-size: .78rem; }
.utility-bar__inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; min-height: 34px; padding-block: .35rem; }
.utility-bar span { letter-spacing: .01em; }
.utility-bar a { color: #bfe0cd; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.utility-bar a:hover { color: #fff; }
@media (max-width: 600px){ .utility-bar a { display: none; } .utility-bar span { font-size: .74rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 1.2rem; min-height: 70px; padding-block: .55rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 42px; height: 42px; flex: none;
  background: linear-gradient(145deg, #12503a 0%, var(--accent-deep) 70%);
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem;
  border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-sm);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__title { font-weight: 700; font-size: 1.04rem; letter-spacing: -.012em; }
.brand__sub { font-size: .64rem; color: var(--muted); font-weight: 600; letter-spacing: .13em; text-transform: uppercase; margin-top: .16rem; }

.nav { margin-left: auto; }
.nav__toggle { display: none; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: .55rem .9rem; cursor: pointer; color: var(--ink); font-weight: 600; font-size: .82rem; min-height: 42px; }
.nav__toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.nav__list { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.nav__list a {
  display: flex; align-items: center; min-height: 38px; padding: .35rem .72rem;
  text-decoration: none; color: var(--ink-2); font-weight: 550; font-size: .84rem;
  letter-spacing: .002em; border-radius: var(--r-pill); transition: var(--transition);
}
.nav__list a:hover { color: var(--accent-strong); background: var(--accent-tint); }
.nav__list a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-tint); font-weight: 650; }

@media (max-width: 1040px) {
  .nav__toggle { display: inline-flex; align-items: center; }
  .nav__list { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); padding: .5rem .75rem .9rem; }
  .nav[data-open="false"] .nav__list { display: none; }
  .nav__list a { padding: .8rem .8rem; font-size: .92rem; border-radius: var(--r-sm); }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding-block: .8rem .2rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.breadcrumb li { color: var(--muted); margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: .45rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Eyebrow / Kicker ---------- */
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .74rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-tint);
  border: 1px solid var(--accent-tint-2); border-radius: var(--r-pill);
  padding: .34rem .85rem;
}
.hero__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(13,94,168,.10), transparent 62%),
    radial-gradient(760px 420px at -8% 108%, rgba(13,94,168,.07), transparent 60%),
    linear-gradient(180deg, #fdfeff 0%, var(--canvas) 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.6rem, 1.8rem + 4vw, 4.6rem) 0 clamp(2rem, 1.4rem + 2.4vw, 3rem);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: clamp(1.6rem, 1rem + 3vw, 4rem); align-items: center; }
@media (max-width: 900px){ .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { max-width: 20ch; margin-top: 1.1rem; }
.hero__lead { font-size: clamp(1.06rem, 1rem + .45vw, 1.22rem); color: var(--ink-2); max-width: 58ch; line-height: 1.62; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero__copy, .hero__panel { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .hero__panel { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* Vertrauensband unter dem Hero */
.hero__trust {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
@media (max-width: 720px){ .hero__trust { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: .8rem; align-items: flex-start; padding: 1.15rem 1.3rem; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
@media (max-width: 720px){ .trust-item { border-right: 0; border-bottom: 1px solid var(--line); } .trust-item:last-child{ border-bottom: 0; } }
.trust-item svg { flex: none; width: 34px; height: 34px; padding: 7px; color: var(--accent-strong); background: var(--accent-tint); border-radius: 10px; }
.trust-item b { display: block; color: var(--ink); font-size: .93rem; font-weight: 650; margin-bottom: .1rem; }
.trust-item span { font-size: .84rem; color: var(--muted); line-height: 1.5; }

/* ---------- Signature: BtM-Rezept-Panel (Muster-8-Anmutung) ---------- */
.hero__panel { min-width: 0; }
.rx {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(.4deg);
}
@media (max-width: 900px){ .rx { transform: none; max-width: 560px; } }
.rx::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--btm-bar), #eec254); }
.rx__head { background: var(--btm-bg); border-bottom: 1px dashed var(--btm-line); padding: 1.05rem 1.3rem .95rem; }
.rx__tag { display: block; font-size: .66rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: var(--btm-ink); }
.rx__title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; color: var(--ink); margin-top: .25rem; letter-spacing: -.01em; }
.rx__sub { display: block; font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.rx__list { list-style: none; margin: 0; padding: .4rem 0; counter-reset: rx; }
.rx__list li { counter-increment: rx; display: flex; gap: .85rem; align-items: flex-start; margin: 0; padding: .78rem 1.3rem; border-bottom: 1px solid var(--line); font-size: .88rem; line-height: 1.5; color: var(--muted); }
.rx__list li:last-child { border-bottom: 0; }
.rx__list li::before {
  content: counter(rx); flex: none;
  width: 24px; height: 24px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; color: var(--accent-strong);
  background: var(--accent-tint); border-radius: 50%; margin-top: .05rem;
  font-variant-numeric: tabular-nums;
}
.rx__list b { display: block; color: var(--ink); font-weight: 650; font-size: .9rem; }
.rx__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.3rem; background: var(--paper-2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.rx__stand { font-size: .76rem; font-weight: 650; color: var(--ok-ink); background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: var(--r-pill); padding: .22rem .7rem; }
.rx__foot a { font-size: .85rem; font-weight: 650; text-decoration: none; }
.rx__foot a:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; font: inherit; font-weight: 620; font-size: .95rem; cursor: pointer;
  padding: .65rem 1.4rem; border-radius: var(--r-md);
  border: 1px solid transparent; text-decoration: none; line-height: 1.2;
  transition: var(--transition);
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(13,74,45,.35), inset 0 1px 0 rgba(255,255,255,.12); }
.btn--primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(13,74,45,.28); }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-tint); }
.btn--sm { min-height: 38px; padding: .45rem .95rem; font-size: .86rem; border-radius: 10px; }

/* ---------- Section head ---------- */
.section-head { max-width: 64ch; margin: 3.2rem 0 1.7rem; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- Cluster-Index ---------- */
.cluster-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cluster-card {
  position: relative; display: flex; flex-direction: column; gap: .45rem;
  background: var(--paper); padding: 1.5rem 1.45rem 1.35rem;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.cluster-card__num {
  align-self: flex-start;
  font-size: .66rem; font-weight: 700; letter-spacing: .11em;
  color: var(--accent-strong); background: var(--accent-tint);
  border-radius: var(--r-pill); padding: .24rem .65rem;
}
.cluster-card h3 { margin: .35rem 0 0; font-size: 1.16rem; color: var(--ink); letter-spacing: -.008em; }
.cluster-card p { margin: .15rem 0 0; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.cluster-card__more { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto; padding-top: .9rem; font-weight: 650; font-size: .83rem; color: var(--accent); }
.cluster-card:hover { transform: translateY(-3px); border-color: var(--accent-tint-2); box-shadow: var(--shadow-md); }
.cluster-card:hover h3 { color: var(--accent-strong); }
.cluster-card:hover .cluster-card__more { color: var(--accent-strong); }

/* ---------- Callouts ---------- */
.callout { position: relative; border: 1px solid var(--line); background: var(--paper); padding: 1.15rem 1.3rem 1.15rem 1.45rem; margin: 1.6rem 0; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.callout::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--muted); }
.callout__title { display: flex; align-items: center; gap: .55rem; font-weight: 650; color: var(--ink); margin: 0 0 .5rem; font-size: .98rem; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout svg { flex: none; color: currentColor; }
.callout--summary { background: var(--accent-tint); border-color: var(--accent-tint-2); }
.callout--summary::before { background: var(--accent); }
.callout--summary .callout__title { color: var(--accent-strong); }
.callout--warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout--warn::before { background: var(--btm-bar); }
.callout--warn .callout__title { color: var(--warn-ink); }
.callout--ok { background: var(--ok-bg); border-color: var(--ok-line); }
.callout--ok::before { background: var(--ok-ink); }
.callout--ok .callout__title { color: var(--ok-ink); }

/* ---------- TL;DR ---------- */
.tldr { background: linear-gradient(180deg, var(--accent-tint) 0%, #f1faf4 100%); border: 1px solid var(--accent-tint-2); border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin: 1.6rem 0 2rem; box-shadow: var(--shadow-sm); }
.tldr h2 { font-family: var(--font-sans); margin: 0 0 .55rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; color: var(--accent-strong); font-weight: 700; }
.tldr p { font-size: 1.04rem; color: var(--ink-2); }
.tldr p:last-child { margin-bottom: 0; }

/* ---------- §-Chip / Rechtsgrundlagen ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.05rem 0; }
.para-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--accent-tint); color: var(--accent-strong);
  font-weight: 650; font-size: .78rem; letter-spacing: .01em;
  padding: .28rem .7rem; border: 1px solid var(--accent-tint-2);
  border-radius: var(--r-pill); text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
a.para-chip:hover { border-color: var(--accent); background: var(--accent-tint-2); color: var(--accent-strong); }
.legal-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.15rem 1.35rem; margin: 1.6rem 0; background: var(--paper); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.legal-box::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.legal-box__head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.legal-box__head b { color: var(--ink); font-weight: 650; }
.legal-box p:last-child { margin-bottom: 0; }
.legal-box .stand { display: inline-block; font-size: .75rem; color: var(--muted); margin-top: .6rem; background: var(--paper-2); border-radius: var(--r-pill); padding: .18rem .65rem; }

/* ---------- Tabellen ---------- */
.table-scroll { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); background: var(--paper); }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--paper); font-variant-numeric: tabular-nums lining-nums; }
table.data caption { text-align: left; font-size: .79rem; color: var(--muted); padding: .65rem 1rem .8rem; caption-side: bottom; }
table.data th, table.data td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--accent-deep); color: #fff; font-weight: 600; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; border-bottom: 0; }
table.data tbody th, table.data td:first-child { font-weight: 650; color: var(--ink); }
table.data tbody tr:nth-child(even) { background: #fafbfd; }
table.data tbody tr:hover { background: var(--accent-tint); }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 700px) {
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  .table-scroll { border: 0; overflow: visible; box-shadow: none; background: transparent; }
  table.data { background: transparent; }
  table.data tr { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: .9rem; background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
  table.data td { border-bottom: 1px solid var(--line); padding: .7rem 1rem .7rem 45%; position: relative; text-align: left; }
  table.data td:last-child { border-bottom: 0; }
  table.data td::before { content: attr(data-label); position: absolute; left: 1rem; top: .72rem; width: 40%; font-weight: 650; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
}

/* ---------- Checkliste ---------- */
.checklist { list-style: none; margin: 1.5rem 0; padding: .35rem 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-sm); }
.checklist li { display: flex; gap: .85rem; align-items: flex-start; margin: 0; padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist li:hover { background: var(--accent-tint); }
.checklist input[type="checkbox"] { margin-top: .3rem; width: 1.2rem; height: 1.2rem; accent-color: var(--accent); flex: none; border-radius: 4px; }
.checklist label { cursor: pointer; }
.checklist .hint { display: block; font-size: .82rem; color: var(--muted); margin-top: .1rem; }

/* ---------- FAQ ---------- */
.faq { margin: 1.7rem 0; display: grid; gap: .7rem; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-sm); transition: var(--transition); }
.faq details[open] { border-color: var(--accent-tint-2); box-shadow: var(--shadow-md); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 1.2rem; font-weight: 650; font-size: 1.02rem; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 48px; border-radius: var(--r-md); }
.faq summary:hover { color: var(--accent-strong); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.45rem; font-weight: 400; line-height: 1; color: var(--accent); flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { content: "+"; transform: rotate(45deg); }
.faq details > div { padding: 0 1.2rem 1.15rem; color: var(--ink-2); }
.faq details > div > p:last-child { margin-bottom: 0; }

/* ---------- Inhaltsverzeichnis ---------- */
.toc { border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--r-md); padding: 1.15rem 1.35rem; margin: 1.8rem 0; }
.toc h2 { font-family: var(--font-sans); margin: 0 0 .65rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2.4rem; }
.toc li { margin: .32rem 0; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---------- Externer Link ---------- */
a.ext::after { content: ""; display: inline-block; width: .62em; height: .62em; margin-left: .28em; vertical-align: baseline; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h5v2H5v12h12v-5h2v7H3V5h2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 3h7v7h-2V6.4l-9.3 9.3-1.4-1.4L17.6 5H14V3zM5 5h5v2H5v12h12v-5h2v7H3V5h2z'/%3E%3C/svg%3E") center/contain no-repeat; opacity: .55; }

/* ---------- Quellen ---------- */
.sources { margin: 2.4rem 0 0; padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper-2); }
.sources h2 { font-family: var(--font-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); margin: 0 0 .7rem; }
.sources ol { font-size: .88rem; color: var(--ink-2); padding-left: 1.4rem; margin: 0; }
.sources li { margin: .5rem 0; }
.sources li::marker { color: var(--muted); }
.sources a { word-break: break-word; }

/* ---------- Meta / Review-Badge ---------- */
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem .7rem; font-size: .8rem; color: var(--muted); margin: .7rem 0 1.7rem; align-items: center; }
.article-meta span { display: inline-flex; align-items: center; gap: .35rem; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: .26rem .75rem; }
.review-badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 650; color: var(--ok-ink); background: var(--ok-bg); border: 1px solid var(--ok-line); padding: .26rem .75rem; border-radius: var(--r-pill); }
.review-badge svg { color: var(--ok-ink); }

/* ---------- Verwandte Themen ---------- */
.related { margin: 2.8rem 0 0; }
.related h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); }
.related li { margin: 0; }
.related a { text-decoration: none; color: var(--ink); font-weight: 650; display: block; height: 100%; padding: 1rem 1.15rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); transition: var(--transition); }
.related a:hover { transform: translateY(-2px); border-color: var(--accent-tint-2); box-shadow: var(--shadow-md); color: var(--accent-strong); }
.related a span { display: block; font-weight: 400; font-size: .84rem; color: var(--muted); margin-top: .25rem; line-height: 1.5; }

/* ---------- Rechner ---------- */
.calc { border: 1px solid var(--line); border-radius: var(--r-lg); margin: 1.8rem 0; background: var(--paper); box-shadow: var(--shadow-md); overflow: hidden; font-variant-numeric: tabular-nums lining-nums; }
.calc__grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; padding: 1.5rem; }
@media (max-width: 640px) { .calc__grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 650; font-size: .88rem; color: var(--ink); }
.field select, .field input { font: inherit; min-height: 46px; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; transition: var(--transition); }
.field select:hover, .field input:hover { border-color: var(--muted); }
.field select:focus, .field input:focus { border-color: var(--accent); outline: 3px solid var(--accent-tint-2); outline-offset: 0; }
.field .unit { font-size: .8rem; color: var(--muted); }
.calc__result { border-top: 1px solid var(--line); padding: 1.5rem; background: var(--paper-2); }
.result-line { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--line-strong); font-size: .96rem; }
.result-line:last-of-type { border-bottom: 0; }
.result-line b { color: var(--ink); }
.result-status { margin-top: 1.1rem; padding: .95rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); font-weight: 600; box-shadow: var(--shadow-sm); }
.result-status[data-state="ok"] { border-color: var(--ok-line); color: var(--ok-ink); background: var(--ok-bg); }
.result-status[data-state="over"] { border-color: var(--btm-line); color: var(--btm-ink); background: var(--btm-bg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--accent-deep); color: #9fb0c4; margin-top: 4rem; }
.site-footer a { color: #cfdbea; text-decoration: none; }
.site-footer__grid { display: grid; gap: 2rem 2.2rem; grid-template-columns: 1.5fr repeat(3, 1fr); padding: 3rem 0 2rem; }
@media (max-width: 820px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; margin: 0 0 1rem; font-weight: 700; }
.footer-brand h3 { font-family: var(--font-display); font-size: 1.15rem; text-transform: none; letter-spacing: -.01em; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .48rem 0; }
.site-footer a { font-size: .9rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand p { font-size: .88rem; color: #8496ac; max-width: 36ch; line-height: 1.65; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.1); padding: 1.4rem 0 1.8rem; font-size: .78rem; color: #75879e; }
.footer-disclaimer p { margin: .35rem 0; }
.footer-disclaimer strong { color: #b6c4d6; font-weight: 650; }

/* ---------- Utilities ---------- */
.lead { font-size: 1.14rem; color: var(--ink-2); }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
