/* Marketplace discovery refresh. Scoped to the new public home; service jobs,
   account pages, subscription flows and their controls keep their existing CSS. */
.marketplace-home {
  --marketplace-ink: #0f0f0f;
  --marketplace-muted: #545454;
  --marketplace-accent: #6e42e5;
  --marketplace-border: #ededed;
  color: var(--marketplace-ink);
  background: #fff;
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  padding-bottom: 20px;
}
.marketplace-home *, .marketplace-home *::before, .marketplace-home *::after { box-sizing: border-box; }
.marketplace-home h1, .marketplace-home h2, .marketplace-home h3, .marketplace-home p { margin: 0; color: inherit; letter-spacing: normal; }
.marketplace-home h1, .marketplace-home h2 { font-size: 20px; line-height: 28px; font-weight: 800; }
.marketplace-home h3 { font-size: 16px; line-height: 24px; font-weight: 800; }
.marketplace-home a { color: inherit; text-decoration: none; }
.marketplace-home button, .marketplace-home input { font: inherit; }
.marketplace-home button { cursor: pointer; }
.marketplace-home img { display: block; max-width: 100%; }
.marketplace-home :is(a, button, input):focus-visible { outline: 3px solid var(--marketplace-accent); outline-offset: 3px; }
.marketplace-home [data-icon], .marketplace-home [data-lucide] { width: 20px; height: 20px; flex-shrink: 0; }
.marketplace-home-wrap { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.marketplace-location { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--marketplace-border); }
.marketplace-location > span { display: flex; gap: 10px; align-items: center; min-width: 0; }
.marketplace-location > span > span { min-width: 0; }
.marketplace-location strong, .marketplace-location small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketplace-location strong { font-size: 14px; line-height: 20px; font-weight: 800; }
.marketplace-location small { color: var(--marketplace-muted); font-size: 12px; line-height: 18px; }
.marketplace-home .marketplace-icon-button { display: inline-grid; place-items: center; border: 1px solid var(--marketplace-border); width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: #fff; color: #0f0f0f; box-shadow: none; flex: 0 0 44px; }
.marketplace-search-section { padding: 24px 0 0; max-width: 850px; }
.marketplace-search-controls { margin-top: 16px; }
.marketplace-home .welcome-provider-search { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; gap: 0; border: 1px solid #d5d5d5; border-radius: 8px; padding: 4px; box-shadow: none; }
.marketplace-home .welcome-search-field { padding: 0 12px; min-height: 44px; gap: 8px; }
.marketplace-home .welcome-search-field input { font-size: 14px; color: #0f0f0f; min-height: 44px; }
.marketplace-home .welcome-search-field input:is(:focus, :focus-visible) { outline: none; outline-offset: 0; }
.marketplace-home .welcome-search-field input::placeholder { color: #727272; }
.marketplace-home .welcome-search-field [data-icon] { color: #545454; width: 18px; height: 18px; }
.marketplace-home .welcome-location-field { border-left: 1px solid var(--marketplace-border); border-top: 0; }
.marketplace-home .welcome-search-submit { margin: 0; min-height: 44px; border-radius: 6px; border-color: #0f0f0f; background: #0f0f0f; padding: 10px 20px; box-shadow: none; }
.marketplace-home .welcome-search-hint { margin: 8px 0 0; min-height: 18px; font-size: 12px; line-height: 18px; color: var(--marketplace-muted); }
.marketplace-home .welcome-search-hint.is-error { color: #b42318; }
.marketplace-home .welcome-popular-services { margin-top: 10px; gap: 6px; }
.marketplace-home .welcome-popular-services button { min-height: 36px; border: 0; background: #f5f5f5; padding: 8px 10px; font-size: 12px; border-radius: 6px; color: #545454; }
.marketplace-home .welcome-search-suggestions { z-index: 30; left: 0; top: calc(100% + 5px); border: 1px solid #dedede; border-radius: 8px; box-shadow: 0 8px 22px #00000016; max-width: calc(100vw - 32px); }
.marketplace-home .welcome-search-suggestions button { min-height: 46px; border-radius: 4px; color: #0f0f0f; }
.marketplace-home .welcome-search-suggestions button:hover, .marketplace-home .welcome-search-suggestions button[aria-selected="true"] { background: #f5f1ff; }
.marketplace-home [data-welcome-provider-results]:empty { display: none; }
.marketplace-home .welcome-provider-results { margin: 24px 0; background: #fff; border: 1px solid var(--marketplace-border); padding: 20px; border-radius: 8px; }
.marketplace-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.marketplace-section-heading > a { display: flex; align-items: center; gap: 3px; min-height: 44px; color: var(--marketplace-muted); font-size: 13px; line-height: 20px; flex-shrink: 0; }
.marketplace-section-heading > a [data-icon] { width: 15px; height: 15px; }
.marketplace-discovery { padding: 28px 0 32px; }
.marketplace-category-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px 12px; }
.marketplace-home .marketplace-category-tile { display: flex; flex-direction: column; align-items: center; justify-content: start; gap: 7px; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #0f0f0f; box-shadow: none; font-weight: 500; transform: none; }
.marketplace-home .marketplace-category-tile > span:last-child { display: block; font-size: 12px; line-height: 16px; text-align: center; min-height: 32px; overflow-wrap: anywhere; }
.marketplace-category-image { display: grid; place-items: center; width: 100%; min-height: 72px; border-radius: 8px; background: #f5f5f5; overflow: hidden; }
.marketplace-category-image img { width: 80px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.marketplace-home .marketplace-category-tile:hover .marketplace-category-image { background: #eeeeee; }
.marketplace-feature-band { display: grid; grid-template-columns: minmax(0, 1fr) 40%; align-items: center; background: #f4f2f8; border-radius: 8px; padding: 28px 36px; overflow: hidden; gap: 16px; }
.marketplace-feature-band h2 { font-size: 28px; line-height: 36px; max-width: 430px; }
.marketplace-feature-band p { color: var(--marketplace-muted); margin-top: 8px; }
.marketplace-feature-band > img { width: 100%; height: 200px; object-fit: contain; mix-blend-mode: multiply; }
.marketplace-home .marketplace-dark-button, .marketplace-home .marketplace-outline-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 44px; border: 1px solid #0f0f0f; border-radius: 6px; background: #0f0f0f; color: #fff; padding: 10px 16px; font-size: 14px; line-height: 20px; font-weight: 700; box-shadow: none; margin-top: 18px; }
.marketplace-home .marketplace-dark-button [data-icon], .marketplace-home .marketplace-outline-button [data-icon] { width: 16px; height: 16px; }
.marketplace-home .marketplace-outline-button { background: #fff; color: #0f0f0f; border-color: #d5d5d5; }
.marketplace-popular { padding-top: 32px; }
.marketplace-service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.marketplace-service-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 8px 0 28px; border-bottom: 1px solid var(--marketplace-border); min-width: 0; }
.marketplace-service-copy { flex: 1; min-width: 0; }
.marketplace-service-copy p { margin-top: 8px; color: var(--marketplace-muted); font-size: 12px; line-height: 18px; }
.marketplace-home .marketplace-text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--marketplace-accent); min-height: 44px; font-size: 14px; line-height: 20px; font-weight: 700; }
.marketplace-text-link [data-icon] { width: 15px; height: 15px; }
.marketplace-service-photo { position: relative; flex: 0 0 108px; width: 108px; padding-bottom: 18px; }
.marketplace-service-photo > img { display: block; width: 108px; height: 108px; border-radius: 8px; object-fit: cover; background: #f5f5f5; }
.marketplace-home .marketplace-service-photo > button { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); min-height: 38px; border: 1px solid #e5e5e5; padding: 8px 13px; border-radius: 8px; background: #fff; color: var(--marketplace-accent); box-shadow: 0 1px 2px #00000005; font-size: 14px; line-height: 20px; font-weight: 700; white-space: nowrap; }
.marketplace-products-teaser { margin-top: 36px; padding: 24px; background: #fafafa; border: 1px solid var(--marketplace-border); border-radius: 8px; }
.marketplace-products-teaser .marketplace-section-heading { margin-bottom: 8px; }
.marketplace-products-teaser p { max-width: 650px; color: var(--marketplace-muted); font-size: 14px; line-height: 22px; }
.marketplace-products-teaser small { display: block; color: var(--marketplace-muted); font-size: 12px; line-height: 18px; max-width: 650px; margin-top: 14px; }
.marketplace-how { padding: 36px 0; }
.marketplace-how ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 24px 0 8px; list-style: none; }
.marketplace-how li { display: flex; gap: 12px; }
.marketplace-how li > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid #dedede; border-radius: 50%; font-weight: 700; font-size: 12px; }
.marketplace-how p { color: var(--marketplace-muted); font-size: 13px; line-height: 20px; margin-top: 6px; }
.marketplace-all-services { padding: 0 0 28px; }
.marketplace-all-services .category-browser { background: #fff; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
.marketplace-all-services .category-group-panel { border: 0; padding: 24px 0; border-radius: 0; border-bottom: 1px solid var(--marketplace-border); background: #fff; }
.marketplace-all-services .category-icon-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px 12px; }
.marketplace-all-services .category-icon-box { border: 0; border-radius: 0; background: #fff; box-shadow: none; min-height: 100px; padding: 0; gap: 8px; }
.marketplace-all-services .category-icon-box strong { font-size: 12px; line-height: 16px; }
.marketplace-all-services .category-group-head { margin-bottom: 16px; }
.marketplace-all-services .category-group-head h3 { font-size: 16px; line-height: 24px; }
.marketplace-all-services .category-group-head p { font-size: 12px; line-height: 18px; color: var(--marketplace-muted); margin-top: 4px; }
.marketplace-footer { border-top: 1px solid var(--marketplace-border); padding: 28px 0; }
.marketplace-footer-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.marketplace-footer p { color: var(--marketplace-muted); font-size: 13px; line-height: 20px; margin-top: 12px; }
.marketplace-footer nav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 14px 0; }
.marketplace-footer nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--marketplace-muted); }
.marketplace-footer > small { color: var(--marketplace-muted); font-size: 12px; }
.marketplace-bottom-nav { display: none; }
.marketplace-category-sheet { position: fixed; inset: auto 0 0; margin: auto auto 0; width: min(640px,100%); max-width: 100%; max-height: min(85dvh,800px); border: 0; border-radius: 16px 16px 0 0; background: #fff; color: #0f0f0f; padding: 0; overflow: auto; overscroll-behavior: contain; box-shadow: 0 -8px 40px #0000000d; }
.marketplace-category-sheet::backdrop { background: #0009; }
.marketplace-sheet-handle { height: 4px; width: 32px; background: #e0e0e0; border-radius: 4px; margin: 9px auto 0; }
.marketplace-sheet-header { position: sticky; top: 0; z-index: 1; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.marketplace-home .marketplace-sheet-header h2 { font-size: 20px; line-height: 28px; }
.marketplace-sheet-content { padding: 0 16px max(24px,env(safe-area-inset-bottom)); }
.marketplace-sheet-content section { margin-bottom: 26px; }
.marketplace-home .marketplace-sheet-content h3 { margin: 12px 0 16px; font-size: 16px; line-height: 24px; font-weight: 700; }
.marketplace-category-sheet .marketplace-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.marketplace-category-sheet .marketplace-category-image { min-height: 64px; }
.marketplace-category-sheet .marketplace-category-image img { width: 64px; height: 48px; }
.marketplace-sheet-note { color: var(--marketplace-muted)!important; font-size: 12px; line-height: 18px; margin-top: 8px!important; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) { background: #fff; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header { min-height: 64px; background: #fff; border-color: #ededed; backdrop-filter: none; padding-block: 10px; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand-mark { width: 34px; height: 34px; border-radius: 7px; box-shadow: none; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand strong { font-size: 17px; color: #0f0f0f; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand small { color: #545454; font-size: 10px; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .primary-btn { background: #0f0f0f; border-color: #0f0f0f; box-shadow: none; border-radius: 6px; }
@media (max-width: 1000px) {
  .marketplace-service-list { grid-template-columns: 1fr; gap: 24px; }
  .marketplace-service-row { max-width: 700px; }
  .marketplace-service-photo { flex-basis: 128px; width: 128px; }
  .marketplace-service-photo > img { width: 128px; height: 128px; }
  .marketplace-service-copy p { max-width: 400px; font-size: 14px; line-height: 20px; }
  .marketplace-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .marketplace-how ol { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .marketplace-home { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .marketplace-home-wrap { width: calc(100% - 32px); }
  .marketplace-location { padding: 8px 0 12px; border-bottom: 0; }
  .marketplace-location > span { gap: 8px; }
  .marketplace-location > span > [data-icon] { width: 18px; height: 18px; }
  .marketplace-home .marketplace-location .marketplace-icon-button { border: 0; }
  .marketplace-search-section { padding-top: 0; }
  .marketplace-search-controls { margin-top: 12px; }
  .marketplace-home .welcome-provider-search { grid-template-columns: minmax(0,1fr) 80px; gap: 0; padding: 0; border: 0; border-radius: 0; }
  .marketplace-home .welcome-search-field { border: 1px solid #dedede; padding: 0 12px; min-height: 44px; border-radius: 6px; }
  .marketplace-home .welcome-search-field:first-child { grid-column: 1 / -1; margin-bottom: 8px; }
  .marketplace-home .welcome-location-field { border-radius: 6px 0 0 6px; border-right: 0; }
  .marketplace-home .welcome-search-submit { min-height: 46px; border-radius: 0 6px 6px 0; padding: 10px; }
  .marketplace-home .welcome-search-field input { height: 44px; font-size: 14px; }
  .marketplace-home .welcome-search-hint { font-size: 11px; line-height: 16px; min-height: 16px; }
  .marketplace-home .welcome-popular-services { display: none; }
  .marketplace-discovery { padding-top: 20px; padding-bottom: 24px; }
  .marketplace-section-heading { margin-bottom: 14px; gap: 8px; }
  .marketplace-section-heading > a { font-size: 12px; }
  .marketplace-category-grid { gap: 20px 12px; }
  .marketplace-category-image { min-height: 64px; height: 64px; }
  .marketplace-category-image img { width: 64px; height: 48px; }
  .marketplace-feature-band { margin: 0 -16px; border-radius: 0; padding: 20px 16px; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 0; }
  .marketplace-feature-band h2 { font-size: 20px; line-height: 28px; }
  .marketplace-feature-band p { font-size: 12px; line-height: 18px; max-width: 180px; }
  .marketplace-feature-band > img { height: 160px; width: 100%; }
  .marketplace-home .marketplace-dark-button { font-size: 13px; padding: 9px 12px; margin-top: 12px; }
  .marketplace-popular { padding-top: 24px; }
  .marketplace-service-list { gap: 24px; }
  .marketplace-service-row { padding-top: 8px; padding-bottom: 26px; gap: 16px; }
  .marketplace-service-copy p { font-size: 12px; line-height: 18px; margin-top: 8px; }
  .marketplace-service-photo { flex-basis: 128px; width: 128px; }
  .marketplace-service-photo > img { width: 128px; height: 128px; }
  .marketplace-home .marketplace-service-photo > button { min-height: 44px; padding: 11px 16px; }
  .marketplace-products-teaser { margin-top: 26px; padding: 20px 16px; }
  .marketplace-how { padding: 28px 0; }
  .marketplace-how ol { gap: 22px; margin-top: 20px; }
  .marketplace-all-services .category-icon-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .marketplace-all-services .category-group-head > span { display: none; }
  .marketplace-all-services .category-group-head p { margin-top: 5px; }
  .marketplace-home .marketplace-bottom-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: #fff; border-top: 1px solid #e5e5e5; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 6px #00000006; }
  .marketplace-bottom-nav > a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; gap: 3px; color: #737373; font-size: 10px; line-height: 14px; }
  .marketplace-bottom-nav > a [data-icon] { width: 21px; height: 21px; stroke-width: 1.6; }
  .marketplace-bottom-nav > a[aria-current] { color: #0f0f0f; font-weight: 800; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header { position: static; min-height: 56px; padding: 8px 16px; gap: 8px; border-bottom: 0; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand { gap: 7px; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand-mark { width: 30px; height: 30px; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .brand small { display: none; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .top-nav { display: none; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .header-actions { margin-left: auto; gap: 8px; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .header-actions button { min-height: 40px; min-width: 44px; padding: 8px 10px; font-size: 12px; border-radius: 6px; box-shadow: none; }
  body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header .header-actions button[data-route="signup"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marketplace-home *, .marketplace-home *::before, .marketplace-home *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}

body:has(.marketplace-category-sheet[open]) { overflow: hidden; }
/* Neutralize legacy fixed tile minimums so native mobile layout viewport stays
   equal to the visible viewport; fixed navigation/dialogs depend on this. */
.marketplace-home .marketplace-all-services .category-icon-box { min-width:0; width:100%; max-width:100%; }
.marketplace-home .marketplace-all-services .category-icon-box > * { max-width:100%; min-width:0; }
.marketplace-home .marketplace-all-services .category-icon-box strong { overflow-wrap:anywhere; }
.marketplace-home .welcome-category-title, .marketplace-home .welcome-category-title h2 { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.marketplace-home .welcome-category-title h2 { font-size:20px; line-height:28px; }
.marketplace-home h1, .marketplace-home h2 { font-weight:700; }
.marketplace-home .marketplace-category-sheet { position:fixed; inset:auto 0 0; margin:0 auto; transform:none; translate:none; width:min(640px,100vw); max-width:100vw; max-height:85dvh; }
body:has(.marketplace-home, .product-showcase, [data-login-form], [data-signup-form]) .site-header:not(:has(.header-account-chip)) .brand > span { display:block; }
@media(max-width:620px) {
  .marketplace-home .marketplace-all-services .category-icon-box { padding:0; }
  :is(.marketplace-home,.product-showcase) .marketplace-bottom-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:fixed; left:0; right:0; bottom:0; z-index:21; background:#fff; border-top:1px solid #e5e5e5; padding:4px 8px calc(4px + env(safe-area-inset-bottom)); box-shadow:0 -2px 6px #00000006; }
}
body:has(.marketplace-home, .product-showcase) #app:focus { outline: none; }

/* Keep the owned wordmark visible on every refreshed mobile public surface. */
body:has(.product-showcase) .site-header .brand > span { display:block !important; }

/* Optional retail entry remains separate from the unchanged service profile. */
.provider-retail-entry { display:grid; grid-template-columns:1fr; gap:16px; padding:22px; margin:0 0 24px; border:1px solid #ededed; border-radius:12px; background:#fff; color:#0f0f0f; }
.provider-retail-entry h2 { margin:0 0 8px; font-size:20px; line-height:28px; font-weight:700; }
.provider-retail-entry p { margin:6px 0; color:#545454; font-size:14px; line-height:21px; }
.provider-retail-entry small { font-size:12px; line-height:18px; color:#545454; }
.provider-retail-entry-actions { display:flex; flex-wrap:wrap; gap:12px; }
.provider-retail-entry-actions :is(a,button) { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; max-width:100%; text-decoration:none; white-space:normal; font-size:14px; line-height:20px; }
.provider-retail-entry-actions [data-provider-retail-only] { background:#6e42e5; color:#fff; }
.provider-retail-entry-actions svg { width:18px; height:18px; flex-shrink:0; }
.provider-retail-signup-help { font-size:12px; line-height:18px; color:#545454; margin:10px 0; }
@media(max-width:620px) { .provider-retail-entry { padding:16px; } .provider-retail-entry-actions { flex-direction:column; } .provider-retail-entry-actions :is(a,button) { width:100%; } }

/* Keep the existing consent control clear of the mobile navigation. */
@media(max-width:620px) {
  body:has(.marketplace-home .marketplace-bottom-nav,.product-showcase .marketplace-bottom-nav) .pnm-analytics-settings { bottom:calc(72px + env(safe-area-inset-bottom)); }
}
