/* Scoped content integration fixes; original theme CSS stays intact. */
@media (max-width: 768px) {
  .contact-grid > .contact-details,
  .contact-grid .contact-detail { width: 100%; max-width: none; justify-self: stretch; }
}

/* Body links must not override the existing white button label. */
.import-reading a.button,
.import-reading a.button:visited { color: #fff; text-decoration: none; }

/* Category navigation uses the established gold border and type scale. */
nav.editorial-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 0;
  padding-bottom: 30px;
}
nav.editorial-categories a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 9px 16px;
  border: 1px solid var(--border);
  color: var(--gold-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
nav.editorial-categories a[aria-current="page"],
nav.editorial-categories a:hover,
nav.editorial-categories a:focus-visible {
  color: #fff;
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}
nav.editorial-categories a:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

/* Imported page numbers retain their source markup and theme presentation. */
.editorial-pagination > a,
.editorial-pagination > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  color: var(--gold-dark);
  font-size: 16px;
  text-decoration: none;
}
.editorial-pagination > [aria-current="page"],
.editorial-pagination > a:hover,
.editorial-pagination > a:focus-visible { color: #fff; background: var(--gold-dark); }
.editorial-pagination > a:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

/* Home questions belong in a readable block after regional coverage. */
.home-faq { background: var(--cream); }
.home-faq > .shell { max-width: 1060px; }
.home-faq h2 { margin-bottom: 32px; font-size: clamp(36px, 3.5vw, 52px); letter-spacing: -.032em; }
.home-faq summary h3 { display: inline; margin: 0; font: inherit; }
.home-faq .import-faq > div > p:last-child { margin-bottom: 0; }
.home-faq .import-faq:focus-within { outline: 2px solid var(--gold-dark); outline-offset: 3px; }

/* Keep the original form cards clear of the sticky header at quote links. */
#quote { scroll-margin-top: 24px; }
body.admin-bar #quote { scroll-margin-top: 56px; }
@media (max-width: 782px) { body.admin-bar #quote { scroll-margin-top: 70px; } }

/* About: separate grid items prevent nested 100% heights from overlapping.
   Keep the theme's original cards, borders, type, palette and spacing. */
.about-page .tms-about-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.about-page .tms-about-layout > .import-section { min-width: 0; min-height: 0; margin: 0; }
.about-page .tms-about-layout > .tms-about-services,
.about-page .tms-about-layout > .tms-about-cta,
.about-page .tms-about-layout > .about-mission-media { grid-column: 1 / -1; }
.about-page .tms-about-layout > .about-mission-media { min-height: 0; aspect-ratio: 3 / 2; }
.about-page .tms-about-layout > .about-mission-media img { min-height: 0; }
.about-page .tms-about-layout .service-list { max-width: none; }
@media (max-width: 699px) {
  .about-page .tms-about-layout { grid-template-columns: minmax(0, 1fr); }
  .about-page .tms-about-layout .service-list { grid-template-columns: minmax(0, 1fr); }
}

/* Keep paired desktop hero actions separated without changing their styling. */
@media (min-width: 769px) {
  .page-hero__copy > p:has(> a.button + a.text-link) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
  }
}

/* Content CTAs must not stretch across their parent grid column. */
.inner-page .import-section > a.button:not(.button--wide) {
  justify-self: start;
  align-self: start;
  width: fit-content;
  max-width: 100%;
}
