:root {
  --accent: #d6a82f;
  --accent-dark: #8c6815;
  --canvas: #343736;
  --ink: #181919;
  --muted: #636560;
  --panel: #fff;
  --panel-soft: #f2f1ed;
  --rule: #d8d7d1;
  --shadow: 0 1.5rem 4rem rgb(24 25 25 / 12%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--canvas); margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  left: 1rem;
  padding: 0.7rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus-visible { top: 1rem; }

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-shell {
  background: var(--panel);
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 100rem;
  min-height: 100vh;
}

.site-header {
  background: var(--ink);
  color: #fff;
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}

.listing-nav {
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  display: flex;
  justify-content: space-between;
  min-height: 5rem;
}

.listing-nav a { text-decoration: none; }

.listing-nav__brand {
  align-items: center;
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-nav__mark {
  background: linear-gradient(90deg, #2c69a0 0 33%, #263e78 33% 66%, #b43a48 66%);
  display: inline-block;
  height: 0.32rem;
  transform: skewX(-24deg);
  width: 2.6rem;
}

.listing-nav__links { display: flex; font-size: 0.85rem; gap: clamp(1rem, 3vw, 2.25rem); }
.listing-nav__links a { color: #d4d5d3; padding: 0.5rem 0; }
.listing-nav__links a:hover,
.listing-nav__links a:focus-visible { color: var(--accent); }

.showcase {
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(25rem, 1fr);
}

.showcase-media {
  display: grid;
  gap: 0.4rem;
  grid-template-rows: minmax(0, 1.7fr) minmax(13rem, 0.95fr);
  height: clamp(38rem, 62vw, 56rem);
  min-width: 0;
}

.showcase-photo { height: 100%; object-fit: cover; width: 100%; }
.showcase-photo--hero { object-position: center; }
.showcase-photo--secondary { object-position: center; }
.showcase-secondary {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}
.showcase-secondary-frame { min-height: 0; min-width: 0; overflow: hidden; position: relative; }
.showcase-secondary-frame .showcase-photo { inset: 0; position: absolute; }

.showcase-copy {
  align-self: center;
  max-width: 35rem;
  padding: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 4vw, 4rem);
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0 0 0.85rem;
  text-transform: uppercase;
}

.showcase .eyebrow,
.contact-section .eyebrow { color: var(--accent); }

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  font-size: clamp(3rem, 4.1vw, 4.5rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
  margin-bottom: 1.75rem;
  overflow-wrap: normal;
}

.m3-wordmark {
  background: url("/assets/m3-badge.png") center / contain no-repeat;
  display: inline-block;
  height: 0.76em;
  vertical-align: -0.01em;
  white-space: nowrap;
  width: 3.05em;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 0;
}

h3 { font-size: 1.25rem; line-height: 1.25; }

.hero-summary {
  color: #c8c9c7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.48rem);
  max-width: 47rem;
}

.hero-offer {
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  border-top: 1px solid rgb(255 255 255 / 18%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2.25rem 0 0;
  padding: 1.25rem 0;
}

.offer-label {
  color: #9fa19e;
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-offer strong { font-size: clamp(1.45rem, 3vw, 2.25rem); }

.button {
  border: 1px solid transparent;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.95rem 1.4rem;
  text-decoration: none;
  text-transform: uppercase;
}

.button--primary { background: var(--accent); color: var(--ink); }
.button--primary:hover,
.button--primary:focus-visible { background: #edc250; }
.button--outline { border-color: rgb(255 255 255 / 38%); color: #fff; }
.button--outline:hover,
.button--outline:focus-visible { border-color: var(--accent); color: var(--accent); }

.listing-section { padding: clamp(4.5rem, 9vw, 8.5rem) clamp(1.25rem, 7vw, 7rem); }
.listing-section + .listing-section { border-top: 1px solid var(--rule); }
.listing-section--intro { padding-top: clamp(3.5rem, 7vw, 6rem); }
.listing-section--tinted { background: var(--panel-soft); }
.listing-section--quiet { background: #f8f8f5; }

.section-heading { margin-bottom: clamp(2.25rem, 5vw, 4.5rem); max-width: 58rem; }
.section-heading__description { color: var(--muted); margin: 1.35rem 0 0; max-width: 54rem; }
.section-heading__lead { color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.05rem, 1.7vw, 1.35rem); margin: 1.5rem 0 0; max-width: 57rem; }
.section-heading--split { align-items: end; display: flex; gap: 3rem; justify-content: space-between; max-width: none; }
.section-heading--split > p { color: var(--muted); margin: 0; max-width: 30rem; }
.hero-highlights {
  align-items: stretch;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 1.1rem 0 0.2rem;
}
.hero-highlights div { border-left: 1px solid rgb(255 255 255 / 18%); min-width: 0; padding: 0 clamp(0.7rem, 1.5vw, 1rem) 0.9rem; }
.hero-highlights div:nth-child(odd) { border-left: 0; padding-left: 0; }
.hero-highlights div:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 18%); padding-top: 0.9rem; }
.hero-highlights div:nth-child(even) { padding-right: 0; }
.hero-highlights dt { color: #9fa19e; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.hero-highlights dd { color: #fff; font-size: clamp(0.8rem, 1vw, 0.98rem); font-weight: 800; line-height: 1.18; margin: 0.35rem 0 0; overflow-wrap: anywhere; }
.hero-highlights div:first-child dd { white-space: nowrap; }
.hero-highlights dd span { color: #9fa19e; display: block; font-size: 0.74em; font-weight: 650; margin-top: 0.2rem; }

.vehicle-overview {
  align-items: start;
  display: grid;
  gap: clamp(0.75rem, 1.5vw, 1.5rem);
  grid-template-columns: minmax(0, 3fr) minmax(17rem, 1fr);
}

.listing-gallery { min-width: 0; }
.gallery-stage { background: var(--ink); margin: 0; position: relative; }
.gallery-stage a { cursor: zoom-in; display: grid; place-items: center; }
.gallery-stage img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.gallery-stage img.is-portrait { object-fit: contain; }
.gallery-stage figcaption {
  background: rgb(17 18 18 / 84%);
  bottom: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  left: 0;
  letter-spacing: 0.04em;
  padding: 0.72rem 1rem;
  position: absolute;
}

.gallery-thumbnails {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  margin-top: 0.45rem;
  padding: 0 0 0.7rem;
}

.gallery-thumb {
  background: var(--ink);
  border: 3px solid transparent;
  display: block;
  opacity: 0.66;
  outline-offset: 2px;
}

.gallery-thumb img { aspect-ratio: 4 / 3; height: 100%; object-fit: cover; width: 100%; }
.gallery-thumb:hover,
.gallery-thumb:focus-visible { opacity: 1; }
.gallery-thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }

.facts-gutter { background: var(--ink); color: #fff; padding: clamp(1.4rem, 3vw, 2.5rem); position: sticky; top: 1rem; }
.facts-gutter h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 1.5rem; }
.key-facts { margin: 0; }
.key-facts div { border-top: 1px solid rgb(255 255 255 / 16%); padding: 0.9rem 0; }
.key-facts dt { color: #9fa19e; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.key-facts dd { font-size: 0.94rem; font-weight: 700; margin: 0.28rem 0 0; overflow-wrap: anywhere; }
.package-list { display: grid; gap: 0.2rem; }
.facts-note { color: #bfc0be; font-family: Georgia, "Times New Roman", serif; font-size: 0.95rem; margin: 1.5rem 0 0; }
.carfax-report-button {
  align-items: center;
  background: #fff;
  border: 2px solid #fff;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.4rem;
  text-decoration: none;
}
.carfax-report-button img { width: 100%; }
.carfax-report-button span { background: #18547d; color: #fff; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.05em; padding: 0.65rem 0.5rem; text-align: center; text-transform: uppercase; white-space: nowrap; }
.carfax-report-button:hover,
.carfax-report-button:focus-visible { border-color: var(--accent); }
.carfax-report-button:hover span,
.carfax-report-button:focus-visible span { background: #236f9f; }
.carfax-summary { color: #fff; display: block; font-size: 0.68rem; letter-spacing: 0.02em; margin-top: 0.45rem; text-align: center; }

.option-sheet-button {
  align-items: flex-end;
  background: linear-gradient(rgb(255 255 255 / 8%), rgb(255 255 255 / 8%)), url("https://media.2018-bmw-m3.page/options/2020-05-original-options-01.jpg") 42% 17% / 145% auto;
  border: 2px solid var(--ink);
  box-shadow: 0.45rem 0.45rem 0 var(--ink);
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  min-height: 9rem;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: left;
  transition: box-shadow 160ms ease, transform 160ms ease;
  width: min(100%, 23rem);
}
.option-sheet-button::before { background: #fff; color: var(--ink); content: "BMW · FACTORY DOCUMENT"; font-size: 0.58rem; font-weight: 900; left: 0.7rem; letter-spacing: 0.1em; padding: 0.3rem 0.45rem; position: absolute; top: 0.7rem; }
.option-sheet-button__copy { background: rgb(24 25 25 / 94%); color: #fff; display: block; padding: 0.8rem 1rem; position: relative; width: 100%; }
.option-sheet-button strong,
.option-sheet-button small { display: block; }
.option-sheet-button strong { font-size: 0.82rem; letter-spacing: 0.035em; text-transform: uppercase; }
.option-sheet-button small { color: var(--accent); font-size: 0.68rem; margin-top: 0.12rem; }
.option-sheet-button:hover,
.option-sheet-button:focus-visible { box-shadow: 0.2rem 0.2rem 0 var(--ink); transform: translate(0.25rem, 0.25rem); }
.decoder-intro { border-top: 1px solid var(--rule); color: var(--muted); margin: 0 0 2rem; padding-top: 1rem; }

.records-tabs { background: var(--panel); border: 1px solid var(--rule); box-shadow: 0 1.5rem 4rem rgb(24 25 25 / 8%); }
.records-tablist {
  background: #e2e1db;
  border-bottom: 1px solid #aaa9a3;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.8rem clamp(0.75rem, 2vw, 1.25rem) 0;
}
.records-tablist button {
  background: #c9c8c2;
  border: 1px solid #aaa9a3;
  border-bottom: 0;
  border-radius: 0.25rem 0.25rem 0 0;
  color: #454743;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: -1px;
  padding: 1rem clamp(0.9rem, 2vw, 1.5rem) 0.9rem;
  text-transform: uppercase;
}
.records-tablist button:hover,
.records-tablist button:focus-visible { background: #d4d3cd; color: var(--ink); }
.records-tablist button[aria-selected="true"] {
  background: var(--panel);
  border-color: #aaa9a3;
  border-top: 4px solid var(--accent);
  color: var(--ink);
  padding-top: calc(1rem - 3px);
  position: relative;
  z-index: 1;
}
.records-panel { padding: clamp(1rem, 3vw, 2.25rem); }
.records-panel[hidden] { display: none; }
.records-total {
  align-items: end;
  border-bottom: 1px solid var(--rule);
  display: grid;
  gap: 0.2rem clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: auto 1fr;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0 1.25rem;
}
.records-total span { color: var(--muted); font-size: 0.67rem; font-weight: 850; grid-column: 1; letter-spacing: 0.1em; text-transform: uppercase; }
.records-total strong { font-size: clamp(2rem, 4vw, 3.5rem); grid-column: 1; letter-spacing: -0.05em; line-height: 1; }
.records-total small { color: var(--muted); font-size: 0.75rem; grid-column: 2; grid-row: 1 / span 2; max-width: 22rem; }
.records-table-wrap--log { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#maintenance-log-panel { height: var(--records-panel-height, auto); }
#maintenance-log-panel:not([hidden]) { display: flex; flex-direction: column; }
.records-table { border-collapse: separate; border-spacing: 0; font-size: 0.82rem; line-height: 1.35; min-width: 48rem; width: 100%; }
.records-table--notable { min-width: 0; }
.records-table--log { min-width: 76rem; }
.records-table th,
.records-table td { border-bottom: 1px solid var(--rule); padding: 0.72rem 0.85rem; text-align: left; vertical-align: top; }
.records-table thead th { background: #e7e6e0; color: #474946; font-size: 0.64rem; font-weight: 850; letter-spacing: 0.08em; position: sticky; text-transform: uppercase; top: 0; z-index: 2; }
.records-table tbody tr:hover td { background: #fff9e8; }
.records-table a { color: #72520b; font-weight: 750; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.records-table a::after { content: " ↗"; font-size: 0.8em; }
.records-table .amount,
.records-table .odometer { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.records-table--notable th:first-child,
.records-table--notable td:first-child { white-space: nowrap; width: 10.5rem; }
.records-table--notable th:last-child,
.records-table--notable td:last-child { width: 10rem; }
.records-table--log th:first-child,
.records-table--log td:first-child { white-space: nowrap; width: 8.5rem; }
.records-table .estimate-heading td { background: #f0efe9; color: var(--muted); font-style: italic; font-weight: 750; }
.records-table .record-start td { border-top: 1px solid #9fa19e; }
.records-table .record-detail td { background: #f7f6f2; color: #565854; }
.records-table tfoot th,
.records-table tfoot td { background: var(--ink); border: 0; color: #fff; font-size: 0.9rem; font-weight: 850; position: sticky; bottom: 0; }
.records-disclaimer { border-bottom: 1px solid var(--rule); color: var(--muted); flex: 0 0 auto; font-size: 0.78rem; margin: 0 0 1.25rem; padding: 0 0 0.9rem; }

.tune-heading h2 a { text-decoration-color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.1em; }
.tune-heading h2 a:hover,
.tune-heading h2 a:focus-visible { color: var(--accent-dark); }
.tune-layout { align-items: start; display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(18rem, 0.9fr) minmax(0, 1.35fr); }
.tune-facts { border-top: 3px solid var(--accent); margin: 0; }
.tune-facts div { border-bottom: 1px solid var(--rule); display: grid; gap: 1rem; grid-template-columns: 7.5rem minmax(0, 1fr); padding: 1rem 0; }
.tune-facts dt { color: var(--accent-dark); font-size: 0.65rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; }
.tune-facts dd { color: var(--ink); font-size: 0.9rem; font-weight: 700; margin: 0; }
.tune-notes { display: grid; gap: clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tune-notes section { border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.tune-notes h3 { color: var(--ink); font-size: clamp(1.35rem, 2vw, 1.8rem); margin: 0 0 1rem; }
.tune-notes p { color: var(--muted); font-size: 0.88rem; }
.tune-notes p:last-child { margin-bottom: 0; }
.tune-notes a { color: var(--accent-dark); }

.condition-section { background: #ecece8; }
.condition-summary { border-top: 1px solid #c4c4be; display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 clamp(2.5rem, 5vw, 4rem); padding-top: 1.25rem; }
.condition-summary ul { list-style: none; margin: 0; padding: 0; }
.condition-summary li { color: #4f514e; font-size: 0.82rem; padding-left: 1.2rem; position: relative; }
.condition-summary li + li { margin-top: 0.7rem; }
.condition-summary li::before { color: var(--accent-dark); content: "—"; left: 0; position: absolute; }
.condition-subsection + .condition-subsection { border-top: 1px solid #c4c4be; margin-top: clamp(4rem, 8vw, 7rem); padding-top: clamp(3.5rem, 7vw, 6rem); }
.condition-disclaimer + .condition-needs { margin-top: clamp(3rem, 6vw, 5rem); }
.condition-subheading { margin-bottom: 1.5rem; }
.condition-subheading h3 { font-size: clamp(1.75rem, 3vw, 2.75rem); letter-spacing: -0.035em; margin: 0; }
.condition-needs-heading > p:last-child { color: var(--muted); font-size: 0.86rem; margin: 1rem 0 0; max-width: 48rem; }
.condition-needs-list { border-bottom: 1px solid #c4c4be; border-top: 1px solid #c4c4be; columns: 2; column-gap: clamp(2rem, 5vw, 5rem); list-style: none; margin: 0; padding: 0.5rem 0; }
.condition-needs-list li { break-inside: avoid; padding: 0.55rem 0; }
.condition-needs-list strong { font-size: 0.82rem; }
.condition-needs-list span { color: var(--muted); font-size: 0.8rem; margin-left: 0.35rem; }
.condition-needs-current { color: var(--muted); font-size: 0.82rem; margin: 1rem 0 0; }
.condition-needs-current strong { color: var(--ink); }
.condition-subheading--photos { align-items: end; display: flex; gap: 2rem; justify-content: space-between; }
.condition-subheading--photos > p { color: var(--muted); font-size: 0.82rem; margin: 0; max-width: 24rem; }
.condition-audit { display: block; }
.condition-table-wrap { background: var(--panel); border: 1px solid #c7c7c1; min-width: 0; overflow-x: auto; }
.condition-table { border-collapse: separate; border-spacing: 0; font-size: 0.82rem; line-height: 1.4; min-width: 52rem; width: 100%; }
.condition-table th,
.condition-table td { border-bottom: 1px solid var(--rule); padding: 0.9rem 1rem; text-align: left; vertical-align: top; }
.condition-table thead th { background: var(--ink); color: #fff; font-size: 0.63rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.condition-table tbody th { color: #5e605d; font-size: 0.66rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; width: 7rem; }
.condition-table tbody tr:last-child th,
.condition-table tbody tr:last-child td { border-bottom: 0; }
.condition-table td:nth-child(2) { width: 30%; }
.condition-table td:nth-child(3) { font-variant-numeric: tabular-nums; white-space: nowrap; width: 23%; }
.condition-table td strong,
.condition-table td span { display: block; }
.condition-table td span { color: var(--muted); font-size: 0.76rem; margin-top: 0.25rem; }
.condition-table mark { background: #f3d66f; color: var(--ink); font-size: 0.7rem; font-weight: 850; letter-spacing: 0.05em; padding: 0.08rem 0.28rem; }
.measurement-note { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.72rem; margin: 0; padding: 0.8rem 1rem; }
.condition-owner-note { border-left: 4px solid var(--accent-dark); margin-top: 1rem; max-width: 54rem; padding: 0.75rem 1rem; }
.condition-owner-note h4 { color: var(--ink); font-size: 0.7rem; letter-spacing: 0.1em; margin: 0 0 0.4rem; text-transform: uppercase; }
.condition-owner-note p { color: var(--muted); font-size: 0.8rem; margin: 0; }
.condition-owner-note a { color: var(--accent-dark); font-weight: 800; }
.condition-photo-group + .condition-photo-group { margin-top: clamp(2.75rem, 6vw, 5rem); }
.condition-photo-group h4 { border-bottom: 3px solid var(--ink); font-size: 0.76rem; letter-spacing: 0.1em; margin: 0 0 1rem; padding-bottom: 0.7rem; text-transform: uppercase; }
.condition-photo-grid { display: grid; gap: clamp(0.65rem, 1.25vw, 1rem); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.condition-photo-grid figure { background: var(--panel); border: 1px solid #cacac4; margin: 0; min-width: 0; }
.condition-photo-grid a { background: #242525; cursor: zoom-in; display: grid; place-items: center; }
.condition-photo-grid img { aspect-ratio: 4 / 3; height: 100%; object-fit: contain; width: 100%; }
.condition-photo-grid figcaption { color: #50524f; font-size: 0.7rem; font-weight: 720; line-height: 1.3; min-height: 2.9rem; padding: 0.62rem 0.7rem; }
.condition-photo-grid figure:hover,
.condition-photo-grid figure:focus-within { border-color: var(--accent-dark); }
.condition-photo--alert { border: 3px solid #a54a37 !important; }
.condition-photo--alert figcaption { color: #782f22; font-weight: 850; }
.condition-disclaimer { border-top: 3px solid var(--ink); margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.25rem; }
.condition-disclaimer strong { display: block; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }
.condition-disclaimer p { color: var(--muted); font-size: 0.82rem; margin: 0.6rem 0 0; max-width: 54rem; }

.contact-section {
  align-items: center;
  background: var(--ink);
  color: #fff;
  display: flex;
  gap: 3rem;
  justify-content: space-between;
  padding: clamp(4.5rem, 9vw, 8.5rem) clamp(1.25rem, 7vw, 7rem);
}

.contact-section > div { max-width: 50rem; }
.contact-section h2 { margin-bottom: 1.25rem; }
.contact-section p:not(.eyebrow) { color: #bfc0be; margin-bottom: 0; max-width: 42rem; }

footer {
  align-items: center;
  background: #111212;
  border-top: 1px solid rgb(255 255 255 / 10%);
  color: #858784;
  display: flex;
  font-size: 0.8rem;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
}

footer p { margin: 0; }
footer a { color: #c6c8c5; }

.site-dialog {
  background: transparent;
  border: 0;
  max-height: 92vh;
  max-width: 80rem;
  padding: 0;
  width: min(94vw, 80rem);
}
.site-dialog::backdrop { backdrop-filter: blur(0.35rem); background: rgb(8 9 9 / 78%); }
.dialog-shell { background: var(--panel); max-height: 92vh; overflow: auto; padding: clamp(1.25rem, 4vw, 3rem); }
.dialog-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}
.dialog-header .eyebrow { margin-bottom: 0.5rem; }
.dialog-header h2 { font-size: clamp(1.8rem, 4vw, 3.25rem); }
.dialog-close {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.6rem;
  height: 2.75rem;
  justify-content: center;
  line-height: 1;
  width: 2.75rem;
}
.dialog-close:hover,
.dialog-close:focus-visible { background: var(--accent-dark); }
.dialog-intro { color: var(--muted); max-width: 52rem; }

.option-photo-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option-photo-grid figure { background: var(--panel-soft); margin: 0; padding: 1rem; }
.option-photo-grid a { cursor: zoom-in; display: grid; min-height: 24rem; place-items: center; }
.option-photo-grid img { max-height: 68vh; object-fit: contain; width: 100%; }
.option-photo-grid figcaption { color: var(--muted); font-size: 0.8rem; font-weight: 700; padding-top: 0.8rem; }

.condition-lightbox {
  background: #111212;
  border: 0;
  color: #fff;
  height: 100dvh;
  inset: 0;
  margin: 0;
  max-height: none;
  max-width: none;
  overflow: hidden;
  padding: 0;
  width: 100vw;
}
.condition-lightbox::backdrop { background: #111212; }
.condition-lightbox__shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; overflow: hidden; }
.condition-lightbox__header {
  align-items: center;
  border-bottom: 1px solid rgb(255 255 255 / 15%);
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
}
.condition-lightbox__header .eyebrow { color: var(--accent); margin-bottom: 0.2rem; }
.condition-lightbox__header strong { display: block; font-size: 0.9rem; }
.condition-lightbox__header form { margin: 0; }
.condition-lightbox__close { background: #303232; }
.condition-lightbox__stage { display: grid; min-height: 0; overflow: hidden; padding: 1rem clamp(4.5rem, 8vw, 8rem); place-items: center; position: relative; }
.condition-lightbox__stage a { cursor: zoom-in; display: grid; height: 100%; min-height: 0; overflow: hidden; place-items: center; position: relative; width: 100%; }
.condition-lightbox__stage img { height: 100%; inset: 0; max-height: 100%; max-width: 100%; object-fit: contain; position: absolute; width: 100%; }
.condition-lightbox__arrow {
  align-items: center;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 22%);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 2.5rem;
  height: 4.5rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3.25rem;
  z-index: 1;
}
.condition-lightbox__arrow:hover,
.condition-lightbox__arrow:focus-visible { background: var(--accent-dark); border-color: var(--accent); }
.condition-lightbox__arrow--previous { left: clamp(0.5rem, 2vw, 2rem); }
.condition-lightbox__arrow--next { right: clamp(0.5rem, 2vw, 2rem); }
.condition-lightbox__footer {
  align-items: center;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: #bfc1be;
  display: flex;
  font-size: 0.75rem;
  gap: 1.25rem;
  justify-content: space-between;
  padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
}
.condition-lightbox__footer span:first-child { color: #fff; font-weight: 800; white-space: nowrap; }

.decoder-groups { column-count: 3; column-gap: clamp(2rem, 4vw, 4rem); column-width: 18rem; }
.decoder-groups section { break-inside: avoid; margin-bottom: 2.5rem; }
.decoder-groups h3 { border-bottom: 3px solid var(--ink); margin-bottom: 0; padding-bottom: 0.8rem; }
.decoder-list { list-style: none; margin: 0; padding: 0; }
.decoder-list li { border-bottom: 1px solid var(--rule); display: grid; gap: 0.8rem; grid-template-columns: 4.25rem minmax(0, 1fr); padding: 0.7rem 0; }
.decoder-list strong { color: var(--accent-dark); font-size: 0.76rem; letter-spacing: 0.04em; }
.decoder-list span { font-size: 0.86rem; }

@media (max-width: 1100px) {
  .vehicle-overview { grid-template-columns: minmax(0, 2.25fr) minmax(16rem, 1fr); }
}

@media (max-width: 980px) {
  .showcase { grid-template-columns: 1fr; }
  .showcase-media { height: clamp(27rem, 70vw, 43rem); }
  .showcase-copy { max-width: 50rem; }
  .vehicle-overview { grid-template-columns: 1fr; }
  .facts-gutter { display: grid; gap: 0 2rem; grid-template-columns: 1fr 2fr; position: static; }
  .facts-gutter > .eyebrow,
  .facts-gutter > h3 { grid-column: 1; }
  .key-facts { grid-column: 2; grid-row: 1 / span 3; }
  .facts-note { grid-column: 1; }
  .condition-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tune-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .listing-nav { min-height: 4.25rem; }
  .listing-nav__links { display: none; }
  .section-heading--split,
  .contact-section { align-items: flex-start; flex-direction: column; }
  .option-sheet-button { width: 100%; }
  .facts-gutter { display: block; }
  .option-photo-grid { grid-template-columns: 1fr; }
  .option-photo-grid a { min-height: auto; }
  .decoder-groups { columns: 1; }
  .tune-notes { grid-template-columns: 1fr; }
  .condition-summary { grid-template-columns: 1fr; }
  .condition-needs-list { columns: 1; }
  .condition-subheading--photos { align-items: flex-start; flex-direction: column; }
  .condition-table-wrap { overflow: visible; }
  .condition-table { display: block; min-width: 0; }
  .condition-table thead { display: none; }
  .condition-table tbody { display: grid; gap: 0.75rem; }
  .condition-table tbody tr { background: var(--panel); border: 1px solid var(--rule); display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); }
  .condition-table tbody th,
  .condition-table tbody td { border: 0; width: auto; }
  .condition-table tbody th { grid-column: 1; grid-row: 1; padding-right: 0.25rem; }
  .condition-table tbody td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .condition-table tbody td:nth-child(3),
  .condition-table tbody td:nth-child(4) { border-top: 1px solid var(--rule); grid-column: 1 / -1; padding-top: 2rem; position: relative; white-space: normal; }
  .condition-table tbody td:nth-child(2),
  .condition-table tbody td:nth-child(3),
  .condition-table tbody td:nth-child(4) { width: auto; }
  .condition-table tbody td:nth-child(3)::before,
  .condition-table tbody td:nth-child(4)::before { color: var(--muted); font-size: 0.6rem; font-weight: 850; left: 1rem; letter-spacing: 0.09em; position: absolute; text-transform: uppercase; top: 0.65rem; }
  .condition-table tbody td:nth-child(3)::before { content: "Measurements"; }
  .condition-table tbody td:nth-child(4)::before { content: "Notes"; }
  .condition-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(2.85rem, 15vw, 4.25rem); }
  .gallery-stage img { aspect-ratio: 4 / 3; }
  .gallery-thumbnails { grid-template-columns: repeat(3, 1fr); }
  .hero-highlights { gap: 0; }
  .hero-highlights div { padding-right: 0.55rem; }
  .records-tablist { display: grid; gap: 0.35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0.55rem 0.55rem 0; }
  .records-tablist button { font-size: 0.6rem; line-height: 1.25; min-width: 0; padding: 0.85rem 0.45rem 0.7rem; white-space: normal; }
  .records-total { display: block; }
  .records-total span,
  .records-total strong,
  .records-total small { display: block; }
  .records-total strong { margin: 0.25rem 0 0.55rem; }
  .condition-photo-grid { grid-template-columns: 1fr; }
  .condition-lightbox__stage { padding: 0.75rem 3.6rem; }
  .condition-lightbox__arrow { height: 3.75rem; width: 2.75rem; }
  .condition-lightbox__arrow--previous { left: 0.35rem; }
  .condition-lightbox__arrow--next { right: 0.35rem; }
  .condition-lightbox__footer { align-items: flex-start; flex-direction: column; gap: 0.2rem; }
  footer { align-items: flex-start; flex-direction: column; gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
