@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

: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;
}

[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;
}

[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;
}

* {
  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;
}

header {
  padding: 24px 0 12px;
}

.announcement-banner {
  width: 100%;
  background: var(--accent);
  color: var(--text-on-accent, #ffffff);
}

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

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

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

.banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.banner-actions .feedback-button {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.banner-actions .feedback-button:hover,
.banner-actions .feedback-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: #ffffff;
}

.banner-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.banner-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 8px;
}

.banner-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.banner-dismiss:hover,
.banner-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

.banner-dismiss:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.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(--surface);
  color: var(--text-primary);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--toast-accent, var(--accent));
  box-shadow: var(--shadow-card);
  padding: 16px 16px 16px 14px;
  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: rgba(22, 72, 197, 0.1);
  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-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: var(--panel-muted);
  color: var(--text-primary);
  outline: 2px solid transparent;
}

.toast--info {
  --toast-accent: var(--primary-500);
}

.toast--info .toast-icon {
  background: var(--primary-100);
}

.toast--success {
  --toast-accent: var(--success-500);
}

.toast--success .toast-icon {
  background: var(--success-100);
}

.toast--warning {
  --toast-accent: var(--highlight-500);
}

.toast--restriction {
  --toast-accent: var(--danger-500);
}

.toast--warning .toast-icon,
.toast--restriction .toast-icon {
  background: var(--highlight-100);
}

.toast--restriction .toast-icon {
  background: var(--danger-100);
}

@media (max-width: 720px) {
  .banner-shell {
    gap: 12px;
  }

  .banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.header-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 16px calc(var(--shell-padding) - 2px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  box-shadow: none;
}

.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: 10px 12px 8px;
  border-bottom: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

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

.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);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  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% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 20;
}

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

.search-section-title {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

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

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  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-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-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  width: min(360px, calc(100vw - 2 * var(--pad-mobile)));
  max-width: calc(100vw - 2 * var(--pad-mobile));
  box-shadow: var(--shadow-card);
  z-index: 10;
}

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

.login-title {
  margin: 0;
  font-weight: 600;
}

.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);
}

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

.user-menu {
  position: relative;
}

.user-menu-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 8px 4px 6px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
  cursor: pointer;
}

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

.user-menu-toggle .chevron {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.user-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 12px 14px;
  box-shadow: var(--shadow-sm);
  min-width: 220px;
  width: min(280px, calc(100vw - 2 * var(--pad-mobile)));
  max-width: 280px;
}

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

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

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

.user-summary-link.is-primary {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-2);
}

.user-summary-link.is-primary:hover,
.user-summary-link.is-primary:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
}

.user-summary-link.is-primary:active {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 46%, transparent);
}

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

.user-summary-link.subtle {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  border-style: solid;
  box-shadow: none;
}

.user-summary-link.subtle:active {
  background: var(--panel-muted);
  color: color-mix(in srgb, var(--text-secondary) 85%, #000);
  border-color: var(--border-subtle);
}

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

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

.user-summary-link.is-logout {
  margin-top: 8px;
  color: #b23a3a;
  font-weight: 500;
}

.user-summary-link.is-logout:hover,
.user-summary-link.is-logout:focus-visible {
  color: #b23a3a;
  background: rgba(178, 58, 58, 0.04);
  border-color: rgba(178, 58, 58, 0.12);
}

.user-summary-link.is-logout:active {
  background: rgba(178, 58, 58, 0.08);
  border-color: rgba(178, 58, 58, 0.2);
}

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

.user-menu-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 4px 2px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
}

.user-menu-identity .user-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-menu-identity .user-role {
  margin: 0;
  font-size: 0.9rem;
}

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

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

.user-menu-section + .user-menu-section {
  border-top: 0;
  margin-top: 12px;
  padding-top: 12px;
}

.user-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: currentColor;
  line-height: 0;
}

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

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.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);
}

.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: #f6f8fa;
}

.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: rgba(255, 255, 255, 0.7);
}

.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: #e1e7f3;
  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: #2b5fd6;
  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;
}

.markdown-preview 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 {
  position: relative;
  background: var(--panel-muted);
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 0 0 12px;
}

.markdown-preview pre code {
  background: transparent;
  padding: 0;
}

.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: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
  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;
}

.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-label {
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(22, 72, 197, 0.12), rgba(22, 72, 197, 0.04));
  color: var(--accent);
  border: 1px solid var(--border-subtle);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.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);
}

.assistant-shopping-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.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;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

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

.checkout-summary-details {
  display: grid;
  gap: 4px;
}

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

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

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

.purchased-card:hover,
.purchased-card:focus-within {
  border-color: #d7dde8;
  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: #f3f6fb;
  border: 1px solid #e6eaf2;
  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;
}

.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 rgba(15, 23, 42, 0.2);
  background: #ffffff;
  color: #334155;
  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: rgba(15, 23, 42, 0.35);
  color: #0f172a;
}

.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: #f3f6fb;
  border: 1px solid #e6eaf2;
  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: #d7dde8;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

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

.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:
      "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:
      "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: transparent;
  color: var(--accent);
  transform: none;
  box-shadow: 0 0 0 1px var(--accent), 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);
}

.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-launcher {
  position: static;
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.feedback-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
}

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

.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);
}

.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;
}

.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;
}

/* Dashboard layout */
.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 12px 24px 60px;
}

.dashboard-header {
  align-items: flex-start;
}

.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 6px;
}

.lead {
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.subtitle {
  margin: 6px 0 0;
  font-weight: 600;
  color: var(--text-primary);
}

.hero h2 {
  margin: 0;
  font-size: 1.9rem;
}

.stat-grid {
  display: grid;
  gap: 14px;
}

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.stat-card-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-card-button:hover,
.stat-card-button:focus-visible {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-100) 60%, transparent);
  outline: none;
}

.stat-label {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stat-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.stat-subtext {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
}

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

.panel h3 {
  margin: 2px 0;
  font-size: 1.4rem;
}

.panel-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(10, 20, 40, 0.04);
}

.panel-actions .ghost-button,
.panel-actions .filter-pill,
.panel-actions .primary-pill {
  margin: 0;
}

.panel-filters {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-field {
  flex: 1 1 280px;
}

.search-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel-muted);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.filter-pill {
  background: var(--sunken);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.filter-pill[aria-pressed="true"] {
  background: var(--gradient);
  color: #0b0c12;
  border-color: color-mix(in srgb, var(--primary-500) 55%, transparent);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

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

.dashboard-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease;
  overflow: visible;
}

.dashboard-card:hover,
.dashboard-card:focus-within {
  transform: none;
  box-shadow: var(--shadow-card);
}

.dashboard-empty {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.purchased-empty-state {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.purchased-empty-state h4 {
  margin: 0;
}

.purchase-state-card {
  border-style: solid;
}

.purchase-state-card .purchase-state-title {
  margin: 0;
  font-size: 1rem;
}

.purchase-state-card .muted {
  margin: 0.4rem 0 0;
}

.purchase-state-actions {
  margin-top: 0.7rem;
}

.purchase-state-card--pending {
  border-color: color-mix(in srgb, var(--primary-500) 35%, transparent);
  background: color-mix(in srgb, var(--primary-100) 48%, var(--surface-color) 52%);
}

.purchase-state-card--error {
  border-color: color-mix(in srgb, #f87171 48%, transparent);
  background: color-mix(in srgb, #f87171 12%, var(--surface-color) 88%);
}

.purchase-state-card--warning {
  border-color: color-mix(in srgb, #f59e0b 48%, transparent);
  background: color-mix(in srgb, #f59e0b 13%, var(--surface-color) 87%);
}

.sigrix-skeleton-card {
  pointer-events: none;
  gap: 12px;
}

.sigrix-skeleton-line {
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--line-color) 45%, transparent) 0%,
    color-mix(in srgb, var(--line-color) 72%, transparent) 50%,
    color-mix(in srgb, var(--line-color) 45%, transparent) 100%
  );
  background-size: 220% 100%;
  animation: sigrix-skeleton-shimmer 1.3s ease infinite;
}

.sigrix-skeleton-line--title {
  width: 70%;
  height: 18px;
}

.sigrix-skeleton-line--subtitle {
  width: 48%;
  height: 14px;
}

.sigrix-skeleton-line--body {
  width: 100%;
  height: 58px;
}

.sigrix-skeleton-owner {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sigrix-skeleton-line--owner {
  width: 85%;
  height: 12px;
}

.sigrix-skeleton-line--owner-short {
  width: 52%;
}

@keyframes sigrix-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.account-layout {
  gap: 22px;
}

.account-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-action-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.account-action-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.account-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(22, 72, 197, 0.06), rgba(15, 47, 112, 0.08)), var(--surface);
  border-color: rgba(22, 72, 197, 0.22);
}

.account-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(22, 72, 197, 0.2), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(109, 175, 255, 0.16), transparent 35%);
  pointer-events: none;
}

.account-hero > * {
  position: relative;
  z-index: 1;
}

.account-hero-header {
  align-items: flex-start;
}

.account-hero-content {
  margin-top: 16px;
  display: flex;
}

.account-status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
  width: 100%;
}

.account-status-strip .chip-label,
.account-status-strip .chip-value {
  margin: 0;
}

.account-status-strip .chip-value {
  white-space: nowrap;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  box-shadow: 0 0 0 8px rgba(12, 18, 28, 0.12);
}

.status-dot.live {
  background: var(--success-500);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--success-500), transparent 84%);
}

.status-dot.accent {
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(46, 117, 250, 0.22);
}

.status-dot.muted {
  background: var(--text-secondary);
}

.chip-label {
  margin: 0;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.chip-value {
  margin: 2px 0 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.account-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-card.danger .chip-value {
  color: #ff95a4;
}

.account-delete-confirmation {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}

.account-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.subtle-pill {
  background: var(--panel-muted);
  color: var(--text-secondary);
  border: 1px dashed var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.account-list-row dt,
.account-list-row dd {
  margin: 0;
}

.account-list-row dt {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.account-list-row dd {
  color: var(--text-secondary);
}

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

.username-display .chip-value {
  color: var(--text-primary);
}

.username-edit svg {
  width: 16px;
  height: 16px;
}

.username-edit-form {
  margin-top: 10px;
}

.username-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.username-edit-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.username-helper {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.username-helper.success {
  color: var(--success-700);
}

.username-helper.error {
  color: #ff7b7b;
}

.account-note {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.preview-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-left: 8px;
}

.preference-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preference-section-title {
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.preference-card {
  padding: 14px 16px;
  background: var(--panel-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.preference-card-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 720px) {
  .account-status-strip .chip-value {
    white-space: normal;
  }

  .account-action-group {
    align-items: flex-start;
  }
}

.user-page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(22, 72, 197, 0.12), rgba(10, 19, 48, 0.12)), var(--surface);
  border-color: rgba(22, 72, 197, 0.22);
}

.user-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 40%, rgba(22, 72, 197, 0.16), transparent 36%),
    radial-gradient(circle at 70% 20%, rgba(15, 47, 112, 0.24), transparent 38%);
  pointer-events: none;
}

.user-page-hero > * {
  position: relative;
  z-index: 1;
}

.user-page-hero-header {
  align-items: flex-start;
}

.user-hero-meta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.meta-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-card .card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.agent-details {
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: var(--text-secondary);
}

.agent-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
}

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

.detail-label {
  margin: 10px 0 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.kebab-menu {
  position: relative;
}

.kebab-menu[open] {
  z-index: 4;
}

.kebab-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-muted);
  font-weight: 700;
}

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

.kebab-menu[open] summary {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-100) 60%, transparent);
}

.kebab-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  z-index: 5;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}

.status-pill.live {
  background: var(--success-100);
  color: var(--success-700);
  border-color: color-mix(in srgb, var(--success-500), transparent 40%);
}

.status-pill.draft {
  background: var(--draft-100);
  color: var(--draft-700);
  border-color: color-mix(in srgb, var(--draft-500), transparent 40%);
}

.status-pill.pending-review {
  background: var(--highlight-100);
  color: var(--highlight-700);
  border-color: color-mix(in srgb, var(--highlight-500), transparent 40%);
}

.status-pill.approved {
  background: var(--success-100);
  color: var(--success-700);
  border-color: color-mix(in srgb, var(--success-500), transparent 40%);
}

.status-pill.rejected {
  background: var(--danger-100);
  color: var(--danger-700);
  border-color: color-mix(in srgb, var(--danger-500), transparent 40%);
}

.status-pill.purchased {
  background: var(--highlight-100);
  color: var(--highlight-700);
  border-color: color-mix(in srgb, var(--highlight-500), transparent 40%);
}

.status-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-flow-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-flow-toggle {
  cursor: pointer;
}

.status-flow-toggle:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.status-flow-overlay {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  max-width: 320px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  z-index: 6;
  display: none;
}

.status-flow-overlay.is-open {
  display: block;
}

.status-flow-popover {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-flow-title {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.status-flow-step {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--panel-muted);
}

.status-flow-step.is-current,
.status-flow-step.is-active {
  border-style: solid;
  color: var(--text-primary);
  border-color: rgba(255, 201, 102, 0.55);
  background: rgba(255, 201, 102, 0.18);
}

.status-flow-step.is-complete {
  border-style: solid;
  color: #6af0df;
  border-color: rgba(61, 214, 198, 0.45);
  background: rgba(61, 214, 198, 0.18);
}

.status-flow-step:focus-visible {
  outline: 2px solid rgba(255, 201, 102, 0.8);
  outline-offset: 2px;
}

.status-flow-menu {
  position: relative;
}

.status-flow-menu[open] {
  z-index: 4;
}

.status-flow-trigger {
  list-style: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-flow-trigger:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.status-flow-trigger::-webkit-details-marker {
  display: none;
}

.status-flow-menu[open] .status-flow-trigger {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-100) 60%, transparent);
}

.status-flow-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-flow-option,
.status-flow-empty {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.status-flow-option {
  background: var(--panel-muted);
  color: var(--text-primary);
}

.status-flow-option:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.status-flow-empty {
  color: var(--text-secondary);
  background: transparent;
}

.purchased-panel {
  background: var(--panel-muted);
  border-style: dashed;
  padding: 0;
}

.purchased-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
  align-items: start;
}

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

.purchased-main {
  grid-column: span 8;
  display: grid;
  gap: 16px;
}

.purchased-shell--single .purchased-main {
  grid-column: 1 / -1;
}

.purchased-aside {
  grid-column: span 4;
}

.purchased-access-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
  position: sticky;
  top: 24px;
}

.purchased-access-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.purchased-status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.purchased-access-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.purchased-access-actions .primary-button,
.purchased-access-actions .outline-button {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.purchased-access-actions .primary-button {
  background: var(--gradient);
  color: #f7f9ff;
  border: 1px solid var(--accent);
  box-shadow: 0 10px 24px rgba(22, 72, 197, 0.18);
}

.purchased-access-actions .primary-button:hover,
.purchased-access-actions .primary-button:focus-visible {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-card);
}

.purchased-access-actions .outline-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.purchased-access-actions .outline-button:hover,
.purchased-access-actions .outline-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--sunken);
}

.purchased-access-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.purchased-access-link:hover,
.purchased-access-link:focus-visible {
  color: var(--accent);
}

.purchased-access-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

.muted {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 6px;
}

.form-wrapper {
  margin-top: 14px;
}

@media (max-width: 800px) {
  .purchased-shell {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .purchased-main,
  .purchased-aside {
    grid-column: 1 / -1;
  }

  .purchased-access-card {
    position: static;
  }
}

.agent-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer {
  margin-top: 40px;
  padding: 32px 0 36px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-shell {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: start;
}

.footer-brand {
  display: grid;
  gap: 8px;
}

.footer-logo-image {
  display: block;
  height: 28px;
  width: auto;
  max-height: 32px;
  object-fit: contain;
  vertical-align: middle;
}

.footer-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-meta-logo {
  height: 20px;
  width: auto;
  display: block;
  opacity: 0.85;
  max-height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.footer-tagline {
  margin: 0;
  color: var(--text-secondary);
}

.footer-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.footer-section {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-section h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.footer-section-toggle {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
}

.footer-section-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 0 0 3px var(--surface);
  border-radius: 6px;
}

.footer-section p {
  margin: 0;
  color: var(--text-secondary);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.footer-links[hidden] {
  display: none;
}

@media (max-width: 1023px) {
  .footer-columns {
    gap: 12px;
  }

  .footer-section {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .footer-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .footer-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .footer-section-toggle {
    cursor: default;
  }
}

.footer-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--surface-strong);
  outline: none;
}

.footer-social-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(91, 108, 255, 0.2);
}

.footer-social-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.footer-meta-version {
  color: var(--text-secondary);
}

.footer-meta-pill {
  font-size: 0.85rem;
}

.footer-link,
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover,
.footer-link:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-link:focus-visible,
.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--surface);
  border-radius: 4px;
}

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

.input-grid .form-field.is-wide {
  grid-column: 1 / -1;
}

.input-with-indicator,
.input-with-prefix {
  position: relative;
  width: 100%;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-indicator input {
  padding-right: 96px;
}

.char-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.9rem;
}

.char-counter.is-warning {
  color: var(--warning-color);
}

.input-with-prefix .input-prefix {
  color: var(--text-secondary);
  font-weight: 700;
}

.input-with-prefix .currency-select {
  flex: 0 0 88px;
  width: 88px;
  min-width: 72px;
}

.input-with-prefix input {
  flex: 1;
  min-width: 140px;
}

.price-free-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-secondary);
}

.price-free-row .price-pill {
  margin-left: 0;
}

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

.field-helper.is-subtle {
  color: var(--muted-foreground);
}

.field-helper.is-error {
  color: var(--error-color);
  font-weight: 700;
}

.field-error {
  margin: 0;
  color: var(--error-color);
  font-weight: 700;
}

.form-legend {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.publish-legend {
  margin-top: 24px;
}

.field-required-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--indicator-circle-size);
  height: var(--indicator-circle-size);
  border-radius: 999px;
  background: rgba(249, 143, 157, 0.2);
  color: #f98f9d;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: var(--text-primary);
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.help-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--indicator-circle-size);
  height: var(--indicator-circle-size);
  min-width: var(--indicator-circle-size);
  min-height: var(--indicator-circle-size);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  align-self: center;
  vertical-align: middle;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
}

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

.help-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(22, 72, 197, 0.15);
}

.help-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  max-width: 240px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.help-icon::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--text-primary);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.help-icon:hover::after,
.help-icon:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

.help-icon:hover::before,
.help-icon:focus-visible::before {
  opacity: 1;
}

.form-field.is-optional > span {
  color: var(--text-secondary);
}

.form-field.is-required > span,
.form-field.is-required .field-label,
.checkbox-field.is-required span {
  display: inline-flex;
  align-items: center;
}

.form-field.is-required > span::after,
.form-field.is-required .field-label::after,
.checkbox-field.is-required span::after {
  content: "✱";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(249, 143, 157, 0.2);
  color: #f98f9d;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  align-self: center;
}

.form-field .required-marker {
  color: #f98f9d;
  margin-left: 4px;
}

.form-field.required-field.required-missing input,
.form-field.required-field.required-missing textarea,
.form-field.required-field.required-missing .checkbox-field {
  outline: 2px solid #f98f9d;
  outline-offset: 1px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-primary);
  font-size: 1rem;
}

.form-field.is-wide input {
  padding: 14px 12px;
  font-size: 1.05rem;
}

.checkbox-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
}

.checkbox-field input {
  margin-top: 4px;
}

.category-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
}

.category-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.category-toggle-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.category-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  padding: 4px 2px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
}

.category-placeholder {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.category-selector-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--sunken);
  max-height: 220px;
  overflow: auto;
}

.category-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--sunken);
}

.category-options .checkbox-field {
  font-weight: 600;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

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

.repeatable-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

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

.repeatable-header .section-label {
  margin: 0;
}

.repeatable-actions .ghost-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.hidden-action {
  display: none !important;
}

.form-status {
  min-height: 22px;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-status.success {
  color: #6af0df;
}

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

.roadmap-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 24px 80px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.roadmap-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.roadmap-hero h1 {
  margin: 6px 0 6px;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}
.roadmap-hero .roadmap-note-text {
  margin: 0 0 10px;
}

.roadmap-hero .lead {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.roadmap-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.roadmap-year {
  position: relative;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.roadmap-year::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--gradient);
}

.roadmap-year-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 6px;
  margin-bottom: 12px;
  position: relative;
}

.roadmap-year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: var(--gradient);
  color: #0e0f14;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary-500) 25%, transparent);
}

.roadmap-year-title {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.roadmap-year-subtitle {
  margin: 4px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  position: relative;
}

.roadmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.roadmap-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  flex-direction: column;
  width: 100%;
}

.roadmap-card:hover,
.roadmap-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);
}

.roadmap-title {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.roadmap-phase {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.phase-milestones {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  background: var(--sunken);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  min-width: 180px;
}

.phase-milestones::before {
  content: "";
  position: absolute;
  inset: 50% 14px auto 14px;
  height: 2px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary-500) 45%, transparent),
    color-mix(in srgb, var(--primary-100) 35%, transparent)
  );
  transform: translateY(-50%);
  opacity: 0.8;
}

.phase-pip {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  overflow: visible;
}

.phase-pip::after {
  content: attr(data-phase);
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 0.68rem;
  letter-spacing: -0.01em;
  opacity: 0.7;
}

.phase-pip.is-active {
  background: radial-gradient(
      circle at 35% 35%,
      color-mix(in srgb, var(--primary-100) 40%, transparent),
      color-mix(in srgb, var(--primary-500) 25%, transparent)
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary-500) 60%, transparent),
      color-mix(in srgb, var(--primary-700) 55%, transparent)
    );
  border-color: color-mix(in srgb, var(--primary-500) 50%, transparent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-500) 28%, transparent),
    0 0 0 5px color-mix(in srgb, var(--primary-100) 60%, transparent);
}

.phase-pip.is-active.is-bridge {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary-500) 65%, transparent),
    color-mix(in srgb, var(--primary-100) 65%, transparent)
  );
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary-500) 25%, transparent),
    0 0 0 5px color-mix(in srgb, var(--primary-100) 50%, transparent);
}

.roadmap-description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.roadmap-items {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
  position: relative;
}

.roadmap-items li {
  position: relative;
  list-style: none;
  padding-left: 14px;
}

.roadmap-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary-500) 40%, transparent);
}

.roadmap-note-text {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 720px) {
  .landing-hero {
    padding-inline: 18px;
  }

  .landing-hero-shell {
    grid-template-columns: 1fr;
  }

  .assistant-picker {
    padding: 18px;
  }
}

/* Guide page */
.guide-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 24px 80px;
}

.guide-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-hero h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
}

.guide-summary-card {
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: grid;
  gap: 8px;
}

.guide-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary-100) 55%, transparent);
  color: var(--text-primary);
  font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--primary-500) 35%, transparent);
  width: fit-content;
}

.guide-steps {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.section-header h2 {
  margin: 4px 0 0;
  font-size: 1.7rem;
}

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

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--gradient);
  color: #0e0f14;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--primary-500) 25%, transparent);
}

.step-label {
  margin: 0;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-card h3 {
  margin: 4px 0 6px;
  font-size: 1.2rem;
}

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

.step-list {
  margin: 0;
  padding-left: 16px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
}

.guide-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.guide-contrast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.contrast-card {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.example-card {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.guide-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-panel h3 {
  margin: 2px 0 6px;
}

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

.guide-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-secondary);
}

.guide-rows {
  display: grid;
  gap: 10px;
}

.guide-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--primary-500) 35%, transparent);
  margin-top: 6px;
}

.guide-cta {
  background: linear-gradient(
    120deg,
    color-mix(in srgb, var(--primary-500) 16%, transparent),
    color-mix(in srgb, var(--primary-100) 40%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--primary-500) 35%, transparent);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-soft);
  flex-wrap: wrap;
}

.cta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .guide-main {
    padding-inline: 18px;
  }

  .contrast-grid {
    grid-template-columns: 1fr;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .guide-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

.about-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-hero-section {
  padding: 0;
}

.about-hero {
  padding: 2.75rem 0 2.25rem;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.about-hero .hero-grid {
  align-items: center;
  padding: 0;
  gap: 1.5rem;
}

.about-info-section {
  padding: 0 0 90px;
}

.static-hero {
  max-width: 760px;
  display: grid;
  gap: 12px;
  padding: 24px 0;
}

.static-hero.hero {
  background: none;
  border: none;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.static-hero h1 {
  margin: 0;
}

.static-hero .lead {
  color: var(--text-secondary);
}

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

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 8px;
}

.info-card h2 {
  margin: 0;
}

.info-card p {
  margin: 0;
  color: var(--text-secondary);
}

/* Marketplace */
.marketplace-hero {
  padding: 24px 0 0;
}

.marketplace-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.marketplace-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiet-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.marketplace-help-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
}

.marketplace-help-link__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.quiet-link:hover,
.quiet-link:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.marketplace-help-link:hover,
.marketplace-help-link:focus-visible {
  background: rgba(22, 72, 197, 0.1);
  text-decoration: none;
}

.search-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.input-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sunken);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  flex: 1;
}

.input-with-icon input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 100%;
  outline: none;
}

.type-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 24px rgba(10, 20, 40, 0.04);
  max-width: 100%;
  flex-wrap: nowrap;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  min-width: 88px;
  min-height: 42px;
  flex: 0 0 auto;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.tab-pill[aria-selected='false'] {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  box-shadow: none;
}

.tab-pill:hover {
  color: var(--text-primary);
  background: var(--sunken);
  border-color: var(--border);
}

.tab-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.tab-pill.is-active,
.tab-pill[aria-selected='true'] {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong, #0f2f70));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(12, 42, 120, 0.22), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.tab-pill.is-disabled,
.tab-pill[aria-disabled='true'] {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

.tab-pill.is-disabled:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.tab-pill.is-disabled::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 10;
}

.tab-pill.is-disabled:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.coming-soon-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 100;
}

.coming-soon-toast.is-visible {
  opacity: 1;
}

.marketplace-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 0 60px;
}

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

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

.filter-drawer {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.filter-drawer.is-open {
  display: block;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.filter-block + .filter-block {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--sunken);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

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

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card.is-clickable {
  cursor: pointer;
}

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

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

.card-description-preview {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.card-header,
.card-footer,
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-header {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.type-pill-inline {
  font-size: 0.75rem;
  padding: 4px 10px;
}

.card-title-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 4px;
}

.card-title-row {
  display: flex;
  align-items: baseline;
  width: 100%;
}

.card-title-meta {
  display: flex;
  align-items: center;
  width: 100%;
}

.card-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  line-clamp: 2;
}

.card-publisher {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 0;
}

.publisher-link {
  display: inline-flex;
  min-width: 0;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publisher-link:hover,
.publisher-link:focus-visible {
  color: var(--accent-2);
  text-decoration-thickness: 2px;
}

.publisher-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

.publisher-verified {
  font-size: 0.8rem;
  color: var(--accent);
}

.card-sales-meta {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.75;
}

.card-like-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.75;
}

.price-pill {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.price-pill-free {
  background: rgba(38, 154, 95, 0.14);
  color: #1f7a4c;
  border-color: rgba(38, 154, 95, 0.3);
}

.price-pill-paid {
  background: var(--sunken);
  color: var(--accent);
  border-color: var(--border-subtle);
}

.price-pill-unknown {
  background: var(--sunken);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.card-footer {
  justify-content: flex-end;
  margin-top: auto;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.card-actions a {
  white-space: nowrap;
}

.card-actions .ghost-button,
.card-actions .primary-pill {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.card-actions .cart-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.marketplace-main .card-actions .cart-button,
.home-main .card-actions .cart-button,
.seller-profile-main .card-actions .cart-button {
  background: #ffffff;
  color: var(--accent);
  box-shadow: none;
}

.marketplace-main .card-actions .cart-button:hover,
.marketplace-main .card-actions .cart-button:focus-visible,
.home-main .card-actions .cart-button:hover,
.home-main .card-actions .cart-button:focus-visible,
.seller-profile-main .card-actions .cart-button:hover,
.seller-profile-main .card-actions .cart-button:focus-visible {
  background: #f4f6ff;
  color: var(--accent);
}

.card-actions .cart-button[aria-disabled='true'],
.card-actions .cart-button[aria-disabled='true']:hover,
.card-actions .cart-button[aria-disabled='true']:focus-visible {
  background: var(--panel-muted);
  color: var(--text-secondary);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
}

.card-actions .cart-button[aria-disabled='true'][data-tooltip] {
  position: relative;
}

.card-actions .cart-button[aria-disabled='true'][data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  max-width: min(360px, 90vw);
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  text-transform: none;
  white-space: pre-line;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-actions .cart-button[aria-disabled='true'][data-tooltip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--text-primary);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.card-actions .cart-button[aria-disabled='true'][data-tooltip]:hover::after,
.card-actions .cart-button[aria-disabled='true'][data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

.card-actions .cart-button[aria-disabled='true'][data-tooltip]:hover::before,
.card-actions .cart-button[aria-disabled='true'][data-tooltip]:focus-visible::before {
  opacity: 1;
}

.marketplace-main .card-actions .cart-button .cart-label,
.home-main .card-actions .cart-button .cart-label,
.seller-profile-main .card-actions .cart-button .cart-label {
  color: inherit;
}

.card-actions .cart-icon {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.card-actions .cart-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.card-actions .cart-icon .fa-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.card-actions .cart-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.dashboard-card .card-actions .primary-pill {
  transition: none;
}

.dashboard-card .card-actions .primary-pill:hover,
.dashboard-card .card-actions .primary-pill:focus-visible {
  background: var(--gradient);
  color: #f7f9ff;
  box-shadow: none;
}

.card-actions .primary-pill.review-button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.card-actions .primary-pill.review-button:hover,
.card-actions .primary-pill.review-button:focus-visible {
  text-decoration: none;
}

.card-testing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  padding: 0;
}

.card-testing .testing-badge {
  font-weight: 700;
  color: var(--text-primary);
}

.card-testing .testing-detail::before {
  content: "•";
  margin: 0 6px 0 4px;
  color: var(--text-secondary);
}

.card-testing .testing-confirmed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: var(--accent);
  background: transparent;
  margin-left: 2px;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.card-testing .testing-confirmed-icon:hover {
  color: var(--accent-2);
}

.card-testing .testing-confirmed-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(22, 72, 197, 0.15);
}

.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title]) {
  position: relative;
}

.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title])::after {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  max-width: min(360px, 90vw);
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
  box-shadow: var(--shadow-xs);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title])::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--text-primary);
  transform: translateX(-50%) rotate(45deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.card-testing .testing-confirmed-icon[data-tooltip]::after {
  content: attr(data-tooltip);
}

.card-testing .testing-confirmed-icon:not([data-tooltip])[aria-label]::after {
  content: attr(aria-label);
}

.card-testing .testing-confirmed-icon:not([data-tooltip]):not([aria-label])[title]::after {
  content: attr(title);
}

.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title]):hover::after,
.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title]):focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title]):hover::before,
.card-testing .testing-confirmed-icon:is([data-tooltip], [aria-label], [title]):focus-visible::before {
  opacity: 1;
}

.price {
  font-weight: 700;
}

.empty-state {
  padding: 14px;
  background: var(--sunken);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

/* Product detail */
.product-hero {
  padding-top: 16px;
  margin-bottom: 24px;
}

.product-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.product-heading {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.product-heading.product-heading-main {
  display: block;
}


.prompt-hero-content {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.prompt-hero-visual {
  display: flex;
  justify-content: center;
}

.product-box-hero {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-box-hero-inner {
  position: relative;
  width: 100%;
  max-height: 520px;
  min-height: 440px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(155deg, var(--surface-elevated, #f6f7fb), var(--surface));
  box-shadow: var(--shadow-card);
}

.product-box-hero img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.product-box-hero-face-overlay {
  position: absolute;
  top: 17%;
  right: 25%;
  bottom: 16%;
  left: 37%;
  pointer-events: none;
}

.product-box-hero-overlay,
.product-box-overlay {
  --overlay-gap: clamp(0.2rem, 0.3vw, 0.46rem);
  --overlay-inline-pad: clamp(0.1rem, 0.2vw, 0.35rem);
  --overlay-stroke: rgba(4, 14, 38, 0.72);
  --overlay-ink-opacity: 0.95;
  position: absolute;
  inset: 0;
  color: rgba(243, 247, 255, var(--overlay-ink-opacity));
  text-align: center;
  display: grid;
  justify-items: center;
  grid-template-rows: minmax(0, auto) minmax(0, 1fr) minmax(0, auto) minmax(0, auto);
  gap: clamp(0.12rem, 0.24vw, 0.34rem);
  align-content: stretch;
  padding-inline: var(--overlay-inline-pad);
  padding-block: clamp(0.08rem, 0.2vw, 0.28rem);
  pointer-events: none;
  overflow: hidden;
  transform: skewY(-0.75deg) rotate(-0.28deg);
  transform-origin: 50% 10%;
  clip-path: polygon(1.5% 0, 98% 0, 100% 100%, 0 100%);
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(7, 18, 46, 0.34), 0 2px 4px rgba(6, 14, 36, 0.22);
}

.product-box-overlay-region {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--overlay-gap);
}

.product-box-overlay-region--label {
  align-items: flex-start;
  padding-top: clamp(0.06rem, 0.15vw, 0.2rem);
}

.product-box-overlay-region--title {
  align-self: stretch;
}

.product-box-overlay-region--tagline {
  flex-direction: column;
  gap: clamp(0.08rem, 0.16vw, 0.22rem);
  padding-bottom: clamp(0.06rem, 0.18vw, 0.18rem);
}

.product-box-overlay-region--footer {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.1rem, 0.2vw, 0.28rem);
  padding-bottom: clamp(0.04rem, 0.16vw, 0.18rem);
}

.product-box-hero-overlay-label,
.product-box-overlay-label {
  margin: 0;
  color: rgba(199, 212, 250, 0.9);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.09em;
  font-size: clamp(0.4rem, 0.2rem + 0.44vw, 0.62rem);
  max-inline-size: 22ch;
  -webkit-text-stroke: 0.35px var(--overlay-stroke);
}

.product-box-hero-overlay-title,
.product-box-overlay-title {
  margin: 0;
  font-size: clamp(0.98rem, 0.22rem + 1.42vw, 1.76rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.01em;
  max-inline-size: min(100%, 11ch);
  margin-inline: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  -webkit-text-stroke: 0.55px var(--overlay-stroke);
}

.product-box-hero-overlay-tagline,
.product-box-overlay-tagline {
  margin: 0;
  color: rgba(223, 232, 255, 0.9);
  font-size: clamp(0.45rem, 0.2rem + 0.5vw, 0.68rem);
  line-height: 1.2;
  max-inline-size: min(100%, 18ch);
  margin-inline: auto;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  -webkit-text-stroke: 0.35px var(--overlay-stroke);
}

.product-box-hero-overlay-divider,
.product-box-overlay-divider {
  width: min(86%, 170px);
  height: 1px;
  margin: clamp(0.08rem, 0.22vw, 0.24rem) auto;
  background: linear-gradient(90deg, rgba(199, 212, 250, 0), rgba(199, 212, 250, 0.95), rgba(199, 212, 250, 0));
}

.product-box-hero-overlay-bullets,
.product-box-overlay-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(0.1rem, 0.2vw, 0.2rem);
  color: rgba(232, 238, 255, 0.92);
  font-size: clamp(0.42rem, 0.2rem + 0.45vw, 0.62rem);
  line-height: 1.16;
  justify-items: center;
  max-inline-size: min(100%, 22ch);
  width: 100%;
  margin-inline: auto;
}

.product-box-hero-overlay-bullets li,
.product-box-overlay-bullets li {
  max-inline-size: 20ch;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  -webkit-text-stroke: 0.3px var(--overlay-stroke);
}

.product-box-hero-overlay-bullets li::before,
.product-box-overlay-bullets li::before {
  content: "• ";
}

.product-box-hero-overlay-version,
.product-box-overlay-version {
  margin: 0;
  color: #c7d4fa;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(0.4rem, 0.2rem + 0.44vw, 0.58rem);
  max-inline-size: min(100%, 20ch);
  margin-inline: auto;
  -webkit-text-stroke: 0.35px var(--overlay-stroke);
}

.product-box-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.product-box-hero-type,
.product-box-hero-version {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--sunken);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
}

.product-box-hero-placeholder {
  min-height: 440px;
  max-height: 520px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(99, 102, 241, 0.08),
    rgba(99, 102, 241, 0.08) 10px,
    rgba(99, 102, 241, 0.14) 10px,
    rgba(99, 102, 241, 0.14) 20px
  );
}

.product-box-hero-placeholder .placeholder-icon {
  font-size: 20rem;
  line-height: 1;
}

.product-box-hero-placeholder .placeholder-text {
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 8rem;
}

.product-info {
  flex: 1 1 520px;
}

.badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.type-pill {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.product-card[data-type="assistant"] .type-pill {
  background: #5B5BD6;
}

.product-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.title-row h1 {
  margin: 0;
}

.product-price {
  font-size: 1.4rem;
  margin: 0;
}

.value-line {
  margin: 8px 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}


.value-proposition {
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.badge-group {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.badge-group-label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.product-info .pill-row {
  gap: 8px;
}

.product-cta-integrated {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.cta-primary {
  width: 100%;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.cta-microcopy {
  display: grid;
  gap: 4px;
}

.cta-microcopy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.seller-summary {
  margin-top: 16px;
  opacity: 0.75;
}

.seller-summary .seller-label,
.seller-summary .seller-stats {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.example-output p {
  margin: 0 0 10px;
}

.example-output p:last-child {
  margin-bottom: 0;
}

.guest-mode-microcopy {
  margin: 8px 0 4px;
  font-size: 0.92rem;
  color: var(--text-muted);
}



.ownership-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success-color, #2fbf71) 62%, transparent);
  background: color-mix(in srgb, var(--success-color, #2fbf71) 20%, var(--surface));
  color: var(--success-strong, #177a47);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.ownership-badge-icon {
  font-size: 0.68rem;
}

.cart-button[data-owned="true"] .cart-icon {
  display: none;
}

.cart-button[data-owned="true"] {
  border-color: color-mix(in srgb, var(--success-color, #2fbf71) 42%, transparent);
}

.product-heading .title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.ownership-card {
  margin-top: 0.9rem;
  padding: 0.8rem;
  border: 1px solid var(--line-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-color) 92%, var(--text-color) 8%);
}

.ownership-card-inline {
  margin-top: 0.6rem;
}

.ownership-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.ownership-owned-since {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.ownership-meta-grid {
  margin: 0.65rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.ownership-meta-grid dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ownership-meta-grid dd {
  margin: 0.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.ownership-id-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
}

.ownership-meta-grid code {
  font-size: 0.82rem;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-color) 82%, black 18%);
}

.ownership-id-row {
  min-width: 0;
}

.ownership-id-code {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.ownership-copy-button {
  padding: 0.2rem 0.45rem;
  min-height: auto;
  font-size: 0.75rem;
  flex-shrink: 0;
}


.ownership-card .muted {
  color: var(--text-secondary);
}

.owner-value-panel {
  margin-top: 0.7rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--line-color) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-color) 96%, var(--text-color) 4%);
}

.owner-value-panel h4 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.owner-value-grid {
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.45rem;
}

.owner-value-grid dt {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.owner-value-grid dd {
  margin: 0.18rem 0 0;
  font-size: 0.86rem;
}

.owner-value-highlights .product-list {
  margin-top: 0.3rem;
  gap: 0.25rem;
}

.product-sticky-card :is(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ownership-checklist {
  margin-top: 0.7rem;
  border: 1px solid var(--line-color);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: color-mix(in srgb, var(--surface-color) 94%, var(--text-color) 6%);
}

.ownership-checklist summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.ownership-checklist-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.ownership-checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.ownership-checklist-item .ghost-button {
  padding: 0.2rem 0.45rem;
  min-height: auto;
}

.ownership-checklist-item.is-complete {
  color: var(--muted-color);
}

.pill-row-ownership {
  margin-top: 2px;
  margin-bottom: 2px;
}

.product-cart-badge {
  border-radius: var(--radius-pill);
  background: var(--sunken);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
 }

.product-sticky-card {
  position: sticky;
  top: 16px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-sticky-card .badge-row {
  flex-wrap: wrap;
}

.sticky-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.product-body {
  display: grid;
  gap: 40px;
  padding: 0 0 40px;
}

.product-tabs-shell {
  gap: 16px;
}

.product-tab-panel {
  display: grid;
  gap: 20px;
}

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

.product-panel {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.product-panel h3 {
  margin: 0 0 16px;
}

.product-panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.product-panel-heading-row h3 {
  margin-bottom: 0;
}

.use-panel-locked {
  border-style: dashed;
}

.locked-content {
  opacity: 0.55;
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.product-lock-note {
  margin: 12px 0;
  font-weight: 600;
}

.product-panel.condensed {
  padding: 14px 16px;
}

.product-list {
  padding-left: 20px;
  margin: 10px 0 0;
}

.product-list.checklist {
  list-style: none;
  padding-left: 0;
}

.product-list.checklist li {
  position: relative;
  padding-left: 26px;
  margin: 8px 0;
}

.product-list.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success, #1fa76a);
  font-weight: 700;
}

.product-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.product-cta .ghost-button,
.product-cta .primary-pill {
  font-size: 0.95rem;
}

.product-cta .secondary-cta,
.product-cta .tertiary-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-cta .secondary-cta {
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.product-cta .tertiary-cta {
  border-color: transparent;
  color: var(--text-secondary);
}

.product-cta.stacked {
  flex-direction: column;
  align-items: flex-start;
}

.product-hint:empty {
  display: none;
}

.product-hint {
  margin: 0;
}

.ownership-confirmed-hint {
  margin: 4px 0 0;
  font-weight: 600;
}

.ownership-policy-hint {
  margin: 0;
}

.product-sticky-card > .muted {
  margin: 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: 999px;
  padding: 6px 10px;
  font-weight: 600;
}

.pill.tested {
  background: rgba(38, 154, 95, 0.14);
  color: #1f7a4c;
  border: 1px solid rgba(38, 154, 95, 0.3);
  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: 1.5rem 0 1.25rem;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.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: 2rem 0;
}

.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: 2rem 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;
}

.admin-home-shell {
  padding-top: 12px;
}

.admin-home-shell .page-header {
  margin-bottom: 1.5rem;
}

.admin-home-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.admin-hub-card {
  padding: 1.5rem;
}

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

.admin-hub-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  background: var(--panel-background);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-hub-link:hover,
.admin-hub-link:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.admin-hub-link.is-active {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.admin-sidebar {
  position: sticky;
  top: 1.5rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-nav-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  background: var(--panel-background);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.admin-nav-link.is-active {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.admin-panel-viewport {
  overflow: hidden;
  width: 100%;
}

.user-home-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.user-sidebar {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  overflow: auto;
}

.user-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-nav-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  background: var(--panel-background);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.user-nav-link:hover,
.user-nav-link:focus-visible {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.user-nav-link.is-active {
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.user-panel-viewport {
  overflow: hidden;
  width: 100%;
  display: grid;
  gap: 24px;
  padding: 24px;
}

.admin-panel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.admin-panel {
  flex: 0 0 100%;
  min-width: 100%;
  padding-right: 1rem;
}

.admin-panel .page-header {
  margin-top: 0;
}

.admin-testing-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-top: 1rem;
}

.admin-testing-date-range {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-testing-results {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.admin-testing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--panel-background);
  box-shadow: var(--shadow-sm);
}

.admin-testing-info h4 {
  margin: 0;
}

.admin-testing-info .muted {
  margin: 0.25rem 0 0;
}

.admin-testing-action {
  white-space: nowrap;
}

.admin-testing-form-card #admin-test-panel.hidden {
  display: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.detail-block {
  margin-top: 1.25rem;
}

.detail-block p {
  margin: 0.25rem 0;
}

.stacked-list {
  display: grid;
  gap: 0.75rem;
}

.stacked-item {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--panel-background);
}

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

.stacked-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.stacked-field {
  display: grid;
  gap: 0.35rem;
}

.stacked-field span {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stacked-field pre {
  margin: 0;
  white-space: pre-wrap;
  background: var(--sunken);
  border-radius: 10px;
  padding: 0.6rem;
  border: 1px solid var(--border-subtle);
}

.button-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.feedback-admin-shell .card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-filter {
  min-width: 200px;
}

.table-shell {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.admin-table th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.admin-table tbody tr:hover {
  background: var(--surface);
}

.admin-table a {
  color: inherit;
  text-decoration: none;
}

.admin-table a:hover,
.admin-table a:focus-visible {
  text-decoration: underline;
  color: var(--accent);
}

.admin-table a.is-disabled {
  color: var(--text-muted);
  pointer-events: none;
  text-decoration: none;
}

.feedback-reply-row td {
  background: var(--sunken);
  padding: 0.85rem 0.75rem;
}

.feedback-inline-panel {
  display: grid;
  gap: 0.75rem;
}

.feedback-inline-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
}

.feedback-inline-panel textarea {
  width: 100%;
}

.feedback-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

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

.feedback-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border-subtle);
  background: var(--sunken);
  color: var(--text-secondary);
}

.feedback-status-pill.status-new {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.3);
}

.feedback-status-pill.status-reviewed {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
  border-color: rgba(234, 179, 8, 0.3);
}

.feedback-status-pill.status-replied {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
}

.feedback-status-pill.status-resolved {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.3);
}

.feedback-detail-grid {
  display: grid;
  gap: 1.5rem;
}

.feedback-message {
  white-space: pre-wrap;
  background: var(--sunken);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 0.85rem;
  margin: 0.35rem 0 0;
}

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

.feedback-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 100;
}

.feedback-toast.is-visible {
  opacity: 1;
}

.feedback-toast.is-error {
  background: rgba(127, 29, 29, 0.95);
}

@media (max-width: 900px) {
  .admin-home-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-nav-link {
    flex: 1 1 160px;
    text-align: center;
  }

  .user-home-layout {
    grid-template-columns: 1fr;
  }

  .user-sidebar {
    position: static;
  }

  .user-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .user-nav-link {
    flex: 1 1 160px;
    text-align: center;
  }
}

.faq-main {
  padding: 32px 0 72px;
}

.faq-hero {
  padding: 16px 0 8px;
}

.faq-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.faq-section {
  padding: 24px 0;
}

.faq-section h2,
.faq-section h3 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

.faq-section .eyebrow {
  margin-bottom: 6px;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.faq-item {
  background: var(--panel-background);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  min-height: 52px;
  padding: 18px 20px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.faq-question[aria-expanded='true']::after {
  content: '–';
}

.faq-question:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -4px;
  border-radius: calc(var(--radius-lg) - 4px);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.faq-answer p {
  margin: 0;
}

.faq-question + .faq-answer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

@media (max-width: 600px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-testing-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (min-width: 900px) {
  .moderation-grid {
    grid-template-columns: 1.2fr 1.5fr;
  }
}

@media (min-width: 980px) {
  .feedback-detail-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

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

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.checklist-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--neutral-200);
  background: var(--neutral-100);
  position: relative;
}

.checklist-item.is-complete .checklist-icon {
  border-color: var(--success-500);
  background: var(--success-500);
}

.checklist-item.is-complete .checklist-icon::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
  top: 1px;
  left: 5px;
}

.shop-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.shop-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-banner {
  border-radius: 24px;
  overflow: hidden;
  background: var(--neutral-100);
  min-height: 200px;
  display: flex;
  align-items: stretch;
}

.shop-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-banner-placeholder {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.shop-profile-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shop-bio {
  margin-top: 8px;
}

.shop-social {
  margin-top: 12px;
}

.shop-social-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.shop-social-list a {
  color: var(--primary-500);
  font-weight: 600;
}

@media (max-width: 768px) {
  .shop-profile {
    flex-direction: column;
  }
}

.marketplace-results #marketplace-status {
  margin: 0 0 0.85rem;
}

.owned-products-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.owned-products-filters .pill {
  border: 1px solid var(--border-strong);
  background: var(--tag-bg);
  color: var(--text-primary);
  cursor: pointer;
}

.owned-products-filters .pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.owned-products-filters .pill.is-active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: #fff;
}

.owned-product-card {
  display: grid;
  gap: 0.75rem;
}

.owned-product-box-visual {
  border-radius: 0.9rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.owned-product-box-visual img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.owned-product-ownership-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Homepage layout refresh */
.home-main .page-shell {
  padding-inline: 0;
}

.home-main section {
  padding: 24px 0;
}

.home-hero {
  padding-top: 16px;
  padding-bottom: 12px;
}

.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,
.home-hero-promoted__panel h2 {
  margin: 0;
}

.home-hero-promoted__panel .pill-label {
  color: color-mix(in srgb, var(--text-muted) 72%, #b27b00);
}

.home-hero-promoted__panel h2 {
  font-size: 1.1rem;
  line-height: 1.2;
}

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

.home-hero-promoted__thumb .product-box-hero {
  margin: 0;
}

.home-hero-promoted__thumb .product-box-hero-inner,
.home-hero-promoted__thumb .product-box-hero img,
.home-hero-promoted__thumb .product-box-hero-placeholder {
  min-height: 150px;
  max-height: 150px;
}

.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);
}

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

.hero-chip-row {
  display: flex;
  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);
}

@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;
  }
}

.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;
  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__media .product-box-hero {
  margin: 0;
}

.home-featured-card__media .product-box-hero-inner,
.home-featured-card__media .product-box-hero img,
.home-featured-card__media .product-box-hero-placeholder {
  min-height: 168px;
  max-height: 168px;
}

.home-featured-card__media .product-box-hero img {
  object-position: center center;
}

.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;
}
