/* MelderApp Web - eigene, ruhige BOS-Optik (Anthrazit / dunkles Rot).
   Alles lokal, keine externen Schriften. Kein Inline-Style im HTML (CSP style-src 'self'). */

:root {
  color-scheme: light;
  --ink: #1b1f24;
  --muted: #4f5862;          /* 6,9:1 auf --paper */
  --line: #d3d8de;
  --paper: #f4f5f7;
  --panel: #ffffff;
  --anthracite: #23272e;
  --anthracite-2: #2f343c;
  --accent: #9e1b1f;         /* 7,6:1 mit Weiss */
  --accent-dark: #7a1418;
  --accent-soft: #f8e9ea;
  --ok: #1d6b3a;
  --ok-soft: #e7f3eb;
  --warn-bg: #fff6e0;
  --warn-line: #c69500;
  --error: #a3161c;
  --error-soft: #fdecec;
  --focus: #1a5fb4;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow { max-width: 780px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: var(--radius);
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Koederfeld (Honeypot): aus dem Blickfeld geschoben statt display:none. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Kopfzeile ---------- */
.topbar {
  background: var(--anthracite);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-link:hover { color: #fff; }
.brand-link svg { flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.nav a { color: #e9ecef; text-decoration: none; font-size: 0.95rem; padding: 6px 2px; }
.nav a:hover { color: #fff; text-decoration: underline; }
.nav a.btn { color: #fff; padding: 6px 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 11px 20px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-light { background: #fff; color: var(--anthracite); border-color: #fff; }
.btn-light:hover { background: #e9ecef; border-color: #e9ecef; color: var(--anthracite); }
.btn-outline-light { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--anthracite) 0%, var(--anthracite-2) 70%, #3a1416 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero .eyebrow { color: #f2b8bb; }
.hero .lead { color: #e3e6ea; font-size: 1.15rem; max-width: 40em; }
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; color: #e9ecef; }
.hero-points svg { flex: none; margin-top: 4px; }
.hero-visual {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 18px;
}
.hero-visual svg { width: 100%; height: auto; display: block; }

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---------- Abschnitte ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--anthracite); color: #fff; }
.section-dark a { color: #ffd2d4; }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: #d5d9de; }
.section-dark .eyebrow { color: #f2b8bb; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.section-alt .card { background: var(--paper); }
.card h3 { display: flex; gap: 10px; align-items: center; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .icon {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card ul { padding-left: 20px; margin: 8px 0 0; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list svg { flex: none; margin-top: 4px; }

/* Sicherheit */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.sec-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 20px;
}
.sec-box + .sec-box { margin-top: 18px; }
.sec-box h3 { color: #fff; }
.sec-box p, .sec-box li { color: #dfe3e7; }
.sec-box ul { padding-left: 20px; margin: 0; }

/* Ablauf */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 22px 20px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.section-alt .steps li { background: var(--paper); }
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

/* Preise */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--accent); }
.price {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0 2px;
  color: var(--anthracite);
  min-height: 1.4em;
}
.price.is-loading, .price.is-unavailable { font-size: 1.3rem; color: var(--muted); font-weight: 700; }
.price-unit { color: var(--muted); margin-bottom: 14px; }
.price-card ul { flex: 1; }
.price-card .btn { margin-top: 18px; align-self: flex-start; }
.footnote { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }

.table-wrap { overflow-x: auto; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; }
table.compare caption { text-align: left; padding: 14px 16px 4px; font-weight: 700; }
table.compare th, table.compare td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.compare thead th { background: var(--paper); }
table.compare tbody th { font-weight: 600; }
table.compare tr:last-child th, table.compare tr:last-child td { border-bottom: 0; }

.pay-steps { margin-top: 28px; }

/* FAQ */
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 18px;
  list-style-position: inside;
}
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details > div { padding: 14px 18px 4px; }

/* CTA */
.cta {
  background: var(--accent);
  color: #fff;
  padding: 44px 0;
}
.cta-inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; color: #fbe3e4; }

/* ---------- Hinweise ---------- */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 18px;
}
.draft {
  background: var(--warn-bg);
  border: 2px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 24px;
  font-weight: 700;
}
.draft p { margin: 6px 0 0; font-weight: 400; }
.todo { background: var(--warn-bg); border: 1px dashed var(--warn-line); padding: 0 4px; border-radius: 4px; }
.alert { border-radius: var(--radius); padding: 14px 16px; margin: 0 0 18px; border: 1px solid; }
.alert-error { background: var(--error-soft); border-color: var(--error); color: #5e0b0f; }
.alert-ok { background: var(--ok-soft); border-color: var(--ok); color: #0f3d21; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert a { color: inherit; font-weight: 700; }

/* ---------- Formulare ---------- */
.form-page { padding: 40px 0 56px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; padding: 0; }
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 4px; }
.opt { font-weight: 400; color: var(--muted); }
.hint { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 4px; }
.field-error { display: block; font-size: 0.92rem; color: var(--error); margin-top: 4px; font-weight: 600; }
.field-error:empty { display: none; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #8b939c;   /* 3:1 gegen Weiss */
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-zip { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }

.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  background: #fff;
}
.plan-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.plan-option input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.plan-option strong { display: block; }
.plan-option small { display: block; color: var(--muted); font-size: 0.93rem; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.estimate { font-weight: 600; margin-top: 6px; }

.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.side-card + .side-card { margin-top: 18px; }
.side-card ol { padding-left: 20px; margin: 0; }
.side-card li { margin-bottom: 6px; }

[hidden] { display: none !important; }

/* ---------- Rechtstexte ---------- */
.legal { padding: 36px 0 56px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.legal h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.legal li { margin-bottom: 8px; }
.legal ol, .legal ul { padding-left: 22px; }
.legal .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.muted { color: var(--muted); }
.legal table { width: 100%; border-collapse: collapse; background: var(--panel); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
.back { display: inline-block; margin-bottom: 20px; font-weight: 700; text-decoration: none; }

/* ---------- Fusszeile ---------- */
.footer {
  background: var(--anthracite);
  color: #d5d9de;
  padding: 28px 0;
  font-size: 0.95rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer a { color: #fff; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Responsiv ---------- */
@media (max-width: 900px) {
  .hero-grid, .sec-grid, .form-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 36px 0 44px; }
  .section { padding: 40px 0; }
  .grid-3, .grid-2, .price-grid, .steps, .plan-options, .row-2 { grid-template-columns: 1fr; }
  .row-zip { grid-template-columns: 100px 1fr; }
  .nav { gap: 2px 12px; }
}

.h3 { font-size: 1.15rem; }
