/* Mazda Replacement Engines — site component styles
   Consolidated file for compact content cards, enquiry popup,
   and engine-code product pages.
*/

 /* =========================
    Compact editorial sections
    ========================= */
.mazda-db-content .mazda-insight-grid-section{
    padding:34px 0;
    background:#f4f7fb;
}
.mazda-insight-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:24px;
    align-items:stretch;
}
.mazda-insight-card{
    position:relative;
    isolation:isolate;
    overflow:hidden;
    min-height:100%;
    padding:30px 30px 28px;
    border:1px solid #dbe5f2;
    border-radius:22px;
    background:linear-gradient(145deg,#fff 0%,#f8fbff 100%);
    box-shadow:0 14px 34px rgba(8,38,77,.08);
    transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.mazda-insight-card::before{
    content:"";
    position:absolute;
    inset:0 auto 0 0;
    width:5px;
    background:linear-gradient(180deg,#1f73e8 0%,#69a8ff 100%);
}
.mazda-insight-card::after{
    content:"";
    position:absolute;
    z-index:-1;
    width:160px;
    height:160px;
    right:-64px;
    top:-72px;
    border-radius:50%;
    background:rgba(31,115,232,.055);
}
.mazda-insight-card:hover{
    transform:translateY(-3px);
    border-color:#bfd6f3;
    box-shadow:0 20px 42px rgba(8,38,77,.12);
}
.mazda-insight-card__topline{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 18px;
}
.mazda-insight-card__number{
    display:inline-grid;
    place-items:center;
    width:36px;
    height:36px;
    flex:0 0 36px;
    border-radius:11px;
    background:#eaf3ff;
    color:#1469d8;
    font-size:13px;
    font-weight:700;
    letter-spacing:.04em;
}
.mazda-insight-card__label{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:5px 11px;
    border-radius:999px;
    background:#eff5fc;
    color:#527093;
    font-size:11px;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
}
.mazda-insight-card__title{
    margin:0 0 14px;
    color:#08264d;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:clamp(22px,2vw,29px);
    line-height:1.22;
    letter-spacing:-.02em;
}
.mazda-insight-card__copy{
    color:#4b607a;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:15.5px;
    line-height:1.75;
}
.mazda-insight-card__copy p{margin:0}
.mazda-insight-card__copy p+p{margin-top:12px}
.mazda-insight-card__copy h3{
    margin:18px 0 7px;
    color:#0a315e;
    font-size:17px;
    line-height:1.35;
}
.mazda-insight-card__list{
    list-style:none;
    margin:18px 0 0;
    padding:0;
    display:grid;
    gap:10px;
}
.mazda-insight-card__list li{
    position:relative;
    padding-left:26px;
    color:#425b79;
    line-height:1.65;
}
.mazda-insight-card__list li::before{
    content:"✓";
    position:absolute;
    left:0;
    top:0;
    width:18px;
    height:18px;
    border-radius:50%;
    background:#e8f2ff;
    color:#176bd6;
    font-size:11px;
    font-weight:700;
    line-height:18px;
    text-align:center;
}

/* Size pages: give these compact guidance cards slightly stronger visual hierarchy. */
.mazda-content-page--size .mazda-insight-grid-section{
    background:linear-gradient(180deg,#f5f8fc 0%,#eef4fa 100%);
}
.mazda-content-page--size .mazda-insight-card{
    padding:32px 32px 30px;
    border-color:#d4e1ef;
    background:linear-gradient(150deg,#ffffff 0%,#f6faff 100%);
}
.mazda-content-page--size .mazda-insight-card:nth-child(4n+2),
.mazda-content-page--size .mazda-insight-card:nth-child(4n+3){
    background:linear-gradient(150deg,#f9fbfe 0%,#eef5fd 100%);
}
.mazda-content-page--size .mazda-insight-card__title{
    max-width:94%;
}
.mazda-content-page--size .mazda-insight-card__copy{
    max-width:70ch;
}

.mazda-insight-grid>.mazda-insight-card:last-child:nth-child(odd){grid-column:1/-1}
.mazda-insight-grid>.mazda-insight-card:last-child:nth-child(odd) .mazda-insight-card__copy{max-width:90ch}

@media(max-width:900px){
    .mazda-insight-grid{grid-template-columns:1fr;gap:18px}
    .mazda-insight-grid>.mazda-insight-card:last-child:nth-child(odd){grid-column:auto}
}
@media(max-width:640px){
    .mazda-db-content .mazda-insight-grid-section{padding:22px 0}
    .mazda-insight-card,
    .mazda-content-page--size .mazda-insight-card{padding:24px 21px 22px;border-radius:18px}
    .mazda-insight-card__title{font-size:22px}
    .mazda-insight-card__copy{font-size:15px;line-height:1.68}
}

/* =========================
   Mazda enquiry / VRM popup
   ========================= */
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-dialog{
    width:min(1000px,100%);
    border-radius:22px;
    overflow:auto;
    font-family:'Varela Round',Arial,sans-serif;
}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-header{
    background:linear-gradient(120deg,#123f70,#176fd8);
    color:#fff;
    border:0;
}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-header h2{color:#fff}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vehicle-found-badge{
    background:#eef6ff;color:#075fc5;border:0;
}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-close{
    background:#eef6ff;color:#09233d;
}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-close:hover{background:#fff;color:#075fc5}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-modal-vrm{
    background:#ffd72e;color:#111;border-color:#111;
}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-popup-step{display:none}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .vrm-popup-step.is-active{display:block;animation:mazdaPopupStep .2s ease}
.listing-site--mazda-replacement-engines .mazda-vrm-progress{
    display:grid;grid-template-columns:repeat(5,1fr);gap:7px;max-width:440px;margin:20px auto 2px;padding:0 28px;
}
.listing-site--mazda-replacement-engines .mazda-vrm-progress span{height:5px;border-radius:99px;background:#dce5ef}
.listing-site--mazda-replacement-engines .mazda-vrm-progress span.is-complete{background:#99c3f4}
.listing-site--mazda-replacement-engines .mazda-vrm-progress span.is-active{background:#126fdc;box-shadow:0 2px 8px rgba(18,111,220,.24)}
.listing-site--mazda-replacement-engines .mazda-popup-registration-wrap{max-width:650px;margin:30px auto 8px}
.listing-site--mazda-replacement-engines .mazda-popup-registration-plate{
    display:grid;grid-template-columns:68px 1fr;min-height:82px;border:3px solid #101820;border-radius:11px;overflow:hidden;background:#ffd72e;box-shadow:0 12px 30px rgba(10,36,64,.12)
}
.listing-site--mazda-replacement-engines .mazda-popup-registration-gb{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0757bd;color:#fff;line-height:1.05}
.listing-site--mazda-replacement-engines .mazda-popup-registration-gb span{font-size:21px}.listing-site--mazda-replacement-engines .mazda-popup-registration-gb b{font-size:12px;letter-spacing:.06em}
.listing-site--mazda-replacement-engines .mazda-popup-registration-plate input{
    width:100%;border:0!important;outline:0!important;background:#ffd72e!important;color:#050505!important;text-align:center;text-transform:uppercase;font-family:Arial,sans-serif!important;font-size:34px!important;font-weight:800!important;letter-spacing:.04em;padding:0 14px!important;box-shadow:none!important
}
.listing-site--mazda-replacement-engines .mazda-popup-registration-plate input::placeholder{color:#111;opacity:.9}
.listing-site--mazda-replacement-engines .mazda-popup-reg-help,.listing-site--mazda-replacement-engines .mazda-popup-reg-error{display:block;margin-top:8px;text-align:center;font-size:12px}
.listing-site--mazda-replacement-engines .mazda-popup-reg-help{color:#6a7886}.listing-site--mazda-replacement-engines .mazda-popup-reg-error{min-height:17px;color:#b42318;font-weight:700}
.listing-site--mazda-replacement-engines .mazda-popup-lookup-status,.listing-site--mazda-replacement-engines .mazda-popup-vehicle-confirmation,.listing-site--mazda-replacement-engines .mazda-popup-final-vehicle{max-width:650px;margin:15px auto;padding:13px 16px;border:1px solid #cfe0f3;border-radius:11px;background:#f1f7ff;color:#0d4f98}
.listing-site--mazda-replacement-engines .mazda-popup-lookup-status{display:flex;align-items:center;justify-content:center;gap:10px}
/* Respect the hidden attribute. The display:flex rule above otherwise overrides the browser's hidden state. */
.listing-site--mazda-replacement-engines .mazda-popup-lookup-status[hidden],
.listing-site--mazda-replacement-engines .mazda-popup-vehicle-confirmation[hidden],
.listing-site--mazda-replacement-engines .mazda-popup-final-vehicle[hidden]{display:none!important}
.listing-site--mazda-replacement-engines .mazda-popup-lookup-spinner{width:18px;height:18px;border:2px solid #b8d4f5;border-top-color:#126fdc;border-radius:50%;animation:mazdaSpin .7s linear infinite}
.listing-site--mazda-replacement-engines .mazda-popup-vehicle-confirmation span,.listing-site--mazda-replacement-engines .mazda-popup-final-vehicle span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#5b7590}
.listing-site--mazda-replacement-engines .mazda-popup-vehicle-confirmation strong,.listing-site--mazda-replacement-engines .mazda-popup-final-vehicle strong{display:block;margin-top:3px;color:#102b48}
.listing-site--mazda-replacement-engines .mazda-reg-actions{justify-content:center!important}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .mazda-modal-action{background:#126fdc;color:#fff;border:0;border-radius:10px;min-height:54px;padding:14px 25px;font-family:'Varela Round',Arial,sans-serif;font-weight:700;cursor:pointer;box-shadow:0 10px 24px rgba(18,111,220,.22)}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .mazda-modal-action:hover{background:#0d5fc0;transform:translateY(-1px)}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .mazda-modal-action:disabled{opacity:.6;cursor:wait;transform:none}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal .mazda-vrm-choice-card:has(input:checked){border-color:#126fdc;background:#f1f7ff;box-shadow:0 0 0 3px rgba(18,111,220,.1)}
.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal [data-mazda-field-error],.listing-site--mazda-replacement-engines #mazda-vrm-enquiry-modal [data-mazda-error-for]{color:#b42318}
@keyframes mazdaSpin{to{transform:rotate(360deg)}}
@keyframes mazdaPopupStep{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
@media(max-width:760px){
    .listing-site--mazda-replacement-engines .mazda-popup-registration-plate{grid-template-columns:52px 1fr;min-height:68px}
    .listing-site--mazda-replacement-engines .mazda-popup-registration-plate input{font-size:26px!important}
    .listing-site--mazda-replacement-engines .mazda-vrm-progress{padding-inline:14px}
}

/* =========================
   Engine-code product pages
   ========================= */
.mazda-engine-product-hero{
    background:linear-gradient(135deg,#071f3b 0%,#0b345f 54%,#0c3f73 100%);
    color:#fff;
    border-bottom:1px solid rgba(255,255,255,.08);
    overflow:hidden;
}
.mazda-engine-product-hero>.container{padding-top:18px;padding-bottom:32px}
.mazda-engine-product-hero__breadcrumb{margin-bottom:18px;color:#bdd0e5}
.mazda-engine-product-hero__breadcrumb a{color:#dbe9f8}
.mazda-engine-product-hero__breadcrumb span{color:#8fb1d4}
.mazda-engine-product-hero__grid{
    display:grid;
    grid-template-columns:minmax(0,1.12fr) minmax(390px,.88fr);
    gap:54px;
    align-items:center;
}
.mazda-engine-product-hero__content{min-width:0;padding:6px 0 0}
.mazda-engine-product-hero__eyebrow{
    margin:0 0 10px;
    color:#c7d8eb;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:12px;
    font-weight:700;
    letter-spacing:.15em;
    text-transform:uppercase;
}
.mazda-engine-product-hero__eyebrow span{color:#4d9cff}
.mazda-engine-product-hero h1{
    max-width:780px;
    margin:0;
    color:#fff;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:clamp(42px,4.8vw,68px);
    font-weight:400;
    line-height:1.04;
    letter-spacing:-.035em;
}
.mazda-engine-product-hero__intro{
    max-width:790px;
    margin:22px 0 0;
    color:#d9e5f2;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:17px;
    line-height:1.72;
}
.mazda-engine-product-hero__actions{display:flex;flex-wrap:wrap;gap:14px;margin-top:26px}
.mazda-engine-product-hero__primary,
.mazda-engine-product-hero__secondary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    min-height:58px;
    padding:0 26px;
    border-radius:10px;
    font-family:'Varela Round',Arial,sans-serif;
    font-size:16px;
    font-weight:700;
    text-decoration:none;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.mazda-engine-product-hero__primary{background:#2581f4;color:#fff;box-shadow:0 14px 32px rgba(0,91,214,.28)}
.mazda-engine-product-hero__primary:hover{transform:translateY(-2px);background:#1474ea;color:#fff}
.mazda-engine-product-hero__secondary{border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.05);color:#fff}
.mazda-engine-product-hero__secondary:hover{background:rgba(255,255,255,.1);color:#fff}
.mazda-engine-product-hero__trust{display:flex;flex-wrap:wrap;gap:12px 22px;margin-top:22px;color:#d7e5f4;font-size:13px;line-height:1.5}
.mazda-engine-product-hero__visual{min-width:0}
.mazda-engine-product-hero__image-wrap{
    display:block;
    padding:0;
    min-height:0;
    overflow:hidden;
    border-radius:22px;
    background:transparent;
    box-shadow:none;
}
.mazda-engine-product-hero__image-wrap img{
    display:block;
    width:100%;
    max-width:none;
    height:auto;
    aspect-ratio:650/430;
    object-fit:cover;
    border-radius:22px;
    background:#fff;
    box-shadow:0 18px 38px rgba(0,0,0,.18);
    mix-blend-mode:normal;
}
.mazda-engine-product-hero__facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}
.mazda-engine-product-hero__facts>div{
    min-height:84px;
    padding:17px 20px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:16px;
    background:rgba(255,255,255,.08);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.mazda-engine-product-hero__facts span{display:block;margin-bottom:5px;color:#9fc5ed;font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}
.mazda-engine-product-hero__facts strong{display:block;color:#fff;font-size:21px;line-height:1.2}

.mazda-engine-product-nav{background:#061d35;border-bottom:1px solid #203b56}
.mazda-engine-product-nav>.container{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0}
.mazda-engine-product-nav a{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    min-height:74px;
    padding:12px 20px;
    border-right:1px solid #203b56;
    color:#eef6ff;
    text-decoration:none;
    font-family:'Varela Round',Arial,sans-serif;
    font-weight:700;
}
.mazda-engine-product-nav a:first-child{border-left:1px solid #203b56}
.mazda-engine-product-nav a:hover{background:#0b2947;color:#fff}
.mazda-engine-product-nav b{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#1477ee;color:#fff;font-size:12px}
.mazda-engine-product-nav span{white-space:nowrap}

/* Make the first product content block feel continuous with the hero. */
.mazda-content-page--product .mazda-product-summary{padding-top:42px}
.mazda-content-page--product #mazda-engine-specifications,
.mazda-content-page--product #mazda-model-references,
.mazda-content-page--product #mazda-engine-options{scroll-margin-top:110px}

@media (max-width:1100px){
    .mazda-engine-product-hero__grid{grid-template-columns:1fr;gap:30px}
    .mazda-engine-product-hero__visual{max-width:720px}
}
@media (max-width:760px){
    .mazda-engine-product-hero>.container{padding-top:12px;padding-bottom:24px}
    .mazda-engine-product-hero h1{font-size:38px}
    .mazda-engine-product-hero__intro{font-size:15px;line-height:1.65}
    .mazda-engine-product-hero__actions{display:grid;grid-template-columns:1fr}
    .mazda-engine-product-hero__primary,.mazda-engine-product-hero__secondary{width:100%}
    .mazda-engine-product-hero__image-wrap{border-radius:18px}
    .mazda-engine-product-hero__image-wrap img{height:auto;border-radius:18px}
    .mazda-engine-product-hero__facts{grid-template-columns:1fr 1fr}
    .mazda-engine-product-nav{overflow-x:auto}
    .mazda-engine-product-nav>.container{display:flex;min-width:700px}
    .mazda-engine-product-nav a{flex:1}
}
@media (max-width:520px){
    .mazda-engine-product-hero h1{font-size:33px}
    .mazda-engine-product-hero__facts{grid-template-columns:1fr}
    .mazda-engine-product-hero__trust{display:grid;gap:8px}
}

/* =========================================================
   Mazda controlled Page Copy (NEW) presentation
   ========================================================= */
.mazda-pagecopy-section{padding:54px 0;background:#fff;font-family:'Varela Round',Arial,sans-serif}
.mazda-pagecopy-section:nth-of-type(even){background:#f6f8fb}
.mazda-pagecopy-heading{max-width:980px;margin:0 0 26px}
.mazda-pagecopy-heading>span,.mazda-answer-box__label,.mazda-pagecopy-cta>div>span{display:block;margin-bottom:9px;color:#176fd8;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.mazda-pagecopy-heading h2,.mazda-pagecopy-heading h3{margin:0;color:#08264d;font-size:clamp(27px,3vw,38px);line-height:1.15;letter-spacing:-.025em}
.mazda-pagecopy-heading p{max-width:850px;margin:13px 0 0;color:#526984;font-size:16px;line-height:1.75}
.mazda-pagecopy-heading a,.mazda-pagecopy-section a{color:#146fd9;text-decoration-thickness:1px;text-underline-offset:3px}
.mazda-pagecopy-heading--center{margin-inline:auto;text-align:center}
.mazda-anchor-alias{position:relative;top:-110px;visibility:hidden}

.mazda-answer-box{position:relative;overflow:hidden;padding:30px 34px;border:1px solid #cfe0f4;border-radius:22px;background:linear-gradient(135deg,#eef6ff 0%,#fff 75%);box-shadow:0 14px 34px rgba(8,38,77,.08)}
.mazda-answer-box:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:#1976e8}
.mazda-answer-box h2,.mazda-answer-box h3{margin:0 0 10px;color:#08264d;font-size:26px}.mazda-answer-box p{margin:0;color:#425d7c;font-size:17px;line-height:1.75}

.mazda-spec-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.mazda-spec-card{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);gap:18px;align-items:center;min-height:82px;padding:18px 21px;border:1px solid #d8e4f1;border-radius:16px;background:#fff;box-shadow:0 8px 20px rgba(8,38,77,.055)}
.mazda-spec-card>span{color:#687d95;font-size:12px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.mazda-spec-card>strong{color:#0a315e;font-size:16px;line-height:1.45}
.mazda-spec-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mazda-spec-record{padding:24px;border:1px solid #d7e3f0;border-radius:19px;background:linear-gradient(145deg,#fff,#f7faff);box-shadow:0 10px 26px rgba(8,38,77,.07)}
.mazda-spec-record h3{margin:0 0 16px;color:#0a315e;font-size:21px}.mazda-spec-record dl{margin:0;display:grid;gap:10px}.mazda-spec-record dl div{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(0,1.3fr);gap:12px;padding-top:10px;border-top:1px solid #e5edf6}.mazda-spec-record dt{color:#6b8097;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.mazda-spec-record dd{margin:0;color:#294866;line-height:1.5}

.mazda-modern-table-wrap{overflow:auto;border:1px solid #d6e2ef;border-radius:19px;background:#fff;box-shadow:0 12px 30px rgba(8,38,77,.07)}
.mazda-modern-table{width:100%;min-width:720px;border-collapse:separate;border-spacing:0;color:#314d6a;font-size:14px}
.mazda-modern-table th{padding:15px 16px;background:#0b3158;color:#fff;text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap}
.mazda-modern-table th:first-child{border-radius:18px 0 0 0}.mazda-modern-table th:last-child{border-radius:0 18px 0 0}
.mazda-modern-table td{padding:15px 16px;border-top:1px solid #e3ebf4;vertical-align:top;line-height:1.55}.mazda-modern-table tbody tr:nth-child(even) td{background:#f8fbfe}.mazda-modern-table tbody tr:hover td{background:#eef6ff}
.mazda-modern-table td:first-child{font-weight:700;color:#123f70}.mazda-rank-badge{display:inline-grid;place-items:center;min-width:32px;height:32px;padding:0 8px;border-radius:10px;background:#e8f2ff;color:#116ad6;font-weight:800}

.mazda-problem-grid,.mazda-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.mazda-problem-grid article,.mazda-check-grid article{display:flex;gap:13px;align-items:flex-start;padding:19px 20px;border:1px solid #dbe5ef;border-radius:16px;background:#fff;box-shadow:0 7px 18px rgba(8,38,77,.045)}
.mazda-problem-grid article>span,.mazda-check-grid article>span{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;font-weight:800}
.mazda-problem-grid article>span{background:#fff0ec;color:#c74c32}.mazda-check-grid article>span{background:#e8f5ee;color:#178150}
.mazda-problem-grid p,.mazda-check-grid p{margin:2px 0 0;color:#435f7b;line-height:1.6}.mazda-problem-grid strong{display:block;margin-bottom:5px;color:#143d65}

.mazda-route-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mazda-route-card{padding:25px;border:1px solid #d5e2f0;border-radius:20px;background:linear-gradient(150deg,#fff,#f5f9fe);box-shadow:0 12px 28px rgba(8,38,77,.07)}
.mazda-route-card__top{display:flex;gap:12px;align-items:center;margin-bottom:18px}.mazda-route-card__top>span{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#176fd8;color:#fff;font-size:12px;font-weight:800}.mazda-route-card h3{margin:0;color:#0a315e;font-size:20px;line-height:1.3}
.mazda-route-card dl{display:grid;gap:13px;margin:0}.mazda-route-card dl div{padding-top:12px;border-top:1px solid #e1e9f3}.mazda-route-card dt{margin-bottom:4px;color:#71869c;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mazda-route-card dd{margin:0;color:#3d5875;line-height:1.55}

.mazda-pagecopy-faq{max-width:940px;margin:0 auto;display:grid;gap:11px}.mazda-pagecopy-faq details{overflow:hidden;border:1px solid #d9e4ef;border-radius:15px;background:#fff;box-shadow:0 6px 16px rgba(8,38,77,.04)}.mazda-pagecopy-faq summary{position:relative;padding:20px 58px 20px 22px;color:#123c65;font-size:16px;font-weight:700;cursor:pointer;list-style:none}.mazda-pagecopy-faq summary::-webkit-details-marker{display:none}.mazda-pagecopy-faq summary:after{content:"+";position:absolute;right:20px;top:14px;display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#edf5ff;color:#176fd8;font-size:21px}.mazda-pagecopy-faq details[open] summary:after{content:"–"}.mazda-pagecopy-faq details>div{padding:0 22px 21px;color:#526982;line-height:1.7}

.mazda-pagecopy-cta{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:35px;align-items:center;padding:36px 40px;border-radius:24px;background:linear-gradient(125deg,#0a315a 0%,#126fdc 100%);box-shadow:0 18px 42px rgba(10,49,90,.2)}.mazda-pagecopy-cta>div>span{color:#acd0ff}.mazda-pagecopy-cta h2,.mazda-pagecopy-cta h3{margin:0;color:#fff;font-size:clamp(28px,3vw,40px)}.mazda-pagecopy-cta p{max-width:820px;margin:12px 0 0;color:#e0ecf9;line-height:1.7}.mazda-pagecopy-cta>div a{color:#fff}.mazda-pagecopy-cta>a{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:56px;padding:0 24px;border-radius:11px;background:#fff;color:#0d5fb9;font-weight:800;text-decoration:none;white-space:nowrap;box-shadow:0 10px 24px rgba(0,0,0,.14)}
.mazda-experience-note{display:flex;gap:15px;align-items:flex-start;padding:20px 22px;border:1px solid #dce7f2;border-radius:16px;background:#f8fbfe}.mazda-experience-note__icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:#e7f5ed;color:#16804e;font-weight:800}.mazda-experience-note strong{display:block;color:#173f64}.mazda-experience-note p{margin:5px 0 0;color:#60758c;font-size:14px;line-height:1.6}

@media(max-width:900px){.mazda-spec-grid,.mazda-spec-record-grid,.mazda-problem-grid,.mazda-check-grid{grid-template-columns:1fr}.mazda-route-grid{grid-template-columns:1fr}.mazda-pagecopy-cta{grid-template-columns:1fr}.mazda-pagecopy-cta>a{justify-self:start}}
@media(max-width:640px){.mazda-pagecopy-section{padding:38px 0}.mazda-answer-box{padding:24px 22px}.mazda-spec-card{grid-template-columns:1fr;gap:6px}.mazda-spec-record{padding:20px}.mazda-route-card{padding:21px}.mazda-pagecopy-cta{padding:28px 22px;border-radius:19px}.mazda-modern-table{min-width:640px}}

/* Mazda homepage only: turn short one-line Page Copy sections into useful visual modules. */
.mazda-content-page .mazda-pagecopy-section:has(.mazda-home-rich-section){padding:46px 0;background:#f5f8fc}
.mazda-content-page .mazda-pagecopy-section:has(.mazda-home-rich-section)+.mazda-pagecopy-section:has(.mazda-home-rich-section){padding-top:18px}
.mazda-home-rich-section{font-family:'Varela Round',Arial,sans-serif}
.mazda-home-rich-heading{max-width:920px;margin:0 0 24px}
.mazda-home-rich-heading>span{display:block;margin:0 0 9px;color:#176fd8;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.mazda-home-rich-heading h2,.mazda-home-rich-heading h3{margin:0;color:#08264d;font-size:clamp(28px,3vw,40px);line-height:1.12;letter-spacing:-.025em}
.mazda-home-rich-heading--center{margin-inline:auto;text-align:center}
.mazda-home-rich-lead{max-width:800px;margin-top:12px;color:#546b84;font-size:15.5px;line-height:1.65}
.mazda-home-rich-heading--center .mazda-home-rich-lead{margin-inline:auto}
.mazda-home-card-index{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:12px;background:#e9f3ff;color:#176fd8;font-size:12px;font-weight:800;letter-spacing:.04em}

.mazda-home-discovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.mazda-home-discovery-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:16px;align-items:center;min-height:106px;padding:20px 22px;border:1px solid #d8e5f2;border-radius:18px;background:#fff;color:inherit;text-decoration:none!important;box-shadow:0 9px 24px rgba(8,38,77,.055);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.mazda-home-discovery-card:hover{transform:translateY(-2px);border-color:#b9d3ef;box-shadow:0 15px 30px rgba(8,38,77,.09)}
.mazda-home-discovery-card strong{display:block;margin-bottom:5px;color:#0a315e;font-size:19px}.mazda-home-discovery-card small{display:block;color:#627991;font-size:13px;line-height:1.55}.mazda-home-discovery-card>b{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#176fd8;color:#fff;font-size:17px}

.mazda-home-route-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mazda-home-route-mini{padding:23px;border:1px solid #d8e4f1;border-radius:20px;background:linear-gradient(150deg,#fff 0%,#f8fbff 100%);box-shadow:0 10px 26px rgba(8,38,77,.06)}
.mazda-home-route-mini__top{display:flex;align-items:center;gap:12px;margin-bottom:18px}.mazda-home-route-mini__top>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#0d3158;color:#fff;font-size:11px;font-weight:800}.mazda-home-route-mini__top h3{margin:0;color:#0a315e;font-size:20px}
.mazda-home-route-mini__fact{padding-top:13px;border-top:1px solid #e6edf5}.mazda-home-route-mini__fact+.mazda-home-route-mini__fact{margin-top:13px}.mazda-home-route-mini__fact b{display:block;margin-bottom:5px;color:#176fd8;font-size:10px;letter-spacing:.12em}.mazda-home-route-mini__fact span{display:block;color:#526a83;font-size:13.5px;line-height:1.55}

.mazda-home-model-link-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
.mazda-home-model-link-grid a{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;padding:0 16px;border:1px solid #d8e5f2;border-radius:14px;background:#fff;color:#123c65!important;font-weight:700;text-decoration:none!important;box-shadow:0 6px 16px rgba(8,38,77,.045);transition:background .18s ease,border-color .18s ease,transform .18s ease}.mazda-home-model-link-grid a:hover{transform:translateY(-2px);border-color:#b6d2f0;background:#edf6ff}.mazda-home-model-link-grid b{color:#176fd8;font-size:16px}

.mazda-home-rich-section--decision{padding-top:4px}
.mazda-home-decision-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mazda-home-decision-card{display:flex;flex-direction:column;min-height:100%;padding:26px;border:1px solid #d5e2ef;border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(8,38,77,.07)}
.mazda-home-decision-card__head{display:flex;align-items:center;gap:12px;margin-bottom:15px}.mazda-home-decision-card__head>span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#176fd8;color:#fff;font-size:11px;font-weight:800}.mazda-home-decision-card__head h3{margin:0;color:#08264d;font-size:22px}.mazda-home-decision-card>p{margin:0 0 17px;color:#566e87;font-size:14px;line-height:1.65}
.mazda-home-decision-card__best,.mazda-home-decision-card__compare{padding:13px 0;border-top:1px solid #e6edf5}.mazda-home-decision-card__best b,.mazda-home-decision-card__compare b{display:block;margin-bottom:5px;color:#176fd8;font-size:10px;letter-spacing:.11em;text-transform:uppercase}.mazda-home-decision-card__best span,.mazda-home-decision-card__compare span{display:block;color:#49627d;font-size:13px;line-height:1.55}.mazda-home-decision-card>a{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:18px;color:#0d67c9!important;font-weight:800;text-decoration:none!important}.mazda-home-decision-card>a span{font-size:18px}

@media(max-width:1000px){.mazda-home-route-mini-grid,.mazda-home-decision-grid{grid-template-columns:1fr 1fr}.mazda-home-model-link-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.mazda-home-discovery-grid,.mazda-home-route-mini-grid,.mazda-home-decision-grid{grid-template-columns:1fr}.mazda-home-model-link-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mazda-content-page .mazda-pagecopy-section:has(.mazda-home-rich-section){padding:34px 0}.mazda-content-page .mazda-pagecopy-section:has(.mazda-home-rich-section)+.mazda-pagecopy-section:has(.mazda-home-rich-section){padding-top:10px}}
@media(max-width:480px){.mazda-home-model-link-grid{grid-template-columns:1fr}.mazda-home-discovery-card{padding:18px}.mazda-home-decision-card{padding:22px}}

/* Mazda homepage — Most Requested engines as product cards */
.mazda-most-requested-products{font-family:'Varela Round',Arial,sans-serif}
.mazda-most-requested-products__heading{max-width:1080px;margin-bottom:28px}
.mazda-most-requested-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
    align-items:stretch;
}
.mazda-most-requested-card{
    display:flex;
    flex-direction:column;
    min-width:0;
    overflow:hidden;
    border:1px solid #d6e3f1;
    border-radius:20px;
    background:#fff;
    box-shadow:0 12px 28px rgba(8,38,77,.07);
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.mazda-most-requested-card:hover{
    transform:translateY(-4px);
    border-color:#b9d2ee;
    box-shadow:0 18px 38px rgba(8,38,77,.11);
}
.mazda-most-requested-card__media{
    position:relative;
    aspect-ratio:16/11;
    overflow:hidden;
    border-bottom:1px solid #e5edf6;
    background:#fff;
}
.mazda-most-requested-card__media img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    padding:8px;
    background:#fff;
}
.mazda-most-requested-card__rank{
    position:absolute;
    z-index:2;
    top:13px;
    left:13px;
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    border-radius:11px;
    background:#e9f3ff;
    color:#1268cf;
    font-size:15px;
    font-weight:800;
    box-shadow:0 5px 14px rgba(8,38,77,.08);
}
.mazda-most-requested-card__badge{
    position:absolute;
    z-index:2;
    top:13px;
    right:13px;
    padding:7px 10px;
    border-radius:999px;
    background:#d9ebff;
    color:#0d67c9;
    font-size:10px;
    font-weight:800;
    letter-spacing:.03em;
    text-transform:uppercase;
}
.mazda-most-requested-card__body{
    display:flex;
    flex:1;
    flex-direction:column;
    padding:17px 16px 16px;
}
.mazda-most-requested-card__score{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:6px;
    margin-bottom:10px;
}
.mazda-most-requested-card__score>span{
    color:#f3a313;
    font-size:16px;
    letter-spacing:-1px;
    line-height:1;
}
.mazda-most-requested-card__score strong{color:#173b62;font-size:13px}
.mazda-most-requested-card__score small{color:#778ca2;font-size:10px}
.mazda-most-requested-card h3{
    margin:0 0 15px;
    color:#08264d;
    font-size:18px;
    line-height:1.3;
    letter-spacing:-.015em;
}
.mazda-most-requested-card__meta{
    display:grid;
    gap:10px;
    margin-bottom:14px;
}
.mazda-most-requested-card__meta>div{position:relative;padding-left:30px}
.mazda-most-requested-card__meta>div:before{
    content:"";
    position:absolute;
    left:0;
    top:3px;
    width:21px;
    height:21px;
    border-radius:7px;
    background:#eaf3ff;
    box-shadow:inset 0 0 0 1px #d8e9fb;
}
.mazda-most-requested-card__meta span{
    display:block;
    color:#768ba1;
    font-size:10px;
    line-height:1.2;
}
.mazda-most-requested-card__meta strong{
    display:block;
    margin-top:2px;
    color:#163b61;
    font-size:12.5px;
    line-height:1.35;
}
.mazda-most-requested-card__note{
    min-height:74px;
    margin:0 0 15px;
    padding:12px;
    border-radius:12px;
    background:#f5f8fc;
    color:#4e6680;
    font-size:12.5px;
    line-height:1.55;
}
.mazda-most-requested-card__cta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:48px;
    margin-top:auto;
    padding:0 15px;
    border-radius:11px;
    background:#146fdc;
    color:#fff!important;
    font-size:13px;
    font-weight:800;
    text-decoration:none!important;
    box-shadow:0 8px 18px rgba(20,111,220,.2);
}
.mazda-most-requested-card__cta:hover{background:#0c5fbe;color:#fff!important}
.mazda-most-requested-card__cta span{font-size:17px}
.mazda-most-requested-products__all{display:flex;justify-content:center;margin-top:26px}
.mazda-most-requested-products__all a{
    display:inline-flex;
    align-items:center;
    gap:18px;
    min-height:50px;
    padding:0 22px;
    border:1px solid #176fd8;
    border-radius:12px;
    background:#fff;
    color:#0d67c9!important;
    font-weight:800;
    text-decoration:none!important;
}
.mazda-most-requested-products__all a:hover{background:#edf6ff}
@media(max-width:1280px){.mazda-most-requested-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.mazda-most-requested-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
    .mazda-most-requested-grid{grid-template-columns:1fr}
    .mazda-most-requested-card__media{aspect-ratio:16/10}
    .mazda-most-requested-card__note{min-height:0}
}


/* Homepage / all pages — Most Requested engines wider listing cards */
.mazda-most-requested-products{
    font-family:'Varela Round',Arial,sans-serif;
}
.mazda-most-requested-products__heading{
    max-width:1120px;
    margin-bottom:28px;
}
.mazda-most-requested-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
    align-items:stretch;
}
.mazda-most-requested-card{
    display:flex;
    flex-direction:column;
    min-width:0;
    overflow:hidden;
    background:#fff;
    border:1px solid #d6dde7;
    border-radius:18px;
    color:#111820;
    text-decoration:none;
    transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mazda-most-requested-card:hover{
    transform:translateY(-2px);
    border-color:#aeb9c7;
    box-shadow:0 12px 26px rgba(0,0,0,.08);
}
.mazda-most-requested-card__image-wrap{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:240px;
    padding:24px 18px 16px;
    border-bottom:1px solid #e8edf3;
    background:#fff;
}
.mazda-most-requested-card__image-wrap img{
    width:auto;
    max-width:100%;
    max-height:190px;
    object-fit:contain;
    border-radius:12px;
}
.mazda-most-requested-card__rank{
    position:absolute;
    top:14px;
    left:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:38px;
    height:38px;
    padding:0 10px;
    border-radius:12px;
    background:#eef5ff;
    color:#1667cf;
    font-size:15px;
    font-weight:800;
}
.mazda-most-requested-card__badge{
    position:absolute;
    top:14px;
    right:14px;
    display:inline-flex;
    align-items:center;
    height:30px;
    padding:0 12px;
    border-radius:999px;
    background:#eef5ff;
    color:#1667cf;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.mazda-most-requested-card__body{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:14px 16px 18px;
    flex:1 1 auto;
}
.mazda-most-requested-card h3{
    margin:0;
    color:#111820;
    font-size:20px;
    line-height:1.36;
    font-weight:700;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
    min-height:82px;
}
.mazda-most-requested-card__seller,
.mazda-most-requested-card__subline,
.mazda-most-requested-card__feedback{
    margin:0;
    color:#5e6d7e;
    font-size:14px;
    line-height:1.5;
}
.mazda-most-requested-card__detail{
    color:#243445;
    font-size:14px;
    line-height:1.5;
}
.mazda-most-requested-card__detail strong{
    color:#08264d;
    font-weight:700;
}
.mazda-most-requested-card__detail--note{
    margin-top:2px;
    color:#0f2743;
}
@media (max-width: 1299px){
    .mazda-most-requested-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width: 940px){
    .mazda-most-requested-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 560px){
    .mazda-most-requested-grid{grid-template-columns:1fr;}
    .mazda-most-requested-card__image-wrap{min-height:210px;}
    .mazda-most-requested-card h3{font-size:18px;min-height:auto;}
}



/* Context-aware Most Requested cards: model/size pages use wider filtered cards. */
.mazda-most-requested-grid.is-context-filtered{
    grid-template-columns:repeat(auto-fit,minmax(300px,360px));
    justify-content:flex-start;
    gap:22px;
}
.mazda-most-requested-grid.is-context-filtered .mazda-most-requested-card{
    width:100%;
}
@media(max-width:760px){
    .mazda-most-requested-grid.is-context-filtered{
        grid-template-columns:1fr;
    }
}


/* Mazda Corrections.xlsx — all-tabs structured content */
.mazda-pagecopy-section--correction-section{background:#f5f8fc}
.mazda-correction-card-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    margin-top:22px;
}
.mazda-correction-card{
    min-width:0;
    padding:24px;
    border:1px solid #dbe5ef;
    border-radius:18px;
    background:#fff;
    box-shadow:0 10px 28px rgba(8,38,77,.055);
}
.mazda-correction-card h3{
    margin:0 0 10px;
    color:#08264d;
    font-size:19px;
    line-height:1.35;
}
.mazda-correction-card p{
    margin:0;
    color:#4d647f;
    line-height:1.72;
}
.mazda-correction-check-grid{margin-top:22px}
.mazda-correction-table-wrap{margin-top:22px}
.mazda-correction-source-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin-top:22px;
}
.mazda-correction-source-list a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:15px 18px;
    border:1px solid #dbe5ef;
    border-radius:14px;
    background:#fff;
    color:#0b5cad;
    text-decoration:none;
    font-weight:700;
}
.mazda-correction-prose{
    max-width:920px;
    margin-top:22px;
}
.mazda-correction-prose p{
    color:#4d647f;
    line-height:1.75;
}
@media(max-width:800px){
    .mazda-correction-card-grid,
    .mazda-correction-source-list{grid-template-columns:1fr}
}


/* Homepage presentable sections */
.mazda-pagecopy-section--correction-section .mazda-pagecopy-heading{max-width:900px;margin-bottom:24px}
.mazda-pagecopy-section--correction-section .mazda-pagecopy-heading p{max-width:860px;font-size:16px;line-height:1.7}
.mazda-correction-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mazda-correction-card{
    display:block;height:100%;padding:22px;border:1px solid #dce6f0;border-radius:16px;
    background:#fff;text-decoration:none;box-shadow:0 8px 24px rgba(7,35,69,.05)
}
.mazda-correction-card h3{margin:0 0 9px;font-size:18px;line-height:1.35}
.mazda-correction-card p{margin:0;font-size:14.5px;line-height:1.65}
.mazda-correction-card--link{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.mazda-correction-card--link:hover{transform:translateY(-2px);border-color:#9bc2ec;box-shadow:0 12px 28px rgba(7,35,69,.09)}
.mazda-correction-card__arrow{display:block;margin-top:14px;color:#1268c4;font-weight:800;font-size:13px}
@media(max-width:1050px){.mazda-correction-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.mazda-correction-card-grid{grid-template-columns:1fr}}


/* Mazda Corrections 1.xlsx — structured update styling */
.mazda-pagecopy-section--correction-section{padding-top:60px;padding-bottom:60px}
.mazda-pagecopy-section--correction-section .mazda-pagecopy-heading{max-width:940px;margin-bottom:24px}
.mazda-pagecopy-section--correction-section .mazda-pagecopy-heading p{max-width:900px;font-size:16px;line-height:1.75;color:#526882}
.mazda-correction-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}
.mazda-correction-card{display:block;height:100%;padding:22px;border:1px solid #d9e5f0;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(8,38,77,.055);text-decoration:none}
.mazda-correction-card h3{margin:0 0 10px;color:#08264d;font-size:18px;line-height:1.35}
.mazda-correction-card p{margin:0;color:#506780;font-size:14.5px;line-height:1.68}
.mazda-correction-card--link:hover{transform:translateY(-2px);border-color:#9cc3ec;box-shadow:0 12px 30px rgba(8,38,77,.09)}
.mazda-correction-card__arrow{display:block;margin-top:14px;color:#1268c4;font-size:13px;font-weight:800}
.mazda-modern-table-wrap{overflow-x:auto;margin-top:24px;border:1px solid #d9e5f0;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(8,38,77,.045)}
.mazda-modern-table th{padding:15px 18px;background:#edf5fd;color:#08264d;text-align:left;font-size:14px;font-weight:800}
.mazda-modern-table td{padding:15px 18px;border-top:1px solid #e5edf5;color:#4c637d;vertical-align:top;line-height:1.6}
.mazda-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px}
.mazda-check-grid article{display:flex;gap:12px;align-items:flex-start;padding:18px;border:1px solid #d9e5f0;border-radius:14px;background:#fff}
@media(max-width:1000px){.mazda-correction-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.mazda-correction-card-grid,.mazda-check-grid{grid-template-columns:1fr}}

/* =========================================================
   Final CTA long-title fix
   Prevent long engine-code CTA headings from collapsing into
   a narrow column when text length increases.
   ========================================================= */
.mazda-pagecopy-cta{
    grid-template-columns:minmax(0,1fr) auto !important;
    column-gap:32px !important;
    row-gap:22px !important;
    align-items:center !important;
    min-height:0 !important;
}

.mazda-pagecopy-cta > div{
    width:100% !important;
    min-width:0 !important;
    max-width:920px !important;
    flex:none !important;
}

.mazda-pagecopy-cta h2,
.mazda-pagecopy-cta h3{
    display:block !important;
    width:100% !important;
    max-width:920px !important;
    margin:0 !important;
    font-size:clamp(28px,2.7vw,42px) !important;
    line-height:1.14 !important;
    letter-spacing:-.02em !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
}

.mazda-pagecopy-cta p{
    width:100% !important;
    max-width:820px !important;
    margin:14px 0 0 !important;
    font-size:16px !important;
    line-height:1.7 !important;
}

.mazda-pagecopy-cta > a{
    justify-self:end !important;
    align-self:center !important;
    width:auto !important;
    max-width:260px !important;
    white-space:normal !important;
    text-align:center !important;
    line-height:1.25 !important;
}

@media(max-width:900px){
    .mazda-pagecopy-cta{
        grid-template-columns:1fr !important;
        padding:30px 28px !important;
    }

    .mazda-pagecopy-cta > div{
        max-width:none !important;
    }

    .mazda-pagecopy-cta h2,
    .mazda-pagecopy-cta h3{
        max-width:none !important;
        font-size:clamp(27px,6vw,38px) !important;
    }

    .mazda-pagecopy-cta > a{
        justify-self:start !important;
        max-width:100% !important;
    }
}

@media(max-width:640px){
    .mazda-pagecopy-cta{
        padding:26px 22px !important;
        border-radius:18px !important;
    }

    .mazda-pagecopy-cta h2,
    .mazda-pagecopy-cta h3{
        font-size:30px !important;
        line-height:1.16 !important;
    }
}

/* =========================================================
   FINAL 34-SHEET LOCKED workbook — structured content
   ========================================================= */
.mazda-presentation--final-context .mazda-pagecopy-heading{
    margin-bottom:18px;
}
.mazda-presentation--final-context .mazda-correction-card-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}
.mazda-presentation--final-context .mazda-correction-card{
    border-top:3px solid #1d74d5;
    padding:24px;
}
.mazda-presentation--final-context .mazda-correction-card h3{
    font-size:18px;
}
.mazda-presentation--final-evidence .mazda-check-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
}
.mazda-presentation--final-decision-table .mazda-modern-table-wrap{
    border-radius:18px;
    overflow-x:auto;
}
.mazda-presentation--final-decision-table .mazda-modern-table th:first-child,
.mazda-presentation--final-decision-table .mazda-modern-table td:first-child{
    min-width:185px;
    font-weight:800;
    color:#08264d;
}
.mazda-presentation--final-decision-table .mazda-modern-table th{
    min-width:210px;
}
.mazda-presentation--bottom-line .mazda-answer-box{
    border:1px solid #bcd8f5;
    background:linear-gradient(135deg,#eef7ff 0%,#ffffff 100%);
    box-shadow:0 14px 34px rgba(8,38,77,.07);
}
.mazda-presentation--bottom-line .mazda-answer-box__label{
    color:#0f64b9;
}
@media(max-width:900px){
    .mazda-presentation--final-context .mazda-correction-card-grid{
        grid-template-columns:1fr;
    }
    .mazda-presentation--final-evidence .mazda-check-grid{
        grid-template-columns:1fr;
    }
}

/* =========================================================
   Table + compact correction section presentation fix
   ========================================================= */

/* Real compatibility / guidance tables */
.mazda-modern-table-wrap--compatibility{
    border:1px solid #d7e5f2;
    border-radius:18px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 12px 30px rgba(8,38,77,.055);
}
.mazda-modern-table--compatibility{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}
.mazda-modern-table--compatibility thead th{
    padding:18px 22px;
    background:#eaf3fc;
    color:#08264d;
    font-size:14px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.035em;
    border-bottom:1px solid #d6e4f1;
}
.mazda-modern-table--compatibility tbody td{
    padding:18px 22px;
    color:#435f7e;
    line-height:1.55;
    border-top:1px solid #e8eef5;
    vertical-align:top;
}
.mazda-modern-table--compatibility tbody tr:first-child td{
    border-top:0;
}
.mazda-modern-table--compatibility tbody tr:nth-child(even) td{
    background:#f8fbfe;
}
.mazda-modern-table--compatibility tbody td:first-child{
    width:30%;
    min-width:230px;
    color:#083c7a;
    font-weight:800;
}

/* Route comparison: three useful cards instead of one pipe-filled card */
.mazda-route-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
    align-items:stretch;
}
.mazda-route-card{
    height:100%;
    min-width:0;
}
.mazda-route-card dl{
    margin:0;
}
.mazda-route-card dl > div{
    height:100%;
}

/*
 * Short workbook sections that contain only one little card used to create
 * a full-width row each. Pair those sections into two columns on desktop.
 */
.mazda-pagecopy-section--single-card{
    display:inline-block;
    width:calc(50% - 3px);
    vertical-align:top;
    padding-top:42px;
    padding-bottom:42px;
    background:#f6f9fc;
}
.mazda-pagecopy-section--single-card .container{
    width:100%;
    max-width:none;
    padding-left:34px;
    padding-right:34px;
}
.mazda-pagecopy-section--single-card .mazda-pagecopy-heading{
    max-width:none;
    margin-bottom:18px;
}
.mazda-pagecopy-section--single-card .mazda-pagecopy-heading h2,
.mazda-pagecopy-section--single-card .mazda-pagecopy-heading h3{
    font-size:clamp(27px,2.2vw,36px);
    line-height:1.15;
}
.mazda-pagecopy-section--single-card .mazda-pagecopy-heading p{
    font-size:15px;
    line-height:1.65;
}
.mazda-pagecopy-section--single-card .mazda-correction-card-grid{
    grid-template-columns:1fr;
    margin-top:16px;
}
.mazda-pagecopy-section--single-card .mazda-correction-card{
    width:100%;
    max-width:none;
    padding:20px 22px;
}

/* General structured table polish */
.mazda-correction-table-wrap .mazda-modern-table td:first-child{
    font-weight:750;
    color:#0a427f;
}
.mazda-correction-table-wrap .mazda-modern-table tbody tr:nth-child(even) td{
    background:#f8fbfe;
}

@media(max-width:1050px){
    .mazda-route-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .mazda-pagecopy-section--single-card{
        display:block;
        width:100%;
    }
    .mazda-route-grid{
        grid-template-columns:1fr;
    }
    .mazda-modern-table--compatibility tbody td:first-child{
        min-width:180px;
    }
}

@media(max-width:700px){
    .mazda-modern-table-wrap--compatibility{
        border:0;
        box-shadow:none;
        background:transparent;
        overflow:visible;
    }
    .mazda-modern-table--compatibility thead{
        display:none;
    }
    .mazda-modern-table--compatibility,
    .mazda-modern-table--compatibility tbody,
    .mazda-modern-table--compatibility tr,
    .mazda-modern-table--compatibility td{
        display:block;
        width:100%;
    }
    .mazda-modern-table--compatibility tr{
        margin-bottom:14px;
        overflow:hidden;
        border:1px solid #d9e5f0;
        border-radius:14px;
        background:#fff;
    }
    .mazda-modern-table--compatibility tbody td,
    .mazda-modern-table--compatibility tbody td:first-child{
        min-width:0;
        width:100%;
        padding:13px 16px;
        border-top:1px solid #edf2f7;
        background:#fff;
    }
    .mazda-modern-table--compatibility tbody td:first-child{
        border-top:0;
        background:#eef6fd;
    }
    .mazda-modern-table--compatibility td::before{
        content:attr(data-label);
        display:block;
        margin-bottom:4px;
        color:#67809a;
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:.04em;
    }
}

/* =========================================================
   FIX: compact 2-column sections must stay inside the site container
   Previous rule made each SECTION itself 50% of the viewport.
   This grid keeps full-width sections full-bleed while placing only
   .mazda-pagecopy-section--single-card inside the normal content width.
   ========================================================= */

.mazda-db-content{
    display:grid !important;
    grid-template-columns:
        [full-start] minmax(20px, 1fr)
        [content-start] minmax(0, 660px)
        [content-mid] minmax(0, 660px)
        [content-end] minmax(20px, 1fr)
        [full-end] !important;
    align-items:stretch;
}

/* Everything remains full width by default. */
.mazda-db-content > *{
    grid-column:full-start / full-end;
    min-width:0;
}

/* Override the old viewport-based 50% section rule. */
.mazda-db-content > .mazda-pagecopy-section--single-card{
    display:block !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    min-width:0;
}

/*
 * Pair only the compact/single-card sections.
 * Chrome/Edge current versions support :nth-child(... of selector).
 */
.mazda-db-content > .mazda-pagecopy-section--single-card:nth-child(odd of .mazda-pagecopy-section--single-card){
    grid-column:content-start / content-mid;
}

.mazda-db-content > .mazda-pagecopy-section--single-card:nth-child(even of .mazda-pagecopy-section--single-card){
    grid-column:content-mid / content-end;
}

/* Internal content now respects the half-container column. */
.mazda-db-content > .mazda-pagecopy-section--single-card > .container{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding-left:28px !important;
    padding-right:28px !important;
}

.mazda-db-content > .mazda-pagecopy-section--single-card:nth-child(odd of .mazda-pagecopy-section--single-card){
    border-right:1px solid rgba(15,70,125,.08);
}

/* Avoid the oversized empty horizontal gap between paired cards. */
.mazda-pagecopy-section--single-card .mazda-correction-card-grid{
    width:100%;
}

@media(max-width:900px){
    .mazda-db-content{
        display:block !important;
    }

    .mazda-db-content > .mazda-pagecopy-section--single-card{
        width:100% !important;
        border-right:0 !important;
    }

    .mazda-db-content > .mazda-pagecopy-section--single-card > .container{
        max-width:1320px !important;
        margin-left:auto !important;
        margin-right:auto !important;
        padding-left:20px !important;
        padding-right:20px !important;
    }
}

/* =========================================================
   MAZDA EMERGENCY MOBILE SAFETY PATCH — 2026-09-23
   Applies to all non-home Mazda content pages:
   model, engine-size, engine-code/product and DB-driven sections.
   Prevents fixed/min widths from pushing the page outside viewport.
   ========================================================= */
@media (max-width: 900px) {
    html,
    body,
    .listing-site--mazda-replacement-engines,
    .listing-site--mazda-replacement-engines .mazda-content-page,
    .listing-site--mazda-replacement-engines .mazda-db-content {
        max-width: 100%;
        overflow-x: clip;
    }

    .listing-site--mazda-replacement-engines .container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
        box-sizing: border-box !important;
    }

    .listing-site--mazda-replacement-engines .mazda-header-inner,
    .listing-site--mazda-replacement-engines .mazda-page-hero__grid,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__grid,
    .listing-site--mazda-replacement-engines .mazda-service-options__grid,
    .listing-site--mazda-replacement-engines .mazda-spec-grid,
    .listing-site--mazda-replacement-engines .mazda-spec-record-grid,
    .listing-site--mazda-replacement-engines .mazda-problem-grid,
    .listing-site--mazda-replacement-engines .mazda-check-grid,
    .listing-site--mazda-replacement-engines .mazda-route-grid,
    .listing-site--mazda-replacement-engines .mazda-correction-card-grid {
        min-width: 0 !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__grid,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__grid > *,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__grid > *,
    .listing-site--mazda-replacement-engines .mazda-db-content > *,
    .listing-site--mazda-replacement-engines .mazda-pagecopy-section,
    .listing-site--mazda-replacement-engines .mazda-pagecopy-section > .container,
    .listing-site--mazda-replacement-engines .mazda-pagecopy-section--single-card,
    .listing-site--mazda-replacement-engines .mazda-pagecopy-section--single-card > .container {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__finder,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__visual,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__image-wrap,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__image-wrap img {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .listing-site--mazda-replacement-engines img,
    .listing-site--mazda-replacement-engines video,
    .listing-site--mazda-replacement-engines svg {
        max-width: 100%;
    }

    .listing-site--mazda-replacement-engines h1,
    .listing-site--mazda-replacement-engines h2,
    .listing-site--mazda-replacement-engines h3,
    .listing-site--mazda-replacement-engines p,
    .listing-site--mazda-replacement-engines a,
    .listing-site--mazda-replacement-engines td,
    .listing-site--mazda-replacement-engines th {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    /* Tables scroll inside their own wrapper rather than widening the page. */
    .listing-site--mazda-replacement-engines .responsive-table,
    .listing-site--mazda-replacement-engines .mazda-modern-table-wrap,
    .listing-site--mazda-replacement-engines .mazda-correction-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Product navigation may intentionally scroll horizontally, but only itself. */
    .listing-site--mazda-replacement-engines .mazda-engine-product-nav {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Kill the former desktop half-width section behaviour on mobile. */
    .listing-site--mazda-replacement-engines .mazda-db-content {
        display: block !important;
    }
    .listing-site--mazda-replacement-engines .mazda-pagecopy-section--single-card {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        border-right: 0 !important;
    }
}

@media (max-width: 640px) {
    .listing-site--mazda-replacement-engines .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__inner {
        padding-top: 14px !important;
        padding-bottom: 24px !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero h1,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero h1 {
        max-width: 100% !important;
        font-size: clamp(29px, 9vw, 36px) !important;
        line-height: 1.08 !important;
        letter-spacing: -.035em !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__actions,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
    }

    .listing-site--mazda-replacement-engines .mazda-page-hero__actions > *,
    .listing-site--mazda-replacement-engines .mazda-engine-product-hero__actions > * {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .listing-site--mazda-replacement-engines .mazda-pagecopy-cta {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
        padding: 24px 18px !important;
    }
    .listing-site--mazda-replacement-engines .mazda-pagecopy-cta > a {
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
        text-align: center;
    }

    .listing-site--mazda-replacement-engines .mazda-related-models > div {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .listing-site--mazda-replacement-engines .mazda-related-models a {
        width: 100% !important;
        min-width: 0 !important;
    }
}
