/* German Heritage: color coverage for production modules beyond the approved
   public-page study. No dimensions, typography, positioning or layout changes. */
html[data-theme="oem"]{
  --control-border:#7c858f;
  --success:#23633e;--success-bg:#edf7f0;--success-line:#669676;
  --warning:#75530f;--warning-bg:#fff8e7;--warning-line:#aa883d;
  --danger:#9d302b;--danger-bg:#fff3f2;--danger-line:#b66560;
  --info:#315d8b;--info-bg:#f0f6fb;--info-line:#7095b8;
  --selected-bg:#f5e8e9;--selected-line:#b83237;
  --gold:#805f16;--gold-bg:#f8f1df;--gold-line:#aa883d;
}
html[data-theme="diehard"]{
  --control-border:#7c8996;
  --success:#9ee8bb;--success-bg:#192c22;--success-line:#527f63;
  --warning:#f1d28f;--warning-bg:#30291b;--warning-line:#8c743e;
  --danger:#ffaaa7;--danger-bg:#342021;--danger-line:#ae6666;
  --info:#acd0f3;--info-bg:#1c2b3a;--info-line:#6488ad;
  --selected-bg:#352529;--selected-line:#c3656a;
  --gold:#e7bd58;--gold-bg:#302a1c;--gold-line:#8c743e;
}
html[data-theme]{
  --ink:var(--text);--panel:var(--surface);--border:var(--line);
  --surface-soft:var(--surface-2);
}

/* Loading cards and retained informational page components. */
html[data-theme] .skeleton{background:var(--surface-2)}
html[data-theme] .skeleton::after{background:linear-gradient(90deg,transparent,var(--line-soft),transparent)}
html[data-theme] .hero-copy p{color:var(--muted)}
html[data-theme] .hero-brand::before{background:radial-gradient(circle,var(--selected-bg),var(--tint) 46%,transparent 71%)}
html[data-theme] .trust-strip{background:var(--surface-2);border-color:var(--line)}
html[data-theme] .trust-item{border-color:var(--line)}
html[data-theme] .trust-icon{background:var(--selected-bg);border-color:var(--selected-line);color:var(--accent)}
html[data-theme] .feature-visual{background:radial-gradient(circle at 50% 28%,var(--tint),transparent 38%),linear-gradient(145deg,var(--surface),var(--surface-2));border-color:var(--line)}
html[data-theme] .feature-list article{background:var(--surface);border-color:var(--line-soft)}
html[data-theme] .cta-band{background:radial-gradient(circle at 100% 0,var(--tint),transparent 34%),var(--surface);border-color:var(--selected-line)}
html[data-theme] .comment.reply{border-left-color:var(--selected-line)}

/* Inputs must remain identifiable against both light and dark surfaces. */
html[data-theme] :is(.field input,.field select,.field textarea,.filter-bar input,.filter-bar select,
  .bid-box input,.mail-search input,.money-input,.va-select-trigger,.va-select-search,
  .care-form input:not([type=checkbox]),.care-form textarea,.care-form select,.care-section-head select){
  background-color:var(--surface);color:var(--text);border-color:var(--control-border);
}
html[data-theme] :is(input,textarea)::placeholder{color:var(--placeholder)}
html[data-theme] :is(.field input,.field select,.field textarea,.filter-bar input,.filter-bar select,
  .bid-box input,.mail-search input,.va-select-search):focus,
html[data-theme] .money-input:focus-within,
html[data-theme] .va-select-trigger:focus-visible,
html[data-theme] .va-select.open .va-select-trigger{
  border-color:var(--accent);box-shadow:0 0 0 3px var(--selected-bg);
}
html[data-theme] :is(.field select:disabled,.va-select-trigger:disabled,.va-select.disabled .va-select-trigger){
  background-color:var(--surface-2);color:var(--muted);
}
html[data-theme] :is(.check-row input,.fulfillment-method input,.care-check input){accent-color:var(--button)}
html[data-theme] .va-select-value.placeholder{color:var(--placeholder)}
html[data-theme] :is(.va-select-chevron,.va-combobox-chevron>span){border-color:var(--muted)}
html[data-theme] .va-combobox-chevron{color:var(--muted)}
html[data-theme] .va-combobox-chevron:hover{background:var(--surface-2)}
html[data-theme] .va-select-trigger:hover:not(:disabled){border-color:var(--muted)}
html[data-theme] .va-select-menu{background:var(--surface);color:var(--text);border-color:var(--control-border)}
html[data-theme] .va-select-search-wrap{background:var(--surface-2);border-color:var(--line)}
html[data-theme] .va-select-option{color:var(--text)}
html[data-theme] :is(.va-select-option:hover,.va-select-option.active){background:var(--surface-2)}
html[data-theme] :is(.va-select-option.selected,.va-select-option.selected.active){background:var(--selected-bg);color:var(--text)}
html[data-theme] .va-select-check{color:var(--accent)}
html[data-theme] .va-select-empty{color:var(--muted)}
html[data-theme] .va-select-options{scrollbar-color:var(--control-border) var(--surface)}
html[data-theme] .va-select-options::-webkit-scrollbar-thumb{background:var(--control-border);border-color:var(--surface)}
html[data-theme] .va-select-options::-webkit-scrollbar-thumb:hover{background:var(--muted)}
/* The source combobox and validation rules already use important colors. */
html[data-theme] .va-combobox.open>input{border-color:var(--accent)!important;box-shadow:0 0 0 3px var(--selected-bg)!important}
html[data-theme] :is(.field.invalid input,.field.invalid select,.field.invalid textarea,
  .field.invalid .money-input,.field.invalid .va-select-trigger,.field.invalid .va-combobox>input){
  border-color:var(--danger-line)!important;box-shadow:0 0 0 3px var(--danger-bg)!important;
}

/* Submission, verification and progress. */
html[data-theme] .progress-item:hover{border-color:var(--control-border)}
html[data-theme] .progress-item.active{background:var(--selected-bg);border-color:var(--accent)}
html[data-theme] .progress-item.complete .progress-number{background:var(--surface-3);color:var(--text);border-color:var(--control-border)}
html[data-theme] .photo-preview-card.featured{border-color:var(--accent);box-shadow:0 0 0 2px var(--selected-bg)}
html[data-theme] .photo-feature-btn.active{background:var(--selected-bg);border-color:var(--selected-line);color:var(--accent-dark)}
html[data-theme] .photo-remove-btn{color:var(--danger);background:var(--surface)}
html[data-theme] :is(.photo-feature-btn,.photo-remove-btn){border-color:var(--control-border)}
html[data-theme] .submit-status-card{background:var(--surface-2);border-color:var(--line);color:var(--text)}
html[data-theme] .vin-photo-preview img{background:var(--surface-2);border-color:var(--line)}
html[data-theme] .verification-note{color:var(--muted)}
html[data-theme] .usage-class-grid label{background:var(--surface);color:var(--text);border-color:var(--control-border)}
html[data-theme] .usage-class-grid label:hover{background:var(--surface-2);border-color:var(--muted)}
html[data-theme] .usage-class-grid label:has(input:checked){background:var(--selected-bg);border-color:var(--selected-line)}
html[data-theme] .usage-class-grid label:has(input:focus-visible){border-color:var(--accent);box-shadow:0 0 0 3px var(--selected-bg)}
html[data-theme] .usage-class-grid input[type="checkbox"]{background-color:var(--surface);border-color:var(--control-border)!important}
html[data-theme] .usage-class-grid input[type="checkbox"]:checked{background-color:var(--button);border-color:var(--button)!important}
html[data-theme] :is(.verification-admin-panel,.verification-admin-item,.submission-edit-panel){background:var(--surface-2);border-color:var(--line)}
html[data-theme] .verification-admin-item{background:var(--surface)}

/* Semantic meaning stays distinct from the red brand action color. */
html[data-theme] .btn.success{background:#2f744b;border-color:#285f40;color:#fff}
html[data-theme] .btn.success:hover{background:#285f40;border-color:#285f40;color:#fff}
html[data-theme] .btn.danger{background:#a83d37;border-color:#91322d;color:#fff}
html[data-theme] .btn.danger:hover{background:#91322d;border-color:#91322d;color:#fff}
html[data-theme] :is(.badge.success,.notice.success,.submit-status-card.ok,.catalog-status-chip.verified,
  .verification-dot.verified,.public-verification-mark.verified,.passport-badge.verified,
  .qa-type-badge.answered,.qa-official-badge){background:var(--success-bg);border-color:var(--success-line);color:var(--success)}
html[data-theme] :is(.badge.warning,.notice.warning,.catalog-status-chip.reference,.passport-badge.reported){
  background:var(--warning-bg);border-color:var(--warning-line);color:var(--warning);
}
html[data-theme] :is(.badge.danger,.notice.error,.submit-status-card.error,.catalog-status-chip.custom,
  .verification-dot.unverified,.review-check.invalid,.vin-evidence-card.invalid){
  background:var(--danger-bg);border-color:var(--danger-line);color:var(--danger);
}
html[data-theme] :is(.badge.info,.notice.info,.submit-status-card.info){background:var(--info-bg);border-color:var(--info-line);color:var(--info)}
html[data-theme] .public-verification-mark.unverified{background:var(--surface-2);color:var(--muted);border-color:var(--control-border)}
html[data-theme] .field-error{color:var(--danger)}
html[data-theme] :is(.notice.warning,.notice.error,.notice.success,.notice.info) :is(strong,p){color:inherit}
html[data-theme] :is(.feedback-trust-badge,.feedback-verified-chip,.qa-type-badge){background:var(--gold-bg);border-color:var(--gold-line);color:var(--gold)}
html[data-theme] .qa-type-badge.answered{background:var(--success-bg);border-color:var(--success-line);color:var(--success)}
html[data-theme] :is(.qa-official-answer,.qa-seller-answer){background:var(--success-bg);border-color:var(--success-line);color:var(--text)}
html[data-theme] :is(.qa-form-context,.qa-queue-card blockquote){background:var(--surface-2);color:var(--text)}
html[data-theme] :is(.qa-question,.qa-queue-card.needs-answer){border-left-color:var(--gold-line)}
html[data-theme] .qa-nav-count{background:var(--button);color:var(--button-text)}
html[data-theme] .feedback-category-grid>div{background:var(--surface-2);border-color:var(--line)}
html[data-theme] .feedback-sealed-note{background:var(--gold-bg);border-left-color:var(--gold-line)}
html[data-theme] .feedback-review-card{background:var(--surface);border-color:var(--line)}
html[data-theme] :is(.feedback-rating-row span,.feedback-response){background:var(--surface-2)}
html[data-theme] .feedback-response{border-left-color:var(--gold-line)}

/* Account messages, administration and mail center. */
html[data-theme] :is(.message-thread,.mail-center){background:var(--surface);color:var(--text)}
html[data-theme] :is(.message-thread-head,.message-bubble,.mail-folders,.review-fact){background:var(--surface-2);color:var(--text)}
html[data-theme] .message-bubble.mine{background:var(--selected-bg);border-color:var(--selected-line);color:var(--text)}
html[data-theme] .message-unread-badge{background:var(--button);color:var(--button-text);box-shadow:0 0 0 2px var(--selected-bg)}
html[data-theme] .thread-unread-badge{background:var(--selected-bg);border-color:var(--selected-line);color:var(--accent-dark)}
html[data-theme] :is(.admin-link,.admin-stat span,.review-fact span,.mail-folder,.mail-item span,.mail-reader-meta,.mail-empty){color:var(--muted)}
html[data-theme] :is(.admin-link:hover,.admin-link.active,.mail-folder:hover,.mail-folder.active,.mail-item:hover,.mail-item.active){background:var(--surface-2);color:var(--text)}
html[data-theme] .mail-reader-body{color:var(--body-copy)}
html[data-theme] :is(.ops-summary-row,.ops-check-group+.ops-check-group){border-color:var(--line-soft)}

/* Notification UI is mounted asynchronously and is separate from page chrome. */
html[data-theme] .notification-bell{color:var(--nav-text);border-color:var(--nav-border)}
html[data-theme] :is(.notification-bell:hover,.notification-bell:focus-visible){background:var(--nav-hover);border-color:var(--nav-accent)}
html[data-theme] :is(.notification-count,.notification-item.unread .notification-icon){background:var(--button);color:var(--button-text)}
html[data-theme] :is(.notification-drawer,.notification-drawer-head,.notification-item){background:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme] .notification-item.unread{background:var(--selected-bg)}
html[data-theme] .notification-title{color:var(--text)}
html[data-theme] .notification-icon{background:var(--surface-3);color:var(--text)}
html[data-theme] :is(.notification-item p,.notification-item time){color:var(--muted)}
html[data-theme] :is(.notification-read,.notification-view-all,.notification-drawer-head button){color:var(--accent-dark)}
html[data-theme] .notification-drawer-head button:disabled{color:var(--muted)}
html[data-theme] .notification-page-list{border-color:var(--line)}

/* Newer catalog/member views previously supplied their own light surfaces. */
html[data-theme] :is(.quality-score,.quality-public-score,.quality-check,.storefront-score,.storefront-stat,
  .wanted-detail-main,.wanted-detail-side,.wanted-admin-row,.passport-badge,.passport-stat,.passport-event,
  .passport-admin-card,.hub-link-card,.hub-year-grid a,.hub-table-wrap,.hub-wanted-card,
  .auction-calendar-grid,.auction-agenda-item,.auction-reminder-row,.nhtsa-identity-grid>div,.nhtsa-decode-grid>div){
  background:var(--surface);color:var(--text);border-color:var(--line);
}
html[data-theme] :is(.quality-score>div,.storefront-specialties span,.wanted-spec,.hub-table th,
  .hub-sale-summary span,.listing-auction-schedule dl div,.saved-search-summary,.analytics-note,
  .member-trust-panel,.offer-current,.offer-anchor){background:var(--surface-2);color:var(--text)}
html[data-theme] .quality-score i{background:var(--accent)}
html[data-theme] :is(.passport-stat span,.passport-mileage th,.passport-empty,.passport-private,
  .auction-calendar-day-events a span,.auction-agenda-item p,.auction-reminder-row p,
  .listing-auction-schedule dt,.auction-calendar-status){color:var(--muted)}
html[data-theme] :is(.following-match-row,.wanted-card-actions,.wanted-response,.passport-mileage th,
  .passport-mileage td,.passport-trust-note,.passport-empty,.auction-calendar-day,.listing-auction-schedule){border-color:var(--line)}
html[data-theme] .passport-event::before{background:var(--muted)}
html[data-theme] .passport-event.marketplace::before{background:var(--accent)}
html[data-theme] .passport-listing img{background:var(--surface-2)}
/* Reapply semantic passport variants after the neutral card surface group. */
html[data-theme] .passport-badge.verified{background:var(--success-bg);border-color:var(--success-line);color:var(--success)}
html[data-theme] .passport-badge.reported{background:var(--warning-bg);border-color:var(--warning-line);color:var(--warning)}
html[data-theme] .discovery-reasons{background:var(--surface-2);border-color:var(--line)}
html[data-theme] .discovery-reasons span{background:var(--surface);color:var(--body-copy)}
html[data-theme] .match-chip{background:var(--selected-bg);border-color:var(--selected-line);color:var(--text)}
html[data-theme] .offer-listing-panel{background:var(--selected-bg);border-color:var(--selected-line)}
html[data-theme] .auction-calendar-day.outside{background:var(--surface-2);color:var(--muted)}
html[data-theme] .auction-calendar-day.today time{background:var(--button);color:var(--button-text)}
html[data-theme] .auction-calendar-day-events a{background:var(--surface-2);color:var(--text)}
html[data-theme] .hub-stats{background:var(--stats-bg);color:var(--stats-text)}
html[data-theme] .hub-stats>div{border-color:var(--stats-line)}
html[data-theme] .hub-stats strong{color:var(--stats-text)}
html[data-theme] .hub-stats span{color:var(--stats-muted)}
html[data-theme] .hub-link-card:hover{border-color:var(--control-border)}
html[data-theme] .hub-wanted-card a{color:var(--text)}

/* Support, dialogs, provider containers, and semantic incident notices. */
html[data-theme] .care-customer{background:var(--surface);color:var(--text);border-color:var(--line);border-left-color:var(--warning-line)}
html[data-theme] :is(.care-customer small,.care-status-page time,.care-private-note){color:var(--muted)}
html[data-theme] :is(.care-banner,.nhtsa-caveat){background:var(--warning-bg);color:var(--warning);border-color:var(--warning-line)}
html[data-theme] :is(.care-banner,.nhtsa-caveat) :is(p,strong){color:inherit}
html[data-theme] :is(.care-status-page a,.care-status-page button,.care-customer *):focus-visible{outline-color:var(--accent)}
html[data-theme] :is(.dialog-head,.dialog-close:hover){background:var(--surface-2);color:var(--text)}
html[data-theme] #payment-element{background:var(--surface);border-color:var(--control-border)}
html[data-theme] .legal-checks a{text-decoration-color:var(--accent)}
html[data-theme] .va-skip-link{background:var(--surface);color:var(--text)}
/* core.js supplies toast colors inline. Only those color properties need priority. */
html[data-theme] #vaToast{background:var(--surface)!important;color:var(--text)!important}

@media(prefers-contrast:more){
  html[data-theme="oem"]{--line:#727b85;--muted:#434a53;--control-border:#59636f}
  html[data-theme="diehard"]{--line:#7c8996;--muted:#d0d6de;--control-border:#a4afbc}
}
