/* Gemeinsamer mobiler Feinschliff fuer die oeffentlichen Seiten */
body:has(#currentStep) { overflow-x: hidden; }
.site-header { padding: 0!important; position: relative!important; z-index: 500!important; width: 100%!important; height: 92px!important; min-height: 92px!important; background: #f4f2eb!important; color: #24251f!important; border-bottom: 1px solid rgba(53,66,47,.2)!important; }
.site-header .nav { width: min(1180px, calc(100% - 48px))!important; height: 92px!important; min-height: 92px!important; margin: 0 auto!important; padding: 0!important; }
.nav { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav .brand { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; }
.site-header .brand { margin: 0!important; font: 400 1.45rem/1 Georgia,'Times New Roman',serif!important; letter-spacing: .02em!important; color: #24251f!important; }
.site-header .brand span { margin: 0!important; font: 600 .58rem/1 Arial,Helvetica,sans-serif!important; letter-spacing: .2em!important; }
.nav .links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav .links a { color: inherit; text-decoration: none; white-space: nowrap; font-size: .82rem; }
.site-header .nav-cta { display: inline-flex!important; min-height: 44px!important; align-items: center!important; justify-content: center!important; margin: 0!important; padding: 0 18px!important; border: 1px solid #35422f!important; border-radius: 999px!important; background: transparent!important; color: #24251f!important; font: 700 .8rem/1 Arial,Helvetica,sans-serif!important; text-align: center!important; box-shadow: none!important; }
.nav .menu { display: none; }

/* Der Footer bleibt auf jeder Unterseite als eigener dunkler Abschluss sichtbar. */
.site-footer { position: relative!important; z-index: 2!important; isolation: isolate; width: 100%!important; background: #35422f!important; color: #fcfdf9!important; }
.site-footer .brand, .site-footer .footer-links a { color: #fcfdf9!important; }

/* Ruhigere Einstiege und grosszuegigere Lesespalten */
body:has(.portrait-section) .hero { padding-block: 82px!important; }
body:has(.portrait-section) .hero-copy { max-width: 810px!important; margin-inline: 0!important; text-align: left; }
.koepenick-intro .section-title { max-width: 620px; line-height: 1.06!important; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main .wrap { width: min(920px, calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }
  .wrap { width: calc(100% - 32px); }
  header { position: relative; }
  .nav, header .wrap { min-width: 0; }
  .nav .brand { flex: 0 1 auto; min-width: 0; }
  .nav .menu { flex: 0 0 44px; }
  section { scroll-margin-top: 76px; }
  .footer-row { gap: 24px; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 0; }
  .footer-links a { min-height: 44px; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.15); }
  .footer-links a:nth-child(even) { padding-left: 14px; }
}

/* Kein schwebender Kontaktbutton mehr: Inhalte und Navigation bleiben frei sichtbar. */
@media (max-width: 760px) {
  .mobile-contact,
  .mobile-contact-cta,
  .public-mobile-contact { display: none!important; }
  body:has(.mobile-contact),
  body:has(.mobile-contact-cta),
  body:has(.public-mobile-contact),
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) { padding-bottom: 0!important; }
}

@media (max-width: 520px) {
  .wrap { width: calc(100% - 28px); }
  .nav, header .wrap { min-height: 72px; }
  .nav .brand, header .brand { font-size: 1.05rem; line-height: 1.05; }
  .nav .brand span, header .brand span { font-size: .46rem; line-height: 1; }
  .hero h1, .intro h1, .section-title { overflow-wrap: break-word; text-wrap: balance; }
  .kicker, .eyebrow { margin-bottom: 14px; line-height: 1.45; }
  .hero-lead { line-height: 1.55; }
  .prelaunch { margin-top: 22px; font-size: .76rem; line-height: 1.55; }
  .footer-links { grid-template-columns: 1fr; }
  .footer-links a:nth-child(even) { padding-left: 0; }
}

@media (max-width: 600px) {
  .koepenick-intro .section-title { max-width: 100%; font-size: 2.25rem!important; line-height: 1.08!important; }
  .koepenick-intro .split { gap: 26px!important; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main .wrap { width: calc(100% - 32px); margin-inline: auto; }
}

/* Vollstaendiger mobiler Feinschliff */
@media (max-width: 600px) {
  /* 1 und 6: kuerzere Einstiege und ruhigere Typografie */
  .hero { min-height: 0!important; padding-block: 46px!important; }
  .hero-copy { padding-block: 0!important; }
  .hero h1 { font-size: clamp(2.45rem, 11vw, 3rem)!important; line-height: 1!important; margin-bottom: 20px!important; }
  .hero-lead { font-size: 1rem!important; margin-bottom: 22px!important; }
  .hero-actions { margin-top: 24px!important; }
  .hero-actions .btn.light { display: none; }
  .hero-actions .btn { width: 100%; min-height: 50px; }

  /* 2: Menue bleibt immer vor dem Seiteninhalt und laesst sich bedienen */
  header { z-index: 500!important; overflow: visible!important; }
  .nav { position: relative; }
  .nav .links.open { position: absolute!important; max-height: calc(100vh - 92px); overflow-y: auto; overscroll-behavior: contain; }
  .nav .links.open a { font-size: .92rem!important; }

  /* 3: Ueber uns beginnt kompakt, das Portrait steht klar im Mittelpunkt */
  body:has(.portrait-section) .portrait-section { padding-top: 38px!important; }
  body:has(.portrait-section) .portrait-layout { gap: 26px!important; }
  body:has(.portrait-section) .portrait { min-height: 0!important; aspect-ratio: 4/5; border-radius: 180px 180px 18px 18px; }
  body:has(.portrait-section) .portrait img { min-height: 0!important; height: 100%; }
  body:has(.portrait-section) .signature { margin-block: 22px 0; }

  /* 4 und 10: Prozess klar nummeriert, Regionen deutlich davon getrennt */
  .process-head { display: block!important; margin-bottom: 24px!important; }
  .process-head p { margin-top: 16px!important; }
  .steps { display: grid!important; grid-template-columns: 1fr!important; border-top: 0!important; counter-reset: mobile-step; }
  .steps .step, .steps .step + .step { position: relative; padding: 20px 0 20px 52px!important; border-left: 0!important; border-top: 1px solid rgba(53,66,47,.2)!important; }
  .steps .step-number { position: absolute; left: 0; top: 20px; display: grid; width: 34px; height: 34px; margin: 0; place-items: center; border: 1px solid currentColor; border-radius: 50%; }
  .region-section + .region-section { background: #faf8f2!important; border-top: 1px solid rgba(53,66,47,.2); }
  .region-layout { display: grid!important; grid-template-columns: 1fr!important; gap: 24px!important; }

  /* 5: Karten reduzieren, Inhalte als ruhige Liste */
  .fact-grid, .topic-grid { border: 0!important; background: transparent!important; gap: 0!important; }
  .fact, .topic { padding: 22px 0!important; border-top: 1px solid rgba(53,66,47,.2)!important; background: transparent!important; }
  .fact:last-child, .topic:last-child { border-bottom: 1px solid rgba(53,66,47,.2)!important; }

  /* 7: einheitlicher, knapper Kontaktabschluss */
  .contact { padding-block: 48px!important; }
  .contact .kicker { margin-bottom: 10px; }
  .contact .section-title { font-size: 2.05rem!important; }
  .contact .copy p, .contact-grid p { margin-bottom: 18px!important; }

  /* 8: Footer auf die wichtigsten Navigationsziele reduzieren */
  footer { padding-block: 28px!important; }
  footer .footer-links a[href*="immobilienmakler-"] { display: none!important; }
  footer .footer-links { grid-template-columns: 1fr!important; }
  footer .footer-links a { min-height: 42px; padding-left: 0!important; }

  /* 9: Bewertung ohne unnoetige Hoehe und Ablenkung */
  body:has(#currentStep) .intro::after { opacity: .06!important; }
  body:has(#currentStep) .screen .sub { margin-bottom: 20px!important; }
  body:has(#currentStep) .source-note { font-size: .72rem; line-height: 1.5; }
  body:has(#currentStep) .location-card { padding: 13px; }
  body:has(#currentStep) .actions { margin-top: 22px; }
}

/* Einheitliches mobiles Hauptmenue */
@media (max-width: 1000px) {
  .site-header {
    position: relative!important;
    z-index: 500!important;
    width: 100%!important;
    height: 76px!important;
    min-height: 76px!important;
    overflow: visible!important;
    background: #faf8f2!important;
    color: #24251f!important;
    border-bottom: 1px solid rgba(53,66,47,.14)!important;
  }
  .site-header .nav {
    position: relative!important;
    width: calc(100% - 28px)!important;
    height: 76px!important;
    min-height: 76px!important;
    margin: 0 auto!important;
    padding: 0!important;
  }
  .site-header .brand {
    display: flex!important;
    flex-direction: column!important;
    align-items: flex-start!important;
    gap: 2px!important;
    margin: 0!important;
    font-size: 1.08rem!important;
    line-height: 1!important;
    white-space: nowrap!important;
  }
  .site-header .brand span {
    display: block!important;
    margin: 0!important;
    font-size: .45rem!important;
    line-height: 1!important;
    letter-spacing: .18em!important;
  }
  .nav .links { display: none; }
  .nav .links.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .nav .menu {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-content: center;
    gap: 6px;
    border: 1px solid rgba(53,66,47,.2);
    border-radius: 999px;
    background: #faf8f2;
    color: #24251f!important;
    appearance: none;
    -webkit-appearance: none;
    font-size: 0;
  }
  .nav .menu::before, .nav .menu::after {
    content: '';
    display: block;
    width: 21px;
    height: 1px;
    background: currentColor;
    transition: transform .2s ease;
  }
  .nav .menu[aria-expanded="true"]::before { transform: translateY(3.5px) rotate(45deg); }
  .nav .menu[aria-expanded="true"]::after { transform: translateY(-3.5px) rotate(-45deg); }
  .nav .menu[aria-expanded="true"] { position: relative; }
  .nav .menu[aria-expanded="true"]::before,
  .nav .menu[aria-expanded="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 20px;
    height: 2px;
    margin: 0;
    border-radius: 999px;
    background: currentColor;
  }
  .nav .menu[aria-expanded="true"]::before { transform: translate(-50%, -50%) rotate(45deg); }
  .nav .menu[aria-expanded="true"]::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .nav .links.open {
    z-index: 100;
    top: calc(100% + 8px)!important;
    left: 0!important;
    right: 0!important;
    width: 100%!important;
    padding: 10px;
    border: 1px solid rgba(53,66,47,.2);
    border-radius: 18px;
    background: #faf8f2;
    box-shadow: 0 22px 60px rgba(34,37,31,.16);
  }
  .nav .links.open a:not(.nav-cta) { min-height: 46px; display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; }
  .nav .links.open a.active { background: #e2e6dc; }
  .site-header .nav .links.open .nav-cta { min-height: 48px!important; margin-top: 6px!important; background: #46543b!important; border-color: #46543b!important; color: white!important; }
  .site-menu-toggle, .site-menu summary { min-height: 44px; display: flex!important; align-items: center; padding: 0 16px!important; background: #faf8f2; }
  .site-menu nav { overflow: hidden; }
  .site-menu nav a { min-height: 46px; display: flex; align-items: center; }
}

/* Mobile Inhalte kompakter und klarer staffeln */
@media (max-width: 600px) {
  section { padding-block: 54px; }
  .hero { padding-block: 54px; }
  .hero-copy { padding-block: 0; }
  .copy p { line-height: 1.68; }
  .copy p + p { margin-top: 14px; }
  .process-list article, .fact, .topic { padding: 24px 20px; }
  .process-list article::before { margin-bottom: 18px; }
  body:has(.mobile-contact) .hero-actions a[href="#kontakt"],
  body:has(.mobile-contact-cta) .hero-actions a[href="#kontakt"] { display: none; }
  .contact .split, .contact-grid { gap: 24px; }
  .contact .section-title { font-size: 2.2rem; }
  .contact .btn { width: 100%; min-height: 50px; }
  .mobile-contact, .mobile-contact-cta { bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* Leichtere Bilddateien auf kleinen Bildschirmen */
@media (max-width: 760px) {
  .hero-illustration { background-image: url('manly-haus-skizze-800.webp')!important; }
  .intro::after, .region::after { background-image: url('manly-haus-skizze-800.webp')!important; }
}

/* Bewertung: zuerst die Entscheidung, danach nur die notwendigen Felder */
@media (max-width: 520px) {
  body:has(#currentStep) main { padding-top: 24px; }
  body:has(#currentStep) .intro { min-height: 0!important; margin-bottom: 22px; }
  body:has(#currentStep) .intro::after { display: none!important; }
  body:has(#currentStep) .intro .kicker { margin-bottom: 10px; font-size: .65rem; }
  body:has(#currentStep) .intro h1 { max-width: 330px; font-size: 2.55rem!important; line-height: .98; }
  body:has(#currentStep) .intro>p { display: none; }
  body:has(#currentStep) .shell { border-radius: 16px; box-shadow: none; }
  body:has(#currentStep) .rail { padding: 15px 18px; }
  body:has(#currentStep) .panel { padding: 22px 18px; }
  body:has(#currentStep) .screen h2 { font-size: 1.75rem!important; }
  body:has(#currentStep) .types { gap: 8px; }
  body:has(#currentStep) .type { min-height: 64px; display: grid; grid-template-columns: 30px 1fr; align-items: center; column-gap: 8px; padding: 10px 14px; }
  body:has(#currentStep) .type b { margin: 0; }
  body:has(#currentStep) .type small { grid-column: 2; }
  body:has(#currentStep) [data-screen="1"] .actions { display: none; }
}

/* Schlichte Rechtsseiten: ruhige Lesespalte statt allgemeinem Unterseitenlayout */
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) { background: #f4f2eb; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .wrap { width: min(1180px, calc(100% - 48px)); }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main .wrap { width: min(920px, calc(100% - 48px)); margin-inline: auto; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header { background: rgba(246,247,242,.96); }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header .wrap { min-height: 88px; padding-block: 18px; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main { padding: 72px 0 100px; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) h1 { max-width: 100%; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main p { font-size: 1rem; line-height: 1.75; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main h2 { margin-top: 38px; font-size: 1.05rem; line-height: 1.4; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .back { flex: 0 0 auto; text-decoration: none; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) footer { padding: 34px 0; background: #35422f; color: white; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .footer-links a { color: white; font-size: .78rem; text-decoration: none; }
:is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .mobile-contact { display: none; }

@media (max-width: 520px) {
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .wrap { width: calc(100% - 28px); }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main .wrap { width: calc(100% - 32px); }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header { padding: 0; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header .wrap { min-height: 72px; padding-block: 12px; align-items: center; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; letter-spacing: .035em; white-space: nowrap; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) header .brand span { display: block; margin: 0; letter-spacing: .18em; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .back { display: none; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main { padding: 46px 0 72px; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) h1 { margin: 0 0 34px; font-size: clamp(2.65rem, 14vw, 3.45rem); line-height: .98; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main h2 { margin: 34px 0 8px; font-size: 1rem; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) main p { margin: 0 0 18px; font-size: .98rem; line-height: 1.72; overflow-wrap: anywhere; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .notice { margin-top: 34px; padding-top: 22px; font-size: .86rem; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .footer-row { align-items: flex-start; flex-direction: column; }
  :is(body.legal-simple, body:has(a[href*="openai.com/policies/eu-privacy-policy"])) .mobile-contact { position: fixed; z-index: 120; display: flex; left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 50px; align-items: center; justify-content: center; border-radius: 999px; background: #46543b; color: white; text-decoration: none; font-size: .84rem; font-weight: 700; box-shadow: 0 12px 36px rgba(36,37,31,.24); }
}

/* Grouped public footer */
.site-footer{padding:44px 0!important}
.site-footer .footer-row{display:grid!important;grid-template-columns:minmax(240px,.9fr) minmax(0,1.6fr);align-items:start!important;gap:48px!important;width:min(1180px,calc(100% - 48px))!important;margin:auto}
.site-footer .footer-brand{min-width:0}
.site-footer .footer-brand .brand{display:inline-flex;align-items:baseline;gap:.55rem;font:400 1.35rem Georgia,serif;white-space:nowrap;text-decoration:none;color:#fcfdf9!important}
.site-footer .footer-brand .brand span{margin:0;font:600 .55rem Arial,sans-serif;letter-spacing:.2em}
.site-footer .footer-brand p{margin:14px 0 0;font:400 .82rem/1.6 Arial,sans-serif;color:#e2e6dc}
.site-footer .footer-groups{display:grid;grid-template-columns:1fr 1fr;gap:28px;min-width:0}
.site-footer .footer-group{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
.site-footer .footer-group h2{margin:0 0 12px;font:600 .68rem/1.4 Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#e2e6dc}
.site-footer .footer-group a{display:flex;align-items:center;min-height:36px;padding:4px 0;font:400 .8rem/1.5 Arial,sans-serif;color:#fcfdf9!important;text-decoration:none;overflow-wrap:anywhere}
.site-footer a:hover{text-decoration:underline;text-underline-offset:4px}
.site-footer a:focus-visible{outline:2px solid #fcfdf9;outline-offset:4px;border-radius:2px}
@media(max-width:1000px){.site-footer .footer-row{grid-template-columns:1fr;gap:30px!important}.site-footer .footer-group a{min-height:44px}}
@media(max-width:600px){
  .site-footer{padding:26px 0!important}
  .site-footer .footer-row{width:calc(100% - 40px)!important;gap:22px!important}
  .site-footer .footer-brand .brand{font-size:1.2rem;gap:.45rem}
  .site-footer .footer-brand .brand span{font-size:.5rem}
  .site-footer .footer-brand p{margin-top:9px;font-size:.76rem;line-height:1.5}
  .site-footer .footer-groups{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 24px}
  .site-footer .footer-group h2{margin:0 0 7px;font-size:.63rem;letter-spacing:.1em}
  .site-footer .footer-group a{min-height:36px;padding:6px 0;font-size:.78rem;line-height:1.5;overflow-wrap:normal}
}
@media(max-width:340px){
  .site-footer .footer-row{width:calc(100% - 32px)!important}
  .site-footer .footer-brand .brand{flex-direction:column;align-items:flex-start;gap:7px;white-space:normal}
  .site-footer .footer-groups{column-gap:16px}
  .site-footer .footer-group a{overflow-wrap:anywhere}
}

/* Primary conversation action in the shared public header. */
.site-header .nav-cta {
  background:var(--accent,#46543b)!important;
  border-color:var(--accent,#46543b)!important;
  color:#fcfdf9!important;
}
.site-header .nav-cta:hover {
  background:var(--accent-dark,#35422f)!important;
  border-color:var(--accent-dark,#35422f)!important;
}


/* Regional links belong to the brand block. */
.site-footer .footer-brand .footer-regions{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:0 10px!important;margin:6px 0 0!important;padding:0!important;min-height:0!important;height:auto!important;width:auto!important;font:400 .78rem/1.5 Arial,sans-serif!important;color:#e2e6dc!important}
.site-footer .footer-regions a{display:inline-flex!important;align-items:center!important;min-height:32px!important;margin:0!important;padding:0!important;font:inherit!important;color:inherit!important;white-space:nowrap}
.site-footer .footer-region-item{display:inline-flex;align-items:center;gap:10px}
