/* Loaded only for native posts and their archives; every rule is scoped. */
body.estate-article-view .estate-page-heading h1 { max-width: 29ch; }
body.estate-article-view .estate-post-meta { line-height: 1.65; }
body.estate-article-view .estate-entry-content { font-size: 1.0625rem; line-height: 1.8; text-align: left; }
body.estate-article-view .estate-entry-content p { margin: 0 0 1.35em; }
body.estate-article-view .estate-entry-content :where(h2, h3, h4, h5, h6) { clear: both; margin: 1.9em 0 .8em; text-wrap: pretty; }
body.estate-article-view .estate-entry-content :where(ul, ol) { padding-left: 1.5em; margin: 0 0 1.5em; }
body.estate-article-view .estate-entry-content li { margin: .65em 0; padding-left: .25em; }
body.estate-article-view .estate-entry-content li > p:last-child { margin-bottom: 0; }
body.estate-article-view .estate-entry-content :where(ul, ol) :where(ul, ol) { margin-block: .6em; }
body.estate-article-view .estate-entry-content > :first-child { margin-top: 0; }
body.estate-article-view .estate-entry-content > :last-child { margin-bottom: 0; }
body.estate-article-view .estate-entry-content img { display: block; width: auto; max-width: 100%; height: auto; max-height: 720px; margin: 1.6em auto; border-radius: 10px; object-fit: contain; }
body.estate-article-view .estate-entry-content :where(.alignleft, .alignright, .aligncenter) { float: none; max-width: 100%; margin-inline: auto; }
body.estate-article-view .estate-entry-content :where(figure, .wp-caption) { width: fit-content; max-width: 100%; margin: 1.8em auto; }
body.estate-article-view .estate-entry-content :where(figure, .wp-caption) img { margin: 0 auto; }
body.estate-article-view .estate-entry-content :where(figcaption, .wp-caption-text) { max-width: 72ch; margin: .8em auto 0; text-align: left; font-size: .875rem; line-height: 1.6; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll { clear: both; width: 100%; max-width: 100%; overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--estate-line); border-radius: 12px; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll table { display: table; float: none; width: 100%; max-width: none; margin: 0; border: 0; border-collapse: collapse; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll :where(th, td) { min-width: 120px; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--estate-line); vertical-align: top; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll :where(th, td) + :where(th, td) { border-left: 1px solid var(--estate-line); }
body.estate-article-view .estate-entry-content .estate-article-table-scroll tr:last-child td { border-bottom: 0; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll th { background: var(--estate-soft); font-weight: 700; text-align: left; }
body.estate-article-view .estate-entry-content .estate-article-table-scroll caption { padding: 14px 18px; text-align: left; font-weight: 700; }
body.estate-article-archive .estate-card-body { gap: 0; }
body.estate-article-archive .estate-content-card h2 { text-wrap: pretty; }
body.estate-article-archive .estate-content-card p { line-height: 1.75; }
@media (max-width: 1000px) {
  body.estate-article-view .estate-content-layout,
  body.estate-article-archive .estate-content-layout { grid-template-columns: minmax(0, 1fr); }
  body.estate-article-view .estate-sidebar,
  body.estate-article-archive .estate-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  body.estate-article-view .estate-related-posts { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body.estate-article-view .estate-entry-content { padding: 24px 18px; font-size: 1rem; line-height: 1.75; }
  body.estate-article-view .estate-entry-content :where(h2, h3, h4, h5, h6) { margin-top: 1.6em; }
  body.estate-article-view .estate-entry-content img { margin-block: 1.3em; border-radius: 8px; }
  body.estate-article-view .estate-entry-content :where(figure, .wp-caption) img { margin-block: 0; }
  body.estate-article-view .estate-entry-content .estate-article-table-scroll :where(th, td) { min-width: 108px; padding: 12px; }
  body.estate-article-view .estate-sidebar,
  body.estate-article-archive .estate-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  body.estate-article-view .estate-entry-content .estate-article-table-scroll { overflow: visible; border: 0; }
  body.estate-article-view .estate-entry-content img { break-inside: avoid; }
}

/* Final interior-page layer. Homepage and calculator styles remain untouched. */
body:not(.home) :is(.estate-region-button, .estate-about-button, .estate-contacts-request, .estate-pricing-button),
body:not(.home).estate-service-view .estate-entry-content .estate-service-action {
  min-height: 54px;
  border-radius: var(--radius, 12px);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Structural cards share a radius; thumbnails, icons and badges keep theirs. */
body:not(.home) .estate-region :is(.estate-region-hero, .estate-region-card, .estate-region-example),
body:not(.home) .estate-region-catalog .estate-catalog-hero,
body:not(.home) .estate-about :is(.estate-about-hero, .estate-about-service, .estate-about-document),
body:not(.home) .estate-pricing section.estate-pricing-group {
  border-radius: var(--card-radius, 18px);
}

/* Use one section interval instead of stacking padding on both neighbours. */
body:not(.home) .estate-about section.estate-about-story {
  padding: 48px 0 0;
}
body:not(.home) .estate-about :is(section.estate-about-services, section.estate-about-documents, section.estate-about-work) {
  padding: 48px 0 0;
}
body:not(.home) .estate-about section.estate-about-principles {
  margin-top: 48px;
}
body:not(.home) .estate-report-guide > .eyebrow + h2 {
  margin-top: 0;
}

/* Override global section padding only on the regional examples container. */
body:not(.home) .estate-region section.estate-region-examples {
  padding: 32px 0 0;
}
body:not(.home) .estate-region .estate-region-examples h2 {
  margin-top: 0;
  margin-bottom: 24px;
}

/* Both two-card and three-card rows align with the surrounding page blocks.
   WordPress may insert an inner group wrapper; keep only prose constrained. */
@media (min-width: 1001px) {
  body:not(.home) .estate-region > .estate-region-copy:has(.estate-region-examples) {
    max-width: none;
  }
  body:not(.home) .estate-region > .estate-region-copy > .wp-block-group__inner-container {
    max-width: none;
  }
  body:not(.home) .estate-region > .estate-region-copy:has(> .estate-region-examples .estate-region-example-grid > .wp-block-column:nth-child(3):last-child) > :is(table, .wp-block-table),
  body:not(.home) .estate-region > .estate-region-copy > .wp-block-group__inner-container > :is(table, .wp-block-table) {
    max-width: none;
  }
  body:not(.home) .estate-region > .estate-region-copy > :not(.estate-region-examples):not(.wp-block-group__inner-container):not(table):not(.wp-block-table),
  body:not(.home) .estate-region > .estate-region-copy > .wp-block-group__inner-container > :not(.estate-region-examples):not(table):not(.wp-block-table),
  body:not(.home) .estate-region .estate-region-examples :is(h2, .estate-region-examples-intro) {
    max-width: 900px;
  }
}

/* The regional programme table is a page-width panel, not a prose column. */
body:not(.home) .estate-region > .estate-region-copy table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--card-radius, 18px);
  overflow: hidden;
}
body:not(.home) .estate-region > .estate-region-copy table :is(th, td) {
  border: 0;
  border-bottom: 1px solid var(--line);
}
body:not(.home) .estate-region > .estate-region-copy table :is(th, td) + :is(th, td) {
  border-left: 1px solid var(--line);
}
body:not(.home) .estate-region > .estate-region-copy table > :is(tbody, tfoot):last-child > tr:last-child > :is(th, td) {
  border-bottom: 0;
}

@media (max-width: 600px) {
  body:not(.home) .estate-about section.estate-about-story,
  body:not(.home) .estate-about :is(section.estate-about-services, section.estate-about-documents, section.estate-about-work) {
    padding: 32px 0 0;
  }
  body:not(.home) .estate-about section.estate-about-principles {
    margin-top: 32px;
  }
}

/* Suppress the textual no-JS fallback only after navigation is enhanced. */
body:not(.home) .estate-mobile-nav.is-enhanced noscript {
  display: none;
}

