/* WohnWunsch – mobil zuerst, ohne externe Abhängigkeiten */
:root {
  --bg: #fbfaf7; --surface: #ffffff; --fg: #1d2226; --mut: #5d6670; --line: #e4e0d6;
  --brand: #0f6e5c; --brand-d: #0a5546; --brand-l: #e6f2ee; --amber: #e8a33d; --amber-l: #fdf3e2;
  --ok: #1f7a3d; --ok-l: #e5f4ea; --warn: #8a5a00; --warn-l: #fff4dc; --err: #a32020; --err-l: #fde8e8;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,30,30,.05), 0 4px 16px rgba(20,30,30,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121517; --surface: #1a1f22; --fg: #e9e7e2; --mut: #a2aab2; --line: #2b3236;
    --brand: #4cc2a6; --brand-d: #7dd8c2; --brand-l: #15302a; --amber: #f0b45a; --amber-l: #33281a;
    --ok: #6ed191; --ok-l: #173322; --warn: #f0c060; --warn-l: #332a14; --err: #ff8a8a; --err-l: #3a1c1c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.55 var(--font); }
html.bigfont { font-size: 118.75%; }
html.bigfont body { line-height: 1.65; }
a { color: var(--brand); }
a:hover { color: var(--brand-d); }
img { max-width: 100%; height: auto; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: .4em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: .2em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 20px; padding-bottom: 64px; min-height: 70vh; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.small { font-size: .88rem; color: var(--mut); }
.mut { color: var(--mut); }
.lead { font-size: 1.08rem; color: var(--mut); max-width: 62ch; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.req { color: var(--err); }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.navt { display: none; }
.burger { display: none; cursor: pointer; padding: 10px; }
.burger span, .burger span::before, .burger span::after { display: block; width: 22px; height: 2px; background: var(--fg); position: relative; content: ""; }
.burger span::before { position: absolute; top: -7px; } .burger span::after { position: absolute; top: 7px; }
.mainnav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.mainnav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); font-size: .95rem; }
.mainnav a:hover, .mainnav a[aria-current] { background: var(--brand-l); color: var(--brand-d); }
.mainnav a.btn { color: #fff; } .mainnav a.btn:hover { color: #fff; background: var(--brand-d); }
@media (max-width: 820px) {
  .burger { display: block; }
  .mainnav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 12px; }
  .navt:checked ~ .mainnav { display: flex; }
}
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--amber); color: #2a1a00; font-size: .75rem; font-weight: 700; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--brand-d); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-l); color: var(--brand-d); }
.btn.danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: var(--err-l); }
.btn.sm { padding: 6px 12px; font-size: .9rem; min-height: 36px; }
.btn.lg { padding: 13px 22px; font-size: 1.05rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.row-btns form { display: contents; }
form.inline { display: inline; }

/* Flash / Hinweise */
.flash, .notice { border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line); background: var(--surface); }
.flash.ok, .notice.ok { background: var(--ok-l); border-color: transparent; }
.flash.warn, .notice.warn { background: var(--warn-l); border-color: transparent; }
.flash.err { background: var(--err-l); border-color: transparent; color: var(--fg); }
.notice { background: var(--brand-l); border-color: transparent; }
.debugmail pre { white-space: pre-wrap; background: var(--surface); padding: 10px; border-radius: 8px; font-size: .85rem; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; box-shadow: var(--shadow); }
.card.accent { background: var(--brand-l); border-color: transparent; box-shadow: none; }
.card.cta { text-align: center; padding: 32px 18px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-h h1, .card-h h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.cards > * { margin: 0; }
.grid-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; margin: 28px 0; }

/* Chips / Fortschritt */
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--ok-l); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-l); color: var(--warn); border-color: transparent; }
.chip.must { border-color: var(--brand); color: var(--brand); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--amber)); }
.tips { padding-left: 18px; margin: 8px 0; } .tips li { margin: 4px 0; font-size: .93rem; }
.score { display: inline-block; background: var(--amber-l); color: var(--fg); font-weight: 700; border-radius: 8px; padding: 2px 8px; font-size: .85rem; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 24px 0 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); }
.hl { color: var(--brand); background: linear-gradient(transparent 62%, var(--amber-l) 62%); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 10px; }
.hero-card { transform: rotate(1.2deg); }

/* Profilkarte */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.pcard p { margin: 0; }
.pcard-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pseudo { font-weight: 800; letter-spacing: .02em; }
.pcard-t { font-weight: 600; font-size: 1.02rem; }
.pcard-q { font-style: italic; color: var(--mut); border-left: 3px solid var(--amber); padding-left: 10px !important; }
.pcard-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.pcard.mini { box-shadow: none; background: var(--bg); }
.match-why { line-height: 1.7; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--brand); }
.stats span { color: var(--mut); font-size: .9rem; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; }
.checks li { padding-left: 26px; position: relative; margin: 7px 0; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.checks-plain { list-style: none; padding: 0; }
.steps3 ol { padding-left: 20px; } .steps3 li { margin: 8px 0; }

/* Tabellen */
.tw { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); }
.n { text-align: right !important; white-space: nowrap; }

/* Listen */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list.big li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.list.big li a { flex: 1 1 260px; text-decoration: none; display: flex; flex-direction: column; color: var(--fg); }

/* Formulare */
.narrow { max-width: 560px; margin: 0 auto; }
.narrow.wide { max-width: 820px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .filters label { display: block; font-weight: 600; font-size: .93rem; min-width: 0; }
.form label > input:not([type=checkbox]):not([type=radio]), .form label > select, .form label > textarea,
.filters label > input:not([type=checkbox]), .filters label > select { display: block; margin-top: 5px; }
.form label > .small { display: block; margin-top: 2px; font-weight: 400; }
.label { font-weight: 600; font-size: .93rem; margin: 6px 0 0; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid #cfcabd; border-radius: 9px; padding: 10px 11px; width: 100%; min-height: 44px; }
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: #3a4247; } }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; }
input[type=range] { padding: 0; accent-color: var(--brand); }
label.check { display: flex !important; flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400 !important; }
.checks-col { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.grid2, .grid3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } .span2 { grid-column: span 2; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0; background: var(--surface); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
legend { font-weight: 700; font-size: 1.05rem; padding: 0 6px; display: flex; gap: 8px; align-items: center; }
.stepn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.hp { position: absolute; left: -5000px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: var(--surface); }
.seg a { flex: 1; text-align: center; padding: 11px 8px; text-decoration: none; color: var(--fg); font-weight: 600; }
.seg a.on { background: var(--brand); color: #fff; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px; }
.feat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.feat span { flex: 1 1 90px; font-size: .93rem; hyphens: auto; overflow-wrap: break-word; }
.pill { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 500 !important; font-size: .82rem !important; padding: 3px 8px; border-radius: 99px; background: var(--bg); cursor: pointer; }
.pill input { width: 16px; height: 16px; }
.pill.must { background: var(--brand-l); }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.trust { background: var(--amber-l); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .layout-side { grid-template-columns: minmax(0, 1fr); } }
.layout-side > *, .grid2 > *, .grid3 > * { min-width: 0; }
input[type=date] { min-width: 0; max-width: 100%; }
.sticky { position: sticky; top: 76px; }
@media (max-width: 900px) { .sticky { position: static; } }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; align-items: end; }
.filters .fullrow { grid-column: 1 / -1; margin: 0; }
input.xs, select.xs { width: auto; min-height: 34px; padding: 5px 8px; font-size: .88rem; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager a[aria-current] { background: var(--brand); color: #fff; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--mut); } .dl dd { margin: 0; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 6px; } }

/* Preise */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin: 20px 0; }
.price { position: relative; display: flex; flex-direction: column; }
.price .checks { flex: 1; }
.price.feat { border: 2px solid var(--brand); }
.amount { font-size: 2.1rem; font-weight: 800; margin: 0; color: var(--brand); }
.ribbon { position: absolute; top: -12px; right: 14px; background: var(--amber); color: #2a1a00; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; margin: 0; }

/* Chat */
.msgs { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; margin-bottom: 12px; }
.msg { max-width: 82%; background: var(--bg); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 12px; align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--brand-l); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg.flagged { border: 2px dashed var(--warn); }
.msgform { flex-direction: row; align-items: flex-end; }
.msgform textarea { flex: 1; }
blockquote { margin: 8px 0; padding: 10px 12px; background: var(--bg); border-left: 3px solid var(--amber); border-radius: 6px; }

/* Text-Seiten */
.prose h2 { margin-top: 1.6em; }
.prose li { margin: 6px 0; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
details summary { font-weight: 600; cursor: pointer; }

/* Bilder (optional – alle Plätze funktionieren auch ohne Bild) */
.center { text-align: center; }
.hero-card.has-img { position: relative; transform: none; margin-bottom: 48px; }
.hero-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); }
.hero-card.has-img .pcard { position: absolute; left: -28px; bottom: -48px; width: min(290px, 70%); transform: rotate(-1.5deg); box-shadow: 0 12px 36px rgba(20,30,30,.2); font-size: .9rem; }
.hero-card.has-img .pcard-q { display: none; }
@media (max-width: 860px) { .hero-card.has-img { margin-bottom: 0; } .hero-card.has-img .pcard { position: relative; left: auto; bottom: auto; width: auto; margin: -40px 14px 0; } }
.card:not(.accent):has(> .card-img:first-child) { padding-top: 0; overflow: hidden; }
.card-img { display: block; width: calc(100% + 36px); max-width: none; margin: 0 -18px 16px; aspect-ratio: 3 / 2; object-fit: cover; }
.card.accent .card-img { width: 100%; margin: 0 0 14px; border-radius: 10px; aspect-ratio: 16 / 9; }
.step-grid { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; counter-reset: st; }
.step-grid li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 !important; }
.step-grid li::before { content: counter(st); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-right: 8px; }
.step-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 12px; }
.banner-img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 60%; border-radius: 18px; margin: 8px 0 18px; }
.inline-img { display: block; width: 100%; max-width: 420px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; margin: 8px 0 14px; }
.empty-img { display: block; width: 180px; max-width: 60%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 6px auto 14px; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; max-width: 1040px; margin: 0 auto; }
.auth-split .narrow { margin: 0; width: 100%; }
.side-img { display: block; width: 100%; aspect-ratio: 2 / 3; max-height: 640px; object-fit: cover; border-radius: 22px; }
@media (max-width: 820px) { .auth-split { grid-template-columns: 1fr; } .auth-media { display: none; } }

/* Wohnen 60+ / Barrierearmut */
.fontbtn { margin-left: auto; margin-right: 6px; min-width: 44px; min-height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.fontbtn:hover, .fontbtn[aria-pressed=true] { background: var(--brand-l); color: var(--brand-d); border-color: var(--brand); }
.senior .lead { font-size: 1.15rem; }
.senior-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; margin: 24px 0; }
.senior-grid .card { margin: 0; }
.senior-grid p { font-size: 1.04rem; }
.big-steps { padding-left: 22px; font-size: 1.08rem; } .big-steps li { margin: 10px 0; }
.swap, .callback { background: var(--brand-l); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.swap-note { color: var(--brand-d) !important; font-weight: 600; }
.teaser60 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: center; margin: 28px 0; }
.teaser60 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; display: block; }
@media (max-width: 760px) { .teaser60 { grid-template-columns: 1fr; } }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0; font-size: .9rem; color: var(--mut); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 14px; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 520px; }
