/* Triple Helix Solutions V106: authoritative final site-wide colour contract. */
:root {
  --ths-maroon: #76172f;
  --ths-beige: #ead8c2;
  --ths-white: #fff;
}

/* One consistent white/maroon top navigation across every page type. */
body.v64-medtech-layout > header,
body.v64-medtech-layout > header.top,
body.v64-medtech-layout > header .wrap,
body.v64-medtech-layout > header nav,
body.v64-medtech-layout > header .nav,
body.v64-medtech-layout > header .navlinks,
body.v64-medtech-layout > header .top-products-dd,
body.v64-medtech-layout > header .top-products-menu {
  background: var(--ths-white) !important;
  background-color: var(--ths-white) !important;
  color: var(--ths-maroon) !important;
}

body.v64-medtech-layout > header nav a,
body.v64-medtech-layout > header .nav a,
body.v64-medtech-layout > header .navlinks > a,
body.v64-medtech-layout > header .top-products-btn,
body.v64-medtech-layout > header .top-products-menu a,
body.v64-medtech-layout > header .top-products-label {
  background: var(--ths-white) !important;
  background-color: var(--ths-white) !important;
  color: var(--ths-maroon) !important;
  -webkit-text-fill-color: var(--ths-maroon) !important;
  border-color: transparent !important;
  text-decoration-color: var(--ths-maroon) !important;
}

body.v64-medtech-layout > header :is(nav a,.nav a,.navlinks > a,.top-products-btn,.top-products-menu a):is(:hover,:focus-visible,:active),
body.v64-medtech-layout > header .navlinks > a.btn:is(:hover,:focus-visible,:active) {
  background: var(--ths-beige) !important;
  background-color: var(--ths-beige) !important;
  color: var(--ths-maroon) !important;
  -webkit-text-fill-color: var(--ths-maroon) !important;
  border-color: var(--ths-beige) !important;
}

body.v64-medtech-layout > header :is(nav a,.nav a,.navlinks > a,.top-products-btn,.top-products-menu a) * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Genuine maroon information panels always use white nested text. */
:is(.hero-panel,.quality-main,.about-card,.rfq-list,.feature:not(.light),
  .vet-benefit,.cta,.certificate-warning,.trust,.quality-card.maroon,
  .maroon-box,.maroon-panel,.bg-maroon,[data-theme-panel="maroon"]) {
  background: var(--ths-maroon) !important;
  background-color: var(--ths-maroon) !important;
  color: var(--ths-white) !important;
}

:is(.hero-panel,.quality-main,.about-card,.rfq-list,.feature:not(.light),
  .vet-benefit,.cta,.certificate-warning,.trust,.quality-card.maroon,
  .maroon-box,.maroon-panel,.bg-maroon,[data-theme-panel="maroon"])
  :is(h1,h2,h3,h4,h5,h6,p,span,small,li,dt,dd,b,strong,em,i,a,label) {
  color: var(--ths-white) !important;
  -webkit-text-fill-color: var(--ths-white) !important;
  text-decoration-color: currentColor !important;
}

:is(.hero-panel,.quality-main,.about-card,.rfq-list,.feature:not(.light),
  .vet-benefit,.cta,.certificate-warning,.trust,.quality-card.maroon,
  .maroon-box,.maroon-panel,.bg-maroon,[data-theme-panel="maroon"]) ::marker {
  color: var(--ths-white) !important;
}

/* The four homepage divisions and all catalogue/product cards remain white. */
:is(#product-surgical,#product-dental,#product-implants,#product-veterinary,
  .division,.surg-page-card,.dental-page-card,.full-vet-page,
  .homepage-implant-card,.implant-card,.product-card,.real-product-card,
  .matched-product-card,.vet-cat-card,.surg-cat-card,.dental-cat-card,
  .related .card) {
  background: var(--ths-white) !important;
  background-color: var(--ths-white) !important;
  color: var(--ths-maroon) !important;
}

:is(#product-surgical,#product-dental,#product-implants,#product-veterinary,
  .division,.surg-page-card,.dental-page-card,.full-vet-page,
  .homepage-implant-card,.implant-card,.product-card,.real-product-card,
  .matched-product-card,.vet-cat-card,.surg-cat-card,.dental-cat-card,
  .related .card) :is(h1,h2,h3,h4,h5,h6,p,span,small,li,dt,dd,b,strong,em,i,a,label) {
  color: var(--ths-maroon) !important;
  -webkit-text-fill-color: var(--ths-maroon) !important;
}

/* All controls: maroon/white normally, beige/maroon when interacting. */
:is(.btn,.small-btn,.v55-detail-link,.view-range-btn,.surg-view-range,
  .dental-view-range,.prompt-rfq-btn,.filter-btn,.main-view-range,
  .external-email-link,.commercial-btn-primary,.commercial-btn-secondary,
  .ths-visitor-stats__button,.division-actions button,
  button:not(.top-products-btn),input[type="submit"],input[type="button"],
  input[type="reset"],a[role="button"],.cta > a):not(body.v64-medtech-layout > header *) {
  background: var(--ths-maroon) !important;
  background-color: var(--ths-maroon) !important;
  border-color: var(--ths-maroon) !important;
  color: var(--ths-white) !important;
  -webkit-text-fill-color: var(--ths-white) !important;
  text-decoration-color: var(--ths-white) !important;
}

:is(.btn,.small-btn,.v55-detail-link,.view-range-btn,.surg-view-range,
  .dental-view-range,.prompt-rfq-btn,.filter-btn,.main-view-range,
  .external-email-link,.commercial-btn-primary,.commercial-btn-secondary,
  .ths-visitor-stats__button,.division-actions button,
  button:not(.top-products-btn),input[type="submit"],input[type="button"],
  input[type="reset"],a[role="button"],.cta > a):not(body.v64-medtech-layout > header *) * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  fill: currentColor !important;
}

:is(.btn,.small-btn,.v55-detail-link,.view-range-btn,.surg-view-range,
  .dental-view-range,.prompt-rfq-btn,.filter-btn,.main-view-range,
  .external-email-link,.commercial-btn-primary,.commercial-btn-secondary,
  .ths-visitor-stats__button,.division-actions button,
  button:not(.top-products-btn),input[type="submit"],input[type="button"],
  input[type="reset"],a[role="button"],.cta > a):not(body.v64-medtech-layout > header *):is(:hover,:focus-visible,:active) {
  background: var(--ths-beige) !important;
  background-color: var(--ths-beige) !important;
  border-color: var(--ths-beige) !important;
  color: var(--ths-maroon) !important;
  -webkit-text-fill-color: var(--ths-maroon) !important;
  text-decoration-color: var(--ths-maroon) !important;
}

/* Direct Product Enquiry and Distributor action buttons. */
body.v64-medtech-layout .actions a.btn:not(:hover):not(:focus-visible):not(:active),
body.v64-medtech-layout .actions a.btn:visited:not(:hover):not(:focus-visible):not(:active) {
  color: var(--ths-white) !important;
  -webkit-text-fill-color: var(--ths-white) !important;
}

/* Facility photographs retain their original square presentation. */
#manufacturing :is(.facility-card,.tech-card,.machine-card) img,
.ths-facility-grid img,
.facility-grid img,
.technology-grid img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
}
