/* Hundekosten-Silo (/hund/kosten/* und Pillar unter /hund/hundekosten-rechner).
   Baut auf .prose aus article.css auf; Komponenten mit k-Präfix. Farben: Haustier-Dealz-Marke. */
.kosten { max-width: 780px; margin: 40px auto 24px; }
.kosten-page .container > .kosten { margin-top: 40px; }
.kosten .num { text-align: right; white-space: nowrap; }
.kosten td.num { font-weight: 400; }

/* Kurz-gesagt-Box (Featured Snippet / AI Overview) */
.kosten .k-answer {
  background: var(--white, #fff);
  border-left: 5px solid var(--green, #7ab94a);
  border-radius: 0 14px 14px 0;
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}
.kosten .k-label {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green-dark, #5e9436); margin-bottom: 6px;
}
.kosten .k-answer > * + *, .kosten .k-example > * + *, .kosten .k-tip > * + *, .kosten .k-note > * + * { margin-top: 0.6em; }

.kosten .k-example {
  background: rgba(122, 185, 74, 0.10); border: 1.5px solid rgba(122, 185, 74, 0.4);
  border-radius: 14px; padding: 16px 20px;
}

/* Inhaltsverzeichnis im Artikel */
.kosten .k-toc {
  background: var(--white, #fff); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 20px; font-size: 0.97rem;
}
.kosten .k-toc strong { display: block; margin-bottom: 6px; }
.kosten .k-toc ol { margin: 0; }
.kosten .k-toc ol li { margin: 0.3em 0; }

/* Tabellen */
.kosten .k-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kosten .k-table table { margin: 0; min-width: 440px; width: 100%; }
.kosten caption { caption-side: top; text-align: left; font-size: 0.86rem; color: var(--text-muted); padding-bottom: 8px; }
.kosten tfoot td { font-weight: 700; color: var(--navy); border-top: 2px solid var(--navy); }

/* Tipp / Hinweis */
.kosten .k-tip, .kosten .k-note { border-radius: 14px; padding: 16px 20px; font-size: 0.98rem; }
.kosten .k-tip { background: rgba(122, 185, 74, 0.10); border: 1.5px solid rgba(122, 185, 74, 0.4); }
.kosten .k-note { background: var(--heat-bg, #fff7ed); border: 1.5px solid rgba(249, 115, 22, 0.35); }

/* CTA zum Rechner */
.kosten .k-cta {
  background: var(--navy, #1a2d52); color: #e8ecf5; border-radius: 18px;
  padding: 26px 24px; text-align: center;
}
.kosten .k-cta h2, .kosten .k-cta .k-cta-title {
  font-family: var(--font-display); color: #fff; font-size: 1.45rem; margin: 0 0 8px;
}
.kosten .k-cta h2::before { display: none; }
.kosten .k-cta p { color: #d7dcea; }
.kosten .k-btn {
  display: inline-block; background: var(--green, #7ab94a); color: var(--navy-dark, #0f1b36) !important;
  font-weight: 700; padding: 13px 26px; border-radius: 999px; text-decoration: none !important;
  margin-top: 12px; border: 0; cursor: pointer; font-size: 1rem;
}
.kosten .k-btn:hover { background: var(--green-dark, #5e9436); color: #fff !important; }

/* FAQ */
.kosten .k-faq details {
  background: var(--white, #fff); border: 1px solid var(--border); border-radius: 14px; margin-top: 10px;
}
.kosten .k-faq summary {
  cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 700; color: var(--navy);
  list-style: none; position: relative;
}
.kosten .k-faq summary::-webkit-details-marker { display: none; }
.kosten .k-faq summary::after {
  content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--green-dark); font-size: 1.3rem;
}
.kosten .k-faq details[open] summary::after { content: '–'; }
.kosten .k-faq details > div { padding: 0 18px 14px; }

/* Weiterlesen / Ratgeber-Raster */
.kosten .k-related-grid, .kosten .k-guide-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.kosten .k-related-grid a, .kosten .k-guide-grid a {
  display: block; background: var(--white, #fff); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 0.97rem;
  line-height: 1.4; box-shadow: var(--shadow-sm); transition: transform 0.15s, border-color 0.15s;
}
.kosten .k-related-grid a:hover, .kosten .k-guide-grid a:hover { transform: translateY(-2px); border-color: rgba(122, 185, 74, 0.6); }
.kosten .k-related-grid small, .kosten .k-guide-grid small { display: block; font-weight: 400; color: var(--text-muted); margin-top: 4px; }

.kosten .k-sources { font-size: 0.88rem; color: var(--text-muted); }
.kosten .k-sources ul li { margin: 0.3em 0; }

.kosten-deals { max-width: 1120px; margin: 8px auto 48px; }

/* Suchintention zuerst: auf dem Handy muss die Kurzantwort im ersten Bildschirm stehen.
   Hero verdichten – Einleitung + Meta ausblenden (die Kurzantwort-Box beantwortet die Frage mit Zahl). */
@media (max-width: 640px) {
  .kosten-page .article-hero .container { padding-top: 14px; padding-bottom: 18px; }
  .kosten-page .article-hero h1 { font-size: 1.75rem; margin-bottom: 0; }
  .kosten-page .article-hero .breadcrumbs { margin-bottom: 8px; font-size: 0.8rem; }
  .kosten-page .article-lead, .kosten-page .article-meta { display: none; }
  .kosten-page .container > .kosten { margin-top: 18px; }
  .kosten .k-answer { padding: 14px 16px; }
}

@media print {
  .site-header, .site-footer, .kosten .k-cta, .kosten .k-related, .kosten .k-toc, .kosten-deals, .kosten .k-btn, .article-hero .breadcrumbs { display: none !important; }
  body { background: #fff; }
  .kosten { margin: 0; max-width: none; }
}

/* Tabellen: Wrapper scrollt, Tabelle füllt die Breite (article.css setzt display:block) */
.kosten .k-table { background: var(--white, #fff); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.kosten .k-table table { display: table; border: 0; border-radius: 0; overflow: visible; }
/* Zweispaltige Tabellen (Posten | Betrag) brauchen keine Mindestbreite → kein Querscrollen am Handy */
.kosten .k-table table:not(:has(thead th:nth-child(3))) { min-width: 0; }
.kosten .k-table table:not(:has(thead th:nth-child(3))) td:first-child { white-space: normal; }
.kosten .k-table caption { padding: 12px 14px 8px; }
.kosten .k-table td.num, .kosten .k-table th.num { font-variant-numeric: tabular-nums; }
.kosten .k-table tfoot td { background: rgba(122, 185, 74, 0.12); padding: 12px 14px; font-size: 1.02rem; }

/* ---------- Erfahrungsbericht (Autorentexte mit Fotos) ---------- */
/* Byline mit Initialen-Avatar */
.k-avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy, #1a2d52); color: #fff;
  font-family: var(--display, var(--font-display)); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em;
}
.k-avatar--lg { width: 56px; height: 56px; font-size: 1.15rem; }
.k-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.k-byline a { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(122,185,74,0.5); text-underline-offset: 3px; }
.k-byline a:hover { text-decoration-color: var(--green-dark); }

/* Kennzahlen-Leiste */
.kosten .k-stats {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.kosten .k-stats li {
  margin: 0; padding: 16px 14px; background: var(--white, #fff); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-sm); text-align: center;
}
.kosten .k-stats li::before { display: none; }
.kosten .k-stat-value {
  display: block; font-family: var(--display, var(--font-display)); font-weight: 600;
  font-size: clamp(1.45rem, 3.4vw, 1.9rem); line-height: 1.1; color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.kosten .k-stat-label { display: block; margin-top: 6px; font-size: 0.86rem; line-height: 1.35; color: var(--text-muted); }

/* Einstieg: größer, mit Initiale */
.kosten .k-intro { font-size: 1.16rem; line-height: 1.7; color: var(--ink, var(--navy)); }
.kosten .k-intro::first-letter {
  float: left; font-family: var(--display, var(--font-display)); font-weight: 600;
  font-size: 3.6em; line-height: 0.82; margin: 0.06em 0.1em 0 0; color: var(--green-dark, #5e9436);
}

/* Fotos */
.kosten .k-photo { margin: 1.8em 0; }
.kosten .k-photo img { border-radius: 16px; box-shadow: var(--shadow-md); background: var(--cream, #f0ead8); }
.kosten .k-photo figcaption { font-size: 0.86rem; line-height: 1.45; }
.kosten .k-photo--wide img { aspect-ratio: 16 / 10; object-fit: cover; }
.kosten .k-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 1.8em 0; }
.kosten .k-photos .k-photo { margin: 0; }
.kosten .k-photos img { aspect-ratio: 4 / 5; object-fit: cover; }
/* Hochformat neben dem Text (Desktop), darunter volle Breite mit Querschnitt */
.kosten .k-photo--side img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 760px) {
  .kosten .k-photo--side { float: right; width: 40%; margin: 0.3em 0 1em 28px; }
  .kosten .k-photo--side img { aspect-ratio: 3 / 4; }
  .kosten h2, .kosten .k-table, .kosten .k-photos, .kosten .k-quote, .kosten .k-faq, .kosten .k-related, .kosten .k-author-box { clear: right; }
}

/* Zitat */
.kosten .k-quote {
  margin: 1.8em 0; padding: 0.4em 0 0.4em 1.2em; background: none; border-left: 4px solid var(--green, #7ab94a);
  border-radius: 0; font-family: var(--display, var(--font-display)); font-style: normal;
  font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.3; color: var(--navy);
}

/* Autorinnen-Kasten */
.kosten .k-author-box {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 2.4em;
  background: var(--white, #fff); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.kosten .k-author-box p { margin: 0; }
.kosten .k-author-box .k-label { margin-bottom: 4px; }

@media (max-width: 640px) {
  .kosten-page .article-meta.k-byline { display: flex; margin-top: 10px; font-size: 0.82rem; }
  .kosten .k-stats { gap: 8px; }
  .kosten .k-stats li { padding: 12px 8px; }
  .kosten .k-stat-label { font-size: 0.76rem; }
  .kosten .k-stat-value { font-size: 1.22rem; white-space: nowrap; }
  .kosten .k-intro { font-size: 1.08rem; }
}
@media (max-width: 420px) {
  .kosten .k-photos { grid-template-columns: 1fr; }
}

/* ---------- Inhaltsverzeichnis als Seitenleiste (wie im Ratgeber) ----------
   Ab 1180px Viewport steht das Inhaltsverzeichnis links neben der 780px-Textspalte
   und läuft beim Scrollen mit. Nur auf Seiten, die eins haben (:has). Die Textspalte
   bleibt 780px; der Hero fluchtet dann mit der linken Kante der Seitenleiste. */
@media (min-width: 1180px) {
  .kosten:has(> .k-toc) { max-width: 1076px; padding-left: 296px; box-sizing: border-box; }
  .kosten-page:has(.kosten > .k-toc) .article-hero .container,
  .hk-page:has(.kosten > .k-toc) .article-hero .container { max-width: 1124px; }
  .kosten > .k-toc {
    float: left; width: 240px; margin: 0 0 0 -296px;
    position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto;
    background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0;
    font-size: 0.9rem;
  }
  .kosten > .k-toc strong {
    font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-muted); margin: 0 0 12px;
  }
  .kosten > .k-toc ol { margin: 0; padding: 0; border-left: 2px solid var(--border); counter-reset: none; }
  .kosten > .k-toc ol li { margin: 0; padding: 0; }
  .kosten > .k-toc ol li::before { display: none; }
  .kosten > .k-toc a {
    display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent;
    color: var(--text-muted); font-weight: 500; line-height: 1.35; text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
  }
  .kosten > .k-toc a:hover { color: var(--ink, var(--navy)); border-left-color: var(--green); }
}
