/* Kursbutler – Website. Farben und Schrift NUR über Design-Tokens (tokens.css, identisch mit der Erweiterung).
   Weiße Seite, neutrale Grautöne, feine Rahmen. Petrol nur für den Primär-Button und kleine Akzente, Apricot nur für die Plakette „Bester Preis“ (und als accent-text für „GRATIS“). */

/* ---------------------------------------------------------------- Grundlagen */
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--kb-page); color: var(--kb-ink); font: 17px/1.6 var(--kb-font); }
img, svg { display: block; }
a { color: var(--kb-brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--kb-brand-hover); }
:focus-visible { outline: 2px solid var(--kb-brand); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Typografie: groß, eng gesetzt, ruhig */
h1, h2, h3 { color: var(--kb-ink); font-weight: 700; }
h1 { font-size: clamp(2.125rem, 7vw, 4.25rem); line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 20px; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: clamp(1.125rem, 2.2vw, 1.3125rem); line-height: 1.5; color: var(--kb-gray-600); max-width: 40em; }
.muted { color: var(--kb-gray-600); font-size: 15px; }
.fine { font-size: 14px; color: var(--kb-gray-600); }

/* ---------------------------------------------------------------- Kopf */
/* Sticky, weiß, feine Linie unten. Unter 720 px stecken die Ankerlinks hinter dem Menü-Knopf
   (nur wenn site.js läuft: .has-menu; ohne JS bleiben sie als waagrechte Zeile sichtbar). */
.top { position: sticky; top: 0; z-index: 10; background: var(--kb-page); border-bottom: 1px solid var(--kb-gray-200); }
.top .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.top .brand { display: flex; align-items: center; gap: 10px; color: var(--kb-ink); text-decoration: none; margin-right: auto; }
.top .brand img { border-radius: 8px; }
.top .name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.top .anchors { display: flex; gap: 22px; }
.top .anchors a { color: var(--kb-gray-600); text-decoration: none; font-size: 15px; white-space: nowrap; }
.top .anchors a:hover { color: var(--kb-ink); }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--kb-ink); cursor: pointer; }
.menu-btn:hover { background: var(--kb-gray-100); }
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn[hidden], .menu-btn[aria-expanded="true"] .i-open, .menu-btn[aria-expanded="false"] .i-close { display: none; }
@media (min-width: 720px) { .menu-btn { display: none !important; } }
@media (max-width: 719px) {
  .top .wrap { gap: 6px 12px; }
  /* ohne JS: Links als waagrecht scrollbare Zeile unter Marke und „Anmelden“ */
  .top .anchors { order: 3; width: 100%; overflow-x: auto; gap: 18px; padding: 0 0 10px; scrollbar-width: none; }
  .top .anchors::-webkit-scrollbar { display: none; }
  /* mit JS: aufklappbares Menü unter der Kopfzeile */
  .top.has-menu .anchors { display: none; }
  .top.has-menu.open .anchors { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; padding: 8px 20px 16px; background: var(--kb-page); border-bottom: 1px solid var(--kb-gray-200); box-shadow: 0 16px 24px -20px var(--kb-shadow); overflow: visible; }
  .top.has-menu.open .anchors a { display: flex; align-items: center; min-height: 48px; font-size: 17px; color: var(--kb-ink); border-top: 1px solid var(--kb-gray-200); }
  .top.has-menu.open .anchors a:first-child { border-top: 0; }
}

/* Scroll-Fortschritt: 3 px Petrol (--kb-brand) direkt unter der Kopfzeile, nur auf der Startseite.
   Bevorzugt reine CSS-Scroll-Animation; sonst setzt site.js transform: scaleX(). */
.progress { position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 3px; background: var(--kb-brand); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
body:not([data-page="start"]) .progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress { animation: kb-progress linear both; animation-timeline: scroll(root block); }
}
@keyframes kb-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Ankerziele nicht unter der Kopfzeile verstecken (64 px Kopf + Luft) */
main [id] { scroll-margin-top: 80px; }
@media (max-width: 719px) { html:not(.js-menu) main [id] { scroll-margin-top: 120px; } }

/* ---------------------------------------------------------------- Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--kb-brand); background: var(--kb-brand); color: var(--kb-on-brand); border-radius: 10px; padding: 10px 20px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover:not(:disabled) { background: var(--kb-brand-hover); border-color: var(--kb-brand-hover); color: var(--kb-on-brand); }
.btn.sec { background: var(--kb-page); border-color: var(--kb-gray-300); color: var(--kb-ink); }
.btn.sec:hover:not(:disabled) { background: var(--kb-gray-100); border-color: var(--kb-gray-300); color: var(--kb-ink); }
.btn.danger { background: var(--kb-page); border-color: var(--kb-error); color: var(--kb-error); }
.btn.danger:hover:not(:disabled) { background: var(--kb-error-soft); border-color: var(--kb-error); color: var(--kb-error); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 15px; }
.btn:disabled { background: var(--kb-gray-100); border-color: var(--kb-gray-200); color: var(--kb-gray-600); cursor: not-allowed; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Unterseiten (Login, Kaufen, Rechtliches …) */
main { max-width: 880px; margin: 0 auto; padding: 48px 20px 72px; }
main.narrow { max-width: 580px; }
main > h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
main:not(.home) h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin: 32px 0 10px; }
main .card h2 { margin-top: 0; }
.card { background: var(--kb-page); border: 1px solid var(--kb-gray-200); border-radius: 14px; padding: 24px; margin: 16px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid .card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.grid .card .btn { margin-top: auto; }
.grid .card.picked { border-color: var(--kb-brand); }
.price { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
code.ref { font: 600 18px var(--kb-font-mono); letter-spacing: 1px; background: var(--kb-gray-50); border: 1px solid var(--kb-gray-200); border-radius: 8px; padding: 4px 10px; }
ul.check { padding-left: 0; list-style: none; }
ul.check li { padding-left: 26px; position: relative; margin: 6px 0; }
ul.check li::before { content: ""; position: absolute; left: 4px; top: 0.5em; width: 9px; height: 5px; border-left: 2px solid var(--kb-brand); border-bottom: 2px solid var(--kb-brand); transform: rotate(-45deg); }

/* Formulare */
label { display: block; font-weight: 600; font-size: 15px; margin: 12px 0 6px; }
input[type=email], input[type=text], input.code, textarea, input[type=date] { width: 100%; max-width: 380px; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--kb-ink); background: var(--kb-page); border: 1px solid var(--kb-gray-500); border-radius: 10px; }
textarea { max-width: 580px; }
input[type=date] { max-width: 220px; }
input.code { max-width: 180px; letter-spacing: 6px; font-size: 22px; font-variant-numeric: tabular-nums; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--kb-brand); outline-offset: 1px; border-color: var(--kb-brand); }
.cf-turnstile { margin: 14px 0; min-height: 65px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 16px; margin: 10px 0; }
label.check input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--kb-brand); }
.consent { border-color: var(--kb-gray-300); }
fieldset { border: 1px solid var(--kb-gray-200); border-radius: 12px; padding: 8px 16px 12px; margin: 12px 0; }
legend { font-weight: 600; padding: 0 4px; }
dl.summary { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px 16px; margin: 12px 0; }
dl.summary dt { font-weight: 600; }
dl.summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote.statement { margin: 12px 0; padding: 12px 16px; border: 1px solid var(--kb-gray-200); background: var(--kb-gray-50); border-radius: 10px; font-weight: 600; }

/* Hinweise: helle Fläche, 1-px-Rand in Zustandsfarbe, Text in --kb-ink */
.note { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--kb-gray-200); background: var(--kb-gray-50); margin: 14px 0; font-size: 16px; }
.note.info { border-color: var(--kb-gray-300); }
.note.ok { background: var(--kb-success-soft); border-color: var(--kb-success); }
.note.warn { background: var(--kb-warning-soft); border-color: var(--kb-warning); }
.note.err { background: var(--kb-error-soft); border-color: var(--kb-error); }

/* Rechtstexte */
.legal h2 { font-size: 1.25rem; }
.legal p, .legal li { max-width: 72ch; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 20px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--kb-gray-200); min-width: 140px; }
.legal th { font-weight: 600; border-bottom-color: var(--kb-gray-300); }
.todo { background: var(--kb-warning-soft); border: 1px dashed var(--kb-warning); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.legal .todo-box { border: 1px dashed var(--kb-warning); background: var(--kb-warning-soft); border-radius: 10px; padding: 12px 14px; }

/* ---------------------------------------------------------------- Startseite */
main.home { max-width: none; padding: 0; }
.section { padding: 72px 0; border-top: 1px solid var(--kb-gray-200); }
@media (min-width: 768px) { .section { padding: 112px 0; } }
.section-head { max-width: 44em; margin-bottom: 40px; }
.section-head p { color: var(--kb-gray-600); font-size: 18px; }

/* Hero: alles zentriert */
/* Abstände als Variablen: Grundwert × Faktor. Oben (Kopfzeile → Headline) und unten (Knöpfe → Testphasen-Box) je +30 %. */
.hero { --hero-space-top: 56px; --hero-space-bottom: 64px; --hero-space-scale: 1.3; padding: calc(var(--hero-space-top) * var(--hero-space-scale)) 0 calc(var(--hero-space-bottom) * var(--hero-space-scale)); text-align: center; }
@media (min-width: 768px) { .hero { --hero-space-top: 96px; --hero-space-bottom: 104px; } }
.hero-text { width: 100%; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; max-width: 14em; margin: 0 auto 20px; }
/* Vier Vorteile: Icon oben, darunter Label und graue Mini-Zeile. Mobil 2×2 (sehr schmal: untereinander), Desktop 4 nebeneinander */
.benefits { list-style: none; padding: 0; margin: 28px 0 40px; display: grid; gap: 28px; width: 100%; max-width: 60em; }
@media (min-width: 340px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; } }
@media (min-width: 860px) { .benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.benefits li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.benefits svg { width: 28px; height: 28px; color: var(--kb-brand); margin-bottom: 8px; }
.benefits strong { font-size: 17px; line-height: 1.3; font-weight: 600; text-wrap: balance; }
.benefits span { color: var(--kb-gray-600); font-size: 15px; line-height: 1.4; text-wrap: balance; }
/* Knöpfe: mobil untereinander in voller Breite (primär oben), ab Tablet nebeneinander */
.hero .cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 380px; gap: 12px; }
@media (min-width: 600px) { .hero .cta { flex-direction: row; justify-content: center; max-width: none; } }

.prelaunch-section { padding-top: 0; border-top: 0; }

/* Hinweis Testphase */
.prelaunch { background: var(--kb-gray-50); border: 1px solid var(--kb-gray-200); border-radius: 16px; padding: 28px; display: grid; gap: 24px; }
@media (min-width: 860px) { .prelaunch { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 36px 40px; } }
.prelaunch h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.prelaunch p { margin: 0; }
.prelaunch form label { margin-top: 0; }
.prelaunch .field { display: flex; gap: 10px; flex-wrap: wrap; }
.prelaunch .field input { flex: 1 1 220px; max-width: none; }
.prelaunch .cf-turnstile { margin: 10px 0 0; min-height: 0; }
.prelaunch .fine { margin: 12px 0 0; }
.prelaunch .note { margin: 12px 0 0; background: var(--kb-page); }

/* Ablauf */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 40px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps > li { counter-increment: step; border-top: 1px solid var(--kb-ink); padding-top: 20px; }
.steps > li::before { content: counter(step); display: block; font-size: 15px; font-weight: 600; color: var(--kb-brand); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
@media (min-width: 860px) { .steps > li::before { margin-bottom: 28px; } }
.steps p { color: var(--kb-gray-600); margin: 0; }
.stores { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 15px; }
.stores li { display: flex; justify-content: space-between; gap: 12px; color: var(--kb-ink); }
.stores span { color: var(--kb-gray-600); }

/* Datenschutz: vier Kurzfakten. Mobil eine Spalte (Icon links, Text rechts), ab 600 px 2×2 (Titel bleiben einzeilig) */
#privacy-title { margin-bottom: 28px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; max-width: 60em; }
@media (min-width: 600px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; } }
.facts li { display: flex; align-items: flex-start; gap: 12px; }
.facts svg { flex: none; width: 24px; height: 24px; margin-top: 1px; color: var(--kb-brand); }
.facts strong { display: block; font-weight: 600; line-height: 1.35; }
.facts span { display: block; color: var(--kb-gray-600); font-size: 15px; line-height: 1.45; margin-top: 2px; }
.facts-server { margin: 32px 0 0; max-width: 60em; color: var(--kb-gray-600); font-size: 15px; }

/* Preise */
/* Gratis-Box über den Paketen: Radius und Padding der Paketkarten, aber ruhig hervorgehoben (primary-soft, 1 px Rahmen im
   border-Token), damit sie nicht mit der kräftig umrandeten „Bester Preis“-Karte konkurriert. Volle Breite, flach. Kein Button.
   „GRATIS“ nur über die Akzentfarbe hervorgehoben (accent-text, Apricot ist als Text zu hell).
   Ab 720 px: „1 Credit GRATIS“ links, Bedingung rechtsbündig; darunter untereinander und linksbündig. */
.free { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; padding: 28px; border: 1px solid var(--kb-border); border-radius: 16px; background: var(--kb-brand-soft); }
@media (min-width: 720px) { .free { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; } .free-cond { text-align: right; } }
@media (min-width: 860px) { .free { margin-bottom: 20px; } }
.free p { margin: 0; }
.free-head { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 1.25rem; line-height: 1.2; }
.free-head span { font-weight: 600; color: var(--kb-ink); }
.free-head strong { font-weight: 700; color: var(--kb-accent-text); text-transform: uppercase; } /* im HTML „Gratis“: Screenreader lesen das Wort, nicht G-R-A-T-I-S */
.free-cond { color: var(--kb-gray-600); font-size: 15px; line-height: 1.45; }
.packs { display: grid; gap: 16px; }
@media (min-width: 860px) { .packs { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; } }
.pack { border: 1px solid var(--kb-gray-200); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; }
/* Hervorgehoben: Paket mit dem niedrigsten Preis pro Anmeldung („Bester Preis“, siehe bestValuePack) */
.pack.best { border-color: var(--kb-brand); box-shadow: inset 0 0 0 1px var(--kb-brand); }
.pack-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 20px; }
.pack-head h3 { margin: 0; font-weight: 600; font-size: 1rem; }
.badge { background: var(--kb-gold); color: var(--kb-on-gold); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600; }
.pack-price { font-size: clamp(2.5rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.pack-per { font-weight: 600; margin: 0 0 24px; }
/* Was abgebucht wird (kompakt, über den Paketen) */
.pack .btn { margin-top: auto; width: 100%; }
.price-notes { margin: 24px 0 0; color: var(--kb-gray-600); font-size: 15px; }

/* FAQ */
.faq { max-width: 52em; border-bottom: 1px solid var(--kb-gray-200); }
.faq details { border-top: 1px solid var(--kb-gray-200); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 1.5px solid var(--kb-gray-600); border-bottom: 1.5px solid var(--kb-gray-600); transform: translateY(-3px) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
@media (prefers-reduced-motion: no-preference) { .faq summary::after { transition: transform 0.15s ease; } }
.faq details > div { padding: 0 0 22px; color: var(--kb-gray-600); max-width: 44em; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Fuß */
.foot { border-top: 1px solid var(--kb-gray-200); background: var(--kb-page); padding: 40px 0 48px; font-size: 14px; color: var(--kb-gray-600); }
.foot .wrap { display: grid; gap: 16px; }
.foot .disc { max-width: 60em; margin: 0; color: var(--kb-ink); }
.foot .links { margin: 0; display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; }
.foot .links a { color: var(--kb-ink); }
/* Widerrufsbutton (§ 13a FAGG): auf jeder Seite gut sichtbar. */
.foot a.withdraw { border: 1px solid var(--kb-ink); border-radius: 8px; padding: 6px 14px; font-weight: 600; text-decoration: none; color: var(--kb-ink); }
.foot a.withdraw:hover { background: var(--kb-gray-100); color: var(--kb-ink); }
