/* ECU Rescue: shared design tokens, mobile-first presentation. */
:root {
  --ink: #132a3a; --muted: #52626c; --paper: #f7f8f5; --white: #fff;
  --blue: #174fba; --blue-dark: #103b90; --line: #cdd5d7; --tint: #e9eff1;
  --accent: #86bdcc; --danger: #a02b24;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem;
  --wide: 78rem; --reading: 45rem; --radius: .2rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--s6); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--font); overflow-wrap: break-word; }
img, svg { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3 { font-weight: 650; line-height: 1.15; letter-spacing: -.035em; margin: 0 0 var(--s5); }
h1 { font-size: clamp(2.4rem, 5.3vw, 4.75rem); }
h2 { font-size: clamp(1.8rem, 3.1vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: -.02em; }
p { margin: 0 0 var(--s5); }
ul, ol { padding-left: var(--s5); }
.container { width: min(calc(100% - 2 * var(--s5)), var(--wide)); margin-inline: auto; }
.section { padding-block: var(--s8); }
.eyebrow { font: 600 .72rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--s4); }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.65; }
.small { font-size: .85rem; }
.skip-link { position: absolute; z-index: 100; inset: -10rem auto auto var(--s4); background: var(--white); padding: var(--s4); }
.skip-link:focus { top: var(--s4); }
.service-strip { background: var(--ink); color: var(--white); padding-block: var(--s2); font-size: .75rem; letter-spacing: .04em; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s5); padding-block: var(--s3); }
.header-inner { min-height: 6.2rem; column-gap: var(--s6); }
.site-navigation { width: 100%; }
.site-navigation .menu { list-style: none; padding: 0; margin: 0; }
.site-navigation a { display: block; padding: var(--s3) 0; color: var(--ink); font-size: .9rem; text-decoration: none; }
.site-navigation a:hover { color: var(--blue); text-decoration: underline; }
.account-links { display: flex; gap: var(--s5); border-top: 1px solid var(--line); margin-top: var(--s3); }
.hero { padding-block: var(--s8) var(--s6); background: var(--white); }
.hero + #manufacturers { padding-top: var(--s6); }
.hero-grid { display: grid; column-gap: var(--s7); row-gap: var(--s6); align-items: center; }
.hero h1 { font-size: clamp(2.35rem, 4.6vw, 4.25rem); max-width: 15ch; text-wrap: balance; }
.hero-copy .lead { max-width: 43ch; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.hero .actions { margin-top: var(--s5); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }
button, .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: var(--s3) var(--s5); border: 1px solid transparent; border-radius: var(--radius); background: var(--blue); color: var(--white); font-weight: 600; line-height: 1.4; text-decoration: none; cursor: pointer; gap: var(--s3); }
button:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--blue-dark); color: var(--white); }
button:disabled, .button:disabled { opacity: .6; cursor: not-allowed; }
.menu-toggle { background: var(--white); color: var(--ink); border-color: var(--line); }
.text-link { font-weight: 600; }
.finder { padding-block: var(--s7); background: var(--ink); color: var(--white); }
.finder-grid { display: grid; gap: var(--s6); align-items: center; }
.finder h2 { font-size: 2rem; }
.finder-grid > div > p:last-child { margin-bottom: 0; }
.finder form { padding: var(--s5); border: 1px solid #607789; border-radius: var(--radius); background: #1c3547; }
.finder label { font-size: .9rem; }
.finder p { max-width: var(--reading); }
.finder a:not(.service-card) { color: #b8d4ff; }
.finder :focus-visible { outline-color: var(--accent); }
label { display: block; font-weight: 600; margin-bottom: var(--s2); }
input, textarea, select { max-width: 100%; min-height: 3rem; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); background: var(--white); color: var(--ink); }
input[type="checkbox"], input[type="radio"] { min-height: auto; }
.finder-controls { display: flex; flex-wrap: wrap; gap: var(--s2); }
.finder-controls input { min-width: 0; flex: 1 1 12rem; font-family: var(--mono); }
.finder-controls button { flex: 1 1 auto; }
.finder .small { margin-top: var(--s3); margin-bottom: 0; color: #cad5dd; }
.finder-results { border-top: 1px solid #607789; margin-top: var(--s6); padding-top: var(--s6); }
.finder-results .service-grid { margin-block: var(--s5); }
.section-heading { display: grid; gap: var(--s5); margin-bottom: var(--s6); }
.section-heading > p { color: var(--muted); max-width: 36rem; }
.service-grid { display: grid; gap: var(--s5); }
.service-card { min-width: 0; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; transition: border-color .18s ease, transform .18s ease; }
.service-card-image { aspect-ratio: 16/9; display: grid; place-items: center; padding: var(--s4); background: var(--tint); border-bottom: 1px solid var(--line); }
.service-card-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.service-card-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.service-card-body .eyebrow { font-size: .65rem; color: var(--muted); margin-bottom: var(--s3); }
.service-card h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.35; letter-spacing: -.025em; margin-bottom: var(--s4); text-wrap: pretty; }
.service-card .identifier { font-size: .8rem; color: var(--muted); margin-bottom: var(--s4); }
.service-card h3 a { color: var(--ink); text-decoration: none; }
.service-card h3 a:hover { text-decoration: underline; }
.service-card:focus-within { border-color: var(--blue); }
a.service-card { color: var(--ink); text-decoration: none; }
a.service-card h3, a.service-card .price { color: var(--ink); text-decoration: none; }
a.service-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.service-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); margin-top: auto; padding-top: var(--s4); border-top: 1px solid var(--line); }
.service-card-bottom .price { font-size: 1.3rem; line-height: 1.3; }
.service-card-bottom > span:last-child { color: var(--blue); }
.price { font-weight: 650; font-size: 1.15rem; }
.price del { color: var(--muted); font-size: .85rem; font-weight: 400; }
.price ins { text-decoration: none; }
.identifier, code { font-family: var(--mono); overflow-wrap: anywhere; }
.process-section { background: var(--tint); }
.process-grid { list-style: none; padding: 0; display: grid; gap: var(--s6); margin-top: var(--s7); }
.process-grid li { border-top: 1px solid #93a7b2; padding-top: var(--s5); }
.process-grid li > span { display: block; color: var(--blue); font: 500 .85rem/1 var(--mono); margin-bottom: var(--s6); }
.process-grid p { color: var(--muted); margin-bottom: 0; }
.term-section { display: grid; gap: var(--s4); padding-block: var(--s7); border-top: 1px solid var(--line); }
.term-section h2 { font-size: 1.65rem; }
.prose { max-width: var(--reading); }
.prose p:last-child { margin-bottom: 0; }
.faq { max-width: var(--reading); }
.faq h3 { margin-top: var(--s6); }
.closing-cta { padding-block: var(--s8); background: var(--tint); }
.closing-cta .container { display: grid; gap: var(--s5); }
.closing-cta h2 { margin: 0; }
.site-footer { padding-top: var(--s7); background: var(--ink); color: var(--paper); }
.footer-grid { display: grid; gap: var(--s7); }
.site-footer h2 { font-size: 1rem; }
.site-footer p, .site-footer li { font-size: .9rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li a { display: inline-block; padding-block: var(--s2); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: var(--s7); padding-block: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; font-size: .8rem; }
.footer-bottom a { margin-right: var(--s5); }
.page-content, .commerce-content { padding-block: var(--s7); min-height: 50vh; }
.page-content > h1 { font-size: clamp(2rem, 4vw, 3rem); }
.ecu-legal { max-width: 78ch; overflow-wrap: anywhere; }
.ecu-legal h2 { margin-top: 2rem; }
.ecu-legal p, .ecu-legal li { line-height: 1.7; }
.ecu-legal a { text-decoration: underline; text-underline-offset: .2em; }
.woocommerce .woocommerce-breadcrumb { font-size: .8rem; margin-bottom: var(--s6); color: var(--muted); }
.woocommerce .woocommerce-breadcrumb a { color: var(--ink); }
.woocommerce div.product .product_title { font-size: clamp(2rem, 3.5vw, 3.1rem); }
.woocommerce div.product p.price { color: var(--ink); font-size: 1.5rem; }
.woocommerce div.product form.cart .button { background: var(--blue); }
.woocommerce .quantity .qty { width: 4.5rem; }
.service-summary { margin-block: var(--s5); font-size: .95rem; }
.discovery-grid, .trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--s4); align-items: start; }
.discovery-section.section { padding-block: var(--s7) var(--s6); }
#service-types.discovery-section { padding-block: var(--s6); border-block: 1px solid var(--line); }
#repairs.section { padding-top: var(--s7); }
.discovery-section > p:not(.eyebrow) { max-width: 65ch; color: var(--muted); margin-bottom: var(--s6); }
.manufacturer-grid { grid-template-columns: 1fr; }
.discovery-tile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); min-width: 0; transition: border-color .18s ease; }
.discovery-tile summary { position: relative; display: grid; align-content: center; cursor: pointer; padding: var(--s5); padding-right: var(--s7); min-height: 9rem; list-style: none; overflow-wrap: anywhere; transition: background-color .18s ease; }
.discovery-tile summary::-webkit-details-marker { display: none; }
.discovery-tile summary::marker { content: ''; }
.discovery-tile .discovery-name { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; font-weight: 700; letter-spacing: -.035em; }
.discovery-tile summary small { display: block; margin-top: var(--s3); color: var(--muted); font-size: .8rem; line-height: 1.5; }
.discovery-direction { position: absolute; right: var(--s4); top: var(--s5); color: var(--blue); font-size: 1.2rem; transition: transform .18s ease; }
.discovery-tile[open] { border-color: var(--blue); }
.discovery-tile[open] > summary { background: var(--tint); }
.discovery-tile[open] > summary .discovery-direction { transform: rotate(90deg); }
.discovery-tile:focus-within { border-color: var(--blue); }
.discovery-tile summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.family-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.family-grid summary { min-height: 9rem; }
.discovery-action { display: block; margin-top: var(--s4); font-size: .85rem; font-weight: 650; color: var(--blue); text-decoration: underline; text-underline-offset: .22em; }
.family-heading h2 { max-width: 22ch; font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
.discovery-options .eyebrow { display: block; margin-bottom: 0; }
.discovery-options { padding: var(--s5); border-top: 1px solid var(--line); margin: 0; overflow-wrap: anywhere; }
.discovery-options h3 { font-size: 1rem; margin-bottom: var(--s2); }
.discovery-options h3:not(:first-child) { border-top: 1px solid var(--line); padding-top: var(--s5); }
.discovery-options ul { padding: 0; list-style: none; margin-block: 0 var(--s5); }
.discovery-options ul:last-child { margin-bottom: 0; }
.discovery-options a { display: inline-block; padding-block: var(--s3); font-size: .9rem; }
.family-grid > .discovery-tile { width: 100%; }
.service-trust { background: var(--tint); }
.trust-grid > div { padding: var(--s5); border-left: 2px solid var(--blue); }
.service-benefits { display: grid; gap: var(--s3); padding: var(--s5); margin-block: var(--s5); list-style: none; border: 1px solid var(--line); border-radius: .5rem; background: var(--tint); }
.service-benefits a { display: block; font-weight: 600; text-underline-offset: .2em; }
.service-highlights { padding-top: var(--s5); }
.repair-details .term-section { padding: var(--s5); border: 1px solid var(--line); border-radius: .5rem; margin-bottom: var(--s4); }
.ecu-repair-no-image.woocommerce div.product div.summary { float: none; width: 100%; max-width: 75ch; }
.repair-details { clear: both; }
.woocommerce .related.products { clear: both; padding-top: var(--s5); border-top: 1px solid var(--line); }
.woocommerce div.product div.images img { object-fit: contain; }
.repair-details { clear: both; }
.product-introduction, .product-narrative { overflow-wrap: anywhere; }
.product-narrative { padding-block: var(--s6); max-width: 75ch; }
.product-narrative h2, .product-narrative h3 { margin-block: var(--s5) var(--s3); }
.product-introduction img, .product-narrative img { max-width: 100%; height: auto; }
.technical-panel { padding: var(--s6); background: var(--tint); margin-bottom: var(--s5); border: 1px solid var(--line); border-radius: var(--radius); }
.technical-panel h2 { font-size: 1.5rem; }
.technical-panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.technical-panel dd { margin: 0; }
.badge { display: inline-block; border: 1px solid var(--line); padding: var(--s1) var(--s2); font-size: .75rem; }
.notice, .woocommerce-info, .woocommerce-message, .woocommerce-error { padding: var(--s5); border: 1px solid var(--line); border-left: 3px solid var(--blue); background: var(--white); color: var(--ink); }
.woocommerce-error { border-left-color: var(--danger); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: var(--s3); border-bottom: 1px solid var(--line); }
.alignwide { max-width: var(--wide); }
.wp-block-image img { height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 40rem) {
  .service-grid, .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 23rem) { .manufacturer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 48rem) {
  .section { padding-block: var(--s9); }
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .finder-grid, .section-heading { grid-template-columns: 1fr 1fr; gap: var(--s7); }
  .term-section { grid-template-columns: 1fr 2fr; gap: var(--s7); }
  .footer-grid { grid-template-columns: 1fr 1.2fr 1fr; }
  .manufacturer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .single-family { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: center; }
  .single-family h2 { margin-bottom: 0; }
}
@media (min-width: 64rem) {
  .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .closing-cta .container { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 75rem) {
  .manufacturer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .header-inner { flex-wrap: nowrap; }
  .site-navigation { width: auto; display: flex; gap: var(--s5); align-items: center; }
  .site-navigation .menu { display: flex; gap: var(--s5); }
  .site-navigation a { font-weight: 550; padding-block: var(--s4); }
  .account-links { margin: 0; padding-left: var(--s5); border-top: 0; border-left: 1px solid var(--line); gap: var(--s4); }
}
@media (prefers-reduced-motion: reduce) {
  .service-card, .discovery-tile, .discovery-tile summary, .discovery-direction { transition: none; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-card:hover { border-color: var(--blue); transform: translateY(-2px); }
  .discovery-tile summary:hover { background: var(--tint); }
  .discovery-tile:not([open]) summary:hover .discovery-direction { transform: translate(2px, -2px); }
}
@media (max-width: 74.99rem) {
  .ecu-js .site-navigation:not([data-open]) { display: none; }
}
@media (max-width: 23rem) {
  .header-inner { column-gap: var(--s3); }
  .menu-toggle { padding-inline: var(--s3); }
}
.brand-logo { display: block; flex: 0 0 184px; }
.brand-logo img { display: block; width: 184px; height: auto; aspect-ratio: 600/246; object-fit: contain; }
.hero-photo { margin: 0; min-width: 0; }
.hero-photo img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); }
.hero-photo figcaption { color: var(--muted); font-size: .72rem; padding-top: var(--s3); }
.manufacturer-label { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: 104px 2.8rem; gap: var(--s4); justify-items: center; align-items: center; }
.manufacturer-grid summary { padding: var(--s5) var(--s4); min-height: 15rem; text-align: center; }
.manufacturer-grid .discovery-direction { top: var(--s3); font-size: 1rem; }
.manufacturer-label .discovery-name { grid-row: 2; font-size: clamp(1.1rem, 1.6vw, 1.4rem); }
.manufacturer-label .manufacturer-badge { grid-row: 1; display: block; width: 96px; height: 96px; max-width: 100%; object-fit: contain; }
.manufacturer-label .manufacturer-badge[src$="/ford.svg"], .manufacturer-label .manufacturer-badge[src$="/fiat-professional-period.png"] { width: 140px; }
.manufacturer-label .manufacturer-badge[src$="/chrysler-owner.png"] { width: 190px; }
.manufacturer-grid summary:hover { background: var(--tint); }
.site-footer a { color: #c0d6fc; }
.site-footer :focus-visible { outline-color: var(--accent); }
.site-footer address { font-style: normal; font-size: .9rem; }
.footer-contact { margin-top: var(--s4); }
.footer-service-info details { border-bottom: 1px solid #607789; margin-bottom: var(--s3); }
.footer-service-info summary { cursor: pointer; padding-block: var(--s2); font-size: .9rem; }
.footer-service-info details p { margin-top: var(--s3); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s4); }

@media (max-width: 23rem) {
  .brand-logo { flex-basis: 160px; }
  .brand-logo img { width: 160px; }
}

.coverage-years { color: var(--muted); font-size: .85rem; margin: 0 0 var(--s3); }
.model-repair-label { text-transform: uppercase; }
.repair-pending { display: block; padding-block: var(--s3); font-size: .9rem; color: var(--ink); }
.repair-page-status { display: block; color: var(--muted); font-size: .75rem; }

/* Match WooCommerce's initial checkbox state before its checkout script loads. */
.ecu-js .woocommerce-shipping-fields:has(#ship-to-different-address-checkbox:not(:checked)) .shipping_address { display: none; }
.woocommerce form .password-input .show-password-input { min-width: 44px; min-height: 44px; }
.woocommerce form .password-input input { padding-right: 3.5rem; }

/* Fixed right-hand hero frame; hidden slides never shift layout. */
.hero-slider { position: relative; padding-bottom: 0; }
.hero-slider-frame { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #fff; border-radius: var(--radius); }
.hero-slide { position: absolute; inset: 0; }
.hero-slide[hidden] { display: none; }
.hero-slider .hero-slide img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 0; }
.hero-slide-link { display: block; width: 100%; height: 100%; }
.hero-slide-link:focus-visible { outline-offset: -4px; }
.hero-slide-cta { position: absolute; bottom: .5rem; right: .5rem; background: var(--blue); color: white; padding: .35rem .65rem; border-radius: .3rem; font-size: .8rem; }
.hero-slider-frame { touch-action: pan-y; }
@media (prefers-reduced-motion: no-preference) {
  .hero-slide:not([hidden]) { animation: hero-fade .25s ease-out; }
}
@keyframes hero-fade { from { opacity: .65; } to { opacity: 1; } }

/* Use 32px of the existing 48px desktop gap; preserve the left column and container. */
@media (min-width: 75rem) {
  .hero-copy { align-self: start; }
  .hero-slider { align-self: start; margin-top: calc(.72rem * 1.5 + var(--s4)); margin-left: -32px; width: calc(100% + 32px); max-width: none; }
}
