/* Farben kommen je Domain aus config/sites.py (base.html setzt --primary, --accent, --surface). */
:root {
    --primary: #14532d;
    --accent: #ea580c;
    --surface: #f6f7f2;
    --text: #1c1f23;
    --muted: #5f6772;
    --line: #dfe3e8;
    --good: #15803d;
    --good-bg: #e8f6ec;
    --bad: #b91c1c;
    --bad-bg: #fdecec;
    --radius: 12px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
}

a { color: var(--primary); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h2 { font-size: 1.3rem; margin-top: 2em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.block { padding-top: 36px; padding-bottom: 36px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .92rem; }
.lead { font-size: 1.12rem; color: #3b424b; }
.eyebrow { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }
.good { color: var(--good); }
.bad { color: var(--bad); }

/* Kopf und Fuß */
.site-header { background: var(--primary); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: .97rem; }
.nav a:hover { background: rgba(255, 255, 255, .14); }
.nav .nav-cta { background: var(--accent); font-weight: 600; }
.nav .nav-cta:hover { background: var(--accent); filter: brightness(1.08); }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0; margin-top: 40px; font-size: .92rem; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 1em; }

/* Startseite */
.hero { background: var(--surface); padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 780px; }
.hero .lead { max-width: 700px; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: .95rem; }
.facts strong { color: var(--primary); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; align-items: center; }
.actions.center { justify-content: center; }
.actions form { margin: 0; }

.btn { display: inline-block; border: 2px solid transparent; border-radius: 10px; padding: 11px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--surface); }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--primary); text-decoration: underline; cursor: pointer; }

.tiles { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tiles a { display: flex; flex-direction: column; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); background: #fff; }
.tiles a:hover { border-color: var(--primary); }
.tiles small { color: var(--muted); }

.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .6em; }

.faq { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .7em 0 0; }

/* Fragenlisten */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1.2em; }
.crumbs span { margin: 0 .25em; }
.qlist { list-style: none; padding: 0; margin: 0 0 1.5em; }
.qlist li { border-bottom: 1px solid var(--line); }
.qlist a { display: flex; gap: 12px; align-items: baseline; padding: 10px 2px; text-decoration: none; color: var(--text); }
.qlist a:hover { color: var(--primary); }
.qnr { flex: none; min-width: 2.6em; text-align: center; font-size: .85rem; font-weight: 700; color: var(--primary); background: var(--surface); border-radius: 6px; padding: 1px 6px; margin-right: 4px; }
.qnr.good { color: var(--good); background: var(--good-bg); }
.qnr.bad { color: var(--bad); background: var(--bad-bg); }
.more { font-weight: 600; }

/* Frage und Antworten */
.question { font-size: clamp(1.35rem, 4vw, 1.8rem); }
.hint { color: var(--muted); font-size: .95rem; }
.answers { list-style: none; padding: 0; margin: 0 0 1.2em; }
.answers li { margin-bottom: 10px; }
.answer { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
label.answer { cursor: pointer; }
label.answer:hover { border-color: #b8c0ca; }
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer .key { flex: none; width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-weight: 700; font-size: .9rem; }
.answer small { margin-left: auto; flex: none; font-size: .8rem; font-weight: 600; padding-left: 8px; }
label.answer:has(input:checked) { border-color: var(--primary); background: var(--surface); }
label.answer:has(input:checked) .key { background: var(--primary); color: #fff; }
label.answer:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.answer.is-correct { border-color: var(--good); background: var(--good-bg); }
.answer.is-correct .key { background: var(--good); color: #fff; }
.answer.is-correct small { color: var(--good); }
.answer.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.answer.is-wrong .key { background: var(--bad); color: #fff; }
.answer.is-wrong small { color: var(--bad); }
.answers.compact .answer { padding: 8px 12px; font-size: .95rem; border-width: 1px; }

.verdict { font-weight: 700; font-size: 1.1rem; margin: 1em 0; }
.verdict.good { color: var(--good); }
.verdict.bad { color: var(--bad); }

.solution { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 24px 0; background: var(--surface); }
.solution summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.solution h2 { font-size: 1.05rem; margin-top: 1em; }

.notice { border-left: 4px solid var(--primary); background: var(--surface); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2em 0; }
.cta-box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; margin: 28px 0; }
.cta-box form { margin: 0; }
.center .cta-box { text-align: left; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin: 24px 0; font-weight: 600; }
.pager a { text-decoration: none; }

/* Trainer */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 12px; }
.stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-align: center; }
.stats strong { display: block; font-size: 1.6rem; color: var(--primary); line-height: 1.2; }
.stats span { font-size: .85rem; color: var(--muted); }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 16px; }
.bar span { display: block; height: 100%; background: var(--good); border-radius: 999px; }
.bar.bar-bad span { background: var(--bad); }
.section-stats { list-style: none; padding: 0; margin: 0; }
.section-stats li { margin-bottom: 14px; }
.section-stats .row { display: flex; justify-content: space-between; gap: 12px; }
.section-stats .bar { margin: 4px 0 2px; }
.section-stats form { margin: 0; }

/* Prüfung */
.rules { padding-left: 1.2em; }
.rules li { margin-bottom: .4em; }
.timer { position: sticky; top: 0; z-index: 5; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 0 0 var(--radius) var(--radius); text-align: center; margin-bottom: 20px; }
.timer.low { background: var(--bad); }
.exam-section { border-bottom: 2px solid var(--primary); padding-bottom: 6px; }
.exam-q { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.exam-q legend { font-weight: 600; font-size: 1.08rem; padding: 0; margin-bottom: 10px; }
.review { border-left: 4px solid var(--line); padding-left: 14px; margin-bottom: 22px; }
.review-good { border-color: var(--good); }
.review-bad { border-color: var(--bad); }
.review-q { font-weight: 600; margin-bottom: 8px; }
.review-q a { color: var(--text); }

/* Freischalten */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 20px 0; }
.offer { border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; }
.offer h2 { margin-top: 0; font-size: 1.1rem; }
.price { font-size: 1.8rem; font-weight: 700; color: var(--primary); margin-bottom: .3em; }
.price small { font-size: .9rem; font-weight: 400; color: var(--muted); }

/* Rechtstexte */
.prose h2 { font-size: 1.2rem; }
.prose h3 { font-size: 1.05rem; margin-top: 1.4em; }

@media (max-width: 560px) {
    body { font-size: 16px; }
    .answer small { display: none; }
    .stats strong { font-size: 1.3rem; }
}
