/* Marketplace design tokens: shared without replacing page-specific layouts. */
body {
  --market-ink: #18232d;
  --market-dark: #172630;
  --market-muted: #4f5e6a;
  --market-paper: #f5f7f8;
  --market-line: #dbe2e7;
  --market-accent: #ae380e;
  --market-accent-hover: #8f2d0b;
  --market-wash: #fff2eb;
  --market-radius: 14px;
  --market-gutter: max(4%, calc((100% - 1180px) / 2));
  background-color: var(--market-paper);
  color: var(--market-ink);
}

body :focus-visible { outline: 3px solid #2375ac; outline-offset: 3px; }
body:not(.market-home) > header:has(.brand-logo) { background: #fff; border-bottom: 1px solid var(--market-line); box-shadow: none; }
body:not(.market-home) > header nav a[href="/Post"] { color: var(--market-accent); background: var(--market-wash); }
body > footer:has(.brand-logo) { background: var(--market-dark); color: #dee7ee; }

/* Homepage directory: an index followed by five compact, readable groups. */
.market-home .home-resources {
  --resource-row: #fff;
  margin: 0 var(--market-gutter) 28px;
  padding: 0;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: var(--resource-row);
}
.market-home .home-resource-intro {
  padding: 28px clamp(17px, 4vw, 34px);
  border-radius: 15px 15px 0 0;
  background: var(--market-dark);
  color: #fff;
}
.market-home .home-resource-intro h2 { color: #fff; }
.market-home .home-resource-intro p { color: #e1e9ee; }
.market-home .resource-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.market-home .resource-index a {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px;
  border: 1px solid #617686; border-radius: 6px; color: #fff; font-size: .84rem; font-weight: 650;
}
.market-home .resource-index a:hover { color: var(--market-dark); background: #fff; }
.market-home .home-resources > section {
  display: grid; grid-template-columns: minmax(170px, .75fr) minmax(0, 2fr); gap: 18px;
  padding: 22px clamp(17px, 4vw, 34px); border: 0; content-visibility: visible;
}
.market-home .home-resources > section + section { border-top: 1px solid var(--market-line); }
.market-home .home-resources :is(.title,.official-services-head) { display: block; margin: 0; }
.market-home .home-resources .official-services-head p { margin-top: 7px; }
.market-home .home-resources h2[id] { scroll-margin-top: 125px; }
.market-home .home-resources .title h2 span { display: inline; color: inherit; }
.market-home .home-resources :is(.service-links,.magazine-grid,.channel-grid,.standards-grid) {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 15px; border: 0; background: transparent;
}
.market-home .home-resources :is(.service-link,.magazine-link,.channel-link,.standard-link) {
  min-height: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--market-line);
  border-radius: 0; background: transparent; box-shadow: none; text-align: left;
}
.market-home .home-resources :is(.service-link,.magazine-link,.channel-link,.standard-link):hover {
  background: var(--market-wash); border-color: var(--market-accent);
}
.market-home .home-resources .service-code { background: #edf2f5; color: var(--market-dark); }
.market-home .home-resources .service-arrow { color: var(--market-accent); }
.market-home .sell { border-left: 4px solid #ff8955; }

/* Listings and dealer inventory: dense controls, clear results, familiar colors. */
.browse-page .browse-hero,.dealer-page .dealer-hero,body#top > header {
  padding: clamp(25px,5vw,54px) var(--market-gutter) 26px;
  background: linear-gradient(115deg, var(--market-dark), #294653);
  color: #fff;
}
.browse-page .browse-hero > small,.dealer-page .dealer-hero small { color: #ffe0d0; }
.browse-page .browse-hero h1,.dealer-page .dealer-hero h1 { font-size: clamp(1.9rem,4.8vw,3.25rem); line-height: 1.18; color: #fff; }
.dealer-page .dealer-hero h1 span { color: #ffc5a9; }
.browse-page .browse-hero p,.dealer-page .dealer-hero p { color: #e1e9ee; }
.browse-page .group-tabs a { border-color: #617686; }
.browse-page .group-tabs a:hover,.browse-page .group-tabs a.active { background: #fff; color: var(--market-dark); border-color: #fff; }
.browse-page .browser-layout { grid-template-columns: minmax(225px,260px) minmax(0,1fr); gap: clamp(16px,3vw,28px); }
.browse-page .filter-panel { top: 84px; border-top: 3px solid var(--market-accent)!important; border-radius: var(--market-radius); }
.browse-page .filter-panel :is(input,select),.dealer-page .dealer-hero input { min-width: 0; background: #f7f9fa; }
.browse-page .filter-panel button,.dealer-page .dealer-hero button,body .not-found a {
  background: var(--market-accent); color: #fff;
}
.browse-page .filter-panel button:hover,.dealer-page .dealer-hero button:hover,body .not-found a:hover { background: var(--market-accent-hover); }
:is(.browse-page,.dealer-page,.detail-page) :is(.card,.option-card,.dealer-card,.content-card,.seller-card,.detail-summary) {
  border-radius: var(--market-radius); box-shadow: none;
}
.detail-page .detail-layout { grid-template-columns: minmax(0,1.35fr) minmax(0,.85fr); }
.detail-page .detail-summary { border-top: 4px solid var(--market-accent); overflow-wrap: anywhere; }
.detail-page .detail-price,.detail-page .back-link { color: var(--market-accent); }
.detail-page .gallery-stage { border-radius: var(--market-radius); background: #eaf0f3; }
.detail-page .gallery-stage > img { object-fit: contain; }
.detail-page :is(#carDescription,#highlightList,#featureList) { line-height: 1.65; }
.not-found a { border-radius: 9px; }
body#top > header p { font-family: var(--site-font-prose); }
body#top .brand-section { content-visibility: auto; contain-intrinsic-size: auto 360px; }

/* Account and native site dashboards; authentication and access logic unchanged. */
body .auth .visual { background-color: var(--market-dark); }
body .auth .visual h1 { line-height: 1.14; }
body .auth .visual h1 span { color: #ffc5a9; }
body .auth .authbox { background: var(--market-paper); }
body .authbox .box { border: 1px solid var(--market-line); border-radius: var(--market-radius); }
body :is(.authbox,.shell,#loginForm) .primary { background: var(--market-accent); color: #fff; }
body :is(.authbox,.shell,#loginForm) .primary:hover { background: var(--market-accent-hover); }
body .shell .side { background: var(--market-dark); }
body .shell .side nav .active { background: #344f5d; color: #fff; }
body .shell .main { min-width: 0; }
body .shell :is(.head,.panel-head) h1 { font-size: clamp(1.35rem,3vw,2rem); }
body .shell :is(.panel,.stat) { border-radius: var(--market-radius); box-shadow: none; }

/* Astra reader and archives: keep native menus, pagination and embeds. */
body.wp-theme-astra {
  --ast-global-color-0: var(--market-accent);
  --ast-global-color-1: var(--market-accent-hover);
}
.wp-theme-astra :is(.ast-primary-header-bar,.ast-builder-menu-mobile) { background-color: #fff; border-color: var(--market-line); }
.wp-theme-astra .site-content { background: var(--market-paper); }
.wp-theme-astra .ast-article-post .ast-article-inner {
  height: 100%; border: 1px solid var(--market-line); border-radius: var(--market-radius);
  background: #fff; overflow: hidden; box-shadow: none;
}
.wp-theme-astra .ast-article-post .entry-title { font-size: clamp(1.05rem,2vw,1.32rem); line-height: 1.4; }
.wp-theme-astra .ast-article-post .ast-excerpt-container { color: var(--market-muted); }
.wp-theme-astra.single-post .ast-article-single {
  max-width: 930px; margin-inline: auto; border: 1px solid var(--market-line);
  border-radius: var(--market-radius); box-shadow: none;
}
.wp-theme-astra.single-post .entry-title { font-size: clamp(1.6rem,3.8vw,2.5rem); line-height: 1.25; }
.wp-theme-astra.single-post .entry-content { font-size: clamp(1.03rem,2vw,1.14rem); line-height: 1.7; overflow-wrap: break-word; }
.wp-theme-astra.single-post .entry-content :is(ul,ol) { font-family: var(--site-font-prose); }
.wp-theme-astra .site-below-footer-wrap { background: var(--market-dark); }
.wp-theme-astra .site-below-footer-wrap :is(p,a) { color: #e1e9ee; }

@media (max-width: 850px) {
  .browse-page .browser-layout,.detail-page .detail-layout { grid-template-columns: minmax(0,1fr); }
  .browse-page .filter-panel { position: static; }
  .market-home .home-resources > section { grid-template-columns: minmax(0,1fr); gap: 7px; }
}
@media (max-width: 560px) {
  .browse-page .filter-panel { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; }
  .browse-page .filter-panel :is(h2,label:first-of-type,label:last-of-type,button,.clear-link) { grid-column: 1 / -1; }
  .market-home .home-resources :is(.service-links,.magazine-grid,.channel-grid,.standards-grid) { grid-template-columns: minmax(0,1fr); }
  .market-home .resource-index { gap: 6px; }
  .market-home .resource-index a { min-height: 34px; }
  .wp-theme-astra.single-post .ast-article-single { padding-inline: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  body { scroll-behavior: auto; }
}
