/* ---------- Tokens ---------- */
:root {
  --night: #101c2e;
  --deep: #17263d;
  --raised: #1e3150;
  --line: #2a3d5c;
  --text: #eef2f7;
  --muted: #a7b4c8;
  --signal: #f5b83d;
  --signal-ink: #2b1d00;
  --safe: #5fd3a5;
  --alarm: #ff7a6b;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 6vw, 3.75rem);

  --space-xs: 8px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 40px;
  --space-xl: 72px;

  --radius-s: 8px;
  --radius-l: 18px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(245, 184, 61, 0.08), transparent 60%),
    var(--night);
  color: var(--text);
  font: var(--step-0) / 1.6 var(--font-text);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--signal); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

[hidden] { display: none !important; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-s);
}

.steps,
.panel,
.section > h2,
.section-lead,
.promises,
.faq details,
.source {
  max-width: 760px;
}

/* ---------- Kopf & Fuß ---------- */
.site-header {
  padding: var(--space-m) 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  white-space: nowrap;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.pill {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
}

.site-footer {
  margin-top: auto;
  padding: var(--space-l) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s) var(--space-l);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-m);
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: var(--space-m);
  align-items: center;
  padding-block: var(--space-l) var(--space-m);
}

@media (min-width: 880px) {
  .hero { grid-template-columns: 1.35fr 1fr; gap: var(--space-l); }
}

.hero h1 {
  max-width: 14ch;
  font-size: var(--step-3);
  font-weight: 800;
}

.hero .lead {
  max-width: 54ch;
  margin-top: var(--space-s);
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

/* ---------- Fortschritt in 3 Schritten ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  margin: 0 0 var(--space-m);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 12px;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.3;
  transition: border-color 300ms ease, color 300ms ease;
}

.steps li::before {
  content: counter(step) ". ";
  font-weight: 700;
}

.steps li[data-state="done"] { border-color: var(--safe); color: var(--text); }
.steps li[data-state="current"] { border-color: var(--signal); color: var(--text); font-weight: 700; }

/* ---------- Panel ---------- */
.panel {
  padding: var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--deep);
}

@media (min-width: 640px) {
  .panel { padding: var(--space-l); }
}

.panel h1,
.panel h2 { font-size: var(--step-2); }
.panel h2 + p { margin-top: var(--space-xs); color: var(--muted); }

/* ---------- Formular ---------- */
.field-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 700;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

input[type="email"] {
  width: 100%;
  min-height: 56px;
  padding: 0 var(--space-s);
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--night);
  color: var(--text);
  font: var(--step-1) var(--font-text);
  transition: border-color 150ms ease;
}

input[type="email"]::placeholder { color: #6f7f97; }
input[type="email"]:focus { border-color: var(--signal); outline: none; }
input[type="email"][aria-invalid="true"] { border-color: var(--alarm); }

.captcha {
  --altcha-color-base: var(--night);
  --altcha-color-base-content: var(--text);
  --altcha-color-primary: var(--signal);
  --altcha-color-primary-content: var(--signal-ink);
  --altcha-color-success: var(--safe);
  --altcha-color-error: var(--alarm);
  --altcha-color-neutral: var(--line);
  --altcha-color-neutral-content: var(--muted);
  --altcha-border-color: var(--line);
  --altcha-border-radius: var(--radius-s);
  --altcha-max-width: 100%;
}

.captcha-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--step--1);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--space-m);
  border: 0;
  border-radius: var(--radius-s);
  background: var(--signal);
  color: var(--signal-ink);
  font: 700 var(--step-1) var(--font-display);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.button:hover { filter: brightness(1.08); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: progress; }

.field-row .button { width: 100%; }

.button--quiet {
  border: 2px solid var(--line);
  background: transparent;
  color: var(--text);
}

.form-message {
  min-height: 1.6em;
  margin-top: var(--space-s);
  color: var(--alarm);
}

.privacy-note {
  margin-top: var(--space-m);
  padding-top: var(--space-s);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---------- "Schau ins Postfach" ---------- */
.inbox {
  display: grid;
  gap: var(--space-s);
}

.inbox-address {
  overflow-wrap: anywhere;
  padding: var(--space-s);
  border-radius: var(--radius-s);
  background: var(--night);
  font-weight: 700;
}

.inbox ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
}

/* ---------- Erklärung & FAQ ---------- */
.section {
  padding-top: var(--space-xl);
}

.section > h2 {
  margin-bottom: var(--space-m);
  font-size: var(--step-2);
}

.promises {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .promises { grid-template-columns: repeat(3, 1fr); }
}

.promises strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: var(--step-1);
}

.promises span { color: var(--muted); }

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  color: var(--signal);
  font: 700 1.4rem/1 var(--font-display);
  transition: transform 200ms ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  max-width: 62ch;
  padding-bottom: var(--space-s);
  color: var(--muted);
}

/* ---------- Ergebnis ---------- */
.scan {
  display: grid;
  gap: var(--space-s);
}

.scan-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--night);
}

.scan-bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--signal);
  animation: scan 1.2s ease-in-out infinite alternate;
}

@keyframes scan {
  from { transform: translateX(-10%); }
  to { transform: translateX(160%); }
}

.verdict {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}

.verdict-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font: 800 1.6rem/1 var(--font-display);
}

.verdict--safe .verdict-icon { background: rgba(95, 211, 165, 0.15); color: var(--safe); }
.verdict--alarm .verdict-icon { background: rgba(255, 122, 107, 0.15); color: var(--alarm); }


.breaches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0 0 var(--space-s);
  padding: 0;
  list-style: none;
}

.breaches li {
  padding: 6px 12px;
  border: 1px solid rgba(255, 122, 107, 0.45);
  border-radius: var(--radius-s);
  background: rgba(255, 122, 107, 0.08);
  font-weight: 700;
}

.explainer { color: var(--muted); }

.todo {
  margin-top: var(--space-l);
}

.todo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  margin-bottom: var(--space-s);
}

.todo-head h2 { flex: 1; font-size: var(--step-1); }
.todo-count { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }

.todo-progress {
  height: 8px;
  margin-bottom: var(--space-s);
  overflow: hidden;
  border-radius: 999px;
  background: var(--night);
}

.todo-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--safe);
  transition: width 300ms ease;
}

.todo ol {
  display: grid;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--space-s);
  padding: var(--space-s);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--night);
  cursor: pointer;
  transition: border-color 200ms ease, opacity 200ms ease;
}

.todo input {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--safe);
}

.todo strong { font-weight: 700; }
.todo label span { grid-column: 2; color: var(--muted); font-size: var(--step--1); }
.todo label:has(input:checked) { border-color: var(--safe); opacity: 0.7; }
.todo label:has(input:checked) strong { text-decoration: line-through; }

.todo-done {
  margin-top: var(--space-s);
  color: var(--safe);
  font-weight: 700;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-top: var(--space-l);
}

.source {
  margin-top: var(--space-s);
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---------- Rechtsseiten ---------- */
.prose {
  padding-block: var(--space-l) var(--space-xl);
}

.prose > * { max-width: 760px; }

.prose h1 { margin-bottom: var(--space-s); font-size: var(--step-3); }
.prose h2 { margin: var(--space-l) 0 var(--space-s); font-size: var(--step-1); scroll-margin-top: var(--space-m); }
.prose p,
.prose li { color: #cdd6e3; }
.prose p + p,
.prose ul + p,
.prose ol + p,
.prose p + ul,
.prose p + ol { margin-top: var(--space-s); }
.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.prose-lead { margin-bottom: var(--space-m); color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.prose-meta { margin-top: var(--space-l); color: var(--muted); font-size: var(--step--1); }

.toc {
  margin-bottom: var(--space-l);
  padding: var(--space-s) var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--deep);
}

.toc ol {
  columns: 2 220px;
  margin: 0;
  padding-left: 1.3em;
  font-size: var(--step--1);
}

.table-scroll { overflow-x: auto; margin-block: var(--space-s); }

.prose table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th { color: var(--text); font-family: var(--font-display); }
.prose td { color: #cdd6e3; }

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-s);
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 700;
}

.skip-link:focus { top: var(--space-s); }

/* ---------- Vertrauensmerkmale im Hero ---------- */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: var(--space-m) 0 0;
  padding: 0;
  list-style: none;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
}

.trust li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 3px rgba(95, 211, 165, 0.18);
}

/* ---------- Zustimmung ---------- */
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-s);
  align-items: start;
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.5;
  cursor: pointer;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--signal);
}

.consent:has(input:checked) { color: var(--text); }

/* ---------- So funktioniert's ---------- */
.how-steps {
  display: grid;
  gap: var(--space-m);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
}

@media (min-width: 760px) {
  .how-steps { grid-template-columns: repeat(3, 1fr); max-width: 1040px; }
}

.how-steps li {
  position: relative;
  counter-increment: how;
  padding: var(--space-m);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--deep);
}

.how-steps li::after {
  content: counter(how);
  position: absolute;
  top: var(--space-s);
  right: var(--space-m);
  color: var(--line);
  font: 800 2.4rem/1 var(--font-display);
}

.how-steps h3 { margin: var(--space-s) 0 var(--space-xs); font-size: var(--step-1); }
.how-steps p { color: var(--muted); }

.how-icon {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.how-dot { fill: var(--signal); stroke: none; }

/* ---------- Ratschläge ---------- */
.section-lead { max-width: 62ch; margin: -8px 0 var(--space-m); color: var(--muted); }

.advice {
  display: grid;
  gap: var(--space-s);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .advice { grid-template-columns: repeat(2, 1fr); max-width: 1040px; }
}

.advice li {
  padding: var(--space-m);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: linear-gradient(90deg, rgba(245, 184, 61, 0.07), transparent 70%);
}

.advice strong { display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: var(--step-1); }
.advice span { color: var(--muted); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Sprachumschalter ---------- */
.header-tools {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch a {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}

.lang-switch a:hover { color: var(--text); }

.lang-switch a[aria-current="page"] {
  background: var(--signal);
  color: var(--signal-ink);
}

@media (max-width: 420px) {
  .site-header .pill { display: none; }
}

.notice {
  margin-bottom: var(--space-m);
  padding: var(--space-s) var(--space-m);
  border-left: 3px solid var(--signal);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(245, 184, 61, 0.07);
  font-size: var(--step--1);
}

/* ---------- Einwilligung in die Übermittlung ---------- */
#state-consent h1 { margin-bottom: var(--space-s); font-size: var(--step-2); }
#state-consent form { display: grid; gap: var(--space-s); margin-top: var(--space-m); }

.risk-list {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-s) 0 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  padding: 10px 14px;
  border-left: 3px solid var(--alarm);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: rgba(255, 122, 107, 0.07);
  color: #cdd6e3;
  font-size: var(--step--1);
}

.explainer--small { margin-top: var(--space-m); font-size: var(--step--1); }
