:root {
  --shell-max-width: 1200px;
  --shell-padding: 24px;
  --indicator-circle-size: 22px;
  --primary: #1648c5;
  --bg: #f1f4fa;
  --surface: #ffffff;
  --text-primary: #0a1428;
  --text-secondary: #4a566f;
  --border: #cdd7ea;
  --border-subtle: #d8e1f1;
  --border-strong: #a8b7d5;
  --accent: #1648c5;
  --accent-2: #0f2f70;
  --gradient: linear-gradient(135deg, #1648c5, #0a1330);
  --sunken: #e6ecf7;
  --panel-muted: #eef2fb;
  --panel-background: #ffffff;
  --muted-foreground: #4a566f;
  --shadow-xs: 0 6px 14px rgba(10, 20, 40, 0.05);
  --shadow-sm: 0 12px 30px rgba(10, 20, 40, 0.08);
  --tag-bg: #e1e9f7;
  --radius-lg: 16px;
  --radius-pill: 24px;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 10px 26px rgba(0, 0, 0, 0.06);
  --announcement-offset: 0px;
  --focus-ring: rgba(22, 72, 197, 0.4);
  --menu-icon-gap: 8px;
  --primary-500: #1648c5;
  --primary-100: #e3ecff;
  --primary-700: #0f2f70;
  --success-500: #2f9e62;
  --success-100: #e1f6ea;
  --success-700: #1d6a3f;
  --highlight-500: #f0b429;
  --highlight-100: #fff3d6;
  --highlight-700: #b98010;
  --draft-500: #6b6eff;
  --draft-100: #ebeaff;
  --draft-700: #4648b8;
  --danger-500: #e04b4b;
  --danger-100: #ffe3e3;
  --danger-700: #b13636;
  --gray-900: #0a1428;
  --gray-700: #4a566f;
  --gray-500: #7b879f;
  --gray-200: #d8e1f1;
  --gray-50: #f1f4fa;
  --pill-bg: #1d3f99;
  --pill-bg-hover: #16337e;
  --pill-border: #112968;
  --pill-border-hover: #0d204f;
  --pill-text: #f7f9ff;
  --hub-neutral-black: #0a1428;
  --hub-neutral-blue-900: #111f42;
  --hub-text-strong: #0a1428;
  --hub-text-default: #243552;
  --hub-text-muted: #4a566f;
  --hub-surface-base: #ffffff;
  --hub-surface-muted: #eef2fb;
  --hub-card-radius: 16px;
  --hub-card-shadow: 0 12px 30px rgba(10, 20, 40, 0.08);
  --hub-space-12: 12px;
  --hub-space-16: 16px;
  --hub-space-24: 24px;
  --hub-heading-xl: 2.2rem;
  --hub-heading-lg: 1.3rem;
  --hub-heading-md: 1.1rem;
  --hub-body-lg: 1.05rem;
  --hub-body-md: 0.96rem;
}

.fa-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.fa-solid {
  fill: currentColor;
}

[data-theme="light"] {
  --primary: #1648c5;
  --bg: #f1f4fa;
  --surface: #ffffff;
  --text-primary: #0a1428;
  --text-secondary: #4a566f;
  --border: #cdd7ea;
  --border-subtle: #d8e1f1;
  --border-strong: #a8b7d5;
  --accent: #1648c5;
  --accent-2: #0f2f70;
  --gradient: linear-gradient(135deg, #1648c5, #0a1330);
  --sunken: #e6ecf7;
  --panel-muted: #eef2fb;
  --panel-background: #ffffff;
  --muted-foreground: #4a566f;
  --shadow-xs: 0 6px 14px rgba(10, 20, 40, 0.05);
  --shadow-sm: 0 12px 30px rgba(10, 20, 40, 0.08);
  --tag-bg: #e1e9f7;
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 10px 26px rgba(0, 0, 0, 0.06);
  --primary-500: #1648c5;
  --primary-100: #e3ecff;
  --primary-700: #0f2f70;
  --success-500: #2f9e62;
  --success-100: #e1f6ea;
  --success-700: #1d6a3f;
  --highlight-500: #f0b429;
  --highlight-100: #fff3d6;
  --highlight-700: #b98010;
  --draft-500: #6b6eff;
  --draft-100: #ebeaff;
  --draft-700: #4648b8;
  --danger-500: #e04b4b;
  --danger-100: #ffe3e3;
  --danger-700: #b13636;
  --gray-900: #0a1428;
  --gray-700: #4a566f;
  --gray-500: #7b879f;
  --gray-200: #d8e1f1;
  --gray-50: #f1f4fa;
  --pill-bg: #1d3f99;
  --pill-bg-hover: #16337e;
  --pill-border: #112968;
  --pill-border-hover: #0d204f;
  --pill-text: #f7f9ff;
  --surface-1: #fafafa;
  --surface-2: #f0f0f0;
  --muted: #888;
}

[data-theme="dark"] {
  --primary: #2f6ae8;
  --bg: #070d18;
  --surface: #0d1424;
  --text-primary: #e9eef9;
  --text-secondary: #a6b2c9;
  --border: #1f2a42;
  --border-subtle: #1f2a42;
  --border-strong: #3a4b6c;
  --accent: #2f6ae8;
  --accent-2: #9dc2ff;
  --gradient: linear-gradient(135deg, #2f6ae8, #0a1024);
  --sunken: #0b1322;
  --panel-muted: #111b30;
  --panel-background: #111b30;
  --muted-foreground: #a6b2c9;
  --shadow-xs: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.38);
  --tag-bg: #16233a;
  --shadow-soft: 0 16px 46px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.2);
  --primary-500: #2f6ae8;
  --primary-100: #142245;
  --primary-700: #9dc2ff;
  --success-500: #33c07a;
  --success-100: #133528;
  --success-700: #b6f2d4;
  --highlight-500: #f2c14f;
  --highlight-100: #3a2a0d;
  --highlight-700: #ffe1a3;
  --draft-500: #7b7dff;
  --draft-100: #1d1e47;
  --draft-700: #c9caff;
  --danger-500: #ff6b6b;
  --danger-100: #3a1515;
  --danger-700: #ffb3b3;
  --gray-900: #e9eef9;
  --gray-700: #a6b2c9;
  --gray-500: #7d8aa6;
  --gray-200: #1f2a42;
  --gray-50: #0b111d;
  --pill-bg: #2a56be;
  --pill-bg-hover: #234aa6;
  --pill-border: #4f83ff;
  --pill-border-hover: #79a2ff;
  --pill-text: #f7f9ff;
  --hub-neutral-black: #e9eef9;
  --hub-neutral-blue-900: #9dc2ff;
  --hub-text-strong: #e9eef9;
  --hub-text-default: #c7d4ed;
  --hub-text-muted: #a6b2c9;
  --hub-surface-base: #0d1424;
  --hub-surface-muted: #111b30;
  --hub-card-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  --surface-1: #111b30;
  --surface-2: #0b1322;
  --muted: #a6b2c9;
}

.hub-shared-page {
  gap: var(--hub-space-24);
}

.hub-shared-card {
  background: var(--hub-surface-base);
  border: 1px solid var(--border);
  border-radius: var(--hub-card-radius);
  box-shadow: var(--hub-card-shadow);
}

.hub-shared-card-muted {
  background: var(--hub-surface-muted);
}

.hub-stack-12 {
  display: grid;
  gap: var(--hub-space-12);
}

.hub-stack-16 {
  display: grid;
  gap: var(--hub-space-16);
}

.hub-stack-24 {
  display: grid;
  gap: var(--hub-space-24);
}

.hub-heading-xl,
.hub-heading-lg,
.hub-heading-md,
.hub-body-lg,
.hub-body-md {
  margin: 0;
  color: var(--hub-text-strong);
}

.hub-heading-xl {
  font-size: var(--hub-heading-xl);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hub-heading-lg {
  font-size: var(--hub-heading-lg);
  letter-spacing: -0.01em;
  line-height: 1.28;
}

.hub-heading-md {
  font-size: var(--hub-heading-md);
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.hub-body-lg {
  font-size: var(--hub-body-lg);
  line-height: 1.6;
  color: var(--hub-text-default);
}

.hub-body-md {
  font-size: var(--hub-body-md);
  line-height: 1.55;
  color: var(--hub-text-muted);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  text-align: left;
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.page-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 0 var(--shell-padding);
}

.shell-flush .page-shell {
  padding-inline: 0;
}

.shell-flush #announcement-banner .banner-shell,
.shell-flush > header.page-shell .header-shell {
  padding-inline: var(--shell-padding);
}

header {
  padding: 24px 0 12px;
}

.announcement-banner {
  width: 100%;
  background: var(--panel-muted);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.banner-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 4px 0;
}

#announcement-banner .banner-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
}

.banner-text {
  margin: 0;
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.25;
}

.banner-label {
  font-weight: 600;
}

.banner-dismiss {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.banner-dismiss:hover,
.banner-dismiss:focus-visible {
  background: var(--surface);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.banner-dismiss:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* ── Progress badge (inline "52% Ready" pill) ── */

.progress-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary);
  background: var(--accent-soft);
  border: 1px solid var(--primary);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.progress-badge:hover,
.progress-badge:focus-visible {
  background: var(--primary);
  color: #fff;
}

.progress-badge:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

/* ── Progress dropdown panel ── */

.progress-dropdown {
  width: 100%;
  background: var(--panel-muted);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.progress-dropdown.hidden {
  display: none;
}

.progress-dropdown-shell {
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 12px 0 14px;
}

.progress-heading {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-type-label {
  flex: 0 0 80px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.progress-track {
  flex: 1 1 auto;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-pct {
  flex: 0 0 36px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

@media (max-width: 600px) {
  .progress-badge {
    display: flex;
    margin-left: 0;
    margin-top: 4px;
    width: fit-content;
  }

  .progress-type-label {
    flex: 0 0 68px;
    font-size: 0.74rem;
  }
}


.impersonation-banner {
  width: 100%;
  background: #6b4423;
  color: #fff7e9;
  border-bottom: 1px solid rgba(255, 247, 233, 0.2);
}

.impersonation-banner-shell {
  min-height: 44px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.impersonation-banner-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.impersonation-end-session {
  border-color: rgba(255, 247, 233, 0.65);
  color: #fff7e9;
  background: rgba(255, 247, 233, 0.08);
}

.impersonation-end-session:hover,
.impersonation-end-session:focus-visible {
  border-color: #fff7e9;
  background: rgba(255, 247, 233, 0.2);
}

.toast-container {
  position: fixed;
  top: calc(16px + var(--announcement-offset));
  right: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-card {
  width: min(360px, calc(100vw - 32px));
  background: var(--toast-bg, var(--surface));
  color: var(--text-primary);
  border-radius: 14px;
  border: 1px solid var(--toast-border, var(--border-subtle));
  box-shadow: var(--shadow-card);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.toast-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-card.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--toast-accent, var(--accent));
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.toast-message {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.toast-message:empty {
  display: none;
}

.toast-action {
  align-self: flex-start;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.toast-action:hover,
.toast-action:focus-visible {
  text-decoration: underline;
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: color-mix(in srgb, var(--toast-accent, var(--accent)) 12%, transparent);
  color: var(--text-primary);
  outline: 2px solid transparent;
}

.toast--info {
  --toast-accent: var(--primary-500);
  --toast-bg: var(--primary-100);
  --toast-border: color-mix(in srgb, var(--primary-500) 20%, transparent);
}

.toast--success {
  --toast-accent: var(--success-500);
  --toast-bg: var(--success-100);
  --toast-border: color-mix(in srgb, var(--success-500) 20%, transparent);
}

.toast--warning {
  --toast-accent: var(--highlight-500);
  --toast-bg: var(--highlight-100);
  --toast-border: color-mix(in srgb, var(--highlight-500) 20%, transparent);
}

.toast--restriction {
  --toast-accent: var(--danger-500);
  --toast-bg: var(--danger-100);
  --toast-border: color-mix(in srgb, var(--danger-500) 20%, transparent);
}

.toast-icon--spinner svg {
  animation: toast-spinner-rotate 0.9s linear infinite;
}

.toast-progress {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--toast-accent, var(--accent)) 18%, transparent);
}

.toast-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--toast-accent, var(--accent));
  transition: width 0.18s ease;
}

.toast-progress-bar--indeterminate {
  width: 45%;
  animation: toast-progress-indeterminate 1.2s ease-in-out infinite;
}

@keyframes toast-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(240%);
  }
}

@media (max-width: 720px) {
  .banner-text {
    font-size: 0.78rem;
  }
}

.header-shell {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  width: 100%;
  margin: 0;
  padding: 12px var(--shell-padding);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(10, 20, 40, 0.04);
}

[data-theme="dark"] .header-shell {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.header-brand {
  justify-self: start;
}

.header-search {
  display: flex;
  justify-content: center;
  width: 100%;
}

.primary-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.95rem;
}

.primary-nav-container {
  display: contents;
}

.nav-toggle {
  display: none !important;
  align-items: center;
  gap: 6px;
}

@media (max-width: 768px) {
  .header-shell {
    grid-template-columns: 1fr;
  }

  .header-brand {
    justify-self: center;
  }

  .header-search {
    order: 3;
  }

  .header-actions {
    order: 2;
  }

  .nav-toggle {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
  }

  .primary-nav-container {
    display: block;
    width: 100%;
    flex-basis: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .primary-nav-container.is-open {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-nav {
    width: 100%;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
  }

  .primary-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  .header-user-controls {
    width: 100%;
    justify-content: center;
  }
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-card);
  min-width: 240px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 12;
}

.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown.is-active .nav-dropdown-toggle {
  border-color: var(--accent);
  box-shadow: none;
  background: transparent;
}

.dropdown-link {
  display: block;
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-primary);
  background: transparent;
}

.dropdown-link:hover,
.dropdown-link:focus-visible {
  border-color: var(--border);
  background: var(--sunken);
}

.dropdown-link.is-active {
  border-color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-link.is-active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
  background: var(--sunken);
  outline: none;
}

.nav-link.is-active:hover,
.nav-link.is-active:focus-visible {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.global-search {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 360px;
  max-width: 520px;
}

@media (max-width: 768px) {
  .global-search {
    min-width: 0;
    max-width: 100%;
  }
}

.global-search input[type="search"] {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.9rem;
  background: var(--panel-muted);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.global-search input[type="search"]::placeholder {
  color: var(--text-secondary);
}

.global-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(22, 72, 197, 0.16);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(10, 20, 40, 0.12), 0 2px 6px rgba(10, 20, 40, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}

[data-theme="dark"] .global-search-results {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.search-results-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-section-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  padding: 4px 4px 2px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text-primary);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  border-color: var(--border);
  background: var(--sunken);
  outline: none;
}

.search-result-title {
  font-weight: 600;
}

.search-result-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.search-result-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sunken);
}

.search-result-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 6px;
}

.auth-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-inline-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 280px;
  margin: 0;
  padding: 2px 0;
  color: var(--danger-700);
  font-size: 0.75rem;
  line-height: 1.2;
}

.login-inline-status:empty,
.login-inline-status.hidden {
  display: none;
}

.login-inline-status-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.login-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px;
  width: min(320px, calc(100vw - 2 * var(--pad-mobile)));
  max-width: calc(100vw - 2 * var(--pad-mobile));
  box-shadow: 0 16px 40px rgba(10, 20, 40, 0.12), 0 2px 6px rgba(10, 20, 40, 0.04);
  z-index: 10;
}

[data-theme="dark"] .login-dropdown {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.login-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.google-signin-button {
  display: flex;
  justify-content: center;
  width: 100%;
}

.google-signin-button > div,
.google-signin-button iframe {
  width: 100% !important;
  max-width: 100%;
  height: 40px;
}

.login-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field.inline input {
  width: 100%;
}

.form-actions.compact {
  margin-top: 6px;
}

.form-actions.compact .primary-pill {
  padding: 10px 14px;
}

.form-status {
  min-height: 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-status.error {
  color: #ff7b7b;
}

.form-status.success {
  color: var(--accent-2);
}

.form-field-error {
  margin: 6px 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
  color: #ff7b7b;
}

.form-field-error.hidden {
  display: none;
}

.header-user-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-menu {
  position: relative;
}

.user-menu-toggle {
  border: 1px solid transparent;
  background: var(--panel-muted);
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible {
  background: var(--sunken);
  border-color: var(--border-subtle);
  outline: none;
}

.user-menu-toggle[aria-expanded="true"] {
  background: var(--sunken);
  border-color: var(--border-subtle);
}

.user-menu-toggle-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: var(--text-secondary);
  transition: transform 180ms ease;
}

.user-menu-toggle-chevron .fa-icon {
  width: 12px;
  height: 12px;
  display: block;
}

.user-menu-toggle[aria-expanded="true"] .user-menu-toggle-chevron {
  transform: rotate(180deg);
}

.user-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(10, 20, 40, 0.12), 0 2px 6px rgba(10, 20, 40, 0.04);
  min-width: 280px;
  width: 300px;
  max-width: 320px;
}

[data-theme="dark"] .user-summary {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 10;
}

.user-menu-identity {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: background-color 180ms ease;
}

.user-menu-identity:hover,
.user-menu-identity:focus-visible {
  background: var(--sunken);
  outline: none;
}

.user-menu-identity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 40px;
}

.user-menu-identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-menu-identity .user-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-identity .user-role {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.user-role-pill.hidden {
  display: none;
}

.user-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.user-menu-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-menu-section:empty {
  display: none;
}

.user-menu-section + .user-menu-section:not(:empty) {
  border-top: 1px solid var(--border-subtle);
  margin: 6px -8px 0;
  padding: 6px 8px 0;
}

.user-summary-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.user-summary-link:hover,
.user-summary-link:focus-visible {
  background: var(--sunken);
  color: var(--text-primary);
  outline: none;
}

.user-summary-link.is-disabled {
  cursor: not-allowed;
  color: var(--text-muted);
  background: transparent;
  opacity: 0.6;
}

.user-summary-link.is-disabled:hover,
.user-summary-link.is-disabled:focus-visible {
  background: transparent;
  color: var(--text-muted);
}

.user-summary-link.is-logout {
  color: color-mix(in srgb, #d64545 85%, var(--text-primary));
}

.user-summary-link.is-logout:hover,
.user-summary-link.is-logout:focus-visible {
  color: #d64545;
  background: color-mix(in srgb, #d64545 10%, transparent);
}

.user-summary-link.is-logout:active {
  background: color-mix(in srgb, #d64545 16%, transparent);
}

.user-summary-link.is-logout .user-summary-icon {
  color: currentColor;
}

.user-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--text-secondary);
  line-height: 0;
}

.user-summary-link:hover .user-summary-icon,
.user-summary-link:focus-visible .user-summary-icon {
  color: var(--text-primary);
}

.user-summary-link.is-logout .user-summary-icon,
.user-summary-link.is-logout:hover .user-summary-icon {
  color: currentColor;
}

.user-summary-icon .fa-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--gradient);
  color: #0e0f14;
  font-weight: 800;
  letter-spacing: -0.01em;
  overflow: hidden;
  position: relative;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.avatar-fallback {
  width: 100%;
  text-align: center;
}

.avatar.has-image {
  background: var(--surface);
  color: var(--text-primary);
}

.avatar.has-image .avatar-image {
  display: block;
}

.avatar.has-image .avatar-fallback {
  display: none;
}

.user-name {
  margin: 0;
  font-weight: 700;
}

.user-role {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.ghost-button.subtle {
  background: transparent;
  box-shadow: none;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: var(--surface);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(8, 16, 32, 0.08);
}

.ghost-button.danger {
  border-color: rgba(255, 107, 107, 0.45);
  color: #ff95a4;
  background: rgba(255, 107, 107, 0.08);
}

.ghost-button.danger:hover,
.ghost-button.danger:focus-visible {
  border-color: #ff6b7d;
  color: #ffc0c9;
  background: rgba(255, 107, 107, 0.12);
}

.ghost-button:disabled,
.ghost-button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  color: var(--text-secondary);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--sunken);
  box-shadow: 0 8px 22px rgba(22, 72, 197, 0.15);
}

.header-user-controls .ghost-button,
.header-actions > .ghost-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border-color: var(--border-subtle);
  background: var(--panel-muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}

.header-user-controls .ghost-button:hover,
.header-user-controls .ghost-button:focus-visible,
.header-actions > .ghost-button:hover,
.header-actions > .ghost-button:focus-visible {
  background: var(--sunken);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  box-shadow: none;
}

.markdown-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 14px;
  line-height: 1.5;
}

.markdown-editor textarea {
  width: 100%;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  padding: 12px 14px;
  border-radius: 0 0 10px 10px;
  border: 1px solid var(--border-subtle);
  border-top: none;
  background: var(--surface);
  color: var(--text-primary);
}

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 6px;
  border: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 10px 10px 0 0;
  background: var(--sunken);
}

.markdown-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.markdown-toolbar-group:first-child {
  margin-left: auto;
}

.markdown-toolbar .ghost-button.subtle {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0 6px 0 0;
  justify-content: flex-end;
  flex: 0 0 auto;
  box-sizing: border-box;
  font-size: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  box-shadow: none;
}

.markdown-toolbar .ghost-button.subtle.is-active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.markdown-toolbar .ghost-button.subtle:hover,
.markdown-toolbar .ghost-button.subtle:focus-visible {
  background: var(--panel-muted);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.markdown-toolbar .ghost-button.subtle.is-active:hover,
.markdown-toolbar .ghost-button.subtle.is-active:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 85%, #000);
  color: #fff;
}

.markdown-toolbar .markdown-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.markdown-preview {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  padding: 12px 14px;
  color: var(--text-primary);
  font-weight: 400;
}

.markdown-preview p {
  margin: 0 0 12px;
}

.markdown-preview p:last-child {
  margin-bottom: 0;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 0 0 12px 20px;
}

.listing-markdown-content p {
  margin: 0 0 12px;
}

.listing-markdown-content p:last-child {
  margin-bottom: 0;
}

.listing-markdown-content ul,
.listing-markdown-content ol {
  margin: 0 0 12px 20px;
}

.markdown-preview code,
.listing-markdown-content code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace);
  background: var(--panel-muted);
  padding: 0.1rem 0.3rem;
  border-radius: 6px;
}

.markdown-preview pre,
.listing-markdown-content pre {
  position: relative;
  background: var(--panel-muted);
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 12px;
  max-width: 100%;
}

.markdown-preview pre code,
.listing-markdown-content pre code {
  background: transparent;
  padding: 0;
  display: block;
}

.markdown-preview .copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
}

.markdown-preview .copy-code-button:hover,
.markdown-preview .copy-code-button:focus-visible {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.markdown-preview .copy-code-button:active {
  transform: translateY(1px);
}

.markdown-preview .copy-code-button.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--panel-muted);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--border-subtle);
  background: var(--sunken);
  color: var(--text-primary);
  outline: none;
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
  display: none;
  position: relative;
  line-height: 1;
}

.theme-toggle .icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: block;
}

.icon-sun::before {
  content: "\e94a";
  mask-image: url('/static/icons/sun.svg');
  -webkit-mask-image: url('/static/icons/sun.svg');
}

.icon-moon::before {
  content: "\e930";
  mask-image: url('/static/icons/moon.svg');
  -webkit-mask-image: url('/static/icons/moon.svg');
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
  min-width: 44px;
  color: inherit;
  text-decoration: none;
}

.brand-lockup,
.brand-mark {
  display: inline-flex;
  align-items: center;
}

.brand-lockup-image,
.brand-mark-image {
  display: block;
  height: 34px;
  width: auto;
  max-height: 38px;
  object-fit: contain;
  vertical-align: middle;
}

[data-theme="dark"] .brand-lockup-image,
[data-theme="dark"] .brand-mark-image {
  filter: brightness(0) invert(1);
}

.brand-mark {
  display: none;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
  vertical-align: middle;
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .brand {
    gap: 10px;
  }

  .brand-lockup {
    display: none;
  }

  .brand-mark {
    display: inline-flex;
  }

  .brand-lockup-image,
  .brand-mark-image {
    height: 30px;
    max-height: 32px;
  }
}

.landing-hero {
  padding: 10px 0 6px;
}

.landing-hero-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: none;
  display: grid;
  gap: 24px;
}

.landing-hero-shell.combined {
  gap: 24px;
  padding: 36px 32px 32px;
}

.landing-hero-top {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: end;
}

.landing-hero-copy h2 {
  margin: 8px 0 12px;
  font-size: 2.8rem;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.landing-hero-card-group {
  display: grid;
  gap: 8px;
  align-self: end;
}

.landing-hero-card-group .hero-footnote {
  margin: 0 0 4px;
  color: var(--text-secondary);
}

.accent-rule {
  width: 68px;
  height: 3px;
  background: var(--accent);
  display: inline-block;
  margin-bottom: 12px;
}

.landing-hero-copy .lead {
  margin: 0 0 18px;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.builder-paths {
  margin: 0;
  padding: 14px 12px 16px;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  gap: 14px;
}

.builder-paths.inline {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.builder-paths-header {
  display: grid;
  gap: 10px;
  align-items: start;
}

.builder-paths .supporting-text {
  margin: 0;
  color: var(--text-secondary);
}

.builder-path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.builder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: none;
  display: grid;
  gap: 14px;
}

.builder-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  height: 20px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid;
  white-space: nowrap;
  vertical-align: middle;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.pill-badge .pill-badge-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  fill: currentColor;
  stroke: currentColor;
}

.pill-badge--sm {
  height: 17px;
  padding: 1px 7px 1px 5px;
  font-size: 0.66rem;
  gap: 3px;
}

.pill-badge--sm .pill-badge-icon {
  width: 10px;
  height: 10px;
}

.pill-badge--trusted_user {
  background: linear-gradient(135deg,
    var(--success-100, #e1f6ea) 0%,
    color-mix(in srgb, var(--success-100, #e1f6ea) 70%, #ffffff) 100%);
  color: var(--success-700, #1d6a3f);
  border-color: color-mix(in srgb, var(--success-700, #1d6a3f) 35%, transparent);
  box-shadow: 0 1px 2px rgba(31, 110, 63, 0.10),
              inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.pill-badge--admin {
  background: linear-gradient(135deg, #fff3d1 0%, #ffe39e 100%);
  color: #6b4500;
  border-color: rgba(107, 69, 0, 0.32);
  box-shadow: 0 1px 2px rgba(107, 69, 0, 0.14),
              inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pill-badge--founding_seller {
  background: linear-gradient(135deg, #f3e3ff 0%, #e2c7ff 100%);
  color: #4a0e73;
  border-color: rgba(74, 14, 115, 0.35);
  box-shadow: 0 1px 2px rgba(74, 14, 115, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pill-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* No hover lift inside a clickable card link to avoid double-motion. */
.product-card .pill-badge:hover {
  transform: none;
}

.pill-label {
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--pill-bg), color-mix(in srgb, var(--pill-bg) 86%, #000000));
  color: var(--pill-text);
  border: 1px solid var(--pill-border);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.pill-label:focus-visible {
  outline: 2px solid var(--pill-text);
  outline-offset: 2px;
  background: linear-gradient(135deg, var(--pill-bg-hover), color-mix(in srgb, var(--pill-bg-hover) 88%, #000000));
  border-color: var(--pill-border-hover);
}

.card-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 600;
}

.builder-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.builder-card-body {
  margin: 0;
  color: var(--text-secondary);
}

.builder-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
}

.builder-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.builder-points .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.builder-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.builder-card-actions .builder-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--accent);
  padding: 6px 2px;
  border-bottom: 1px solid rgba(22, 72, 197, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.builder-card-actions .builder-card-link:hover,
.builder-card-actions .builder-card-link:focus-visible {
  color: var(--accent-strong, var(--accent));
  border-color: var(--accent);
  outline: none;
}

.builder-card-actions .ghost-button {
  min-width: 180px;
  text-align: center;
  flex: 1 1 200px;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-color: rgba(22, 72, 197, 0.4);
  background: var(--sunken);
  box-shadow: 0 10px 24px rgba(22, 72, 197, 0.12);
}

.builder-card-actions .ghost-button:hover,
.builder-card-actions .ghost-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: linear-gradient(135deg, rgba(22, 72, 197, 0.06), rgba(10, 19, 48, 0.04));
  box-shadow: 0 12px 26px rgba(22, 72, 197, 0.18);
}

#agent-path-button,
#assistant-path-button {
  flex-basis: 100%;
}

.path-panel {
  margin: 12px 0 10px;
  display: grid;
  gap: 10px;
}

.agent-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: none;
  display: grid;
  gap: 10px;
}

.hero-cta {
  min-width: 140px;
  text-align: center;
}

.hero-cta.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.assistant-picker {
  margin: 22px 0 10px;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: none;
  display: grid;
  gap: 14px;
}

.assistant-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.assistant-picker-status {
  margin: 0;
  color: var(--text-secondary);
  display: none;
}

.assistant-picker-status.is-visible {
  display: block;
}

.assistant-picker-status.error {
  color: #f98f9d;
}

.assistant-platform-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-platform-buttons .ghost-button {
  min-width: 120px;
}

.assistant-platform-buttons .ghost-button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--primary-500) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-500) 35%, transparent), var(--shadow-card);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--primary-500) 14%, transparent),
    color-mix(in srgb, var(--primary-100) 55%, transparent)
  );
}

.assistant-step {
  display: grid;
  gap: 10px;
}

.assistant-detail {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Finalize/checkout layout CSS is owned by css/base.css because base.html loads style.css first and css/base.css last.
   Keep finalize selectors here so the later sheet remains the single source of truth for checkout cascade order. */
.assistant-shopping-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.checkout-stepper {
  grid-area: stepper;
  grid-column: 1 / -1;
}

.checkout-stepper-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  display: flex;
  gap: 0;
}

.checkout-stepper-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 0 8px;
  position: relative;
  color: var(--text-secondary);
}

.checkout-stepper-item:not(:first-child)::before,
.checkout-stepper-item:not(:first-child)::after {
  content: "";
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 2px;
  border-radius: 999px;
}

.checkout-stepper-item:not(:first-child)::before {
  background: var(--border);
}

.checkout-stepper-item:not(:first-child)::after {
  background: var(--primary-500);
  opacity: 0;
}

.checkout-stepper-item.is-active,
.checkout-stepper-item.is-complete {
  color: var(--text-primary);
}

.checkout-stepper-item.is-active::after,
.checkout-stepper-item.is-complete::after {
  opacity: 1;
}

.checkout-stepper-marker {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--border) 75%, var(--surface));
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.checkout-stepper-item.is-active .checkout-stepper-marker {
  border-color: var(--primary-500);
  background: var(--surface);
  color: var(--primary-500);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.checkout-stepper-item.is-complete .checkout-stepper-marker {
  border-color: var(--primary-500);
  background: var(--primary-500);
  color: #fff;
}

.checkout-stepper-check {
  font-size: 0.7rem;
}

.checkout-stepper-label {
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .checkout-stepper-label {
    font-size: 0.75rem;
  }
}

.guest-success-layout {
  gap: 12px;
  align-items: flex-start;
}

@media (min-width: 960px) {
  .guest-success-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  }
}

.guest-success-layout #finalize-order-actions {
  display: grid;
  gap: 12px;
}

.guest-success-layout #finalize-order-actions,
.guest-success-layout #guest-purchases {
  padding: 16px;
}

.guest-success-layout #finalize-order-actions .embedded-guest-purchases {
  padding: 12px;
  margin-top: 2px;
}

.guest-success-layout #finalize-order-actions .checkout-summary-header,
.guest-success-layout #finalize-order-actions #finalize-hint {
  display: none;
}

.assistant-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.assistant-cart-header {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.assistant-cart-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-cart-count-badge {
  border-radius: var(--radius-pill);
  background: var(--sunken);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.assistant-cart-subtext {
  margin: 0;
  color: var(--text-secondary);
}

.assistant-cart-confirmation {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(47, 158, 98, 0.2);
  background: rgba(47, 158, 98, 0.12);
  display: grid;
  gap: 4px;
  animation: confirmation-enter 180ms ease-out;
}

.assistant-cart-confirmation-title {
  margin: 0;
  font-weight: 700;
  color: var(--text-primary);
}

.assistant-cart-confirmation-subtext {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@keyframes confirmation-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-cart-confirmation {
    animation: none;
  }
}

.assistant-cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.assistant-cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.assistant-cart-item.is-removing {
  opacity: 0;
  transform: translateY(6px);
}

.assistant-cart-details {
  display: grid;
  gap: 4px;
}

.assistant-cart-name {
  margin: 0;
  font-weight: 800;
}

.assistant-cart-author,
.assistant-cart-price,
.assistant-cart-trust {
  margin: 0;
  color: var(--text-secondary);
}

.assistant-cart-price {
  font-weight: 700;
  color: var(--text-primary);
}

.assistant-cart-trust {
  font-size: 0.85rem;
}

.assistant-cart-badge {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-muted);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.assistant-cart-info-stack {
  display: grid;
  gap: 4px;
}

.assistant-cart-remove {
  display: flex;
  justify-content: flex-end;
}

.cart-remove-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  min-width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.cart-remove-link:hover,
.cart-remove-link:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
  transform: translateY(-1px);
}

.cart-remove-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.cart-remove-button svg {
  width: 16px;
  height: 16px;
}

.cart-remove-button:hover,
.cart-remove-button:focus-visible {
  border-color: var(--accent);
  color: var(--text-primary);
}

.assistant-cart-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 12px;
}

.assistant-cart-total.is-free {
  justify-content: center;
  color: var(--accent-2);
}

.assistant-cart-total-message {
  margin: 0;
  font-weight: 600;
}

.assistant-cart-actions-footer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-checkout-button {
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.cart-checkout-hint {
  margin: 0;
  text-align: center;
  color: var(--text-secondary);
}

.checkout-summary {
  display: grid;
  gap: 14px;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.checkout-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.checkout-summary-count {
  margin: 0;
  color: var(--text-secondary);
}

.checkout-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.checkout-summary-thumbnail {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}

.checkout-summary-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkout-summary-thumbnail-image.is-fallback {
  object-fit: contain;
  padding: 6px;
  background: var(--panel-muted);
}

.checkout-summary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.checkout-link-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.checkout-summary-details {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.checkout-summary-name {
  margin: 0;
  font-weight: 800;
}

.checkout-summary-meta {
  margin: 0;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .checkout-summary-item {
    align-items: flex-start;
  }

  .checkout-summary-thumbnail {
    width: 48px;
    height: 48px;
  }
}

.purchased-card {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  gap: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.purchased-card:hover,
.purchased-card:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.purchased-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.purchased-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sunken);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchased-card-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.purchased-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.purchased-card-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchased-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.purchased-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.purchased-card-cta {
  min-width: 140px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  letter-spacing: 0;
  box-shadow: none;
}

.purchased-card-more {
  font-size: 1.2rem;
  line-height: 1;
}

.purchased-card-more[disabled],
.purchased-card-more[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.45;
  cursor: default;
}

.checkout-type-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkout-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.checkout-summary-line {
  margin: 0;
  font-weight: 800;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.checkout-summary-actions {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.checkout-summary-remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkout-summary-remove:hover,
.checkout-summary-remove:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.assistant-selection-hint {
  margin: 0 0 8px;
  color: var(--text-secondary);
}

.checkout-actions-row {
  display: grid;
  gap: 10px;
}

.checkout-actions-row .primary-pill,
.checkout-actions-row .ghost-button {
  width: 100%;
  text-align: center;
}

.login-before-purchase-wrapper {
  position: relative;
  width: 100%;
}

.login-before-purchase-wrapper .login-dropdown {
  left: 0;
  right: auto;
}

.checkout-actions-row .tertiary-link {
  display: block;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
}

.checkout-actions-row .tertiary-link:hover,
.checkout-actions-row .tertiary-link:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.purchased-instructions {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

details.purchased-instructions summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
}

details.purchased-instructions[open] summary {
  color: var(--accent);
}

.purchased-details-toggle {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.purchased-details-toggle:hover {
  color: var(--text-primary);
}

.purchased-details-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.purchased-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.assistant-setup-guide {
  border-top: 0;
  padding-top: 0;
}

.assistant-setup-field {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.assistant-setup-label {
  font-weight: 600;
}

.assistant-setup-value {
  min-width: 0;
  white-space: pre-wrap;
}

.assistant-setup-value pre {
  position: relative;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0 0;
  overflow-x: auto;
  font-size: 0.9em;
}

.assistant-setup-value code {
  font-family: 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New',
    monospace;
  background: rgba(15, 23, 42, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.assistant-setup-value pre code {
  display: block;
  background: transparent;
  padding: 0;
}

.assistant-setup-value .copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
}

.assistant-setup-value .copy-code-button:hover,
.assistant-setup-value .copy-code-button:focus-visible {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.assistant-setup-value .copy-code-button:active {
  transform: translateY(1px);
}

.assistant-setup-value .copy-code-button.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

.purchased-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.purchased-tab {
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.purchased-tab[aria-selected='true'] {
  background: #fff;
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.purchased-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.purchased-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.purchased-tab-panels {
  max-width: 680px;
}

.purchased-tab-panel {
  display: block;
}

.purchased-tab-panel[hidden] {
  display: none;
}

.purchased-tab-text {
  margin: 0;
  color: var(--text-secondary);
  white-space: pre-line;
}

.purchased-tab-pre {
  margin: 0;
  color: var(--text-secondary);
  white-space: pre-line;
  font-family: 'SFMono-Regular', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
}

.purchased-prompt-block {
  position: relative;
  background: #f7f9fc;
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  padding: 12px;
  max-height: 240px;
  overflow: auto;
}

.purchased-prompt-text {
  margin: 28px 0 0;
  white-space: pre-wrap;
  color: var(--text-primary);
  font-family: 'SFMono-Regular', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
  font-size: 0.85rem;
}

.purchased-prompt-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
}

.purchased-prompt-copy.is-copied {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent), transparent 40%);
}

.prompt-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.prompt-copy-row .checkout-summary-meta {
  margin: 0;
}

.prompt-copy-button {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.prompt-copy-button.is-copied {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent), transparent 40%);
}

.instruction-body {
  margin: 8px 0 0;
  white-space: pre-line;
}

.assistant-requirements {
  margin: 0 0 12px 18px;
  color: var(--text-secondary);
  padding: 0;
}

.assistant-requirements li {
  margin: 4px 0;
}

.assistant-detail h3 {
  margin: 0 0 4px;
}

.assistant-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-weight: 700;
}

.assistant-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-soft);
  height: 100%;
}

.cart-shell {
  position: fixed;
  top: calc(var(--announcement-offset, 0px) + 12px);
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 50;
}

.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-inline: 14px;
}

.cart-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f7f9ff;
  font-size: 1.1rem;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(16, 39, 92, 0.6);
}

.cart-toggle-label {
  font-weight: 600;
}

.cart-toggle-peek {
  display: none;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cart-count {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1c55dc, #10275c);
  border: 1px solid var(--accent);
  color: #f7f9ff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow: 0 12px 28px rgba(22, 72, 197, 0.28);
}

.cart-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  box-shadow: var(--shadow-card);
}

.assistant-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assistant-price {
  margin: 0;
  font-weight: 800;
}

.assistant-quantity {
  background: var(--sunken);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.purchase-button {
  align-self: flex-start;
}

.assistant-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

@media (max-width: 720px) {
  .cart-shell {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 12px;
  }

  .cart-shell.is-open .cart-toggle-peek {
    display: none;
  }

  .cart-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 4px;
    padding: 12px 16px;
    text-align: left;
  }

  .cart-toggle-label {
    font-weight: 700;
  }

  .cart-toggle-peek {
    display: block;
  }

  .cart-count {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
  }

  .cart-panel {
    position: static;
    width: 100%;
    max-height: min(80vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .assistant-cart-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
  }

  .assistant-cart-actions-footer {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    background: var(--panel-background);
    padding-bottom: 8px;
  }

  .assistant-shopping-layout {
    grid-template-columns: 1fr;
  }

  #finalize-layout {
    grid-template-areas:
      "stepper"
      "summary"
      "actions"
      "purchases";
  }


  #finalize-order-summary,
  #finalize-order-actions,
  #guest-purchases,
  .assistant-detail,
  .assistant-summary-card,
  .assistant-cart,
  .checkout-summary,
  .purchased-card {
    padding: 14px;
  }

  .assistant-summary-card,
  .assistant-detail,
  .assistant-cards {
    width: 100%;
  }

  .assistant-cart-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .assistant-cart-remove,
  .purchased-card-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .purchased-card-actions .purchased-card-cta {
    width: 100%;
  }

  .assistant-meta > *:nth-child(n+3),
  .purchased-card-meta > *:nth-child(n+3) {
    display: none;
  }
}

@media (min-width: 960px) {
  .assistant-shopping-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  }

  #finalize-layout {
    grid-template-areas:
      "stepper stepper"
      "summary actions"
      "purchases actions";
  }

  #finalize-order-summary {
    grid-area: summary;
  }

  #finalize-order-actions {
    grid-area: actions;
  }

  #guest-purchases {
    grid-area: purchases;
  }

  .assistant-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.assistant-description {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.assistant-instructions {
  white-space: pre-wrap;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-primary);
}

.hero-footnote {
  margin: 10px 0 0;
  color: var(--text-secondary);
}

.landing-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow: none;
  position: relative;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hero-badge {
  margin: 0;
  padding: 6px 0;
  border-radius: 0;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-note {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-card-body h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.hero-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.hero-list li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 2px;
  border-radius: 0;
  background: var(--accent);
}

.library-header {
  margin: 26px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

button {
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  min-height: 38px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  color: var(--text-primary);
}

.primary-pill {
  background: var(--gradient);
  color: #f7f9ff;
  border: 1px solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(22, 72, 197, 0.2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.primary-pill.danger {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.6);
  color: #ffe8ec;
  box-shadow: 0 14px 32px rgba(255, 107, 107, 0.2);
}

.primary-pill.danger:hover,
.primary-pill.danger:focus-visible {
  background: rgba(255, 107, 107, 0.08);
  color: #ffccd4;
  border-color: rgba(255, 107, 107, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.7), var(--shadow-card);
}

.primary-pill:hover,
.primary-pill:focus-visible {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-500) 85%, #000000), color-mix(in srgb, var(--accent-2) 92%, #000000));
  color: #f7f9ff;
  border-color: color-mix(in srgb, var(--primary-700) 64%, #ffffff);
  transform: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-700) 64%, #ffffff), var(--shadow-card);
}

.primary-pill.is-disabled,
.primary-pill.is-disabled:hover,
.primary-pill.is-disabled:focus-visible {
  background: var(--panel-muted);
  color: var(--text-secondary);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

main {
  padding: 34px 0 60px;
}

.home-main,
.marketplace-main,
.theory-main,
.about-main,
.product-main {
  padding-top: 0;
  padding-bottom: 0;
}

#agent-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.agent-card {
  background: var(--surface);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.agent-card:hover,
.agent-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  border-color: color-mix(in srgb, var(--primary-500) 45%, transparent);
  z-index: 3;
}

.agent-card h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.2;
  font-weight: 600;
}

.agent-card p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.view-instructions-btn {
  margin-top: auto;
  width: 100%;
  background: var(--gradient);
  color: #0b0c12;
  border: none;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary-500) 24%, transparent);
}

.view-instructions-btn:hover,
.view-instructions-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--primary-500) 32%, transparent);
}

.best-match {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)), var(--gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--primary-500) 25%, transparent);
}

.best-match-banner {
  background: color-mix(in srgb, var(--primary-100) 60%, transparent);
  color: var(--text-primary);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--primary-500) 24%, transparent);
  text-align: center;
  margin: -4px 0 6px;
}

.status-message {
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: center;
  width: 100%;
  margin: 10px 0;
}

.status-message.error {
  color: #f98f9d;
}

button:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Modal */
.hidden { display: none !important; }

.ownership-badge.is-hidden,
.ownership-badge[hidden] {
  display: none !important;
}

#modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

#modal.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: static !important;
  z-index: auto !important;
  pointer-events: none !important;
}

.modal-content {
  background: var(--surface);
  padding: 24px;
  width: min(760px, 100%);
  border-radius: 16px;
  text-align: left;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--text-primary);
  border-color: var(--accent);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 30;
  overflow-y: auto;
}

.modal-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: static !important;
  z-index: auto !important;
  pointer-events: none !important;
}

.dashboard-body .modal-overlay {
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: none;
}

.modal-dialog {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.04)), var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: min(820px, 100%);
  padding: 26px;
  box-shadow: var(--shadow-card);
  position: relative;
  max-height: min(90vh, 880px);
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.modal-header h3 {
  margin: 2px 0 4px;
}

.modal-header .lead {
  color: var(--text-secondary);
}

.auth-gate-dialog {
  width: min(560px, 100%);
}

.auth-gate-benefits {
  margin: 0 0 16px;
}

.auth-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.edit-form .input-grid {
  gap: 14px;
}

.edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.edit-buttons {
  display: flex;
  gap: 10px;
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 30;
  overflow-y: auto;
}

.feedback-overlay.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: static !important;
  z-index: auto !important;
  pointer-events: none !important;
}

#cart-panel.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: static !important;
  z-index: auto !important;
  pointer-events: none !important;
}

.feedback-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(560px, 100%);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  max-height: min(90vh, 760px);
  overflow-y: auto;
}

.feedback-page .hero-grid {
  align-items: stretch;
}

.feedback-page .hero-panel {
  justify-content: stretch;
}

.feedback-page .feedback-panel-card {
  width: 100%;
  max-width: 640px;
}

.feedback-page .feedback-panel-header {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.feedback-page .supporting-text {
  margin: 12px 0 0;
  color: var(--text-secondary);
}

.feedback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.feedback-header .lead {
  margin-top: 6px;
}

.feedback-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-form .checkbox-field span {
  font-weight: 400;
}

.feedback-step {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feedback-step.hidden {
  display: none;
}

.feedback-step-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.intent-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.intent-card:hover,
.intent-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-lifted);
  transform: translateY(-2px);
  outline: none;
}

.intent-card.is-selected {
  border-color: var(--accent);
  background: rgba(74, 144, 226, 0.08);
}

.feedback-form[data-feedback-ready="false"] .intent-card {
  opacity: 0.62;
  cursor: wait;
  box-shadow: none;
}

.feedback-form[data-feedback-ready="false"] .intent-card:hover,
.feedback-form[data-feedback-ready="false"] .intent-card:focus-visible {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.intent-title {
  font-weight: 700;
}

.intent-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.feedback-actions {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.feedback-actions .form-status {
  margin: 0;
}

.feedback-outcome-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: var(--surface);
}

.feedback-outcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Publish */
.publish-hero {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.publish-hero .cta-group {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

#publish-listings-status {
  flex-basis: 100%;
}

.publish-login-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #eef5ff;
  color: var(--text-secondary);
  margin: 10px 0 14px;
  border: 1px solid #d6e4ff;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
}

.publish-login-banner.hidden {
  display: none;
}

.publish-eligibility-banner {
  align-items: flex-start;
}

.publish-eligibility-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.publish-eligibility-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publish-login-icon {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.publish-login-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.publish-login-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.publish-shell {
  padding: 18px 24px 48px;
}

.publish-grid {
  display: grid;
  gap: 18px;
}

.wizard-step .field-section {
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wizard-step .field-section + .field-section {
  margin-top: 8px;
}

.field-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.section-label {
  margin: 0;
  font-weight: 800;
}

.section-helper {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 600;
}

.wizard-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.type-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  cursor: pointer;
}

.type-card.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.type-card.is-disabled input {
  cursor: not-allowed;
}

.type-card input {
  margin-top: 6px;
}

.pill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-option {
  position: relative;
  cursor: pointer;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sunken);
  font-weight: 600;
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.pill-option input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent, #fff);
}

.pill-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pill-option:hover span {
  border-color: var(--accent);
}

.preview-card {
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.publish-shell .compiled-prompt.preview-card #compiled-prompt-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

.preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.preview-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.test-case-grid {
  gap: 16px;
}

.test-case-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
  display: grid;
  gap: 10px;
}

.test-case-label {
  margin: 0;
  font-weight: 700;
}

.input-grid.single {
  grid-template-columns: 1fr;
}

.pill.subtle {
  background: var(--tag-bg);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 10px;
  font-weight: 600;
}

.pill.tested {
  background: var(--success-100);
  color: var(--success-700);
  border: 1px solid var(--success-500);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
}

.marketplace-inline-preview {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.marketplace-inline-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--sunken);
}

.advanced-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 6px 0;
}

.advanced-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.advanced-fields {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.advanced-fields[hidden] {
  display: none;
}

.publish-note {
  margin: 0;
  font-weight: 600;
  color: var(--text-secondary);
}

.marketplace-inline-card h3 {
  margin: 0;
}

.marketplace-inline-card .card-description {
  margin: 4px 0 0;
}

/* Assistant vs Agent */
.theory-hero {
  padding: 1.5rem 0;
  position: relative;
  z-index: 0;
  overflow: visible;
  background: none;
  border: none;
  box-shadow: none;
}

.theory-header {
  padding: 0;
  align-items: stretch;
  gap: 1.25rem;
  max-width: var(--shell-max-width);
  margin: 0 auto;
}

.theory-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.theory-panels {
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  max-width: var(--shell-max-width);
  margin: 0 auto;
}

.theory-card {
  position: relative;
  border-color: var(--border);
  background: var(--surface);
  box-shadow: none;
  border-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.theory-card.is-muted {
  background: var(--sunken);
  color: var(--muted-foreground);
  border-color: var(--border-subtle);
  box-shadow: none;
  cursor: default;
}

.theory-card.is-muted:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-subtle);
}

.theory-card .pill-label {
  align-self: flex-start;
}

@media (max-width: 960px) {
  .marketplace-controls {
    align-items: flex-start;
    flex-direction: column;
  }

  .sort-control {
    margin-left: 0;
  }

  .product-heading,
  .publish-hero,
  .theory-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
  }

  .product-meta {
    text-align: left;
    align-items: flex-start;
  }

  .product-hero-layout {
    grid-template-columns: 1fr;
  }

  .product-sticky-card {
    position: static;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .theory-hero {
    padding: 32px 0 18px;
  }
}

@media (max-width: 640px) {
  .marketplace-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }

  .search-group {
    flex-direction: column;
    gap: 12px;
  }

  .input-with-icon {
    width: 100%;
  }

  .type-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .marketplace-links {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .marketplace-links .quiet-link {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 0;
  }

  .marketplace-links .marketplace-help-link {
    justify-content: center;
  }

  .marketplace-help-link--responsive .link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .marketplace-help-link--responsive {
    flex: 0 0 auto;
    min-width: 44px;
    justify-content: center;
  }
}

/* Landing hub */
.home-hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-lg);
}

.home-main .page-shell {
  padding-inline: 0;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: flex-start;
}

.home-hero .hero-grid {
  padding: 0;
  grid-template-columns: 1fr;
  justify-items: start;
  max-width: var(--shell-max-width);
  margin: 0 auto;
}

.home-hero-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.home-hero-grid--with-featured {
  grid-template-columns: minmax(0, 3.35fr) minmax(220px, 0.85fr);
  grid-template-areas: "copy featured";
  align-items: stretch;
  column-gap: 1rem;
}

.home-hero-main {
  grid-area: copy;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}

.home-hero .hero-copy {
  margin-inline: 0;
  width: min(100%, 760px);
}

.home-hero-featured {
  grid-area: featured;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  max-width: 300px;
  width: 100%;
}

.home-hero-featured-panel {
  width: 100%;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}

.home-hero-featured-stack {
  gap: 1rem;
}

.home-hero-featured-module-wrap {
  display: grid;
  gap: 0.45rem;
}

.feature-support-copy {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-hero-featured-panel .pill-label {
  margin-bottom: 0;
}

.featured-module {
  background: var(--panel-background);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 0 0 1px color-mix(in srgb, #f2c14e 24%, transparent), 0 10px 26px color-mix(in srgb, #f2c14e 20%, transparent), var(--shadow-sm);
  padding: 0.75rem;
  display: grid;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-module:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--brand-primary) 48%, var(--border-subtle));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 20%, transparent), 0 14px 32px color-mix(in srgb, #f2c14e 28%, transparent), var(--shadow-sm);
  transform: translateY(-1px);
}

.featured-module:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.featured-module .product-box-hero {
  margin: 0;
}

.featured-module .product-box-hero-inner,
.featured-module .product-box-hero img,
.featured-module .product-box-hero-placeholder {
  min-height: 180px;
  max-height: 210px;
}

.featured-module-content {
  display: grid;
  gap: 0.4rem;
}

.featured-module-content h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.featured-module-content p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.35;
}

.featured-module-content .primary-pill {
  justify-self: flex-start;
}

.featured-module-countdown {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.3;
  color: color-mix(in srgb, var(--brand-primary) 72%, var(--text-primary));
  font-weight: 600;
}

.community-choice-module {
  box-shadow: 0 0 0 1px color-mix(in srgb, #6f74f6 22%, transparent), 0 10px 22px color-mix(in srgb, #6f74f6 16%, transparent), var(--shadow-sm);
}

.community-choice-module:is(:hover, :focus-visible) {
  box-shadow: 0 0 0 3px color-mix(in srgb, #6f74f6 22%, transparent), 0 14px 30px color-mix(in srgb, #6f74f6 22%, transparent), var(--shadow-sm);
}

.featured-module:is(:hover, :focus-visible) .featured-module-content .primary-pill {
  background: var(--brand-primary);
  color: var(--surface);
  border-color: color-mix(in srgb, var(--brand-primary) 68%, black);
}

.home-hero-featured-panel .listing-card,
.home-hero-featured-panel .bundle-card,
.home-hero-featured-panel .product-card {
  margin: 0;
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.25rem;
}

.hero-subline {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.hero-copy .lead {
  color: var(--muted-foreground);
  max-width: 40ch;
}

.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.hero-panel-card {
  background: var(--panel-background);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-right: 0.5rem;
}

.type-selector {
  padding: 1.5rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header .ghost-button,
.section-header .primary-pill {
  align-self: flex-start;
}

.type-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-main .type-card.is-muted {
  background: var(--sunken);
  color: var(--muted-foreground);
  border-color: var(--border-subtle);
  filter: grayscale(1);
  box-shadow: none;
  cursor: not-allowed;
  transition: none;
}

.home-main .type-card.is-muted:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-subtle);
}

.type-card {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  background: var(--panel-background);
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.type-card.is-active {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  background: linear-gradient(180deg, rgba(119, 157, 255, 0.08) 0%, rgba(119, 157, 255, 0) 100%);
}

.type-helper {
  color: var(--muted-foreground);
  margin: 0;
}

.type-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.publish-shell .type-cards {
  gap: 8px;
}

.publish-shell .type-card {
  padding: 6px 8px;
  border-radius: 12px;
  display: grid;
  gap: 3px;
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    opacity 0.2s ease;
}

.publish-shell .type-card:hover {
  transform: none;
  box-shadow: none;
}

.publish-shell .type-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.publish-shell .type-card input {
  margin: 0;
}

.publish-shell .type-card-title {
  font-weight: 700;
  font-size: 1rem;
}

.publish-shell .type-card-description {
  margin: 0;
  font-size: 1rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.publish-shell .type-card:not(.is-disabled):not(:has(input:checked)) {
  opacity: 0.6;
}

.publish-shell .type-card:has(input:checked) {
  transform: scale(1.02);
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.type-card-top h3 {
  margin: 0.25rem 0;
}

.type-card-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.type-description {
  color: var(--muted-foreground);
  margin: 0;
}

.type-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  margin-top: auto;
  padding-top: 0.35rem;
}

.type-link.coming-soon {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--panel-background);
}

.new-strip {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.home-updates-preview {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.home-updates-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
}

.home-update-card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  min-height: 100%;
}

.home-update-card .roadmap-title {
  margin: 0;
  font-size: 1rem;
}

.home-update-card .text-link {
  margin-top: auto;
}

.home-update-summary {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 700px) {
  .home-updates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .home-updates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-grid.limited-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.empty-state.callout {
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  padding: 1.5rem;
  background: var(--panel-background);
  text-align: center;
}

.how-it-works {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.steps-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.how-it-works .step-card {
  border: 1px solid color-mix(in srgb, var(--border-subtle) 70%, transparent);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--panel-background);
  box-shadow: 0 12px 32px rgba(10, 20, 40, 0.05);
  gap: 0.75rem;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out, transform 180ms ease-out;
}

.how-it-works .step-card h3,
.how-it-works .step-card p {
  margin: 0;
}

.how-it-works .step-card:hover,
.how-it-works .step-card:focus-within {
  border-color: var(--border-subtle);
  box-shadow: 0 16px 36px rgba(10, 20, 40, 0.08);
  transform: translateY(-1px);
}

@media (min-width: 900px) {
  .steps-grid {
    gap: 1.25rem;
  }

  .how-it-works .step-card {
    padding: 20px;
  }
}

.step-action {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.25px;
  text-underline-offset: 3px;
  white-space: nowrap;
  margin-top: auto;
  align-self: flex-start;
}

.footer-cta {
  background: none;
  border-top: none;
  padding: 2rem 0;
  margin-top: 1rem;
}

.footer-cta-card {
  background: var(--panel-background);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.footer-cta-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.moderation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.moderation-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.moderation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  background: var(--panel-background);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.moderation-row:hover,
.moderation-row:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.moderation-row.is-active {
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-md);
}

.moderation-row .eyebrow {
  margin: 0;
}

.moderation-row h4 {
  margin: 0.1rem 0;
}

.moderation-row .meta {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.95rem;
}

.moderation-row .pill {
  white-space: nowrap;
}

.moderation-row .row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.moderation-shell .card {
  height: 100%;
}

.fields-grid {
  align-items: start;
}

.field-card .section-header {
  align-items: flex-start;
  gap: 1rem;
}

.field-section {
  margin-top: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--sunken);
  padding: 0.75rem 1rem;
}

.field-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.field-summary::-webkit-details-marker {
  display: none;
}

.field-summary::after {
  content: '▾';
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.field-section[open] .field-summary::after {
  transform: rotate(180deg);
}

.field-summary-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 500;
}

.field-body {
  margin-top: 0.75rem;
}

/* Catalog admin shell */
.catalog-admin-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.catalog-header h3 {
  margin: 0;
}

.catalog-search input {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--sunken);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.catalog-search input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.catalog-tabs {
  flex-wrap: wrap;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  padding: 0 0.4em;
  margin-left: 0.35em;
  font-size: 0.8em;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  line-height: 1.6;
}

.tab-pill[aria-selected='false'] .tab-count {
  background: var(--sunken);
  color: var(--text-secondary);
}

/* Platform tree grouping */
.platforms-tree {
  display: grid;
  gap: 1.25rem;
}

.platform-group {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--panel-background);
  overflow: hidden;
}

.platform-group.is-inactive {
  opacity: 0.65;
}

.platform-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--sunken);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.platform-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.platform-group-title strong {
  font-size: 1.05rem;
}

.platform-group-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.version-sublist {
  display: grid;
  gap: 0;
}

.version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.version-item:last-child {
  border-bottom: 0;
}

.version-item.is-inactive {
  opacity: 0.65;
}

.version-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.version-label {
  font-weight: 600;
}

.button-row.compact {
  margin-top: 0;
  gap: 0.5rem;
}

.checkbox-field.compact {
  font-size: 0.85rem;
}

/* Form drawers */
.catalog-form-drawer {
  margin-top: 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: var(--sunken);
}

.catalog-form-drawer > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.catalog-form-drawer > summary::-webkit-details-marker {
  display: none;
}

.catalog-form-drawer[open] > .edit-form {
  margin-top: 0.75rem;
}

/* Overview stats */
.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overview-versions {
  margin-top: 0.5rem;
}

.overview-versions summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.overview-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.overview-version-row:last-child {
  border-bottom: 0;
}

.pill.stat-pill {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
}

.pill.stat-pass {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.pill.stat-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.pill.stat-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.pill.stat-neutral {
  background: var(--sunken);
  color: var(--text-secondary);
}


/* Homepage layout refresh */
.home-page {
  --home-shell-padding: clamp(16px, 3vw, 34px);
}

.home-main .page-shell {
  padding-inline: 0;
}

.home-page #announcement-banner .banner-shell {
  padding-inline: var(--home-shell-padding);
}

.home-page .site-footer .page-shell {
  padding-inline: 0;
}

.home-page header {
  padding: 0 0 12px;
}

.home-main section {
  padding: clamp(24px, 3vw, 36px) 0;
}

.home-main > section:first-child {
  padding-top: clamp(10px, 1.4vw, 16px);
}

.home-hero {
  padding-top: clamp(8px, 1.2vw, 14px);
  padding-bottom: clamp(16px, 2.1vw, 24px);
}

.home-hero .hero-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  justify-items: start;
}

.home-hero-grid--single {
  grid-template-columns: 1fr;
}

.home-hero-grid--split {
  grid-template-columns: 1fr;
  grid-template-areas:
    "copy"
    "promoted";
  align-items: stretch;
}

.home-hero-main {
  grid-area: copy;
  width: 100%;
  justify-content: flex-start;
}

.home-hero-promoted {
  grid-area: promoted;
  width: 100%;
}

.home-hero-promoted__panel {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, #f2c14e 38%, transparent), transparent 62%),
    linear-gradient(160deg, color-mix(in srgb, var(--surface) 86%, #f2c14e), color-mix(in srgb, var(--surface) 92%, #f2c14e));
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, #f2c14e 34%, var(--border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, #f2c14e 16%, transparent),
    0 10px 24px color-mix(in srgb, #f2c14e 22%, transparent),
    var(--shadow-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.home-hero-promoted__panel .pill-label {
  margin: 0;
}

.pick-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: none;
}

.pick-chip--promoted {
  background: #fff;
  color: #0f2f70;
  border-color: #a8b7d5;
}

.pick-chip--promoted:hover,
.pick-chip--promoted:focus-visible {
  background: #fff;
  color: #0f2f70;
  border-color: #a8b7d5;
}

.pick-chip--moderator {
  background: #fff;
  color: #0f2f70;
  border-color: #a8b7d5;
}

.pick-chip--community {
  background: #fff;
  color: #2c1450;
  border-color: #a8b7d5;
}

.home-featured-card .pick-chip--moderator:hover,
.home-featured-card .pick-chip--moderator:focus-visible {
  background: #fff;
  color: #0f2f70;
  border-color: #a8b7d5;
}

.home-featured-card .pick-chip--community:hover,
.home-featured-card .pick-chip--community:focus-visible {
  background: #fff;
  color: #2c1450;
  border-color: #a8b7d5;
}

.home-hero-promoted__card {
  display: grid;
  gap: 10px;
}

.home-hero-promoted__carousel {
  display: grid;
  gap: 8px;
}

.home-hero-promoted__viewport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-hero-promoted__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, #f2c14e 50%, var(--border));
  background: color-mix(in srgb, var(--surface) 80%, #f2c14e);
  color: #5f3a00;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.home-hero-promoted__arrow:hover,
.home-hero-promoted__arrow:focus-visible {
  background: color-mix(in srgb, #f2c14e 50%, #ffffff);
  border-color: #734700;
  transform: scale(1.08);
}

.home-hero-promoted__arrow:active {
  transform: scale(0.95);
}

.home-hero-promoted__track {
  position: relative;
  flex: 1;
  min-width: 0;
}

.home-hero-promoted__slide {
  display: none;
  margin: 0;
}

.home-hero-promoted__slide.is-active {
  display: grid;
}

.home-hero-promoted__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.home-hero-promoted__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, #f2c14e 60%, #734700);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.home-hero-promoted__dot:hover,
.home-hero-promoted__dot:focus-visible {
  border-color: #734700;
  background: color-mix(in srgb, #f2c14e 60%, #ffffff);
  transform: scale(1.2);
}

.home-hero-promoted__dot[aria-current="true"] {
  border-color: #734700;
  background: #734700;
  transform: scale(1.15);
}

.home-hero-promoted__thumb {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
}

.home-hero-promoted__thumb .home-card-cover-image {
  width: 100%;
  min-height: 150px;
  max-height: 150px;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: 0;
  transition: transform 0.3s ease;
}

.home-hero-promoted__slide:hover .home-hero-promoted__thumb .home-card-cover-image {
  transform: scale(1.03);
}

.home-hero-promoted__card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.home-hero-promoted__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.home-hero-promoted__empty {
  margin: 0;
  color: color-mix(in srgb, var(--text) 82%, #8f6400);
}

.home-hero .hero-copy {
  margin-inline: 0;
  width: min(100%, 760px);
}

.home-hero .cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.hero-subline {
  margin: 0 0 16px;
  max-width: 56ch;
}

.hero-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-chip {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--sunken);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.hero-chip:hover,
.hero-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Centered hero variant */
.home-hero--centered {
  text-align: center;
}

.hero-copy--centered {
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hero .hero-copy--centered {
  margin-inline: auto;
}

.hero-copy--centered .hero-subline {
  max-width: 52ch;
}

.hero-copy--centered .cta-group {
  justify-content: center;
}

.hero-copy--centered .hero-chip-row {
  justify-content: center;
}

/* How it works section */
.how-it-works {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.how-it-works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.how-it-works__card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.how-it-works__card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.how-it-works__step {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.25;
  letter-spacing: -0.02em;
  line-height: 1;
}

.how-it-works__card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.how-it-works__card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .how-it-works__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Closing CTA strip */
.home-cta-strip {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  text-align: center;
}

.home-cta-strip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.home-cta-strip__inner h2 {
  margin: 0;
}

.home-cta-strip__inner .lead {
  margin: 0 0 8px;
}

.home-cta-strip__inner .cta-group {
  margin-top: 10px;
}

@media (min-width: 900px) {
  .home-page {
    --home-shell-padding: clamp(20px, 2.8vw, 40px);
  }
}

@media (min-width: 1200px) {
  .home-page {
    --home-shell-padding: clamp(24px, 3.4vw, 56px);
  }
}

@media (min-width: 900px) {
  .home-hero-grid--split {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    grid-template-areas: "copy promoted";
    gap: 20px;
    align-items: start;
  }

  .home-hero-promoted {
    align-self: stretch;
    justify-self: end;
    max-width: 360px;
  }

  .home-hero-promoted__panel {
    height: 100%;
    align-content: start;
  }

}

@media (max-width: 479px) {
  .home-hero-promoted__arrow {
    width: 26px;
    height: 26px;
  }

  .home-hero-promoted__arrow svg {
    width: 14px;
    height: 14px;
  }
}

.home-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-listing-card,
.home-featured-card,
.type-card {
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.home-listing-card {
  min-height: 320px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-listing-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-listing-card__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.home-listing-card__description {
  margin: 0;
  color: var(--text-secondary);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.home-listing-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-featured {
  padding-top: 6px;
}

.home-featured-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-featured-card {
  min-height: 320px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.home-featured-card--pick {
  background: #fff;
}

.home-featured-card--pick:is(:hover, :focus-within) {
  border-color: var(--border-strong);
}

.home-featured-card__media {
  margin: 0;
}

.home-featured-card__media .home-card-cover-image {
  width: 100%;
  min-height: 168px;
  max-height: 168px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.home-featured-card__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.home-featured-card__body h3,
.home-featured-card__body p {
  margin: 0;
}

.home-featured-card__body p {
  color: var(--text-secondary);
}

.home-featured-card__body .primary-pill {
  margin-top: auto;
  align-self: flex-start;
}

.home-faq .faq-accordion {
  margin-bottom: 16px;
}

.hub-tabs {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 1.5rem;
}

.hub-tab {
  border: 1px solid var(--line, #d5dae0);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.95rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  cursor: pointer;
}

.hub-tab.is-active {
  background: var(--surface-strong, #151b23);
  color: var(--text-on-strong, #fff);
  border-color: var(--surface-strong, #151b23);
}

.hub-tab:focus-visible {
  outline: 2px solid var(--focus, #0a84ff);
  outline-offset: 2px;
}

.hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

.hub-content {
  min-width: 0;
}

.hub-panel-report,
.hub-panel-report [data-tab-state-root="report"],
.hub-panel-report [data-tab-state="populated"] {
  width: 100%;
  max-width: none;
}

.hub-panel-report .hub-report-card {
  width: 100%;
  max-width: none;
  padding: 24px;
}

.hub-panel-report .feedback-form,
.hub-panel-report .feedback-step,
.hub-panel-report .conditional-field,
.hub-panel-report .form-field,
.hub-panel-report .form-field textarea,
.hub-panel-report .form-field input,
.hub-panel-report .form-field select {
  width: 100%;
  max-width: none;
}

.hub-rail {
  display: grid;
  gap: 12px;
}

.hub-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-roadmap-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stack-sm {
  display: grid;
  gap: 8px;
}

@media (max-width: 960px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }

  .hub-content {
    order: 1;
  }

  .hub-rail {
    order: 2;
  }

  .hub-roadmap-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hub-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line, #d5dae0);
    border-radius: 12px;
    overflow: hidden;
  }

  .hub-tab {
    width: 100%;
    border-radius: 0;
    border: 0;
    border-right: 1px solid var(--line, #d5dae0);
    text-align: center;
    padding: 0.6rem 0.55rem;
  }

  .hub-tab:last-child {
    border-right: 0;
  }

  .hub-panel .input-grid {
    grid-template-columns: 1fr;
  }

  .hub-panel-report .hub-report-card {
    padding: 16px;
  }

  .hub-panel .feedback-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hub-panel .feedback-actions .form-status {
    order: 1;
  }

  .hub-panel .feedback-actions .primary-pill {
    width: 100%;
    justify-content: center;
  }
}



/* merged from css/responsive.css */

/* responsive.css - global mobile readiness */

/* Prevent accidental horizontal scrolling due to wide elements */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Media should never overflow */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* Safer box sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Mobile tap target baseline */
button, .btn, a.button, input, select, textarea {
  min-height: 44px;
}

:root {
  --container-max: 1200px;
  --pad-desktop: 24px;
  --pad-mobile: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }

  .nav-toggle {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
  }

  .primary-nav-container {
    display: block;
    width: 100%;
    flex-basis: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }

  .primary-nav-container.is-open {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-nav {
    width: 100%;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
  }

  .primary-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --pad-mobile: 10px;
  }

  body {
    font-size: 0.9375rem; /* 15px / 16px */
    line-height: 1.65;
  }


  h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.35rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .brand h1 {
    font-size: 1.55rem;
  }

  .brand .brand-tagline {
    font-size: 0.95rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
  }

  .hero-copy .lead {
    font-size: 1rem;
  }

  .page-shell {
    padding: 0 var(--pad-mobile);
  }

  .type-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .type-tabs .tab-pill {
    scroll-snap-align: start;
  }

  .hub-main .hub-tabs {
    width: 100%;
    margin: 0.75rem 0 1rem;
  }

  .hub-main .hub-tab {
    min-height: 44px;
    font-size: 0.9rem;
  }

  .hub-main .feedback-form .form-field > span,
  .hub-main .feedback-form .field-label {
    line-height: 1.4;
  }

  .hub-main .feedback-form textarea {
    min-height: 120px;
  }

  header {
    padding: 20px 0 12px;
  }

  .header-shell {
    grid-template-columns: 1fr;
    padding: 10px var(--pad-mobile);
    gap: 6px;
  }

  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .global-search {
    order: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .global-search-results {
    position: static;
    box-shadow: none;
    margin-top: 6px;
  }

  .header-user-controls,
  .auth-wrapper {
    width: 100%;
    justify-content: center;
  }

  .login-inline-status {
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  .header-user-controls {
    flex-wrap: wrap;
  }

  .header-user-controls {
    order: 1;
  }

  .nav-toggle {
    order: 2;
  }

  .primary-nav-container {
    order: 3;
  }

  .login-dropdown,
  .user-menu-dropdown {
    left: var(--pad-mobile);
    right: var(--pad-mobile);
    margin-left: 0;
    margin-right: 0;
  }

  .user-menu-dropdown {
    display: flex;
    justify-content: flex-end;
  }

  .nav-toggle {
    min-height: 44px;
  }

  .primary-nav-container {
    max-height: 0;
  }

  .primary-nav-container.is-open {
    max-height: 320px;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav .nav-link {
    width: 100%;
  }

  .primary-nav .ghost-button,
  .header-actions .ghost-button,
  .header-actions .primary-pill {
    min-height: 44px;
    padding: 6px 10px;
    flex: 0 1 auto;
    justify-content: center;
    font-size: 0.9rem;
  }

  .card-testing {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .card-testing .testing-detail::before {
    margin: 0 4px;
  }

  .card-testing .testing-confirmed-icon {
    margin-left: 0;
  }

  .ghost-button,
  .primary-pill,
  .btn,
  button,
  a.button {
    min-height: 44px;
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .icon-button,
  .theme-toggle {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .product-grid,
  .dashboard-grid,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .owned-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-card,
  .type-card,
  .assistant-card,
  .card,
  .stat-card,
  .dashboard-card,
  .agent-card,
  .marketplace-card {
    padding: 12px;
    gap: 8px;
  }

  .product-card,
  .marketplace-card {
    --card-title-font-size: 1.04rem;
    --card-title-line-height: 1.24;
  }

  .product-card {
    padding-top: 15px;
  }

  .product-card .card-title-block,
  .marketplace-card .card-title-block {
    margin-top: 2px;
  }

  .product-card .card-title-meta,
  .marketplace-card .card-title-meta {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .product-card .ownership-badge--corner {
    top: 8px;
    right: 8px;
    max-width: calc(100% - 16px);
  }

  .product-card .card-cover {
    margin-top: 4px;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .card-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .card-actions .primary-pill.review-button {
    width: 100%;
    justify-content: center;
  }

  .card-actions .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 960px) {
  .prompt-hero-content {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
  }

  .product-box-hero-face-overlay {
    top: 16.9%;
    right: 24.8%;
    bottom: 15.8%;
    left: 36.2%;
  }

  .product-box-hero-overlay,
  .product-box-overlay {
    transform: skewY(-0.75deg) rotate(-0.28deg);
    transform-origin: 50% 15%;
  }

  .prompt-hero-visual {
    width: 100%;
  }

  .prompt-hero-content .product-info {
    width: 100%;
  }

  .product-hero-layout {
    gap: 14px;
  }

  .product-sticky-card {
    order: -1;
    margin-bottom: 2px;
  }

  .product-sticky-card .ownership-card {
    margin-top: 0.35rem;
    padding: 0.65rem;
  }

  .product-sticky-card .ownership-card-header {
    align-items: flex-start;
    gap: 0.35rem 0.5rem;
  }

  .product-sticky-card .ownership-owned-since {
    font-size: 0.78rem;
  }

  .product-sticky-card .product-cta {
    gap: 8px;
  }

  .product-sticky-card .product-hint {
    font-size: 0.84rem;
  }


  .owned-product-ownership-row {
    align-items: flex-start;
  }

  .owned-product-ownership-row .ownership-badge,
  .owned-product-ownership-row .pill {
    width: fit-content;
    max-width: 100%;
  }
  .pill-row,
  .pill-row-ownership {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .pill-row .pill,
  .pill-row .type-pill,
  .pill-row-ownership .pill {
    max-width: 100%;
  }
}

@media (min-width: 961px) {
  .product-box-hero-face-overlay {
    top: 16.6%;
    right: 24.2%;
    bottom: 15.2%;
    left: 36.6%;
  }

  .product-box-hero-overlay,
  .product-box-overlay {
    transform: skewY(-0.75deg) rotate(-0.28deg);
    transform-origin: 50% 13%;
  }
}

@media (max-width: 640px) {
  .prompt-hero-content {
    gap: 14px;
  }

  .product-box-hero {
    max-width: 300px;
  }

  .product-card .ownership-badge--corner {
    font-size: 0.64rem;
    padding: 0.17rem 0.4rem;
    border-radius: 9px;
  }

  .product-card,
  .marketplace-card {
    --card-title-font-size: 1rem;
    --card-title-line-height: 1.22;
  }

  .product-card .card-cover {
    margin-bottom: 0.5rem;
  }

  .product-box-hero-inner,
  .product-box-hero img,
  .product-box-hero-placeholder {
    min-height: 360px;
    max-height: 420px;
  }

  .product-box-hero-meta {
    justify-content: center;
  }

  .product-box-hero-overlay,
  .product-box-overlay {
    transform: skewY(-0.72deg) rotate(-0.24deg);
    transform-origin: 50% 18%;
    clip-path: polygon(1% 0, 99% 0, 100% 100%, 0 100%);
  }

  .product-box-hero-face-overlay {
    top: 14.2%;
    right: 23.6%;
    bottom: 13.8%;
    left: 35.4%;
  }

  .product-box-hero-overlay,
  .product-box-overlay {
    --overlay-gap: clamp(0.25rem, 0.72vw, 0.48rem);
    --overlay-inline-pad: clamp(0.16rem, 0.65vw, 0.3rem);
  }

  .product-box-hero-overlay-title,
  .product-box-overlay-title {
    font-size: clamp(1rem, 2.55vw, 1.6rem);
    -webkit-line-clamp: 2;
  }

  .product-box-hero-overlay-tagline,
  .product-box-overlay-tagline {
    font-size: clamp(0.52rem, 1.5vw, 0.72rem);
    -webkit-line-clamp: 2;
  }

  .product-box-hero-overlay-bullets,
  .product-box-overlay-bullets {
    font-size: clamp(0.5rem, 1.35vw, 0.68rem);
  }

  .product-box-hero-overlay-version,
  .product-box-overlay-version {
    font-size: clamp(0.48rem, 1.25vw, 0.62rem);
  }

  .prompt-hero-content .product-info {
    text-align: center;
  }

  .prompt-hero-content .badge-row,
  .prompt-hero-content .pill-row {
    justify-content: center;
  }

  .product-sticky-card {
    padding: 12px;
  }

  .product-sticky-card .product-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .product-sticky-card .product-cta .primary-pill,
  .product-sticky-card .product-cta .secondary-cta,
  .product-sticky-card .product-cta .tertiary-cta {
    width: 100%;
    justify-content: center;
  }

  .ownership-id-wrap {
    width: 100%;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .ownership-id-code {
    max-width: min(68vw, 18rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ownership-copy-button {
    white-space: nowrap;
  }
}


@media (max-width: 1024px) {
  .home-hero-grid--with-featured {
    grid-template-areas: "copy" "featured";
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
  }

  .home-hero-main {
    width: 100%;
  }

  .home-hero-featured {
    justify-content: flex-start;
    max-width: min(420px, 100%);
  }

  .home-hero-featured-panel {
    max-width: 100%;
  }

  .home-hero-featured-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.85rem;
  }
}

@media (max-width: 720px) {
  .home-hero-featured-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-featured {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .home-listing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-featured-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .home-listing-grid {
    grid-template-columns: 1fr;
  }

  .home-listing-card,
  .home-featured-card {
    min-height: 0;
  }

  .hero-chip-row {
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .product-card,
  .marketplace-card {
    --card-title-font-size: 0.96rem;
    --card-title-line-height: 1.2;
  }

  .product-card .ownership-badge--corner {
    top: 7px;
    right: 7px;
    max-width: calc(100% - 14px);
    font-size: 0.61rem;
  }

  .product-card .card-cover {
    border-radius: 10px;
  }
}
