:root {
  --navy: #171a3d;
  --navy-deep: #10122e;
  --navy-soft: #2a2e55;
  --sky: #3aa0e8;
  --mist: #f3f2f5;
  --paper: #ffffff;
  --line: #dcdce4;
  --muted: #5f6279;
  --text: #2b2d42;
  --danger: #b3261e;
  --heading: Barlow, "Helvetica Neue", Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --logo-width: 136px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.7 var(--body); }
img { display: block; max-width: 100%; }
/* Anything with the hidden attribute stays hidden, even if a class gives it display: flex or grid. */
[hidden] { display: none !important; }
a { color: var(--navy); }
h1, h2, h3 { margin: 0; color: var(--navy); font-family: var(--heading); line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 500; }
h3 { font-size: 1.3rem; font-weight: 600; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: 32px; }
.narrow { width: min(800px, 100%); }
.section { padding-block: clamp(64px, 9vw, 120px); }
main > .section:first-child { padding-top: clamp(64px, 9vw, 120px); }
.section-mist { background: var(--mist); }
.section-head { margin-bottom: 44px; }
.eyebrow {
  display: flex; align-items: center; gap: 18px; margin: 0 0 18px; color: var(--navy);
  font: 600 .95rem/1.3 var(--heading); letter-spacing: .2em; text-transform: uppercase;
}
.eyebrow-rule::after { content: ""; width: 60px; height: 2px; background: currentColor; }
.tracked { font: 600 clamp(2rem, 3.6vw, 2.6rem)/1.15 var(--heading); letter-spacing: .14em; text-transform: uppercase; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.breadcrumb { margin: 0 0 28px; font-weight: 500; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 28px; padding: 15px 30px; border: 1px solid var(--navy);
  border-radius: 0; background: var(--navy); color: var(--paper); font: 600 1rem/1.3 var(--heading); letter-spacing: .04em;
  text-decoration: none; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--paper); color: var(--navy); }
.btn-sm { padding: 10px 20px; font-size: .92rem; }
.btn-wide { justify-content: space-between; width: min(360px, 100%); padding-block: 18px; }
.btn-arrow::after { content: ""; flex: none; width: 14px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%, 22% 50%); transition: transform .25s ease; }
.btn-arrow:hover::after { transform: translateX(5px); }
.btn-light { background: var(--paper); border-color: var(--paper); color: var(--navy); }
.btn-light:hover { background: transparent; color: var(--paper); }
.text-link { display: inline-block; margin-top: 14px; font-weight: 500; }

/* Header. The utility bar scrolls away and the main nav stays. */
.site-header { position: sticky; top: -40px; z-index: 50; background: var(--navy); transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 28px -14px rgba(16, 18, 46, .75); }
.util-bar { background: var(--navy-deep); }
.util-inner { display: flex; align-items: center; justify-content: flex-end; gap: 26px; height: 40px; }
.util-inner a { color: var(--paper); font-size: .8rem; font-weight: 600; text-decoration: none; }
.util-inner a:hover { color: var(--sky); }
.util-location { color: #b8bad0; font-size: .8rem; }
.nav-bar { position: static; }
.nav-inner { position: relative; display: flex; align-items: center; justify-content: flex-end; min-height: 64px; }
.logo-block {
  position: absolute; left: 32px; bottom: -52px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: var(--logo-width); height: 156px; padding: 10px; background: var(--paper); color: var(--navy); text-align: center;
  text-decoration: none; box-shadow: 0 8px 20px -10px rgba(16, 18, 46, .45); transition: height .25s ease, bottom .25s ease;
}
.logo-mark {
  width: 96px; height: 96px; object-fit: contain; display: block;
}
.logo-name { font: 700 1rem/1.15 var(--heading); letter-spacing: .05em; text-transform: uppercase; }
.is-scrolled .logo-block { bottom: 0; height: 64px; }
.is-scrolled .logo-mark { width: 42px; height: 42px; }
.is-scrolled .logo-name { font-size: .88rem; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); }
.nav-links a {
  position: relative; padding-block: 8px; color: var(--paper); font: 600 .84rem/1.2 var(--heading);
  letter-spacing: .17em; text-decoration: none; text-transform: uppercase;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: .17em; bottom: 0; height: 2px; background: var(--paper);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-links .nav-quote { padding: 9px 14px; border: 1px solid var(--paper); transition: background .25s ease, color .25s ease; }
.nav-links .nav-quote::after { display: none; }
.nav-links .nav-quote:hover { background: var(--paper); color: var(--navy); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--paper); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Photos. Each has a navy background behind it in case the file fails to load. */
.photo-wake { background-image: url("../img/boat-wake-aerial.jpg"); }
.photo-teal { background-image: url("../img/aerial-boats-teal.jpg"); }
.photo-sea { background-image: url("../img/calm-sea-sky.jpg"); }
.photo-harbor { background-image: url("../img/harbor-boats.jpg"); }
.photo-golden { background-image: url("../img/golden-hour-boat.jpg"); }

/* Hero */
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(560px, calc(100vh - 104px), 900px); overflow: hidden; background: var(--navy-deep); color: var(--paper); }
.hero-photo { position: absolute; inset: 0; background-color: var(--navy-deep); background-position: center; background-size: cover; animation: slow-zoom 22s ease-out both; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 18, 46, .28) 0%, rgba(16, 18, 46, .05) 38%, rgba(16, 18, 46, .78) 100%); }
.hero-inner { position: relative; z-index: 1; display: flex; justify-content: flex-end; width: min(1200px, 100%); padding-block: 72px; }
.hero-copy { width: min(680px, 100%); animation: rise-in .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 { color: var(--paper); font-weight: 500; text-shadow: 0 2px 26px rgba(16, 18, 46, .55); }
.hero-box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 26px; padding: 18px 26px;
  border: 2px solid var(--paper); background: rgba(16, 18, 46, .28); color: var(--paper); font: 500 1.15rem/1.4 var(--heading);
  text-decoration: none; transition: background .25s ease, color .25s ease;
}
.hero-box small { display: block; font: 400 .9rem/1.5 var(--body); }
.hero-box .btn-arrow { display: flex; flex: none; }
.hero-box:hover { background: var(--paper); color: var(--navy); }
@keyframes slow-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Stock strip */
.stock-strip { background: var(--navy); color: var(--paper); }
.stock-inner { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding-block: 28px; }
.stock-label { align-self: start; margin: 0; font: 700 .95rem/1.3 var(--heading); letter-spacing: .14em; text-transform: uppercase; }
.stock-more { display: inline-block; padding: 3px 12px; background: var(--paper); color: var(--navy); font-size: .78rem; font-weight: 700; text-decoration: none; transition: background .2s ease; }
.stock-more:hover { background: var(--sky); }
.stock-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.stock-list li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 24px; align-items: baseline; }
.stock-list span { color: #b8bad0; font-size: .82rem; }
.stock-list a { color: var(--paper); font-size: .95rem; text-decoration: none; }
.stock-list a:hover { text-decoration: underline; }

/* Split series sections */
.stock-all { white-space: nowrap; }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head-row .text-link { margin-top: 0; color: var(--navy); font-weight: 600; }
.series-list { display: grid; gap: clamp(72px, 10vw, 130px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 100px); align-items: center; }
.split-flip .split-media { order: 2; }
.split-media { aspect-ratio: 4 / 5; max-height: 660px; width: 100%; overflow: hidden; background: var(--navy); }
.split-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.split:hover .split-media img { transform: scale(1.04); }
.split-sub { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 26px; color: var(--navy); font: 700 clamp(1rem, 2vw, 1.2rem)/1.3 var(--heading); letter-spacing: .15em; text-transform: uppercase; }
.split-models { margin: 0 0 34px; padding: 0; list-style: none; }
.split-models li { border-top: 1px solid var(--line); }
.split-models li:last-child { border-bottom: 1px solid var(--line); }
.split-models a { display: flex; justify-content: space-between; gap: 18px; padding-block: 12px; color: var(--text); text-decoration: none; transition: color .2s ease, padding .2s ease; }
.split-models a:hover { padding-left: 8px; color: var(--navy); font-weight: 500; }
.split-models span { flex: none; color: var(--muted); font-size: .9rem; }
.split-more { margin: -22px 0 26px; color: var(--muted); font-size: .92rem; }
.view-all { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 44px; text-align: center; }
.view-all p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Full-width photo bands */
.photo-band { position: relative; overflow: hidden; background-color: var(--navy); background-position: center; background-size: cover; color: var(--paper); }
.photo-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 18, 46, .8) 0%, rgba(16, 18, 46, .5) 55%, rgba(16, 18, 46, .25) 100%); }
.photo-band > .wrap { position: relative; }
/* Zoomed and shifted so the boat sits to the right of the text. */
.photo-band.photo-teal { background-position: 0 50%; background-size: 160%; }
.band-inner { padding-block: clamp(90px, 13vw, 180px); }
.photo-band h2, .photo-band .eyebrow { color: var(--paper); }
.photo-band p:not(.eyebrow) { max-width: 34em; margin: 18px 0 0; font-size: 1.08rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: 26px 72px; margin: 44px 0 0; }
.stat-row div { display: flex; flex-direction: column-reverse; }
.stat-row dt { font-size: .9rem; }
.stat-row dd { margin: 0; font: 500 clamp(2.6rem, 5vw, 3.8rem)/1.1 var(--heading); }
.band-action { margin-top: 34px; }

/* Steps and features */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 34px; margin: 0; padding: 0; list-style: none; }
.steps li { padding-top: 22px; border-top: 2px solid var(--navy); }
.step-num { display: block; margin-bottom: 10px; color: var(--muted); font: 600 .9rem var(--heading); letter-spacing: .2em; }
.steps p { margin: 10px 0 0; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.feature { padding: 30px; background: var(--mist); }
.section-mist .feature { background: var(--paper); }
.feature h2 { font-size: 1.4rem; font-weight: 600; }
.feature p { margin: 10px 0 0; color: var(--muted); overflow-wrap: anywhere; }

/* Motor cards */
.motor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 44px 40px; }
.card { display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mist); text-decoration: none; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--paper); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--muted); font-size: .8rem; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.card:hover .placeholder { transform: scale(1.05); }
.placeholder strong { color: var(--navy); font: 500 clamp(5rem, 9vw, 7rem)/1 var(--heading); letter-spacing: -.01em; }
.placeholder em { margin: 2px 0 14px; color: var(--navy); font: 600 1rem var(--heading); letter-spacing: .3em; }
.placeholder-lg strong { font-size: clamp(7rem, 15vw, 11rem); }
.tag { position: absolute; top: 5px; left: 5px; padding: 3px 10px; background: #85868f; color: var(--paper); font-size: .78rem; font-weight: 700; }
.badge { position: absolute; top: 5px; right: 5px; padding: 3px 10px; background: var(--navy); color: var(--paper); font-size: .78rem; font-weight: 700; }
.badge-inline { position: static; display: inline-block; margin-top: 14px; }
.card-body { display: flex; flex: 1; flex-direction: column; padding-top: 20px; }
.card-make { margin: 0 0 4px; color: var(--muted); font: 600 .82rem var(--heading); letter-spacing: .16em; text-transform: uppercase; }
.card-body h3 a { color: var(--navy); text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-specs { margin: 8px 0 18px; color: var(--muted); font-size: .9rem; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.price { color: var(--navy); font: 600 1.3rem/1.15 var(--heading); }
.price small { display: block; color: var(--muted); font: 400 .78rem/1.6 var(--body); }
.price-lg { margin: 20px 0 22px; font-size: 2.3rem; }

/* Inner page heads */
.page-head { padding-block: clamp(84px, 8vw, 104px) clamp(26px, 3vw, 36px); background-color: var(--mist); }
.page-head + .section { padding-top: clamp(36px, 4vw, 52px); }
.page-head h1 { font: 600 clamp(1.9rem, 3.6vw, 2.6rem)/1.15 var(--heading); letter-spacing: .14em; text-transform: uppercase; }
.page-head .eyebrow { display: none; }
.page-head-photo { position: relative; padding-block: clamp(140px, 19vw, 260px) clamp(40px, 5vw, 64px); background-color: var(--navy); background-position: center; background-size: cover; }
.page-head-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 18, 46, .2), rgba(16, 18, 46, .72)); }
.page-head-photo .wrap { position: relative; }
.page-head-photo h1 { color: var(--paper); }
.prose h2 { margin-top: 36px; font-size: 1.8rem; }
.prose .btn { margin-top: 22px; }
.prose .lead, .lead { color: var(--navy); font-size: 1.2rem; line-height: 1.65; }
.feature h3 { margin: 0; color: var(--navy); font-size: 1.3rem; font-weight: 600; }
.feature a { color: var(--navy); font-weight: 600; }
.check-list { margin: 14px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(-45deg); }
.check-list-numbered { counter-reset: steps; }
.check-list-numbered li { counter-increment: steps; }
.check-list-numbered li::before { content: counter(steps); top: 10px; left: 0; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--navy); color: var(--paper); font: 700 .75rem/22px var(--heading); text-align: center; transform: none; }
.check-list a { color: var(--navy); font-weight: 600; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 18px 40px 18px 0; color: var(--navy); font: 600 1.12rem/1.4 var(--heading); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; color: var(--navy); font: 400 1.6rem/1 var(--body); transform: translateY(-50%); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.about-stats { display: flex; flex-wrap: wrap; gap: 16px 56px; margin: 0 0 28px; }
.about-stats dt { color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.about-stats dd { margin: 2px 0 0; color: var(--navy); font: 600 2.4rem/1.1 var(--heading); }
.brand-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.brand-list a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); color: var(--navy); text-decoration: none; transition: border-color .2s ease; }
.brand-list a:hover { border-color: var(--navy); }
.brand-list strong { font: 600 1.15rem var(--heading); }
.brand-list span { color: var(--muted); font-size: .88rem; }
.pay-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.pay-list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); }
.pay-list strong { color: var(--navy); font: 600 1.05rem var(--heading); }
.pay-list span { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.confirm { text-align: center; }
.confirm .eyebrow { justify-content: center; }
.confirm h1 { margin-bottom: 18px; }
.confirm .btn { margin-top: 14px; }

/* Filter bar */
.filter-title { margin: 0 0 12px; color: var(--navy); font: 700 1.1rem var(--heading); }
.filter-bar { background: var(--navy); color: var(--paper); }
.filter-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 20px; align-items: center; padding: 10px 28px; }
.filter-row + .filter-row { border-top: 1px solid rgba(255, 255, 255, .16); }
.filter-label { font-size: .9rem; }
.filter-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.filter-options a { padding: 8px 10px; background: var(--navy-soft); color: #d8d9e6; font-size: .88rem; text-align: center; text-decoration: none; transition: background .2s ease, color .2s ease; }
.filter-options a:hover { background: #3b3f6c; color: var(--paper); }
.filter-options a[aria-current="true"] { background: var(--paper); color: var(--navy); font-weight: 500; }
.filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0 44px; }
.result-count { margin: 0; color: var(--muted); font-weight: 500; }
.empty { padding: 64px 20px; background: var(--mist); text-align: center; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.gallery-main { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--mist); }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--paper); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-top: 10px; }
.gallery-thumbs button { aspect-ratio: 1; padding: 0; overflow: hidden; background: var(--mist); border: 2px solid transparent; cursor: pointer; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--navy); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.detail-info .eyebrow { margin-bottom: 12px; }
.motor-description { margin: 16px 0 0; }
.detail-contact { color: var(--muted); }
.sold-note { margin: 18px 0; color: var(--danger); font-weight: 600; }
.spec-table { width: 100%; margin-top: 30px; border-collapse: collapse; }
.spec-table caption { margin-bottom: 10px; color: var(--navy); font: 600 1.05rem var(--heading); letter-spacing: .16em; text-align: left; text-transform: uppercase; }
.spec-table th, .spec-table td { padding: 11px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 38%; padding-right: 12px; color: var(--muted); font-weight: 500; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; color: var(--navy); font-size: .9rem; font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; background: var(--paper); color: var(--text); border: 1px solid #a3a5b5; border-radius: 0; font: inherit; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--navy); }
.quote-form .btn { margin-top: 22px; }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: .85rem; }
.form-alert { padding: 12px 16px; background: #fdecea; color: var(--danger); font-weight: 500; }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: .85rem; font-weight: 500; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Modal */
.quote-modal { width: min(700px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; color: var(--text); box-shadow: 0 30px 80px -20px rgba(16, 18, 46, .8); }
.quote-modal::backdrop { background: rgba(16, 18, 46, .72); }
.quote-modal-inner { position: relative; padding: 36px; }
.quote-modal h2 { margin-bottom: 22px; padding-right: 40px; font-size: 2rem; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; background: var(--mist); border: 0; color: var(--navy); font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* Footer */
.site-footer { padding-block: 64px 26px; background: var(--navy); color: #c9cadb; }
.site-footer .footer-name { margin: 0; color: var(--paper); font: 700 1.25rem/1.2 var(--heading); letter-spacing: .08em; text-transform: uppercase; }
.site-footer p { margin: 10px 0 0; }
.site-footer h2 { margin-bottom: 12px; color: var(--paper); font: 600 .9rem var(--heading); letter-spacing: .17em; text-transform: uppercase; }
.site-footer a { display: block; padding-block: 3px; color: #c9cadb; overflow-wrap: anywhere; text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 40px; }
.site-footer .footer-legal { margin: 44px auto 0; padding-top: 20px; font-size: .85rem; }

/* Admin */
/* Admin */
body.admin { background: var(--mist); }
.admin-nav { background: var(--navy); }
.admin-nav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 68px; padding-block: 10px; }
.admin-brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; }
.admin-brand img { flex: none; width: 36px; height: 36px; object-fit: contain; background: var(--paper); border-radius: 6px; }
.admin-brand span { display: flex; flex-direction: column; font: 700 1rem/1.1 var(--heading); letter-spacing: .06em; text-transform: uppercase; }
.admin-brand small { color: #b8bad0; font: 600 .7rem var(--body); letter-spacing: .18em; }
.admin-links { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-links a { padding: 8px 14px; color: #d8d9e6; font-weight: 600; text-decoration: none; border-radius: 4px; }
.admin-links a:hover { background: rgba(255, 255, 255, .08); color: var(--paper); }
.admin-links a[aria-current="page"] { background: var(--paper); color: var(--navy); }
.admin-account { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.admin-account a { color: #d8d9e6; font-size: .9rem; }
.admin-logout { padding: 7px 14px; background: transparent; color: var(--paper); border: 1px solid rgba(255, 255, 255, .45); border-radius: 4px; font: 600 .88rem var(--body); cursor: pointer; }
.admin-logout:hover { background: var(--paper); color: var(--navy); }
.admin-main { padding-block: 32px 72px; }
.admin-main h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.3rem); }
.admin-main h2 { margin: 0 0 16px; font-size: 1.35rem; }
.admin-main h3 { margin: 20px 0 8px; font-size: 1.05rem; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-sub { margin: 6px 0 0; color: var(--muted); }
.admin-crumb { margin: 0 0 12px; font-size: .92rem; font-weight: 500; }
.admin-crumb a { color: var(--navy); }
.admin-card { margin-bottom: 20px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.admin-empty { text-align: center; }
.admin-empty p { margin: 6px 0; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.admin-toolbar .admin-tabs { margin-bottom: 0; }
.admin-tabs a { padding: 8px 14px; background: var(--paper); color: var(--navy); border: 1px solid var(--line); border-radius: 4px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.admin-tabs a span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.admin-tabs a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.admin-tabs a[aria-current="page"] span { color: #c9cbe0; }
.table-scroll { position: relative; overflow-x: auto; }
.admin-card.table-scroll { padding: 6px 18px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table th { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.admin-table a { color: var(--navy); }
.admin-table tr.is-new td { background: #f4f9fe; }
.admin-table tr.is-saved td { background: #e3f4e8; }
.admin-table .num { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); font-size: .88rem; }
.nowrap { white-space: nowrap; }
.admin-thumb { width: 84px; }
.admin-thumb img, .admin-thumb-empty { display: grid; place-items: center; width: 72px; height: 54px; object-fit: contain; background: var(--mist); border-radius: 4px; color: var(--muted); font-size: .7rem; font-weight: 600; text-align: center; }
.admin-form { max-width: 760px; }
.admin-form > .field { margin-bottom: 16px; }
.admin-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.admin-details dt { color: var(--muted); font-size: .9rem; }
.admin-details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.admin-message { margin: 0; padding: 14px; background: var(--mist); border-radius: 4px; }
.admin-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--paper); }
.motor-form { max-width: 900px; }
.motor-form .admin-card .field { margin-bottom: 14px; }
.motor-form .form-grid .field { margin-bottom: 0; }
.motor-photo { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.form-savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 20px; padding: 14px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 -8px 18px -14px rgba(16, 18, 46, .5); }
.form-savebar a { color: var(--navy); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.status { display: inline-block; padding: 3px 10px; background: var(--mist); border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status-new, .status-in_stock { background: #d9ecfa; color: var(--navy); }
.status-contacted { background: #fff4d6; color: #6b4e00; }
.status-sold { background: #ffe6d8; color: #8a3a0c; }
.status-closed { background: #ececf1; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.actions form { margin: 0; }

/* Admin sign-in */
.login-wrap { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.login-card { width: min(420px, 100%); padding: 34px 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 20px 40px -28px rgba(16, 18, 46, .6); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--navy); font: 700 1rem var(--heading); letter-spacing: .08em; text-align: center; text-decoration: none; text-transform: uppercase; }
.login-brand img { width: 72px; height: 72px; object-fit: contain; }
.login-card h1 { margin: 0 0 18px; font-size: 1.6rem; text-align: center; }
.login-form .field { margin-bottom: 16px; }
.login-form .btn { width: 100%; margin-top: 6px; }
.login-alert { margin: 0 0 16px; padding: 10px 14px; background: #fdecea; border-left: 4px solid var(--danger); color: var(--danger); font-size: .92rem; }
.login-note { margin: 0 0 16px; padding: 10px 14px; background: #e3f4e8; border-left: 4px solid #1d6b3a; color: #154d2a; font-size: .92rem; }
.login-back { margin: 20px 0 0; text-align: center; font-size: .9rem; }
.login-back a { color: var(--muted); }
@media (max-width: 860px) {
  .admin-account { margin-left: 0; }
  .admin-split, .motor-photo { grid-template-columns: minmax(0, 1fr); }
  .motor-photo .photo-thumb { max-width: 260px; }
}
.link-button { padding: 0; background: none; border: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Admin: photo manager */
.photo-banner { position: sticky; top: 0; z-index: 5; margin: 0 0 20px; padding: 14px 18px; background: #e3f4e8; border-left: 4px solid #1d6b3a; color: #154d2a; font-weight: 500; box-shadow: 0 6px 14px -10px rgba(16, 18, 46, .5); }
.photo-banner a { color: inherit; }
.photo-banner-removed { background: #fff1e6; border-color: #8a3a0c; color: #6b2d09; }
.photo-banner-error { background: #fdecea; border-color: var(--danger); color: var(--danger); }
.photo-intro { max-width: 820px; margin: 0 0 22px; color: var(--muted); }
.photo-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.photo-search { flex: 1 1 280px; max-width: 420px; }
.photo-search input { width: 100%; padding: 10px 12px; border: 1px solid #a3a5b5; font: inherit; }
.photo-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-filter { padding: 9px 16px; background: var(--paper); color: var(--navy); border: 1px solid var(--line); font: 600 .9rem var(--body); cursor: pointer; }
.photo-filter span { margin-left: 6px; color: var(--muted); font-weight: 500; }
.photo-filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.photo-filter[aria-pressed="true"] span { color: #c9cbe0; }
.photo-brands { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 30px; padding: 12px 0; border-block: 1px solid var(--line); font-size: .9rem; }
.photo-brands a { color: var(--navy); font-weight: 600; text-decoration: none; }
.photo-brands a:hover { text-decoration: underline; }
.photo-brands span { color: var(--muted); font-weight: 500; }
.photo-none { color: var(--muted); }
.photo-group { margin-bottom: 40px; scroll-margin-top: 20px; }
.photo-group h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--navy); font-size: 1.6rem; }
.photo-group h2 span { color: var(--muted); font: 500 .9rem var(--body); }
.photo-list { margin: 0; padding: 0; list-style: none; }
.photo-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(260px, 1.1fr); gap: 20px; align-items: center; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--line); background: var(--paper); scroll-margin-top: 90px; }
.photo-row + .photo-row { margin-top: 10px; }
.photo-row[data-problem="yes"] { border-left-color: #d9822b; }
.photo-row.is-changed { border-left-color: var(--sky); background: #f4f9fe; }
.photo-row.is-saved { border-color: #1d6b3a; border-left-color: #1d6b3a; box-shadow: 0 0 0 2px #1d6b3a; }
.photo-row.is-error { border-color: var(--danger); border-left-color: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.photo-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.photo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--paper); }
.photo-empty, .photo-broken { padding: 8px; color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; }
.photo-broken { color: var(--danger); }
.photo-unsaved { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; background: var(--sky); color: var(--paper); font-size: .75rem; font-weight: 700; text-align: center; }
.photo-info { min-width: 0; }
.photo-num { margin: 0 0 2px; color: var(--muted); font: 700 .85rem var(--heading); letter-spacing: .08em; }
.photo-info h3 { margin: 0 0 4px; font-size: 1.15rem; line-height: 1.3; }
.photo-info h3 a { color: var(--navy); }
.photo-meta { margin: 0 0 6px; color: var(--muted); font-size: .88rem; }
.photo-state { display: inline-block; margin: 0; padding: 2px 8px; font-size: .8rem; font-weight: 600; }
.photo-state-ok { background: #e3f4e8; color: #1d6b3a; }
.photo-state-warn { background: #fff1e6; color: #8a3a0c; }
.photo-form { display: flex; flex-direction: column; gap: 8px; }
.photo-form label { color: var(--navy); font-size: .82rem; font-weight: 600; }
.photo-form input { width: 100%; padding: 9px 10px; border: 1px solid #a3a5b5; font: inherit; font-size: .85rem; }
.photo-form input:focus-visible { border-color: var(--navy); }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.photo-remove { margin-left: auto; color: var(--danger); }
@media (max-width: 860px) {
  .photo-row { grid-template-columns: 120px minmax(0, 1fr); }
  .photo-form { grid-column: 1 / -1; }
}
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Cart and checkout */
.cart-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding-inline: 5px; border-radius: 10px; background: var(--sky); color: var(--navy-deep); font-size: .75rem; font-weight: 700; line-height: 1; }
.cart-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 24px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.cart-item-name { color: var(--navy); font: 600 1.15rem/1.3 var(--heading); text-decoration: none; }
.cart-item-name:hover { text-decoration: underline; }
.cart-item-price { color: var(--navy); font: 600 1.2rem var(--heading); }
.totals { margin: 22px 0 0; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding-block: 6px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; color: var(--navy); font-weight: 600; text-align: right; }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 32px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.checkout-steps { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; color: var(--muted); font: 600 .78rem/1.3 var(--heading); letter-spacing: .14em; text-transform: uppercase; }
.checkout-steps li { display: flex; align-items: center; counter-increment: step; }
.checkout-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border: 1px solid #a3a5b5; font-size: .75rem; letter-spacing: 0; }
.checkout-steps li + li::after { order: -1; content: ""; width: clamp(18px, 4vw, 48px); height: 1px; margin-inline: 14px; background: #a3a5b5; }
.checkout-steps a { color: inherit; text-decoration: none; }
.checkout-steps a:hover { color: var(--navy); text-decoration: underline; }
.checkout-steps .is-done::before { content: "✓"; border-color: var(--navy); background: var(--navy); color: var(--paper); }
.checkout-steps [aria-current="step"] { color: var(--navy); }
.checkout-steps [aria-current="step"]::before { border: 2px solid var(--navy); color: var(--navy); }
.checkout-form .form-alert, .notice { margin: 0 0 24px; }
.checkout-panel { min-width: 0; margin: 0 0 20px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); background: var(--paper); }
.checkout-panel:focus-within { border-color: #a3a5b5; }
.checkout-panel legend { float: left; display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 22px; padding: 0; color: var(--navy); font: 600 1.05rem/1.2 var(--heading); letter-spacing: .16em; text-transform: uppercase; }
.checkout-panel legend + * { clear: both; }
.panel-num { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; background: var(--navy); color: var(--paper); font-size: .85rem; letter-spacing: .04em; }
.panel-intro { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.panel-note { margin: 18px 0 0; padding-left: 14px; border-left: 2px solid var(--sky); color: var(--muted); font-size: .88rem; }
.form-grid-address { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.field-label { display: block; margin-bottom: 6px; color: var(--navy); font-size: .9rem; font-weight: 600; }
.segmented { display: flex; border: 1px solid #a3a5b5; }
.segmented label { position: relative; flex: 1; }
.segmented label + label { border-left: 1px solid #a3a5b5; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 11px 8px; color: var(--text); font-size: .92rem; text-align: center; cursor: pointer; transition: background .2s ease, color .2s ease; }
.segmented label:hover span { background: var(--mist); }
.segmented input:checked + span { background: var(--navy); color: var(--paper); font-weight: 600; }
.segmented input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: -3px; }
.notice { padding: 12px 16px; background: #d9ecfa; color: var(--navy); font-weight: 500; }
.pay-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pay-option { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.pay-option:hover { border-color: #a3a5b5; background: #fafafc; }
.pay-option:has(input:checked) { border-color: var(--navy); background: #f6f7fb; box-shadow: inset 0 0 0 1px var(--navy); }
.pay-option:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.pay-option input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--navy); }
.pay-option input:focus-visible { outline: none; }
.pay-option strong { display: block; color: var(--navy); font: 600 1.02rem/1.35 var(--heading); }
.pay-option small { display: block; margin-top: 2px; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.checkout-submit { margin-top: 28px; }
.checkout-submit .btn-wide { width: 100%; }
.checkout-submit .form-note { margin-top: 14px; }
.order-summary { position: sticky; top: 90px; padding: clamp(22px, 3vw, 30px); background: var(--mist); border-top: 3px solid var(--navy); }
.summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.summary-head a { font-size: .88rem; font-weight: 500; }
.order-summary h2 { font: 600 1.05rem var(--heading); letter-spacing: .16em; text-transform: uppercase; }
.summary-list { margin: 0; padding: 0; list-style: none; }
.summary-list li { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.summary-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; height: 60px; overflow: hidden; background: var(--paper); color: var(--navy); }
.summary-thumb img { width: 100%; height: 100%; object-fit: contain; }
.summary-thumb strong { font: 500 1.3rem/1 var(--heading); }
.summary-thumb em { font: 600 .6rem var(--heading); font-style: normal; letter-spacing: .2em; }
.summary-item { min-width: 0; }
.summary-item .card-make { display: block; margin: 0; font-size: .72rem; }
.summary-name { display: block; color: var(--navy); font-size: .92rem; font-weight: 500; line-height: 1.4; }
.summary-price { color: var(--navy); font: 600 1.05rem var(--heading); white-space: nowrap; }
.order-summary .totals { margin: 18px 0 0; }
.order-summary .totals div { font-size: .92rem; }
.totals .totals-due { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--navy); }
.totals-due dt { color: var(--navy); font-weight: 600; }
.totals-due dd { font: 600 1.35rem/1.2 var(--heading); }
.summary-note { margin: 16px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.summary-help { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }

/* Checkout refresh */
.checkout-head { background: linear-gradient(180deg, var(--mist), #fff); }
.checkout-lede { max-width: 40em; margin: 10px 0 0; color: var(--muted); }
.checkout-section { background: linear-gradient(180deg, #fff 0, var(--mist) 220px, var(--mist) 100%); }
.checkout-form .form-alert { display: flex; flex-direction: column; gap: 2px; margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid var(--danger); border-radius: 8px; }
.required-key { margin: 0 0 14px; color: var(--muted); font-size: .85rem; }
.req { margin-left: 2px; color: var(--danger); font-weight: 700; }
.checkout-panel { position: relative; margin: 0 0 18px; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 1px 2px rgba(16, 18, 46, .05), 0 12px 28px -22px rgba(16, 18, 46, .45); transition: border-color .2s ease, box-shadow .2s ease; }
.checkout-panel:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(58, 160, 232, .18), 0 12px 28px -22px rgba(16, 18, 46, .45); }
.checkout-panel legend { letter-spacing: .12em; }
.panel-num { width: 38px; height: 38px; border-radius: 50%; transition: background .25s ease; }
.checkout-panel.is-complete .panel-num { background: #1d7a43; font-size: 0; }
.checkout-panel.is-complete .panel-num::after { content: "\2713"; font-size: 1.05rem; }
.checkout-form .field input, .checkout-form .field select { padding: 13px 14px; border: 1px solid #c4c6d3; border-radius: 8px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.checkout-form .field input::placeholder { color: #a0a2b3; }
.checkout-form .field input:hover, .checkout-form .field select:hover { border-color: #8f92a6; }
.checkout-form .field input:focus-visible, .checkout-form .field select:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(58, 160, 232, .25); outline: none; }
.checkout-form .field input[aria-invalid="true"], .checkout-form .field select[aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.checkout-form .field-error::before { content: "! "; font-weight: 700; }
.field-hint { margin: -2px 0 10px; color: var(--muted); font-size: .85rem; }
.delivery-field { margin-top: 22px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 3px; border-radius: 10px; }
.choice { position: relative; display: flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 14px 14px 14px 40px; border: 1px solid #c4c6d3; border-radius: 10px; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.choice span::before { content: ""; position: absolute; left: 14px; top: 16px; width: 16px; height: 16px; border: 2px solid #a3a5b5; border-radius: 50%; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.choice strong { color: var(--navy); font: 600 .98rem/1.3 var(--heading); }
.choice small { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.choice:hover span { border-color: #8f92a6; }
.choice input:checked + span { border-color: var(--navy); background: #f4f6fc; box-shadow: inset 0 0 0 1px var(--navy); }
.choice input:checked + span::before { border-color: var(--navy); box-shadow: inset 0 0 0 4px #fff; background: var(--navy); }
.choice input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.is-invalid { box-shadow: 0 0 0 2px var(--danger); }
.checkout-form .segmented { overflow: hidden; border-color: #c4c6d3; border-radius: 8px; }
.pay-options { gap: 10px; padding: 3px; border-radius: 12px; }
.pay-option { align-items: center; padding: 14px 16px; border: 1px solid #c4c6d3; border-radius: 10px; }
.pay-option:has(input:checked) { border-color: var(--navy); background: #f4f6fc; box-shadow: inset 0 0 0 1px var(--navy); }
.pay-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--mist); color: var(--navy); font: 700 .78rem/1 var(--heading); letter-spacing: .02em; transition: background .15s ease, color .15s ease; }
.pay-option:has(input:checked) .pay-badge { background: var(--navy); color: var(--paper); }
.pay-text { min-width: 0; }
.checkout-submit { margin-top: 22px; padding: 22px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.checkout-button { justify-content: center; gap: 14px; border-radius: 10px; font-size: 1.05rem; padding-block: 18px; }
.checkout-button[aria-busy="true"] { opacity: .7; pointer-events: none; }
.checkout-submit .form-note { text-align: center; }
.order-summary { border-top: 0; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 18, 46, .05), 0 18px 40px -26px rgba(16, 18, 46, .5); overflow: hidden; }
.order-summary::before { content: ""; display: block; height: 4px; margin: calc(-1 * clamp(22px, 3vw, 30px)) calc(-1 * clamp(22px, 3vw, 30px)) clamp(18px, 2.5vw, 24px); background: linear-gradient(90deg, var(--navy), var(--sky)); }
.summary-thumb { border-radius: 8px; background: var(--mist); }
.summary-spec { display: block; color: var(--muted); font-size: .78rem; }
.totals .totals-due { padding: 14px; margin-inline: -14px; border-top: 0; border-radius: 8px; background: #eef7ee; }
.totals-due dt, .totals-due dd { color: #1d6b3a; }
.trust-list { margin: 18px 0 0; padding: 0; list-style: none; }
.trust-list li { position: relative; padding: 7px 0 7px 28px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.trust-list li::before { content: "\2713"; position: absolute; left: 0; top: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e3f4e8; color: #1d6b3a; font-size: .7rem; font-weight: 700; }
.trust-list strong { color: var(--navy); font-weight: 600; }
.summary-toggle { display: none; margin-left: auto; padding: 6px 12px; background: var(--mist); color: var(--navy); border: 1px solid var(--line); border-radius: 999px; font: 600 .82rem var(--body); cursor: pointer; }
.summary-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.summary-toggle[aria-expanded="true"]::after { margin-bottom: -1px; transform: rotate(-135deg); }

/* Scroll animations. Only hide content when JS is running to reveal it again. */
.js .reveal, .js .stagger > * { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in, .js .stagger > .is-in { opacity: 1; transform: none; }
.js .stagger > .card.is-in:hover { transform: translateY(-7px); }

@media (max-width: 860px) {
  :root { --logo-width: 104px; }
  .wrap { padding-inline: 20px; }
  .util-inner { justify-content: flex-start; gap: 16px; overflow: hidden; }
  .util-location, .util-hide { display: none; }
  .nav-toggle { display: block; }
  .logo-block { left: 20px; bottom: -36px; height: 100px; gap: 2px; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-name { font-size: .72rem; }
  .is-scrolled .logo-name { font-size: .72rem; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 3; display: none; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 44px 20px 24px; background: var(--navy); box-shadow: 0 18px 30px -18px rgba(16, 18, 46, .8);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding-block: 12px; }
  .nav-links .nav-quote { margin-top: 10px; padding-block: 12px; text-align: center; }
  .hero-photo { background-position: 31% center; }
  .hero-inner { justify-content: flex-start; padding-block: 48px; }
  .split, .detail-grid, .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .split-flip .split-media { order: 0; }
  .split-media { aspect-ratio: 4 / 3; }
  .order-summary { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .filter-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .filter-options { display: flex; gap: 8px; margin-inline: -16px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
  .filter-options a { flex: none; padding-inline: 14px; white-space: nowrap; }
  .filter-row { gap: 6px; padding-block: 10px; }
  .stock-inner { grid-template-columns: minmax(0, 1fr); }
  .stock-all { justify-self: start; }
  .photo-band::before { background: rgba(16, 18, 46, .62); }
  .photo-band.photo-teal { background-position: center; background-size: cover; }
  .section-head { margin-bottom: 30px; }
  .site-footer a { padding-block: 7px; }

  /* Checkout: the order summary sits above the form, folded down to the totals. */
  .order-summary { margin-bottom: 4px; }
  .js .summary-toggle { display: inline-flex; align-items: center; }
  .summary-head { flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  .js .order-summary:not(.is-open) .summary-list,
  .js .order-summary:not(.is-open) .trust-list,
  .js .order-summary:not(.is-open) .summary-help { display: none; }
  .js .order-summary:not(.is-open) .totals { margin-top: 10px; }

  /* Admin tables become one card per row instead of scrolling sideways. */
  .admin-card.table-scroll { padding: 2px 16px; overflow: visible; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin-table, .admin-table tbody { display: block; }
  .admin-table tbody tr { display: grid; gap: 6px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .admin-table tbody tr:last-child { border-bottom: 0; }
  .admin-table td { display: block; padding: 0; border: 0; background: transparent !important; }
  .admin-table tr.is-new { background: #f4f9fe; }
  .admin-table tr.is-saved { margin-inline: -16px; padding-inline: 16px; background: #e3f4e8; }
  .admin-table .num::before { content: "#"; }
  .admin-table .num { justify-self: end; font-size: .85rem; }
  .admin-motors tbody tr { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .admin-motors .admin-thumb { grid-column: 1; grid-row: 1 / span 3; align-self: start; width: auto; }
  .admin-motors td:nth-child(2) { grid-column: 3; grid-row: 3; align-self: end; }
  .admin-motors td:nth-child(3) { grid-column: 2 / -1; grid-row: 1; }
  .admin-motors td:nth-child(4) { grid-column: 2; grid-row: 2; font-weight: 600; }
  .admin-motors td:nth-child(5) { grid-column: 3; grid-row: 2; justify-self: end; }
  .admin-motors td:nth-child(6) { grid-column: 2; grid-row: 3; }
  .admin-motors .actions { gap: 4px 16px; }
  .admin-enquiries tbody tr { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-enquiries td:nth-child(1) { grid-column: 2; grid-row: 1; }
  .admin-enquiries td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: .88rem; }
  .admin-enquiries td:nth-child(2) br { display: none; }
  .admin-enquiries td:nth-child(2) .muted::before { content: " · "; }
  .admin-enquiries td:nth-child(3) { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
  .admin-enquiries td:nth-child(4) { grid-column: 1; grid-row: 3; font-size: .92rem; }
  .admin-enquiries td:nth-child(4)::before { content: "Motor: "; color: var(--muted); }
  .admin-enquiries td:nth-child(5) { grid-column: 2; grid-row: 2; justify-self: end; }
  .admin-enquiries td:nth-child(6) { grid-column: 2; grid-row: 3; justify-self: end; font-weight: 600; }
  .photo-form input, .admin-main .field input, .admin-main .field select, .admin-main .field textarea { font-size: 16px; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .logo-block { left: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .quote-modal-inner { padding: 26px 18px; }
  .stock-list li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero { min-height: clamp(440px, 72svh, 600px); }
  .hero-inner { padding-block: 32px; }
  .hero-box { padding: 14px 16px; font-size: 1.02rem; }
  .split-media { aspect-ratio: 16 / 9; }
  .series-list { gap: 56px; }
  .split-sub { margin: 10px 0 18px; letter-spacing: .1em; }
  .view-all { margin-top: 32px; }

  /* Two motors per row on phones, so the list is half as long. */
  .motor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
  .tag, .badge { top: 4px; padding: 2px 6px; font-size: .66rem; }
  .tag { left: 4px; }
  .badge { right: 4px; }
  .placeholder strong { font-size: 3.2rem; }
  .placeholder em { margin: 0 0 6px; font-size: .75rem; }
  .placeholder > span { font-size: .68rem; }
  .card-body { padding-top: 12px; }
  .card-make { font-size: .68rem; letter-spacing: .12em; }
  .card-body h3 { font-size: 1rem; line-height: 1.25; }
  .card-specs { margin: 4px 0 10px; font-size: .78rem; line-height: 1.5; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; }
  .card-foot .price { font-size: 1.15rem; }
  .card-foot form, .card-foot .btn { width: 100%; }
  .card-foot .btn { padding: 10px 8px; font-size: .86rem; }
  .filter-foot { margin-bottom: 26px; }

  /* Checkout */
  .checkout-panel { padding: 20px 16px; border-radius: 10px; }
  .checkout-panel legend { gap: 12px; margin-bottom: 18px; font-size: .95rem; letter-spacing: .08em; }
  .panel-num { width: 32px; height: 32px; font-size: .78rem; }
  .choice span { padding: 12px 12px 12px 38px; }
  .choice span::before { left: 13px; top: 14px; }
  .pay-option { gap: 12px; padding: 12px; }
  .pay-option small { font-size: .8rem; }
  .pay-badge { width: 38px; height: 38px; border-radius: 8px; font-size: .72rem; }
  .checkout-submit { padding: 16px; }
  .checkout-button { padding-inline: 16px; font-size: 1rem; }
  .order-summary { padding: 18px 16px; }
  .order-summary::before { margin: -18px -16px 16px; }
  .checkout-steps { font-size: .7rem; letter-spacing: .1em; }
  .btn-wide { width: 100%; }
  .cart-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cart-item form { grid-column: 1 / -1; }
  .pay-options { grid-template-columns: minmax(0, 1fr); }
  .checkout-steps { gap: 10px 20px; }
  .checkout-steps li + li::after { display: none; }
}

/* Very narrow phones: back to one motor per row. */
@media (max-width: 340px) {
  .motor-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal, .js .stagger > * { opacity: 1; transform: none; }
  .js .stagger > .card.is-in:hover { transform: none; }
  .card:hover .card-media img, .card:hover .placeholder, .split:hover .split-media img, .btn-arrow:hover::after { transform: none; }
}
