/* ════════════════════════════════════════════════════════════════
   ratgeber.css — Ratgeber-Übersicht und Artikel (26.11.2026)
   Baut auf seo_seite.css (.sl-*) und vorlagen.css (Filter, Suche) auf.
   Flach, ohne Verläufe; Farben wie Startseite und Vorlagen.
   ════════════════════════════════════════════════════════════════ */

/* ── Karten ───────────────────────────────────────────────────────── */
.rg-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.sl a.rg-karte, .rg-karte {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(29, 29, 31, 0.07);
    border-radius: 22px;
    overflow: hidden;
    color: #1d1d1f;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(40, 40, 80, 0.04), 0 14px 40px rgba(60, 60, 110, 0.07);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rg-karte[hidden], .rg-gruppe[hidden] { display: none !important; }
.rg-karte:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(40, 40, 80, 0.05), 0 22px 56px rgba(60, 60, 110, 0.12); }
.rg-karte:focus-visible { outline: 2px solid #5b54a8; outline-offset: 3px; }
.rg-karte-bild { display: block; aspect-ratio: 16 / 10; background: #efedf7; overflow: hidden; }
.rg-karte-bild img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.rg-karte:hover .rg-karte-bild img { transform: scale(1.03); }
.rg-karte-platzhalter { display: block; width: 100%; height: 100%; background: #e9e6f5; }
.rg-karte-text { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px 20px; flex: 1 1 auto; }
.rg-karte-kat { font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(29, 29, 31, 0.62); }   /* wie .vl-karte-kat, Kontrast 4,7:1 */
.rg-karte-titel { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.25; color: #1d1d1f; }
.rg-karte-kurz { font-size: 14px; line-height: 1.55; color: rgba(29, 29, 31, 0.68); }
.rg-karte-meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 600; color: rgba(29, 29, 31, 0.5); }

/* ── Übersicht: Kopfbild als gestapelte Karten ────────────────────── */
.rg-stapel { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 0.9; margin-left: auto; }
.rg-stapel-karte {
    position: absolute;
    width: 74%;
    padding: 10px 10px 12px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(29, 29, 31, 0.06);
    box-shadow: 0 24px 60px rgba(60, 60, 110, 0.16);
}
.rg-stapel-karte img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.rg-stapel-karte span { display: block; margin: 9px 4px 0; font-size: 13.5px; font-weight: 800; letter-spacing: -0.2px; line-height: 1.3; color: #1d1d1f; }
.rg-stapel-1 { top: 0; left: 0; transform: rotate(-4deg); }
.rg-stapel-2 { top: 24%; right: 0; transform: rotate(3deg); z-index: 2; }
.rg-stapel-3 { bottom: 0; left: 10%; transform: rotate(-1.5deg); z-index: 3; }
/* Nur die vordere Karte zeigt ihren Titel — von den hinteren schauten
   Bruchstücke („PE… Sch…") zwischen den Karten hervor. Höhe bleibt. */
.rg-stapel-1 span, .rg-stapel-2 span { visibility: hidden; }
.rg-suche { margin-top: 22px; }
.rg-alle { margin: 22px 0 0; font-weight: 700; }

/* ── Artikel: Kopf ────────────────────────────────────────────────── */
/* Lange Wörter („Planungsfehlschluss:") ragten auf dem Handy über den
   Rand, wo der Browser keine deutsche Silbentrennung kennt */
.sl-hero h1, .rg-artikel > h2, .rg-artikel > h3, .rg-karte-titel { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
/* Artikel-Überschriften sind länger als die Schlagzeilen der übrigen Seiten
   (Ø 65, max. 82 Zeichen) — in Landing-Größe wurden es fünf Zeilen.
   Nur Artikel (Kategorie-Chip im Kopf), nicht die Ratgeber-Übersicht. */
.sl-hero:has(.rg-hero-kat) h1 { font-size: clamp(30px, 3.1vw, 44px); letter-spacing: -1.2px; line-height: 1.08; }
.rg-hero-kat { margin: 0 0 14px; }
.rg-hero-kat a {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(29, 29, 31, 0.1);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #4f4a8c !important;
    text-decoration: none;
}
.rg-hero-meta { margin: 14px 0 0; font-size: 13.5px; font-weight: 600; color: rgba(29, 29, 31, 0.52); }
.rg-hero-foto {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    padding: 10px;
    box-shadow: 0 30px 70px rgba(60, 60, 110, 0.16);
}
.rg-hero-foto img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }

/* ── Artikel: Aufbau mit Inhaltsverzeichnis ──────────────────────── */
.rg-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
    padding-top: clamp(36px, 5vw, 64px);
}
.rg-layout-ohne-inhalt { grid-template-columns: minmax(0, 1fr); }
.rg-inhalt {
    position: sticky;
    top: 24px;
    padding: 18px 18px 14px;
    border-radius: 18px;
    background: #f6f5fb;
    border: 1px solid rgba(29, 29, 31, 0.06);
    max-height: calc(100vh - 48px);
    overflow: auto;
}
.rg-inhalt strong { display: block; margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(29, 29, 31, 0.5); }
.rg-inhalt ol { list-style: none; margin: 0; padding: 0; counter-reset: rg-i; }
.rg-inhalt li { counter-increment: rg-i; }
.rg-inhalt a {
    display: flex;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(29, 29, 31, 0.72) !important;
    text-decoration: none;
}
.rg-inhalt a::before { content: counter(rg-i); flex: 0 0 18px; font-weight: 800; color: #8a84c8; }
.rg-inhalt a:hover { color: #1d1d1f !important; background: rgba(184, 176, 244, 0.18); }

/* ── Artikel: Fließtext ───────────────────────────────────────────────
   Fließtext sind nur die DIREKTEN Kinder von .rg-artikel (Absätze,
   Listen, Zwischenüberschriften). Rechner, Vorlagen-Karten, Kästen und
   Quellen stecken auch im <article> — allgemeine Regeln wie
   „.rg-artikel li::before" setzten dort z. B. lila Punkte über die
   Ergebnisliste des PERT-Rechners (27.11.2026). Deshalb überall „>". */
.rg-artikel { max-width: 760px; font-size: 17.5px; line-height: 1.72; color: rgba(29, 29, 31, 0.8); overflow-wrap: break-word; }   /* lange Dateinamen/Wörter brechen statt hinauszuragen */
.rg-artikel > :first-child { margin-top: 0; }
.rg-artikel > p { margin: 0 0 18px; }
.rg-artikel > p strong, .rg-artikel > ul strong, .rg-artikel > ol strong,
.rg-tabelle strong, .rg-kasten p strong { color: #1d1d1f; }
.rg-artikel > h2 {
    margin: 52px 0 16px;
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 800;
    letter-spacing: -0.9px;
    line-height: 1.15;
    color: #1d1d1f;
    scroll-margin-top: 24px;
    text-wrap: balance;
}
.rg-artikel > h3 { margin: 32px 0 10px; font-size: 21px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.3; color: #1d1d1f; }
.rg-artikel > ul, .rg-artikel > ol { margin: 0 0 20px; padding-left: 0; list-style: none; }
.rg-artikel > ul > li, .rg-artikel > ol > li { position: relative; margin: 0 0 9px; padding-left: 30px; }
.rg-artikel > ul > li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0.68em;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: #b8b0f4;
}
.rg-artikel > ol { counter-reset: rg-ol; }
.rg-artikel > ol > li { counter-increment: rg-ol; }
.rg-artikel > ol > li::before {
    content: counter(rg-ol);
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #ece9fb;
    color: #4f4a8c;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}
.rg-artikel > p a, .rg-artikel > ul a, .rg-artikel > ol a,
.rg-tabelle a, .rg-kasten a, .rg-quellen a { color: #4f4a8c; font-weight: 600; }

/* Tabellen */
.rg-tabelle { margin: 6px 0 26px; overflow-x: auto; border-radius: 16px; border: 1px solid rgba(29, 29, 31, 0.09); -webkit-overflow-scrolling: touch; }
.rg-tabelle table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.rg-tabelle th, .rg-tabelle td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(29, 29, 31, 0.07); }
.rg-tabelle thead th { background: #f6f5fb; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: #1d1d1f; }
.rg-tabelle tbody th { font-weight: 700; color: #1d1d1f; min-width: 110px; }
.rg-tabelle tbody tr:last-child th, .rg-tabelle tbody tr:last-child td { border-bottom: 0; }

/* Hinweiskästen */
.rg-kasten { margin: 8px 0 26px; padding: 18px 20px; border-radius: 16px; background: #f6f5fb; border-left: 4px solid #b8b0f4; }
.rg-kasten p { margin: 0; font-size: 16px; line-height: 1.65; }
.rg-kasten-titel { display: block; margin-bottom: 4px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #4f4a8c; }
.rg-kasten-tipp { background: #f0f8f2; border-left-color: #8fcfa4; }
.rg-kasten-tipp .rg-kasten-titel { color: #2d6a45; }
.rg-kasten-achtung, .rg-kasten-wichtig { background: #fdf3ee; border-left-color: #f0a987; }
.rg-kasten-achtung .rg-kasten-titel, .rg-kasten-wichtig .rg-kasten-titel { color: #9a4a26; }
.rg-kasten-beispiel { background: #f2f6fc; border-left-color: #a8c8e8; }
.rg-kasten-beispiel .rg-kasten-titel { color: #2f5a86; }

/* Handlungsaufforderung im Text */
.rg-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    margin: 30px 0 34px;
    padding: 22px 24px;
    border-radius: 20px;
    background: #161C24;
    color: rgba(232, 234, 240, 0.8);
}
.rg-cta p { flex: 1 1 100%; margin: 0 0 4px; font-size: 17px; font-weight: 700; color: #fff; }
.rg-cta .sl-knopf { margin: 0; }
.rg-cta .sl-knopf-still { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.28); }

.rg-h2-klein { margin: 44px 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -0.4px; color: #1d1d1f; }
/* 250px: im 760px breiten Artikel zwei Karten je Reihe — bei drei
   schmalen (220px) passte „PROJEKTMANAGEMENT" neben „Kostenlos" nicht */
.rg-vorlagen .vl-raster { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.rg-quellen ul { margin: 0; padding: 0; list-style: none; }
.rg-quellen li { position: relative; margin: 0 0 8px; padding-left: 22px; font-size: 15px; line-height: 1.55; }
.rg-quellen li::before { content: ''; position: absolute; left: 4px; top: 0.6em; width: 7px; height: 7px; border-radius: 3px; background: #b8b0f4; }
/* doppelte Klasse: schlägt „.rg-artikel > p" (sonst fehlt der Abstand nach oben) */
.rg-artikel > .rg-redaktion { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid rgba(29, 29, 31, 0.09); font-size: 13.5px; font-weight: 600; color: rgba(29, 29, 31, 0.5); }

/* ── Rechner ──────────────────────────────────────────────────────── */
.rg-rechner {
    margin: 12px 0 32px;
    padding: clamp(18px, 2.4vw, 28px);
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(29, 29, 31, 0.09);
    box-shadow: 0 1px 2px rgba(40, 40, 80, 0.04), 0 18px 50px rgba(60, 60, 110, 0.09);
    font-size: 15.5px;
    line-height: 1.5;
}
.rr-titel { margin: 0 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -0.3px; color: #1d1d1f; }
.rr-unter { margin: 0 0 18px; font-size: 14px; color: rgba(29, 29, 31, 0.6); }
.rr-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rr-feld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: rgba(29, 29, 31, 0.7); }
.rr-feld input, .rr-feld select {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(29, 29, 31, 0.15);
    background: #fbfbfd;
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: #1d1d1f;
}
.rr-feld input:focus, .rr-feld select:focus { outline: none; border-color: #8a84c8; background: #fff; box-shadow: 0 0 0 4px rgba(184, 176, 244, 0.3); }
.rr-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; font-weight: 600; color: rgba(29, 29, 31, 0.75); }
.rr-zeilen { display: flex; flex-direction: column; gap: 10px; }
.rr-zeile { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) 36px; gap: 8px; align-items: end; }
.rr-zeile .rr-feld span { white-space: nowrap; }
.rr-weg {
    width: 36px; height: 44px; border: 0; border-radius: 10px;
    background: #f3f2f8; color: rgba(29, 29, 31, 0.55); font-size: 20px; line-height: 1; cursor: pointer;
}
.rr-weg:hover { background: #fde8e4; color: #b8402a; }
.rr-knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rr-knopf {
    height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(29, 29, 31, 0.15);
    background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: #1d1d1f; cursor: pointer;
}
.rr-knopf:hover { border-color: #8a84c8; }
.rr-ergebnis {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 16px;
    background: #f6f5fb;
    border: 1px solid rgba(29, 29, 31, 0.06);
}
.rr-gross { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 900; letter-spacing: -1px; line-height: 1.1; color: #1d1d1f; }
.rr-werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.rr-wert { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid rgba(29, 29, 31, 0.06); }
.rr-wert span { display: block; font-size: 12px; font-weight: 700; color: rgba(29, 29, 31, 0.55); }
.rr-wert strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 800; color: #1d1d1f; }
.rr-hinweis { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: rgba(29, 29, 31, 0.58); }
.rr-fehler { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: #b8402a; }
.rr-liste { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14px; }
.rr-liste li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(29, 29, 31, 0.06); }
.rr-liste li:last-child { border-bottom: 0; }

/* ── Mobil ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .rg-layout { grid-template-columns: minmax(0, 1fr); }
    .rg-inhalt { position: static; max-height: none; }
    .rg-stapel { max-width: 380px; margin: 0 auto; }
    .rg-hero-foto { margin: 0 auto; }
}
@media (max-width: 600px) {
    .rg-raster { grid-template-columns: 1fr; }
    .rg-artikel { font-size: 16.5px; }
    .rg-artikel > h2 { margin-top: 40px; }
    /* Handy: × neben „Aufgabe" statt eigener Spalte — sonst sind die drei
       Zahlenfelder nur ~74px breit und „Pessimistisch" ragt ins Nachbarfeld */
    .rr-zeile { position: relative; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rr-zeile .rr-feld-name { grid-column: 1 / -1; }
    .rr-zeile .rr-feld span { overflow: hidden; text-overflow: ellipsis; }
    .rr-weg { position: absolute; top: -5px; right: 0; width: 30px; height: 26px; font-size: 18px; }
    /* feine Linie zwischen den Aufgaben, damit klar ist, welche Zahlen wozu gehören */
    .rr-zeile + .rr-zeile { padding-top: 12px; border-top: 1px solid rgba(29, 29, 31, 0.08); }
    .rr-zeile + .rr-zeile .rr-weg { top: 7px; }
    /* Kennzahlen zu zweit statt einzeln untereinander (halbe Höhe) */
    .rr-werte { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rr-wert { padding: 10px 12px; }
    .rr-wert strong { font-size: 16px; }
    .rg-cta { padding: 20px; }
}
