/* Product palettes: white/silver hospital, pink-gold ACR8, lavender/silver organisations.
   Loaded last; the page attribute keeps these themes out of the shared brand artwork. */
@media screen and (forced-colors: none) {
  body[data-page-theme="blue"] {
    --theme-ink:#153653; --theme-muted:#405b74; --theme-accent:#185d9a;
    --theme-deep:#124574; --theme-mid:#2770b6; --theme-soft:#e2f1ff;
    --theme-line:#b7d4ec; --theme-surface:#f7fbff;
    --theme-gradient:linear-gradient(125deg,#f7fbff 0%,#e5f2ff 55%,#edf8ff 100%);
    --theme-hero:linear-gradient(118deg,#edf7ff 0%,#d3eaff 55%,#e8f6ff 100%);
    --theme-wash:linear-gradient(138deg,#c2dfff,#e0f3ff 65%,#f4fbff);
    --theme-card:linear-gradient(140deg,#fff 0%,#f1f8ff 100%);
    --theme-strong:linear-gradient(125deg,#104877,#1765a6 55%,#267bb4);
  }
  body[data-page-theme="rose"] {
    --theme-ink:#4b293b; --theme-muted:#705463; --theme-accent:#9b315c;
    --theme-deep:#782345; --theme-mid:#b24773; --theme-soft:#fce5ee;
    --theme-line:#e8bccd; --theme-surface:#fff9fb;
    --theme-gradient:linear-gradient(125deg,#fffafb 0%,#ffedf3 55%,#fff4ee 100%);
    --theme-hero:linear-gradient(118deg,#fff2f6 0%,#f9d9e7 55%,#ffece5 100%);
    --theme-wash:linear-gradient(138deg,#f4c7da,#ffe3ea 65%,#fff6ef);
    --theme-card:linear-gradient(140deg,#fff 0%,#fff3f7 100%);
    --theme-strong:linear-gradient(125deg,#792545,#9b315c 55%,#ad4969);
  }
  body[data-page-theme="purple"] {
    --theme-ink:#3e2b59; --theme-muted:#625475; --theme-accent:#6940a0;
    --theme-deep:#50307e; --theme-mid:#8055b6; --theme-soft:#efe4ff;
    --theme-line:#d3bce9; --theme-surface:#fbf8ff;
    --theme-gradient:linear-gradient(125deg,#fcf9ff 0%,#f1e8ff 55%,#f3f0ff 100%);
    --theme-hero:linear-gradient(118deg,#f6edff 0%,#e5d5fb 55%,#ece7ff 100%);
    --theme-wash:linear-gradient(138deg,#dac2f5,#eae0ff 65%,#f5f1ff);
    --theme-card:linear-gradient(140deg,#fff 0%,#f7f0ff 100%);
    --theme-strong:linear-gradient(125deg,#50307e,#6940a0 55%,#7750ad);
  }
  body[data-page-theme] {
    --palette-ink:var(--theme-ink); --palette-muted:var(--theme-muted);
    --palette-accent:var(--theme-accent); --palette-line:var(--theme-line);
    --ink:var(--theme-ink); --muted:var(--theme-muted); --line:var(--theme-line);
    --plum:var(--theme-deep); --purple:var(--theme-deep); --purple-deep:var(--theme-deep);
    --navy:var(--theme-deep); --blue:var(--theme-accent); --violet:var(--theme-accent);
    --pink:var(--theme-accent); --teal:var(--theme-accent);
    --cream:var(--theme-surface); --mint:var(--theme-soft); --lilac:var(--theme-soft);
    --cta-accent:var(--theme-accent); --cta-hover:var(--theme-deep);
    --cta-soft:var(--theme-soft); --cta-line:var(--theme-line); --cta-glow:#32234418;
    color:var(--theme-ink); background:var(--theme-surface);
  }

  /* Hero, content bands and closing surfaces keep one coherent colour family. */
  body[data-page-theme] main > section,
  body[data-page-theme] main > section:is(#acr8-personas,#booking,#acr8,#plans,#ownership,#co-design,#contact,#partners,#product,#audiences,#process,#enquiry,#faq,#products,#solutions,#standards,#journey,#start) {
    color:var(--theme-ink); background:var(--theme-gradient);
  }
  body[data-page-theme] main > section:is(#acr8-personas,#plans,#co-design,#audiences,#enquiry,#solutions,#journey) {
    background:var(--theme-wash);
  }
  body[data-page-theme] section.hero,
  body[data-page-theme] section.hero.unified-hero,
  body[data-page-theme] section.hero.unified-hero:has(.night-slide:not([hidden])),
  body[data-page-theme] section.hero.unified-hero:has(.care-slide:not([hidden])) {
    --hero-purple:var(--theme-deep); --hero-accent:var(--theme-accent);
    color:var(--theme-ink); background:var(--theme-hero);
  }
  body[data-page-theme] section.hero::before,
  body[data-page-theme] section.hero.unified-hero::before {
    background:var(--theme-wash); opacity:.8;
  }
  body[data-page-theme] .hero :is(h1,.unified-hero-title,.hero-product,.unified-hero-product,.hero-benefits),
  body[data-page-theme] .hero.unified-hero :is(.unified-hero-title,.unified-hero-product,.unified-hero-benefits) {color:var(--theme-ink)}
  body[data-page-theme] .hero :is(h1 em,h1>span,.accent,.breadcrumb,.breadcrumb [aria-current="page"]),
  body[data-page-theme] .hero.unified-hero .unified-hero-title>span,
  body[data-page-theme] .hero.unified-hero .unified-hero-breadcrumb a[aria-current="page"] {color:var(--theme-accent)}
  body[data-page-theme] .hero :is(.hero-description,.hero-note,.hero-foot),
  body[data-page-theme] .hero.unified-hero :is(.unified-hero-description,.unified-hero-note) {color:var(--theme-muted)}
  body[data-page-theme] .hero :is(.hero-art,.unified-hero-art) {background:var(--theme-soft)}
  body[data-page-theme] .hero :is(.hero-caption,.unified-hero-sticker) {
    color:var(--theme-ink); background:var(--theme-card);
    box-shadow:0 5px 0 #1b29421a;
  }
  body[data-page-theme] .hero .hero-caption svg {color:var(--theme-accent)}
  body[data-page-theme] .hero.unified-hero .unified-hero-benefits .benefit-icon,
  body[data-page-theme="blue"] .hero .benefit-icon {
    color:#fff; background:var(--theme-accent); border-color:var(--theme-accent);
  }
  body[data-page-theme] .hero.unified-hero .unified-hero-arrow {
    color:var(--theme-accent); background:#fff; border-color:var(--theme-line);
  }
  body[data-page-theme] .hero.unified-hero .unified-hero-dot>span {
    background:#fff; border-color:var(--theme-accent);
  }
  body[data-page-theme] .hero.unified-hero .unified-hero-dot[aria-current="true"]>span {
    background:var(--theme-accent); border-color:var(--theme-accent);
  }

  /* Buttons remain dark enough for white labels; outlines stay legible before hover. */
  body[data-page-theme] .enquiry-cta[data-cta-tone="solid"],
  body[data-page-theme] .hero.unified-hero .unified-hero-actions.enquiry-cta,
  body[data-page-theme] .hero.unified-hero .unified-hero-actions>.enquiry-cta[data-cta-tone="solid"] {
    background:var(--theme-strong); color:#fff; border-color:var(--theme-accent);
  }
  body[data-page-theme] .enquiry-cta[data-cta-tone="solid"]:hover {background:var(--theme-deep);color:#fff}
  body[data-page-theme] .enquiry-cta[data-cta-tone="outline"],
  body[data-page-theme] .hero.unified-hero .unified-hero-actions>.button-outline-light,
  body[data-page-theme="blue"] .hero .btn-light {
    background:#fff; color:var(--theme-accent); border-color:var(--theme-line);
  }
  body[data-page-theme] .enquiry-cta[data-cta-tone="soft"] {background:var(--theme-soft);color:var(--theme-accent)}
  body[data-page-theme] :is(.text-link,.gallery-trigger,.org-kicker,.section-heading .eyebrow,.small-label,.product-kicker,.scene-label-row,.scene-cta,.scene-product,.partners-eyebrow) {color:var(--theme-accent)}
  body[data-page-theme] :is(.ace-desktop-nav,.ace-mobile-nav) [aria-current="page"] {
    color:var(--theme-accent); border-color:var(--theme-accent);
  }
  body[data-page-theme] :focus-visible {outline:3px solid var(--theme-accent);outline-offset:4px}

  /* ACR8: replace former mint/teal panels with warm pink gradients. */
  body[data-page-theme="rose"] #booking .booking-card,
  body[data-page-theme="rose"] #acr8 .product-cards>figure.product-card,
  body[data-page-theme="rose"] #acr8 .feature-story,
  body[data-page-theme="rose"] #acr8 .feature-story:nth-of-type(even),
  body[data-page-theme="rose"] #plans .plan-card,
  body[data-page-theme="rose"] #ownership .ownership-card,
  body[data-page-theme="rose"] #co-design .story-card,
  body[data-page-theme="rose"] .acr-persona-card {
    background:var(--theme-card);color:var(--theme-ink);border-color:var(--theme-line);
  }
  body[data-page-theme="rose"] #acr8 :is(.configuration-story,.efficiency-story),
  body[data-page-theme="rose"] #plans .plan-card:is(.featured,.ownership),
  body[data-page-theme="rose"] #ownership .ownership-card.gift {
    background:var(--theme-wash);color:var(--theme-ink);border-color:var(--theme-line);
  }
  body[data-page-theme="rose"] #acr8 :is(.mode-badge,.feature-grid>div>span),
  body[data-page-theme="rose"] .gallery-tabs button[aria-selected="true"] {background:var(--theme-accent);color:#fff}
  body[data-page-theme="rose"] #acr8 .efficiency-story strong,
  body[data-page-theme="rose"] .acr-persona-card-copy strong {color:var(--theme-accent)}
  body[data-page-theme="rose"] .acr-persona-card-copy p {color:var(--theme-muted)}
  body[data-page-theme="rose"] #contact :is(.contact-inner>p,.contact-options),
  body[data-page-theme="rose"] #acr8 :is(.product-notes p,.feature-grid p,.configuration-story p) {color:var(--theme-muted)}

  /* Hospital: blue gradients continue through products, filters and clinical scenarios. */
  body[data-page-theme="blue"] .intro-strip {background:var(--theme-soft)}
  body[data-page-theme="blue"] :is(.product-card,.product-card.ace,.scenario-card,.standard-card,.enquiry-form,.dialog-visual,.dialog-mapping) {
    background:var(--theme-card);color:var(--theme-ink);border-color:var(--theme-line);
  }
  body[data-page-theme="blue"] :is(.product-card,.product-card.ace) {background:var(--theme-wash)}
  body[data-page-theme="blue"] :is(.scene-image-button,.standard-icon,.standard-card:nth-child(2n) .standard-icon) {background:var(--theme-soft);color:var(--theme-accent)}
  body[data-page-theme="blue"] :is(.product-kicker,.ace .product-kicker,.journey-step .step-num,.journey-note .icon) {color:var(--theme-accent)}
  body[data-page-theme="blue"] :is(.scene-description,.standard-card p,.journey-step p,.section-desc,.dialog-description,.form-lead) {color:var(--theme-muted)}
  body[data-page-theme="blue"] .filter-tab[aria-pressed="true"] {background:var(--theme-strong);border-color:var(--theme-accent);color:#fff}
  body[data-page-theme="blue"] .closing-band {background:var(--theme-strong);color:#fff}
  body[data-page-theme="blue"] .closing-band .closing-inner p {color:#e6f3ff}
  body[data-page-theme="blue"] .closing-band .enquiry-cta {background:#fff;color:var(--theme-accent);border-color:#fff}

  /* Organisations: lilac surfaces, purple controls, lavender product stages. */
  body[data-page-theme="purple"] :is(.org-product,.org-story,.org-plan,.enquiry-form-card,.faq-list details,.org-support-link) {
    background:var(--theme-card);color:var(--theme-ink);border-color:var(--theme-line);
  }
  body[data-page-theme="purple"] :is(.org-product-art,.org-product:nth-child(2) .org-product-art,.enquiry-intro,.closing-band) {
    background:var(--theme-wash);color:var(--theme-ink);
  }
  body[data-page-theme="purple"] :is(.org-kicker,.section-heading .eyebrow,.enquiry-intro>.eyebrow,.enquiry-intro .accent,.closing-band .eyebrow) {color:var(--theme-accent)}
  body[data-page-theme="purple"] :is(.enquiry-intro>p,.org-product p:not(.org-kicker),.org-story p:not(.org-kicker),.section-heading>p) {color:var(--theme-muted)}
  body[data-page-theme="purple"] .enquiry-steps span {background:var(--theme-accent);color:#fff}
  body[data-page-theme="purple"] #org-context {background:var(--theme-surface);border-color:var(--theme-line)}

  /* Brand and partner marks retain their original white presentation. */
  body[data-page-theme] #partners :is(.partner-card,.partner-logo-wrap,.partner-logo) {background:#fff}
}
