/* Website: Landingpage, Login, Konto, Rechtstexte – helles, kantiges Design mit Schatten */
:root {
  color-scheme: light;
  --page: #ffffff;
  --band: #f6f7f9;          /* abgesetzte Sektionen */
  --card: #ffffff;
  --ink: #0f1115;
  --ink2: #4a4f59;
  --muted: #7b818c;
  --line: #e5e7eb;
  --line-strong: #d4d7dd;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eef2ff;
  --good: #047857;
  --good-soft: #ecfdf5;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --warn-ink: #92400e;
  --warn-soft: #fffbeb;
  --c1: #2a78d6;
  --c2: #eb6834;
  --seg-tax: #e34948;
  --seg-social: #4a3aa7;
  --seg-wohnen: #eda100;
  --seg-leben: #e87ba4;
  --seg-spar: #008300;
  --radius: 2px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, .06);
  --shadow: 0 1px 2px rgba(15, 17, 21, .05), 0 6px 16px rgba(15, 17, 21, .07);
  --shadow-lg: 0 2px 4px rgba(15, 17, 21, .04), 0 18px 40px rgba(15, 17, 21, .12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 750; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.lead { font-size: 19px; color: var(--ink2); max-width: 600px; }
.small { font-size: 13.5px; color: var(--ink2); }

/* ---------- Navigation */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 17px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a:not(.btn) { color: var(--ink2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 14px; } }
@media (max-width: 520px) { .nav-in { gap: 12px; } .brand { font-size: 15.5px; gap: 8px; } .nav-links a:not(.btn) { font-size: 14px; } .nav .btn.small { padding: 7px 11px; font-size: 13.5px; } }
@media (max-width: 400px) { .brand-text { display: none; } }

/* ---------- Buttons: kantig, klare Kontraste */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; text-align: center;
  box-shadow: var(--shadow-sm); transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--band); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 2px rgba(29, 78, 216, .25), 0 4px 12px rgba(29, 78, 216, .18); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.small { padding: 7px 13px; font-size: 14px; }
.nav .btn, .cta-row .btn { white-space: nowrap; }
.btn.danger { color: var(--bad); border-color: #f1c4c4; }
.btn.danger:hover { background: var(--bad-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Sektionen */
section.block { padding: 88px 0; }
section.block.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 12.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-head { max-width: 640px; }
.section-head .lead { margin-top: 12px; }

/* ---------- Hero */
.hero { padding: 80px 0 72px; border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-copy { background: rgba(255, 255, 255, .85); }
.hero .lead { margin-top: 20px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; align-items: center; }
.cta-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 13.5px; color: var(--ink2); }
.trust span::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 6px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 56px 0; } }

.demo { padding: 24px; box-shadow: var(--shadow-lg); border-top: 3px solid var(--ink); }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.demo-tag { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; white-space: nowrap; }
.demo-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.demo-tile { padding: 16px; }
.demo-tile + .demo-tile { border-left: 1px solid var(--line); }
.demo-tile .city { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.demo-tile .lbl { font-size: 12px; color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: .05em; }
.demo-tile .val { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.demo-tile .delta { font-size: 13px; color: var(--good); font-weight: 650; }
.sw { width: 10px; height: 10px; display: inline-block; flex: none; }
.bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; font-size: 12px; color: var(--ink2); }
.bar { display: flex; gap: 2px; height: 20px; }
.bar span { display: block; height: 100%; }
.demo-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; font-size: 12px; color: var(--ink2); }
.demo-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Schnellcheck */
.qc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 36px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: var(--card); }
.qc > .card { box-shadow: none; border: 0; padding: 28px; }
.qc > .card + .card { border-left: 1px solid var(--line); background: var(--band); }
@media (max-width: 800px) { .qc { grid-template-columns: 1fr; } .qc > .card + .card { border-left: 0; border-top: 1px solid var(--line); } }
.qc label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 6px; }
.qc .inp { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.qc .inp span { font-weight: 650; color: var(--ink2); width: 32px; }
.qc input[type="number"] { width: 100%; padding: 12px 14px; font: inherit; font-size: 18px; font-weight: 600; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); }
.qc input[type="number"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.qc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qc-out .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.qc-out .v { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }

/* ---------- Features & Schritte */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; } }
.feature { transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature h3 { margin: 16px 0 8px; }
.feature p { color: var(--ink2); font-size: 15px; }
.ico { width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.step { border-top: 3px solid var(--accent); }
.step-num { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .05em; margin-bottom: 8px; }

/* ---------- Preis */
.price-card { max-width: 460px; margin: 40px auto 0; text-align: left; padding: 32px; box-shadow: var(--shadow-lg); border-top: 3px solid var(--accent); }
.price { font-size: 52px; font-weight: 850; letter-spacing: -0.04em; line-height: 1.1; }
.price small { font-size: 16px; font-weight: 500; color: var(--ink2); letter-spacing: 0; }
.checks { list-style: none; padding: 0; margin: 22px 0 26px; border-top: 1px solid var(--line); }
.checks li { padding: 11px 0 11px 28px; position: relative; color: var(--ink2); border-bottom: 1px solid var(--line); }
.checks li::before { content: "✓"; position: absolute; left: 2px; color: var(--good); font-weight: 800; }

/* ---------- FAQ */
.faq { max-width: 800px; margin-top: 32px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 500; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--ink2); max-width: 700px; }

/* ---------- Footer */
.footer { background: var(--band); border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 14px; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.footer a { color: var(--ink2); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Formulare (Login, Registrierung, Konto) */
.auth { min-height: calc(100vh - 170px); display: grid; place-items: center; padding-top: 48px; padding-bottom: 48px; background: var(--band); max-width: none; }
.auth .card { width: min(460px, 100%); padding: 34px; box-shadow: var(--shadow-lg); border-top: 3px solid var(--accent); }
.auth h1 { font-size: 28px; margin-bottom: 8px; }
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.form input[type="email"], .form input[type="password"], .form input[type="text"], .form textarea {
  padding: 11px 13px; font: inherit; font-size: 15px; font-weight: 400; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
}
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form input[readonly] { background: var(--band); color: var(--ink2); }
.form textarea { min-height: 90px; resize: vertical; }
.form .check, .check { flex-direction: row; display: flex; align-items: flex-start; gap: 10px; color: var(--ink2); font-size: 14px; font-weight: 400; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.form .btn { width: 100%; }
.alt { margin-top: 18px; font-size: 14px; color: var(--ink2); text-align: center; }
.msg { padding: 11px 13px; font-size: 14px; border-left: 3px solid currentColor; }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--good-soft); color: var(--good); }
.msg.info { background: var(--warn-soft); color: var(--warn-ink); }
.msg:empty { display: none; }

.page { padding-top: 48px; padding-bottom: 72px; }
.page h1 { font-size: 36px; margin-bottom: 22px; }
.page-band { background: var(--band); min-height: calc(100vh - 170px); }
.konto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .konto-grid { grid-template-columns: 1fr; } }
.konto-grid .card h2 { font-size: 19px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.status-pill { display: inline-block; padding: 2px 9px; font-size: 12.5px; font-weight: 700; background: var(--band); border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.status-pill.ok { background: var(--good-soft); color: var(--good); border-color: #b7e4d0; }
.status-pill.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: #f5dfa6; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; margin: 4px 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Rechtstexte */
.legal { max-width: 820px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink2); }
.legal p + p { margin-top: 10px; }
.todo { background: var(--warn-soft); color: var(--warn-ink); border-left: 3px solid #d97706; padding: 13px 15px; font-size: 14px; margin-bottom: 24px; }
mark { background: #fef3c7; color: var(--warn-ink); padding: 0 3px; }

@media print { .nav, .footer, .actions { display: none !important; } .card { box-shadow: none; } }

/* ---------- Erfolgsansicht (z. B. Passwort-Reset angefordert) */
.success-panel { text-align: left; }
.success-panel:focus { outline: none; }
.success-icon { width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; background: var(--good-soft); color: var(--good); border: 1px solid #b7e4d0; margin-bottom: 16px; }
.success-panel h1 { margin-bottom: 10px; }
.success-panel p { color: var(--ink2); margin-top: 10px; }
.success-panel b[data-fill] { color: var(--ink); word-break: break-all; }
.steps { margin: 18px 0 6px; padding: 0; list-style: none; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 38px; border-bottom: 1px solid var(--line); color: var(--ink2); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 11px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }

/* Länderflaggen */
.flag { display: inline-flex; flex: none; height: .95em; vertical-align: -.12em; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .14); }
.flag svg { height: 100%; width: auto; display: block; }
.flag-de { aspect-ratio: 5 / 3; }
.flag-ch { aspect-ratio: 1; }

/* Konto-Knopf in der Navigation */
.account-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; background: var(--card); }
.account-chip:hover { border-color: var(--accent); color: var(--accent); }
.account-chip .avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .account-chip .account-label { display: none; } .account-chip { padding: 3px; } }

/* Geteiltes Ergebnis */
.share-page h1 { margin-top: 6px; max-width: 820px; }
.share-card { margin-top: 22px; display: grid; gap: 14px; max-width: 820px; }
.share-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr auto; gap: 6px 14px; align-items: center; }
.share-city { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.share-bar { height: 12px; border-radius: 6px; background: var(--band, #f1f3f6); overflow: hidden; }
.share-bar span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.share-bar span.neg { background: #c42f2f; }
.share-val { font-weight: 700; font-size: 18px; white-space: nowrap; }
.share-val small { font-weight: 400; font-size: 13px; color: var(--ink2, #555); }
.share-diff { grid-column: 2 / 4; font-size: 13px; color: var(--ink2, #555); }
.share-diff.up { color: #15803d; } .share-diff.down { color: #c42f2f; }
@media (max-width: 560px) { .share-row { grid-template-columns: 1fr auto; } .share-bar { grid-column: 1 / 3; grid-row: 2; } .share-diff { grid-column: 1 / 3; } }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td:not(:first-child), .admin-table th:not(:first-child) { text-align: right; }
