.market-home {
  --home-ink: #18232d;
  --home-dark: #172630;
  --home-muted: #4f5e6a;
  --home-paper: #f5f7f8;
  --home-rule: #dbe2e7;
  --home-accent: #ae380e;
  --home-gutter: max(4%, calc((100% - 1180px) / 2));
  color: var(--home-ink);
  background: var(--home-paper);
}

.market-home :focus-visible { outline: 3px solid #2375ac; outline-offset: 3px; }
.market-home :is(#search, #buyerToolsTitle) { scroll-margin-top: 118px; }
.home-skip { position: fixed; left: 16px; top: 8px; z-index: 100; padding: 10px 16px; background: #fff; transform: translateY(-150%); }
.home-skip:focus { transform: none; }
.market-home > header { background: #fff; box-shadow: none; }
.market-home > header nav a:last-child { color: var(--home-accent); background: #fff2eb; }

.market-home .hero {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 0;
  padding: 0 var(--home-gutter) 28px;
  background: var(--home-paper);
}
.market-home .hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 365px;
  background: linear-gradient(90deg, #14242e 8%, #14242ef5 34%, #14242e4d 74%),
    #14242e url("/public/assets/hero-car.webp") 68% 57% / cover no-repeat;
}
.market-home .hero-copy {
  min-height: 320px;
  padding: 43px 0 45px;
  max-width: 520px;
}
.market-home .hero-copy > small {
  display: inline-block;
  color: #ffe4d6;
  border-left: 3px solid #ff8d54;
  padding-left: 11px;
  font-size: .9rem;
  letter-spacing: 0;
}
.market-home .hero h1 {
  margin: 13px 0 12px;
  font-size: clamp(2.5rem, 5.8vw, 4.55rem);
  line-height: 1.09;
  letter-spacing: -.035em;
  color: #fff;
}
.market-home .hero-copy p { color: #edf2f5; font-size: 1.04rem; line-height: 1.6; max-width: 38ch; margin: 0; }
.market-home .hero form {
  padding: 22px 26px;
  border: 1px solid var(--home-rule);
  border-radius: 16px;
  box-shadow: 0 12px 34px #18232d14;
}
.market-home .hero form::before { display: none; }
.home-search-heading,.home-search-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.market-home .home-search-heading { margin-bottom: 14px; }
.market-home .home-search-heading h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.5rem); }
.home-search-heading a,.home-search-actions a,.market-home .categories .title a { color: var(--home-accent); font-weight: 700; font-size: .875rem; text-underline-offset: .22em; }
.home-search-heading a:hover,.home-search-actions a:hover,.market-home .categories .title a:hover { text-decoration: underline; }
.market-home .hero .search-grid { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 10px; }
.market-home .hero :is(input, select) { min-width: 0; height: 46px; margin: 0; background: #f7f9fa; border-color: var(--home-rule); color: var(--home-ink); }
.market-home .hero select:disabled { color: var(--home-muted); opacity: .75; }
.home-search-actions { margin-top: 14px; }
.home-search-actions button,.market-home .sell button {
  min-height: 46px;
  min-width: 156px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--home-accent);
  font-weight: 750;
}
.home-search-actions button:hover,.market-home .sell button:hover { background: #8f2d0b; }

.market-home :is(.categories,.browse-directory,.buyer-tools) { padding-top: 36px; padding-bottom: 36px; }
.market-home :is(.categories,.browse-directory) .title { margin-bottom: 16px; align-items: center; gap: 12px; }
.market-home :is(.categories,.browse-directory) .title h2,
.market-home .buyer-tools-head h2,.home-resource-intro h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.05rem); line-height: 1.25; letter-spacing: -.025em; }
.market-home .buyer-tools-head h2 { margin: 6px 0 8px; }
.market-home :is(.category, .directory-grid a) { box-shadow: none; border-radius: 10px; padding: 15px; }
.market-home .category { background: #fff; }
.market-home .directory-grid a { min-height: 88px; justify-content: center; gap: 3px; }
.market-home :is(.category, .directory-grid a) small { color: var(--home-muted); font-size: .8rem; }
.market-home :is(.category, .directory-grid a):hover { color: var(--home-accent); background: #fff7f2; transform: none; box-shadow: none; }
.market-home .guide-body { font-family: var(--site-font-prose); }

.home-resources { padding: 36px var(--home-gutter) 24px; }
.home-resource-intro { padding-bottom: 20px; }
.home-resource-intro p { margin: 8px 0 0; color: var(--home-muted); }
.market-home .home-resources > section { padding: 20px 0 23px; background: transparent; border: 0; border-top: 1px solid var(--home-rule); contain-intrinsic-size: auto 220px; }
.market-home .home-resources :is(.title,.official-services-head) { margin-bottom: 12px; align-items: start; }
.market-home .home-resources :is(.title h2,.official-services-head h2) { margin: 0; font-size: clamp(1.2rem, 2.9vw, 1.55rem); }
.market-home .home-resources .title small { display: none; }
.market-home .home-resources :is(.magazine-link,.channel-link,.standard-link) { min-height: 0; padding: 13px; background: #fff; color: var(--home-ink); border: 1px solid var(--home-rule); border-radius: 8px; }
.market-home .home-resources :is(.magazine-link,.channel-link,.standard-link) strong { font-size: .98rem; color: var(--home-ink); }
.market-home .home-resources :is(.magazine-link,.channel-link,.standard-link) p { font-size: .81rem; margin: 4px 0 7px; color: var(--home-muted); }
.market-home .home-resources :is(.magazine-link,.channel-link,.standard-link) span { color: var(--home-accent); font-size: .76rem; }
.market-home .home-resources :is(.magazine-link,.channel-link,.standard-link):hover { transform: none; border-color: var(--home-accent); box-shadow: none; }
.market-home .sell { margin: 15px var(--home-gutter) 40px; padding: 26px; gap: 20px; background: var(--home-dark); color: #fff; border-radius: 14px; box-shadow: none; }
.market-home .sell h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.market-home .sell p { margin: 7px 0 0; color: #e2e9ed; }
.market-home .sell button { margin-top: 0; }

@media (max-width: 850px) {
  .market-home .hero::before { background-image: linear-gradient(90deg, #14242ef7 8%, #14242e80 70%), url("/public/assets/hero-car-960.webp"); }
  .market-home .hero .search-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .market-home .hero::before { height: 263px; background-position: 64% center; }
  .market-home .hero-copy { min-height: 229px; padding: 27px 0 24px; }
  .market-home .hero-copy p { font-size: .92rem; }
  .market-home .hero form { padding: 15px; }
  .market-home .hero .search-grid { gap: 8px; }
  .market-home .hero #keyword { grid-column: 1 / -1; }
  .home-search-heading a,.home-search-actions a,.market-home .categories .title a { font-size: .78rem; }
  .home-search-actions button { min-width: 108px; }
  .market-home .sell button { margin-top: 14px; }
}
