/* ratgeber.css – Regeln für ratgeber.html und die sechs Stilseiten (ratgeber-*.html).
   Lädt NACH entwurf.css. Nur Variablen des Systems (Farben, Abstände, Schriftgrößen), keine festen Farbwerte.
   Die Stilseiten sind Lesestrecken: Ihre Abschnitte wachsen mit dem Text, statt genau einen
   Bildschirm hoch zu sein (bewusste Abweichung vom Kit, der vollständige Text geht vor). */

/* 1. Abschnittshöhen: Kopf mindestens ein Bildschirm, alle anderen so hoch wie ihr Inhalt */
main > .section.rat-kopf { height: auto; min-height: 100vh; min-height: 100svh; }
main > .section.rat-lang { height: auto; min-height: 0; }
main > .section.rat-kopf > .wrap, main > .section.rat-lang > .wrap { height: auto; flex: none; }

/* 2. Kopf: links Rücklink, Überschrift und Epoche, rechts die Einleitung in Lesebreite */
.rat-kopf__titel { display: grid; gap: var(--s-4); align-content: start; }
.rat-kopf h1 { overflow-wrap: break-word; }
@media (min-width: 1024px) { .rat-kopf h1 { font-size: var(--ly-h1-col, var(--t-h1)); } }
.rat-kopf__unter { font-size: var(--t-lead); line-height: 1.4; font-weight: 500; max-width: 24ch; }
@media (max-width: 1023px) { .rat-kopf .grid { row-gap: var(--s-7); } }

/* 3. Rücklink („Alle Stile"): Pfeil nach links, 44 px Klickhöhe */
.rat-zurueck { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; justify-self: start; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 4px; }
.rat-zurueck::before { content: "\2190"; display: inline-block; text-decoration: none; }
.rat-zurueck:hover { text-decoration-color: currentColor; }

/* 4. Lesetext: eine Spalte, höchstens 68 Zeichen breit, 18 px, weiter Zeilenabstand */
.rat-text { display: grid; gap: var(--s-4); align-content: start; max-width: 68ch; font-size: var(--t-body); line-height: 1.7; }
.rat-text > p { max-width: none; }
.rat-text > .t-lead { line-height: 1.5; }
.rat-text > h3 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
.rat-text > .link { justify-self: start; min-height: 44px; }
.rat-text > .t-label { margin-bottom: calc(-1 * var(--s-2)); }

/* 5. Sprungmarken im Kopf („Auf dieser Seite") */
.rat-inhalt { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin: 0; padding: 0; list-style: none; }
.rat-inhalt a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 4px; }
.rat-inhalt a:hover { text-decoration-color: currentColor; }
.rat-auf-seite { display: grid; gap: var(--s-1); margin-top: var(--s-4); }

/* 6. Zeile aus Überschrift (links) und Inhalt (rechts, ab der Mittellinie); darunter gestapelt */
.rat-zeile { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-5); align-items: start;
  scroll-margin-top: calc(var(--nav) + var(--s-5)); }
.rat-zeile > :is(h2, h3) { grid-column: 1 / span 5; }
.rat-zeile > :not(h2, h3) { grid-column: 7 / -1; }
@media (max-width: 1023px) {
  .rat-zeile > :is(h2, h3), .rat-zeile > :not(h2, h3) { grid-column: 1 / -1; }
  .rat-zeile { row-gap: var(--s-4); }
}

/* 7. Der Artikel: Kapitel untereinander, durch Raum getrennt; Kapitelüberschriften kleiner als Abschnittsüberschriften */
.rat-artikel { display: grid; row-gap: var(--s-9); }
.rat-artikel > .rat-zeile > h2 { font-size: var(--t-h3); line-height: 1.25; max-width: 22ch; }
@media (max-width: 1023px) { .rat-artikel { row-gap: var(--s-8); } }

/* 8. Aufzählung der Merkmale: kurzer Strich vor jeder Zeile */
.rat-liste { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.rat-liste > li { position: relative; padding-left: var(--s-6); }
.rat-liste > li::before { content: ""; position: absolute; left: 0; top: 0.85em; width: var(--s-4); height: 1px; background: currentColor; }

/* 9. Raumhöhen: Höhe links, Empfehlung rechts; am Handy untereinander */
.rat-hoehen { margin: var(--s-2) 0; padding: 0; list-style: none; }
@media (min-width: 640px) {
  .rat-hoehen > li { grid-template-columns: minmax(0, 12em) minmax(0, 1fr); align-items: baseline; }
  .rat-hoehen > li > p { grid-column: 2; }
}
.rat-hoehen .rows__name { font-variant-numeric: tabular-nums; }

/* 10. Übersicht: die sechs Stile als große Einstiege, die ganze Zeile ist der Verweis */
.rat-stile { margin: 0; padding: 0; list-style: none; }
.rat-stile > li { border-bottom: 1px solid var(--line); }
.rat-stil { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-4); align-items: start;
  padding-block: var(--s-6); color: inherit; text-decoration: none; }
.rat-stile > li:first-child > .rat-stil { padding-top: 0; }
.rat-stil__kopf { grid-column: 1 / span 5; display: grid; gap: var(--s-2); }
.rat-stil__kopf > h3 { font-size: var(--t-h2); line-height: 1.1; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.rat-stil:hover .rat-stil__kopf > h3 { text-decoration-color: currentColor; }
.rat-stil__zeit { font-variant-numeric: tabular-nums; }
.rat-stil__text { grid-column: 7 / -1; display: grid; gap: var(--s-3); max-width: 68ch; font-size: var(--t-body); line-height: 1.7; }
.rat-stil__text > .link { justify-self: start; min-height: 44px; }
@media (hover: hover) and (pointer: fine) { .rat-stil:hover .link::after { transform: translateX(3px); } }
.rat-stil:focus-visible { outline-offset: 4px; }
@media (max-width: 1023px) {
  .rat-stil__kopf, .rat-stil__text { grid-column: 1 / -1; }
  .rat-stil { padding-block: var(--s-6); row-gap: var(--s-3); }
}

/* 11. Produkte aus dem Katalog (vom Skript der Seite gefüllt; ohne Daten bleibt die Reihe verborgen) */
.rat-produkte { margin-bottom: var(--s-8); }
.rat-produkte[hidden] { display: none; }
.rat-produkte .tile__media > img { mix-blend-mode: multiply; }
.rat-produkte .tile__facts { margin-top: calc(-1 * var(--s-3)); }

/* 12. Verweise am Ende einer Stilseite: „Alle Stile" links, „Nächster Stil" rechts */
.rat-weiter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-6); margin-top: var(--s-5); }
.rat-weiter > .link { min-height: 44px; }
.rat-verweise { display: flex; flex-wrap: wrap; gap: 0 var(--s-6); }
.rat-verweise > .link { min-height: 44px; }
.rat-block { display: grid; gap: var(--s-5); align-content: start; }

/* 13. Verwandte Stile am Handy: Zeitraum unter dem Namen, die Zeile darunter über die ganze Breite */
@media (max-width: 639px) {
  .rat-verwandt > li { grid-template-columns: minmax(0, 1fr); }
  .rat-verwandt .rows__value { grid-column: 1; grid-row: auto; text-align: left; max-width: none; white-space: nowrap; color: var(--muted); }
}
