/*
 * Die Willkommensseite (#281) im HalloSusi-Design (#689).
 *
 * WARUM SO (Eric, 24.11.2026): Bis #689 trug die Seite die Farben der
 * Verwaltung und kein Wort von uns. Ein Eigentuemer, der mit einem Brief und
 * einem Code auf eine unbekannte Seite kommt, ruft dann eher an, als dass er
 * ausfuellt. Jetzt: das ruhige, klare Design des Portals — und darauf
 * unuebersehbar die Verwaltung (Logo, Firma, volles Impressum im Fuss).
 * „Powered by HalloSusi“ steht nur klein ganz unten.
 *
 * DIE WERTE sind die des Portals (plattform/portal/eingabe/portal.css: Navy,
 * Blau, Limette als Licht, Geist). Eigene Datei statt portal.css, weil die
 * Seite ohne Tailwind-Klassen und ohne Skript auskommt und ihre Bausteine
 * (Karte, Feld, Kachel …) andere Namen haben als die des Portals.
 *
 * Kein Skript, keine fremden Quellen: Die CSP erlaubt nur 'self'.
 */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../portal/schrift/Geist-latin.f4634c3bc1fa.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../portal/schrift/GeistMono-latin.cd5b25781181.woff2") format("woff2"); }

:root {
  --grund: #fdfdff;
  --text: #121a2b;
  --gedaempft: #5e6679;
  --navy: #20395a;           /* Knoepfe, Marke */
  --navy-hover: #2b4a72;
  --blau: #2440ff;           /* Links, Auswahl, Fokus */
  --blau-weich: #eef0ff;
  --flaeche: #f3f4f7;
  --rand: #e4e6ec;
  --rand-stark: #cfd3dc;
  --gut: #17714a;
  --gut-weich: #e7f3ec;
  --fehler: #b5361f;
  --fehler-weich: #fbebe8;

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --rund: 1.125rem;
  --rund-klein: 0.625rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Wie im Portal: zwei weiche Lichter (Blau unten links, Limette oben rechts). */
  background-color: var(--grund);
  background-image:
    radial-gradient(40vmax circle at 10vmax 100%, rgb(36 64 255 / 0.18), rgb(36 64 255 / 0.07) 45%, transparent 100%),
    radial-gradient(37.5vmax circle at calc(100% - 7.5vmax) 0%, rgb(212 255 0 / 0.45), rgb(212 255 0 / 0.16) 45%, transparent 100%);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgb(18 26 43 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(18 26 43 / 0.035) 1px, transparent 1px);
  background-size: 12px 12px;
  mask-image: radial-gradient(75% 70% at 50% 45%, #000 0%, transparent 85%);
}
img { max-width: 100%; display: block; }
a { color: var(--blau); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 2px; }
p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.springen { position: absolute; left: -999px; top: 12px; background: #fff; color: var(--text); padding: 8px 14px; z-index: 10; border-radius: var(--rund-klein); }
.springen:focus { left: 16px; }

/* Glas wie im Portal: halbdurchsichtig, Lichtkante, weichgezeichnet. */
.karte {
  border: 1px solid rgb(255 255 255 / 0.8);
  background: linear-gradient(150deg, rgb(255 255 255 / 0.8) 0%, rgb(255 255 255 / 0.55) 55%, rgb(255 255 255 / 0.68) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 1), 0 10px 40px rgb(18 26 43 / 0.08), 0 1px 3px rgb(18 26 43 / 0.06);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
}

/* ── Kopf: das Logo der Verwaltung, gross und mittig ── */
.kopf { width: 100%; max-width: 46rem; margin: 0 auto; padding: 48px 16px 0; }
.kopf-marke { display: flex; justify-content: center; text-decoration: none !important; }
.kopf-logo { height: 88px; width: auto; max-width: min(18rem, 80vw); object-fit: contain; }
.kopf-firma { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: var(--text); text-align: center; }
.kopf-buehne { padding: 36px 4px 4px; }
.kopf-ort { font-size: 14px; color: var(--gedaempft); margin-bottom: 8px; font-weight: 500; }
.mittig { text-align: center; }
.mittig .vorspann { margin-left: auto; margin-right: auto; }

h1, h2 { font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: clamp(2rem, 5.5vw, 2.6rem); letter-spacing: -0.035em; }
h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.vorspann { font-size: 17px; line-height: 1.6; margin-top: 14px; max-width: 36rem; color: var(--gedaempft); }
.vorspann strong { color: var(--text); font-weight: 600; }
.klein { font-size: 14px; color: var(--gedaempft); }

/* Die vier Schritte — nur zur Orientierung, Anker ohne Logik. */
.schritte { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.schritte a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--navy); padding: 6px 14px 6px 6px;
  background: rgb(255 255 255 / 0.7); border: 1px solid var(--rand); border-radius: 999px;
}
.schritte a span {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 600;
}
.schritte a:hover { border-color: var(--blau); text-decoration: none; }

/* ── Inhalt ── */
.inhalt { flex: 1 0 auto; width: 100%; max-width: 46rem; margin: 0 auto; padding: 22px 16px 56px; display: flex; flex-direction: column; gap: 18px; }
.karte { border-radius: var(--rund); padding: 28px 28px 30px; scroll-margin-top: 16px; }
@media (max-width: 34rem) { .karte { padding: 22px 18px 24px; } }
.karte-kopf { margin-bottom: 22px; display: flex; flex-direction: column; gap: 6px; }
.schritt { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blau); }
.karte-kopf p { color: var(--gedaempft); font-size: 15px; }
.stapel { display: flex; flex-direction: column; gap: 20px; }

/* ── Felder ── */
.reihe { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reihe-plz { grid-template-columns: 8rem minmax(0, 1fr); }
@media (max-width: 34rem) { .reihe, .reihe-plz { grid-template-columns: minmax(0, 1fr); } }

.feld { display: flex; flex-direction: column; min-width: 0; }
.feld-beschriftung, .feld legend { font-size: 14.5px; font-weight: 500; color: var(--text); margin-bottom: 7px; padding: 0; }
.feld-pflicht { color: var(--blau); margin-left: 3px; }
.feld input:not([type="radio"]):not([type="checkbox"]):not([type="file"]), .feld select, .feld textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: #fff; border: 1px solid var(--rand-stark); border-radius: var(--rund-klein);
  padding: 11px 14px; min-height: 48px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.feld select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gedaempft) 50%), linear-gradient(135deg, var(--gedaempft) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
.feld input:focus, .feld select:focus, .feld textarea:focus { border-color: var(--blau); box-shadow: 0 0 0 3px rgb(36 64 255 / 0.15); }
.feld input::placeholder { color: #9aa1b1; }
.feld .eingabe-fehler, .feld [aria-invalid="true"] { border-color: var(--fehler) !important; }
.feld-hilfe { font-size: 13.5px; color: var(--gedaempft); margin-top: 6px; }
.feld-fehler { font-size: 14px; color: var(--fehler); margin-top: 6px; font-weight: 500; }
.feld input[type="file"] { font-size: 14px; color: var(--gedaempft); }
.feld input[type="file"]::file-selector-button {
  font: inherit; font-size: 14px; font-weight: 500; border: 1px solid var(--rand-stark); background: #fff;
  color: var(--navy); padding: 9px 16px; border-radius: 999px; margin-right: 12px; cursor: pointer;
}

/* Der Code: gross und gesperrt, wie auf dem Brief gedruckt. */
.feld-code input { font-family: var(--mono) !important; font-size: 24px !important; letter-spacing: 0.22em; text-transform: uppercase; min-height: 60px !important; text-align: center; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.kacheln { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.kachel {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--rand-stark); border-radius: var(--rund-klein); background: #fff;
  cursor: pointer; font-size: 15.5px; transition: border-color .15s ease, background-color .15s ease;
}
.kachel:hover { border-color: var(--navy); }
.kachel input { accent-color: var(--blau); width: 18px; height: 18px; margin: 0; flex: none; }
.kachel:has(input:checked) { border-color: var(--blau); background: var(--blau-weich); }

.haken { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; cursor: pointer; }
.haken input { accent-color: var(--blau); width: 20px; height: 20px; margin: 2px 0 0; flex: none; }

/* ── Hinweise und Texte ── */
.notiz { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rund-klein); padding: 13px 16px; font-size: 15px; }
.notiz strong { font-weight: 600; }
.notiz-fehler { border-color: #f0c9c1; background: var(--fehler-weich); }
.notiz-gut { border-color: #c4e2d1; background: var(--gut-weich); }
.urkunde { background: #fff; border: 1px solid var(--rand); border-radius: var(--rund-klein); padding: 18px 20px; font-size: 14.5px; line-height: 1.6; }
.urkunde p + p { margin-top: 10px; }
.urkunde-fuss { font-size: 12.5px; color: var(--gedaempft); margin-top: 14px; }
.unterabschnitt { border-top: 1px solid var(--rand); padding-top: 20px; }
.unterabschnitt-titel { font-size: 15.5px; font-weight: 600; margin-bottom: 14px; }
.aufklapp { border-top: 1px solid var(--rand); padding-top: 18px; }
/* Der Schalter „mehrere Personen“: eine Checkbox, keine <details> — so weiss
   auch der Server, ob die Zeilen darunter gemeint sind. Die Zeilen zeigt
   :has(); ohne :has() bleiben sie sichtbar und zaehlen trotzdem nur mit Haken. */
.schalter { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15.5px; font-weight: 600; color: var(--blau); }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter::before {
  content: ""; flex: none; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 6px;
  background:
    linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
}
.schalter:has(input:checked)::before { background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat; }
.schalter:has(input:focus-visible)::before { outline: 2px solid var(--blau); outline-offset: 2px; }
@supports selector(:has(*)) {
  .nur-bei-mehreren { display: none; }
  .aufklapp:has(.schalter input:checked) .nur-bei-mehreren { display: flex; }
}
.person { background: rgb(255 255 255 / 0.7); border: 1px solid var(--rand); border-radius: var(--rund-klein); padding: 18px; }
.person legend { font-size: 14.5px; font-weight: 600; padding: 0 6px; margin-left: -6px; }
/* Die Angaben zum Mieter erscheinen erst, wenn „vermietet“ gewaehlt ist —
   mit :has() statt Skript. Kennt ein (alter) Browser :has() nicht, bleiben
   sie einfach sichtbar; deshalb nur innerhalb von @supports versteckt. */
@supports selector(:has(*)) {
  .nur-bei-vermietung { display: none; }
  .karte:has(input[name="nutzung"][value="vermietet"]:checked) .nur-bei-vermietung { display: block; }
}
.lesefeld { max-height: 15rem; overflow-y: auto; }

/* ── Knoepfe: rund wie im Portal ── */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  background: var(--navy); color: #fdfdff; border: 1px solid var(--navy); border-radius: 999px;
  padding: 13px 28px; min-height: 50px; cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .1s ease;
}
.knopf:hover { background: var(--navy-hover); text-decoration: none; }
.knopf:active { transform: scale(0.98); }
.knopf-pfeil::after { content: "→"; font-weight: 400; }
.knopf-breit { width: 100%; }
.abschluss { display: flex; flex-direction: column; gap: 12px; }

/* ── Danke ── */
.folge { list-style: none; margin: 0; padding: 0; counter-reset: folge; display: flex; flex-direction: column; gap: 16px; }
.folge li { counter-increment: folge; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.folge li::before {
  content: counter(folge); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; margin-top: 1px;
}
.folge strong { font-weight: 600; }

/* ── Startseite: schmal und mittig (#689) ── */
.karte-schmal { width: 100%; max-width: 26rem; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.sicher { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; color: var(--gedaempft); }
.sicher svg { color: var(--gut); }

/* ── Fuss: das Impressum der Verwaltung, knapp und mittig ── */
.fuss { width: 100%; max-width: 46rem; margin: 0 auto; padding: 8px 16px 28px; text-align: center; font-size: 12.5px; line-height: 1.7; color: var(--gedaempft); }
.fuss-firma { color: var(--text); font-weight: 500; }
.am-stueck { white-space: nowrap; }
.fuss nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 6px; }
.fuss nav a { color: var(--navy); }
.powered { display: flex; justify-content: center; margin-top: 16px; }
.powered a { color: var(--gedaempft); display: inline-flex; align-items: center; gap: 6px; }
.powered strong { color: var(--navy); font-weight: 600; }

/* ── Impressum und Datenschutz ── */
.rechtstext h2 { margin-bottom: 14px; }
.rechtstext h3 { font-size: 15px; font-weight: 600; margin: 20px 0 4px; }
.rechtstext p + p { margin-top: 10px; }

.oben { margin-top: 18px; }
.oben-klein { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
