/* Reconciliation layer — intentionally loaded AFTER page-specific styles.
   Never recolor semantically meaningful SOLD/WINNER/error statuses. */
:root {
  --ca-ui-font: 'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  --ca-heading-font: 'Bricolage Grotesque',var(--ca-ui-font);
  --ca-link: var(--brand-primary);
}
html,body {font-family:var(--ca-ui-font)!important;color:var(--ink, #181b20)}
button,input,select,textarea {font-family:var(--ca-ui-font)}
/* Restrict theme overrides to the component root, never set global text white. */
body .ca-footer,body footer.ca-footer {background:var(--brand-ink)!important;color:#f8fafc!important;border-top:4px solid var(--brand-primary)!important}
body .ca-footer .ca-footer-upper h2,body .ca-footer .ca-footer-columns h3,
body .ca-footer .ca-footer-assurances b {color:#fff!important}
body .ca-footer .ca-footer-upper p,body .ca-footer .ca-footer-brand p,
body .ca-footer .ca-footer-assurances small,body .ca-footer .ca-footer-columns h4,
body .ca-footer .ca-footer-columns a,body .ca-footer .ca-footer-contact,
body .ca-footer .ca-footer-hours {color:#e2e8f0!important}
body .ca-footer .ca-footer-columns a:hover,body .ca-footer .ca-footer-contact i {color:var(--brand-primary)!important}
body .ca-footer .ca-footer-status {background:#e4f8ed!important;color:#166534!important;font-weight:800!important;font-size:11px!important;line-height:1.6!important;letter-spacing:0!important;white-space:normal!important}
body .ca-footer .ca-footer-status.ca-offline {background:#f3f4f6!important;color:#374151!important}
body .ca-footer .ca-footer-status .ca-status-copy {color:inherit!important}
body .ca-footer .ca-footer-watermark{color:rgba(255,255,255,.07)!important}
body .ca-footer .ca-footer-copyright{background:var(--brand-hover)!important;border-top:1px solid rgba(255,255,255,.2)!important}
body .ca-footer .ca-footer-copyright a,body .ca-footer .ca-footer-copyright span {color:#fff!important}
body .ca-footer .ca-footer-buy,body .ca-footer .ca-footer-buy:hover {background:var(--brand-primary)!important;color:#fff!important;border-color:var(--brand-primary)!important}
body .ca-footer .ca-footer-track {color:#fff!important}
.ca-ref-faq,.ca-buyer-reviews,.about-reference,.ct-layout {font-family:var(--ca-ui-font)}
.ca-ref-faq h1,.ca-ref-faq h2,.about-reference h1,.about-reference h2,
.ca-buyer-reviews h2,.ca-listing-title,.ca-listing-heading {font-family:var(--ca-heading-font)}
.ca-ref-faq-intro h1 span,.ca-review-dot,.ca-faq-detail summary .ca-faq-toggle,
.ca-ref-tabs a.is-active,.about-tabs a.is-active {color:var(--brand-primary)!important}
.ca-ref-tabs a.is-active,.about-tabs a.is-active {border-bottom-color:var(--brand-primary)!important}
.ca-ref-faq-intro,.ca-faq-title-row,.about-lead{border-color:var(--brand-primary)!important}
.ca-faq-detail summary,.ca-faq-detail p,.ca-review-entry p {line-height:1.7}
.ca-faq-detail{border-color:#e5e7eb!important}
.ca-faq-detail[open]{border-left:3px solid var(--brand-primary)!important}
.ca-ref-faq,.ca-buyer-reviews,.about-reference{color:#181b20}
.ca-listing-description h2,.ca-listing-description h3 {color:var(--brand-ink)}
.ca-listing-highlights{font-weight:800!important;letter-spacing:0!important;word-spacing:normal!important}
.ca-purchase-panel .ca-buy-button,.ca-finance-apply a,
.fn-btn {background:var(--brand-primary)!important;color:#fff!important}
.ca-agent-status .ca-status-copy{font-size:11px!important;opacity:1!important;letter-spacing:0!important}
@media(max-width:640px){.ca-ref-faq,.about-reference{padding-left:15px;padding-right:15px}}
/* CTA backgrounds use each palette's contrast-tested dark variant; white text is
   readable for all 32 predefined palettes, including amber/coral/teal. */
body .btn-buy,body .btn-primary,body .ca-buy-button,body .ca-bid-submit,
body .ca-footer-buy,body .ca-finance-apply a,body .fn-btn,
body .ca-purchase-panel .ca-buy-button {
  background:var(--brand-hover)!important;
  border-color:var(--brand-hover)!important;
  color:#fff!important;
}
body .btn-buy:hover,body .btn-primary:hover,body .ca-buy-button:hover,
body .ca-bid-submit:hover,body .ca-finance-apply a:hover {filter:brightness(.94)}

/* Cross-page typography and responsive alignment; neutral across all 32 palettes. */
.ca-ref-faq,.ca-buyer-reviews,.about-reference,.ct-page,.fn-wrap,.pd-wrap {font-family:var(--ca-ui-font)!important}
.ca-ref-faq h1,.ca-ref-faq h2,.ca-buyer-reviews h1,.ca-buyer-reviews h2,
.about-reference h1,.about-reference h2,.ct-page h1,.ct-page h2,
.ca-listing-description h2,.ca-listing-description h3 {font-family:var(--ca-heading-font)!important}
.ca-footer .ca-footer-columns,.ca-footer .ca-footer-upper{position:relative;z-index:1}
.ca-footer .ca-footer-columns .ca-footer-status{opacity:1!important;visibility:visible!important;min-height:20px}
.ca-footer .ca-footer-columns .ca-footer-status *{opacity:1!important}
.ca-finance-simulator input[type=range]{cursor:pointer}
@media (max-width: 600px) {
  .ca-footer .ca-footer-columns{grid-template-columns:repeat(1,minmax(0,1fr))}
  #shipInputRow{display:flex;flex-wrap:wrap}
  #shipInputRow>div,#shipInputRow input{min-width:0;flex:1 1 100%}
  #shipInputRow button{flex:1 1 100%;width:100%}
  #shipResult>div{grid-template-columns:repeat(1,minmax(0,1fr))!important}
}


/* ═══════════ Theme continuity audit: 32 palettes on EVERY public view ═══════════
   This is presentation-only, scoped to real public components. Deliberately
   preserves SOLD, LIVE, warning, payment, validation and security semantics.
   Palette variables are provided centrally by includes/header.php. */
:root {
  --ca-action: var(--brand-hover, #C42B16);
  --ca-accent: var(--brand-primary, #E5321B);
  --ca-accent-soft: var(--brand-light, #FFF5F1);
  --ca-text: var(--brand-ink, #181b20);
}
/* One visual font hierarchy on Home, Auctions, Inventory, How It Works,
   About, FAQ, product, Contact, Financing and customer Dashboard. */
body :is(.ca-home,.inv-wrap,.pg-header,.auction-tabs,.c-hiw,
  .about-reference,.ca-ref-faq,.ca-buyer-reviews,.pd-wrap,.fn-wrap,
  .ct-page,.dash-wrap,.ca-footer) {
  font-family:var(--ca-ui-font)!important;
}
body :is(.ca-home,.inv-wrap,.pg-header,.c-hiw,.about-reference,
  .ca-ref-faq,.ca-buyer-reviews,.pd-wrap,.fn-wrap,.ct-page) :is(h1,h2,h3,h4) {
  font-family:var(--ca-heading-font)!important;
}
body .c-hiw :is(p,a,button,summary,label,small,span,strong,li),
body .auction-tabs a,body .inv-wrap :is(button,input,select,label,a),
body .ca-home :is(button,input,select,a),body .ca-footer :is(a,button,p,small) {
  font-family:var(--ca-ui-font)!important;
}
/* Exact same selected/hover appearance in the main navigation for all views. */
body #mainNav .nav-link.nav-active,
body #mainNav .nav-link:hover,
body .ca-detail-nav a:hover,
body .ca-ref-tabs a.is-active,
body .about-tabs a.is-active {
  color:var(--ca-action)!important;
  border-bottom-color:var(--ca-accent)!important;
}
body #mainNav {border-top-color:var(--ca-accent)!important}
/* Catalog and auction filters, category links and pagination. */
body .auction-tabs a.active,
body .auction-tabs a[aria-current='page'],
body .inv-wrap .pag-btn.pag-active,
body .inv-wrap .ff-lt-on {
  background:var(--ca-action)!important;
  border-color:var(--ca-action)!important;
  color:#fff!important;
}
body .inv-wrap .ff-chip.ff-on,
body .inv-wrap .ff-chip:hover,
body .inv-wrap .pag-btn.pag-num:hover,
body .inv-wrap .pag-btn.pag-nav:hover {
  border-color:var(--ca-accent)!important;
  color:var(--ca-action)!important;
}
body .inv-wrap .ff-chip.ff-on {
  background:var(--ca-accent-soft)!important;
}
body .inv-wrap .ff-fill,body .inv-wrap .ff-pulse,
body .inv-wrap .ff-thumb {background-color:var(--ca-accent)!important}
body .inv-wrap .ff-thumb {border-color:var(--ca-action)!important}
body .inv-wrap .ff-select:focus,
body .inv-wrap .inv-sort-select:focus {border-color:var(--ca-accent)!important}
body .inv-wrap .process-step:not(.done) b {
  background:var(--ca-accent-soft)!important;
  color:var(--ca-action)!important;
}
body .inv-wrap .process-cta,body .process-strip .process-cta {
  background:var(--ca-action)!important;
  color:#fff!important;
}
body .pg-header .pg-title {color:var(--ca-text)!important}
body .ca-category-tile:hover,body .ca-make-tile:hover,
body .ca-vehicle-card:hover {border-color:var(--ca-accent)!important}
/* Buttons with white labels must use dark contrast-checked palette tone. */
body :is(.ca-home-find button,.ca-home-search button,.ca-home-cta,
  .ca-home-process-bottom a:first-child,.ca-btn-red,.ca-btn-primary,
  .btn-buy,.btn-primary,.ca-purchase-panel .ca-buy-button,
  .ca-buy-button,.ca-bid-submit,.ca-footer-buy,.fn-btn),
body .ca-home .ca-home-hero button[type='submit'] {
  background:var(--ca-action)!important;
  border-color:var(--ca-action)!important;
  color:#fff!important;
}
/* How It Works reference page previously hard-coded Arial and red. */
body .c-hiw {color:var(--ca-text)!important}
body .c-hiw .c-hiw-hero {
  background:linear-gradient(120deg,var(--ca-accent-soft) 0%,#fff 78%)!important;
  border-bottom-color:var(--ca-accent)!important;
}
body .c-hiw .c-hiw-red,
body .c-hiw .c-hiw-side-link.is-active,
body .c-hiw .c-hiw-side-link.is-active span,
body .c-hiw .c-hiw-check:last-child .c-hiw-check-top span:first-child,
body .c-hiw .c-hiw-accordion details[open] summary>small {
  color:var(--ca-action)!important;
}
body .c-hiw .c-hiw-side-link.is-active {
  border-left-color:var(--ca-accent)!important;
}
body .c-hiw .c-hiw-reading-track span,
body .c-hiw .c-hiw-progress>span {background:var(--ca-accent)!important}
body .c-hiw .c-hiw-alert,
body .c-hiw .c-hiw-escrow-left blockquote {
  border-left-color:var(--ca-accent)!important;
}
body .c-hiw .c-hiw-escrow-left blockquote {
  background:var(--ca-accent-soft)!important;
  color:var(--ca-text)!important;
}
body .c-hiw .c-hiw-escrow-adv::before {color:var(--ca-action)!important}
body .c-hiw .c-hiw-btn-black,
body .c-hiw .c-hiw-ready .c-hiw-btn-black {
  background:var(--ca-action)!important;
  border-color:var(--ca-action)!important;
  color:#fff!important;
}
body .c-hiw .c-hiw-warranty-main {background:var(--brand-ink)!important;color:#fff!important}
body .c-hiw .c-hiw-side-link:focus-visible,
body .c-hiw .c-hiw-btn:focus-visible {outline:2px solid var(--ca-accent)!important;outline-offset:3px}
/* Theme-dependent typography and accents for FAQ, reviews and Finance. */
body .ca-faq-detail[open],body .ca-ref-faq-intro,
body .ca-faq-title-row {border-color:var(--ca-accent)!important}
body .ca-ref-tabs a.is-active,
body .about-tabs a.is-active {color:var(--ca-action)!important}
body .ca-listing-title,body .ca-listing-heading,
body .fn-wrap h1,body .fn-wrap h2 {color:var(--ca-text)!important}
body .ca-finance-simulator input[type='range'] {accent-color:var(--ca-accent)!important}
body .ca-support-launch {background:var(--brand-ink)!important;color:#fff!important}
body .ca-support-launch:hover {background:var(--ca-action)!important}
/* Status pills: maintain legibility in header/footer independently of theme. */
body .ca-footer .ca-footer-status,
body .ca-footer .ca-footer-status .ca-status-copy {
  color:#166534!important;
  background:#e4f8ed!important;
  opacity:1!important;
  visibility:visible!important;
}
body .ca-footer .ca-footer-status.ca-offline,
body .ca-footer .ca-footer-status.ca-offline .ca-status-copy {
  color:#374151!important;
  background:#f3f4f6!important;
}
@media(max-width:800px) {
  body .c-hiw .c-hiw-side-link.is-active {
    border-color:var(--ca-accent)!important;
  }
}
