/* =====================================================================
   Immobilienmomente, Domain-9-Paket vom 31.10.2026.

   Von build/immobilienmomente-d9.py als /immobilienservice/assets/d9.css
   hinter 4punkt0-angleichung.css gesetzt. Nur Bausteine, die mit den neuen
   Seitenfassungen dazukommen; Farben ausschließlich aus der Palette.
   ===================================================================== */

/* ---- Knopfreihen: immer eine Zeile, auch auf dem Telefon ------------
   Lange Beschriftungen brechen im Knopf um, nie die Reihe. */
.d9-knoepfe {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: .625rem;
  margin: 1.5rem 0 .75rem;
  max-width: 620px;
}
.d9-knoepfe .btn {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
  padding-inline: .75rem;
  text-wrap: balance;
}
@media (max-width: 640px) {
  .d9-knoepfe .btn { font-size: .875rem; padding-inline: .5rem; gap: 8px; }
  .d9-knoepfe .btn .arrow { display: none; }
}
.kontakt-wege .btn .arrow { display: none; }

.d9-oder { margin: .25rem 0 .5rem; font-size: .95rem; }
.d9-oder a { font-weight: 600; text-underline-offset: 3px; }

/* WhatsApp als umrandeter Knopf unter der Knopfreihe, wie auf den anderen
   Domains (Rick, 03.11.2026). */
.d9-wa { margin: 0 0 .75rem; }
.d9-wa .btn { min-height: 48px; }

/* Abschnittsfuß der sechs Grundlagen: Text und Knopf untereinander */
.service-bottom.d9-fuss { display: grid; gap: 1rem; justify-items: start; }
.service-bottom.d9-fuss p { max-width: 900px; margin: 0; }

/* Bildzeile unter den Leistungsmotiven (Medien 6) */
.service-photo-wrap .d9-bildzeile {
  font-size: .875rem;
  line-height: 1.45;
  color: color-mix(in srgb, #081f38 75%, #f0f0f0);
  padding: .5rem 1rem 0;
}

/* Zweite Situationsreihe: nur Verweise */
.secondary-card > p { margin: 0; align-self: center; }

/* Wissensverweise auf der Startseite */
.knowledge-home .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.5rem; }
@media (max-width: 760px) { .knowledge-home .related-grid { grid-template-columns: 1fr; } }
.related-grid > a > .icon,
.related-grid > a > img { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; }
.related-grid > a > span:not([aria-hidden]) { min-width: 0; overflow-wrap: break-word; }

/* Region: Überschrift im Rang der Seite (vorher h3) */
.regional h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin: 0 0 .75rem; }
.regional .note p { margin: 0; }

/* Leistungsrahmen in Fachbeiträgen und die sechs Grundlagen auf der
   Situationsseite */
.article-terms h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
.article-terms p { font-size: .9rem; }
.d9-leistungen .d9-leistungsliste {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.75rem;
  margin: 1.25rem 0;
}
.d9-leistungen h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
.d9-leistungen .d9-leistungsliste p { margin: 0; font-size: .95rem; }
@media (max-width: 760px) { .d9-leistungen .d9-leistungsliste { grid-template-columns: 1fr; } }

/* Weitere Situationen als Liste mit eigener Überschrift */
.guide-related.d9-weitere { display: grid; gap: .6rem; margin-top: 2rem; }
.guide-related.d9-weitere h2 { font-size: 1.4rem; margin: 0 0 .25rem; }
.guide-related.d9-weitere a { font-size: .95rem; }

/* Wissensübersicht ohne Seitenspalte */
.d9-wissenskopf { max-width: 820px; }
.editorial-tool strong { font-weight: 600; }
.editorial-tool { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* Rechenbeispiel: Zahlen rechtsbündig */
.table-scroll .d9-zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* FAQ mit mehreren Absätzen */
.faq-list details > p + p { margin-top: .5rem; }

/* ---- Druckhilfen ---------------------------------------------------- */
.d9-druck { padding-block: 1.5rem 3rem; }
.d9-druck-steuerung {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1rem;
  max-width: 210mm;
  margin: 0 auto 1rem;
}
.d9-druck-steuerung > span { font-size: .9rem; color: color-mix(in srgb, #081f38 75%, #f0f0f0); }
.d9-print-sheet {
  width: min(210mm, 100%);
  margin: 0 auto;
  padding: 12mm;
  background: #f0f0f0;
  border: 1px solid color-mix(in srgb, #081f38 14%, #f0f0f0);
  border-radius: 14px;
  box-shadow: 0 2px 14px rgb(8 31 56 / 0.08);
}
.sheet-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 4mm;
  margin-bottom: 5mm;
  border-bottom: 1px solid #d4952a;
}
.sheet-brand img { display: block; width: 54mm; max-width: 60%; height: auto; }
.sheet-brand span { font-size: .875rem; letter-spacing: .02em; text-align: right; color: color-mix(in srgb, #081f38 75%, #f0f0f0); }
.sheet-copy h1 { font: 400 clamp(1.6rem, 4vw, 2rem)/1.18 var(--display); margin: 0 0 4mm; }
.sheet-copy h2 { font: 400 1.25rem/1.25 var(--display); margin: 5mm 0 3mm; }
.sheet-copy p { margin: 0 0 3mm; }
.sheet-copy table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 3mm 0 4mm; font-size: .9rem; }
.sheet-copy th, .sheet-copy td { border: 1px solid color-mix(in srgb, #081f38 35%, #f0f0f0); vertical-align: top; padding: 3mm; overflow-wrap: anywhere; }
.sheet-copy thead th { text-align: left; background: color-mix(in srgb, #081f38 6%, #f0f0f0); font-weight: 600; }
.sheet-copy th:first-child { width: 36%; }
.sheet-copy tbody tr { height: 20mm; break-inside: avoid; }
.sheet-copy tbody th { font-weight: 400; text-align: left; }
.question-note { margin: 0 0 3mm; break-inside: avoid; }
.question-note h2 { margin: 0 0 1.5mm; font-size: 1.1rem; }
.question-note p { margin: 0; font-size: .95rem; }
.writing-lines {
  height: 18mm;
  margin-top: 1mm;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 5.6mm, color-mix(in srgb, #081f38 30%, #f0f0f0) 5.6mm, color-mix(in srgb, #081f38 30%, #f0f0f0) 5.8mm);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.sheet-copy a[href^="tel:"], .sheet-copy a[href^="mailto:"] { white-space: nowrap; }
@media (max-width: 600px) {
  .d9-print-sheet { padding: 20px 15px; }
  .sheet-brand img { width: 44mm; }
  .sheet-copy table { font-size: .875rem; }
  .sheet-copy th, .sheet-copy td { padding: 7px; }
}

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  .d9-druck { padding: 0; max-width: none; width: auto; }
  .d9-druck-steuerung { display: none !important; }
  .d9-print-sheet { width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
  .sheet-copy { font-size: 10.5pt; line-height: 1.32; color: #000; }
  .sheet-copy h1 { font-size: 17.5pt; margin-bottom: 3mm; }
  .sheet-copy h2 { font-size: 12pt; margin: 4mm 0 2mm; break-after: avoid; }
  .sheet-copy table { font-size: 10pt; margin: 2mm 0 3mm; }
  .sheet-copy th, .sheet-copy td { padding: 2.3mm; }
  .sheet-copy tbody tr { height: 19mm; }
  .sheet-copy thead { display: table-header-group; }
  .sheet-copy a { color: inherit; text-decoration: none; }
  .question-note h2 { font-size: 11.5pt; margin: 0 0 1mm; }
  .question-note p { font-size: 10pt; }
  .writing-lines { height: 17mm; }
  .sheet-brand img { width: 50mm; }
  .sheet-brand span { font-size: 8pt; }
  .d9-knoepfe, .d9-oder, .d9-wa { display: none !important; }
}

/* Knopfschrift nie unter 14 px (das Paket setzt einzelne Knöpfe auf
   13,0 bis 13,9 px) */
main .solution-entry .btn,
main .guide-aside .btn,
main .service-bottom .btn,
main .evidence-actions .btn,
main .knowledge-contact .btn,
main .delivery-footer .btn,
main .topic-filters button {
  font-size: .875rem;
}

/* Druck: Das Paketstylesheet setzt den Fließtext im Druck auf Arial.
   Es bleibt bei den zwei Hausschriften. */
@media print {
  body { font-family: var(--body); }
  .sheet-copy h1, .sheet-copy h2 { font-family: var(--display); }
}
