/* Canonical marketplace shell. Card layout is intentionally outside this file. */

:root {
  --marketplace-canvas: #f7faf8;
  --marketplace-paper: #ffffff;
  --marketplace-ink: #12211d;
  --marketplace-text: #40504a;
  --marketplace-muted: #66766f;
  --marketplace-soft: #eaf2ed;
  --marketplace-soft-blue: #edf3f6;
  --marketplace-line: #dce7e1;
  --marketplace-line-strong: #c6d7cf;
  --marketplace-accent: #2f6f62;
  --marketplace-accent-deep: #1e554b;
  --marketplace-match: #b8cb63;
  --marketplace-info: #3f6f8a;
  --marketplace-success: #287250;
  --marketplace-warning: #8a6418;
  --marketplace-danger: #b13a34;
  --marketplace-radius-control: 12px;
  --marketplace-radius-panel: 22px;
  --marketplace-radius-feature: 30px;
  --marketplace-content: 1180px;
  --marketplace-wide: 1380px;
  --marketplace-shadow-overlay: 0 24px 72px rgba(18, 33, 29, 0.18);
  --marketplace-font: Onest, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --marketplace-header-height: 64px;
  --marketplace-space-1: 4px;
  --marketplace-space-2: 8px;
  --marketplace-space-3: 12px;
  --marketplace-space-4: 16px;
  --marketplace-space-5: 20px;
  --marketplace-space-6: 24px;
  --marketplace-space-8: 32px;
  --marketplace-space-10: 40px;
  --marketplace-shelf-gap: 14px;
  --marketplace-shelf-card-width: 246px;
  --marketplace-search-max: 1280px;
  --marketplace-search-surface: #173f38;
  --marketplace-search-active: #c9d777;
  --marketplace-comparison-column: 280px;

  /* Compatibility aliases. New work uses the marketplace-prefixed tokens. */
  --ui-canvas: var(--marketplace-canvas);
  --ui-paper: var(--marketplace-paper);
  --ui-ink: var(--marketplace-ink);
  --ui-text: var(--marketplace-text);
  --ui-muted: var(--marketplace-muted);
  --ui-soft: #f3f7f4;
  --ui-soft-2: var(--marketplace-soft);
  --ui-soft-3: var(--marketplace-soft-blue);
  --ui-accent: var(--marketplace-accent);
  --ui-accent-deep: var(--marketplace-accent-deep);
  --ui-info: var(--marketplace-info);
  --ui-match: var(--marketplace-match);
  --ui-line: var(--marketplace-line);
  --ui-line-strong: var(--marketplace-line-strong);
  --ui-radius: var(--marketplace-radius-control);
  --ui-radius-sm: 10px;
  --canvas: var(--marketplace-canvas);
  --paper: var(--marketplace-paper);
  --ink: var(--marketplace-ink);
  --text: var(--marketplace-text);
  --muted: var(--marketplace-muted);
  --soft: #f3f7f4;
  --soft-2: var(--marketplace-soft);
  --soft-3: var(--marketplace-soft-blue);
  --accent: var(--marketplace-accent);
  --accent-deep: var(--marketplace-accent-deep);
  --line: var(--marketplace-line);
  --line-strong: var(--marketplace-line-strong);
  --radius: var(--marketplace-radius-control);
  --radius-sm: 10px;
  --max: var(--marketplace-wide);
  --content: var(--marketplace-content);
  color-scheme: light;
}

html {
  min-width: 320px;
  background: var(--marketplace-canvas);
  scroll-padding-top: 88px;
}

body {
  min-width: 320px;
  color: var(--marketplace-text);
  background: var(--marketplace-canvas);
  font-family: var(--marketplace-font);
  letter-spacing: 0;
}

body,
button,
input,
select,
textarea {
  font-family: var(--marketplace-font);
}

body.marketplace-shell-lock {
  overflow: hidden;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(63, 111, 138, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(calc(-100% - 24px));
  padding: 10px 14px;
  border-radius: var(--marketplace-radius-control);
  color: #fff;
  background: var(--marketplace-ink);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header,
.site-header.inner-header,
.site-context-header {
  position: relative;
  z-index: 70;
  display: flex;
  width: 100%;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 12px max(20px, calc((100% - var(--marketplace-wide)) / 2));
  border: 0;
  border-bottom: 1px solid rgba(47, 111, 98, 0.14);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
}

.site-header .brand,
.site-context-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  color: var(--marketplace-ink);
  font-family: var(--marketplace-font);
  font-size: 20px;
  font-weight: 780;
  line-height: 1.15;
  text-decoration: none;
}

.site-header .brand::before,
.site-context-brand::before {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: url("/assets/brand-mark.svg?v=20260829-logo-v1-restore-01") center / contain no-repeat;
  box-shadow: none;
  content: "";
}

.header-actions,
.site-context-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header-link,
.header-cta,
.site-context-nav a,
.site-context-nav button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border-radius: var(--marketplace-radius-control);
  color: var(--marketplace-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.header-link:hover,
.header-link[aria-current="page"],
.site-context-nav a:hover,
.site-context-nav a[aria-current="page"] {
  color: var(--marketplace-accent-deep);
  background: var(--marketplace-soft);
}

.header-cta,
.site-context-nav .site-context-action {
  border: 1px solid var(--marketplace-accent);
  color: #fff;
  background: var(--marketplace-accent);
  box-shadow: 0 8px 20px rgba(30, 85, 75, 0.14);
}

.header-cta:hover,
.site-context-nav .site-context-action:hover {
  border-color: var(--marketplace-accent-deep);
  color: #fff;
  background: var(--marketplace-accent-deep);
}

.marketplace-shell-main,
.marketplace-shell-wide {
  width: min(var(--marketplace-wide), calc(100% - 48px));
  margin-inline: auto;
}

.marketplace-shell-content {
  width: min(var(--marketplace-content), calc(100% - 48px));
  margin-inline: auto;
}

.footer {
  display: flex;
  width: min(var(--marketplace-wide), calc(100% - 48px));
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 72px auto 0;
  padding: 28px 0 36px;
  border: 0;
  border-top: 1px solid var(--marketplace-line);
  color: var(--marketplace-muted);
  background: transparent;
}

.footer a,
.footer button {
  min-height: 44px;
  color: var(--marketplace-accent-deep);
}

.button,
.primary-action,
.secondary-action,
.ghost-action,
.text-button,
.cookie-button,
.cookie-button-secondary,
.client-logout {
  min-height: 44px;
  border-radius: var(--marketplace-radius-control);
  padding: 11px 16px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
}

.button.primary,
.primary-action,
.cookie-button {
  border: 1px solid var(--marketplace-accent);
  color: #fff;
  background: var(--marketplace-accent);
  box-shadow: 0 9px 22px rgba(30, 85, 75, 0.14);
}

.button.primary:hover,
.primary-action:hover,
.cookie-button:hover {
  transform: none;
  border-color: var(--marketplace-accent-deep);
  background: var(--marketplace-accent-deep);
}

.button.secondary,
.secondary-action,
.cookie-button-secondary,
.client-logout,
.ghost-action {
  border: 1px solid var(--marketplace-line-strong);
  color: var(--marketplace-accent-deep);
  background: var(--marketplace-paper);
}

.button.secondary:hover,
.secondary-action:hover,
.cookie-button-secondary:hover,
.client-logout:hover,
.ghost-action:hover {
  transform: none;
  border-color: var(--marketplace-accent);
  background: var(--marketplace-soft);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.field input,
.field select,
.field textarea {
  min-height: 46px;
  border: 1px solid var(--marketplace-line-strong);
  border-radius: var(--marketplace-radius-control);
  color: var(--marketplace-ink);
  background: var(--marketplace-paper);
  box-shadow: inset 0 1px 0 rgba(18, 33, 29, 0.02);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--marketplace-accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 98, 0.12);
}

.marketplace-sticky-search {
  position: sticky;
  top: 8px;
  z-index: 60;
  width: min(var(--marketplace-wide), calc(100% - 32px));
  margin-inline: auto;
  border: 1px solid var(--marketplace-line);
  border-radius: var(--marketplace-radius-panel);
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(18, 33, 29, 0.1);
  backdrop-filter: blur(16px);
}

.marketplace-sticky-search[hidden] {
  display: none;
}

.marketplace-tabs,
.ui-tabs,
.marketplace-chip-row,
.ui-chip-row,
.ui-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketplace-tabs,
.ui-tabs,
.marketplace-chip-row,
.ui-chip-row {
  overflow-x: auto;
  scrollbar-width: none;
}

.marketplace-tabs::-webkit-scrollbar,
.ui-tabs::-webkit-scrollbar,
.marketplace-chip-row::-webkit-scrollbar,
.ui-chip-row::-webkit-scrollbar {
  display: none;
}

.marketplace-tab,
.ui-tabs :is(a, button),
.marketplace-chip,
.ui-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--marketplace-line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.marketplace-tab[aria-selected="true"],
.marketplace-tab[aria-current="page"],
.ui-tabs :is(a, button)[aria-current="page"],
.marketplace-chip[aria-pressed="true"],
.ui-chip[aria-pressed="true"] {
  border-color: var(--marketplace-accent);
  color: var(--marketplace-accent-deep);
  background: var(--marketplace-soft);
}

.marketplace-status,
.ui-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--marketplace-text);
  background: var(--marketplace-soft);
  font-size: 12px;
  font-weight: 750;
}

.marketplace-status::before,
.ui-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.marketplace-status.is-success,
.ui-status.is-success { color: var(--marketplace-success); }
.marketplace-status.is-warning,
.ui-status.is-warning { color: var(--marketplace-warning); }
.marketplace-status.is-danger,
.ui-status.is-danger { color: var(--marketplace-danger); }
.marketplace-status.is-info,
.ui-status.is-info { color: var(--marketplace-info); }

.marketplace-empty,
.marketplace-error,
.marketplace-success,
.marketplace-loading,
.ui-alert {
  display: grid;
  min-height: 160px;
  place-content: center;
  gap: 10px;
  border: 1px solid var(--marketplace-line);
  border-radius: var(--marketplace-radius-panel);
  padding: 28px;
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
  text-align: center;
}

.marketplace-loading[aria-busy="true"] {
  background: var(--marketplace-soft);
}

.marketplace-error { border-color: rgba(177, 58, 52, 0.34); }
.marketplace-success { border-color: rgba(40, 114, 80, 0.34); }

.marketplace-dialog[hidden] {
  display: none;
}

.marketplace-dialog {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 33, 29, 0.48);
}

.marketplace-dialog-panel {
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  border-radius: var(--marketplace-radius-panel);
  padding: 24px;
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
  box-shadow: var(--marketplace-shadow-overlay);
}

/* WB Travel foundation. Page worktrees opt in with .marketplace-public-shell. */
.marketplace-public-shell {
  overflow-x: clip;
}

.marketplace-public-shell .marketplace-public-header {
  min-height: var(--marketplace-header-height);
  gap: var(--marketplace-space-5);
  padding-block: 10px;
}

@media (min-width: 821px) {
  .marketplace-public-shell .marketplace-public-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .marketplace-public-shell .marketplace-public-header .brand {
    grid-column: 1;
    justify-self: start;
  }

  .marketplace-primary-nav {
    grid-column: 2;
    justify-self: center;
  }

  .marketplace-header-tools {
    grid-column: 3;
    justify-self: end;
  }
}

.marketplace-primary-nav,
.marketplace-header-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--marketplace-space-1);
}

.marketplace-primary-nav {
  flex: 1 1 auto;
  justify-content: center;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.marketplace-primary-nav::-webkit-scrollbar {
  display: none;
}

.marketplace-primary-nav a,
.marketplace-header-tool {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--marketplace-text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.marketplace-primary-nav a:hover,
.marketplace-primary-nav a[aria-current="page"],
.marketplace-header-tool:hover {
  color: var(--marketplace-accent-deep);
  background: var(--marketplace-soft);
}

.marketplace-header-tool {
  width: 40px;
  padding: 8px;
  border: 0;
  background: transparent;
}

.marketplace-header-tool svg {
  width: 20px;
  height: 20px;
}

.marketplace-hero-stack {
  position: relative;
  width: min(var(--marketplace-wide), calc(100% - 48px));
  margin: var(--marketplace-space-4) auto 0;
  padding-bottom: 72px;
}

.marketplace-hero {
  position: relative;
  display: grid;
  min-height: 350px;
  align-items: center;
  overflow: hidden;
  border-radius: var(--marketplace-radius-feature);
  padding: 48px 56px 92px;
  color: var(--marketplace-ink);
  background: #dfece6;
  isolation: isolate;
}

.marketplace-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marketplace-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 250, 248, 0.72);
}

.marketplace-hero-copy {
  width: min(560px, 56%);
}

.marketplace-hero-copy h1 {
  margin: 0;
  color: var(--marketplace-ink);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
}

.marketplace-hero-copy p {
  max-width: 520px;
  margin: var(--marketplace-space-4) 0 0;
  color: var(--marketplace-text);
  font-size: 17px;
  line-height: 1.5;
}

.marketplace-search-panel {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: min(var(--marketplace-search-max), calc(100% - 56px));
  transform: translateX(-50%);
  border: 1px solid var(--marketplace-search-surface);
  border-radius: var(--marketplace-radius-panel);
  padding: 12px;
  color: #fff;
  background: var(--marketplace-search-surface);
  box-shadow: 0 18px 44px rgba(18, 54, 46, 0.2);
}

.marketplace-search-tabs {
  display: flex;
  align-items: center;
  gap: var(--marketplace-space-1);
  margin-bottom: var(--marketplace-space-2);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.marketplace-search-tabs::-webkit-scrollbar {
  display: none;
}

.marketplace-search-tabs :is(a, button) {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
}

.marketplace-search-tabs :is(a, button):hover,
.marketplace-search-tabs :is(a, button)[aria-current="page"],
.marketplace-search-tabs :is(a, button)[aria-selected="true"] {
  color: var(--marketplace-ink);
  background: var(--marketplace-search-active);
}

.marketplace-search-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(130px, 1fr)) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--marketplace-line-strong);
  border-radius: 14px;
  background: var(--marketplace-paper);
}

.marketplace-search-field {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  padding: 9px 13px;
  border-right: 1px solid var(--marketplace-line);
}

.marketplace-search-field > span {
  color: var(--marketplace-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.marketplace-search-field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--marketplace-ink);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 680;
}

.marketplace-search-field :is(input, select):focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

.marketplace-search-field:focus-within {
  box-shadow: inset 0 0 0 2px rgba(47, 111, 98, 0.34);
}

.marketplace-search-submit {
  min-width: 120px;
  min-height: 58px;
  margin: 5px;
  border: 1px solid var(--marketplace-accent);
  border-radius: 11px;
  padding: 10px 18px;
  color: #fff;
  background: var(--marketplace-accent);
  font-size: 14px;
  font-weight: 780;
}

.marketplace-search-submit:hover {
  border-color: var(--marketplace-accent-deep);
  background: var(--marketplace-accent-deep);
}

.marketplace-search-panel :is(.catalog-search-status, [data-marketplace-search-status]) {
  color: rgba(255, 255, 255, 0.76);
}

.marketplace-shelf-section {
  width: min(var(--marketplace-wide), calc(100% - 48px));
  margin: 20px auto 0;
}

.marketplace-shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--marketplace-space-4);
  margin-bottom: var(--marketplace-space-3);
}

.marketplace-shelf-heading h2 {
  margin: 0;
  color: var(--marketplace-ink);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.marketplace-shelf-heading a {
  color: var(--marketplace-accent-deep);
  font-size: 14px;
  font-weight: 740;
}

.marketplace-product-shelf {
  display: grid;
  grid-auto-columns: var(--marketplace-shelf-card-width);
  grid-auto-flow: column;
  gap: var(--marketplace-shelf-gap);
  overflow-x: auto;
  padding: 2px 0 12px;
  scroll-padding-inline: 2px;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
}

.marketplace-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--marketplace-line);
  border-radius: 8px;
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
  scroll-snap-align: start;
}

.marketplace-product-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.marketplace-product-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--marketplace-soft);
}

.marketplace-product-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.marketplace-card-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 5px;
}

.marketplace-card-tool {
  display: inline-grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(18, 33, 29, 0.1);
  border-radius: 50%;
  padding: 0;
  color: var(--marketplace-ink);
  background: rgba(255, 255, 255, 0.94);
}

.marketplace-card-tool[aria-pressed="true"] {
  color: #fff;
  background: var(--marketplace-accent);
}

.marketplace-product-card-body {
  display: grid;
  gap: 5px;
  padding: 11px 11px 13px;
}

.marketplace-product-card-name {
  margin: 0;
  overflow: hidden;
  color: var(--marketplace-ink);
  font-size: 15px;
  font-weight: 780;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-product-card-method,
.marketplace-product-card-offer,
.marketplace-product-card-rating,
.marketplace-product-card-availability {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.marketplace-product-card-method {
  overflow: hidden;
  color: var(--marketplace-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-product-card-help {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--marketplace-text);
  font-size: 10.5px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marketplace-product-card-help strong {
  color: var(--marketplace-muted);
  font-weight: 500;
}

.marketplace-product-card-offer {
  color: var(--marketplace-ink);
  font-weight: 760;
}

.marketplace-product-card-rating {
  color: var(--marketplace-text);
}

.marketplace-product-card-rating strong {
  color: var(--marketplace-warning);
}

.marketplace-product-card-availability {
  overflow: hidden;
  color: var(--marketplace-success);
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-skeleton {
  position: relative;
  overflow: hidden;
  color: transparent;
  background: #e5ece8;
}

.marketplace-skeleton::after {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.42);
  animation: marketplace-skeleton-pulse 1.4s ease-in-out infinite alternate;
  content: "";
}

.marketplace-skeleton-line {
  min-height: 12px;
  border-radius: 6px;
}

@keyframes marketplace-skeleton-pulse {
  from { opacity: 0.15; }
  to { opacity: 0.75; }
}

/* Stage 14.1: shared surface language for client and specialist accounts. */
body[data-page="login"] .auth-panel,
body[data-page="login"] .auth-card,
body[data-page="home"] .auth-panel,
body[data-page="home"] .auth-card,
.cabinet-shell :is(.cabinet-hero, .action-panel, .specialist-journey-panel, .dashboard-card) {
  border-color: var(--marketplace-line);
  border-radius: var(--marketplace-radius-panel);
  box-shadow: 0 16px 42px rgba(18, 54, 46, 0.08);
}

body[data-page="login"] .auth-panel,
body[data-page="home"] .auth-panel {
  border-top: 0;
  background: var(--marketplace-soft);
}

body[data-page="login"] .auth-summary > div,
body[data-page="home"] .auth-summary > div {
  border-radius: 16px;
  box-shadow: none;
}

body[data-page="login"] :is(.primary-action, .secondary-action, .ghost-action),
body[data-page="home"] :is(.primary-action, .secondary-action, .ghost-action) {
  min-height: 44px;
  border-radius: var(--marketplace-radius-control);
}

/* Round 2 shared saved-choice contract. */
.favorite-toggle,
[data-favorite-toggle] {
  display: inline-flex;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--marketplace-line-strong);
  border-radius: 50%;
  padding: 0;
  color: var(--marketplace-ink);
  background: var(--marketplace-paper);
  box-shadow: 0 5px 14px rgba(18, 33, 29, 0.1);
}

.favorite-toggle:hover,
[data-favorite-toggle]:hover {
  border-color: var(--marketplace-accent);
  background: var(--marketplace-soft);
}

.favorite-toggle[aria-pressed="true"],
.favorite-toggle.is-selected,
[data-favorite-toggle][aria-pressed="true"] {
  border-color: var(--marketplace-accent);
  color: #fff;
  background: var(--marketplace-accent);
}

.favorite-toggle[aria-pressed="true"] img,
.favorite-toggle.is-selected img,
[data-favorite-toggle][aria-pressed="true"] img {
  filter: brightness(0) invert(1);
}

:is(.marketplace-header-tool, .marketplace-header-action)[href^="/compare/"],
body:not(:has([data-compare-list])) [data-compare-toggle] {
  display: none !important;
}

.marketplace-favorites-affordance {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 92;
  margin: 0;
}

.marketplace-favorites-affordance[hidden] {
  display: none;
}

body:has(.cookie-banner:not([hidden])) .marketplace-favorites-affordance {
  display: none;
}

.marketplace-favorites-affordance > a {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 9px 11px 9px 13px;
  color: #fff;
  background: var(--marketplace-search-surface);
  box-shadow: 0 14px 34px rgba(18, 33, 29, 0.22);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.marketplace-favorites-affordance > a img {
  filter: brightness(0) invert(1);
}

.marketplace-favorites-affordance > a strong {
  display: inline-grid;
  min-width: 26px;
  min-height: 26px;
  place-items: center;
  border-radius: 50%;
  color: var(--marketplace-ink);
  background: var(--marketplace-search-active);
  font-size: 12px;
}

.marketplace-favorites-affordance > p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.has-marketplace-favorites-affordance {
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.marketplace-public-footer {
  width: 100%;
  margin: 72px 0 0;
  padding: 38px max(24px, calc((100% - var(--marketplace-wide)) / 2)) 32px;
  border-top: 1px solid var(--marketplace-line);
  color: var(--marketplace-text);
  background: var(--marketplace-paper);
}

.marketplace-public-footer-inner {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 30px 46px;
  width: min(100%, var(--marketplace-wide));
  margin-inline: auto;
}

.marketplace-public-footer-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--marketplace-ink);
  font-size: 19px;
  font-weight: 780;
  text-decoration: none;
}

.marketplace-public-footer-brand .brand::before {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: url("/assets/brand-mark-32.png") center / contain no-repeat;
  content: "";
}

.marketplace-public-footer-brand p {
  margin: 14px 0 0;
  color: var(--marketplace-muted);
  font-size: 13px;
  line-height: 1.55;
}

.marketplace-public-footer-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.marketplace-public-footer-groups section,
.marketplace-public-footer-groups nav {
  min-width: 0;
}

.marketplace-public-footer-groups h2 {
  margin: 0 0 10px;
  color: var(--marketplace-ink);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.25;
}

.marketplace-public-footer-groups nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.marketplace-public-footer-groups :is(a, button) {
  min-height: 28px;
  border: 0;
  padding: 4px 0;
  color: var(--marketplace-muted);
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.marketplace-public-footer-groups :is(a, button):hover {
  color: var(--marketplace-accent-deep);
}

.marketplace-public-footer-legal {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--marketplace-line);
  color: var(--marketplace-muted);
  font-size: 11px;
}

.marketplace-public-footer-legal p {
  margin: 0;
}

.comparison-grid {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.comparison-matrix {
  width: max-content;
  min-width: 100%;
}

.comparison-matrix-row {
  grid-template-columns: minmax(180px, 220px) repeat(var(--comparison-columns), var(--marketplace-comparison-column)) !important;
}

@media (max-width: 820px) {
  html { scroll-padding-top: 76px; }

  .marketplace-public-footer {
    margin-top: 48px;
    padding: 32px 16px calc(96px + env(safe-area-inset-bottom));
  }

  .marketplace-public-footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .marketplace-public-footer-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .marketplace-public-footer-legal {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header,
  .site-header.inner-header,
  .site-context-header {
    min-height: 64px;
    gap: 12px;
    padding: 10px 16px;
  }

  .site-header .brand,
  .site-context-brand {
    min-width: 0;
    font-size: 17px;
  }

  .site-header .brand::before,
  .site-context-brand::before {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .header-actions,
  .site-context-nav {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar,
  .site-context-nav::-webkit-scrollbar {
    display: none;
  }

  .marketplace-shell-main,
  .marketplace-shell-wide,
  .marketplace-shell-content,
  .footer {
    width: min(100% - 32px, var(--marketplace-wide));
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 48px;
    padding-bottom: 92px;
  }

  .marketplace-sticky-search {
    top: 6px;
    width: calc(100% - 20px);
    border-radius: 18px;
  }

  .marketplace-dialog {
    align-items: end;
    padding: 12px;
  }

  .marketplace-dialog-panel {
    width: 100%;
    max-height: min(820px, calc(100dvh - 24px));
    border-radius: 22px 22px 14px 14px;
  }

  .marketplace-public-shell .marketplace-public-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .marketplace-public-shell .marketplace-public-header .brand {
    max-width: none;
  }

  .marketplace-primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .marketplace-header-tools {
    grid-column: 2;
    grid-row: 1;
  }

  .marketplace-hero-stack,
  .marketplace-shelf-section {
    width: calc(100% - 24px);
  }

  .marketplace-hero-stack {
    margin-top: 12px;
    padding-bottom: 186px;
  }

  .marketplace-hero {
    min-height: 300px;
    border-radius: 22px;
    padding: 30px 24px 96px;
  }

  .marketplace-hero-copy {
    width: min(520px, 82%);
  }

  .marketplace-hero-copy h1 {
    font-size: 34px;
  }

  .marketplace-search-panel {
    left: 50%;
    width: calc(100% - 20px);
    padding: 10px;
  }

  .marketplace-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketplace-search-field {
    border-right: 1px solid var(--marketplace-line);
    border-bottom: 1px solid var(--marketplace-line);
  }

  .marketplace-search-field:nth-of-type(even) {
    border-right: 0;
  }

  .marketplace-search-submit {
    grid-column: 1 / -1;
    min-height: 46px;
  }

  .marketplace-product-shelf {
    grid-auto-columns: min(246px, 74vw);
  }
}

@media (max-width: 560px) {
  .marketplace-public-footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 18px;
  }

  .marketplace-favorites-affordance {
    display: none;
  }

  .header-link:not([aria-current="page"]),
  .site-context-nav a:not(.site-context-action):not([aria-current="page"]) {
    display: none;
  }

  .site-header .brand,
  .site-context-brand {
    max-width: 54vw;
    white-space: normal;
  }

  .marketplace-public-shell .marketplace-public-header .brand {
    max-width: none;
  }

  .marketplace-primary-nav a {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 13px;
  }

  .marketplace-hero-stack {
    padding-bottom: 196px;
  }

  .marketplace-hero {
    min-height: 286px;
    padding: 26px 20px 96px;
  }

  .marketplace-hero-copy {
    width: 88%;
  }

  .marketplace-hero-copy h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .marketplace-hero-copy p {
    font-size: 15px;
  }

  .marketplace-shelf-heading h2 {
    font-size: 21px;
  }
}

@media (max-width: 350px) {
  .marketplace-public-footer-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketplace-favorites-affordance > a {
    min-height: 48px;
    padding-inline: 11px;
  }

  .marketplace-public-shell .marketplace-public-header {
    padding-inline: 12px;
  }

  .marketplace-header-tools {
    gap: 0;
  }

  .marketplace-header-tool {
    width: 38px;
  }

  .marketplace-primary-nav {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .marketplace-hero-stack,
  .marketplace-shelf-section {
    width: calc(100% - 16px);
  }

  .marketplace-hero-stack {
    padding-bottom: 308px;
  }

  .marketplace-hero {
    min-height: 276px;
    padding-inline: 16px;
  }

  .marketplace-hero-copy {
    width: 92%;
  }

  .marketplace-hero-copy h1 {
    font-size: 27px;
  }

  .marketplace-product-shelf {
    grid-auto-columns: min(238px, 78vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
