/* Preserve the existing project layout while exposing native Elementor nodes. */
body.family-field .project-dossier.tpi-native-container,
body.family-field .project-dossier__hero.tpi-native-container,
body.family-field .project-dossier__hero > .shell.tpi-native-container,
body.family-field .project-dossier__image.tpi-native-container,
body.family-field .project-dossier .split-layout > .tpi-native-container,
body.family-field .project-next.tpi-native-container,
body.family-field .project-next > .shell.tpi-native-container {
  --display: block;
}

/* The original figure contributes a 1em bottom margin in normal block flow. */
body.family-field .project-dossier__image.tpi-native-container {
  margin-bottom: 16px;
}

/* Real widget boxes remain selectable in the editor. */
body.family-field :is(.elementor-widget-tpi-project-inquiry,.elementor-widget-tpi-contact-inquiry,.elementor-widget-tpi-project-grid) { width: 100%; min-width: 0; }
body.family-field .elementor-widget-tpi-language-switcher { width: auto; flex: 0 0 auto; }
body.family-field .tpi-language-switcher a { gap: 6px; min-width: 34px; width: auto; }
body.family-field .tpi-language-switcher__code { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
body.elementor-editor-active .elementor-widget-tpi-project-inquiry .tpi-inquiry,
body.elementor-editor-active .elementor-widget-tpi-contact-inquiry .tpi-inquiry { pointer-events: none; }
body.family-field .field-project-archive.tpi-native-container,
body.family-field .field-project-archive > .tpi-native-container,
body.family-field .field-project-archive .shell:not(.field-page-hero__grid),
body.family-field .field-page-hero__grid > .tpi-native-container,
body.family-field .field-archive-hero__media.tpi-native-container,
body.family-field .field-project-card.tpi-native-container,
body.family-field .field-project-card .tpi-native-tag-figure,
body.family-field .field-project-card .tpi-native-tag-figure > .tpi-native-container { --display: block; }
body.family-field .tpi-project-loop > .elementor { display: contents; }
body.family-field .field-project-card .tpi-native-tag-figure { margin-bottom: 0; }
body.family-field .field-project-card .tpi-native-tag-figure > a { display: block; width: 100%; height: 100%; }
body.family-field .field-project-archive .field-application-row .shell > .field-project-archive__categories { border: 0; gap: 0 32px; }
/* The archive category heading has no companion text. Use the full row
 * instead of reserving the shared section heading's empty second column. */
:where(body.family-field .field-project-archive .field-application-row) .field-section-heading {
  grid-template-columns: minmax(0, 1fr);
}
:where(body.family-field .field-project-archive .field-application-row) .field-section-heading h2 {
  hyphens: none;
}
/* Home section headings use their available row, including in Elementor.
 * The timeline title shares that row with its playback control. */
body.family-field:where(.page-id-4, .page-id-99) .field-section-heading {
  grid-template-columns: minmax(0, 1fr);
}
body.family-field:where(.page-id-4, .page-id-99) .tpi-process-timeline .tl-heading-title {
  max-width: none;
  min-width: 0;
  flex: 1;
}
body.family-field:where(.page-id-4, .page-id-99) main :is(h1, h2, h3, h4, h5, h6) {
  hyphens: none;
}
/* Give the home coordination labels enough room for complete words.
 * Reduce the column count before the cards become narrower than their text. */
body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__layout {
  column-gap: 48px;
}
body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__row article {
  padding-inline: 16px;
  min-width: 0;
}
body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__row h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
@media (max-width: 1200px) {
  body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
  }
}
@media (min-width: 721px) and (max-width: 960px) {
  body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__row article:nth-child(2n) {
    border-right: 0;
  }
  body.family-field:where(.page-id-4, .page-id-99) .field-responsibility__row article:nth-child(-n + 2) {
    border-bottom: 1px solid #56574f;
  }
}
body.family-field .field-project-archive__categories > .tpi-native-tag-li { padding: 18px 0; border-top: 1px solid var(--line); font-weight: 600; line-height: 1.65; --display: block; }
body.family-field .field-archive-hero__visual > .elementor-widget-text-editor p { margin-bottom: 0; font-size: 16px; color: var(--muted); }
body.family-field .field-project-card .tpi-project-card__link .elementor-button,
body.family-field .field-project-card a.tpi-project-card__link { padding: 0; min-height: 0; background: transparent; border: 0; color: var(--ink); font-size: 16px; box-shadow: none; }
body.family-field .field-project-card .elementor-button-icon { display: none; }

/* The home services link follows the theme in every link state. Elementor's
 * default :visited/:hover/:focus color is white, even on a light background.
 * Cover both the public anchor and the native Button's editor wrapper, while
 * allowing explicit per-widget Elementor colors to take precedence. */
:where(body.family-field .field-capabilities:not(.field-capabilities--page))
  .field-manifesto :is(a.button--text, .button--text > a.elementor-button) {
    color: var(--ink);
    background: transparent;
}

/* Match the TR note's full-hero anchor while keeping the EN note in the
 * accessible content grid and preserving its existing mobile flow. */
@media (min-width: 901px) {
  body.family-field.page-id-4 .field-hero--home .field-hero__grid {
    position: static;
  }
}

/* Keep the gold header CTA readable after visiting its translated target.
 * Hover/focus colors and explicit Elementor widget styles stay authoritative. */
:where(body.family-field .site-header) :is(a.button--primary, .button--primary > a.elementor-button):where(:not(:hover):not(:focus-visible)) {
  color: #17130a;
}
