/* ================================================================
   WISSENSSEITEN: /wissen/ und /wissen/<thema> (02.11.2026, wissen.php)

   Regeln: DESIGN.md, „Die Wissensseiten“. Sie gehören zur öffentlichen Fläche und
   nutzen deren Klassen (fw-, app/landing_faecher.css); hier stehen nur die Teile,
   die es dort nicht gibt: die Lesespalte mit Inhaltsverzeichnis, der Kasten der
   Vorlage, die Tabellen und die Karten der Nabe. Farben ausschließlich über die
   Tokens aus app/style.css. Präfix wi- (Wissen).
   ================================================================ */

/* ── Kopf ──────────────────────────────────────────────── */
.wi-kopf { align-items: start; }
.wi-kopf h1 { max-width: 20ch; }
.wi-stand { margin: 18px 0 0; font-size: 0.9rem; color: var(--text-light); }
.wi-stand a, .wi-stand a:visited { color: var(--primary); font-weight: 600; text-decoration: none; }
.wi-stand a:hover { text-decoration: underline; }

.wi-download {
    display: grid;
    gap: 14px;
    align-self: start;
    padding: 26px 28px;
    border-radius: var(--r-lg);
    background: var(--card);
    box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-light);
}
.wi-download .fw-modul-symbol { margin: 0; }
.wi-seite .wi-download h2 { font-size: 1.3rem; margin: 0; max-width: none; }
.wi-download p { margin: 0; color: var(--text-muted); line-height: 1.55; }
.wi-download .fw-knopf { justify-self: start; }
.wi-download-hinweis { font-size: 0.86rem; color: var(--text-light); }

/* ── Lesespalte und Inhaltsverzeichnis ─────────────────── */
.wi-lesen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
}
.wi-text { max-width: 72ch; }
.wi-inhalt {
    position: sticky;
    top: 24px;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    background: var(--surface-low);
}
.wi-inhalt p { margin: 0 0 10px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-light); }
.wi-inhalt ol { margin: 0; padding: 0 0 0 1.2em; }
.wi-inhalt li { margin: 0 0 8px; font-size: 0.94rem; line-height: 1.4; }
.wi-inhalt a, .wi-inhalt a:visited { color: var(--text-mid); text-decoration: none; }
.wi-inhalt a:hover { color: var(--primary); text-decoration: underline; }

.wi-seite .wi-text h2 {
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    max-width: none;
    margin: clamp(40px, 5vw, 56px) 0 14px;
    scroll-margin-top: 24px;
}
.wi-seite .wi-text h2:first-child { margin-top: 0; }
.wi-text p, .wi-text li { font-size: 1.04rem; line-height: 1.7; color: var(--text-mid); }
.wi-text p { margin: 0 0 18px; }
.wi-text ul, .wi-text ol { margin: 0 0 20px; padding-left: 1.4em; }
.wi-text li { margin-bottom: 10px; }
.wi-text li::marker { color: var(--primary); font-weight: 700; }
.wi-text strong { color: var(--text); }

/* ── Tabellen ──────────────────────────────────────────── */
.wi-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 22px;
    font-size: 0.95rem;
    line-height: 1.5;
}
.wi-tabelle th, .wi-tabelle td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}
.wi-tabelle th {
    font-family: 'Inter', 'Manrope', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}
.wi-tabelle td { color: var(--text-mid); }

/* ── Die Vorlage als Blatt ─────────────────────────────── */
.wi-vorlage {
    margin: 8px 0 28px;
    padding: clamp(22px, 3vw, 40px);
    background: var(--card);
    border-radius: 6px;
    box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border);
    font-size: 0.95rem;
}
.wi-vorlage-titel { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 6px; color: var(--text); }
.wi-vorlage-kopf { margin: 0 0 20px; font-size: 0.9rem; color: var(--text-light); }
.wi-vorlage-h {
    margin: 22px 0 8px;
    font-family: 'Inter', 'Manrope', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
}
.wi-vorlage p { margin: 0 0 10px; font-size: 0.95rem; line-height: 1.6; }
.wi-vorlage ul, .wi-vorlage ol { margin: 0 0 12px; padding-left: 1.4em; }
.wi-vorlage li { margin-bottom: 4px; font-size: 0.95rem; }
.wi-vorlage-felder { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.wi-vorlage-felder th, .wi-vorlage-felder td { padding: 6px 10px 6px 0; vertical-align: top; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 0.93rem; line-height: 1.5; }
.wi-vorlage-felder th { width: 32%; font-weight: 600; color: var(--text); }
.wi-vorlage-felder td { color: var(--text-mid); }
.wi-vorlage-tabelle { font-size: 0.88rem; }
.wi-vorlage-tabelle th, .wi-vorlage-tabelle td { padding: 7px 8px; }
.wi-platzhalter { color: var(--text-light); font-style: italic; }
.wi-unterschriften { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 36px; }
.wi-unterschrift { flex: 1 1 200px; font-size: 0.86rem; color: var(--text-light); }
.wi-unterschrift-linie { display: block; height: 1px; margin-bottom: 6px; background: var(--text-mid); }

/* ── Das Portal kommt zuletzt ──────────────────────────── */
.wi-portal-innen {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
}
.wi-portal-modul { margin: 0 0 20px; font-size: 0.9rem; color: var(--text-muted); }
.wi-portal-modul b { color: var(--text); }
.wi-portal .fw-fakten li { font-size: 1rem; }

/* ── Verwandte Themen und die Karten der Nabe ──────────── */
.wi-karten {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}
.wi-karte,
.wi-karte:visited {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 22px 20px 18px;
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-light);
    transition: transform 220ms var(--fw-ease), box-shadow 220ms var(--fw-ease);
}
.wi-karte:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--text) 40%, transparent), inset 0 0 0 1px var(--border); }
.wi-karte .fw-modul-symbol { margin: 0; }
/* Größe und Gewicht kommen aus .fw-seite h3 (1,08rem / 700); hier nur Abstand und Zeilenhöhe. */
.wi-seite .wi-karte-titel { margin: 4px 0 0; max-width: none; line-height: 1.3; }
.wi-karte p { flex: 1; margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-muted); }
.wi-karte-weiter { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.92rem; color: var(--primary); }
.wi-karte-weiter .material-symbols-outlined { font-size: 18px; }
.wi-karte-vorlage { font-size: 0.82rem; color: var(--text-light); }

/* ── Umbrüche ──────────────────────────────────────────── */
@media (min-width: 1081px) {
    .wi-lesen { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 1080px) {
    .wi-inhalt { position: static; }
}
@media (max-width: 900px) {
    .wi-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wi-portal-innen { grid-template-columns: 1fr; }
    .wi-kopf h1 { max-width: none; }
}
@media (max-width: 640px) {
    .wi-karten { grid-template-columns: 1fr; }
    .wi-download { padding: 20px; }
    .wi-download .fw-knopf { justify-self: stretch; justify-content: center; }
    .wi-vorlage-felder th { width: 40%; }
    .wi-tabelle, .wi-vorlage-tabelle { display: block; overflow-x: auto; }
}
