/* SGTM V525 — final public-page theme corrections.
   Preserves V524 footer alignment, current heroes, page content and dark calculator.
   Explicit light/dark scopes prevent the old inherited-colour conflicts. */
body#sgtm-premium-v223 {
  --sgtm525-ink:#102d43;
  --sgtm525-copy:#465d70;
  --sgtm525-blue:#076aae;
  --sgtm525-on-dark:#c5d7e5;
}

/* Readable project panels, including BMW, Cupra and Jeep case studies. */
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main #project .sid467-panel :is(h2,h3,strong) {
  color:var(--sgtm525-ink)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main #project .sid467-panel :is(p,li,.sid467-note) {
  color:var(--sgtm525-copy)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main #project .sid467-panel :is(a,.sid467-eyebrow),
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .sid467-section:not(.sid467-dark):not(.sid467-cta) .sid467-eyebrow {
  color:var(--sgtm525-blue)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .case-summary .case-gallery-intro :is(p,.label) {
  color:var(--sgtm525-copy)!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .case-summary .case-gallery-intro h2 {
  color:var(--sgtm525-ink)!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .case-video-shell :is(.audi-media-note,#bmw-video-caption),
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .sa151-cta p {
  color:var(--sgtm525-on-dark)!important;
}

/* Supporting text and aligned action rows on light service cards. */
html body#sgtm-premium-v223 main :is(.sas-brand-grid,.level-grid) .audit-card-v222 li,
html body#sgtm-premium-v223 main #premium-service-grid-v223 .audit-link-card-v222 p span {
  color:var(--sgtm525-copy)!important;
}
html body#sgtm-premium-v223 main .contact-options .audit-card-v222 > a:not(.btn),
html body#sgtm-premium-v223 main .audit-card-v222:not(.process *) > :is(b,span):first-child {
  color:var(--sgtm525-blue)!important;
}
html body#sgtm-premium-v223 main .service-grid > a.audit-link-card-v222:not([hidden]) {
  display:flex;
  flex-direction:column;
  min-width:0;
  height:100%;
}
html body#sgtm-premium-v223 main .service-grid > a.audit-link-card-v222 > b:last-child {
  margin-top:auto;
  padding-top:16px;
}
html body#sgtm-premium-v223 main :is(.sid467-grid,.mech-grid-v231,.sgtm-proof-grid,.v337-service-grid) > article {
  min-width:0;
  box-sizing:border-box;
}

/* Cyan remains decorative; words on pale surfaces use a deeper blue. */
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main :is(
  .ab463-definitions strong,.sgtm-heavy-arrow-v405,.sgtm-scr-arrow-v406,
  .sgtm-scr-arrow-v406 span,.sgtm-heavy-accent-v405,.sgtm-scr-title-accent-v406,
  .sgtm-airbag-v483-card-symbol,.sgtm-srs-v485-card-label,#sgtm-v416-heading span,
  .diagnostic-mobile-details .section-head .label,.sgtm-v417-check > span,
  .sgtm-v417-intake h2 em,.sgtm-v418-capability__eyebrow,
  .sgtm-v418-capability__button--secondary,.sgtm-v416-card-num,
  .remap-intent-head-v264 .label,.rm464-evidence .label,.rm464-case-link,
  .remap-carousel-copy-v382 h3,.ecu-security-cta .eyebrow,
  .guide445-section-1 .guide445-step,.guide445-section-3 .guide445-step
) {
  color:var(--sgtm525-blue)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main#file-support-v444.guide446 :is(.guide445-section-1,.guide445-section-3) .guide445-card-mark.guide446-card-number,
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main#file-support-v444.guide446 .guide446-check-panel .guide446-eyebrow {
  color:var(--sgtm525-blue)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223 main .sgtm-airbag-v483-disclaimer {color:var(--sgtm525-copy)!important}
html body#sgtm-premium-v223 main .sgtm-coverage-visual-footer-v408 {background:#081b2c!important}

/* Readable white labels across the primary blue button surface. */
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main :is(
  .sgtm-b493-primary,.guide446-cta,.mech-btn-v231.mech-primary-v231,
  .sgtm-airbag-v483-button,.ecu-security-primary,.calc-button,
  #sgtm-hero-v456 .f444-actions > a:first-child
) {
  background:#076aae!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html body#sgtm-premium-v223 main :is(.sgtm-b493-primary,.guide446-cta,.mech-btn-v231.mech-primary-v231,.sgtm-airbag-v483-button,.ecu-security-primary,.calc-button) span {
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223 main :is(.sgtm-b493-primary,.guide446-cta,.mech-btn-v231.mech-primary-v231,.sgtm-airbag-v483-button,.ecu-security-primary,.calc-button):hover {background:#08588d!important}
html body#sgtm-premium-v223 main :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid #0876bb;
  outline-offset:4px;
}

/* Text-only hero corrections; geometry, artwork and animation are unchanged. */
html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main #sgtm-hero-v456 .hero456-copy > p {
  color:var(--sgtm525-on-dark)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223 main #sgtm-hero-v456 :is(.hero456-coordinate,figcaption small) {
  color:#a7c8dc!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Booking copy on the white form; V507 native-select styles are retained. */
html body#sgtm-premium-v223 main #booking-form .booking-form :is(.form-heading > span,.consent a) {
  color:var(--sgtm525-blue)!important;
  -webkit-text-fill-color:currentColor!important;
}
html body#sgtm-premium-v223 main #booking-form .booking-form .form-heading > p {color:var(--sgtm525-copy)!important}

/* Cupra related-service panel: existing module left, related-service copy right. */
html body#sgtm-premium-v223 main .cupra505-connected {
  background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
html body#sgtm-premium-v223 main .cupra505-connected::before,
html body#sgtm-premium-v223 main .cupra505-connected-media::after {display:none!important}
html body#sgtm-premium-v223 main .cupra505-connected-grid {
  display:grid!important;
  grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;
  align-items:center!important;
  gap:clamp(24px,3vw,44px)!important;
  padding:clamp(24px,3vw,42px)!important;
  background:#fff!important;
  border:0!important;
  border-radius:10px!important;
  box-shadow:0 12px 32px rgba(8,42,70,.07)!important;
}
html body#sgtm-premium-v223 main .cupra505-connected-media {
  display:flex!important;
  align-items:center!important;
  margin:0!important;
  padding:0!important;
  min-width:0;
  min-height:0!important;
  justify-content:center;
  border:0!important;
  background:transparent!important;
}
html body#sgtm-premium-v223 main .cupra505-connected-media img {
  display:block;width:100%;height:auto;object-fit:contain;max-width:100%!important;
}
html body#sgtm-premium-v223 main .cupra505-connected-copy {min-width:0;padding:0!important}
html body#sgtm-premium-v223 main .cupra505-connected-copy h2 {max-width:26ch!important}
html body#sgtm-premium-v223 main .cupra505-connected-copy :is(p,li) {color:var(--sgtm525-copy)!important}
html body#sgtm-premium-v223 main .cupra505-connected-copy :is(a,.sid467-eyebrow) {color:var(--sgtm525-blue)!important}
html body#sgtm-premium-v223 main .cupra505-service-tags {
  display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:22px 0 0;list-style:none;
}
html body#sgtm-premium-v223 main .cupra505-service-tags li {
  padding:7px 10px;font-size:12px;line-height:1.5;font-weight:700;background:#edf5fa;
}

html body#sgtm-premium-v223 main :is(.sid467-panel,.case-summary-card,.audit-link-card-v222,.mech-card-v231,.sgtm-v506-case-details) {
  min-width:0;
  overflow-wrap:break-word;
}
/* Share heading and paragraph tracks so wrapped headings do not stagger the copy. */
@supports (grid-template-rows:subgrid) {
  html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .sid467-grid > article {
    display:grid!important;grid-template-rows:subgrid!important;grid-row:span 4;row-gap:0;
  }
  html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .sid467-grid > article h3 {
    min-height:0!important;align-self:start;
  }
  html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main .sid467-grid > article > a:last-child {align-self:end}
  html body#sgtm-premium-v223 main #premium-service-grid-v223 > a.audit-link-card-v222:not([hidden]) {
    display:grid!important;grid-template-rows:subgrid!important;grid-row:span 5;row-gap:0;
  }
  html body#sgtm-premium-v223 main #premium-service-grid-v223 > a.audit-link-card-v222 > b:last-child {align-self:end}
}
@media(max-width:900px) {
  html body#sgtm-premium-v223 main .cupra505-connected-grid {grid-template-columns:minmax(0,1fr)!important}
  html body#sgtm-premium-v223 main .cupra505-connected-media img {max-height:360px}
}
@media(max-width:600px) {
  html body#sgtm-premium-v223 main .service-grid > a.audit-link-card-v222 > b:last-child {padding-top:12px}
}

/* Mazda body accents use the same readable light-surface colours; hero stays intact. */
html body#sgtm-premium-v223 main.maz518.maz521-theme :is(.maz518-section-head .maz518-eyebrow,.maz518-copy-panel .maz518-eyebrow,.maz518-number) {
  color:var(--sgtm525-blue)!important;
}
html body#sgtm-premium-v223 main.maz518 .maz518-spec-grid small {color:var(--sgtm525-copy)!important}
html body#sgtm-premium-v223 main.maz518 .maz518-final .maz518-button {
  background:#076aae!important;color:#fff!important;
}
html body#sgtm-premium-v223 main.maz518 .maz518-final .maz518-button:hover {background:#08588d!important}

/* Keep V524 full-width footer bands, accounting for desktop scrollbar width. */
@supports (width:100cqw) {
  html body#sgtm-premium-v223 main.sid467 {container-type:inline-size}
  html body#sgtm-premium-v223.sgtm-premium-v223.sgtm-audit-v224 main.sid467 .sid467-section.sid467-cta:last-child {width:100cqw!important}
}
