/* Ratgeber (/ratgeber, /ratgeber/<slug>). Wird nach site.css geladen und nutzt dessen Bausteine
   (.page-head, .breadcrumb, .card, .blob, .deco, .prose, .section-alt, .wave-top, .cta-band) und
   Farben. Hier steht nur, was der Ratgeber zusätzlich braucht.
   Jedes Thema hat eine Farbe (.rg-blau, .rg-koralle, .rg-gelb, .rg-mint, .rg-himmel):
   --rg-c für Deko, Blobs, Marker und Ziffern, --rg-on Textfarbe auf --rg-c (auf Blau nur Weiß),
   --rg-tint helle Fläche. Text bleibt Nachtblau, Links Blau. */

:is(.rg-blau, .rg-koralle, .rg-gelb, .rg-mint, .rg-himmel) { --rg-on: var(--night); --rg-tint: color-mix(in srgb, var(--rg-c) 18%, #fff); }
.rg-blau    { --rg-c: var(--blue); --rg-on: #fff; }
.rg-koralle { --rg-c: var(--coral); }
.rg-gelb    { --rg-c: var(--sun); }
.rg-mint    { --rg-c: var(--mint); }
.rg-himmel  { --rg-c: var(--sky); }

/* Thema als runde Marke mit Farbpunkt */
.rg-kicker {
  display: inline-flex; align-items: center; gap: .45rem; width: fit-content;
  padding: .3rem .85rem .3rem .65rem; border-radius: 999px; background: var(--rg-tint);
  font-weight: 700; font-size: .875rem; line-height: 1.3; color: var(--night);
}
.rg-kicker::before { content: ""; flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--rg-c); }

/* Artikelkopf: .page-head aus site.css, Titel kleiner als bei Übersichtsseiten */
.rg-head .rg-kicker { margin-top: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); background: #fff; }
.rg-head h1 { margin-top: 1rem; max-width: 21ch; font-size: clamp(2.1rem, 1.3rem + 2.7vw, 3.4rem); line-height: 1.08; }
.rg-head .page-head-media { width: min(22rem, 86%); }
.rg-head .page-head-media .blob { inset: 6% 0 0 4%; background: color-mix(in srgb, var(--rg-c) 50%, #fff); }
.rg-kammi { width: min(16rem, 70%); }
.rg-kammi .blob { inset: 10% 6% 12% 8%; }
@media (min-width: 64rem) { .rg-head .page-head-media, .rg-kammi { width: 100%; } }
@media (max-width: 63.99rem) { .page-head > .deco { display: none; } } /* einspaltig läge Deko im Text */

.rg-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin-top: 1.5rem; font-weight: 600; font-size: .9375rem; }
.rg-meta > * { display: inline-flex; align-items: center; gap: .45rem; }
.rg-meta > ::before, .rg-card-meta::before { content: ""; flex: none; width: 24px; height: 24px; background: center / contain no-repeat; }
.rg-meta time::before { background-image: url("/static/img/icons/kalender.svg"); }
.rg-read::before, .rg-card-meta::before { background-image: url("/static/img/icons/uhr.svg"); }

/* Inhaltsverzeichnis als runde Karte neben dem Text */
.rg-layout { display: grid; gap: 2.5rem; }
.rg-toc { align-self: start; padding: 1.4rem 1.5rem 1.6rem; border-radius: var(--radius); background: var(--sky-50); }
.rg-toc h2 { font-size: 1.0625rem; letter-spacing: 0; color: var(--night); }
.rg-toc ol { margin: 1rem 0 0; padding: 0; list-style: none; counter-reset: rg-toc; }
.rg-toc li { counter-increment: rg-toc; display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: baseline; gap: .65rem; font-size: .9375rem; line-height: 1.35; }
.rg-toc li + li { margin-top: .6rem; }
.rg-toc li::before {
  content: counter(rg-toc); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--rg-c); font-weight: 800; font-size: .8125rem; line-height: 1; color: var(--rg-on);
}
.rg-toc a { color: var(--night); text-decoration: none; }
.rg-toc a:hover { color: var(--blue); text-decoration: underline; }
@media (min-width: 64rem) {
  .rg-layout { grid-template-columns: 17rem minmax(0, 42rem); justify-content: center; gap: clamp(3rem, 5vw, 5rem); }
  .rg-toc { position: sticky; top: 1.5rem; }
}

/* Artikeltext: .prose aus site.css, dazu Themenfarbe an Überschriften und Listen */
.rg-body { max-width: 42rem; }
.rg-body h2 { scroll-margin-top: 1.5rem; }
.rg-body h2:first-child { margin-top: 0; }
.rg-body h2::before { content: ""; display: block; width: 2.75rem; height: 6px; margin-bottom: .75rem; border-radius: 3px; background: var(--rg-c); }
.rg-body ul > li::marker { color: var(--rg-c); }
.rg-body a { color: var(--blue); font-weight: 600; }
.rg-body a:hover { text-decoration-thickness: 3px; }

/* Checkliste mit Mint-Haken */
.rg-body .rg-check { padding-left: 0; list-style: none; }
.rg-check li { position: relative; padding-left: 2.2rem; }
.rg-check li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--mint); }
.rg-check li::after { content: ""; position: absolute; left: .53rem; top: .45em; width: .38rem; height: .68rem; border: solid var(--night); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.rg-note { padding: 1.1rem 1.3rem; border: 2px solid var(--sun); border-radius: var(--radius); background: color-mix(in srgb, var(--sun) 18%, #fff); }

.rg-table { overflow-x: auto; border: 2px solid var(--line); border-radius: var(--radius); }
.rg-table table { line-height: 1.45; }
.rg-table caption { caption-side: bottom; padding: .7rem 1rem; text-align: left; font-size: .875rem; color: var(--muted); }
.rg-table :is(th, td) { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.rg-table thead th { border-bottom: 0; background: var(--sky-50); font-weight: 800; }
.rg-table tfoot :is(th, td) { border-bottom: 0; font-weight: 800; }
.rg-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Passende Anleitung: .card in der Themenfarbe mit buntem Icon */
.rg-help { display: flex; align-items: center; gap: 1.1rem; max-width: 42rem; margin-top: 2.75rem; padding: 1.1rem 1.4rem; border-color: var(--rg-tint); background: var(--rg-tint); }
.rg-help > * + * { margin-top: 0; }
.rg-help a { color: var(--blue); font-weight: 700; }

/* Artikelkarten (Übersicht und Weiterlesen): <li class="rg-card rg-koralle"><a class="card">..</a></li> */
.rg-cards { display: grid; gap: 1.5rem; }
.rg-card > .card { display: flex; flex-direction: column; height: 100%; padding: .75rem .75rem 1.4rem; }
.rg-card > .card:hover { border-color: var(--rg-c); }
.rg-card > .card:hover h3 { color: var(--blue); }
@media (prefers-reduced-motion: no-preference) {
  .rg-card > .card { transition: transform .15s ease, border-color .15s ease; }
  .rg-card > .card:hover { transform: translateY(-3px); }
}
.rg-card-fig { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--rg-tint); }
.rg-card-fig .blob { inset: 12% 14% 8%; background: color-mix(in srgb, var(--rg-c) 45%, #fff); }
.rg-card-fig img { width: 88%; height: 88%; object-fit: contain; }
.rg-card-body { display: flex; flex: 1; flex-direction: column; gap: .6rem; padding: .4rem .6rem 0; }
.rg-card h3 { font-size: 1.3rem; line-height: 1.2; }
.rg-card-teaser { font-size: .96875rem; line-height: 1.5; color: var(--muted); }
.rg-card-meta { display: flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .3rem; font-size: .875rem; font-weight: 600; color: var(--muted); }
.rg-card-meta::before { width: 20px; height: 20px; }

/* Übersicht: erste Karte groß und quer */
@media (min-width: 40rem) {
  .rg-index .rg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rg-index .rg-card:first-child { grid-column: 1 / -1; }
  .rg-index .rg-card:first-child .card { flex-direction: row; padding-bottom: .75rem; }
  .rg-index .rg-card:first-child .rg-card-fig { flex: 0 0 54%; aspect-ratio: 4 / 3; }
  .rg-index .rg-card:first-child .rg-card-body { justify-content: center; margin: 0; padding: 1rem 1.25rem 1rem 1.75rem; }
  .rg-index .rg-card:first-child h3 { font-size: clamp(1.4rem, .9rem + 1.3vw, 1.9rem); }
  .rg-index .rg-card:first-child .rg-card-meta { margin-top: .4rem; }
}
@media (min-width: 64rem) {
  .rg-index .rg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .rg-index .rg-card:first-child { grid-column: span 2; }
}

/* Weiterlesen: kompakt, unter 64rem als Zeilen */
.rg-more .rg-cards { gap: 1rem; }
.rg-more .rg-card-teaser { display: none; }
.rg-more .rg-card h3 { font-size: 1.125rem; }
@media (max-width: 63.99rem) {
  .rg-more .rg-card > .card { flex-direction: row; align-items: center; padding: .6rem; }
  .rg-more .rg-card-fig { flex: 0 0 7rem; }
  .rg-more .rg-card-body { gap: .4rem; margin: 0; padding: .35rem .9rem; }
}
@media (min-width: 40rem) and (max-width: 63.99rem) { .rg-more .rg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .rg-more .rg-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }
