/* betreibung-pruefen.ch · Version 1 */
:root {
  --paper: #EEF1F5;
  --card: #FFFFFF;
  --ink: #0F1E36;
  --ink-2: #2B3B55;
  --muted: #586479;
  --line: #CCD4DF;
  --tint: #E4E9F0;
  --red: #C8362B;
  --yellow: #F2B01E;
  --green: #1E8E55;
  --blue: #2D68B2;
  --focus: #2D68B2;
  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .16em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* Typografie */
h1, h2, h3 { font-weight: 800; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 2.95rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 64ch; }
.lead { font-size: 1.2rem; line-height: 1.5; color: var(--ink-2); max-width: 52ch; }
.fine { font-size: .9rem; color: var(--muted); }

/* Kopf */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 28px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .97rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.hero__grid--single { grid-template-columns: minmax(0, 1fr); }
.hero__grid--tool { grid-template-areas: "text check" "ticks check" ". check"; grid-template-rows: auto auto 1fr; }
.hero__text { grid-area: text; }
.hero__ticks { grid-area: ticks; margin-top: 0; align-self: start; }
.hero__grid--tool .check { grid-area: check; }
.ticks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 1px; top: .5em; width: 16px; height: 8px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* Der Check mit der Ampel */
.check {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px;
  box-shadow: 0 18px 40px -26px rgba(15, 30, 54, .4);
  scroll-margin-top: 16px;
}
.ampel { display: flex; flex-direction: column; gap: 12px; width: 84px; padding: 14px; background: var(--ink); border-radius: 30px; align-self: start; }
.lamp { width: 56px; height: 56px; border-radius: 50%; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .5); transition: background .45s, box-shadow .45s; }
.lamp--red { background: #4A2C37; }
.lamp--yellow { background: #4A4232; }
.lamp--green { background: #25443A; }
.ampel[data-lit="red"] .lamp--red { background: var(--red); box-shadow: 0 0 0 3px rgba(200, 54, 43, .35), 0 0 30px 6px rgba(200, 54, 43, .55); }
.ampel[data-lit="yellow"] .lamp--yellow { background: var(--yellow); box-shadow: 0 0 0 3px rgba(242, 176, 30, .35), 0 0 30px 6px rgba(242, 176, 30, .55); }
.ampel[data-lit="green"] .lamp--green { background: var(--green); box-shadow: 0 0 0 3px rgba(30, 142, 85, .35), 0 0 30px 6px rgba(30, 142, 85, .55); }

.check__progress { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q__legend { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; padding: 0; margin: 0 0 8px; }
.q__help { color: var(--muted); font-size: .97rem; margin: 0 0 4px; }
.choices { display: grid; gap: 10px; margin-top: 18px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.choice span { display: block; padding: 15px 18px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; transition: background .15s, border-color .15s, color .15s; }
.choice input:hover + span { border-color: var(--ink-2); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.field { display: block; margin-top: 18px; }
.field__label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="date"], input[type="email"], select { width: 100%; font: inherit; padding: 13px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 20px; }
.btn { appearance: none; border: 0; font: inherit; font-weight: 800; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; transition: background .15s; }
.btn:hover { background: var(--ink-2); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #E4E9F0; }
.offer .btn--light, .offer .btn--light:hover { color: var(--ink); text-decoration: none; }
.linkbtn { appearance: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }
.err { color: #9B1C12; font-weight: 600; margin: 10px 0 0; }

/* Ergebnis */
.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: .9rem; margin-bottom: 12px; }
.badge--red { background: var(--red); color: #fff; }
.badge--yellow { background: var(--yellow); color: var(--ink); }
.badge--green { background: var(--green); color: #fff; }
.badge--blue { background: var(--blue); color: #fff; }
.result h2 { font-size: 1.55rem; }
.result h2:focus { outline: none; }
.result ul, .result ol { padding-left: 1.2em; margin: 0 0 1em; }
.result li { margin-bottom: .4em; }
.order { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.order .field { margin-top: 0; }
.tick { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.tick input { margin-top: .25em; width: 18px; height: 18px; flex: none; }
.done { font-weight: 700; background: #E4F3EA; border: 1px solid #B7DEC5; border-radius: 10px; padding: 14px 16px; margin: 0; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Abschnitte */
.section { padding: clamp(40px, 7vw, 84px) 0; }
.section--tint { background: var(--tint); }
.section__head { max-width: 46rem; margin-bottom: 32px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; }
.facts > div { padding: 20px 0 24px; border-top: 2px solid var(--ink); }
.facts dt { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink-2); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; max-width: 46rem; }
.legend li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.legend__dot { width: 44px; height: 44px; border-radius: 50%; }
.legend__dot--red { background: var(--red); }
.legend__dot--yellow { background: var(--yellow); }
.legend__dot--green { background: var(--green); }
.legend b { display: block; font-size: 1.1rem; }

.offer { background: var(--ink); color: #fff; border-radius: 22px; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.offer h2 { color: #fff; }
.offer a { color: #fff; }
.offer p { color: #D6DEEA; }
.offer__price { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 0 0 6px; color: #fff; }
.offer__price small { display: block; font-size: 1rem; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; opacity: .8; }
.offer ul { margin: 0 0 18px; padding-left: 1.2em; }
.offer li { margin-bottom: .4em; }

details { border-top: 1px solid var(--line); padding: 18px 0; max-width: 46rem; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.4em; line-height: 1; }
details[open] summary::after { content: "\2013"; }
details p { margin: 12px 0 0; color: var(--ink-2); }

/* Startseite: der Weg vom Brief zum Eintrag */
.route { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: s; max-width: 46rem; }
.route li { position: relative; padding: 0 0 26px 72px; counter-increment: s; }
.route li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.route li::after { content: ""; position: absolute; left: 23px; top: 54px; bottom: 6px; width: 2px; background: var(--line); }
.route li:last-child { padding-bottom: 0; }
.route li:last-child::after { display: none; }
.route a { display: block; text-decoration: none; color: inherit; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.route a:hover { border-color: var(--ink); }
.route strong { display: block; font-size: 1.25rem; letter-spacing: -.015em; line-height: 1.2; margin-bottom: 4px; }
.route span { display: block; color: var(--ink-2); }
.route em { display: block; font-style: normal; font-weight: 700; font-size: .92rem; margin-top: 10px; color: var(--muted); }
.route li:last-child a { background: var(--ink); color: #fff; border-color: var(--ink); }
.route li:last-child span, .route li:last-child em { color: #D6DEEA; }

/* Einfache Karten und Inhalte */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.big-date { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 8px; }
.letter { background: #fff; border: 2px dashed var(--ink-2); border-radius: 10px; padding: 18px 20px; white-space: pre-wrap; margin: 0 0 16px; max-width: 40rem; }
.steps { padding-left: 1.3em; max-width: 46rem; }
.steps li { margin-bottom: .7em; padding-left: .3em; }

.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem); }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.ph { background: #FFE98A; padding: 0 .25em; border-radius: 3px; }

.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .92rem; }
.foot a { color: var(--muted); }
.foot p { max-width: 70ch; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }

/* Schmale Bildschirme */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__grid--tool { grid-template-areas: "text" "check" "ticks"; grid-template-rows: auto auto auto; }
  .hero__ticks { margin-top: 8px; }
  .offer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .check { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 18px; }
  .ampel { flex-direction: row; width: auto; padding: 10px 14px; gap: 10px; border-radius: 24px; justify-self: start; }
  .lamp { width: 40px; height: 40px; }
  .route li { padding-left: 60px; }
  .route li::before { width: 40px; height: 40px; }
  .route li::after { left: 19px; top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

.panel--narrow { max-width: 40rem; margin-top: 28px; }

#calc-out { margin-top: 18px; }

.notice { background: var(--tint); border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); padding: 7px 0; }
.sources { padding-left: 1.2em; margin: 0 0 14px; }
.sources li { margin: 6px 0; }
