/* TierWeitblick: gemeinsames Stylesheet für alle Seiten.
   Farben und Schriften aus dem Markenkonzept (TierWeitblick_MVP.md, Abschnitt 9, 10, 34).
   Kupfer (#C9854D) hat auf Weiß nur ca. 3:1 Kontrast: nur für Linien und Flächen, nie für Fließtext oder Buttontext. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/Inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/fonts/Inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/Inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/Inter-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("/fonts/Manrope-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url("/fonts/Manrope-800.woff2") format("woff2"); }

:root {
  --primary: #173C35;
  --primary-hell: #24574D;
  --sand: #E8DDCC;
  --kupfer: #C9854D;
  --kupfer-dunkel: #8F5526; /* Kupfer in textfähiger Stärke (Kontrast > 6:1 auf Weiß) */
  --kupfer-hell: #DA9C66; /* Kupfer für Text auf Dunkelgrün (Kontrast 5,2:1, Logo-Kupfer hätte nur 4,0:1) */
  --hintergrund: #FAF8F4;
  --flaeche: #F3EFE8;
  --text: #222826;
  --text-leise: #55605C;
  --linie: #E2DACB;
  --erfolg: #3D765F;
  --warnung: #D79A3B;
  --kritisch: #B65445;
  --radius-karte: 16px;
  --radius-knopf: 10px;
  --breite: 1200px;
  --artikel: 780px;
  --schatten: 0 1px 2px rgba(23, 60, 53, 0.06), 0 2px 8px rgba(23, 60, 53, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--hintergrund); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; line-height: 1.65;
  overflow-wrap: break-word; /* lange deutsche Wörter brechen auf schmalen Handys um, ohne überall Silbentrennung */
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hell); }
:focus-visible { outline: 3px solid var(--kupfer); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: "Manrope", "Inter", sans-serif; color: var(--primary); line-height: 1.2; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.3rem); margin: 1.75rem 0 0.6rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .huelle { padding: 0 32px; } }

/* ---- Kopf ---- */
.kopf { background: #fff; border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 50; }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--primary); }
.logo svg { width: 30px; height: 30px; flex: none; }
.logo span { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.logo span b { font-weight: 800; color: var(--kupfer-dunkel); }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 0.95rem; padding: 0.6rem 0.75rem; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--flaeche); color: var(--primary); }
.site-nav-toggle { display: none; background: none; border: 1px solid var(--linie); border-radius: 8px; width: 48px; height: 44px; cursor: pointer; color: var(--primary); }
.site-nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 960px) {
  .site-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--linie); flex-direction: column; padding: 0.5rem 16px 1rem; box-shadow: var(--schatten); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.85rem 0.75rem; font-size: 1rem; }
}

/* ---- Brotkrumen ---- */
.brotkrumen { font-size: 0.875rem; color: var(--text-leise); padding-top: 1rem; } /* seitlicher Abstand kommt von .huelle */
.brotkrumen ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.brotkrumen li { margin: 0; }
.brotkrumen li + li::before { content: "›"; margin-right: 0.35rem; color: var(--kupfer); }
.brotkrumen a { color: var(--text-leise); }

/* ---- Seitenkopf (Hero) ---- */
.hero { padding: 20px 0 48px; }
.hero--start { padding: 24px 0 56px; background: linear-gradient(180deg, #fff 0%, var(--hintergrund) 100%); border-bottom: 1px solid var(--linie); }
.kicker { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--kupfer-dunkel); margin-bottom: 0.75rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-leise); max-width: 62ch; }
.lede strong { color: var(--text); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.75rem 1.4rem; border-radius: var(--radius-knopf); font-weight: 600; text-decoration: none; border: 2px solid var(--primary); background: var(--primary); color: #fff; font-size: 1rem; cursor: pointer; font-family: inherit; }
.knopf:hover { background: var(--primary-hell); border-color: var(--primary-hell); color: #fff; }
.knopf--leise { background: transparent; color: var(--primary); }
.knopf--leise:hover { background: var(--flaeche); color: var(--primary); }
.stand { font-size: 0.875rem; color: var(--text-leise); margin-top: 1rem; }

/* ---- Abschnitte ---- */
.abschnitt { padding: 48px 0; }
.abschnitt--flaeche { background: var(--flaeche); }
.abschnitt__kopf { max-width: 70ch; margin-bottom: 1.75rem; }
.abschnitt__kopf p { color: var(--text-leise); }
.inhalt { max-width: var(--artikel); }
.inhalt p, .inhalt li { max-width: 72ch; }

/* ---- Karten ---- */
.raster { display: grid; gap: 16px; grid-template-columns: 1fr; }
.raster > * { min-width: 0; } /* Rasterzellen dürfen schmaler werden als ihr Inhalt, sonst Überlauf */
@media (min-width: 640px) { .raster--2, .raster--3, .raster--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .raster--3 { grid-template-columns: repeat(3, 1fr); } .raster--4 { grid-template-columns: repeat(4, 1fr); } }
.karte { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linie); border-radius: var(--radius-karte); padding: 20px 22px; text-decoration: none; color: var(--text); box-shadow: var(--schatten); }
a.karte:hover { border-color: var(--primary); }
.karte h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.karte p { margin: 0 0 0.75rem; color: var(--text-leise); font-size: 0.97rem; }
.karte .mehr { margin-top: auto; font-weight: 600; color: var(--primary); font-size: 0.95rem; }
.karte--bald { opacity: 0.85; box-shadow: none; background: var(--flaeche); }
.karte .marke { align-self: flex-start; font-size: 0.75rem; font-weight: 600; color: var(--text-leise); border: 1px solid var(--linie); border-radius: 999px; padding: 0.1rem 0.6rem; margin-bottom: 0.6rem; }
.karte__symbol { width: 40px; height: 40px; border-radius: 12px; background: var(--sand); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.8rem; }
.karte__symbol svg { width: 22px; height: 22px; }
.karte__symbol .zeichen { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.3rem; line-height: 1; }

/* ---- Kästen ---- */
.kasten { background: #fff; border: 1px solid var(--linie); border-left: 4px solid var(--kupfer); border-radius: 12px; padding: 18px 20px; margin: 1.5rem 0; }
.kasten p:last-child, .kasten ul:last-child { margin-bottom: 0; }
.kasten--hinweis { border-left-color: var(--warnung); }
.kasten--wichtig { border-left-color: var(--kritisch); }
.kasten__titel { font-weight: 700; color: var(--primary); display: block; margin-bottom: 0.35rem; }
.kurz { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius-karte); padding: 20px 22px; margin: 0 0 2rem; }
.kurz h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }

/* ---- Tabellen (mobil waagerecht scrollbar) ---- */
.tabelle { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--linie); border-radius: 12px; background: #fff; margin: 0 0 1rem; }
.tabelle table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 520px; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--linie); }
.tabelle thead th { background: var(--primary); color: #fff; font-family: "Manrope", sans-serif; font-weight: 700; }
.tabelle tbody tr:last-child td, .tabelle tbody tr:last-child th { border-bottom: 0; }
.tabelle .zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle-hinweis { font-size: 0.875rem; color: var(--text-leise); }

/* ---- FAQ ---- */
.faq details { background: #fff; border: 1px solid var(--linie); border-radius: 12px; margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; padding: 1rem 1.1rem; font-weight: 600; color: var(--primary); list-style: none; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 700; color: var(--kupfer-dunkel); }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.1rem 1rem; }

/* ---- Quellen ---- */
.quellen { font-size: 0.92rem; color: var(--text-leise); }
.quellen li { margin-bottom: 0.4rem; }

/* ---- Fuß ---- */
.fuss { background: var(--primary); color: #E9EFEC; margin-top: 48px; padding: 48px 0 32px; font-size: 0.95rem; }
.fuss a { color: #fff; text-decoration: none; }
.fuss a:hover { text-decoration: underline; }
.fuss__raster { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .fuss__raster { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.fuss h2 { color: var(--kupfer-hell); font-size: 1rem; margin: 0 0 0.75rem; }
.fuss ul { list-style: none; padding: 0; margin: 0; }
.fuss li { margin-bottom: 0.5rem; }
.fuss .logo { color: #fff; }
.fuss .logo span b { color: var(--sand); }
.fuss__unten { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 32px; padding-top: 20px; font-size: 0.85rem; color: #C9D6D1; }
.fuss__unten p { margin: 0 0 0.5rem; max-width: 90ch; }
.linkknopf { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; text-align: left; }
.linkknopf:hover { text-decoration: underline; }

/* ---- Einwilligungs-Banner ---- */
#consent-banner { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(23, 60, 53, 0.25); backdrop-filter: blur(2px); }
#consent-banner[hidden] { display: none; }
.consent-box { background: #fff; border-radius: var(--radius-karte); max-width: 560px; width: 100%; padding: 22px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.consent-box h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.consent-box p { font-size: 0.95rem; color: var(--text-leise); }
.consent-box .knopfreihe { margin-top: 1rem; }

/* ---- Rechner ---- */
.rechner { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius-karte); padding: 20px; box-shadow: var(--schatten); }
@media (min-width: 768px) { .rechner { padding: 28px; } }
.rechner fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; } /* fieldset hat sonst min-width: min-content */
.rechner legend, .rechner label.feld { font-weight: 600; color: var(--primary); display: block; margin-bottom: 0.5rem; }
.auswahl { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.auswahl label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem 1rem; border: 1px solid var(--linie); border-radius: 999px; cursor: pointer; background: var(--hintergrund); }
.auswahl input { accent-color: var(--primary); width: 18px; height: 18px; }
.auswahl label:has(input:checked) { border-color: var(--primary); background: #fff; box-shadow: inset 0 0 0 1px var(--primary); }
.rechner select, .rechner input[type="number"], .rechner input[type="search"] { width: 100%; min-height: 48px; padding: 0.6rem 0.8rem; border: 1px solid #CFC5B3; border-radius: 10px; font: inherit; background: #fff; color: var(--text); }
.rechner .schalter { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem 0; }
.rechner .schalter input { width: 20px; height: 20px; margin-top: 0.2rem; accent-color: var(--primary); flex: none; }
.rechner .schalter small { display: block; color: var(--text-leise); }
.positionen td input[type="number"] { width: 4.5rem; min-height: 40px; }
.positionen td input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }
.positionen .leistung { min-width: 200px; }
.ergebnis { margin-top: 1.5rem; background: var(--flaeche); border-radius: var(--radius-karte); padding: 20px; }
.ergebnis__spanne { font-family: "Manrope", sans-serif; font-weight: 800; color: var(--primary); font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0.25rem 0 0.5rem; }
.ergebnis table { min-width: 0; }
.ergebnis th { width: 50%; font-weight: 500; }
.ergebnis .zahl { white-space: normal; } /* Spannen wie "227,15 € bis 681,45 €" dürfen auf dem Handy umbrechen */
.positionen td.leistung .klein { display: none; } /* Nr. steht am Desktop in eigener Spalte */
/* Positionen auf dem Handy als Karten statt breiter Tabelle */
@media (max-width: 640px) {
  .positionen { overflow: visible; border: 0; background: none; }
  .positionen table { min-width: 0; }
  .positionen thead { display: none; }
  .positionen tr { display: grid; grid-template-columns: 32px 1fr auto; grid-template-areas: "an leistung leistung" "an menge satz"; gap: 0.35rem 0.6rem; align-items: center; background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 0.75rem; margin-bottom: 0.5rem; }
  .positionen td { border: 0; padding: 0; }
  .positionen td:nth-child(1) { grid-area: an; align-self: start; }
  .positionen td:nth-child(2) { grid-area: menge; }
  .positionen td:nth-child(2)::before { content: "Menge "; font-size: 0.85rem; color: var(--text-leise); }
  .positionen td:nth-child(3) { display: none; }
  .positionen td.leistung { grid-area: leistung; min-width: 0; font-weight: 500; }
  .positionen td.leistung .klein { display: inline; font-weight: 400; }
  .positionen td.zahl { grid-area: satz; font-size: 0.9rem; color: var(--text-leise); }
}
.suche-treffer { list-style: none; padding: 0; margin: 0.5rem 0 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 10px; }
.suche-treffer:empty { display: none; }
.suche-treffer li { margin: 0; border-bottom: 1px solid var(--linie); }
.suche-treffer button { width: 100%; text-align: left; background: #fff; border: 0; padding: 0.7rem 0.9rem; font: inherit; cursor: pointer; min-height: 44px; }
.suche-treffer button:hover { background: var(--flaeche); }
.klein { font-size: 0.875rem; color: var(--text-leise); }

/* ---- Artikel ---- */
.artikel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 32px; }
.artikel > * { min-width: 0; } /* breite Tabellen scrollen in ihrem Kasten, statt die Seite zu verbreitern */
@media (min-width: 1100px) { .artikel { grid-template-columns: 240px minmax(0, var(--artikel)); gap: 48px; } .toc { position: sticky; top: 88px; align-self: start; } }
.toc { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 14px 18px; font-size: 0.93rem; }
.toc summary { cursor: pointer; font-weight: 700; color: var(--primary); min-height: 32px; }
.toc ol { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { text-decoration: none; }
.artikel__text h2 { margin-top: 2.25rem; scroll-margin-top: 88px; }
.artikel__text h2:first-child { margin-top: 0; }
.artikel__text h3 { scroll-margin-top: 88px; }
.artikel__text blockquote { margin: 1.5rem 0; }

/* ---- Seitenkopf mit Bild ---- */
.hero__raster { display: grid; gap: 24px; }
.hero__raster > * { min-width: 0; }
h1 { hyphens: auto; } /* lange Komposita wie „Hundekrankenversicherung“ auf schmalen Handys trennen */
.hero__bild { margin: 0; }
.hero__bild img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-karte); display: block; }
@media (min-width: 960px) { .hero--bild .hero__raster { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 48px; } }

/* Sprungziele nicht unter der festen Kopfleiste verstecken */
h2[id], h3[id] { scroll-margin-top: 88px; }
