
/* Behörden-Stil: ruhiges Weiß/Grau, ein Rot als Akzent, klare Kästen, viel Luft. Einspaltig fürs Handy, max. 760 px breit. */
:root {
  --ink: #17212c;
  --muted: #586473;
  --bg: #f2f3f5;
  --surface: #ffffff;
  --line: #d3d8df;
  --accent: #a8102f;
  --accent-ink: #ffffff;
  --link: #1b4a8a;
  --ok: #1d6f47;
  --ok-bg: #e5f3ec;
  --warn-bg: #fdf3e1;
  --soft: #f7f8fa;
  --font: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8ecf1; --muted: #a3adba; --bg: #12171d; --surface: #1b222b; --line: #313b47;
    --accent: #e0546f; --accent-ink: #1b0a0f; --link: #8db6ee; --ok: #6fcf9c; --ok-bg: #173327;
    --warn-bg: #3a2f17; --soft: #161c23; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e8ecf1; --muted: #a3adba; --bg: #12171d; --surface: #1b222b; --line: #313b47;
  --accent: #e0546f; --accent-ink: #1b0a0f; --link: #8db6ee; --ok: #6fcf9c; --ok-bg: #173327;
  --warn-bg: #3a2f17; --soft: #161c23; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--font); }
a { color: var(--link); }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.mark { width: 30px; height: 30px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 700; font-size: 15px; flex: none; }
.brand { display: flex; flex-direction: column; }
.brand b { font-size: 18px; letter-spacing: .01em; }
.brand span { font-size: 13px; color: var(--muted); }
.top .spacer { flex: 1; }
.linkbtn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 6px 4px; text-decoration: underline; font-size: 15px; }

main { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.lead h1 { font-size: 28px; margin-bottom: 8px; }
.lead p { margin: 0 0 10px; color: var(--muted); max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.facts li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 6px; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: space-between; }

.progress { display: flex; flex-direction: column; gap: 6px; }
.progress small { color: var(--muted); font-size: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .25s; }
.q h2 { font-size: 23px; margin-bottom: 6px; }
.q .hint { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); }
.opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; }
.field input[type=number], .field select, .search input { font: inherit; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); max-width: 260px; }
.sub { margin: 18px 0 8px; font-weight: 700; font-size: 17px; }

.summary h1 { font-size: 26px; }
.summary p { margin: 8px 0 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tile { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.tile b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14px; color: var(--muted); }
.notice { background: var(--warn-bg); border-left: 4px solid #c58a1a; padding: 12px 14px; border-radius: 4px; font-size: 15px; }

.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 -4px; }
.sec-h h2 { font-size: 21px; }
.sec-h span { color: var(--muted); font-size: 15px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.item.top-pick { border-left-color: var(--accent); }
.item.have { border-left-color: var(--ok); }
.item h3 { font-size: 18px; color: var(--link); }
.item .why { font-size: 15px; }
.item .desc { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); background: var(--soft); }
.chip.reg { color: var(--ink); }
.chip.st-have { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 600; }
.chip.st-done { background: var(--warn-bg); color: var(--ink); border-color: transparent; font-weight: 600; }

details.group { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
details.group > summary { padding: 14px 16px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; list-style: none; }
details.group > summary::after { content: "▾"; color: var(--muted); }
details.group[open] > summary::after { content: "▴"; }
details.group > summary span { color: var(--muted); font-weight: 400; margin-left: auto; }
details.group .list { padding: 0 12px 12px; }
.more { align-self: flex-start; }
.search { display: flex; gap: 8px; }
.search input { max-width: none; flex: 1; }

.detail h1 { font-size: 25px; margin: 4px 0 10px; }
.detail h2 { font-size: 17px; margin: 18px 0 6px; }
.detail .txt { white-space: pre-line; margin: 0; max-width: 65ch; }
.detail .src { font-size: 14px; color: var(--muted); margin-top: 18px; }
.status { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.status button { min-height: 42px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.status button[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.links { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.links a { word-break: break-word; }

footer { max-width: 760px; margin: 0 auto; padding: 0 16px 110px; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); font-size: 15px; padding: 4px 2px; }
@media (max-width: 420px) {
  .lead h1 { font-size: 24px; }
  .tile b { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }

/* App-Leiste unten, Merkliste, Zeiträume */
main { padding-bottom: 24px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.nav-in { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; position: relative; }
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--accent); border-radius: 0 0 3px 3px; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }
.chip.new { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.chip.sure-fix { background: var(--ok-bg); color: var(--ok); border-color: transparent; font-weight: 600; }
.chip.sure-hoch { background: var(--soft); color: var(--ink); font-weight: 600; }
.chip.sure-rechner { background: var(--warn-bg); color: var(--ink); border-color: transparent; font-weight: 600; }
.chip.dl { background: var(--warn-bg); color: var(--ink); border-color: transparent; }
.chip.dl.urgent { background: var(--accent); color: var(--accent-ink); }
.item .amt { font-size: 15px; font-weight: 600; }
.item.firm { border-left-color: var(--link); }
.item.wait { border-left-color: #c58a1a; }
.diff { display: flex; flex-direction: column; gap: 8px; }
.diff h2 { font-size: 19px; }
.diff ul { margin: 0; padding-left: 20px; }
.diff .x { align-self: flex-end; }
.recform { display: grid; gap: 10px; margin-top: 10px; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; }
.recform input[type=date], .recform textarea { font: inherit; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.years { display: flex; flex-wrap: wrap; gap: 8px; }
.years .opt { min-height: 44px; padding: 6px 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 15px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.renew { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-size: 15px; }
.kidrow { display: flex; gap: 8px; flex-wrap: wrap; }
.kidrow input { width: 90px; max-width: 90px; }
.field.inline { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.money { font-variant-numeric: tabular-nums; }
