:root {
  color-scheme: light;
  --theme-bg: #f3f6f7;
  --theme-surface: #ffffff;
  --theme-surface-soft: #f7f9f9;
  --theme-line: #dfe7e9;
  --theme-text: #1e2d33;
  --theme-heading: #18333e;
  --theme-copy: #52636a;
  --theme-muted: #78878d;
  --theme-accent: #124659;
  --theme-accent-soft: #eaf2f4;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-bg: #11191d;
  --theme-surface: #1a252b;
  --theme-surface-soft: #202d33;
  --theme-line: #34464e;
  --theme-text: #e3eaed;
  --theme-heading: #edf4f6;
  --theme-copy: #c0cdd1;
  --theme-muted: #a3b2b8;
  --theme-accent: #72b4ca;
  --theme-accent-soft: #263d47;
}

body,
.search-page,
.account-page,
.editorial-page {
  color: var(--theme-text);
  background: var(--theme-bg);
}

.site-header-search {
  background: #102a36;
}

/* Landing page */
.about-section { color: var(--theme-text); background: var(--theme-bg); }
.about-content .eyebrow,
.about-content h2,
.popular-searches h3 { color: var(--theme-heading); }
.about-content p:not(.eyebrow) { color: var(--theme-copy); }
.about-search-link { color: var(--theme-accent); }
.popular-searches { border-color: var(--theme-line); }
.popular-searches a { color: var(--theme-heading); background: var(--theme-surface-soft); border-color: var(--theme-line); }
.popular-searches a:hover,
.popular-searches a:focus-visible { color: var(--theme-heading); background: var(--theme-accent-soft); border-color: var(--theme-line); }

/* Search results */
.search-breadcrumb,
.search-breadcrumb [aria-current="page"],
.results-summary,
.filter-note,
.check-option span,
.price-inputs,
.range-labels,
.listing-count,
.page-size { color: var(--theme-muted); }
.search-breadcrumb [aria-current="page"],
.listing-count strong { color: var(--theme-copy); }
.search-breadcrumb a,
.filter-heading button,
.empty-results a { color: var(--theme-accent); }
.results-heading h1,
.filter-heading h2,
.listing-title h2,
.listing-price { color: var(--theme-heading); }
.results-search,
.results-search input,
.filter-panel,
.price-inputs input,
.listing-toolbar,
.sort-control select,
.listing-card,
.empty-results,
.pagination { color: var(--theme-text); background-color: var(--theme-surface); border-color: var(--theme-line); }
.results-search input,
.sort-control select,
.price-inputs input { color: var(--theme-text); }
.filter-heading,
.filter-form fieldset,
.listing-action { border-color: var(--theme-line); }
.filter-form legend { color: var(--theme-heading); }
.check-option,
.sort-control { color: var(--theme-copy); }
.buying-tab { color: var(--theme-copy); }
.buying-tab span,
.listing-brand,
.listing-specs,
.seller-line,
.page-number,
.page-arrow { color: var(--theme-muted); }
.buying-tab.active { color: var(--theme-heading); background: var(--theme-accent-soft); }
.buying-tab.disabled { color: var(--theme-muted); background: var(--theme-surface-soft); }
.deal-type { color: #9bd0dc; background: #253f49; }
.deal-type.auction { color: #e3c996; background: #493d2c; }
.listing-specs span { color: #87989e; }
.page-number,
.page-arrow { border-color: var(--theme-line); }
.page-number.current { color: #fff; background: #124659; border-color: #124659; }

/* Account page */
.account-intro h1,
.account-section-heading h2,
.account-listing-info h3,
.account-listing-info strong,
.account-search-list a { color: var(--theme-heading); }
.account-intro .eyebrow,
.account-section .eyebrow { color: var(--theme-accent); }
.account-intro > p:not(.eyebrow),
.account-listing-info p,
.account-listing-info small,
.account-empty,
.account-search-list time { color: var(--theme-muted); }
.account-section,
.account-section-heading button,
.account-remove { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
.account-section-heading { border-color: var(--theme-line); }
.account-listing { border-color: var(--theme-line); }
.account-empty { background: var(--theme-surface-soft); }
.account-search-list li { border-color: var(--theme-line); }

/* Blog and article pages */
.blog-library,
.library-heading h2,
.article-heading h1,
.article-body h2,
.sidebar-card h2 { color: var(--theme-heading); }
.blog-category,
.article-body .article-intro { color: var(--theme-copy); }
.blog-search-label,
.blog-count,
.article-byline,
.breadcrumbs,
.article-deck,
.article-body > p,
.article-body section > p,
.article-next p,
.article-disclosure,
.sidebar-card p:not(.eyebrow) { color: var(--theme-copy); }
.blog-search-label input,
.blog-card,
.blog-empty,
.blog-error,
.sidebar-card { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
.blog-card-link { color: var(--theme-text); }
.blog-card-copy > p:not(.blog-category),
.blog-card-meta { color: var(--theme-copy); }
.blog-card-meta span,
.sidebar-card > a,
.breadcrumbs a { color: var(--theme-accent); }
.blog-image-placeholder,
.article-image-placeholder { color: var(--theme-muted); background: linear-gradient(135deg, #29383e, #202c31); }
.article-image-placeholder { border-color: var(--theme-line); }
.article-next { color: var(--theme-text); background: var(--theme-surface-soft); border-color: var(--theme-line); }
.article-disclosure { border-color: var(--theme-line); }
.editorial-footer { color: var(--theme-muted); border-color: var(--theme-line); }
.editorial-footer a { color: var(--theme-heading); }

/* FAQ page */
.faq-jump a,
.faq-quick a { color: var(--theme-heading); background: var(--theme-surface); border-color: var(--theme-line); }
.faq-jump a:hover,
.faq-quick a:hover { background: var(--theme-accent-soft); }
.faq-quick,
.faq-bottom-cta { color: var(--theme-text); background: var(--theme-surface-soft); border-color: var(--theme-line); }
.faq-topic > .eyebrow { color: var(--theme-accent); }
.faq-topic > h2,
.faq-item h3,
.faq-bottom-cta h2 { color: var(--theme-heading); }
.faq-item,
.faq-bottom-cta { border-color: var(--theme-line); }
.faq-answer,
.faq-bottom-cta p { color: var(--theme-copy); }

/* Shared dialogs and controls */
.contact-dialog { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-line); }
.contact-dialog-heading h2 { color: var(--theme-heading); }
.contact-form label { color: var(--theme-copy); }
.contact-form input,
.contact-form textarea,
.contact-cancel,
.contact-close { color: var(--theme-text); background: var(--theme-surface-soft); border-color: var(--theme-line); }
.contact-status { color: var(--theme-muted); }

.appearance-control {
  display: block;
  width: 100%;
  margin-top: 22px;
  color: var(--theme-text);
  background: var(--theme-surface);
  border: 1px solid var(--theme-line);
}
.appearance-control .account-section-heading { margin-bottom: 16px; }
.appearance-control .appearance-label { display: block; margin-bottom: 8px; color: var(--theme-copy); font-size: .88rem; font-weight: 700; }
.appearance-picker { position: relative; width: 100%; }
.appearance-control .appearance-select { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--theme-text); background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 7px; font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
.appearance-chevron { color: var(--theme-muted); font-size: 1.15rem; line-height: 1; }
.appearance-options { position: absolute; z-index: 5; top: calc(100% + 4px); right: 0; left: 0; width: 100%; padding: 5px; overflow: hidden; background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, .22); }
.appearance-options[hidden] { display: none; }
.appearance-control .appearance-option { display: block; box-sizing: border-box; width: 100%; min-height: 44px; padding: 11px 12px; color: var(--theme-text); background: transparent; border: 0; border-radius: 5px; font: inherit; font-size: .92rem; text-align: left; cursor: pointer; }
.appearance-control .appearance-option:hover,
.appearance-control .appearance-option:focus-visible,
.appearance-control .appearance-option[aria-selected="true"] { color: var(--theme-heading); background: var(--theme-accent-soft); }
.appearance-control .appearance-option:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: -2px; }
.appearance-control .appearance-select:focus-visible { outline: 3px solid rgba(118, 170, 189, .35); outline-offset: 2px; }
.appearance-control .appearance-status { margin: 9px 0 0; color: var(--theme-muted); font-size: .8rem; }
.account-footer { align-items: center; flex-wrap: wrap; }
.account-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.account-footer nav a { color: var(--theme-copy); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
