/* Iron Ledger — All Terrain 2.0 (tokens from docs/design/build_artboards.py) */
:root {
  /* --ink-3 and --orange-ink are darkened vs the artboards so 11–13 px text and links pass WCAG AA on cream/white. */
  --bg: #F4F1EB; --paper: #FFFFFF; --ink: #1A1714; --ink-2: #5C554B; --ink-3: #6B6455;
  --line: #D5CEC1; --line-2: #E3DDD2; --coal: #14120F; --coal-2: #1E1B17; --coal-line: #2B2822;
  --cream: #F1ECE3; --cream-2: #D6CFC2; --muted: #A39B8C;
  --orange: #E8621A; --orange-ink: #B0470C; --orange-dark: #8F3A0A; --tint: #F3E4D6;
  /* Migration 036: the layout overrides these per dealer (SiteTemplates.Resolve). The values here ARE the classic template. */
  --on-primary: #14120F; --primary-hover: #F07328; --accent-on-coal: var(--orange); --btn-radius: var(--radius);
  --heading-font: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif; --heading-transform: uppercase; --heading-weight: 700; --heading-leading: .95; --heading-tracking: .005em;
  --radius: 6px; --wrap: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Barlow, "Segoe UI", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); text-decoration: none; }
a:hover { color: var(--orange-dark); }
p a, li a, .desc a, .form-note a, .est-note a, .empty a, .form-sent a { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0 0 1em; }
.display { font-family: var(--heading-font); text-transform: var(--heading-transform); font-weight: var(--heading-weight); line-height: var(--heading-leading); letter-spacing: var(--heading-tracking); text-wrap: balance; }
.mono { font-family: "JetBrains Mono", Consolas, "Cascadia Mono", monospace; font-variant-numeric: tabular-nums; }
.label { font-family: "JetBrains Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .14em; font-size: 11px; }
.accent { color: var(--orange); }
.hero .accent, .site-footer .accent, .ask-fab svg { color: var(--accent-on-coal); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--orange); color: var(--on-primary); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.btn { display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: var(--btn-radius); padding: 12px 18px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--orange); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-dark { background: var(--coal); color: var(--cream); }
.btn-dark:hover { background: var(--coal-2); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border: 1px solid var(--coal-line); }
.btn-danger { background: #FBE9E4; color: #8A2B0E; border: 1px solid #EBC0B0; }
.btn-danger:hover { background: #F6D9CF; color: #8A2B0E; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* header */
.site-header { background: var(--coal); color: var(--cream); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--coal-line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.brand img { width: auto; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 22px; font-weight: 800; }
.brand-sub { color: var(--muted); font-size: 9px; margin-top: 3px; }
.nav { display: flex; gap: 24px; margin-left: 12px; font-weight: 600; font-size: 15px; }
.nav a { color: var(--cream); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.is-active { border-bottom-color: var(--orange); color: var(--cream); }
.nav .count { font-size: 11px; background: var(--coal-line); color: var(--cream-2); padding: 2px 6px; border-radius: 3px; margin-left: 4px; }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.hours { color: var(--muted); font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; background: transparent; color: var(--cream); border: 1px solid var(--coal-line); border-radius: var(--radius); padding: 8px 12px; font: inherit; font-weight: 600; }
.mobile-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px 20px 16px; border-top: 1px solid var(--coal-line); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { color: var(--cream); padding: 10px 0; font-weight: 600; border-bottom: 1px solid var(--coal-line); }
.mobile-nav a.btn { margin-top: 10px; justify-content: center; color: var(--on-primary); border-bottom: 0; }
@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-block; }
}
@media (min-width: 961px) { .mobile-nav { display: none !important; } }

/* hero */
.hero { position: relative; background: var(--coal); color: var(--cream); overflow: hidden; min-height: 560px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.hero-copy { padding: 64px 20px 64px max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.hero h1 { font-size: clamp(48px, 7vw, 92px); font-weight: 800; }
.hero h1 span { color: var(--accent-on-coal); }
.hero p { font-size: 19px; color: var(--cream-2); max-width: 46ch; margin: 0; }
.hero-no-media { grid-template-columns: 1fr; min-height: 420px; }
.hero-media { position: relative; min-height: 320px; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--coal) 0%, rgba(20,18,15,.15) 30%, rgba(20,18,15,0) 60%); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 14px; color: var(--cream-2); }
.hero-facts span::before { content: "✓"; color: var(--accent-on-coal); margin-right: 8px; }
.search-bar { display: flex; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 760px; }
.search-bar label { display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; flex: 1 1 0; border-right: 1px solid var(--line-2); min-width: 0; }
.search-bar label .label { color: var(--ink-3); }
.search-bar select { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); padding: 0; min-width: 0; }
.search-bar .btn { border-radius: 0; padding: 0 26px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; min-height: 240px; }
  .hero-media::after { background: linear-gradient(180deg, rgba(20,18,15,0) 40%, var(--coal) 100%); }
  .hero-copy { padding: 28px 20px 48px; }
  .search-bar { flex-direction: column; }
  .search-bar label { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .search-bar .btn { padding: 14px; justify-content: center; }
}

/* sections */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head .label { color: var(--ink-3); display: block; margin-bottom: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.type-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.type-tile { background: var(--coal); color: var(--cream); padding: 26px 22px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--coal-line); }
.type-tile:hover { border-color: var(--orange); color: var(--cream); }
.type-tile .display { font-size: 30px; }
.type-tile .mono { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .type-tiles { grid-template-columns: 1fr; } }
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.promise div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.promise h3 { font-size: 22px; margin-bottom: 6px; }
.promise p { color: var(--ink-2); font-size: 14px; margin: 0; }
@media (max-width: 900px) { .promise { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .promise { grid-template-columns: 1fr; } }

/* cards — photo-led: bigger image, second photo on hover, "28 photos" / "Video" chips (Video only when a source exists) */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card:hover { border-color: var(--coal); box-shadow: 0 10px 28px rgba(20,18,15,.14); transform: translateY(-2px); }
.card:focus-within { border-color: var(--orange); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--coal); overflow: hidden; }
.card-media:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.card-media .card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .5s ease; }
.card-media .card-img-alt { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .card.has-alt:hover .card-img-alt, .card.has-alt:focus-within .card-img-alt { opacity: 1; }
  .card:not(.has-alt):hover .card-img { transform: scale(1.04); }
}
.card-chips { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; pointer-events: none; }
.chip-photos, .chip-video { display: inline-flex; align-items: center; gap: 5px; background: rgba(20,18,15,.78); color: var(--cream); font: 600 11px "JetBrains Mono", Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; backdrop-filter: blur(3px); }
.chip-video { background: var(--orange); color: var(--on-primary); }
.badge-video { position: absolute; right: 12px; bottom: 12px; background: rgba(20,18,15,.78); color: var(--cream); font: 600 11px "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-cat { color: var(--ink-3); margin: 0; display: flex; justify-content: space-between; gap: 8px; }
.card-type { color: var(--muted); }
.card-title { font-size: 23px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--orange-ink); }
.card-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.card-facts li + li::before { content: "·"; color: var(--muted); margin-right: 12px; }
.card-stock { color: var(--ink-3); }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.card-price { font-size: 24px; font-weight: 700; color: var(--ink); }
.card-foot .link-more { white-space: nowrap; }
.grid-inv { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
@media (min-width: 1200px) { .grid-inv { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 420px) { .grid, .grid-inv { grid-template-columns: 1fr; } .card-title { font-size: 24px; } }
.link-more { font-weight: 600; font-size: 14px; }

/* inventory */
.page-head { background: var(--coal); color: var(--cream); padding: 40px 0 34px; }
.page-head h1 { font-size: clamp(36px, 5vw, 64px); }
.page-head .label { color: var(--accent-on-coal); display: block; margin-bottom: 8px; }
.page-head p { color: var(--cream-2); margin: 10px 0 0; max-width: 60ch; }
.inv-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 32px 0 56px; }
.filters { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.filters .field span { font-size: 12px; }
.filters .btn { justify-content: center; }
.filters .reset { font-size: 13px; text-align: center; }
.inv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.inv-toolbar .mono { color: var(--ink-2); font-size: 14px; }
.inv-toolbar select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.chip.is-active { background: var(--coal); color: var(--cream); border-color: var(--coal); }
.chips-more { flex-basis: 100%; }
.chips-more summary { display: inline-block; cursor: pointer; list-style: none; color: var(--ink-2); }
.chips-more summary::-webkit-details-marker { display: none; }
.chips-more[open] summary { background: var(--line-2); }
.filters-btn { display: none; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.pager .is-active { background: var(--coal); color: var(--cream); border-color: var(--coal); }
.empty { background: var(--paper); border: 1px dashed var(--line); padding: 40px; text-align: center; border-radius: var(--radius); color: var(--ink-2); }
@media (max-width: 860px) {
  .inv-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .filters { position: static; display: none; }
  .filters-btn { display: inline-flex; justify-self: start; }
  .filters-toggle:checked ~ .filters { display: flex; }
  .filters-toggle:checked ~ .filters-btn { background: var(--coal); color: var(--cream); border-color: var(--coal); }
}

/* unit */
.unit-head { padding: 28px 0 18px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a { color: var(--ink-2); }
.unit-head h1 { font-size: clamp(32px, 4.5vw, 56px); }
.unit-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 14px; margin-top: 10px; }
.unit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; padding-bottom: 56px; align-items: start; }
/* gallery: hero + arrows + counter + horizontal thumb strip; video items swap the hero for a <video>/YouTube embed */
.gallery { position: relative; }
.gallery-main { position: relative; background: var(--coal); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery-stage { position: absolute; inset: 0; touch-action: pan-y; }
.gallery-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.gallery-stage > [hidden] { display: none; }
.gallery-stage img { object-fit: contain; }
.gallery-stage video { object-fit: contain; background: #000; }
.gallery-yt iframe { width: 100%; height: 100%; border: 0; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(20,18,15,.62); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: .85; transition: opacity .15s ease, background .15s ease; }
.gallery-prev { left: 12px; } .gallery-next { right: 12px; }
.gallery-nav:hover { opacity: 1; background: var(--orange); color: var(--on-primary); }
.gallery-nav:focus-visible, .gallery-expand:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; opacity: 1; }
.gallery-main.is-video .gallery-nav { top: auto; bottom: 62px; transform: none; }   /* clear the native video controls */
.gallery-expand { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(20,18,15,.62); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.gallery-expand:hover { background: var(--orange); color: var(--on-primary); }
.gallery-counter { position: absolute; left: 12px; bottom: 12px; background: rgba(20,18,15,.72); color: var(--cream); font-size: 12px; padding: 5px 9px; border-radius: 4px; letter-spacing: .04em; }
.gallery-main.is-video .gallery-expand, .gallery-main.is-video .gallery-counter { display: none; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.gallery-thumbs button { position: relative; flex: 0 0 104px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--line-2); cursor: pointer; scroll-snap-align: center; opacity: .78; transition: opacity .15s ease, border-color .15s ease; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.is-active { border-color: var(--orange); opacity: 1; }
.gallery-thumbs button:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumb-video img { filter: brightness(.6); }
.play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; background: var(--orange); color: var(--on-primary); font: 700 10px "JetBrains Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; white-space: nowrap; }
.video-embed { margin-top: 18px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--coal); }
.video-embed iframe { width: 100%; height: 100%; border: 0; }

/* lightbox: full-screen dark viewer; images load only on open */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,9,7,.96); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; touch-action: pan-y; }
.lightbox-stage img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .25s ease; }
.lightbox-stage.is-zoomed { cursor: zoom-out; }
.lightbox-stage.is-zoomed img { transform: scale(2.2); }
.lightbox-close, .lightbox-nav { position: absolute; z-index: 2; border: 0; border-radius: 50%; background: rgba(241,236,227,.12); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox-close { top: 14px; right: 14px; width: 48px; height: 48px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox-prev { left: 14px; } .lightbox-next { right: 14px; }
.lightbox-close:hover, .lightbox-nav:hover { background: var(--orange); color: var(--on-primary); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.lightbox-counter { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); z-index: 2; color: var(--cream); font-size: 13px; letter-spacing: .06em; }
.lightbox-hint { position: absolute; bottom: 14px; left: 0; right: 0; z-index: 2; margin: 0; text-align: center; color: var(--muted); font-size: 12px; pointer-events: none; }
html.lb-open, html.lb-open body { overflow: hidden; }
@media (max-width: 640px) { .lightbox-nav { width: 44px; height: 44px; top: auto; bottom: 44px; transform: none; } .lightbox-hint { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .card, .card-media .card-img, .gallery-nav, .gallery-thumbs button, .lightbox-stage img { transition: none !important; }
  .card:hover { transform: none; }
  .card:not(.has-alt):hover .card-img { transform: none; }
  .gallery-thumbs { scroll-behavior: auto; }
}
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 26px; margin-bottom: 14px; }
.price-block .mono { font-size: 34px; font-weight: 600; display: block; }
.price-block small { color: var(--ink-3); font-size: 13px; }
.cta-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.cta-stack .btn { justify-content: center; }
.cta-sub { text-align: center; font-size: 13px; color: var(--ink-3); }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table th, .specs-table td { text-align: left; padding: 8px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs-table th { color: var(--ink-2); font-weight: 500; width: 45%; }
.specs-table td { font-weight: 600; }
.desc { white-space: pre-line; font-size: 15px; }
.desc-panel { margin-top: 22px; }
.estimator { display: grid; gap: 12px; }
.estimator output { display: block; font-size: 30px; font-weight: 600; }
.estimator .field-row { gap: 10px; }
.est-note { font-size: 12px; color: var(--ink-3); margin: 0; }
.ask-panel { background: var(--coal); color: var(--cream); border-color: var(--coal-line); padding: 0; overflow: hidden; }
.ask-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.ask-head h2 { color: var(--cream); margin: 0; font-size: 22px; }
.ask-stock { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ask-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 14px 20px 0; padding: 4px; background: var(--coal-2); border: 1px solid var(--coal-line); border-radius: 8px; }
.ask-tabs [role=tab] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--cream-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ask-tabs [role=tab][aria-selected=true] { background: var(--orange); color: var(--on-primary); }
.ask-tabs [role=tab]:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.ask-pane { padding: 16px 20px 20px; }
.ask-pane[hidden] { display: none; }
.ask-form-intro { margin: 0 0 14px; color: var(--cream-2); font-size: 14px; }
.ask-panel .field span { color: var(--cream-2); }
.ask-panel .field input, .ask-panel .field textarea { background: var(--paper); border-color: var(--coal-line); }
.ask-panel .form-note { color: var(--muted); }
.ask-panel .lead-form .btn { align-self: stretch; justify-content: center; }
.ask-panel .lead-form textarea { min-height: 72px; }
.ask-panel .form-sent { background: var(--coal-2); color: var(--cream); border: 1px solid var(--coal-line); }
.ask-panel .form-sent a { color: var(--orange); }
@media (max-width: 960px) {
  /* Phone order: photo → price/CTAs → thumbnails → video → description → specs → Ask → estimator.
     The two columns dissolve (display: contents) so their children share one flow and can be re-ordered. */
  .unit-layout { grid-template-columns: 1fr; gap: 18px; }
  .unit-layout > div, .unit-layout > aside { display: contents; }
  .unit-layout .panel { margin: 0; }
  .gallery { order: 1; display: contents; } .gallery-main { order: 1; } .price-block { order: 2; } .gallery-thumbs { order: 3; margin-top: 0; } .video-embed { order: 4; }
  .desc-panel { order: 5; } .specs-panel { order: 6; } .ask-panel { order: 7; } .estimator-panel { order: 8; }
  .gallery-main { border-radius: 0; margin: 0 -20px; }
  .gallery-thumbs { padding: 2px 0 8px; }
  .gallery-thumbs button { flex-basis: 84px; }
  .gallery-nav { width: 40px; height: 40px; }
}

/* forms */
.lead-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; flex: 1 1 0; min-width: 0; }
.field span { color: var(--ink-2); font-weight: 500; }
.field input, .field textarea, .field select { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.field-row { display: flex; gap: 14px; }
@media (max-width: 520px) { .field-row { flex-direction: column; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 12px; color: var(--ink-3); margin: 0; }
.field-error:empty { display: none; }
.field-error { color: #8A2B0E; font-size: 13px; margin-top: 4px; }
.input-validation-error { border-color: #8A2B0E; }
.form-error { background: #FBE9E4; color: #8A2B0E; padding: 10px 12px; border-radius: var(--radius); margin: 0; }
.form-sent { background: var(--tint); padding: 18px; border-radius: var(--radius); }
.lead-form .btn { align-self: flex-start; }

/* static pages */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 40px 0 56px; align-items: start; }
.two-col h2 { font-size: 30px; margin-bottom: 12px; }
.two-col ul { padding-left: 18px; color: var(--ink-2); }
.two-col li { margin-bottom: 6px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 14px; }
.info-list div { border-left: 3px solid var(--orange); padding-left: 12px; }
.info-list .label { color: var(--ink-3); }
.map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); }

/* portal */
.portal-main { width: 100%; padding: 28px 20px 60px; }   /* auto margins (.wrap) disable flex stretch - without this the column shrink-to-fits to its widest table */
.portal-warn { background: var(--tint); color: #8A3A0A; border: 1px solid #E8C7AE; border-left: 4px solid var(--orange); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.portal-warn a { color: #8A3A0A; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.portal-login { max-width: 420px; margin: 60px auto; }
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.portal-head h1 { font-size: clamp(30px, 4vw, 44px); }
.portal-head .form-note { max-width: 70ch; margin: 6px 0 0; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 960px) { .portal-grid { grid-template-columns: minmax(0, 1fr); } }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.portal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.portal-table th, .portal-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.portal-table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-family: "JetBrains Mono", Consolas, monospace; }
.portal-table .num { text-align: right; }
@media (max-width: 700px) {
  .portal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* unwrapped tables scroll in place on phones */
  .table-wrap .portal-table { display: table; }                                            /* the wrapper already scrolls */
}
.portal-table .thumb img { border-radius: 4px; object-fit: cover; display: block; }
.portal-table .msg { max-width: 36ch; white-space: pre-line; }
.portal-table.compact td { padding: 6px 8px; }
.inv-table .flags .pill { text-decoration: none; margin: 2px 4px 2px 0; }
.inv-table .vid { color: var(--orange-ink); font-size: 12px; margin-left: 6px; }
@media (max-width: 760px) {
  /* Phone: each row becomes a card; cells label themselves from data-l. */
  .inv-table, .inv-table tbody, .inv-table tr, .inv-table td { display: block; }
  .inv-table thead { display: none; }
  .inv-table tr { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  .inv-table td { border: 0; padding: 4px 0; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; }
  .inv-table td[data-l]::before { content: attr(data-l); color: var(--ink-3); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-family: "JetBrains Mono", Consolas, monospace; flex: none; padding-top: 3px; }
  .inv-table td.thumb { display: none; }
  .inv-table td:empty { display: none; }
  .inv-table td.flags { justify-content: flex-end; flex-wrap: wrap; }
}
.pill { display: inline-block; font: 600 11px "JetBrains Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.pill.ok { background: #DCEFD8; color: #1F5E1B; }
.pill.warn { background: var(--tint); color: #8A3A0A; }
.pill.bad { background: #FBE9E4; color: #8A2B0E; }
.pill.dim { background: var(--line-2); color: var(--ink-3); }
.desc-editor { font: inherit; font-size: 15px; line-height: 1.55; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); resize: vertical; }
.source-text { background: var(--bg); padding: 12px; border-radius: var(--radius); font-size: 14px; color: var(--ink-2); max-height: 220px; overflow: hidden; position: relative; }
.source-text::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(transparent, var(--bg)); }
.source-toggle:checked ~ .source-text { max-height: none; }
.source-toggle:checked ~ .source-text::after { display: none; }
.source-more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--orange-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.source-more .less, .source-toggle:checked ~ .source-more .more { display: none; }
.source-toggle:checked ~ .source-more .less { display: inline; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb-row img { border-radius: 4px; object-fit: cover; }
.alert-signup { margin-top: 28px; }
button.link-more { background: none; border: 0; padding: 0; font: inherit; color: var(--orange-ink); cursor: pointer; font-weight: 600; }

/* fab + footer */
.ask-fab { position: fixed; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--coal); color: var(--cream); font-weight: 700; font-size: 15px; box-shadow: 0 10px 30px rgba(20,18,15,.35); border: 1px solid var(--coal-line); z-index: 40; }
.ask-fab:hover { color: var(--cream); border-color: var(--orange); }
.site-footer { background: var(--coal); color: var(--muted); padding: 56px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid > div { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-grid a { color: var(--cream); }
.footer-grid address { font-style: normal; color: var(--cream); }
.footer-brand { color: var(--cream); font-size: 28px; font-weight: 800; }
.footer-grid p { max-width: 32ch; margin: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--coal-line); margin-top: 36px; padding-top: 20px; font-size: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .ask-fab { bottom: 14px; right: 14px; width: 52px; padding: 0; justify-content: center; border-radius: 50%; } .ask-fab span { display: none; } }
@media (max-width: 960px) { .site-footer { padding-bottom: 96px; } }

/* Portal sync progress (fed by /portal/sync-status) */
.sync-progress { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.sync-progress[hidden] { display: none; }   /* an author display: beats the UA [hidden] rule — must be explicit */
.sync-bar { width: 240px; height: 10px; background: var(--cream-2); border: 1px solid var(--line); flex: none; }
.sync-fill { height: 100%; width: 0; background: var(--orange); transition: width .6s ease; }

/* Unit page: share / print actions */
.unit-actions { display: flex; gap: 8px; margin-top: 12px; }
.unit-actions .btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; }

/* Print: a clean spec sheet — photo, title, price, description, specs, dealer contact */
@media print {
  .site-header, .site-footer, .mobile-nav, .crumbs, .unit-actions, .gallery-thumbs, .video-embed, .gallery-nav, .gallery-expand, .gallery-counter, .lightbox,
  .ask-panel, .cta-stack, .no-print, .section, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .wrap { max-width: none; padding: 0; }
  .unit-layout { display: block; }
  .gallery-main { aspect-ratio: auto; background: none; } .gallery-stage { position: static; } .gallery-stage > * { position: static; }
  .gallery-main img { max-width: 480px; height: auto; } .gallery-stage video, .gallery-yt { display: none !important; }
  .panel, .price-block { border: none; box-shadow: none; padding: 0 0 14px; background: none; }
  a { color: inherit; text-decoration: none; }
}
.print-only { display: none; }
@media print { .print-only { display: block; font-size: 13px; } }

/* Portal settings tabs (server-rendered: /portal/settings/{tab}) */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 0 0 22px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; margin-bottom: -2px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-weight: 600; letter-spacing: .02em; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { color: var(--ink); border-bottom-color: var(--orange); }
.settings-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-grid .panel { margin: 0; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* Unit page: AI assistant chat */
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-log { min-height: 120px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--coal-2); border: 1px solid var(--coal-line); border-radius: 10px; scrollbar-width: thin; scrollbar-color: var(--coal-line) transparent; }
.chat-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg.bot { background: var(--paper); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--orange); color: var(--on-primary); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.note { background: transparent; color: var(--muted); font-size: 13px; padding: 2px 4px; align-self: center; text-align: center; max-width: 100%; }
.chat-msg.typing { opacity: .6; }
.chat-starters { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-starters button { border: 1px solid var(--coal-line); background: transparent; color: var(--cream-2); font: inherit; font-size: 13px; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.chat-starters button:hover { border-color: var(--orange); color: var(--cream); }
.chat-form { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 14px; background: var(--paper); border: 1px solid var(--coal-line); border-radius: 999px; }
.chat-form:focus-within { outline: 2px solid var(--orange); outline-offset: 1px; }
.chat-form input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; padding: 8px 0; }
.chat-form input:focus { outline: none; }
.chat-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-send:hover { background: #F07328; }
.chat-send:disabled { opacity: .5; cursor: default; }
.chat-foot { margin: 0; font-size: 12px; color: var(--muted); }
.chat-foot a { color: var(--cream-2); white-space: nowrap; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--orange); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.chat-ended .chat-form, .chat-ended .chat-starters { display: none; }
@media (max-width: 960px) { .chat-log { max-height: min(52vh, 420px); } .chat-msg { font-size: 15px; } .chat-form input { font-size: 16px; } }

/* Portal: VIN check + transcripts */
.vin-findings { margin: 8px 0 12px; padding-left: 18px; font-size: 14px; }
.vin-findings li.mismatch { color: var(--orange-ink); font-weight: 600; }
.vin-findings li.note { color: var(--ink-2); }
.vin-decode th { width: 34%; color: var(--ink-3); font-weight: 600; }
.transcript { margin-top: 8px; max-width: 520px; }
.transcript p { margin: 0 0 8px; font-size: 13px; }
.transcript p.assistant { color: var(--ink-2); }

/* Portal: leads workspace */
.tab-count { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font: 600 11px "JetBrains Mono", Consolas, monospace; text-align: center; }
.tabs a.is-active .tab-count { background: var(--orange); color: var(--on-primary); }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; min-width: 0; }
.lead-list { display: flex; flex-direction: column; gap: 8px; }
.lead-row { display: flex; gap: 16px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid transparent; border-radius: var(--radius); padding: 14px 16px; }
.lead-row.is-new { border-left-color: var(--orange); }
.lead-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lead-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.is-new .lead-name { color: var(--ink); }
.lead-age { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.lead-contact { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.lead-contact a { font-weight: 600; }
.lead-contact .lead-unit { font-weight: 500; color: var(--ink-2); }
.lead-msg { margin: 0; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.lead-note { margin: 0; font-size: 13px; color: var(--ink-3); }
.lead-note b { color: var(--ink-2); font-weight: 600; }
.lead-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.lead-actions form { margin: 0; }
.lead-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.lead-message { white-space: pre-line; font-size: 15px; background: var(--bg); padding: 12px 14px; border-radius: var(--radius); }
.status-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.status-steps form { margin: 0; }
.status-step { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font: inherit; text-align: left; cursor: pointer; color: var(--ink-2); }
.status-step b { color: var(--ink); font-size: 14px; }
.status-step span { font-size: 11px; line-height: 1.3; }
.status-step:hover { border-color: var(--ink-3); }
.status-step.is-current { background: var(--coal); border-color: var(--coal); color: var(--cream-2); }
.status-step.is-current b { color: var(--cream); }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.note-form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); width: 100%; resize: vertical; }
.note-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.note-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.tl-meta { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.tl-text { font-size: 14px; white-space: pre-line; }
.sub { font-size: 15px; margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.convo { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bg); border-radius: var(--radius); max-height: 460px; overflow-y: auto; }
.convo-full { max-height: none; padding: 20px; }
.convo-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.convo-msg.assistant { background: var(--paper); border: 1px solid var(--line-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.convo-msg.user { background: var(--coal); color: var(--cream); align-self: flex-end; border-bottom-right-radius: 4px; }
.convo-who { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 3px; }
.convo-panel { padding: 0; overflow: hidden; }
@media (max-width: 700px) { .lead-row { flex-direction: column; } .lead-actions { width: 100%; } .lead-actions .btn { flex: 1; justify-content: center; } .status-steps { grid-template-columns: 1fr 1fr; } .convo-msg { max-width: 95%; } }

/* Portal: sync history */
.sync-row .lead-name { font-size: 16px; }
.sync-changes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sync-changes li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.sync-diffs { color: var(--ink-2); font-size: 13px; }

/* Bill of sale (Sales Desk phase A) */
.bos-disc tr.is-open td { background: var(--tint); }
.bos-disc label { cursor: pointer; }
.bos-ledger tr.sub td { background: var(--line-2); font-weight: 600; }
.bos-ledger tr.tot td { background: var(--ink); color: var(--paper); font-weight: 600; }
.bos-form .field input.mono { font-family: "JetBrains Mono", Consolas, monospace; }
.bos-form [hidden] { display: none !important; }

/* Sales Desk (phase B) */
/* Deals board: layout shell + JS state styles; the card/column skin is Tailwind (wwwroot/css/board.css, tools/build-css.cmd). */
.board { display: grid; grid-template-columns: repeat(6, minmax(216px, 1fr)); gap: 12px; overflow-x: auto; align-items: stretch; padding-bottom: 6px; }
.board-card.dragging { opacity: .45; cursor: grabbing; }
.board-drop.is-over { outline: 2px dashed var(--orange); outline-offset: -5px; background: var(--tint); }
.board-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--coal); color: var(--cream); padding: 12px 18px; border-radius: 8px; font-size: 13.5px; max-width: min(90vw, 560px); box-shadow: 0 6px 24px rgba(20, 18, 15, .35); z-index: 60; }
.board-toast.is-error { background: #5A1F10; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(6, 236px); } }
@media (min-width: 1140px) { body:not(.portal) .board { margin-left: calc(50% - 50vw + 16px); margin-right: calc(50% - 50vw + 16px); } }   /* full-bleed on the public site only; the portal's main sits beside a sidebar, so 50vw is not its centre (portal.css widens the page instead) */
.badge-pending { position: absolute; left: 12px; top: 12px; background: #9A7440; color: #fff; font: 600 11px "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; }
.pill-pending { display: block; margin-top: 6px; font-size: 13px; color: #6E5128; background: #FBF4E6; border: 1px solid #E8C7AE; border-radius: 4px; padding: 6px 8px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }

/* ---- Today screen (rows/cards inside are Tailwind utilities in board.css) ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Deal page: the Next step + money rail stays in view while the tabs scroll ---- */
@media (min-width: 961px) { .deal-aside { position: sticky; top: 14px; } }

/* ---- Public unit page: persistent Call / Ask bar on phones ---- */
.unit-stickybar { display: none; }
@media (max-width: 960px) {
  .unit-stickybar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(20, 18, 15, .12); }
  .unit-stickybar .btn { flex: 1; justify-content: center; white-space: nowrap; }
}

/* ---- Today screen pulse charts (server-rendered bars; skin is Tailwind utilities in board.css) ---- */
.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.chart-grid .panel { margin-bottom: 0; }
@media (max-width: 1100px) { .chart-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Public inventory cards: fresh-arrival badge (mirror of .badge-pending) ---- */
.badge-new { position: absolute; left: 12px; top: 12px; background: #2F6B2A; color: #fff; font: 600 11px "JetBrains Mono", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; }

/* ---- Bill of sale: signing hub (2026-08-31 UX pass) ---------------------------------------- */
.bos-steps { list-style: none; display: flex; align-items: flex-start; gap: 0; margin: 0 0 18px; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.bos-steps li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-3); }
.bos-steps li + li::before { content: ""; width: 30px; height: 2px; background: var(--line-2); margin: 8px 12px 0; flex: 0 0 auto; }
.bos-steps .bs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: 0 0 auto; margin-top: 4px; }
.bos-steps li.done { color: var(--ink-2); }
.bos-steps li.done .bs-dot { background: #2E7D32; }
.bos-steps li.done + li::before { background: #A5C9A1; }
.bos-steps li.now { color: var(--ink); font-weight: 700; }
.bos-steps li.now .bs-dot { background: var(--orange); box-shadow: 0 0 0 4px var(--tint); }
.bos-steps b { display: block; font-weight: inherit; line-height: 1.2; }
.bos-steps small { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sign-state { border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 16px 18px; background: var(--tint); display: flex; flex-direction: column; gap: 10px; }
.sign-state.ok { border-left-color: #2E7D32; background: #EEF6EC; }
.sign-state.bad { border-left-color: #B3401B; background: #FBE9E4; }
.sign-state h3 { font-size: 16px; margin: 0; color: var(--ink); }
.sign-state p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.sign-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.disclose { border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; background: var(--paper); }
.disclose summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 10px; }
.disclose summary::-webkit-details-marker { display: none; }
.disclose summary::before { content: "+"; font-weight: 700; color: var(--ink-3); width: 12px; }
.disclose[open] summary::before { content: "\2013"; }
.disclose .disclose-body { padding: 2px 16px 16px; }
.disclose.danger { border-color: #EBC0B0; }
.disclose.danger summary { color: #8A2B0E; }
.disclose.danger summary::before { color: #8A2B0E; }
.env-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.env-row:last-child { border-bottom: 0; }
.env-row .when { color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.env-row .err { color: #8A2B0E; }
.timeline .t-when { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline .t-what { font-size: 14px; color: var(--ink); }
.timeline .t-extra { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 700px) { .bos-steps li + li::before { width: 14px; margin: 0 8px; } }

/* Phone chat takeover: while chatting, the ask panel goes full-screen so the on-screen keyboard never covers the
   conversation. site.js sizes it to the visual viewport (--vvh/--vvt) because iOS keyboards overlay the page rather
   than resizing it; on Android the viewport meta's interactive-widget=resizes-content does the same job natively. */
.ask-close { display: none; }
@media (max-width: 960px) {
  html.chat-takeover, html.chat-takeover body { overflow: hidden; }
  html.chat-takeover .unit-stickybar, html.chat-takeover .ask-fab { display: none; }
  .ask-panel.ask-overlay { position: fixed; inset: 0 0 auto 0; z-index: 60; margin: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; height: var(--vvh, 100dvh); transform: translateY(var(--vvt, 0px)); overflow: hidden; }
  .ask-panel.ask-overlay .ask-head { align-items: center; gap: 10px; padding-top: max(14px, env(safe-area-inset-top)); }
  .ask-panel.ask-overlay .ask-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--coal-line); border-radius: 8px; background: transparent; color: var(--cream); font-size: 17px; line-height: 1; cursor: pointer; }
  .ask-panel.ask-overlay .ask-pane { flex: 1; min-height: 0; overflow-y: auto; }
  .ask-panel.ask-overlay .ask-pane[data-ask-pane=chat] { display: flex; overflow: hidden; padding-bottom: 12px; }
  .ask-panel.ask-overlay .ask-pane[data-ask-pane=chat][hidden] { display: none; }
  .ask-panel.ask-overlay .chat { flex: 1; min-height: 0; }
  .ask-panel.ask-overlay .chat-log { flex: 1; min-height: 0; max-height: none; }
}

/* ------------------------------------------------------------------------------------------------------------------
   Dealer website templates (migration 036, Core/Platform/SiteTemplates.cs). Everything above this line is the CLASSIC
   template; the layout puts data-template / data-tone / data-font on <html> and the dealer's colours on :root.
   Rules here must not set a variable SiteTemplates.Resolve emits (html[data-template] out-ranks the inline :root block).
   ------------------------------------------------------------------------------------------------------------------ */

/* About + highlights (home page, every template) */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.about-grid.about-single { grid-template-columns: 1fr; }
.about-grid .label { color: var(--ink-3); display: block; margin-bottom: 8px; }
.about-text h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.about-text p { color: var(--ink-2); max-width: 68ch; }
.about-text p:last-child { margin-bottom: 0; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.about-single .highlights { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.highlights li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.35; }
.highlight-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; padding: 24px; gap: 26px; } }

/* Heading fonts that are not condensed need smaller sizes than Barlow Condensed's. */
html[data-font="inter"] .hero h1, html[data-font="system"] .hero h1, html[data-font="playfair"] .hero h1 { font-size: clamp(38px, 5vw, 66px); }
html[data-font="inter"] .section-head h2, html[data-font="system"] .section-head h2, html[data-font="playfair"] .section-head h2 { font-size: clamp(26px, 3vw, 36px); }
html[data-font="inter"] .page-head h1, html[data-font="system"] .page-head h1, html[data-font="playfair"] .page-head h1 { font-size: clamp(30px, 4vw, 48px); }
html[data-font="inter"] .unit-head h1, html[data-font="system"] .unit-head h1, html[data-font="playfair"] .unit-head h1 { font-size: clamp(27px, 3.4vw, 42px); }
html[data-font="inter"] .card-title, html[data-font="system"] .card-title, html[data-font="playfair"] .card-title { font-size: 18px; line-height: 1.25; }
html[data-font="inter"] .type-tile .display, html[data-font="system"] .type-tile .display, html[data-font="playfair"] .type-tile .display { font-size: 23px; }
html[data-font="inter"] .promise h3, html[data-font="system"] .promise h3, html[data-font="playfair"] .promise h3 { font-size: 18px; line-height: 1.25; }
html[data-font="inter"] .brand-name, html[data-font="system"] .brand-name, html[data-font="playfair"] .brand-name { font-size: 19px; }
html[data-font="inter"] .footer-brand, html[data-font="system"] .footer-brand, html[data-font="playfair"] .footer-brand { font-size: 22px; }
html[data-font="inter"] .about-text h2, html[data-font="system"] .about-text h2, html[data-font="playfair"] .about-text h2 { font-size: clamp(24px, 2.8vw, 32px); }
html[data-font="inter"] h1.display, html[data-font="inter"] h2.display, html[data-font="inter"] h3.display,
html[data-font="system"] h1.display, html[data-font="system"] h2.display, html[data-font="system"] h3.display,
html[data-font="playfair"] h1.display, html[data-font="playfair"] h2.display, html[data-font="playfair"] h3.display { max-width: 100%; overflow-wrap: anywhere; }
html[data-font="oswald"] .hero h1 { font-size: clamp(44px, 6vw, 80px); }
html[data-font="oswald"] .card-title { font-size: 20px; line-height: 1.15; }
html[data-font="oswald"] .unit-head h1 { font-size: clamp(30px, 4vw, 48px); }
html[data-font="oswald"] .brand-name { font-size: 20px; }
html[data-font="oswald"] .type-tile .display { font-size: 26px; }
html[data-font="oswald"] .promise h3 { font-size: 19px; line-height: 1.15; }

/* Dark tone (any template): the few places that assumed a light page. */
html[data-tone="dark"] { color-scheme: dark; }
html[data-tone="dark"] .btn-dark { background: var(--ink); color: var(--bg); }
html[data-tone="dark"] .btn-dark:hover { background: var(--cream-2); color: var(--bg); }
html[data-tone="dark"] .card:hover { border-color: var(--orange); box-shadow: 0 10px 28px rgba(0,0,0,.5); }
html[data-tone="dark"] .site-header, html[data-tone="dark"] .site-footer, html[data-tone="dark"] .page-head { background: var(--coal); }
html[data-tone="dark"] .page-head { border-bottom: 1px solid var(--line); }
html[data-tone="dark"] .site-footer { border-top: 1px solid var(--line); }
html[data-tone="dark"] .type-tile, html[data-tone="dark"] .ask-panel { background: var(--paper); border-color: var(--line); }
html[data-tone="dark"] .search-bar { border: 1px solid var(--line); }
html[data-tone="dark"] select option { background: var(--paper); color: var(--ink); }
html[data-tone="dark"] .card-media { background: #000; }

/* ---------- SHOWROOM: clean, light, big photos ---------- */
html[data-template="showroom"] { --radius: 12px; }
html[data-template="showroom"] body { font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif; letter-spacing: -.005em; }
html[data-template="showroom"] .label { font-family: inherit; font-weight: 600; letter-spacing: .1em; }
html[data-template="showroom"] .site-header { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 6px 20px rgba(15,23,42,.04); }
html[data-template="showroom"] .brand, html[data-template="showroom"] .nav a, html[data-template="showroom"] .nav a:hover, html[data-template="showroom"] .nav a.is-active { color: var(--ink); }
html[data-template="showroom"] .brand-sub { color: var(--ink-3); }
html[data-template="showroom"] .nav .count { background: var(--tint); color: var(--orange-dark); }
html[data-template="showroom"] .nav-toggle { color: var(--ink); border-color: var(--line); }
html[data-template="showroom"] .mobile-nav { border-top-color: var(--line); }
html[data-template="showroom"] .mobile-nav a { color: var(--ink); border-bottom-color: var(--line-2); }
html[data-template="showroom"] .mobile-nav a.btn { color: var(--on-primary); }
/* hero: the photo fills the band, the copy sits on it */
html[data-template="showroom"] .hero { display: block; min-height: 640px; }
html[data-template="showroom"] .hero-media { position: absolute; inset: 0; min-height: 0; }
html[data-template="showroom"] .hero-media::after { background: linear-gradient(90deg, color-mix(in srgb, var(--coal) 92%, transparent) 0%, color-mix(in srgb, var(--coal) 72%, transparent) 42%, color-mix(in srgb, var(--coal) 12%, transparent) 78%); }
html[data-template="showroom"] .hero-copy { position: relative; z-index: 1; max-width: 900px; min-height: 640px; padding-top: 88px; padding-bottom: 88px; }
html[data-template="showroom"] .hero-no-media, html[data-template="showroom"] .hero-no-media .hero-copy { min-height: 460px; }
html[data-template="showroom"] .search-bar { border-radius: 999px; padding-left: 10px; }
html[data-template="showroom"] .search-bar .btn { border-radius: 999px; margin: 6px; padding: 0 26px; }
html[data-template="showroom"] .type-tile { background: var(--paper); color: var(--ink); border-color: var(--line); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
html[data-template="showroom"] .type-tile:hover { color: var(--ink); border-color: var(--orange); }
html[data-template="showroom"] .type-tile .mono { color: var(--ink-3); font-family: inherit; }
html[data-template="showroom"] .card { border-color: transparent; border-radius: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 10px 30px rgba(15,23,42,.07); }
html[data-template="showroom"] .card:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(15,23,42,.08), 0 18px 44px rgba(15,23,42,.14); }
html[data-template="showroom"] .card-media { aspect-ratio: 3 / 2; }
html[data-template="showroom"] .card-body { padding: 16px 18px 18px; }
html[data-template="showroom"] .card-foot { border-top: 1px solid var(--line-2); }
html[data-template="showroom"] .card-price { font-family: inherit; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
html[data-template="showroom"] .grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 26px; }
html[data-template="showroom"] .promise div, html[data-template="showroom"] .about-grid, html[data-template="showroom"] .filters { border-color: transparent; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05); }
html[data-template="showroom"] .page-head { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
html[data-template="showroom"] .page-head p { color: var(--ink-2); }
html[data-template="showroom"] .page-head .label { color: var(--orange-ink); }
@media (max-width: 860px) {
  html[data-template="showroom"] .hero-media { order: 0; }
  html[data-template="showroom"] .hero-media::after { background: color-mix(in srgb, var(--coal) 78%, transparent); }
  html[data-template="showroom"] .hero-copy { min-height: 0; padding: 56px 20px; }
  html[data-template="showroom"] .search-bar { border-radius: var(--radius); padding-left: 0; }
  html[data-template="showroom"] .search-bar .btn { margin: 8px; padding: 14px; }
  html[data-template="showroom"] .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
html[data-template="showroom"][data-tone="dark"] .site-header { background: var(--coal); color: var(--cream); border-bottom-color: var(--line); }
html[data-template="showroom"][data-tone="dark"] .brand, html[data-template="showroom"][data-tone="dark"] .nav a { color: var(--cream); }
html[data-template="showroom"][data-tone="dark"] .page-head { background: var(--coal); color: var(--cream); }

/* ---------- YARD: dark, high-contrast, industrial ---------- */
html[data-template="yard"] { --radius: 0px; }
html[data-template="yard"] .site-header { border-top: 4px solid var(--orange); border-bottom: 1px solid var(--coal-line); }
html[data-template="yard"] .btn { text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
html[data-template="yard"] .hero { border-bottom: 0; }
html[data-template="yard"] .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 2; background: repeating-linear-gradient(-45deg, var(--orange) 0 16px, var(--coal) 16px 32px); }
html[data-template="yard"] .hero-copy { padding-bottom: 84px; }
html[data-template="yard"] .hero h1 { letter-spacing: .01em; }
html[data-template="yard"] .hero-media img { filter: contrast(1.06) saturate(.9); }
html[data-template="yard"] .section-head h2 { padding-left: 16px; border-left: 6px solid var(--orange); }
html[data-template="yard"] .section-head .label { padding-left: 22px; }
html[data-template="yard"] .type-tile { border: 1px solid var(--line); border-left: 6px solid var(--orange); }
html[data-template="yard"] .type-tile:hover { background: var(--coal-2); }
html[data-template="yard"] .card { border-width: 1px; border-color: var(--line); }
html[data-template="yard"] .card-price { color: var(--accent-on-coal); }
html[data-template="yard"] .card-foot { border-top-style: solid; }
html[data-template="yard"] .promise div, html[data-template="yard"] .about-grid { border-top: 4px solid var(--orange); }
html[data-template="yard"] .highlight-mark { border-radius: 0; }
html[data-template="yard"] .chip-photos, html[data-template="yard"] .chip-video, html[data-template="yard"] .badge-new, html[data-template="yard"] .badge-pending { border-radius: 0; }
html[data-template="yard"] .page-head { border-bottom: 4px solid var(--orange); }
html[data-template="yard"] .ask-fab { border-radius: 0; }
html[data-template="yard"][data-tone="light"] .card-price { color: var(--ink); }

/* ---------- BOUTIQUE: warm, serif, centred ---------- */
html[data-template="boutique"] { --radius: 10px; }
html[data-template="boutique"] .label { font-family: inherit; font-weight: 600; letter-spacing: .16em; font-size: 11.5px; }
html[data-template="boutique"] .hero { grid-template-columns: 1fr; min-height: 0; background: var(--bg); color: var(--ink); text-align: center; padding-bottom: 8px; }
html[data-template="boutique"] .hero-copy { align-items: center; padding: 76px 20px 44px; max-width: 920px; margin: 0 auto; }
html[data-template="boutique"] .hero h1 span { color: var(--orange-ink); font-style: italic; }
html[data-template="boutique"] .hero p { color: var(--ink-2); max-width: 58ch; }
html[data-template="boutique"] .hero .accent { color: var(--orange-ink); }
html[data-template="boutique"] .hero-facts { color: var(--ink-2); justify-content: center; }
html[data-template="boutique"] .hero-facts span::before { color: var(--orange-ink); }
html[data-template="boutique"] .search-bar { width: 100%; text-align: left; box-shadow: 0 12px 34px rgba(60,40,20,.12); border: 1px solid var(--line); }
html[data-template="boutique"] .hero-media { order: 0; width: calc(100% - 40px); max-width: calc(var(--wrap) - 40px); margin: 0 auto; aspect-ratio: 21 / 9; min-height: 0; border-radius: 20px; overflow: hidden; }
html[data-template="boutique"] .hero-media::after { display: none; }
html[data-template="boutique"] .section-head { flex-direction: column; align-items: center; text-align: center; }
html[data-template="boutique"] .type-tile { background: var(--paper); color: var(--ink); border-color: var(--line); text-align: center; align-items: center; }
html[data-template="boutique"] .type-tile:hover { color: var(--ink); border-color: var(--orange); }
html[data-template="boutique"] .type-tile .mono { color: var(--ink-3); font-family: inherit; }
html[data-template="boutique"] .card { border-radius: 14px; }
html[data-template="boutique"] .card:hover { border-color: var(--orange); box-shadow: 0 12px 30px rgba(60,40,20,.12); }
html[data-template="boutique"] .card-price { font-family: var(--heading-font); font-size: 22px; }
html[data-template="boutique"] .card-foot { border-top-style: solid; border-top-color: var(--line-2); }
html[data-template="boutique"] .promise div { text-align: center; }
html[data-template="boutique"][data-tone="dark"] .hero { background: var(--bg); }
@media (max-width: 860px) {
  html[data-template="boutique"] .hero-copy { padding: 44px 20px 32px; }
  html[data-template="boutique"] .hero-media { aspect-ratio: 16 / 10; }
}
.section-tight { padding-top: 0; }
