/* TCM shared standard v1. Reversible bridge over legacy styles.
   One controlled ID-specificity anchor beats legacy page-ID rules.
   !important is required during migration; never add per-page font sizes here.
   Existing grid geometry, icons, media, header and fixed actions are preserved. */
html:has(body.tcm-css-standard) { font-size: 100% !important; }
body.tcm-css-standard {
  --tcm-font: Arial, Helvetica, sans-serif;
  --tcm-title-color: #17233f;
  --tcm-text-color: #5b6474;
  --tcm-h1: 1.44375rem;
  --tcm-h2: 1.875rem;
  --tcm-h3: 1.5rem;
  --tcm-body: 1.125rem;
  --tcm-heading-gap: 2rem;
  --tcm-section-gap: 4rem;
  --tcm-gutter: 2rem;
  font-family: var(--tcm-font);
}
/* The first branch is deliberately never present: :is supplies a stable
   migration priority without repeating body classes or using page IDs. */
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--tcm-font) !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(h1,.tcm-builder-title,.tcm-about > h2,.tcm-contacts-content > h2) {
  font-size: var(--tcm-h1) !important;
  line-height: 1.2 !important;
  color: var(--tcm-title-color) !important;
  margin-block: 0 var(--tcm-heading-gap) !important;
  padding-block: 0 !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main h2 {
  font-size: var(--tcm-h2) !important;
  line-height: 1.25 !important;
  color: var(--tcm-title-color) !important;
  margin-block: 0 1.5rem !important;
}
/* Old title tags use the same page-title scale without changing content. */
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(h2.tcm-builder-title,.tcm-about > h2,.tcm-contacts-content > h2) {
  font-size:var(--tcm-h1)!important;line-height:1.2!important;margin-block:0 var(--tcm-heading-gap)!important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main h3 {
  font-size: var(--tcm-h3) !important;
  line-height: 1.3 !important;
  color: var(--tcm-title-color) !important;
  margin-block: 0 1rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(h4,h5,h6) {
  font-size: var(--tcm-body) !important;
  line-height: 1.5 !important;
  margin-block: 0 1rem !important;
}
/* Text-only components: never recolour photographic overlays or price badges. */
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(p,li) {
  font-family: var(--tcm-font) !important;
  font-size: var(--tcm-body) !important;
  line-height: 1.6 !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(h1,h2,h3,h4,h5,h6) :is(span,strong,em,a) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-intro,.tcm-service-booking,.tcm-builder-text,.tcm-prose,.tcm-subaru5,.tcm-about,.tcm-prices__intro,.tcm-brochures__intro) :is(p,li),
:is(#tcm-standard-priority, body.tcm-css-standard) main p.tcm-builder-text {
  font-family: var(--tcm-font) !important;
  font-size: var(--tcm-body) !important;
  line-height: 1.6 !important;
  color: var(--tcm-text-color) !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-intro,.tcm-prose,.tcm-subaru5,.tcm-about,.tcm-builder-text) p {
  margin-block: 0 1rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-intro,.tcm-prose,.tcm-about) p:last-child {
  margin-bottom: 0 !important;
}
/* Explicit shared sections avoid applying page-wide padding to hero images. */
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-intro,.tcm-service-booking) {
  box-sizing: border-box;
  max-width: 1280px !important;
  margin-inline: auto !important;
  padding-inline: var(--tcm-gutter) !important;
  padding-block: 2rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-service-page-title {
  margin-top: 2rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-prices,.tcm-brochures,.tcm-about,.tcm-contacts-content) {
  box-sizing:border-box!important;
  max-width:1280px!important;
  margin-inline:auto!important;
  padding-inline:var(--tcm-gutter)!important;
  padding-block:var(--tcm-section-gap)!important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main h1 + .tcm-builder-separator--small { height:0!important;margin:0!important; }
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-test__form,.wpcf7-form) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]),select,textarea) {
  box-sizing: border-box !important;
  font: 400 1rem/1.5 var(--tcm-font) !important;
  min-height: 3rem !important;
  border-radius: .5rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-test__form,.wpcf7-form) :is(button[type=submit],input[type=submit]) {
  font: 700 1rem/1.25 var(--tcm-font) !important;
  min-height: 3rem !important;
  border-radius: .5rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-test__form,.wpcf7-form) :is(input,select,textarea,button):focus-visible {
  outline: 2px solid var(--tcm-title-color) !important;
  outline-offset: 3px !important;
}
@media (max-width: 781px) {
  body.tcm-css-standard {
    --tcm-h1: 1.05rem;
    --tcm-h2: 1.5rem;
    --tcm-h3: 1.25rem;
    --tcm-body: 1rem;
    --tcm-heading-gap: 1.5rem;
    --tcm-section-gap: 2.5rem;
    --tcm-gutter: 1rem;
  }
  :is(#tcm-standard-priority, body.tcm-css-standard) main h2 { margin-bottom: 1rem !important; }
  :is(#tcm-standard-priority, body.tcm-css-standard) main :is(.tcm-service-intro,.tcm-service-booking) { padding-block: 1.5rem !important; }
}
/* The same file is attached to isolated model roots by the loader. Tokens
   inherit from the page; components use exactly the same sizes. */
:host :is(h1,h2,h3,h4,h5,h6,p,li) { font-family: var(--tcm-font) !important; }
:host h1 { font-size:var(--tcm-h1)!important;line-height:1.2!important;font-weight:700!important;margin-block:0 var(--tcm-heading-gap)!important; }
:host h2 { font-size:var(--tcm-h2)!important;line-height:1.25!important;font-weight:700!important;margin-block:0 1.5rem!important; }
:host h3 { font-size:var(--tcm-h3)!important;line-height:1.3!important;font-weight:700!important;margin-block:0 1rem!important; }
:host :is(p,li,h4,h5,h6) { font-size:var(--tcm-body)!important;line-height:1.6!important; }
/* Preserve existing contrast of text over model photography. */
@media(max-width:781px) { :host h2 { margin-bottom:1rem!important; } }

/* One boundary between the opening banner and the first content block.
   Slider navigation belongs to the banner component. */
body.tcm-css-standard { --tcm-banner-content-gap: 2rem; }
html:has(body.tcm-standard-banner-frame) { font-size:100% !important; }
body.tcm-standard-banner-frame { --tcm-banner-content-gap:2rem; }
body.tcm-standard-banner-frame main > div:first-child > .tcm-electric-slider:first-child {
  margin-top:0!important;
  padding-top:var(--tcm-banner-content-gap)!important;
}
@media(max-width:781px) {
  body.tcm-css-standard, body.tcm-standard-banner-frame { --tcm-banner-content-gap: 1.5rem; }
}
:is(#tcm-standard-priority, body.tcm-css-standard) main :is(
  .tcm-home-slider + .tcm-models,
  .tcm-stock-start-header,
  .tcm-service-hero + .tcm-service-contacts,
  .tcm-contacts-hero + .tcm-about,
  .tcm-contacts-hero + .tcm-contacts-content,
  .tcm-builder-page > .tcm-builder-row--full:first-of-type + .tcm-builder-row,
  .tcm-subaru5
) {
  margin-top: 0 !important;
  padding-top: var(--tcm-banner-content-gap) !important;
}
/* Legacy spacer rows must not add a second gap. */
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-stock-start-title {
  display: block !important;
  width: fit-content;
}
:host div:has(> [data-hero]) + div {
  padding-top: var(--tcm-banner-content-gap, 2rem) !important;
  margin-top: 0 !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main
.tcm-builder-page > .tcm-builder-row--full:first-of-type + .tcm-builder-row > .tcm-builder-column > .tcm-builder-separator:first-child {
  display:none !important;
}
/* Dodge catalogue hero: keep the vehicles in the centre of the crop. */
:is(#tcm-standard-priority, body.tcm-css-standard).page-id-34771 main .tcm-builder-row[style*="DDB26US4_001"] {
  background-position: center center !important;
}
/* EKII dark notice needs light headings, unlike its white price cards. */
:is(#tcm-standard-priority, body.tcm-css-standard) main .ekii-section .important-box > :is(h2,h3) {
  color: #fff !important;
}
/* Contact cards: use self-contained icons instead of the missing icon font. */
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-contact-icon {
  width: 1rem !important;
  height: 1.5rem !important;
  line-height: 1.5rem !important;
  margin-right: .5rem !important;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-contact-icon::before {
  content: '' !important;
  display: inline-block !important;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  vertical-align: middle;
  -webkit-mask: var(--tcm-contact-icon-svg) center / contain no-repeat;
  mask: var(--tcm-contact-icon-svg) center / contain no-repeat;
}
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-contact-icon--map {
  --tcm-contact-icon-svg: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 2a8 8 0 0 0-8 8c0 5.3 8 12 8 12s8-6.7 8-12a8 8 0 0 0-8-8Zm0 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6Z"/%3E%3C/svg%3E');
}
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-contact-icon--clock {
  --tcm-contact-icon-svg: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm-1 3h2v5l4 2-1 1.8-5-2.8V7Z"/%3E%3C/svg%3E');
}
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-contact-icon--phone {
  --tcm-contact-icon-svg: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="M6.6 2.5 4 4.2C2.8 5 2.4 6.5 2.9 8c2.2 6.6 7.5 11.9 14.1 14.1 1.5.5 3 .1 3.8-1.1l1.7-2.6a1.8 1.8 0 0 0-.6-2.5l-3.6-2.1a1.8 1.8 0 0 0-2.3.4l-1.3 1.5a16 16 0 0 1-6.4-6.4l1.5-1.3a1.8 1.8 0 0 0 .4-2.3L9.1 3.1a1.8 1.8 0 0 0-2.5-.6Z"/%3E%3C/svg%3E');
}
/* Catalogue divider: shared heading spacing +20%, above and below. */
:is(#tcm-standard-priority, body.tcm-css-standard) main h1.tcm-model-title {
  margin-block: calc(var(--tcm-heading-gap) * 1.2) !important;
}

/* Main service appointment title uses the same uppercase presentation. */
:is(#tcm-standard-priority, body.tcm-css-standard) main .tcm-service-page-title {
  text-transform: uppercase !important;
}
/* Brand service pages: consistent uppercase heading presentation. */
:is(#tcm-standard-priority, body.tcm-css-standard):is(.page-id-13094,.page-id-32581,.page-id-13465,.page-id-13121,.page-id-32430) main :is(h1,h2,h3,h4,h5,h6),
:is(#tcm-standard-priority, body.tcm-css-standard):is(.page-id-13094,.page-id-32581,.page-id-13465,.page-id-13121,.page-id-32430) main :is(h1,h2,h3,h4,h5,h6) :is(span,strong,em,a) {
  text-transform: uppercase !important;
}
