/* Website zweihaus.com im Stil der App (docs/DESIGN.md, src/styles/tokens.css, src/components/List.module.css).
   Dieselben Farben, dieselbe Schrift, dieselben Gruppen-Listen, Knöpfe und Abstände wie in der App. Keine Schatten,
   keine Verläufe, keine Versalien, Text immer linksbündig. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/schrift/plex-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/schrift/plex-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/schrift/plex-600.woff2') format('woff2'); }

:root {
  --bg: #f5f5f3; --surface: #ffffff; --line: #e3e3df; --line-strong: #8c9099; --fill: #efefec;
  --ink: #1d1f24; --ink-2: #5e636e; --action: #1f3a5f; --on-action: #ffffff; --action-soft: #e8edf3;
  --danger: #a3352b; --me: #426b3a; --other: #7e4d96; --confirmed: #426b3a; --wait: #86621a;
  --bezel: #1d1f24;
  --radius-card: 12px; --radius-control: 10px; --radius-small: 8px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417; --surface: #1b1e23; --line: #2a2e35; --line-strong: #646a75; --fill: #23272d;
    --ink: #eceef1; --ink-2: #9aa0aa; --action: #8fb0d9; --on-action: #121417; --action-soft: #22303f;
    --danger: #e58a80; --me: #94c08b; --other: #c6abd4; --confirmed: #94c08b; --wait: #d9a84a;
    --bezel: #3a3f47;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; hyphens: manual; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; }
img, svg { display: block; max-width: 100%; }
a { color: var(--action); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-small); }
.skip:focus { left: 16px; z-index: 30; }
main:focus { outline: none; }

/* Spalte wie in der App: eine ruhige Spalte, auf großen Bildschirmen etwas breiter */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 max(var(--space-4), env(safe-area-inset-right)) 0 max(var(--space-4), env(safe-area-inset-left)); }
@media (min-width: 960px) { .wrap.wide { max-width: 960px; } }

/* Kopfleiste: bleibt beim Scrollen oben (sticky), Safe-Area am iPhone. Am Computer Logo, Links in der Mitte,
   „Anmelden“ und der Hauptknopf rechts; am Handy Logo, kleiner Hauptknopf und ein Menü (details/summary: geht mit
   Tastatur und Screenreader auch ohne JavaScript). */
html { scroll-padding-top: calc(72px + env(safe-area-inset-top)); }
header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-bar { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; max-width: 960px; }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; min-height: 44px; margin-right: auto; }
.brand svg { width: 28px; height: 28px; }
.brand .m { fill: var(--me); } .brand .o { fill: var(--other); }
.top-nav { display: none; }
.top-nav ul, .menu-panel ul { list-style: none; margin: 0; padding: 0; }
.top-actions { display: flex; align-items: center; gap: var(--space-2); }
.top-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-2); font-weight: 500; text-decoration: none; }
.top-login { display: none; }
.btn.top-cta { min-height: 40px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
.btn.top-cta[aria-current='page'] { outline: 2px solid var(--action); outline-offset: 2px; }
.cta-long { display: none; }
details.menu { position: static; }
.menu summary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); cursor: pointer; list-style: none; font-weight: 500; font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 20px; height: 20px; }
.menu-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu[open] summary { background: var(--fill); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--space-1) 0 var(--space-2); }
.menu-panel li { max-width: 960px; margin: 0 auto; padding: 0 max(var(--space-4), env(safe-area-inset-left)); }
.menu-panel li + li a { border-top: 1px solid var(--line); }
.menu-panel a { display: flex; align-items: center; min-height: 52px; color: var(--ink); text-decoration: none; font-size: 17px; }
.menu-panel a[aria-current='page'] { color: var(--action); font-weight: 600; }
@media (min-width: 480px) {
  .cta-long { display: inline; } .cta-short { display: none; }
  .menu-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
@media (min-width: 920px) {
  .top-bar { gap: var(--space-5); }
  .brand { margin-right: 0; }
  .top-nav { display: block; flex: 1; }
  .top-nav ul { display: flex; justify-content: center; gap: var(--space-5); }
  .top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
  .top-nav a:hover { color: var(--action); }
  .top-nav a[aria-current='page'] { color: var(--action); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .top-login { display: inline-flex; }
  .menu { display: none; }
}

main { padding: var(--space-5) 0 var(--space-6); }

/* Schrift: Größen aus DESIGN.md (Titel 26/600, Aussage 20/500, Abschnitt 17/600, Text 16, Nebentext 14, Beschriftung 13/500) */
h1 { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0 0 var(--space-3); }
h2 { font-size: 20px; line-height: 1.3; font-weight: 500; margin: 0 0 var(--space-2); }
h3 { font-size: 17px; line-height: 1.35; font-weight: 600; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-3); }
.lead { font-size: 17px; }
.muted { color: var(--ink-2); font-size: 14px; }
.hint { color: var(--ink-2); font-size: 13px; margin: var(--space-2) 0 0; }
@media (min-width: 720px) { h1 { font-size: 34px; } h2 { font-size: 22px; } }

/* Abschnitt: kleine Überschrift wie ListSection (13/500, --ink-2), 32 px Abstand */
.section { margin-top: var(--space-6); }
.section-label { font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 0 0 var(--space-2); }
/* über einer Gruppen-Liste eingerückt wie ListSection in der App */
.section:has(> .section-label + .group) > .section-label, .section:has(> .section-label + form.group) > .section-label { margin-left: var(--space-4); }
.section-foot { font-size: 13px; color: var(--ink-2); margin: var(--space-2) 0 0; }
.group + .section-foot { margin-left: var(--space-4); margin-right: var(--space-4); }

/* Gruppen-Liste wie in der App (iOS-Einstellungen): weiß, 1 px Linie, Radius 12, Linien eingerückt */
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.group + .group { margin-top: var(--space-3); }
.row { display: flex; align-items: flex-start; gap: var(--space-3); min-height: 52px; padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; position: relative; }
.row + .row::before, .row + details::before, details + .row::before, details + details::before { content: ''; position: absolute; top: 0; left: var(--space-4); right: 0; border-top: 1px solid var(--line); }
.group > .row:not(:first-child), .group > details:not(:first-child) { position: relative; }
.row-icon { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--ink-2); }
.row-icon svg { width: 22px; height: 22px; }
.row-icon.ok { color: var(--confirmed); }
.row-text { flex: 1; min-width: 0; }
.row-label { display: block; font-size: 16px; }
.row-label.strong { font-weight: 500; }
.row-sub { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.row-value { flex: none; font-size: 16px; color: var(--ink-2); margin-top: 0; }
.row-value.amount { color: var(--ink); font-weight: 600; }
.row-chevron { flex: none; width: 18px; height: 18px; color: var(--ink-2); align-self: center; }
a.row:hover { background: var(--fill); }
.group-icons .row + .row::before, .group-icons .row + details::before, .group-icons details + details::before { left: calc(var(--space-4) + 22px + var(--space-3)); }

/* „Heute“-Karte der App mit Wochenstreifen (das eine auffällige Element) */
.today { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-4); margin: var(--space-5) 0; }
.today-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.today-statement { font-size: 20px; font-weight: 500; line-height: 1.35; margin: 0 0 var(--space-4); }
.example { font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.stripe { width: 100%; height: 14px; border-radius: 7px; background: var(--other); }
.stripe.me { background: var(--me); }
.stripe.split { display: flex; overflow: hidden; }
.stripe.split i { display: block; height: 100%; background: var(--me); }
.day-time { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: visible; }
.legend { display: flex; gap: var(--space-4); margin-top: var(--space-3); font-size: 13px; color: var(--ink-2); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--other); }
.legend .me::before { background: var(--me); }

/* Knöpfe wie Button.tsx: höchstens ein Hauptknopf je Abschnitt */
.actions { display: flex; flex-direction: column; gap: var(--space-3); margin: var(--space-4) 0; }
@media (min-width: 560px) { .actions { flex-direction: row; } }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-5); border-radius: var(--radius-control); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--action); color: var(--on-action); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.note { font-size: 14px; color: var(--ink-2); margin: 0; }

/* Bilder der Beispiel-Familie im iPhone-Rahmen */
.phone { width: 260px; max-width: 72vw; margin: var(--space-5) auto 0; border: 9px solid var(--bezel); border-radius: 44px; overflow: hidden; background: var(--bezel); }
.phone img { width: 100%; height: auto; border-radius: 35px; }
.feature { margin-top: var(--space-6); }
.feature h2 { margin-top: var(--space-1); }
@media (min-width: 960px) {
  .feature { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); align-items: center; }
  .feature:nth-of-type(even) { grid-template-columns: 300px 1fr; }
  .feature:nth-of-type(even) .feature-shot { order: -1; }
  .phone { margin: 0 auto; width: 280px; }
}

/* Häufige Fragen: Zeilen der Gruppe klappen auf */
details { position: relative; }
details > summary { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-3) var(--space-4); cursor: pointer; list-style: none; font-size: 16px; }
details > summary::-webkit-details-marker { display: none; }
details > summary .row-chevron { margin-left: auto; transition: transform 0.15s; }
details[open] > summary .row-chevron { transform: rotate(90deg); }
details > div { padding: 0 var(--space-4) var(--space-4); color: var(--ink); }
details > div p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { details > summary .row-chevron { transition: none; } }

/* Formulare wie TextField und OptionList der App */
form { display: block; }
.field { padding: var(--space-4); }
.field + .field, .options + .field, .field + .options { border-top: 1px solid var(--line); }
label.field-label, .field-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: var(--space-2); }
input[type='email'], input[type='text'], textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-control); }
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--action); outline-offset: 0; border-color: var(--action); }
.options { border-top: 1px solid var(--line); }
.options legend { float: left; width: 100%; font-size: 13px; font-weight: 500; color: var(--ink-2); padding: var(--space-4) var(--space-4) var(--space-1); }
.options .option { clear: both; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.option { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-4); cursor: pointer; position: relative; }
.option + .option::before { content: ''; position: absolute; top: 0; left: var(--space-4); right: 0; border-top: 1px solid var(--line); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .check { margin-left: auto; width: 20px; height: 20px; color: var(--action); visibility: hidden; }
.option input:checked ~ .check { visibility: visible; }
.option input:focus-visible ~ .option-text { outline: 2px solid var(--action); outline-offset: 4px; border-radius: 4px; }
.consent { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.consent-info { margin: 0; padding: var(--space-4); border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.consent input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--action); }
.form-actions { padding: var(--space-4); border-top: 1px solid var(--line); }
.form-actions .btn { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: var(--space-3) var(--space-4) 0; font-weight: 500; }
.status:empty { display: none; }
.status.ok { color: var(--confirmed); }
.status.error { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-4); }
.panel .actions { margin-bottom: 0; }

/* Rechtstexte */
.legal h1 { margin-bottom: var(--space-4); }
.legal h2 { font-size: 17px; font-weight: 600; margin: var(--space-6) 0 var(--space-2); }
.legal ul { padding-left: 20px; margin: 0 0 var(--space-3); }
.legal li { margin-bottom: var(--space-1); }
.legal .hinweis { background: var(--fill); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); font-size: 14px; }

/* Fußzeile: schlichte Links, keine Trennzeichen */
footer.bottom { border-top: 1px solid var(--line); padding: var(--space-5) 0 calc(var(--space-6) + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
footer.bottom ul { list-style: none; padding: 0; margin: 0 0 var(--space-3); display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
footer.bottom a { display: inline-flex; align-items: center; min-height: 44px; }
footer.bottom p { margin: 0; }
.form-hint { padding: 0 var(--space-4) var(--space-4); margin: var(--space-2) 0 0; }
/* Startseite: zuerst die Erklärung, dann das Beispiel (Heute-Karte und ein Bild), dann die Übersicht */
.hero .group { margin: var(--space-5) 0 0; }
.hero .actions { margin-top: var(--space-5); }
.example-block .today { margin: var(--space-3) 0 0; }
.example-block .section-foot { margin-left: 0; }
.example-block .phone { width: 220px; }
@media (min-width: 960px) {
  .wide > h1, .wide > .lead, .wide > .hero, .wide > .note { max-width: 640px; }
  .wide > .section:not(.example-block), .wide > .actions { max-width: 640px; }
  .example-block { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-6); align-items: start; }
  .example-block .phone { width: 280px; }
}
@media (min-width: 720px) { .hero h1 { font-size: 36px; } }

/* Hilfe bei Gewalt: „Schnell verlassen“ bleibt beim Scrollen sichtbar, unter der Kopfleiste */
.exit-bar { position: sticky; top: calc(57px + env(safe-area-inset-top)); z-index: 10; display: flex; justify-content: flex-end; padding: var(--space-2) 0; margin: calc(-1 * var(--space-3)) 0 var(--space-3); background: var(--bg); }
.btn.exit { gap: var(--space-2); background: var(--danger); color: var(--bg); min-height: 48px; }
.btn.exit svg { width: 20px; height: 20px; }
.callout { background: var(--fill); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); margin-top: var(--space-5); }

.link-button { border: 0; background: none; padding: 0; min-height: 44px; font: inherit; font-weight: 500; color: var(--action); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button[disabled] { color: var(--ink-2); cursor: default; }
