/**
 * Schema von Rüden — Immobilienrecht adapter
 *
 * Conditionally loaded for page IDs 60423, 55173, 55167 and 63777.
 * The rollout plugin emits a plain body element, so the unique, existing
 * main > .site-header + .hero structure is the runtime scope.
 */

body:has(> main > .site-header + .hero) {
  --ink: var(--vre-navy);
  --ink-soft: var(--vre-navy-soft);
  --body: var(--vre-body);
  --paper: var(--vre-paper);
  --cream: var(--vre-paper-soft);
  --sage: var(--vre-sage);
  --lime: var(--vre-lime);
  --pale-sage: color-mix(in srgb, var(--vre-sage) 18%, var(--vre-white));
  --line: rgb(16 35 46 / 18%);
  --muted: color-mix(in srgb, var(--vre-body) 76%, var(--vre-white));
  --shadow: 0 18px 44px rgb(6 27 44 / 14%);
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background: var(--vre-paper);
  color: var(--vre-body);
  font-family: var(--vre-body-font);
  font-size: 16px;
  line-height: 1.65;
}

body:has(> main > .site-header + .hero) *,
body:has(> main > .site-header + .hero) *::before,
body:has(> main > .site-header + .hero) *::after {
  box-sizing: border-box;
}

body:has(> main > .site-header + .hero) > main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--vre-paper);
}

body:has(> main > .site-header + .hero) :where(.shell, .narrow-shell) {
  width: min(calc(100% - 24px), var(--vre-shell));
  margin-inline: auto;
}

body:has(> main > .site-header + .hero) .narrow-shell {
  max-width: 832px;
}

body:has(> main > .site-header + .hero) :where(h1, h2, h3, h4) {
  color: var(--vre-ink);
  font-family: var(--vre-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body:has(> main > .site-header + .hero) :where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid var(--vre-lime);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--vre-navy);
}

/* Minimal brand-and-contact header. */
body:has(> main > .site-header + .hero) .site-header {
  height: 73px;
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  background: var(--vre-navy);
  color: var(--vre-white);
  box-shadow: none;
}

body:has(> main > .site-header + .hero) .header-inner {
  height: 100%;
  gap: 20px;
}

body:has(> main > .site-header + .hero) :where(.desktop-nav, .mobile-menu) {
  display: none !important;
}

body:has(> main > .site-header + .hero) .brand img {
  width: min(180px, 47vw);
  max-height: 48px;
  border-radius: 0;
  object-fit: contain;
}

body:has(> main > .site-header + .hero) .header-phone {
  display: inline-flex !important;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  color: var(--vre-white);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

body:has(> main > .site-header + .hero) .header-phone span {
  color: var(--vre-lime);
}

/* Editorial hero. Existing copy and contact-card markup remain unchanged. */
body:has(> main > .site-header + .hero) .hero {
  min-height: 0;
  padding: 20px 0 64px;
  overflow: hidden;
  background: var(--vre-navy);
  background-image: none;
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) .hero::before,
body:has(> main > .site-header + .hero) .hero::after {
  display: none;
  content: none;
}

body:has(> main > .site-header + .hero) .breadcrumbs {
  margin-bottom: 34px;
  color: rgb(243 239 231 / 62%);
  font-size: 0.75rem;
  line-height: 1.6;
}

body:has(> main > .site-header + .hero) .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

body:has(> main > .site-header + .hero) .hero-copy {
  max-width: 635px;
  padding: 0;
}

body:has(> main > .site-header + .hero) :where(.eyebrow, .section-eyebrow) {
  color: var(--vre-sage);
  font-family: var(--vre-body-font);
  font-size: 0.722rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body:has(> main > .site-header + .hero) .hero h1 {
  max-width: 635px;
  margin: 0 0 24px;
  color: var(--vre-paper-soft);
  font-family: var(--vre-display);
  font-size: var(--vre-h1-size);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

body:has(> main > .site-header + .hero) .lede {
  max-width: 630px;
  margin-bottom: 16px;
  color: rgb(243 239 231 / 82%);
  font-size: clamp(1rem, 1.55vw, 1.235rem);
  line-height: 1.62;
}

body:has(> main > .site-header + .hero) :where(.credential, .response-note) {
  color: rgb(243 239 231 / 62%);
  font-size: 0.8rem;
  line-height: 1.65;
}

body:has(> main > .site-header + .hero) .hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body:has(> main > .site-header + .hero) :where(.button, button, input[type="submit"]) {
  min-height: 39px;
  border-radius: 0 !important;
  box-shadow: none;
  font-family: var(--vre-body-font);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transform: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

body:has(> main > .site-header + .hero) .button-primary {
  border: 2px solid var(--vre-lime);
  background: var(--vre-lime);
  color: var(--vre-navy);
}

body:has(> main > .site-header + .hero) .button-outline {
  border: 2px solid var(--vre-paper-soft);
  background: transparent;
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) :where(.button-primary:hover, .button-primary:focus-visible) {
  border-color: var(--vre-white);
  background: var(--vre-white);
  color: var(--vre-navy);
  transform: none;
}

body:has(> main > .site-header + .hero) :where(.button-outline:hover, .button-outline:focus-visible) {
  background: var(--vre-paper-soft);
  color: var(--vre-navy);
  transform: none;
}

body:has(> main > .site-header + .hero) .lawyer-card {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--vre-sage);
  box-shadow: 0 18px 44px rgb(6 27 44 / 14%);
}

body:has(> main > .site-header + .hero) :where(.lawyer-card, .lawyer-card *, .profile-card, .profile-card *) {
  border-radius: 0 !important;
}

body:has(> main > .site-header + .hero) .portrait-wrap {
  background: color-mix(in srgb, var(--vre-body) 40%, var(--vre-white));
}

body:has(> main > .site-header + .hero) .contact-panel {
  padding: 28px 30px 32px;
  background: var(--vre-sage);
  color: var(--vre-navy);
}

body:has(> main > .site-header + .hero) .contact-panel h2 {
  margin: 0 0 12px;
  color: var(--vre-navy);
  font-size: 1.85rem;
  line-height: 1.15;
}

/* Anchor navigation and section rhythm. */
body:has(> main > .site-header + .hero) .topic-nav {
  border: 0;
  background: var(--vre-navy);
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) :where(.desktop-topic-links, .mobile-topic-links nav) {
  border-color: rgb(243 239 231 / 18%);
}

body:has(> main > .site-header + .hero) :where(.desktop-topic-links a, .mobile-topic-links nav a) {
  border-color: rgb(243 239 231 / 18%);
  border-radius: 0;
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) .section,
body:has(> main > .site-header + .hero) .contact-section {
  padding-block: 48px;
}

body:has(> main > .site-header + .hero) :where(.section h2, .contact-section h2) {
  max-width: 18ch;
  margin: 0 0 26px;
  font-size: var(--vre-h2-size);
  line-height: 1.04;
}

body:has(> main > .site-header + .hero) :where(.section h3, .contact-section h3) {
  font-size: clamp(1.341rem, 2.32vw, 1.853rem);
  line-height: 1.18;
}

body:has(> main > .site-header + .hero) :where(.immediate-section, .services-section, .process-section) {
  background: var(--vre-paper);
}

body:has(> main > .site-header + .hero) :where(.expert-section, .related-section, .faq-section) {
  background: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) :where(.documents-section, .sources-section) {
  background: var(--vre-white);
}

body:has(> main > .site-header + .hero) :where(
  .immediate-grid,
  .expert-grid,
  .services-grid,
  .process-grid,
  .documents-grid,
  .related-grid,
  .contact-grid
) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

body:has(> main > .site-header + .hero) :where(
  .number-card,
  .profile-card,
  .services-grid > article,
  .process-grid > article,
  .related-grid > a,
  .guide-group,
  .source-card,
  .contact-card,
  .notice
) {
  border: 1px solid rgb(16 35 46 / 18%);
  border-radius: 0 !important;
  background: var(--vre-white);
  box-shadow: none;
  transform: none;
}

body:has(> main > .site-header + .hero) :where(
  .number-card:hover,
  .services-grid > article:hover,
  .process-grid > article:hover,
  .related-grid > a:hover
) {
  box-shadow: none;
  transform: none;
}

body:has(> main > .site-header + .hero) :where(.number-card, .services-grid > article) {
  padding: 28px;
}

body:has(> main > .site-header + .hero) .notice {
  border-left: 5px solid var(--vre-sage);
  background: color-mix(in srgb, var(--vre-sage) 16%, var(--vre-white));
}

body:has(> main > .site-header + .hero) :where(.faq-list, .faq-items) details {
  border: 0;
  border-top: 1px solid rgb(16 35 46 / 18%);
  border-radius: 0;
  background: transparent;
}

body:has(> main > .site-header + .hero) :where(.faq-list, .faq-items) details:last-child {
  border-bottom: 1px solid rgb(16 35 46 / 18%);
}

body:has(> main > .site-header + .hero) :where(.faq-list, .faq-items) summary {
  min-height: 60px;
  padding: 16px 0;
  color: var(--vre-ink);
  font-family: var(--vre-display);
  font-size: 1.406rem;
  font-weight: 400;
  line-height: 1.35;
}

body:has(> main > .site-header + .hero) .contact-section {
  background: var(--vre-navy-soft);
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) .contact-section :where(h2, h3) {
  color: var(--vre-paper-soft);
}

body:has(> main > .site-header + .hero) :where(.contact-card, .contact-form, .form-card) {
  padding: 28px;
  border-radius: 0 !important;
  background: var(--vre-white);
  color: var(--vre-body);
}

body:has(> main > .site-header + .hero) :where(input, textarea, select) {
  min-height: 44px;
  border: 1px solid rgb(16 35 46 / 35%);
  border-radius: 0 !important;
  background: var(--vre-white);
  color: var(--vre-ink);
  font: 400 1rem/1.4 var(--vre-body-font);
}

body:has(> main > .site-header + .hero) .mobile-contact-bar {
  height: 49px;
  border-radius: 0;
  background: var(--vre-navy);
}

body:has(> main > .site-header + .hero) .mobile-contact-bar a {
  min-height: 49px;
  border-radius: 0;
  background: var(--vre-navy);
  color: var(--vre-white);
}

body:has(> main > .site-header + .hero) .mobile-contact-bar a:first-child {
  background: var(--vre-lime);
  color: var(--vre-navy);
}

@media (min-width: 48rem) {
  body:has(> main > .site-header + .hero) .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  body:has(> main > .site-header + .hero) :where(.button, button, input[type="submit"]) {
    min-height: 49px;
    padding: 10.64px 18.24px;
    font-size: 0.912rem;
  }

  body:has(> main > .site-header + .hero) .expert-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 64px;
  }

  body:has(> main > .site-header + .hero) .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  body:has(> main > .site-header + .hero) :where(.related-grid, .sources-grid) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
  }
}

@media (min-width: 64rem) {
  body:has(> main > .site-header + .hero) .hero {
    padding: 24px 0 76px;
  }

  body:has(> main > .site-header + .hero) .hero-grid {
    grid-template-columns: minmax(0, 676px) minmax(0, 380px);
    gap: 68px;
    align-items: center;
    justify-content: space-between;
  }

  body:has(> main > .site-header + .hero) .lawyer-card {
    margin-inline: 0;
  }

  body:has(> main > .site-header + .hero) .section,
  body:has(> main > .site-header + .hero) .contact-section {
    padding-block: var(--vre-section-y, 102.4px);
  }

  body:has(> main > .site-header + .hero) .immediate-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  body:has(> main > .site-header + .hero) .process-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  body:has(> main > .site-header + .hero) .documents-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 68px;
  }

  body:has(> main > .site-header + .hero) .contact-grid {
    grid-template-columns: minmax(0, 543px) minmax(0, 492px);
    gap: 90px;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(> main > .site-header + .hero) *,
  body:has(> main > .site-header + .hero) *::before,
  body:has(> main > .site-header + .hero) *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Measured reference interpolation: the portrait remains beside the copy at
 * both audited tablet widths and reaches 676/380/68.4 exactly at 1280px. */
@media (min-width: 768px) and (max-width: 1023px) {
  body:has(> main > .site-header + .hero) .hero-grid {
    width: calc(100% - 18.75vw + 105.6px) !important;
    grid-template-columns: minmax(0, 1fr) minmax(294px, calc(9.765625vw + 219px)) !important;
    gap: 5vw !important;
    align-items: center;
    margin-inline: auto;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  body:has(> main > .site-header + .hero) .hero-grid {
    width: calc(100% - 26.875vw + 188.8px) !important;
    grid-template-columns: minmax(0, 1fr) minmax(319px, calc(23.828125vw + 75px)) !important;
    gap: calc(6.71875vw - 17.6px) !important;
    justify-content: center !important;
    margin-inline: auto;
  }
}

@media (min-width: 1280px) {
  body:has(> main > .site-header + .hero) .hero-grid {
    width: 1124.8px !important;
    grid-template-columns: 676px 380px !important;
    gap: 68.4px !important;
    justify-content: center !important;
  }
}

@media (max-width: 767px) {
  body.vre-editorial-target.vre-editorial-immobilien .site-header,
  body.vre-editorial-target.vre-editorial-immobilien .header-inner {
    height: 58px !important;
    min-height: 58px !important;
  }

  body.vre-editorial-target.vre-editorial-immobilien .brand img {
    width: 120px !important;
  }

  body.vre-editorial-target.vre-editorial-immobilien .header-phone {
    min-height: 44px !important;
    font-size: 11.04px !important;
  }
}

body.vre-editorial-target.vre-editorial-immobilien :where(
	.button,
	.hero-actions a,
	.contact-number,
	button,
	input[type="submit"]
) {
	min-height: 44px !important;
}

body.vre-editorial-target.vre-editorial-immobilien .hero-copy {
	width: 100% !important;
	max-width: none !important;
}

body.vre-editorial-target.vre-editorial-immobilien :where(.section-eyebrow, .eyebrow.dark) {
	color: #5b6929 !important;
}

/* 1.0.16: background-aware kicker colors. */
body.vre-editorial-target.vre-editorial-immobilien .lawyer-card .eyebrow.dark {
	color: var(--vre-navy) !important;
}

body.vre-editorial-target.vre-editorial-immobilien .contact-section .section-eyebrow {
	color: var(--vre-sage) !important;
}

/* Light briefing card inside the navy contact band: legacy rules colored the
 * heading like the surrounding dark panel, making it disappear on the card. */
body.vre-editorial-target.vre-editorial-immobilien
	.contact-section .contact-brief h3 {
	color: var(--vre-ink) !important;
}

body.vre-editorial-target.vre-editorial-immobilien
	.contact-section .contact-brief .section-eyebrow {
	color: #5b6929 !important;
}
