/* ==========================================================================
   styles.css — Basis-Layout. Keine externen Fonts, keine Libraries.
   Farben kommen aus themes.css und werden per data-theme umgeschaltet.
   ========================================================================== */

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

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 660px;
  --gap: 18px;
}

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

body {
  margin: 0;
  font-family: var(--font);
  /* 16px Basis — deutlich ueber der 12pt-Untergrenze aus CPALead ToS 11(c) */
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  background-image: var(--bg-accent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 18px 48px;
}
.wrap--wide { max-width: 940px; }

/* ---------- Kopfzeile ---------- */
.hdr { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 14px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 650; letter-spacing: -.01em; font-size: 15px;
  color: var(--fg); text-decoration: none;
}
.brand .dot {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: var(--accent-grad); box-shadow: 0 2px 8px var(--accent-glow);
}
.hdr .lang { display: flex; gap: 4px; }
.hdr .lang a {
  font-size: 12px; font-weight: 600; text-decoration: none; letter-spacing: .04em;
  color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid transparent;
}
.hdr .lang a[aria-current="true"] { color: var(--fg); border-color: var(--line); background: var(--surface-2); }

/* ---------- Karte ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }

.badge {
  display: inline-block; font-size: 12px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.badge:empty { display: none; }

h1 { font-size: 27px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 650; }

.sub { margin: 0 0 20px; color: var(--muted); font-size: 15.5px; }
.sub:empty { display: none; }

/* ---------- Aktionsbereich ---------- */
.cta-zone { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 18px; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 22px;
  font-size: 17px; font-weight: 650; letter-spacing: -.01em;
  color: var(--accent-fg); background: var(--accent-grad);
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  text-decoration: none; text-align: center;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.cta:hover  { transform: translateY(-1px); box-shadow: 0 7px 20px var(--accent-glow); filter: saturate(1.06); }
.cta:active { transform: translateY(0); }
.cta:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }
.cta[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* Countdown-Ring im Button */
.ring { width: 26px; height: 26px; flex: none; display: none; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .trk { stroke: var(--accent-fg); opacity: .3; }
.ring .bar {
  stroke: var(--accent-fg); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset .1s linear;
}
.is-counting .ring { display: block; }

.meta-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 20px; font-size: 13.5px; color: var(--muted);
}
.cancel {
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px;
}
.cancel:hover { color: var(--fg); }
.cancel[hidden] { display: none; }

/* ---------- Terms — Pflichtblock, sichtbar ohne Scrollen ----------
   Kein overflow/max-height: ToS 11(d) verbietet Scroll-Boxen.       */
.terms {
  /* 12pt entspricht 16px. Deshalb bewusst 16px und keinen Pixel weniger. */
  font-size: 16px;
  line-height: 1.55;
  color: var(--terms-fg);   /* Kontrast >= 4.5:1 gegen --terms-bg */
  background: var(--terms-bg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  overflow: visible;
  max-height: none;
}
.terms p { font-size: 16px; margin: 0; }
.terms strong { color: var(--fg); }

.status { min-height: 20px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Schritte ---------- */
.steps { list-style: none; counter-reset: s; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  counter-increment: s; position: relative; padding-left: 38px;
  font-size: 15px; color: var(--fg-2);
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

/* ---------- Startseite ---------- */
.hero { text-align: left; padding: 8px 0 22px; }
.hero h1 { font-size: 34px; }
.hero .sub { font-size: 17px; max-width: 52ch; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  text-decoration: none; color: inherit;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.tile .t-badge { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.tile h3 { margin: 0; font-size: 17px; }
.tile p { margin: 0; font-size: 14px; color: var(--muted); }
.tile .t-go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 650; color: var(--accent-ink); }

.faq { display: grid; gap: 2px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 12px 0;
}
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 18px; color: var(--accent-ink); font-weight: 700; }
.faq details[open] summary::before { content: "–"; }
.faq p { margin: 8px 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- Fusszeile ---------- */
.ftr { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.ftr nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.ftr a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.ftr a:hover { color: var(--fg); border-bottom-color: var(--line); }
.ftr .disc { max-width: 70ch; }

/* ---------- Rechtstexte ---------- */
.legal { font-size: 15.5px; }
.legal h1 { font-size: 26px; margin-bottom: 18px; }
.legal h2 { margin-top: 28px; font-size: 18px; }
.legal p, .legal li { color: var(--fg-2); }
.legal ul { padding-left: 20px; }
.legal address { font-style: normal; white-space: pre-line; }
.legal .note {
  background: var(--terms-bg); border: 1px solid var(--line);
  border-left: 3px solid var(--warn); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 14.5px; color: var(--fg-2);
}
.legal code { font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* ---------- Hilfsklassen ---------- */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.spacer { height: 22px; }

.notice {
  background: var(--warn-bg); border: 1px solid var(--warn);
  border-radius: var(--radius-sm); padding: 13px 15px;
  font-size: 14.5px; color: var(--fg); margin-bottom: 16px;
}

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  .wrap { padding: 12px 14px 40px; }
  .card { padding: 20px 18px 18px; border-radius: 12px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 28px; }
  .cta { min-height: 56px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.meta-row .status { margin: 0; }
