/* ---------------------------------------------------------------------------
 * Aussehen der Anleitungen unter /anleitungen/ (statisch, ohne Build).
 * Farben sind die Tokens aus src/index.css, hier als Hex.
 * Dieselbe Datei erzeugt per scripts/guide-pdf.mjs auch die PDF-Fassung,
 * deshalb gibt es unten einen eigenen Druckteil.
 * ------------------------------------------------------------------------- */

:root {
    --midnight-900: #0c1e2e;
    --midnight-800: #152736;
    --ink-900: #161e27;
    --ink-700: #2c3744;
    --ink-500: #6b7785;
    --ink-200: #d6dde6;
    --ink-100: #ebf0f5;
    --amber-600: #e8993a;
    --amber-50: #fef4e3;
    --sky-600: #1f7fb4;
    --sky-50: #e5f3fb;
    --coral-600: #c8364e;
    --coral-50: #fdeef1;
    --green-600: #1f8a5f;
    --green-50: #e8f6f0;
    --surface: #f7f9fc;

    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(20, 35, 55, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-700);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--sky-600); }
b, strong { color: var(--ink-900); }

/* ------------------------------ Kopfzeile ------------------------------- */

.topbar {
    background: var(--midnight-800);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    text-decoration: none;
}
.topbar-brand span { color: var(--amber-600); }
.topbar-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar-nav a {
    color: #c9d5e2;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 999px;
}
.topbar-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.topbar-nav a.current { color: #fff; background: rgba(255, 255, 255, 0.14); }

/* -------------------------------- Kopf ---------------------------------- */

.hero {
    background: linear-gradient(160deg, var(--midnight-900), var(--midnight-800));
    color: #fff;
    padding: 48px 20px 56px;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.eyebrow {
    color: var(--amber-600);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 14px;
}
.hero p { color: #d3dde8; font-size: clamp(17px, 2.2vw, 19px); max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}
.btn-primary { background: var(--amber-600); color: var(--midnight-900); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.hero-meta { margin-top: 20px; font-size: 13px; color: #93a6ba; }

/* ------------------------------- Aufbau --------------------------------- */

.layout {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.toc { position: sticky; top: 16px; font-size: 14px; }
.toc h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-500);
    margin-bottom: 8px;
}
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--ink-700);
    text-decoration: none;
}
.toc a:hover { background: var(--ink-100); }

main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

section {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
section > * + * { margin-top: 14px; }
section h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 26px);
    color: var(--ink-900);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 12px;
}
section h3 { font-size: 17px; color: var(--ink-900); margin-top: 22px; }
.num {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--amber-50);
    color: var(--amber-600);
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
ul.plain { padding-left: 20px; }
ul.plain li + li { margin-top: 6px; }

/* Wo klicken: Einstellungen › Zahlarten & Anbieter */
.path {
    display: inline;
    background: var(--ink-100);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 15px;
    color: var(--ink-900);
    font-weight: 600;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.path i { font-style: normal; color: var(--ink-500); margin: 0 4px; font-weight: 400; }
.ui { font-weight: 600; color: var(--ink-900); white-space: nowrap; }

/* ------------------------------ Schritte -------------------------------- */

ol.steps { list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
ol.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 46px;
    min-height: 32px;
}
ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--midnight-800);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Übersicht in Karten */
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.card {
    border: 1px solid var(--ink-100);
    border-radius: 12px;
    padding: 16px;
    background: var(--surface);
}
.card .card-num {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--amber-600);
    font-size: 22px;
}
.card h3 { margin: 4px 0 4px; font-size: 16px; }
.card p { font-size: 15px; }

/* Hinweise */
.tip, .warn {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    border-left: 4px solid;
}
.tip { background: var(--sky-50); border-color: var(--sky-600); }
.warn { background: var(--amber-50); border-color: var(--amber-600); }
.tip b:first-child, .warn b:first-child { display: block; margin-bottom: 2px; }

/* Status als Liste statt Tabelle – lesbar auch auf dem Handy */
.states { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.states li {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 4px 14px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--ink-100);
}
.states li:last-child { border-bottom: 0; }
.badge {
    display: inline-block;
    justify-self: start;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    background: var(--ink-100);
    color: var(--ink-900);
    white-space: nowrap;
}
.badge.ok { background: var(--green-50); color: var(--green-600); }
.badge.wait { background: var(--amber-50); color: #9a5b10; }
.badge.bad { background: var(--coral-50); color: var(--coral-600); }

/* Fragen */
.faq { display: flex; flex-direction: column; gap: 16px; }
.faq h3 { margin-top: 0; }
.faq p { margin-top: 4px; }

/* -------------------------------- Fuß ----------------------------------- */

.docfoot { background: var(--midnight-900); color: #93a6ba; font-size: 14px; padding: 32px 20px; }
.docfoot .inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.docfoot b { color: #fff; }
.docfoot a { color: #c9d5e2; }

/* ----------------------------- Schmal ----------------------------------- */

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
    .toc { position: static; }
    .toc ol { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .toc a { background: #fff; border: 1px solid var(--ink-200); border-radius: 999px; padding: 5px 12px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .hero { padding: 32px 16px 40px; }
    .layout { padding: 16px 12px 48px; }
    section { padding: 20px 16px; border-radius: 12px; }
    .states li { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
    .ui { white-space: normal; }
}

/* ------------------------------ Druck/PDF ------------------------------- */

@page { size: A4; margin: 16mm 15mm 18mm; }

@media print {
    body { background: #fff; font-size: 11pt; }
    .topbar, .toc, .hero-actions { display: none; }
    .hero {
        background: none;
        color: var(--ink-900);
        padding: 0 0 12pt;
        border-bottom: 2pt solid var(--amber-600);
        margin-bottom: 14pt;
    }
    .hero h1 { color: var(--ink-900); font-size: 24pt; }
    .hero p { color: var(--ink-700); font-size: 12pt; max-width: none; }
    .hero-meta { color: var(--ink-500); }
    .layout { display: block; padding: 0; max-width: none; }
    main { display: block; }
    section {
        border: 0;
        box-shadow: none;
        padding: 0;
        margin-bottom: 16pt;
    }
    section h2 { font-size: 16pt; break-after: avoid; }
    section h3 { break-after: avoid; }
    ol.steps > li, .tip, .warn, .card, .states li, .faq > div { break-inside: avoid; }
    a { color: var(--ink-900); text-decoration: none; }
    .docfoot { background: none; color: var(--ink-500); padding: 12pt 0 0; border-top: 1px solid var(--ink-200); font-size: 9pt; }
    .docfoot b { color: var(--ink-900); }
    .docfoot a { color: var(--ink-500); }
    .docfoot .no-print { display: none; }
}
