/* Shared base stylesheet — fonts, reset, typography, common components.
   Theme colours are defined separately in brand-dark.css / brand-light.css
   via CSS custom properties. */

/* ---- Fonts ---- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/source-sans-3-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/source-sans-3-latin-600-normal.woff2') format('woff2');
}

/* ---- Reset + base typography ---- */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 0.75em; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { color: var(--color-accent-hover); }

code {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.05em 0.35em;
  border-radius: 4px;
  color: var(--color-text);
}

main {
  flex: 1 0 auto;
  padding: 2rem 1rem;
}

/* Centring is opt-in based on what main contains.
   Auth-card / welcome-card / empty-state pages stay centred; multi-section
   content pages (dashboard, catalogue, service-detail) flow as block.
   Replaces the prior global `main { display:flex; justify-content:center }`
   rule which squashed every multi-section page into a narrow centred strip
   (audit finding F-03, 2026-05-01). */
main:has(> .auth-card),
main:has(> .welcome-card),
main:has(> .empty-state-page) {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Header ---- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.wordmark {
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
  text-decoration: none;
  color: var(--color-text);
}
.wordmark-brand {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--color-accent);
}
.wordmark-divider {
  color: var(--color-text-muted);
}
.wordmark-site {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.demo-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: var(--color-warning, #f59e0b);
  color: #fff;
  margin-left: 0.25rem;
  vertical-align: middle;
}
.demo-cta-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--color-text-muted);
}
.demo-cta-banner a {
  font-weight: 600;
  margin-left: 0.5rem;
  color: var(--color-accent);
}
.nav-link--cta {
  color: var(--color-accent);
  font-weight: 600;
}

.logout-form { margin: 0; }

/* ---- Buttons ---- */

.button-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
.button-primary:hover { background: var(--color-accent-hover); }
.button-primary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.button-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}
.button-link:hover { color: var(--color-accent-hover); }

/* ---- Cards ---- */

.auth-card, .welcome-card {
  max-width: 420px;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.welcome-card { max-width: 640px; }

.auth-subtitle, .welcome-hint {
  color: var(--color-text-muted);
}

/* ---- Forms ---- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.auth-form label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"] {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
}
.auth-form input[type="email"]:focus,
.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: var(--color-accent);
}
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset !important;
  -webkit-text-fill-color: var(--color-text) !important;
}

.auth-error {
  color: var(--color-error);
  font-size: 0.9rem;
  min-height: 1.4em;
  margin: 0;
}

/* ---- D4 — indent helpers + outcome badges + transactions list layout ----

   Indent rules close a pre-existing D2 styling gap: dashboard.html bound
   `:class="'indent-' + step.indent"` for handshake-log entries but no rule
   defined the resolved class. Fixed in scope per DD-11.
   Outcome badges follow Orchestra precedent (F-9): `:class="'badge-' + value"`.
*/
.indent-0 { padding-left: 0; }
.indent-1 { padding-left: 1.5rem; }
.indent-2 { padding-left: 3rem; }
.indent-3 { padding-left: 4.5rem; }

.badge-settled {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}
.badge-insufficient_funds {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}
.badge-funded {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}
/* Inventory in-settlement declines (BL-1b1cc95b6714, DD-6/F-24). The wallet
   renders badge-{outcome}; these classes complete the outcome vocabulary so a
   declined-unavailable / declined-out-of-stock row styles like a decline. */
.badge-declined_unavailable,
.badge-declined_out_of_stock {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.transactions-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}
.transactions-row {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--color-surface);
}
.row-toggle {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: transparent;
  color: var(--color-text);
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.row-toggle:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}
.row-expand {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--color-border);
}
.step-log {
  list-style: decimal inside;
  padding: 0;
  margin: 0 0 1rem;
}
.step-log li {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
.step-role {
  color: var(--color-text-muted);
  font-family: 'Source Code Pro', ui-monospace, monospace;
  margin-right: 0.5rem;
}
.step-msg {
  margin-right: 0.5rem;
}
.step-log time {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.ledger-table th,
.ledger-table td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--color-border);
}
.ledger-table th {
  color: var(--color-text-muted);
  font-weight: 500;
}
.envelope-details {
  margin-top: 0.5rem;
}
.envelope-details summary {
  cursor: pointer;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}
.envelope-details pre {
  background: var(--color-bg);
  padding: 0.6rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.8rem;
}
.envelope-details code {
  display: block;
  word-break: break-all;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.4rem;
}
.empty-state {
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem 0;
}
.empty-state-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem;
  text-align: center;
  max-width: 28rem;
  margin: 0 auto;
}
.empty-state-card p {
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}
.empty-state-card .button-primary {
  display: inline-block;
}
.step-empty,
.ledger-empty {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.9rem;
}
[x-cloak] { display: none !important; }

/* ---- Phase E: catalogue grid + service detail ---- */

.catalogue-section {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.catalogue-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.catalogue-intro {
  color: var(--color-text-muted);
  margin: 0 0 1.75rem;
  max-width: 60ch;
  line-height: 1.5;
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.catalogue-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.catalogue-card:hover,
.catalogue-card:focus-visible {
  transform: translateY(-1px);
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  outline: none;
}
.catalogue-card-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  overflow-wrap: anywhere; /* long unbroken names must wrap, not force 320px horizontal scroll */
}
.catalogue-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
}
.catalogue-provider {
  color: var(--color-text-muted);
}
.catalogue-card-description {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.8rem;
}
.catalogue-card-cta {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 500;
  margin: 0;
}

/* ---- Service detail page ---- */

.breadcrumb {
  max-width: 1100px;
  margin: 1.25rem auto 0.5rem;
  padding: 0 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden="true"] {
  margin: 0 0.4rem;
}

.detail-two-col {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
/* Allow grid items to shrink below their intrinsic min-content width.
   Without this, a wide child (e.g. `<pre class="sample-response">` with no
   wrapping) forces the `1fr` track wider than the container, producing a
   horizontal scroll at narrow viewports (audit finding F-08 residual). */
.detail-two-col > * {
  min-width: 0;
}
@media (min-width: 768px) {
  .detail-two-col {
    grid-template-columns: 1fr 320px;
  }
}

.detail-main h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.detail-provider {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.detail-description {
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.detail-main h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.detail-main .hint {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.sample-input {
  width: 100%;
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  font-size: 0.85rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
}
.sample-response {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.75rem;
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  margin: 0 0 1rem;
  white-space: pre;
  color: var(--color-text);
}

.detail-aside {
  align-self: start;
}
@media (min-width: 768px) {
  .detail-aside {
    position: sticky;
    top: 1rem;
  }
}

.try-it-now-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem;
}
.try-it-now-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.try-it-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}
.try-it-now-panel .button-primary {
  width: 100%;
  margin-bottom: 0.75rem;
}
.step-log-wrap {
  margin-top: 0.5rem;
}
.step-log-wrap .step-status {
  display: inline-block;
  width: 1rem;
  text-align: center;
  margin-right: 0.4rem;
  font-weight: 600;
}

.settled-panel,
.failed-panel {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.settled-panel h4,
.failed-panel h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.settled-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0 0;
}
.failed-panel {
  border-color: var(--color-error);
}
.failed-panel h4 {
  color: var(--color-error);
}

/* ---- Service-not-found page ---- */

.empty-state-page {
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.empty-state-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.empty-state-page p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.empty-state-page a {
  color: var(--color-accent);
}

/* ---- Pagination (audit finding F-06) ---- */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.pagination .button-link[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination-status {
  flex: 1;
  text-align: center;
}
.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pagination-size select {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  font: inherit;
}

/* ---- Modal base classes (D2 / D3 / Phase F Part 2 wizard) ----
 * Defined here per Phase F Part 2 plan finding 4.27. Referenced by
 * dashboard.html's fund modal, bots.html's register + fund-bot modals,
 * and the Phase F Part 2 connect-bot wizard. Side-effect: fixes the
 * D2/D3 modals' visual coherence (they previously rendered unstyled
 * because nothing in workspace CSS defined these class names).
 */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-panel {
  background: var(--color-bg, #ffffff);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  max-width: 32rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  color: var(--color-text);
}

.modal-panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Phase F Part 2 — bot-onboarding wizard ---- */

.connect-bot-section {
  margin-top: 1.5rem;
}

.wizard-prose {
  font-size: 0.95rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.wizard-prose code,
.wizard-note code {
  font-family: var(--font-monospace, ui-monospace, "SFMono-Regular", "Menlo", monospace);
  font-size: 0.88em;
  padding: 0.1rem 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
}

.wizard-chooser {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

@media (min-width: 540px) {
  .wizard-chooser {
    grid-template-columns: 1fr 1fr;
  }
}

.wizard-card {
  text-align: left;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background-color 0.15s;
}

.wizard-card:hover,
.wizard-card:focus-visible {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
}

.wizard-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
}

.wizard-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.wizard-snippet {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-monospace, ui-monospace, "SFMono-Regular", "Menlo", monospace);
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0.5rem 0 0.4rem;
  white-space: pre;
  color: var(--color-text);
}

.wizard-copy-btn {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}

.wizard-copy-btn:hover,
.wizard-copy-btn:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.wizard-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.75rem 0 0;
  line-height: 1.45;
}

/* ==========================================================================
   Wallet dashboard component layer (BL-e76e1267a5fb, 2026-05-02)
   --------------------------------------------------------------------------
   Authored after frontend-critique surfaced 15 referenced classes with no
   CSS rules. Scope: dashboard.html primarily; .bot-card / .action-btn /
   .top-nav / .nav-link also benefit /bots and the marketplace base by
   side effect.
   ========================================================================== */

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  padding: 0.5rem 0.75rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-button);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
  transition: top var(--transition-fast);
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0.75rem;
  outline: 2px solid var(--color-accent-hover);
  outline-offset: 2px;
}

/* Primary nav */
.top-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.nav-link:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.nav-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Dashboard container */
#dashboard-main {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Wallet summary (balance card) */
.balance-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "head    actions"
    "amount  actions";
  gap: 0.5rem 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}
.balance-card-head { grid-area: head; }
.balance-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 0.15rem;
}
.balance-card-sub {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin: 0;
}
.balance-card-amount {
  grid-area: amount;
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}
.balance-card-unit {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.balance-card-unit .unit-line {
  display: block;
}
.balance-card-actions {
  grid-area: actions;
  display: flex;
  gap: 0.5rem;
}
@media (max-width: 540px) {
  .balance-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "amount"
      "actions";
  }
  .balance-card-amount { font-size: 2rem; }
  .balance-card-actions .action-btn { width: 100%; justify-content: center; }
}

/* Bot strip */
.bot-strip { margin: 0; }
.bot-strip-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}
.bot-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.bot-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  transition: transform var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}
.bot-card:hover,
.bot-card:focus-within {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.bot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.bot-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}
.bot-card-origin {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.bot-card-origin.badge-internal {
  background: var(--color-accent-tint);
  color: var(--color-accent-hover);
}
.bot-card-origin.badge-external {
  background: rgba(74, 222, 128, 0.12);
  color: var(--color-positive);
}
/* BL-2dce79bcc4dd: retired bot visual state */
.badge-retired {
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-error);
}
.bot-card--retired {
  opacity: 0.6;
}
.bot-name--retired {
  text-decoration: line-through;
}
.bot-card-balance {
  font-family: 'Inter', sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  margin: 0;
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}
.bot-card-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.bot-card-unit .unit-line {
  display: block;
}
.bot-card-label {
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Action / handshake-log section + buttons */
.action-section,
.connect-bot-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.action-section .action-row { margin-bottom: 1rem; }
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.625rem 1.1rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}
.action-btn:hover:not(:disabled) {
  background: var(--color-accent-tint);
  border-color: var(--color-accent);
}
.action-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.action-btn:active:not(:disabled) { transform: translateY(1px); }
.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.action-btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.action-btn--primary:hover:not(:disabled) {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}
.action-btn-warn {
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--color-warning);
}
.action-btn-warn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.08);
  border-color: var(--color-warning);
}
.action-btn-sub {
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}
.action-btn--primary .action-btn-sub { color: rgba(255, 255, 255, 0.78); }

/* Danger button — BL-2dce79bcc4dd (retire bot) */
.action-btn--danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--color-error);
}
.action-btn--danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--color-error);
}

/* Result banner — appears under the demo buttons after a run completes */
.result-banner {
  margin: 0 0 1rem 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: var(--radius-card);
  background: var(--color-surface-2);
}
.result-banner-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--color-text);
}
.result-banner-prose {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}
.result-banner--settled {
  border-left-color: var(--color-positive);
}
.result-banner--settled .result-banner-title { color: var(--color-positive); }
.result-banner--insufficient_funds {
  border-left-color: var(--color-warning);
}
.result-banner--insufficient_funds .result-banner-title { color: var(--color-warning); }
.result-banner--out_of_stock,
.result-banner--service_unavailable {
  border-left-color: var(--color-warning);
}
.result-banner--out_of_stock .result-banner-title,
.result-banner--service_unavailable .result-banner-title { color: var(--color-warning); }
.result-banner--geo_blocked {
  border-left-color: var(--color-info, #6366f1);
}
.result-banner--geo_blocked .result-banner-title { color: var(--color-info, #6366f1); }
.result-banner--error {
  border-left-color: var(--color-error);
}
.result-banner--error .result-banner-title { color: var(--color-error); }

/* Handshake log */
.handshake-log-panel {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.handshake-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.handshake-log-head h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.handshake-log-outcome {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}
.handshake-log-outcome strong {
  color: var(--color-text);
  font-weight: 600;
  text-transform: capitalize;
}
.handshake-log-outcome code {
  font-size: 0.8rem;
  background: var(--color-bg);
  padding: 0.05em 0.35em;
}
.handshake-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.handshake-log-step {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.45rem 0.7rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  animation: handshake-step-in 220ms ease both;
}
.handshake-log-step.indent-1 { padding-left: 2rem; }
.handshake-log-step.indent-2 { padding-left: 3.5rem; }
.handshake-log-step.indent-3 { padding-left: 5rem; }
@keyframes handshake-step-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.handshake-log-role {
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.handshake-log-msg {
  flex: 1;
  min-width: 0;
  color: var(--color-text);
}
.handshake-log-ts {
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.handshake-log-empty {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
  list-style: none;
}

/* Form-state helpers shared with /bots */
.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin: 0.5rem 0 0;
}
.form-hint {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0 0 0.5rem;
  line-height: 1.45;
}
.form-warning {
  color: var(--color-warning);
  font-size: 0.875rem;
  margin: 0.5rem 0;
  line-height: 1.45;
}

/* Reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
  .bot-card,
  .action-btn,
  .nav-link,
  .skip-link { transition: none; }
  .handshake-log-step { animation: none; }
}

/* ==========================================================================
   /bots page management view (BL-1830f2db2370, 2026-05-02)
   --------------------------------------------------------------------------
   Sequel to BL-e76e1267a5fb. Component layer (.bot-card, .action-btn, .nav-link)
   already authored; this section adds the page-shell (toolbar, grid, fingerprint
   chip, card-bottom-anchored actions) so /bots stops stacking 1248-px-wide rows.
   ========================================================================== */

#bots-main {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bots-toolbar {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.bots-toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.bots-toolbar-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.bots-count {
  display: inline-block;
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.bots-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}
.bots-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-card);
  margin: 0;
}

/* Bot card refinements for /bots management view (.bot-card chrome already
   set; here we anchor the actions row to the card-bottom and tame the
   fingerprint hash). */
.bot-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.bot-fingerprint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  align-self: flex-start;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
}
.bot-fingerprint code {
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bot-fingerprint-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--color-border);
  padding: 0 0 0 0.4rem;
  margin: 0;
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}
.bot-fingerprint-copy:hover { color: var(--color-accent-hover); }
.bot-fingerprint-copy:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.bot-label-empty {
  font-style: italic;
  color: var(--color-text-muted);
}

/* Register-modal tabs */
.tablist {
  display: flex;
  gap: 0;
  margin: 1rem 0 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.9rem;
  margin-bottom: -1px;
  color: var(--color-text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tab:hover { color: var(--color-text); }
.tab[aria-selected="true"],
.tab.tab-active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}
.tab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* Modal form controls used on /bots register + fund-bot modals */
.modal-panel label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.75rem 0 0.3rem;
}
.modal-panel input[type="text"],
.modal-panel input[type="number"],
.modal-panel textarea {
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.95rem;
}
.modal-panel input:focus,
.modal-panel textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-tint);
}
.modal-panel select {
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.modal-panel select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-tint);
}
.modal-panel label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Dark-theme form inputs (coin banking app, general use) */
.transfer-form input[type="text"],
.transfer-form select {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.95rem;
}
.transfer-form input:focus,
.transfer-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-tint);
}
.transfer-form label {
  display: block;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Visually-hidden helper used on Copy button label */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Modal success-state styling (BL-ea2e84777a9c, 2026-05-02)
   Used by /bots Register-external-bot modal post-generate success branch.
   Pairs a confirmation heading with a chip-styled warning panel and a
   single explicit Done close action. */
.modal-success-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-positive);
  margin: 0.5rem 0 1rem;
}
.modal-success-title .fa-circle-check {
  font-size: 1.15rem;
}
.warning-panel {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius-button);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 1rem;
}
.warning-panel strong {
  color: var(--color-warning);
  font-weight: 600;
}

/* ==========================================================================
   Marketplace product-card icon slot (BL-7d20cca060ae, 2026-05-02)
   --------------------------------------------------------------------------
   Adds a per-service Font Awesome icon chip to the catalogue card and the
   service-detail H1. Tinted with the brand accent so the catalogue scans
   visually (icon + title) rather than text-only.
   ========================================================================== */

.catalogue-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 0.85rem;
  row-gap: 0.4rem;
  align-items: start;
}

.catalogue-card-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-accent-tint);
  color: var(--color-accent);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.catalogue-card-name,
.catalogue-card-meta {
  grid-column: 2;
  margin: 0;
}
.catalogue-card-description,
.catalogue-card-cta {
  grid-column: 1 / -1;
  margin: 0;
}

.catalogue-card-icon--lg {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  font-size: 1.4rem;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

/* ==========================================================================
   Marketplace product-card pre-approve button (BL-0e9395f1dddb, 2026-05-02)
   --------------------------------------------------------------------------
   Cosmetic-only: adds the Approve toggle button to each catalogue card,
   plus the click-overlay pattern (.catalogue-card-stretch) so the whole
   card stays clickable to navigate to detail while interactive buttons
   sit above the stretch link via z-index. Backend wiring (persistence,
   bot consumption) deferred to a follow-on card.
   ========================================================================== */

.catalogue-card {
  position: relative;
}

.catalogue-card-stretch {
  position: absolute;
  inset: 0;
  z-index: 1;
  text-decoration: none;
  color: inherit;
}
.catalogue-card-stretch:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: inherit;
}

.catalogue-card-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.4rem;
  position: relative;
  z-index: 2;
}

.product-card-approve {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  border-radius: var(--radius-pill, 999px);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast, 120ms ease),
              border-color var(--transition-fast, 120ms ease),
              color var(--transition-fast, 120ms ease);
}
.product-card-approve:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.product-card-approve:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.product-card-approve.is-approved {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.product-card-approve.is-approved:hover {
  background: var(--color-accent-hover, var(--color-accent));
  border-color: var(--color-accent-hover, var(--color-accent));
  color: #fff;
}

/* Push the existing CTA to the right so Approve sits left, View details right. */
.catalogue-card-actions .catalogue-card-cta {
  margin-left: auto;
}

/* ==========================================================================
   Marketplace product-card heart toggle (BL-61c0e95c8302, 2026-05-02)
   --------------------------------------------------------------------------
   Cosmetic-only: icon-only heart button next to Approve. Outline heart
   when neutral; filled coral when hearted. Backend persistence + bot
   consumption deferred to BL-02338b5d7cfb.
   ========================================================================== */

.product-card-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color var(--transition-fast, 120ms ease),
              border-color var(--transition-fast, 120ms ease),
              background var(--transition-fast, 120ms ease),
              transform var(--transition-fast, 120ms ease);
}
.product-card-heart:hover {
  color: #ef4444;
  border-color: #ef4444;
}
.product-card-heart:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.product-card-heart.is-hearted {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
.product-card-heart.is-hearted:hover {
  transform: scale(1.05);
}

/* ===========================================================================
   Chatbot demo surface (BL-455cce10d99f, C-3, 2026-05-03)
   Theme-token-driven; renders identically against brand-dark / brand-light /
   brand-eggshell because tokens share custom-property names.
   =========================================================================== */
.chat-surface {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: #fff8c4;
  border-radius: var(--radius-md, 6px);
}
.demo-toolbar-label {
  font-weight: 800;
  font-size: 1.05rem;
  color: #1a1a1a;
  letter-spacing: 0.02em;
  margin-right: 0.25rem;
}
.demo-toolbar-btn {
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.demo-toolbar-btn:hover {
  background: var(--color-accent-tint);
  border-color: var(--color-accent);
}
.demo-toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bot-actor-dropdown {
  margin-left: auto;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}
/* Clippy guidance — anchored inline above the *currently active* chat turn.
   No block chrome (no background, no border) — this is on-screen guidance
   that travels with the active turn, not a fixed banner. Italic + muted
   colour reads visibly as system explainer text without competing with
   chat bubbles or implying a third speaker. The label "Clippy" is internal
   only (CSS class + Alpine state); the word never appears in the rendered
   UI. Cleared/overwritten on every turn advance — only the latest turn
   ever shows guidance. */
.clippy-banner {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 0;
  margin: 0;
}
/* C-7 wrapper for the (clippy + bubble) pair so they stack tightly inside
   the chat-surface flex column. Clippy is x-show'd only above the latest
   turn; this wrapper just keeps the banner+bubble visually grouped. */
.chat-turn {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.chat-bubble {
  max-width: 80%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-card);
  line-height: 1.5;
  font-size: 0.95rem;
  word-wrap: break-word;
}
.chat-bubble--bot {
  align-self: flex-start;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--color-accent-tint);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
}
.chat-bubble--typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}
.chat-bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: chat-typing 1.2s infinite ease-in-out;
}
.chat-bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-bubble--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}
.prompt-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}
.prompt-bar-row {
  display: flex;
  gap: 0.5rem;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}
.prompt-bar input[type="text"],
.prompt-bar textarea {
  flex: 1;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}
.prompt-bar input[type="text"]:focus,
.prompt-bar textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 0;
}
.type-for-me-btn {
  align-self: center;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.type-for-me-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.type-for-me-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* C-8 (refresh-7): wallet-dashboard button-link rendered under the
   first add-money bot bubble. Pill-shaped + accent-tinted to read as an
   outbound action distinct from .demo-toolbar-btn (toolbar control) and
   .type-for-me-btn (autotype affordance). */
.wallet-link-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-accent-tint);
  color: var(--color-text);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.wallet-link-btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}
.wallet-link-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
/* Intro flow: row of shortcut buttons under the bot bubble that names the
   demos. Flex-row so the two buttons sit side-by-side; wraps on narrow
   viewports. */
.flow-shortcut-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.flow-shortcut-row > button {
  cursor: pointer;
  font-family: inherit;
}

/* ---- Funding Page ---- */

#funding-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.funding-tabs {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.tab-header {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.tab-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.tab-btn.active {
  background: var(--color-surface-2);
  color: var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: -1px;
}

.tab-content {
  padding: 1.5rem;
}

.testnet-warning {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid var(--color-warning);
  border-radius: var(--radius-card);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: var(--color-warning);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.testnet-warning i {
  margin-top: 0.15rem;
}

.card-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.form-group input {
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  color: var(--color-text);
  font-size: 1rem;
}
.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-row {
  display: flex;
  gap: 1rem;
}
.form-row .form-group {
  flex: 1;
}
.form-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}
.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin: 0;
}

.card-result {
  background: var(--color-surface-2);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin-top: 1rem;
  color: var(--color-positive);
}

.currency-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.currency-tab {
  padding: 0.5rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.currency-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.currency-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.rate-display {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
}
.rate-info {
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
}
.rate-info strong {
  color: var(--color-accent);
  font-weight: 600;
}
.rate-loading,
.rate-error {
  text-align: center;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.rate-loading {
  color: var(--color-text-muted);
}
.rate-error {
  color: var(--color-error);
}

.address-display {
  text-align: center;
}
.address-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.address-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: 0.75rem;
  margin-bottom: 1rem;
}
.address-text {
  flex: 1;
  font-size: 0.75rem;
  word-break: break-all;
  text-align: left;
  color: var(--color-text);
}
.copy-btn {
  padding: 0.5rem;
  background: var(--color-surface-2);
  border: none;
  border-radius: var(--radius-button);
  color: var(--color-text-muted);
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--color-accent);
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}
.qr-placeholder {
  width: 150px;
  height: 150px;
}
.qr-svg {
  width: 100%;
  height: 100%;
}
.address-network {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.no-address {
  padding: 2rem;
}
.no-address p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}
.loading-text {
  color: var(--color-text-muted);
  font-style: italic;
}

.deposits-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}
.deposits-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius-button);
  border-left: 3px solid var(--color-border);
}
.deposit-confirmed {
  border-left-color: var(--color-positive);
}
.deposit-confirming {
  border-left-color: var(--color-warning);
}
.deposit-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.deposit-amount {
  font-weight: 600;
  color: var(--color-text);
}
.deposit-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.deposit-meta {
  text-align: right;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
.deposit-confirmations {
  display: block;
}
.deposit-txhash {
  font-size: 0.75rem;
  background: var(--color-surface);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}
.no-deposits {
  color: var(--color-text-muted);
  text-align: center;
  padding: 1rem;
}

@media (max-width: 480px) {
  #funding-main {
    padding: 1rem;
  }
  .form-row {
    flex-direction: column;
  }
  .currency-selector {
    justify-content: center;
  }
}

/* ==== Marketplace redesign — BL-ebe1bab4780a, 2026-07-02 ==== */
/* Marketplace-only selectors: safe in this shared file. Shared-selector
   rules (body, main, .site-header) live in brand-light.css instead. */

/* Marketplace heading scale.
   .detail-main .detail-title beats live `.detail-main h1` (base.css:536)
   on specificity — bare .detail-title would silently lose. */
.catalogue-section h1 {
  font-size: 2.25rem;
  font-weight: 700;          /* renders as synthetic bold — Inter 700 not hosted; accepted */
  letter-spacing: -0.02em;
}
.detail-main .detail-title {
  font-size: 2rem;           /* design §4: detail h1 = 2rem */
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Uppercase micro-labels (settled-panel h4 = design §4 "SETTLED" treatment) */
.micro-label,
.detail-main h2,
.try-it-now-panel h3,
.settled-panel h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

/* Context/count line under the intro */
.catalogue-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: -1.25rem 0 1.75rem;
}

/* Price badge — scoped to marketplace containers only */
.catalogue-card-meta .badge-funded,
.detail-provider .badge-funded {
  background: var(--price-fill);
  color: var(--price-ink);
  border: 1px solid var(--price-border);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* Grid spacing */
.catalogue-grid { gap: 1.5rem; }

/* Card base — surface upgrade */
.catalogue-card {
  padding: 1.5rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--card-hue, var(--color-accent));
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  /* Footer alignment: description row flexes, actions pin to bottom.
     Columns stay auto 1fr from the existing rule at base.css:1630. */
  grid-template-rows: auto auto 1fr auto;
}

/* Hover/focus lift — :focus-within so keyboard focus on the overlay link lifts too.
   border-color declarations are required: the live hover rule (base.css:462) sets
   border-color to flat accent on ALL sides, which would erase the hue bar. */
.catalogue-card:hover,
.catalogue-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-accent-tint);        /* sides warm to tint (design §2) */
  border-top-color: var(--card-hue, var(--color-accent));  /* hue bar survives */
}

/* Meta row → column: provider directly under name, price badge on its own row
   (design §3). DOM order is badge, provider — `order` flips them visually. */
.catalogue-card-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.catalogue-card-meta .catalogue-provider { order: -1; }
.catalogue-card:hover .catalogue-card-name { color: var(--color-accent); }
.catalogue-card:hover .catalogue-card-cta i { transform: translateX(4px); }
.catalogue-card-cta i { transition: transform 160ms ease; }

/* Card name on the design scale (live is 1.15rem at base.css:469) */
.catalogue-card-name { font-size: 1.125rem; }

/* Per-service hues via nth-child */
.catalogue-grid > :nth-child(6n+1) { --card-hue: var(--hue-1); --card-tint: var(--hue-1-tint); }
.catalogue-grid > :nth-child(6n+2) { --card-hue: var(--hue-2); --card-tint: var(--hue-2-tint); }
.catalogue-grid > :nth-child(6n+3) { --card-hue: var(--hue-3); --card-tint: var(--hue-3-tint); }
.catalogue-grid > :nth-child(6n+4) { --card-hue: var(--hue-4); --card-tint: var(--hue-4-tint); }
.catalogue-grid > :nth-child(6n+5) { --card-hue: var(--hue-5); --card-tint: var(--hue-5-tint); }
.catalogue-grid > :nth-child(6n+6) { --card-hue: var(--hue-6); --card-tint: var(--hue-6-tint); }

/* Icon tile upgrade — overrides the 44px chip at base.css:1639; grid placement
   (grid-column: 1; grid-row: 1 / span 2) is inherited from the existing rule */
.catalogue-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--card-tint, var(--color-accent-tint));
  color: var(--card-hue, var(--color-accent));
  border: 1px solid rgba(15,19,48,.12);                      /* static fallback */
  border-color: color-mix(in srgb, var(--card-hue, var(--color-accent)) 25%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
  font-size: 1.2rem;
}

/* Card footer zone — divider above the actions row (already grid-column: 1/-1) */
.catalogue-card-actions {
  border-top: 1px solid var(--color-border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
  align-self: end;
}

/* Detail hero icon — MUST follow the .catalogue-card-icon rule above, which
   otherwise out-cascades the --lg variant at base.css:1665 (equal specificity,
   source order) and shrinks the detail H1 icon. Upgraded to the design §2 hero:
   64px, gradient on the accent pair, white glyph. */
.catalogue-card-icon--lg {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  font-size: 1.5rem;
  background: var(--color-accent-grad);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(79,70,229,.30);
}

/* Dark code slabs */
.sample-input,
.sample-response {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid rgba(15,19,48,.2);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.sample-input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Try-it-now hero panel — ::before strip (border-image fights border-radius) */
.try-it-now-panel {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;               /* clips the strip to the radius */
}
.try-it-now-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--color-accent-grad);
}

/* Gradient primary button — scoped: .button-primary is shared with 5 other apps */
.try-it-now-panel .button-primary {
  background: var(--color-accent-grad);
  border-radius: 8px;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  box-shadow: 0 2px 8px rgba(79,70,229,.35);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.try-it-now-panel .button-primary:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(79,70,229,.45);
  transform: translateY(-1px);
}

/* Settled celebration */
.settled-panel {
  border-left: 4px solid var(--color-positive);
  background: rgba(21,128,61,.05);
  padding: 1rem;
  border-radius: 0 8px 8px 0;
}

/* Step status chips — scoped to .step-log-wrap (marketplace-only; wallet/pewpew
   use bare .step-log). Live status values are pending | ok | fail. */
.step-log-wrap .step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 0.7rem;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.step-log-wrap .step-ok   .step-status { background: #d1fae5; color: #059669; }
.step-log-wrap .step-fail .step-status { background: #ffe4e6; color: #e11d48; }

/* Pending = pulsing dot (design §4); guarded in the reduced-motion block below */
.step-log-wrap .step-pending .step-status { animation: step-pulse 1.2s ease-in-out infinite; }
@keyframes step-pulse { 50% { opacity: 0.35; } }

/* Row rhythm — scoped to .step-log-wrap (marketplace-only); the design's bare
   `.step-log li:has(…)` would leak to wallet/pewpew transaction logs.
   padding-block only: a `padding` shorthand would zero padding-left and
   flatten the .indent-1/2/3 sub-step helpers (base.css:277-280). */
.step-log-wrap li { padding-block: 0.2rem; }

/* Reduced-motion guards for the rules above — MUST remain the last rules
   in this section: they win their equal-specificity ties by source order. */
@media (prefers-reduced-motion: reduce) {
  .catalogue-card,
  .catalogue-card-cta i,
  .try-it-now-panel .button-primary { transition: none; }
  .catalogue-card:hover,
  .catalogue-card:focus-within,
  .catalogue-card:hover .catalogue-card-cta i,
  .try-it-now-panel .button-primary:hover:not(:disabled) { transform: none; }
  .step-log-wrap .step-pending .step-status { animation: none; }
}

/* ==== Wallet card styling (BL-ca3b7687440c, 2026-07-05) ==== */

.wallets-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.wallets-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.wallet-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

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

.wallet-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.wallet-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
}
.wallet-card.wallet-imported {
  border-left: 3px solid var(--color-warning);
}
.wallet-card.wallet-revoked {
  opacity: 0.6;
  border-left: 3px solid var(--color-error);
}

.wallet-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wallet-currency {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.wallet-network {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  background: var(--color-surface-2);
  border-radius: var(--radius-pill);
}

.wallet-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(251, 191, 36, 0.15);
  color: var(--color-warning);
}

.wallet-address {
  font-family: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  word-break: break-all;
  margin: 0;
}

.wallet-balance {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0.25rem 0;
}

.wallet-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.button-small {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-button);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.button-small:hover {
  background: var(--color-accent-tint);
  border-color: var(--color-accent);
}
.button-small.button-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.button-small.button-primary:hover {
  background: var(--color-accent-hover);
}

.button-secondary {
  display: inline-block;
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.button-secondary:hover {
  background: var(--color-accent-tint);
  border-color: var(--color-accent);
}

.loading-state {
  color: var(--color-text-muted);
  font-style: italic;
  padding: 2rem 0;
  text-align: center;
}
/* Note: .empty-state already defined at line 399 */

.error-message {
  color: var(--color-error);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.modal-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

@media (prefers-reduced-motion: reduce) {
  .wallet-card,
  .button-small,
  .button-secondary { transition: none; }
}

/* ==== Marketplace brochure — BL-40cb5c496dcc Phase E, 2026-07-16 ====
   Placed AFTER the BL-ebe1bab4780a redesign section and the wallet-card
   section (DD-22): these rules win their equal-specificity ties by source
   order. Reduced-motion guards for everything animated here sit at the
   END of this section, in the same last-rules-in-section style. */

/* ---- Category chips (D-23) ---- */

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.category-chips--sub {
  margin-top: -0.4rem;
  padding-left: 0.25rem;
}
.category-chip {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--chip-border, var(--color-border));
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              color var(--transition-fast);
}
.category-chip:hover {
  border-color: var(--chip-ink);
  color: var(--chip-ink);
}
.category-chip:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.category-chip[aria-pressed="true"] {
  background: var(--chip-ink);
  border-color: var(--chip-ink);
  color: #fff;
}
.category-chip--sub {
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
}

/* ---- Category-sectioned catalogue (DD-12) ----
   One section per top-level category; the header carries the real item count. */

.catalogue-section-group {
  margin: 0 0 2.25rem;
}
.catalogue-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}
.catalogue-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}
.catalogue-section-count {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Catalogue card, media-led (D-21/D-22) ----
   Overrides the icon-led grid (base.css:1657) by source order: the card
   becomes a single-column flex stack with the thumbnail on top. */

.catalogue-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1rem 1.25rem 1.25rem;
}

.catalogue-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}
.catalogue-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Icon-chip fallback (V-16): no media → the tinted per-service chip,
   centred in the same slot so the grid never reflows. */
.catalogue-card-media .catalogue-card-icon {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}

.promo-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--promo-fill);
  color: var(--promo-ink);
  border: 1px solid var(--promo-border);
}
.buy-box-promo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--promo-ink);
  background: var(--promo-fill);
  border: 1px solid var(--promo-border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  margin: 0 0 0.75rem;
}

.category-label {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--chip-ink);
  border: 1px solid var(--chip-border, var(--color-border));
}
.bundle-flag {
  color: var(--radar-ink);
  border-color: var(--radar-ink);
}

.catalogue-card-price {
  margin: 0;
}
.catalogue-card-price .badge-funded {
  background: var(--price-fill);
  color: var(--price-ink);
  border: 1px solid var(--price-border);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* ---- Trust row: stars, radar chips, availability (D-21, DD-20) ---- */

.catalogue-card-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.8rem;
  min-height: 1.4rem; /* honest empty states hold the slot — no reflow when data arrives */
}

.stars {
  color: var(--star-ink);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.stars .star-empty {
  color: var(--color-border);
}
.rating-count,
.rating-count-link {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}
.rating-count-link {
  color: var(--color-accent);
  text-decoration: none;
}
.rating-count-link:hover {
  text-decoration: underline;
}
.no-reviews {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.8rem;
}

.radar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--radar-fill);
  color: var(--radar-ink);
}
.radar-chip--loved {
  background: var(--hue-5-tint);
  color: var(--hue-5);
}

.availability-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.availability-chip .fa-circle {
  font-size: 0.45rem;
}
.availability--available { color: var(--avail-available); }
.availability--limited { color: var(--avail-limited); }
.availability--unavailable { color: var(--avail-unavailable); }

/* Inventory / editions honest-slot chip (BL-1b1cc95b6714, DD-6). Renders only
   when BOTH edition_size and stock_count are non-null; sold-out (stock 0) gets
   the decline tone. No invented scarcity — every figure is a real count. */
.stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.stock-chip--soldout { color: var(--avail-unavailable); }

/* Geo / service-area "Serves: …" chip (BL-1b1cc95b6714, DD-11). Shares the
   stock-chip pill treatment; renders only when a service_area is set. */
.serves-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

/* Provider link — raised above the card's stretch overlay so it stays
   clickable, matching the action buttons' z-index pattern. */
.catalogue-card .provider-link {
  position: relative;
  z-index: 2;
}
.provider-link {
  color: var(--color-text-muted);
  text-decoration: none;
}
.provider-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.catalogue-card-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.catalogue-card-actions {
  margin-top: auto;
}

/* ---- Detail hero modules (DD-10, D-24/D-25) ---- */

.detail-hero {
  margin: 0 0 1.25rem;
}

/* Mobile price-in-hero (IA D-19 checkpoint item 3): the buy-box collapses
   below content at narrow widths, so the price also renders in the hero
   region — hidden once the two-column layout puts the buy-box beside it. */
.hero-price {
  margin: 0.6rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--buybox-total-ink);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  .hero-price { display: none; }
}

.gallery-hero {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface-2);
  cursor: zoom-in;
  position: relative;
}
.gallery-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-hero:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.gallery-zoom-hint {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(15, 19, 48, 0.55);
  color: #fff;
  font-size: 0.85rem;
}

.gallery-rail {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface-2);
  cursor: pointer;
  width: 72px;
  height: 54px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover {
  transform: translateY(-1px);
}
.gallery-thumb:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.gallery-thumb.is-active {
  border-color: var(--gallery-thumb-ring);
}

/* Click-to-enlarge lightbox (D-25: click/Enter opens, Esc closes) */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 19, 48, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox-image {
  max-width: min(90vw, 1000px);
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 19, 48, 0.6);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Icon-led service-facts module (DD-10) */
.detail-service-facts {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.service-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1.25rem;
}
.service-fact dt {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.2rem;
}
.service-fact dd {
  margin: 0;
  font-size: 0.9rem;
}

/* ---- Detail main column: rating, trust, velocity, related, reviews ---- */

.rating-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
}
.velocity-line {
  color: var(--radar-ink);
  font-size: 0.85rem;
  font-weight: 500;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.trust-badge--new {
  background: var(--color-accent-tint);
  color: var(--color-accent);
}

.related-items {
  margin-top: 1.5rem;
}
.related-row {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.related-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}
.related-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  background: var(--color-surface-2);
}
.related-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: var(--color-accent-tint);
  color: var(--color-accent);
}
.related-card-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.related-card-price {
  font-size: 0.8rem;
  color: var(--price-ink);
  font-weight: 600;
}

.reviews-section {
  margin-top: 1.5rem;
}
.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.review-row {
  border-top: 1px solid var(--color-border);
  padding: 0.85rem 0;
}
.review-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.3rem;
}
.review-author {
  font-size: 0.9rem;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--verified-fill);
  color: var(--verified-ink);
}
.review-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: auto;
}
.review-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.review-list-empty {
  display: block;
  padding: 0.5rem 0 0.75rem;
}

/* ---- Review forms: session form + post-settle prompt (D-27) ---- */

.review-form {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.review-form h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.review-form label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.review-form input[type="text"],
.review-form textarea {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
}
.review-form input[type="text"]:focus,
.review-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
.review-form .button-primary {
  align-self: flex-start;
}

.star-picker {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.star-picker legend {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0;
  margin-bottom: 0.25rem;
}
.star-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.star-option:has(input:checked) {
  border-color: var(--star-ink);
  background: var(--hue-3-tint);
}
.star-option:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.star-option-label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.star-option-label .fa-star {
  color: var(--star-ink);
  font-size: 0.75rem;
}

.form-feedback {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
  min-height: 1.2rem; /* aria-live region holds its slot */
}

.review-prompt {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.review-prompt h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}
.review-prompt textarea {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
}
.review-prompt-done {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-positive);
  font-weight: 600;
}

/* ---- Buy-box (D-26, IA slot order) ---- */

.buy-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
}
.buy-box-price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 0 0.6rem;
}
.buy-box-total {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--buybox-total-ink);
  font-variant-numeric: tabular-nums;
}
.buy-box-unit {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
.buy-box-availability {
  margin: 0 0 0.85rem;
}
.buy-box-configurator {
  margin-bottom: 0.85rem;
}
.buy-box-group {
  border: none;
  margin: 0 0 0.85rem;
  padding: 0;
}
.buy-box-group legend {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: 0;
  margin-bottom: 0.35rem;
}
.option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.2rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}
.option-row:hover {
  background: var(--color-accent-tint);
}
.option-row input {
  accent-color: var(--color-accent);
}
.option-row:has(input:focus-visible) {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
.option-name {
  flex: 1;
  min-width: 0;
}
.option-delta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--price-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.buy-box-addons legend {
  color: var(--radar-ink);
}

/* The demo panel nests inside the buy-box card: flatten its own chrome so
   it reads as the buy-box's CTA zone, not a card-in-card. */
.buy-box .try-it-now-panel {
  border: none;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  padding: 1rem 0 0;
  overflow: visible;
}
.buy-box .try-it-now-panel::before {
  display: none;
}

/* ---- Bundle contents view (D-28) ---- */

.bundle-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bundle-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.bundle-item-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.95rem;
}
.bundle-item-qty {
  font-weight: 700;
  color: var(--price-ink);
  font-variant-numeric: tabular-nums;
}
.bundle-item-name {
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
}
.bundle-item-name:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.bundle-item-modifiers {
  margin-top: 0.6rem;
  margin-bottom: 0;
}
.bundle-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
}

/* ---- Wallet bot-visibility panel (D-17) ---- */

.bot-visibility-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.bot-visibility-sub {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 1rem;
}
.bot-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.bot-visibility-block h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.bot-visibility-block h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0.6rem 0 0.3rem;
}
.bot-visibility-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bot-visibility-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-top: 1px solid var(--color-border);
}
.bot-visibility-kind {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.bot-visibility-empty {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.85rem;
  margin: 0;
}

/* Reduced-motion guards for the rules above — MUST remain the last rules
   in this section: they win their equal-specificity ties by source order. */
@media (prefers-reduced-motion: reduce) {
  .category-chip,
  .gallery-thumb,
  .related-card { transition: none; }
  .gallery-thumb:hover { transform: none; }
}

/* ==== Provider profiles — BL-40cb5c496dcc Phase F, 2026-07-16 ====
   D-33: identity header + trust line + reused catalogue-card grid +
   reviews. Token-driven extensions of the Phase E families; the leader
   badge rides the radar (violet) tokens. Nothing in this section
   animates, so no reduced-motion guard is required here. */

.provider-identity h1 {
  margin: 0.25rem 0 0.75rem;
}
.provider-trust-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
}
.trust-badge--leader {
  background: var(--radar-fill);
  color: var(--radar-ink);
}
.provider-profile .catalogue-grid {
  margin-top: 1rem;
}
.provider-profile .reviews-section {
  margin-top: 2rem;
}
