:root {
  color-scheme: light;
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #F0ECE3;
  --ink: #15171C;
  --ink-2: #5B606B;
  --line: #E0DBD0;
  --accent: #1A4580;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(11, 35, 64, 0.10);
  --down: #1E7A4C;
  --down-soft: rgba(30, 122, 76, 0.12);
  --field: #FFFFFF;
  --hero-bg: #15171C;
  --hero-ink: #F4F1EA;
  --hero-ink-2: #A3A7B0;
  --hero-line: #2E3139;
  --hero-accent: #4FD1C9;
  --hero-down: #6FD6A2;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px rgba(20, 20, 30, 0.06);
  --nav-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-scheme="dark"] {
  color-scheme: dark;
  --bg: #101114;
  --surface: #191B20;
  --surface-2: #22252B;
  --ink: #ECEAE4;
  --ink-2: #9DA2AD;
  --line: #2C2F36;
  --accent: #4FD1C9;
  --accent-ink: #15171C;
  --accent-soft: rgba(79, 209, 201, 0.13);
  --down: #5CC692;
  --down-soft: rgba(92, 198, 146, 0.13);
  --field: #14161A;
  --hero-bg: #24272E;
  --hero-ink: #F1EFEA;
  --hero-ink-2: #A3A7B0;
  --hero-line: #3A3D45;
  --hero-accent: #4FD1C9;
  --nav-bg: rgba(25, 27, 32, 0.94);
  --shadow: none;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app { max-width: 1080px; margin: 0 auto; padding: 0 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
@media (min-width: 880px) { .app { padding-bottom: 48px; } }

/* Kopfzeile */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.logo { width: 32px; height: 32px; flex: none; }
.logo rect { fill: #1A4580; }
.logo path { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand-tag { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.country-pick select {
  font: inherit; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 30px 7px 13px; min-height: 38px; max-width: 46vw;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.country-pick select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Navigation: oben auf grossen Bildschirmen, unten auf dem Handy */
.tabs { display: none; }
@media (min-width: 880px) {
  .tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: max-content; }
  .tabs button { font: inherit; font-size: 14px; font-weight: 650; color: var(--ink-2); background: none; border: 0; border-radius: 999px; padding: 8px 18px; cursor: pointer; }
  .tabs button[aria-current="page"] { background: var(--ink); color: var(--bg); }
}
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: inherit; font-size: 11px; font-weight: 650; color: var(--ink-2); background: none; border: 0; cursor: pointer; padding: 0 2px;
}
.bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav circle { fill: currentColor; stroke: none; }
.bottom-nav button[aria-current="page"] { color: var(--accent); }
@media (min-width: 880px) { .bottom-nav { display: none; } }

.install-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--ink); border-radius: 12px; padding: 10px 12px 10px 14px; font-size: 14px; font-weight: 600;
}

/* Raster */
.grid { display: grid; gap: 28px; }
.col { display: grid; gap: 14px; align-content: start; }
@media (min-width: 880px) {
  .grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 44px; align-items: start; }
  .grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  #view-rechner .result { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-bottom: 8px; scrollbar-width: thin; }
}
.grid.two { gap: 14px; }
.view { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }

/* Eingabeseite */
.stand {
  display: inline-block; margin: 2px 0 0; font-size: 12px; font-weight: 650; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: var(--surface);
}
h1 { font-size: clamp(30px, 6.4vw, 44px); line-height: 1.05; letter-spacing: -0.03em; margin: 12px 0 10px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--ink-2); margin: 0 0 20px; max-width: 46ch; }

.quick { margin: 0 0 22px; }
.quick-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 650; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; min-height: 40px;
}
.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: translateY(1px); }

.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type="text"] {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; min-height: 46px;
  font-variant-numeric: tabular-nums;
}
input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
input::placeholder { color: var(--ink-2); opacity: 0.6; }

.money, .pct { position: relative; display: block; }
.money .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.money input { padding-left: 48px; text-align: right; }
.pct input { padding-right: 34px; text-align: right; font-size: 18px; font-weight: 700; }
.pct .unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--ink-2); pointer-events: none; }
.wage input { font-size: 20px; font-weight: 750; min-height: 54px; }

.rows-head { display: flex; justify-content: space-between; align-items: end; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 26px 0 0; }
.rate-head { min-width: 84px; text-align: right; white-space: nowrap; }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 750; color: var(--accent); margin: 20px 0 2px; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 128px 84px; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.row-label { min-width: 0; }
.row-label b { display: block; font-weight: 600; font-size: 15px; }
.row-label span { display: block; font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.row .rate { text-align: right; padding-left: 8px; padding-right: 10px; }
.row .rate.custom { border-color: var(--accent); color: var(--accent); font-weight: 700; }
@media (max-width: 420px) {
  .row { grid-template-columns: minmax(0, 1fr) 108px 66px; gap: 6px; }
  .rate-head { min-width: 66px; }
  .row .money .cur { display: none; }
  .row .money input { padding-left: 10px; }
}
.hint { font-size: 13px; color: var(--ink-2); margin: 12px 0 0; }
.actions-inline { margin-top: 14px; }

.switch { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 42px; height: 24px; border-radius: 12px; background: var(--line); position: relative; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Knöpfe */
.btn { font: inherit; font-weight: 700; border-radius: 12px; cursor: pointer; min-height: 48px; padding: 0 18px; border: 1px solid transparent; }
.btn:active { transform: translateY(1px); }
.btn.as-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.btn.primary { width: 100%; background: var(--accent); color: var(--accent-ink); }
.btn.secondary { flex: 1; background: var(--surface-2); color: var(--ink); border-color: var(--line); min-height: 44px; }
.btn.ghost { background: none; color: var(--ink-2); border-color: var(--line); min-height: 40px; font-weight: 600; font-size: 14px; }
.btn.ghost.danger { color: var(--accent); border-color: var(--accent-soft); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn.primary { flex: 1.4; width: auto; min-height: 44px; }

/* Karten und Ergebnis */
.result { display: grid; gap: 14px; align-content: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-title { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; margin: 0 0 4px; }
.card-lead { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }

.card.hero {
  background: radial-gradient(120% 90% at 100% 0%, rgba(79, 209, 201, 0.20), transparent 60%), var(--hero-bg);
  color: var(--hero-ink); border-color: transparent; padding: 22px 22px 20px;
}
.hero .empty p:last-child, .hero .muted { color: var(--hero-ink-2); margin: 6px 0 4px; }
.kicker { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 750; color: var(--hero-ink-2); }
.big { margin: 4px 0 0; font-size: clamp(44px, 12vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--hero-accent); }
.big.down { color: var(--hero-down); }
.big small { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--hero-ink); margin-top: 6px; }
.big.mid { font-size: clamp(30px, 8vw, 40px); letter-spacing: -0.03em; line-height: 1.08; }
.sub { margin: 10px 0 0; color: var(--hero-ink-2); }
.sub b { color: var(--hero-ink); }

.meter { display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--hero-line); }
.m-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px; gap: 10px; align-items: center; font-size: 14px; }
.m-label { color: var(--hero-ink-2); font-weight: 600; }
.m-track { height: 10px; background: var(--hero-line); border-radius: 5px; overflow: hidden; }
.m-fill { height: 100%; border-radius: 5px; background: var(--hero-accent); }
.m-row.off .m-fill { background: var(--hero-ink-2); }
.m-fill.down { background: var(--hero-down); }
.m-val { text-align: right; font-weight: 750; }
.m-row.off .m-val { color: var(--hero-ink-2); }
.meter-note { margin: 10px 0 0; font-size: 13px; color: var(--hero-ink-2); }

.bars { display: grid; gap: 10px; margin-top: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: 14px; }
.bar-row .r { color: var(--ink-2); }
.bar-row .v { font-weight: 750; }
.bar-row .v.down { color: var(--down); }
.bar-track { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.bar-fill.down { background: var(--down); }
.fine { font-size: 13px; color: var(--ink-2); margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Lohngespräch */
.empty-view { max-width: 560px; margin: 8px auto 0; text-align: center; }
.empty-view p { margin: 0 0 16px; color: var(--ink-2); }
.empty-view .btn { width: auto; padding: 0 24px; }
.offer-result:empty { display: none; }
.offer-result { margin-top: 14px; }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.offer-grid > div { padding: 11px 13px; }
.offer-grid > div + div { border-left: 1px solid var(--line); }
.o-num { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.o-label { display: block; font-size: 12px; color: var(--ink-2); }
.verdict { margin: 10px 0 0; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.verdict.ok { background: var(--down-soft); color: var(--down); }
.verdict.bad { background: var(--accent-soft); color: var(--accent); }
.muted-line { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.muted-line b { color: var(--ink); }
.arg { margin: 0 0 12px; padding: 14px 15px; background: var(--surface-2); border-radius: 12px; font-size: 15px; line-height: 1.55; border-left: 3px solid var(--accent); }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; color: var(--ink-2); margin: 10px 0 12px; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Verlauf */
.hist-rows { border-top: 1px solid var(--line); }
.hist-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist-row b { font-weight: 650; }
.hist-row small { display: block; font-size: 12px; color: var(--ink-2); }
.chart { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hero-line); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--hero-line); stroke-width: 1; }
.chart .axis-label { fill: var(--hero-ink-2); font-size: 13px; }
.chart .line-wage { fill: none; stroke: var(--hero-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line-power { fill: none; stroke: var(--hero-ink-2); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.chart .dot { fill: var(--hero-accent); stroke: var(--hero-bg); stroke-width: 2; }
.chart .series-label { font-size: 13px; font-weight: 700; }
.chart .series-label.wage { fill: var(--hero-accent); }
.chart .series-label.power { fill: var(--hero-ink-2); }
.hero .fine-note { margin: 12px 0 0; font-size: 12px; color: var(--hero-ink-2); }
.snap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.snap:last-child { border-bottom: 0; }
.snap .s-top { font-weight: 700; }
.snap .s-sub { font-size: 13px; color: var(--ink-2); grid-column: 1; }
.snap .s-diff.up { color: var(--accent); }
.snap .s-diff.down { color: var(--down); }
.snap button { grid-row: 1 / span 2; grid-column: 2; font: inherit; font-size: 13px; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.empty-line { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }

/* Mehr */
.settings { display: grid; gap: 14px; max-width: 680px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg.wide { display: flex; margin-top: 8px; }
.seg button {
  flex: 1; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 650;
  padding: 7px 10px; border-radius: 999px; cursor: pointer; min-height: 36px;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.info { font-size: 14px; color: var(--ink-2); }
.info p { margin: 8px 0 0; }
.info ul { padding-left: 18px; margin: 8px 0 0; }
.info li + li { margin-top: 4px; }
.info a { color: inherit; }

/* Leiste unten auf dem Handy (über der Navigation) */
.dock { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 20; max-width: 560px; margin: 0 auto; }
.dock button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left;
  background: var(--hero-bg); color: var(--hero-ink); border: 0; border-radius: 16px; padding: 9px 16px; min-height: 54px;
  font: inherit; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.d-left { display: grid; }
.d-num { color: var(--hero-accent); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.d-num.down { color: var(--hero-down); }
.d-sub { font-size: 12px; color: var(--hero-ink-2); }
.d-go { font-weight: 700; font-size: 14px; white-space: nowrap; }
@media (min-width: 880px) { .dock { display: none !important; } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 76px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 880px) { .toast { bottom: 28px; } }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

.report { display: none; }

@media print {
  @page { size: A4; margin: 18mm; }
  body, :root[data-scheme="dark"] body { background: #fff; color: #000; font-size: 11pt; }
  .app, .dock, .toast, .bottom-nav { display: none !important; }
  .report { display: block; }
  .report h1 { font-size: 20pt; margin: 0 0 2mm; letter-spacing: -0.01em; }
  .report .meta { color: #444; margin: 0 0 8mm; }
  .report .headline { border: 1.5pt solid #000; padding: 5mm 6mm; margin-bottom: 7mm; }
  .report .headline .n { font-size: 26pt; font-weight: 800; letter-spacing: -0.02em; }
  .report .headline p { margin: 1mm 0 0; }
  .report h2 { font-size: 10pt; color: #000; margin: 7mm 0 2mm; }
  .report table { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .report th, .report td { text-align: right; padding: 1.6mm 2mm; border-bottom: 0.5pt solid #999; }
  .report th:first-child, .report td:first-child { text-align: left; padding-left: 0; }
  .report th { font-weight: 700; border-bottom: 1pt solid #000; }
  .report tfoot td { font-weight: 700; border-bottom: 0; border-top: 1pt solid #000; }
  .report .argp { margin: 0; line-height: 1.5; }
  .report .small { font-size: 8.5pt; color: #444; }
  .report ul { padding-left: 5mm; margin: 0; }
}

/* =========================================================
   Reallohn Design Refresh 2026
   UI-only layer: calculation logic and markup remain unchanged.
   ========================================================= */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1eee8;
  --ink: #15171c;
  --ink-2: #69707b;
  --line: #e5e1d9;
  --accent: #1A4580;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 35, 64, .09);
  --down: #168253;
  --down-soft: rgba(22, 130, 83, .10);
  --field: #ffffff;
  --hero-bg: #111318;
  --hero-ink: #fbfaf7;
  --hero-ink-2: #a8adb7;
  --hero-line: #30343d;
  --hero-accent: #4FD1C9;
  --hero-down: #72d6a4;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(18,20,26,.03), 0 14px 40px rgba(18,20,26,.07);
}

body {
  background:
    radial-gradient(circle at 15% -10%, rgba(11, 35, 64,.055), transparent 28rem),
    var(--bg);
  letter-spacing: -.005em;
}

.app {
  max-width: 1180px;
  padding-left: 22px;
  padding-right: 22px;
}

.top {
  padding: 18px 0 22px;
  border-bottom: 1px solid rgba(229,225,217,.75);
  margin-bottom: 18px;
}

.brand {
  gap: 10px;
  font-size: 18px;
  letter-spacing: -.025em;
}

.logo {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.08));
}

.seg {
  padding: 4px;
  box-shadow: 0 3px 12px rgba(18,20,26,.04);
}

.seg button {
  min-height: 36px;
  padding: 7px 15px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.install-banner {
  border: 1px solid rgba(11, 35, 64,.14);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 6px 20px rgba(11, 35, 64,.05);
}

.grid {
  gap: 34px;
}

@media (min-width: 880px) {
  .grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
    gap: 54px;
  }

  .result {
    top: 18px;
    max-height: calc(100vh - 36px);
  }
}

.stand {
  margin-top: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 2px 8px rgba(18,20,26,.03);
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: .99;
  letter-spacing: -.055em;
  margin: 18px 0 14px;
}

h1 em {
  color: var(--accent);
  position: relative;
}

.lead {
  font-size: 17px;
  line-height: 1.55;
  max-width: 58ch;
  margin-bottom: 26px;
}

.quick {
  margin: 0 0 28px;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.58);
  border-radius: 18px;
}

.quick-label {
  margin: 0 0 10px 2px;
}

.chips {
  gap: 9px;
}

.chip {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 13px;
  min-height: 42px;
  padding: 9px 14px;
  box-shadow: 0 2px 8px rgba(18,20,26,.025);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.chip:hover {
  border-color: rgba(11, 35, 64,.42);
  box-shadow: 0 5px 16px rgba(18,20,26,.07);
  transform: translateY(-1px);
}

.field-label {
  margin-bottom: 7px;
  letter-spacing: .005em;
}

input[type="text"] {
  border-radius: 14px;
  border-color: var(--line);
  min-height: 50px;
  box-shadow: inset 0 1px 1px rgba(18,20,26,.025);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: rgba(11, 35, 64,.7);
  box-shadow: 0 0 0 4px rgba(11, 35, 64,.10);
}

.wage input {
  min-height: 62px;
  font-size: 23px;
  border-radius: 16px;
}

.rows-head {
  margin-top: 30px;
  padding: 0 2px 9px;
}

.rows {
  border-top: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.48);
}

.group-title {
  margin: 22px 3px 7px;
  font-size: 11px;
  letter-spacing: .13em;
}

.row {
  padding: 11px 12px;
  border-bottom-color: var(--line);
  transition: background .16s ease;
}

.row:hover {
  background: rgba(11, 35, 64,.025);
}

.row:last-child {
  border-bottom: 0;
}

.row-label b {
  font-weight: 650;
}

.row .money input,
.row .rate {
  border-radius: 11px;
}

.row .rate.custom {
  box-shadow: 0 0 0 3px rgba(11, 35, 64,.07);
}

.hint {
  margin: 14px 3px 0;
  line-height: 1.5;
}

.btn {
  border-radius: 14px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  box-shadow: 0 8px 20px rgba(11, 35, 64,.20);
}

.btn.primary:hover {
  box-shadow: 0 11px 26px rgba(11, 35, 64,.27);
}

.btn.secondary {
  border-radius: 13px;
}

.btn.ghost:hover {
  background: var(--surface);
  color: var(--ink);
}

.result {
  gap: 16px;
}

.card {
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 18px;
  letter-spacing: -.025em;
}

.card-lead {
  line-height: 1.5;
}

.card.hero {
  min-height: 265px;
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(79, 209, 201,.22), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(255,255,255,.045), transparent 55%),
    var(--hero-bg);
  box-shadow: 0 18px 48px rgba(17,19,24,.18);
}

.kicker {
  letter-spacing: .13em;
}

.big {
  font-size: clamp(50px, 7vw, 76px);
  letter-spacing: -.065em;
  margin-top: 8px;
}

.big small {
  font-size: 18px;
  margin-top: 9px;
}

.sub {
  font-size: 14px;
  line-height: 1.5;
  max-width: 48ch;
}

.meter {
  margin-top: 23px;
  padding-top: 18px;
}

.m-track {
  height: 9px;
  border-radius: 999px;
}

.m-fill {
  border-radius: 999px;
}

.bars {
  gap: 13px;
}

.bar-row {
  padding: 2px 0;
}

.bar-track {
  height: 7px;
  border-radius: 999px;
}

.bar-fill {
  border-radius: 999px;
}

.offer-grid {
  border-radius: 14px;
  background: var(--surface-2);
}

.offer-grid > div {
  padding: 14px;
  background: rgba(255,255,255,.45);
}

.verdict {
  border-radius: 14px;
}

.arg {
  border-left-width: 4px;
  border-radius: 14px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(18,20,26,.02);
}

.pdf-box {
  margin-top: 20px;
}

.about {
  padding: 4px 5px;
}

.about summary {
  padding: 9px 0;
}

.privacy {
  opacity: .8;
}

.dock {
  left: 14px;
  right: 14px;
}

.dock button {
  border-radius: 18px;
  min-height: 62px;
  padding: 11px 17px;
  box-shadow: 0 14px 36px rgba(0,0,0,.28);
  backdrop-filter: blur(14px);
}

.toast {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

@media (max-width: 879px) {
  .app {
    padding-left: 15px;
    padding-right: 15px;
  }

  .top {
    padding-top: 13px;
    margin-bottom: 8px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .lead {
    font-size: 16px;
  }

  .card.hero {
    border-radius: 21px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: card-in .35s ease both;
  }

  .result .card:nth-child(2) { animation-delay: .04s; }
  .result .card:nth-child(3) { animation-delay: .08s; }
  .result .card:nth-child(4) { animation-delay: .12s; }

  @keyframes card-in {
    from { opacity: .7; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

:root[data-scheme="dark"] {
  --bg: #0e1013;
  --surface: #17191e;
  --surface-2: #20232a;
  --ink: #f0eee8;
  --ink-2: #a3a8b2;
  --line: #2d3037;
  --accent: #4FD1C9;
  --accent-soft: rgba(79, 209, 201,.12);
  --field: #131519;
  --hero-bg: #191c22;
  --hero-ink: #f7f5ef;
  --hero-ink-2: #a8adb7;
  --hero-line: #383c45;
  --shadow: 0 12px 38px rgba(0,0,0,.24);
}

:root[data-scheme="dark"] body {
  background:
    radial-gradient(circle at 15% -10%, rgba(79, 209, 201,.07), transparent 28rem),
    var(--bg);
}

:root[data-scheme="dark"] .top {
  border-bottom-color: rgba(45,48,55,.75);
}

:root[data-scheme="dark"] .stand,
:root[data-scheme="dark"] .quick,
:root[data-scheme="dark"] .chip {
  background: rgba(23,25,30,.82);
}

:root[data-scheme="dark"] .rows {
  background: rgba(23,25,30,.5);
}

:root[data-scheme="dark"] .row:hover {
  background: rgba(79, 209, 201,.045);
}

@media (max-width: 420px) {
  .quick {
    padding: 13px;
  }

  .row {
    padding-left: 9px;
    padding-right: 9px;
  }

  .card {
    padding: 18px;
  }

  .card.hero {
    padding: 21px;
  }
}

/* =========================================================
   Korrekturen zum Design-Refresh (Dunkelmodus, Fokus)
   Der Refresh setzt einige Farben nur für hell; hier die dunklen Werte.
   ========================================================= */

:root[data-scheme="dark"] {
  --accent-ink: #15171c;
  --down: #5cc692;
  --down-soft: rgba(92, 198, 146, .13);
  --hero-accent: #4FD1C9;
  --hero-down: #6fd6a2;
}

:root[data-scheme="dark"] .offer-grid > div {
  background: rgba(23, 25, 30, .5);
}

/* Sichtbarer Fokus für Tastatur-Bedienung */
input[type="text"]:focus {
  box-shadow: 0 0 0 3px rgba(11, 35, 64, .35);
}

.btn:focus-visible,
.chip:focus-visible,
.seg button:focus-visible,
.tabs button:focus-visible,
.bottom-nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =========================================================
   Neue Elemente: Fortschritt, Budget, Einmalzahlung, Forderung,
   letzte Lohnerhöhung, Rückgängig, Sicherung
   ========================================================= */

.progress { display: block; font-weight: 500; }
.rate-head { flex: none; }
.budget { margin: 6px 0 2px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.field.extra { margin-top: 12px; }
.verdict.warn { background: var(--surface-2); color: var(--ink); border-left: 4px solid var(--accent); }
.fine-line { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }

.select {
  width: 100%; font: inherit; color: var(--ink); cursor: pointer;
  background-color: var(--field); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 36px 11px 12px; min-height: 50px;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-row.wrap { flex-wrap: wrap; }
.btn-row.wrap .btn { flex: 1 1 auto; }

.toast { width: max-content; }
.toast.has-action { display: flex; align-items: center; gap: 12px; pointer-events: auto; padding: 6px 8px 6px 16px; text-align: left; }
.toast button {
  flex: none; font: inherit; font-size: 14px; font-weight: 750; color: inherit; cursor: pointer;
  background: none; border: 1px solid currentColor; border-radius: 999px; padding: 5px 12px; min-height: 34px;
}
.toast button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Mehr: Karten nie breiter als der Bildschirm */
.settings { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 879px) {
  .seg button { padding: 7px 8px; }
}

/* =========================================================
   Neue Elemente: Gruppen, Rate-Etikett, Brutto, CSV-Import,
   Mietzins-Check, Erinnerung, Rangliste, Einstieg
   ========================================================= */

.btn.slim { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Gruppen einklappbar, mit Summe */
.group-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 18px 0 7px; padding: 6px 3px; min-height: 40px;
  font: inherit; color: inherit; text-align: left; background: none; border: 0; border-radius: 10px; cursor: pointer;
}
.group-head .group-title { margin: 0; flex: 1; min-width: 0; }
.group-sum { font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.group-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.group-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }

/* Zeile: Rate als kleines Etikett, antippen macht ein Feld daraus */
.row { grid-template-columns: minmax(0, 1fr) 128px 84px; }
.rate-cell { display: flex; justify-content: flex-end; }
.rate-cell .rate { width: 100%; }
.rate-chip {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer;
  min-height: 40px; min-width: 66px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid transparent; white-space: nowrap;
}
.rate-chip:hover { border-color: var(--line); color: var(--ink); }
.rate-chip.custom { color: var(--accent); background: var(--accent-soft); border-color: rgba(11, 35, 64, .3); }
.rate-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-label .variant {
  display: block; margin-top: 4px; max-width: 100%;
  font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; min-height: 32px;
}
@media (max-width: 420px) {
  .row { grid-template-columns: minmax(0, 1fr) 104px 70px; }
  .rate-chip { min-width: 0; width: 100%; padding: 0 6px; font-size: 13px; }
}

/* Brutto (aufklappbar) */
.gross { margin-top: 10px; }
.gross summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 650; color: var(--ink-2);
}
.gross summary::-webkit-details-marker { display: none; }
.gross summary::before {
  content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-weight: 800; color: var(--accent); background: var(--accent-soft);
}
.gross[open] summary::before { content: "−"; }
.gross summary:hover { color: var(--ink); }
.gross summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gross .field { margin-top: 6px; }
.gross .hint { margin-top: 8px; }
.gross-line { margin-top: 4px; }

/* CSV-Import */
.csv-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; }
.csv-panel { margin: -12px 0 28px; }
.file-pick { position: relative; display: inline-flex; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-pick .btn { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0 18px; }
.file-pick input:focus-visible + .btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.csv-result:empty { display: none; }
.csv-result { margin-top: 12px; }
.csv-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.csv-table th, .csv-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.csv-table th:first-child, .csv-table td:first-child { text-align: left; padding-left: 0; }
.csv-table th { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.csv-result .check { align-items: flex-start; }
.csv-result .check input { margin-top: 2px; flex: none; }
.csv-result .btn-row { margin-top: 12px; }

/* Ergebnis-Knöpfe: drei Knöpfe, der Hauptknopf auf eigener Zeile */
#resultActions { flex-wrap: wrap; }
#resultActions .btn.secondary { flex: 1 1 140px; }
#resultActions .btn.primary { flex: 1 1 100%; }

/* Mietzins-Check */
.form-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; align-items: end; } }
.field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.rent-lines { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.rent-lines li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.rent-lines li.total { color: var(--ink); font-weight: 700; border-bottom: 0; }
.verdict.neutral { background: var(--surface-2); color: var(--ink); }
#rentResult .verdict { font-weight: 600; line-height: 1.5; }
.muted-line.small { font-size: 12px; line-height: 1.5; }
.muted-line a { color: inherit; }

/* Erinnerung */
.input {
  width: 100%; font: inherit; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; min-height: 50px;
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Europa-Rangliste */
.rank-list { display: grid; gap: 2px; margin-bottom: 12px; }
.rank-row { display: grid; grid-template-columns: 24px minmax(7.5em, 1.3fr) minmax(48px, 1fr) 54px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 10px; font-size: 14px; }
.rank-row .rk { color: var(--ink-2); font-size: 12px; text-align: right; }
.rank-row .rn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .rb { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.rank-row .rf { display: block; height: 100%; background: var(--ink-2); border-radius: 999px; opacity: .55; }
.rank-row .rf.down { background: var(--down); opacity: 1; }
.rank-row .rf.over { background-image: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255, 255, 255, .45) 4px 6px); }
.rank-row .rv { text-align: right; font-weight: 650; }
.rank-row.mine { background: var(--surface-2); font-weight: 700; }
.rank-row.mine .rf { background: var(--ink); opacity: 1; }
.rank-row.you { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.rank-row.you .rk { color: var(--accent); }
.rank-row.you .rf { background: var(--accent); opacity: 1; }

/* Einstieg beim ersten Öffnen */
body.no-scroll { overflow: hidden; }
.onboard {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; overflow-y: auto;
  padding: 16px; background: rgba(14, 16, 19, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ob-card {
  width: 100%; max-width: 460px; margin: auto; padding: 26px 22px 22px;
  background: var(--surface); color: var(--ink); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.ob-logo { width: 44px; height: 44px; }
.ob-card h2 { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.08; letter-spacing: -.04em; margin: 14px 0 16px; text-wrap: balance; }
.ob-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; counter-reset: ob; }
.ob-points li { position: relative; padding-left: 38px; font-size: 14px; color: var(--ink-2); line-height: 1.45; counter-increment: ob; }
.ob-points li::before {
  content: counter(ob); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--accent); background: var(--accent-soft);
}
.ob-points b { display: block; color: var(--ink); font-size: 15px; }
.ob-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.ob-card .btn-row .btn.primary { flex: 1 1 100%; }
.ob-card .btn-row .btn.secondary { flex: 1 1 100%; }
@media (max-width: 360px) { .ob-picks { grid-template-columns: 1fr; } }

/* Hinweis «neue Zahlen» */
.news {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start;
  margin: 14px 0 0; padding: 14px 16px; border-radius: 16px;
  background: var(--accent-soft); border: 1px solid rgba(11, 35, 64, .18);
}
.news svg { width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.news p { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; }
.news .btn { grid-column: 2; justify-self: start; margin-top: 6px; }

/* Krankenkasse */
#kkCard .muted-line { margin: 0 0 14px; }
#kkCard .btn { flex: 1 1 180px; }
.news .btn { background: var(--surface); color: var(--ink); }

/* Lohnrunden */
.wr-list { display: grid; gap: 4px; }
.wr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.wr-l b { display: block; font-size: 14px; font-weight: 650; }
.wr-l small { display: block; font-size: 12px; color: var(--ink-2); }
.wr-v { font-weight: 750; }
.wr-bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.wr-bar span { display: block; height: 100%; border-radius: 999px; background: var(--ink-2); opacity: .55; }
.wr-row.demand .wr-bar span { background: transparent; opacity: 1; border: 1.5px dashed var(--ink-2); box-sizing: border-box; }
.wr-row.you { background: var(--accent-soft); }
.wr-row.you b, .wr-row.you .wr-v { color: var(--accent); }
.wr-row.you .wr-bar span { background: var(--accent); opacity: 1; }

/* Handy: Spalten nie breiter als der Bildschirm (sonst bestimmt der breiteste Inhalt die Spalte) */
@media (max-width: 879px) {
  .grid, .grid.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .rank-row { grid-template-columns: 20px minmax(0, 1.4fr) minmax(32px, 1fr) 50px; gap: 8px; }
}

/* Geteiltes Ergebnis */
.card.shared { margin-bottom: 22px; min-height: 0; }
.shared-drivers { list-style: none; margin: 16px 0 18px; padding: 14px 0 0; border-top: 1px solid var(--hero-line); display: grid; gap: 6px; }
.shared-drivers li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.shared-drivers b { color: var(--hero-accent); }

/* Haushalte */
.hh-pick { margin-bottom: 14px; }
.hh-list { display: grid; gap: 8px; margin-bottom: 12px; }
.hh-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.hh-row input { min-height: 44px; }
.hh-tag { font-size: 13px; font-weight: 700; color: var(--accent); padding: 0 6px; white-space: nowrap; }
.hh-del { min-width: 40px; padding: 0 10px; font-size: 18px; }

/* Arbeitsweg */
.commute { margin-top: 14px; }
.commute .form-grid { margin-top: 8px; }
.commute .muted-line { margin: 12px 0; }

/* Jahresrückblick */
.spark { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.commute .form-grid { grid-template-columns: 1fr 1fr; align-items: end; }

/* PayPace Plus */
body.no-plus .plus-only { display: none !important; }
body:not(.no-plus) .plus-teaser { display: none !important; }
.plus-badge {
  display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
}
.plus-teaser .btn.primary { margin-top: 4px; }
.teaser-arg { position: relative; max-height: 4.8em; overflow: hidden; }
.teaser-arg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; background: linear-gradient(transparent, var(--surface-2)); }
.plus-card { position: relative; }
.plus-close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  font: inherit; font-size: 22px; line-height: 1; color: var(--ink-2); background: var(--surface-2); border: 0; cursor: pointer;
}
.plus-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plus-card h2 { font-size: clamp(24px, 6vw, 28px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 8px; }
.plus-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.plus-list li { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.45; }
.plus-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--accent); background: var(--accent-soft); }
.plus-active { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-weight: 700; background: var(--down-soft); color: var(--down); }
#plusBuy { width: 100%; }
.plus-code { margin-top: 12px; }
.plus-code summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.plus-code .field { margin: 6px 0 10px; }
.plus-code input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

/* Diesen Monat */
.month-card { margin: 0 0 24px; padding: 16px 18px; }
.kicker-plain { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.month-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.month-item:first-child { border-top: 0; padding-top: 2px; }
.month-item b { display: block; font-size: 15px; }
.month-item span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.month-item .btn { white-space: nowrap; }
.year-plan { margin-top: 8px; }
.year-plan summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.year-plan ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.year-plan li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; font-size: 13px; color: var(--ink-2); }
.year-plan li b { color: var(--ink); font-weight: 650; }
.year-plan li.now b, .year-plan li.now span:first-child { color: var(--accent); }
@media (max-width: 400px) { .year-plan li { grid-template-columns: 1fr; gap: 0; } .month-item { grid-template-columns: 1fr; } .month-item .btn { justify-self: start; } }

/* Module: Strom, Nebenkosten, Steuern */
.module .form-grid { margin-bottom: 6px; }
@media (min-width: 560px) { #powerCard .form-grid { grid-template-columns: 1fr 1fr 1fr; } }
.module .btn.secondary { margin-top: 12px; }
.tax-list { display: grid; gap: 2px; }
.tax-list .check { margin: 0; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.tax-list .check:last-child { border-bottom: 0; }
.tax-list .check input:checked + span { color: var(--ink-2); text-decoration: line-through; }
.card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); } }


/* ===== Redesign 1c «Bank trifft Fintech» (Oktober 2026) ===== */
:root {
  --bg: #F5F7FA; --surface: #FFFFFF; --surface-2: #EEF1F5;
  --ink: #0B1A2E; --ink-2: #56637A; --line: #E1E6ED;
  --accent: #1A4580; --accent-ink: #FFFFFF; --accent-soft: rgba(26, 69, 128, .08);
  --down: #1C7A52; --down-soft: rgba(28, 122, 82, .10);
  --field: #FFFFFF;
  --hero-bg: #1A4580; --hero-ink: #FFFFFF; --hero-ink-2: #C3D2E8; --hero-line: rgba(255,255,255,.14);
  --hero-accent: #4FD1C9; --hero-down: #8FE3B3;
  --nav-bg: rgba(255, 255, 255, .94);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 35, 64, .04);
  --rate: #0E7478;
}
:root[data-scheme="dark"] {
  --bg: #08111F; --surface: #0F1D31; --surface-2: #15263D;
  --ink: #E8EEF6; --ink-2: #9AABC2; --line: #1F334D;
  --accent: #4FD1C9; --accent-ink: #08111F; --accent-soft: rgba(79, 209, 201, .12);
  --down: #7FD9A8; --down-soft: rgba(127, 217, 168, .12);
  --field: #0B1728;
  --hero-bg: #173D70; --hero-ink: #FFFFFF; --hero-ink-2: #A9B8CE; --hero-line: rgba(255,255,255,.12);
  --hero-accent: #4FD1C9; --hero-down: #8FE3B3;
  --nav-bg: rgba(15, 29, 49, .94);
  --shadow: none;
  --rate: #4FD1C9;
}
.logo .lg-bg { fill: #1A4580; }
.logo .lg-a { fill: #FFFFFF; }
.logo .lg-b { fill: #4FD1C9; }
:root[data-scheme="dark"] .logo .lg-bg { fill: #FFFFFF; }
:root[data-scheme="dark"] .logo .lg-a { fill: #1A4580; }
:root[data-scheme="dark"] .logo .lg-b { fill: #0E8A8E; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
h1 { font-weight: 700; letter-spacing: -0.02em; }
h1 em { color: inherit; }
.group-title { color: var(--ink); letter-spacing: .06em; font-weight: 700; }
.chip, .country-pick select, .stand { border-radius: 8px; }
.chip:hover { border-color: var(--accent); }
.tabs, .tabs button { border-radius: 10px; }
.tabs button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
input[type="text"] { border-radius: 8px; }

input[type="text"]:focus { outline-color: #0E7478; box-shadow: 0 0 0 3px rgba(14, 116, 120, .16); }
:root[data-scheme="dark"] input[type="text"]:focus { outline-color: #4FD1C9; box-shadow: 0 0 0 3px rgba(79, 209, 201, .18); }

.card.hero { background: var(--hero-bg); border-radius: 14px; }

/* Warnungen bleiben rot: Der Akzent ist jetzt Dunkelblau und taugt nicht als Signal für «reicht nicht» */
:root { --bad: #B42318; --bad-soft: rgba(180, 35, 24, .08); }
:root[data-scheme="dark"] { --bad: #FF8A7A; --bad-soft: rgba(255, 138, 122, .12); }
.verdict.bad { background: var(--bad-soft); color: var(--bad); }
.snap .s-diff.up { color: var(--bad); }

/* ===== Layout 1c: dunkler Kopf mit Ergebnis, Ausgaben als Kontoauszug (Oktober 2026) ===== */
:root {
  --band: #1A4580; --band-2: #225293; --band-ink: #FFFFFF; --band-ink-2: #C3D2E8; --band-ink-3: #D6E0EE;
  --band-line: rgba(255, 255, 255, .14); --row-line: #EEF1F5; --line-strong: #D3DAE4;
}
:root[data-scheme="dark"] {
  --band: #173D70; --band-2: #1E4A84; --band-ink-2: #A9B8CE; --band-ink-3: #C5D1E2; --band-line: rgba(255, 255, 255, .10); --row-line: #18293F; --line-strong: #27405F;
}
:root[data-scheme="dark"] body { background: var(--bg); }

/* Kopf */
.band { background: var(--band); color: var(--band-ink); }
.band-in { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
:root .band-in .top { display: flex; align-items: center; gap: 16px; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--band-line); }
.band .brand { color: var(--band-ink); }
.band .brand-tag { display: none; }
.band .logo .lg-bg { fill: #FFFFFF; }
.band .logo .lg-a { fill: #1A4580; }
.band .logo .lg-b { fill: #0E8A8E; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
:root .band .country-pick select {
  background-color: transparent; color: var(--band-ink); border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; min-height: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--band-ink-3) 50%), linear-gradient(135deg, var(--band-ink-3) 50%, transparent 50%);
}
.band .country-pick select option { color: #0B1A2E; background: #FFFFFF; }
.band .country-pick select:focus-visible { outline-color: var(--hero-accent); }

.theme-btn {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: var(--band-ink);
}
.theme-btn:hover { background: rgba(255, 255, 255, .08); }
.theme-btn:focus-visible { outline: 2px solid var(--hero-accent); outline-offset: 2px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-scheme="dark"] .theme-btn .i-sun { display: block; }
:root[data-scheme="dark"] .theme-btn .i-moon { display: none; }

@media (min-width: 880px) {
  :root .band .tabs { display: flex; gap: 4px; margin: 0 0 0 20px; padding: 0; background: none; border: 0; border-radius: 0; width: auto; }
  :root .band .tabs button { color: var(--band-ink-3); border-radius: 8px; padding: 8px 14px; font-weight: 500; }
  :root .band .tabs button:hover { color: var(--band-ink); }
  :root .band .tabs button[aria-current="page"] { background: rgba(255, 255, 255, .12); color: var(--band-ink); font-weight: 600; }
}

/* Ergebnis im Kopf (nur im Rechner) */
.band-hero { padding: 24px 0 28px; }
body:not([data-view="rechner"]) .band-hero { display: none; }
body:not([data-view="rechner"]) .band-in .top { border-bottom: 0; }
.band-hero h1 { color: var(--band-ink); font-size: clamp(30px, 7.4vw, 44px); margin: 0 0 10px; max-width: 20ch; }
.band-hero .lead { color: var(--band-ink-3); margin: 0; max-width: 52ch; }
.band .kicker { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--band-ink-2); }
.band .big {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 4px 0 0;
  color: var(--band-ink); font-size: clamp(42px, 12vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05;
}
.band .big.down { color: var(--hero-down); }
.band .big small { display: inline; margin: 0; font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--band-ink-3); }
.band .sub { margin: 6px 0 0; font-size: 14px; color: var(--band-ink-3); }
.band .sub b { color: var(--band-ink); }
.band .meter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0 0; padding: 0; border: 0;
  background: var(--band-line); border-radius: 12px; overflow: hidden;
}
.tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px; background: var(--band-2); }
.t-label { font-size: 12px; color: var(--band-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-val { font-size: 22px; font-weight: 700; color: var(--band-ink); letter-spacing: -.01em; }
.tile.me .t-val { color: var(--hero-accent); }
.tile.me .t-val.down { color: var(--hero-down); }
.band .meter-note { display: none; }
.bh-cta { display: none; }

@media (min-width: 880px) {
  .bh-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 40px; align-items: end; }
  .band .meter { display: flex; gap: 40px; margin: 0; background: none; border-radius: 0; overflow: visible; }
  .tile { padding: 0; background: none; }
  .t-val { font-size: 28px; }
  .band .big { font-size: 56px; line-height: 1; }
  .band .big small { font-size: 16px; }
  .bh-cta {
    display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 10px; white-space: nowrap;
    background: var(--hero-accent); color: #0B2340; font-weight: 700; font-size: 15px; text-decoration: none;
  }
  .bh-cta:hover { filter: brightness(1.06); }
  .bh-cta:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
  .app { padding-top: 28px; }
  #view-rechner .grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
}
@media (min-width: 1060px) { #view-rechner .grid { grid-template-columns: minmax(0, 1fr) 380px; } }

/* Handy: der Inhalt liegt wie ein Blatt über dem Kopf */
@media (max-width: 879px) {
  .band-in { padding: 0 16px; }
  :root .band-in .top { border-bottom: 0; padding: 12px 0 4px; }
  .app { padding-top: 16px; }
  body[data-view="rechner"] .band-hero { padding: 14px 0 46px; }
  body[data-view="rechner"] .app { position: relative; margin-top: -22px; padding-top: 18px; border-radius: 22px 22px 0 0; background: var(--bg); }
}
@media (max-width: 360px) { .band .country-pick select { max-width: 38vw; } }

/* Schnellstart als eine Zeile */
#view-rechner .quick {
  display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 0 0 2px;
  background: none; border: 0; box-shadow: none; overflow-x: auto; scrollbar-width: none;
}
#view-rechner .quick::-webkit-scrollbar { display: none; }
#view-rechner .quick .chips { flex-wrap: nowrap; }
#view-rechner .quick .chip, #view-rechner .quick .csv-btn {
  flex: none; min-height: 36px; padding: 0 12px; margin: 0; border-radius: 8px; white-space: nowrap;
  font-size: 13px; background: var(--surface); border: 1px solid var(--line-strong);
}
#view-rechner .quick .chip { font-weight: 500; color: var(--ink); }
#view-rechner .quick .chip:hover { border-color: var(--accent); }
#view-rechner .quick .csv-btn { font-weight: 600; color: var(--rate); }
#view-rechner .quick .csv-btn svg { width: 16px; height: 16px; }
#view-rechner .csv-panel { margin: 0 0 14px; }

/* Nettolohn als eine Zeile */
#view-rechner .field.wage {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px 5px 5px 14px;
}
#view-rechner .wage .field-label { margin: 0; font-size: 14px; font-weight: 500; }
#view-rechner .wage .money { flex: 0 1 210px; min-width: 0; }
#view-rechner .wage input { min-height: 44px; font-size: 18px; font-weight: 700; background: transparent; border-color: transparent; }
#view-rechner .wage input:hover { background: var(--bg); }

/* Ausgaben als Kontoauszug */
.ledger { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ledger-head, #groups .row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 104px; gap: 8px; align-items: center; padding: 0 14px; }
.ledger-head {
  padding-top: 10px; padding-bottom: 10px; background: var(--bg); border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.ledger-head span:not(:first-child) { text-align: right; }
.ledger .rate-head { min-width: 0; white-space: normal; }
#groups .group-head { margin: 0; padding: 12px 14px 6px; min-height: 0; gap: 8px; border-radius: 0; }
#groups .group-title { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; color: var(--ink); }
#groups .group-sum { font-size: 12px; font-weight: 600; color: var(--ink-2); }
#groups .chev { width: 14px; height: 14px; }
#groups .rows { border-top: 0; background: none; }
#groups .row { padding-top: 5px; padding-bottom: 5px; border-bottom: 0; border-top: 1px solid var(--row-line); min-height: 48px; }
#groups .row-label b { font-size: 14px; font-weight: 500; }
#groups .row-label span { font-size: 12px; }
#groups .rate-cell { order: 2; }
#groups .row .money { order: 3; }
#groups .row .money .cur { display: none; }
#groups .row .money input {
  min-height: 38px; padding: 4px 8px; text-align: right; font-size: 16px; font-weight: 600;
  background: var(--bg); border: 1px solid transparent; border-radius: 6px;
}
#groups .row .money input:hover { border-color: var(--line-strong); }
#groups .row .money input:placeholder-shown { font-weight: 400; }
#groups .rate-chip {
  width: auto; min-width: 0; min-height: 34px; padding: 0 2px; border: 0; border-radius: 6px; background: none;
  font-size: 12px; font-weight: 600; color: var(--rate);
}
#groups .rate-chip:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
#groups .rate-chip.custom { padding: 0 6px; background: var(--accent-soft); color: var(--accent); }
#groups .rate { min-height: 36px; font-size: 16px; padding: 4px 6px; }
#groups .row-label .variant { min-height: 28px; padding: 2px 6px; font-size: 12px; }
.ledger-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px;
  border-top: 1px solid var(--line); background: var(--bg); font-size: 14px;
}
.ledger-foot .progress { font-size: 13px; color: var(--ink-2); }
.ledger-note { margin: 10px 2px 0; font-size: 12px; color: var(--ink-2); }
@media (max-width: 420px) {
  .ledger-head, #groups .row { grid-template-columns: minmax(0, 1fr) 58px 88px; gap: 6px; padding-left: 12px; padding-right: 12px; }
  #groups .group-head { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 1060px) {
  #groups { display: grid; grid-template-columns: 1fr 1fr; }
  #groups .group { border-bottom: 1px solid var(--row-line); }
  #groups .group:nth-child(odd) { border-right: 1px solid var(--row-line); }
  #groups .row { grid-template-columns: minmax(0, 1fr) 58px 92px; }
  .ledger-head span:not(:first-child) { display: none; }
}

/* Einstieg: dunkler Bildschirm, Auswahl unten auf einem hellen Blatt */
#onboard { padding: 0; place-items: stretch; background: var(--band); -webkit-backdrop-filter: none; backdrop-filter: none; }
#onboard .ob-card {
  display: flex; flex-direction: column; max-width: none; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0;
  background: none; color: var(--band-ink); border-radius: 0; box-shadow: none; animation: none;
}
#onboard .ob-top { flex: 1; padding: max(26px, env(safe-area-inset-top)) 26px 28px; }
.ob-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 34px; font-size: 18px; font-weight: 700; }
#onboard .ob-logo { width: 34px; height: 34px; }
#onboard .logo .lg-bg { fill: #FFFFFF; }
#onboard .logo .lg-a { fill: #1A4580; }
#onboard .logo .lg-b { fill: #0E8A8E; }
#onboard h2 { margin: 0 0 28px; color: var(--band-ink); font-size: clamp(34px, 10vw, 44px); line-height: 1.04; font-weight: 700; letter-spacing: -.03em; }
#onboard .ob-points { gap: 16px; margin: 0; }
#onboard .ob-points li { padding-left: 34px; color: var(--band-ink-3); }
#onboard .ob-points li::before {
  content: counter(ob, decimal-leading-zero); display: block; top: 2px; width: auto; height: auto;
  background: none; color: var(--hero-accent); font-size: 13px; font-weight: 700;
}
#onboard .ob-points b { color: var(--band-ink); }
#onboard .ob-sheet { background: var(--surface); color: var(--ink); border-radius: 24px 24px 0 0; padding: 22px 24px calc(26px + env(safe-area-inset-bottom)); }
#onboard .ob-picks { margin-bottom: 14px; }
#onboard .btn-row { flex-direction: column; gap: 6px; }
#onboard .btn.primary { min-height: 54px; }
#onboard .btn.secondary { background: none; border: 0; color: var(--rate); min-height: 42px; }
@media (min-width: 640px) {
  #onboard { place-items: center; padding: 24px; }
  #onboard .ob-card { max-width: 460px; min-height: 0; margin: auto; }
  #onboard .ob-top { padding: 0 4px 30px; }
  #onboard .ob-sheet { border-radius: 20px; }
}
#groups .rows { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#view-rechner .wage .money { flex-basis: 132px; }
#view-rechner .wage .field-label { flex: 1; min-width: 0; }
#view-rechner .wage .money .cur { left: 10px; }
#view-rechner .wage .money input { padding-left: 44px; }
.bar-fill { background: #0E8A8E; }
:root[data-scheme="dark"] .bar-fill { background: var(--hero-accent); }
.bar-fill.down, :root[data-scheme="dark"] .bar-fill.down { background: var(--down); }

/* Einwände-Trainer */
.obj { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.obj-q { margin: 0; padding: 14px 16px; background: var(--surface-2); font-weight: 700; font-size: 16px; }
.obj-a { margin: 0; padding: 14px 16px; font-size: 15px; line-height: 1.55; border-left: 3px solid var(--rate); }
.obj-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.obj-pos { font-size: 13px; color: var(--ink-2); }

/* Franchise-Rechner */
.fr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fr-table th { text-align: right; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.fr-table td { text-align: right; padding: 8px; border-bottom: 1px solid var(--row-line); }
.fr-table th:first-child, .fr-table td:first-child { text-align: left; }
.fr-table tr.cur td:first-child::after { content: " •"; color: var(--ink-2); }
.fr-table tr.best td { background: var(--down-soft); color: var(--down); font-weight: 700; }
#frCard .form-grid { grid-template-columns: 1fr; }
@media (min-width: 400px) { #frCard .form-grid { grid-template-columns: 1fr 1fr; align-items: end; } #frCard .form-grid .field:last-child { grid-column: 1 / -1; } }

/* Leere Zeilen schätzen, Preis-Explorer */
#fillSwitch[hidden] + .fill-hint { display: none; }
#fillSwitch { margin-top: 16px; }
.fill-hint { margin-top: 6px; }
#groups .row .money input:placeholder-shown::placeholder { font-style: normal; }
.items-actions { margin-top: 12px; justify-content: space-between; }
.items-actions .btn { flex: none; }

/* Was wäre wenn, Marktlohn */
#wiCard .check { margin: 12px 0 8px; }
.wi-table td:not(:first-child) { white-space: nowrap; }
.mkt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mkt-list li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mkt-list a { font-weight: 700; color: var(--rate); text-decoration: none; }
.mkt-list a:hover { text-decoration: underline; }
.mkt-list span { font-size: 13px; color: var(--ink-2); }
.result { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 400px) { .wi-table td:not(:first-child) { white-space: normal; } .fr-table th, .fr-table td { padding-left: 4px; padding-right: 4px; } }
.fr-table { table-layout: fixed; } .fr-table th { overflow-wrap: anywhere; hyphens: auto; }

/* Sprachauswahl im Kopf: zeigt das Kürzel, beim Antippen die ganze Liste */
.lang-pick {
  position: relative; flex: none; display: grid; place-items: center; min-width: 48px; height: 36px; padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; color: var(--band-ink); font-size: 14px; font-weight: 600; cursor: pointer;
}
.lang-pick:hover { background: rgba(255, 255, 255, .08); }
.lang-pick:focus-within { outline: 2px solid var(--hero-accent); outline-offset: 2px; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-pick select option { color: #0B1A2E; background: #FFFFFF; }
@media (max-width: 480px) {
  :root .band-in .top { gap: 10px; }
  .top-right { gap: 6px; }
  :root .band .country-pick select { max-width: 34vw; padding-left: 10px; padding-right: 26px; }
}
@media (max-width: 374px) { .band .brand-text { display: none; } }

/* Das Ergebnis steht jetzt im Kopf: die rechte Spalte braucht keine eigene Scrollleiste mehr */
@media (min-width: 880px) {
  #view-rechner .result { position: static; max-height: none; overflow: visible; padding-bottom: 0; }
}
#view-rechner .result .month-card { margin: 0; }

/* Weitere Rechner unter der Tabelle: über die ganze Breite, in bis zu drei Spalten */
.tools { margin-top: 28px; columns: 3 320px; column-gap: 20px; }
.tools > .card { break-inside: avoid; margin: 0 0 20px; animation: none; }
.tools > [hidden] { display: none !important; }
@media (min-width: 880px) {
  /* Rechte Spalte ist jetzt kurz: «Wo es herkommt» bleibt beim Scrollen der Tabelle sichtbar */
  #view-rechner .result { position: sticky; top: 16px; align-self: start; }
}
@media (max-width: 879px) { .tools { margin-top: 20px; } }

/* ===================================================================
   Design 4 (Vorschau nach Vorlage Sandro): Seitenleiste, Rot als Marke
   =================================================================== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #F4F4F6; --side: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1F1F4; --field: #F7F7F9;
  --ink: #15161A; --ink-2: #6B6D75; --ink-3: #9A9CA3; --line: #E4E4E9; --line-strong: #D5D5DC; --row-line: #EDEDF1;
  --red: #D62F35; --red-2: #B4232A; --red-soft: rgba(214, 47, 53, .08); --red-line: rgba(214, 47, 53, .45);
  --hero-from: #FFF1F1; --hero-to: #FFFFFF;
  --accent: var(--red); --accent-ink: #FFFFFF; --accent-soft: var(--red-soft); --rate: var(--red);
  --down: #1F8A5B; --bad: var(--red); --bad-soft: var(--red-soft);
  --hero-bg: #1B1C21; --hero-ink: #FFFFFF; --hero-ink-2: #A9ABB2; --hero-accent: #FF5A5F;
  --nav-bg: #FFFFFF; --radius: 14px;
  --c1: #E5383B; --c2: #F4A259; --c3: #2EC4B6; --c4: #4F8EF7; --c5: #8B7CF6; --c6: #8E9099;
}
:root[data-scheme="dark"] {
  --bg: #0E0F12; --side: #111216; --surface: #15161A; --surface-2: #1C1D22; --field: #1A1B20;
  --ink: #F2F2F3; --ink-2: #A0A2A9; --ink-3: #6E7078; --line: #24262C; --line-strong: #30323A; --row-line: #1F2026;
  --red: #E5383B; --red-2: #FF5A5F; --red-soft: rgba(229, 56, 59, .12); --red-line: rgba(229, 56, 59, .6);
  --hero-from: #3A1216; --hero-to: #17181C;
  --accent: var(--red); --accent-ink: #FFFFFF; --accent-soft: var(--red-soft); --rate: #FF5A5F;
  --down: #5FD39A; --nav-bg: #111216;
}
body { font-family: var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.card { animation: none !important; box-shadow: none; }
.mark { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--red); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.mark.small { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--red-soft); stroke-width: 3.6; }

/* Seitenleiste */
.side { display: none; }
@media (min-width: 1024px) {
  body { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 22px 14px; background: var(--side); border-right: 1px solid var(--line); }
  .bottom-nav { display: none !important; }
  .brand-mobile { visibility: hidden; }
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; color: var(--ink); text-decoration: none; }
.side .brand-text { display: grid; line-height: 1.2; }
.side .brand-name, .brand-mobile .brand-name { font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.side .brand-tag { font-size: 12px; color: var(--ink-2); }
.side-nav { display: grid; gap: 4px; }
.side-nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; position: relative; }
.side-nav button:hover { background: var(--surface-2); color: var(--ink); }
.side-nav button[aria-current="page"] { background: var(--red-soft); color: var(--red-2); font-weight: 600; }
.side-nav button[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.side-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding: 0 10px; }
.side-ver { margin: 22px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* Obere Leiste */
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.brand-mobile { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mobile .mark { width: 28px; height: 28px; }
.topbar .top-right { margin-left: auto; }
.topbar .theme-btn, .topbar .lang-pick { border: 1px solid var(--line); background: none; color: var(--ink); }
.topbar .theme-btn:hover, .topbar .lang-pick:hover { background: var(--surface-2); }
.topbar .country-pick select { background-color: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; min-height: 36px; font-weight: 600;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); }
.topbar .country-pick select option { color: #15161A; background: #fff; }
.lang-pick:focus-within, .theme-btn:focus-visible { outline: 2px solid var(--red); }
.app { padding-top: 0; }

/* Seitenkopf und Ergebnis-Band */
.page-head { padding: 34px 0 20px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(28px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.page-head .lead { margin: 0; font-size: 16px; color: var(--ink-2); }
.hero-card { position: relative; overflow: hidden; padding: 28px; border: 1px solid var(--red-line); border-radius: 16px;
  background: linear-gradient(110deg, var(--hero-from) 0%, var(--hero-to) 70%); }
.hero-card::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid var(--red-line); opacity: .35; pointer-events: none; }
.hero-card .empty .kicker { margin: 0; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.hero-card .empty-text { margin: 6px 0 0; color: var(--ink-2); }
.hero-card .bh-grid:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.hero-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--red); align-self: start; }
.hero-icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; }
.hero-card .kicker { margin: 0; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.hero-card .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 0; font-size: clamp(38px, 5vw, 48px); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--red-2); }
.hero-card .big:not(.down) #raiseAmount::before { content: "+ "; }
.hero-card .big.down { color: var(--down); }
.hero-card .big small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.hero-card .sub { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); max-width: 54ch; }
.hero-card .sub b { color: var(--ink); }
.hero-card #daysLine, .hero-card #grossLine { display: none; }
.hero-card .meter { display: grid; grid-template-columns: repeat(2, minmax(150px, auto)); gap: 12px; margin: 0; padding: 0; border: 0; background: none; }
.hero-card .tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); gap: 8px; }
:root[data-scheme="dark"] .hero-card .tile { background: rgba(255, 255, 255, .02); }
.hero-card .t-label { font-size: 13px; color: var(--ink-2); }
.hero-card .t-val { font-size: 22px; font-weight: 600; color: var(--ink); }
.hero-card .tile.me .t-val { color: var(--red-2); }
.hero-card .meter-note { display: none; }

/* Raster und Flächen */
@media (min-width: 880px) { #view-rechner .grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; margin-top: 22px; align-items: start; } #view-rechner .result { position: static; } }
.panel { padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.panel-title { margin: 0 0 18px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.with-icon { display: flex; align-items: center; gap: 10px; }
.result { gap: 18px; }

/* Haushalt-Kacheln */
#view-rechner .quick { flex-wrap: wrap; overflow: visible; gap: 10px; margin: 0 0 18px; }
#view-rechner .quick .chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
#view-rechner .quick .chip { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; white-space: normal; }
#view-rechner .quick .chip.active { border-color: var(--red); background: var(--red-soft); }
#view-rechner .quick .chip:hover { border-color: var(--red-line); }
.chip-ic { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip.active .chip-ic { stroke: var(--red); }
.chip-txt { display: grid; gap: 2px; }
.chip-txt small { font-size: 12px; font-weight: 400; color: var(--ink-2); }
#view-rechner .quick .csv-btn { border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--ink-2); font-weight: 500; }
@media (max-width: 520px) { #view-rechner .quick .chips { grid-template-columns: 1fr; } }

/* Lohn */
#view-rechner .field.wage { background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
#view-rechner .wage input { background: transparent; }

/* Ausgaben-Liste mit Symbolen */
.ledger { margin-top: 22px; background: none; border: 0; border-radius: 0; overflow: visible; }
.ledger-head { padding: 0 0 8px; background: none; border: 0; font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.ledger-head span:not(:first-child) { display: none !important; }
#groups { display: block !important; }
#groups .group { border: 0 !important; }
#groups .group-head { padding: 14px 0 4px; }
#groups .group-title { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
#groups .group-sum { font-size: 12px; color: var(--ink-3); }
#groups .row { grid-template-columns: 38px minmax(0, 1fr) minmax(96px, 150px) 64px; gap: 12px; padding: 7px 0; border-top: 0; border-bottom: 1px solid var(--row-line); min-height: 54px; }
.cat-ic { order: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--ic) 16%, transparent); }
.cat-ic svg { width: 18px; height: 18px; fill: none; stroke: var(--ic); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#groups .row-label { order: 1; }
#groups .row .money { order: 2; }
#groups .rate-cell { order: 3; justify-content: flex-start; }
#groups .row-label b { font-size: 14px; font-weight: 500; }
#groups .row-label span { font-size: 12px; color: var(--ink-3); }
#groups .row .money input { min-height: 40px; padding: 6px 12px; text-align: left; font-size: 15px; font-weight: 500; background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
#groups .row .money input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
#groups .rate-chip { font-size: 13px; font-weight: 600; color: var(--rate); padding: 0 0 0 10px; border-left: 1px solid var(--line); border-radius: 0; }
.ledger-foot { padding: 14px 0 0; background: none; border-top: 0; }
.switch input:checked + .switch-ui { background: var(--red); }
input[type="text"]:focus, :root[data-scheme="dark"] input[type="text"]:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@media (max-width: 520px) { #groups .row { grid-template-columns: 34px minmax(0, 1fr) 96px 52px; gap: 8px; } .cat-ic { width: 32px; height: 32px; } }

/* Knöpfe */
.btn { border-radius: 10px; font-weight: 600; }
.btn.primary { background: var(--red); color: #fff; }
.btn.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
#resultActions { flex-wrap: wrap; }
#resultActions .as-link { order: -1; flex: 1 1 100%; }

/* Weitere Rechner als Kartenraster */
#tools { margin-top: 28px; columns: 3 300px; column-gap: 18px; }
#tools > .card { margin: 0 0 18px; padding: 22px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.kicker-plain { color: var(--red-2); }

/* Handy */
.bottom-nav { background: var(--nav-bg); border-top-color: var(--line); }
.bottom-nav button[aria-current="page"] { color: var(--red-2); }
.dock button { background: var(--hero-bg); border-radius: 14px; }
@media (max-width: 879px) {
  .topbar { padding: 12px 16px; }
  .page-head { padding: 22px 0 14px; }
  .hero-card { padding: 20px; }
  .hero-card .bh-grid:not([hidden]) { grid-template-columns: auto minmax(0, 1fr); }
  .hero-card .meter { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .hero-icon { width: 46px; height: 46px; }
  #view-rechner .grid { margin-top: 16px; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Tablets (880 bis 1023 px): noch keine Seitenleiste, also die Leiste unten behalten */
@media (min-width: 880px) and (max-width: 1023px) {
  .bottom-nav { display: grid !important; }
  .app { padding-bottom: calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
}

/* Einstieg: dunkel mit rotem Logo, wie die Vorlage */
#onboard { background: #0E0F12; }
#onboard .ob-brand .mark { width: 34px; height: 34px; }
#onboard .ob-points li::before { color: #FF5A5F; }
#onboard .ob-points li { color: #A0A2A9; }
#onboard .ob-sheet { background: var(--surface); }
#onboard .btn.secondary { color: var(--red-2); }

/* Andere Ansichten: Abstand zur oberen Leiste */
.view:not(#view-rechner) { padding-top: 28px; }

#view-rechner .quick .csv-btn { white-space: normal; max-width: 100%; height: auto; min-height: 40px; text-align: left; }
.hero-card .t-label { white-space: normal; overflow: visible; }
.items-actions { flex-wrap: wrap; } .items-actions .btn { white-space: normal; max-width: 100%; height: auto; text-align: left; }

/* ===================================================================
   Design 1 «Lohnübersicht»: ruhig, hell, Grün für Geld, Blau für Aktionen
   =================================================================== */
:root {
  --bg: #F2F7FA; --side: #FFFFFF; --surface: #FFFFFF; --surface-2: #EAF2F5; --field: #F7FAFB;
  --ink: #153C3B; --ink-2: #52676F; --ink-3: #687C83; --line: #DCE7EB; --line-strong: #C8D7DC; --row-line: #E6EEF1;
  --primary: #2457EB; --primary-2: #1D47C4; --primary-ink: #FFFFFF; --primary-soft: rgba(36, 87, 235, .08);
  --spent: #155344; --remain: #A5C9B9;
  --warn-bg: #FFF4D8; --warn-ink: #805000; --ok-bg: #E7F4EC; --ok-ink: #216044; --danger: #B83242;
  --shadow-card: 0 8px 28px rgba(21, 60, 59, .07);
  --red: var(--primary); --red-2: var(--primary-2); --red-soft: var(--primary-soft); --red-line: rgba(36, 87, 235, .35);
  --accent: var(--primary); --accent-ink: var(--primary-ink); --accent-soft: var(--primary-soft); --rate: var(--ink-2);
  --down: var(--ok-ink); --bad: var(--danger); --bad-soft: rgba(184, 50, 66, .08);
  --hero-bg: #153C3B; --hero-ink: #FFFFFF; --hero-ink-2: #BFD3D0; --hero-accent: #FFFFFF; --hero-down: #A6DCBD;
  --nav-bg: #FFFFFF; --radius: 16px;
  --c1: var(--spent); --c2: var(--spent); --c3: var(--spent); --c4: var(--spent); --c5: var(--spent); --c6: var(--spent);
}
:root[data-scheme="dark"] {
  --bg: #101D22; --side: #142328; --surface: #192A30; --surface-2: #213840; --field: #14252B;
  --ink: #EDF5F2; --ink-2: #B4C8CA; --ink-3: #8FA5A8; --line: #31484F; --line-strong: #3D5961; --row-line: #263B42;
  --primary: #8CABFF; --primary-2: #A9C0FF; --primary-ink: #102044; --primary-soft: rgba(140, 171, 255, .12);
  --spent: #75B69E; --remain: #375F54;
  --warn-bg: #3E321B; --warn-ink: #F5D58C; --ok-bg: #1D3C2E; --ok-ink: #A6DCBD; --danger: #FF9CAB;
  --shadow-card: none;
  --red-line: rgba(140, 171, 255, .4); --bad-soft: rgba(255, 156, 171, .12);
  --hero-bg: #0B1619; --hero-ink: #EDF5F2; --hero-ink-2: #B4C8CA; --hero-accent: #EDF5F2;
  --nav-bg: #142328;
}
:root[data-scheme="dark"] body { background: var(--bg); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.kpi-val, .top-val, .sum-list dd, .ov-result .big, .d-num, .group-sum, #totalSpend, .money input { font-variant-numeric: tabular-nums; }

/* Logo: Pfeil in Grün */
.mark { stroke: var(--spent); }

/* Seitenleiste */
@media (min-width: 1024px) {
  body { grid-template-columns: 208px minmax(0, 1fr); }
  .side { padding: 22px 12px; }
}
.side .brand { padding: 0 10px 28px; }
.side .brand-name { font-size: 18px; }
.side .mark { width: 28px; height: 28px; }
.side-nav button { min-height: 44px; padding: 0 12px; font-size: 14px; color: var(--ink-2); }
.side-nav button:hover { background: var(--surface-2); color: var(--ink); }
.side-nav button[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 650; }
.side-nav button[aria-current="page"]::before { left: -12px; background: var(--spent); }
.side-nav svg { width: 20px; height: 20px; }
.side-foot { padding: 0; display: grid; gap: 10px; }
.side-set { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.side-set:hover, .side-set[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.side-set svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-note { margin: 0; padding: 0 12px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

/* Obere Leiste */
.topbar { max-width: 1184px; padding: 14px 32px 0; border-bottom: 0; }
.topbar .top-right { display: flex; align-items: center; gap: 8px; }
.topbar .theme-btn, .topbar .lang-pick, .icon-btn { width: auto; min-width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.icon-btn { display: grid; place-items: center; padding: 0; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .topbar .theme-btn:hover, .topbar .lang-pick:hover { background: var(--surface-2); }
.icon-btn[aria-current="page"] { background: var(--surface-2); border-color: var(--line-strong); }
.topbar .country-pick select { min-height: 40px; border-radius: 10px; background-color: var(--surface); }
.icon-btn:focus-visible, .theme-btn:focus-visible, .lang-pick:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (min-width: 1024px) { .brand-mobile { display: none; } }

/* Inhalt */
.app { max-width: 1184px; padding-left: 32px; padding-right: 32px; }
.view:not(#view-rechner), .view { padding-top: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 22px 0 20px; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 32px); letter-spacing: -.015em; }
.page-head .lead { font-size: 15px; max-width: 62ch; }
.page-head .stand { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.card, .panel, #tools > .card, #breakdownCard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card); }
.card-title { color: var(--ink); }
.btn { min-height: 44px; border-radius: 10px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.btn svg, .link-btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.as-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: inherit; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.link-btn:hover span { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fine { color: var(--ink-3); }
.news { border-color: var(--line); background: var(--surface); }

/* Übersicht */
.ov-empty { padding: 28px 24px; }
.ov-empty-text { margin: 0 0 16px; font-size: 18px; font-weight: 600; color: var(--ink); }
.ov-empty .fine { margin: 16px 0 0; }
.ov-card { padding: 22px 24px 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; }
.kpi { display: grid; gap: 4px; padding: 14px 18px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-label { font-size: 13px; color: var(--ink-2); }
.kpi-val { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val.neg { color: var(--danger); }
.budget-bar { display: flex; gap: 3px; height: 16px; margin-top: 18px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.budget-bar[hidden] { display: none; }
.bb-spent { background: var(--spent); border-radius: 8px 0 0 8px; }
.bb-left { background: var(--remain); border-radius: 0 8px 8px 0; }
.bb-spent[style*="width: 100"], .bb-spent[style*="width:100"] { border-radius: 8px; }
.bb-left[style*="width: 0"] { display: none; }
.bb-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.bb-legend[hidden] { display: none; }
.bb-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--spent); }
.bb-legend span + span::before { background: var(--remain); }
.ov-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.ov-note.neg { color: var(--danger); font-weight: 600; }
.ov-hint { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin-top: 16px; padding: 6px 8px 6px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.ov-hint.up { background: var(--warn-bg); color: var(--warn-ink); }
.ov-hint.down { background: var(--ok-bg); color: var(--ok-ink); }
.ov-hint p { margin: 8px 0; font-size: 14px; font-weight: 600; }
.ov-hint-ic svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov-hint .link-btn { font-weight: 600; }
.ov-hint .link-btn[aria-expanded="true"] svg { transform: rotate(-90deg); }
.ov-details { display: grid; gap: 16px; margin-top: 16px; }
.ov-details[hidden] { display: none; }
.ov-result { padding: 22px 24px; }
.ov-result .bh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; align-items: center; }
.ov-result .kicker { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.ov-result .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 6px 0 0; font-size: clamp(30px, 3.6vw, 38px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; color: var(--ink); }
.ov-result .big:not(.down) #raiseAmount::before { content: "+ "; }
.ov-result .big.down { color: var(--ok-ink); }
.ov-result .big small { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.ov-result .sub { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ov-result .sub b { color: var(--ink); }
.ov-result .meter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; background: none; }
.ov-result .tile { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--field); }
.ov-result .t-label { font-size: 13px; color: var(--ink-2); white-space: normal; }
.ov-result .t-val { font-size: 22px; font-weight: 700; color: var(--ink); }
.ov-result .t-val.down { color: var(--ok-ink); }
.ov-result .meter-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ink-2); }
#breakdownCard .budget, #breakdownCard #bars, #breakdownCard .fine { display: block; }
#breakdownCard .budget { margin: 4px 0 14px; font-size: 14px; color: var(--ink-2); }
.bar-fill { background: var(--warn-ink); opacity: .75; }
.bar-fill.down { background: var(--ok-ink); }
.bar-row .v { color: var(--ink); }
.bar-row .v.down { color: var(--ok-ink); }
#resultActions { display: flex; flex-wrap: wrap; gap: 10px; }
#resultActions[hidden] { display: none; }
#resultActions .btn { flex: 1 1 auto; }
#resultActions .as-link { order: 0; flex: 1 1 auto; }
.ov-lower { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; margin-top: 18px; align-items: start; }
.ov-top { padding: 20px 22px 10px; }
.ov-top .card-title, .ov-offer .card-title { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.top-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto minmax(90px, 34%); align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--row-line); }
.top-row:last-child { border-bottom: 0; }
.top-label { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-val { font-size: 14px; font-weight: 600; color: var(--ink); text-align: right; }
.top-track { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.top-track span { display: block; height: 100%; border-radius: 5px; background: var(--spent); }
.ov-top > .link-btn { margin-top: 2px; color: var(--primary-2); }
:root[data-scheme="dark"] .ov-top > .link-btn { color: var(--primary); }
.ov-offer { padding: 22px; background: var(--surface-2); border-color: var(--line); box-shadow: none; }
.ov-offer .card-lead { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.ov-offer .btn { width: 100%; }

/* Kategorie-Symbole: eine Farbe, ruhig */
.cat-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); }
.cat-ic svg { width: 18px; height: 18px; stroke: var(--spent); }
.top-row .cat-ic { width: 32px; height: 32px; }

/* Ausgaben */
@media (min-width: 880px) {
  #view-rechner .grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; margin-top: 0; align-items: start; }
  #view-rechner .result.exp-side { position: sticky; top: 16px; }
}
@media (max-width: 879px) { .exp-side { display: none !important; } }
.exp-sum { padding: 20px; }
.exp-sum .card-title { margin: 0 0 8px; font-size: 16px; }
.sum-list { margin: 0 0 16px; }
.sum-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--row-line); }
.sum-list dt { font-size: 13px; color: var(--ink-2); }
.sum-list dd { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sum-list .extra { margin: 6px -10px 0; padding: 10px; border: 0; border-radius: 10px; background: var(--warn-bg); }
.sum-list .extra dt, .sum-list .extra dd { color: var(--warn-ink); }
.sum-list dd.down { color: var(--ok-ink); }
.sum-list .left { border-bottom: 0; }
.sum-list dd.neg { color: var(--danger); }
.exp-sum .btn { width: 100%; }
.section-title { margin: 40px 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
#tools { margin-top: 0; }
#view-rechner .quick .chip { border-color: var(--line-strong); }
#view-rechner .quick .chip.active { border-color: var(--spent); background: var(--ok-bg); }
#view-rechner .quick .chip:hover { border-color: var(--spent); }
.chip.active .chip-ic { stroke: var(--spent); }
#groups .row .money input:focus, input[type="text"]:focus, :root[data-scheme="dark"] input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.switch input:checked + .switch-ui { background: var(--spent); }
/* Raten: amtlich ruhig, steigend Amber, sinkend Grün, selbst eingetragen mit Rahmen */
#groups .rate-chip { min-height: 36px; min-width: 56px; padding: 0 8px; border: 1px solid transparent; border-left: 0; border-radius: 8px; color: var(--warn-ink); font-variant-numeric: tabular-nums; }
#groups .rate-chip.down { color: var(--ok-ink); }
#groups .rate-chip.custom { border: 1px dashed var(--primary); background: var(--primary-soft); }
#groups .rate-chip:hover { background: var(--surface-2); }
.kicker-plain { color: var(--ink-2); }

/* Handy-Leisten */
.bottom-nav { background: var(--nav-bg); border-top: 1px solid var(--line); }
.bottom-nav button { position: relative; min-height: 44px; color: var(--ink-2); font-weight: 600; }
.bottom-nav button[aria-current="page"] { color: var(--ink); }
.bottom-nav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--spent); }
.bottom-nav button[aria-current="page"] svg { stroke: var(--spent); }
.dock button { background: var(--hero-bg); border-radius: 14px; }
.d-num { color: var(--hero-ink); }
.d-num.neg { color: #FFB3BD; }

/* Einstieg: hell und ruhig */
#onboard { background: var(--bg); }
#onboard .ob-card, #onboard .ob-top { background: var(--surface); color: var(--ink); }
#onboard .ob-points li { color: var(--ink-2); }
#onboard .ob-points li b { color: var(--ink); }
#onboard .ob-points li::before { color: var(--spent); }
#onboard h2, #onboard .ob-brand { color: var(--ink); }
#onboard .btn.secondary { color: var(--ink); }

/* Schmal: eine Spalte */
@media (max-width: 1023px) {
  .topbar { padding: 12px 20px 0; }
  .app { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 879px) {
  .topbar { padding: 10px 16px; gap: 8px; }
  .topbar .lang-pick { display: none; }
  .topbar .top-right { gap: 6px; }
  .topbar .theme-btn, .icon-btn { min-width: 44px; height: 44px; }
  .topbar .country-pick select { min-height: 44px; max-width: 42vw; }
  .app { padding-left: 16px; padding-right: 16px; }
  body[data-view="rechner"] .app { margin-top: 0; padding-top: 0; border-radius: 0; background: none; }
  .page-head { padding: 12px 0 16px; }
  .page-head .stand { display: none; }
  .ov-lower { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
  .top-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .top-track { display: none; }
  .ov-result .bh-grid { grid-template-columns: minmax(0, 1fr); }
  .ov-card, .ov-result { padding: 18px 16px; }
  body.has-dock .app { padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; padding: 12px 14px; }
  .kpi + .kpi { border-left: 0; border-top: 1px solid var(--line); }
  .kpi.spend { box-shadow: inset 3px 0 0 var(--spent); }
  .kpi.left { box-shadow: inset 3px 0 0 var(--remain); }
  .kpi-val { font-size: 20px; }
  .ov-hint { grid-template-columns: 22px minmax(0, 1fr); }
  .ov-hint .link-btn { grid-column: 2; justify-self: start; min-height: 40px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .ov-hint .link-btn svg { transition: none; } }
@media print { .side, .topbar { display: none !important; } }
/* Handy-Kopf: Logo, Land, Einstellungen. Hell/Dunkel liegt in den Einstellungen. */
.brand-mobile { min-width: 0; flex: 0 1 auto; }
@media (max-width: 479px) {
  .topbar .theme-btn { display: none; }
  .topbar .country-pick select { max-width: 46vw; }
}
@media (max-width: 359px) { .brand-mobile .brand-name { display: none; } }
.ov-result .tile.me .t-val { color: var(--ink); }
.ov-result .tile.me .t-val.down { color: var(--ok-ink); }
:root { --warn-bar: #E2A63B; --ok-bar: #4E9B7A; }
:root[data-scheme="dark"] { --warn-bar: #D9B25F; --ok-bar: #75B69E; }
.bar-fill { background: var(--warn-bar); opacity: 1; }
.bar-fill.down { background: var(--ok-bar); }
@media (min-width: 880px) { #breakdownCard #bars { column-count: 2; column-gap: 32px; } #breakdownCard .bar-row { break-inside: avoid; } }
.ov-empty .btn-row .btn { flex: 0 0 auto; }
.ov-empty .fine { border-top: 0; padding-top: 0; }
@media (max-width: 479px) { .topbar .country-pick select { max-width: 40vw; } }
@media (max-width: 359px) { .brand-mobile .brand-name { display: none; } }
/* Ergebnis-Karten (Verlauf, geteiltes Ergebnis): hell wie alle Karten */
.card.hero { --hero-bg: var(--surface); --hero-ink: var(--ink); --hero-ink-2: var(--ink-2); --hero-accent: var(--spent); --hero-down: var(--ok-ink); --hero-line: var(--line);
  min-height: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.card.hero .big { font-size: clamp(36px, 6vw, 48px); font-weight: 700; letter-spacing: -.02em; }
.card.hero .kicker { color: var(--ink-2); }
.grid.two > .col { min-width: 0; }
.card.hero, .card.hero * { overflow-wrap: anywhere; }
@media (max-width: 400px) { .card.hero { padding: 18px 16px; } }
.side-legal a { color: var(--ink-2); }
.side-legal a:hover { color: var(--ink); }

/* Einführung: Schritt 2 «So funktioniert PayPace» */
.ob-step[hidden] { display: none !important; }
#onboard .ob-step { display: flex; flex-direction: column; flex: 1; }
#obStep2 h2 { margin-bottom: 10px; font-size: clamp(28px, 8vw, 36px); }
.ob-lead { margin: 0 0 22px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ob-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: how; }
.ob-how li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); counter-increment: how; }
.ob-how li::after { content: counter(how); position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ob-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ok-bg); }
.ob-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--spent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-txt { display: grid; gap: 3px; padding-right: 14px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ob-txt b { font-size: 15px; color: var(--ink); }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.ob-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.ob-dots i.on { width: 20px; border-radius: 4px; background: var(--spent); }
#onboard .btn.secondary { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); min-height: 48px; }
#onboard #obSkip, #onboard .ob-back { background: none; border: 0; color: var(--ink-2); min-height: 44px; font-weight: 600; }
#onboard .ob-sheet { border-top: 1px solid var(--line); }
#obStep2 .ob-top { background: var(--bg); }

/* Nach «Angaben erfassen»: Feld für den Nettolohn kurz hervorheben */
.field.pulse { box-shadow: 0 0 0 3px var(--primary); animation: pulse 0.9s ease-in-out 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px var(--primary-soft); } }
@media (prefers-reduced-motion: reduce) { .field.pulse { animation: none; } }
#onboard .ob-step, #onboard .ob-top, #onboard .ob-sheet { min-width: 0; }
#onboard h2 { overflow-wrap: anywhere; hyphens: auto; }
.ob-picks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 360px) { .ob-picks { grid-template-columns: minmax(0, 1fr); } }
