/* ============================================================
   FocalGraph BuyerMatch — Design Tokens
   Single source of truth for color, type, spacing, radius,
   shadow and layout. Consumed by components.css + pages.css.
   ============================================================ */

:root {
  /* ---- Brand ---------------------------------------------- */
  --brand:            #4c3aef;   /* primary action / FocalGraph electric indigo */
  --brand-hover:      #3b29d4;
  --brand-active:     #2e1fae;
  --brand-tint:       #efedfe;   /* faint brand wash for surfaces  */
  --brand-tint-200:   #d8d2fb;   /* borders on brand surfaces      */
  --brand-ink:        #2c1faa;   /* text on brand tints            */

  /* secondary lavender accent (graph nodes, emphasis words)  */
  --accent:           #847ae8;
  --accent-soft:      #a79ff0;
  --accent-tint:      #f1effc;

  /* ---- Dark brand chrome (header / footer / hero) --------- */
  --ink-bg:      #0a0a0d;   /* near-black brand surface        */
  --ink-2:       #15151c;   /* raised card on dark             */
  --ink-3:       #1f1f29;   /* hover / mosaic tiles            */
  --ink-border:  rgba(255,255,255,0.10);
  --ink-border-2:rgba(255,255,255,0.16);
  --ink-text:    #f6f6f9;
  --ink-muted:   #9a9aa8;

  /* ---- Neutrals (slate) ----------------------------------- */
  --n-50:  #f8fafc;
  --n-100: #f1f5f9;
  --n-200: #e7ecf3;
  --n-300: #cdd6e2;
  --n-400: #94a3b8;
  --n-500: #64748b;
  --n-600: #4a5a70;
  --n-700: #334155;
  --n-800: #1e293b;
  --n-900: #0f1b2d;

  /* ---- Semantic ------------------------------------------- */
  --success:       #16834a;
  --success-tint:  #e7f5ec;
  --success-ink:   #0c5733;
  --warning:       #b45309;
  --warning-tint:  #fdf2e1;
  --warning-ink:   #8a3f06;
  --error:         #d22f2f;
  --error-tint:    #fdecec;
  --error-ink:     #971c1c;
  --info:          var(--brand);
  --info-tint:     var(--brand-tint);

  /* ---- Surface & text ------------------------------------- */
  --bg:           #f4f6fb;   /* app background                 */
  --surface:      #ffffff;   /* cards, panels, inputs          */
  --surface-2:    var(--n-50);
  --border:       var(--n-200);
  --border-strong:var(--n-300);
  --text:         var(--n-900);
  --text-muted:   var(--n-500);
  --text-subtle:  var(--n-400);
  --text-on-brand:#ffffff;

  /* ---- Typography ----------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "Arial Nova", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code",
               "Roboto Mono", Menlo, Consolas, monospace;
  /* serif used italic for brand emphasis words (no web-font dep) */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
               "Times New Roman", serif;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;

  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-normal: 1.55;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;

  /* ---- Spacing scale -------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ---- Radius --------------------------------------------- */
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-pill: 999px;

  /* ---- Shadow --------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06),
               0 1px 1px rgba(15, 27, 45, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 27, 45, 0.08),
               0 2px 4px rgba(15, 27, 45, 0.05);
  --shadow-lg: 0 18px 48px rgba(15, 27, 45, 0.14),
               0 4px 12px rgba(15, 27, 45, 0.07);
  --ring: 0 0 0 3px rgba(76, 58, 239, 0.32);

  /* ---- Layout --------------------------------------------- */
  --maxw:       1080px;   /* default app container            */
  --maxw-form:  560px;    /* signup / onboarding column       */
  --maxw-wide:  1320px;   /* admin console                    */
  --header-h:   60px;

  /* ---- Breakpoints (reference; used in media queries) ----- */
  /* --bp-sm: 640px;  --bp-md: 960px; */
}
/* ============================================================
   FocalGraph BuyerMatch — Components & base
   Reset, app shell, buttons, forms, cards, tables, steps,
   code block, badges, alerts, links.
   Base rules are scoped to .bm so the same sheet drives both
   <body class="bm"> in Rails and preview frames.
   ============================================================ */

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

.bm {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bm :where(h1, h2, h3, h4) {
  margin: 0;
  line-height: var(--lh-tight);
  font-weight: var(--fw-semi);
  color: var(--text);
  text-wrap: balance;
}
.bm h1 { font-size: var(--fs-32); letter-spacing: -0.02em; }
.bm h2 { font-size: var(--fs-24); letter-spacing: -0.015em; }
.bm h3 { font-size: var(--fs-20); letter-spacing: -0.01em; }
.bm p  { margin: 0 0 var(--sp-4); }
.bm p:last-child { margin-bottom: 0; }

/* Plain links only. Exclude .btn so the global link color doesn't override a
   button's own text color (otherwise an <a class="btn"> renders brand-on-brand
   = invisible text). */
.bm a:not(.btn) {
  color: var(--brand);
  text-decoration: none;
  font-weight: var(--fw-medium);
}
.bm a:not(.btn):hover { color: var(--brand-hover); text-decoration: underline; }
.bm a:focus-visible,
.bm :focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.muted { color: var(--text-muted); font-size: var(--fs-14); }
.eyebrow {
  font-size: var(--fs-12);
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ---- App shell ------------------------------------------ */
.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--ink-bg);
  border-bottom: 1px solid var(--ink-border);
  position: sticky;
  top: 0;
  z-index: 20;
  /* faint brand grid texture, echoing the marketing hero */
  background-image:
    linear-gradient(var(--ink-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-border) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
}
.site-header__inner,
.site-footer__inner {
  width: 100%;
  max-width: var(--maxw-wide);   /* span the widest surface so the wordmark sits at the true left edge */
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.app-main {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

/* Wordmark / logo */
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: var(--fw-bold);
  font-size: var(--fs-16);
  letter-spacing: -0.01em;
  color: var(--ink-text);
}
.brandmark:hover { text-decoration: none; color: var(--ink-text); }
.brandmark__glyph {
  width: 27px; height: 27px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center;
  color: #fff; font-size: 14px; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 2px 8px rgba(76,58,239,0.45);
}
.brandmark__sub { color: var(--ink-muted); font-weight: var(--fw-medium); }
.site-header__meta { font-size: var(--fs-14); color: var(--ink-muted); display: flex; align-items: center; gap: var(--sp-3); }
.site-header__link { color: var(--ink-muted); text-decoration: none; font-weight: 500; }
.site-header__link:hover { color: var(--ink); }
.site-header__user { color: var(--ink-muted); }
/* button_to renders a form; keep the logout button looking like a link */
.site-header__logout { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
form.button_to { display: inline; }

/* Marketing landing CTA row (placeholder page; build out next) */
.home__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }

/* Auth pages (login / password) */
.auth { padding-top: var(--sp-6); }
.auth h1 { margin-bottom: var(--sp-4); }
.auth .submit-row { margin-top: var(--sp-4); }
.check-inline { display: flex; align-items: center; gap: var(--sp-2); color: var(--ink-muted); font-size: var(--fs-14); }

/* ===== Dashboard ("My stores") ========================== */
.dashboard { max-width: 880px; margin-inline: auto; }

/* Toolbar: search + status chips (sticky under the header) */
.dash-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
  justify-content: space-between; margin: var(--sp-5) 0; position: sticky; top: var(--sp-3); z-index: 5; }
.dash-search { position: relative; flex: 1 1 260px; }
.dash-search .input { padding-left: 40px; background-color: var(--surface); box-shadow: var(--shadow-sm); }
.dash-search__icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none; }

.dash-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip { font: inherit; font-size: var(--fs-14); font-weight: var(--fw-medium); line-height: 1;
  padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.chip:hover { border-color: var(--n-400); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }

/* Account card (collapsible) */
.account { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); margin-bottom: var(--sp-4); overflow: hidden; }
.account__summary { display: flex; align-items: center; gap: var(--sp-3); cursor: pointer;
  padding: var(--sp-4) var(--sp-5); list-style: none; }
.account__summary::-webkit-details-marker { display: none; }
.account__summary:hover { background: var(--n-50); }
.account__summary:focus-visible { outline: none; box-shadow: inset var(--ring); }
.account__chevron { flex: none; color: var(--text-subtle); transition: transform .15s ease; }
.account[open] .account__chevron { transform: rotate(90deg); }
.account__name { font-weight: var(--fw-semi); font-size: var(--fs-16); color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__count { margin-left: auto; flex: none; color: var(--text-muted); font-size: var(--fs-14);
  font-variant-numeric: tabular-nums; }
.account__body { padding: 0 var(--sp-5) var(--sp-4); }
.account__actions { margin-top: var(--sp-2); padding-top: var(--sp-3); border-top: 1px dashed var(--border); }

/* Store rows */
.store-list { list-style: none; margin: 0; padding: 0; }
.store-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border); }
.store-row:last-child { border-bottom: 0; }
.store-row[hidden] { display: none; }
.store-row__link { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto;
  text-decoration: none; }
.store-row__name { font-weight: var(--fw-semi); color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-row__link:hover .store-row__name { color: var(--brand); }
.store-row__sub { font-size: var(--fs-12); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Inline invite disclosure */
.invite { position: relative; flex: none; }
.invite__toggle { cursor: pointer; font-size: var(--fs-14); font-weight: var(--fw-semi);
  color: var(--brand); list-style: none; padding: 6px 10px; border-radius: var(--r-md); white-space: nowrap; }
.invite__toggle::-webkit-details-marker { display: none; }
.invite__toggle:hover { background: var(--brand-tint); }
.invite__panel { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
  padding: var(--sp-3); background: var(--n-50); border: 1px solid var(--border); border-radius: var(--r-md); }
.invite__panel .input { flex: 1 1 180px; background: var(--surface); }
.account__actions .invite { display: inline-block; }

/* Empty / no-results states */
.dash-empty { text-align: center; color: var(--text-muted); padding: var(--sp-7) var(--sp-4); }

.app-main {
  display: block;
  padding-block: var(--sp-7);
  min-height: calc(100vh - var(--header-h) - 64px);
}
.app-main--narrow { max-width: var(--maxw-form); }
.app-main--wide   { max-width: var(--maxw-wide); }

.site-footer {
  border-top: 1px solid var(--ink-border);
  background: var(--ink-bg);
  color: var(--ink-muted);
  font-size: var(--fs-14);
}
.site-footer__inner {
  padding-block: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-muted); font-weight: var(--fw-regular); }
.site-footer a:hover { color: var(--ink-text); }

/* Page header block inside main */
.page-head { margin-bottom: var(--sp-6); }
.page-head h1 { margin-bottom: var(--sp-2); }
.page-head .lede { font-size: var(--fs-20); color: var(--text-muted); margin: 0; }

/* ---- Buttons -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: inherit;
  font-size: var(--fs-16);
  font-weight: var(--fw-semi);
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--text-on-brand);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease,
              box-shadow .15s ease, transform .04s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-hover); color: #fff; text-decoration: none; }
.btn:active { background: var(--brand-active); transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--n-200);
  color: var(--text-subtle);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--secondary:hover { background: var(--n-50); color: var(--text); border-color: var(--n-400); }
.btn--secondary:active { background: var(--n-100); }

.btn--quiet {
  background: transparent;
  color: var(--brand);
  border-color: transparent;
  padding-inline: 12px;
}
.btn--quiet:hover { background: var(--brand-tint); color: var(--brand-hover); }

.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: var(--fs-20); border-radius: var(--r-lg); }
.btn--sm { padding: 8px 12px; font-size: var(--fs-14); }

/* button paired with a Google mark on the GA connect screen */
.btn--google { gap: var(--sp-3); }
.btn--google .g-mark {
  width: 18px; height: 18px; border-radius: 3px; background: #fff;
  display: grid; place-items: center; flex: none;
  font-weight: 700; font-size: 12px; color: #4285f4;
}

/* ---- Cards / panels ------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: var(--sp-6); }
.card__title { font-size: var(--fs-20); margin-bottom: var(--sp-2); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

/* ---- Forms ---------------------------------------------- */
.field { margin-bottom: var(--sp-4); }
.field > label,
.label {
  display: block;
  font-size: var(--fs-14);
  font-weight: var(--fw-semi);
  color: var(--n-700);
  margin-bottom: 6px;
}
.req { color: var(--error); margin-left: 2px; }

.bm input[type="text"],
.bm input[type="email"],
.bm input[type="tel"],
.bm input[type="url"],
.bm input[type="password"],
.bm input[type="number"],
.bm select,
.bm textarea,
.input {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-16);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.bm textarea { min-height: 96px; resize: vertical; }
.bm input::placeholder, .bm textarea::placeholder { color: var(--text-subtle); }

.bm input:hover, .bm select:hover, .bm textarea:hover { border-color: var(--n-400); }
.bm input:focus, .bm select:focus, .bm textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.bm input:disabled, .bm select:disabled, .bm textarea:disabled {
  background: var(--n-100);
  color: var(--text-subtle);
  cursor: not-allowed;
}

/* native select chevron */
.bm select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 38px;
}

.help { display: block; margin-top: 6px; color: var(--text-muted); font-size: var(--fs-14); }

/* error state on a field */
.field.is-error label { color: var(--error-ink); }
.field.is-error input,
.field.is-error select,
.field.is-error textarea,
.input.is-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(210, 47, 47, 0.18);
}
.field-error { display: block; margin-top: 6px; color: var(--error-ink); font-size: var(--fs-14); font-weight: var(--fw-medium); }

/* fieldset / legend */
.bm fieldset {
  border: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
}
.bm legend {
  padding: 0;
  font-size: var(--fs-12);
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: var(--sp-3);
}
.fieldset-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* two-up row of fields */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---- Tables --------------------------------------------- */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-wrap--scroll { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-14);
}
table.data th, table.data td {
  text-align: left;
  padding: 11px var(--sp-4);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data thead th {
  font-size: var(--fs-12);
  font-weight: var(--fw-semi);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--n-50);
  border-bottom: 1px solid var(--border-strong);
  position: sticky; top: 0;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:nth-child(even) td { background: var(--n-50); }
table.data tbody tr:hover td { background: var(--brand-tint); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .cell-strong { color: var(--text); font-weight: var(--fw-semi); }
table.data .cell-sub { color: var(--text-muted); font-size: var(--fs-12); }

/* gate status cells: ✓ / — */
.gate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
}
.gate--yes { background: var(--success-tint); color: var(--success); }
.gate--no  { background: var(--n-100); color: var(--text-subtle); }

/* ---- Status badges / pills ------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  font-weight: var(--fw-semi);
  line-height: 1;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: var(--r-pill);
  background: currentColor;
  flex: none;
}
.badge--neutral { background: var(--n-100); color: var(--n-600); }
.badge--info    { background: var(--brand-tint); color: var(--brand-ink); border-color: var(--brand-tint-200); }
.badge--success { background: var(--success-tint); color: var(--success-ink); }
.badge--warning { background: var(--warning-tint); color: var(--warning-ink); }
.badge--error   { background: var(--error-tint); color: var(--error-ink); }
.badge--solid   { background: var(--brand); color: #fff; }
.badge--solid::before { background: rgba(255,255,255,.85); }
.badge--lg { font-size: var(--fs-14); padding: 7px 14px; }

/* ---- Step list ------------------------------------------ */
ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
/* the numbered marker */
ol.steps > li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  font-size: var(--fs-16); font-weight: var(--fw-bold);
  background: var(--n-100);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
/* The content column is a grid track (1fr -> implicit min-width:auto), which
   would otherwise stretch to the tag snippet's non-wrapping width and overrun
   the card. min-width:0 lets the track shrink so .code-block pre's overflow-x
   scrolls inside the card instead. */
ol.steps > li > div { min-width: 0; }
ol.steps > li .step-title {
  font-size: var(--fs-20); font-weight: var(--fw-semi);
  margin: 4px 0 4px; line-height: var(--lh-snug);
}
ol.steps > li .step-body { color: var(--text-muted); }
ol.steps > li .step-body p { margin-bottom: var(--sp-3); }
ol.steps > li .step-action { margin-top: var(--sp-4); }

/* Plan picker (payment step) */
.plan-picker { margin-bottom: var(--sp-4); }
.plan-options { display: grid; gap: var(--sp-3); margin: 0; }
.plan-option { display: block; cursor: pointer; padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.plan-option:hover { border-color: var(--n-400); }
.plan-option:has(input:checked) { border-color: var(--brand); box-shadow: var(--ring); background: var(--brand-tint); }
.plan-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.plan-option__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.plan-option__name { font-weight: var(--fw-semi); color: var(--text); }
.plan-badge { display: inline-block; margin-left: var(--sp-2); padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: var(--fs-12); font-weight: var(--fw-semi); vertical-align: middle; }
.plan-option__price { font-weight: var(--fw-semi); color: var(--text); white-space: nowrap; }
.plan-option__retail { margin-right: 6px; color: var(--text-subtle); font-weight: var(--fw-regular); text-decoration: line-through; }
.plan-option__per { font-weight: var(--fw-regular); color: var(--text-muted); font-size: var(--fs-14); }
.plan-option__blurb { display: block; margin-top: 4px; color: var(--text-muted); font-size: var(--fs-14); }

/* Payment step */
.card-on-file { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); color: var(--text); }
#payment-element { margin: var(--sp-3) 0; }
.error-text { color: var(--danger, #b00020); min-height: 1em; margin: var(--sp-2) 0 0; font-size: var(--fs-sm, 0.875rem); }

/* connector line between steps */
ol.steps > li::after {
  content: "";
  position: absolute;
  left: calc(var(--sp-5) + 18px);
  top: calc(var(--sp-5) + 36px);
  bottom: calc(-1 * var(--sp-3) - 1px);
  width: 2px;
  background: var(--border-strong);
  z-index: 0;
}
ol.steps > li:last-child::after { display: none; }

/* in-progress (current) step */
ol.steps > li.active {
  border-color: var(--brand);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--brand);
}
ol.steps > li.active::before {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

/* completed step */
ol.steps > li.done::before {
  content: "✓";
  background: var(--success); color: #fff; border-color: var(--success);
}
ol.steps > li.done::after { background: var(--success); }
ol.steps > li.done .step-title { color: var(--text); }

/* pending (default) is the un-modified state above */
ol.steps > li.pending { opacity: 0.85; }

/* ---- Code block ----------------------------------------- */
.code-block {
  position: relative;
  background: var(--n-900);
  border: 1px solid var(--n-800);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-block__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: var(--fs-12);
  color: var(--n-400);
}
.code-block__copy {
  font-size: var(--fs-12); font-weight: var(--fw-semi);
  color: var(--n-100);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  cursor: pointer;
}
.code-block__copy:hover { background: rgba(255,255,255,0.16); }
.code-block pre {
  margin: 0;
  padding: var(--sp-4);
  overflow-x: auto;
}
.code-block code,
code.inline {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  line-height: 1.6;
}
.code-block code { color: #e6edf7; white-space: pre; }
code.inline {
  background: var(--n-100);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  font-size: 0.9em;
  color: var(--n-800);
}

/* a copyable single-line link box (GA connect URL to share) */
.copy-link {
  display: flex; align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}
.copy-link code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  color: var(--n-700);
  padding: 10px 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.copy-link button {
  flex: none;
  border: none; border-left: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand);
  font-weight: var(--fw-semi); font-size: var(--fs-14);
  padding: 0 16px; cursor: pointer;
}
.copy-link button:hover { background: var(--brand-tint); }

/* ---- Alerts / flash ------------------------------------- */
.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--fs-14);
  margin-bottom: var(--sp-5);
}
.alert__icon { flex: none; font-weight: 700; line-height: 1.5; }
.alert__body { margin: 0; }
.alert__body strong { font-weight: var(--fw-semi); }
.alert--error   { background: var(--error-tint);   border-color: #f3c6c6; color: var(--error-ink); }
.alert--success { background: var(--success-tint); border-color: #c2e6d0; color: var(--success-ink); }
.alert--warning { background: var(--warning-tint); border-color: #f3dcae; color: var(--warning-ink); }
.alert--info    { background: var(--brand-tint);   border-color: var(--brand-tint-200); color: var(--brand-ink); }

/* legacy hooks used directly in the ERB */
.error {
  background: var(--error-tint);
  border: 1px solid #f3c6c6;
  color: var(--error-ink);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  margin-bottom: var(--sp-5);
}
.notice {
  background: var(--success-tint);
  border: 1px solid #c2e6d0;
  color: var(--success-ink);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
  margin-bottom: var(--sp-5);
}

/* ---- Misc utilities ------------------------------------- */
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.divider { height: 1px; background: var(--border); border: 0; margin: var(--sp-5) 0; }
.center { text-align: center; }
.dl-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--sp-4); margin: 0; font-size: var(--fs-14); }
.dl-meta dt { color: var(--text-muted); }
.dl-meta dd { margin: 0; font-weight: var(--fw-medium); }
.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;
}

/* ============================================================
   Brand motif — echoes the FocalGraph marketing site
   (electric indigo, italic accent words, grid mosaic,
   confidence pills, graph nodes). Used on dark chrome + hero.
   ============================================================ */

/* italic serif emphasis word, lavender — "Website Visitors" treatment */
.accent-em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--fw-regular);
  color: var(--accent);
  letter-spacing: 0;
}

/* dark surface helper (any block that should sit on brand-dark) */
.on-dark { color: var(--ink-text); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--ink-text); }
.on-dark .muted, .on-dark p { color: var(--ink-muted); }

/* grid mosaic — the hero "heatmap" of violet/lavender tiles */
.mosaic {
  display: grid;
  grid-template-columns: repeat(var(--mosaic-cols, 6), 1fr);
  gap: 5px;
  width: 100%;
}
.mosaic i {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--ink-3);
}
.mosaic i.b  { background: var(--brand); }
.mosaic i.b2 { background: var(--accent); }
.mosaic i.b3 { background: color-mix(in srgb, var(--brand) 55%, #000); }

/* confidence pill — "High Confidence · 94" from the product card */
.pill-confidence {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--fs-12); font-weight: var(--fw-semi);
  padding: 5px 10px 5px 9px;
  border-radius: var(--r-pill);
  background: var(--success-tint);
  color: var(--success-ink);
  border: 1px solid #c2e6d0;
}
.pill-confidence .dot {
  width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--success); flex: none;
}
.pill-confidence .score { font-variant-numeric: tabular-nums; }
/* on dark surfaces */
.on-dark .pill-confidence {
  background: rgba(22,131,74,0.18);
  color: #6ee2a3;
  border-color: rgba(110,226,163,0.30);
}

/* graph node — small linked-dot motif for brand/iconography */
.graph-node {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  display: grid; place-items: center; flex: none;
  background: var(--ink-2);
  border: 1px solid var(--ink-border-2);
  color: #fff;
  position: relative;
}
.graph-node--brand { background: linear-gradient(135deg, var(--brand), var(--accent)); }

/* primary button gets a soft brand glow on dark hero */
.on-dark .btn:not(.btn--secondary):not(.btn--quiet) {
  box-shadow: 0 4px 18px rgba(76,58,239,0.40);
}
/* secondary button variant tuned for dark surfaces */
.btn--on-dark {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: var(--ink-border-2);
}
.btn--on-dark:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }

/* Waitlist: coming-soon tiers in the plan picker + the join-waitlist disclosure
   used on the onboarding hub and the dashboard upsell banner. */
.plan-waitlist { margin-top: var(--sp-4); display: grid; gap: var(--sp-3); }
.plan-waitlist__label { margin: 0; text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--fs-14); }
.plan-option--soon { opacity: 0.85; background: var(--n-50); border-style: dashed; }
.plan-option--soon .plan-badge { background: var(--n-100); color: var(--n-600); }

.waitlist-cta { margin-top: var(--sp-3); }
.waitlist-cta > summary { display: inline-flex; align-items: center; list-style: none; cursor: pointer; }
.waitlist-cta > summary::-webkit-details-marker { display: none; }
.waitlist-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.waitlist-form .input { flex: 1 1 200px; background: var(--surface); }
.waitlist-form__tier { display: inline-flex; flex-direction: column; gap: 2px; font-size: var(--fs-14); color: var(--text-muted); }

.upsell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg, 12px);
  background: var(--brand-tint); }
.upsell__copy { margin: 0; color: var(--text); }
/* ============================================================
   FocalGraph BuyerMatch — Page-level styles
   Light per-surface tweaks layered on tokens + components.
   ============================================================ */

/* ============ Signup (public, brand-forward) ============= */
main.signup { max-width: var(--maxw-form); }

/* Dark, brand-forward hero band — echoes the marketing site.
   The form below stays light for usability. */
.signup__hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  margin-bottom: var(--sp-6);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  border-radius: var(--r-lg);
  background-color: var(--ink-bg);
  background-image:
    radial-gradient(120% 90% at 80% -10%, rgba(76,58,239,0.55), transparent 60%),
    linear-gradient(var(--ink-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-border) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  color: var(--ink-text);
  box-shadow: var(--shadow-md);
}
.signup__hero .eyebrow { margin-bottom: var(--sp-3); color: var(--accent-soft); position: relative; z-index: 1; }
.signup__hero h1 { font-size: var(--fs-32); line-height: 1.3; margin-bottom: var(--sp-6); color: var(--ink-text); position: relative; z-index: 1; }
.signup__hero .accent-em { line-height: 1.45; display: inline-block; padding-bottom: 2px; }
.signup__hero p { font-size: var(--fs-20); color: var(--ink-muted); margin: 0 auto; max-width: 46ch; position: relative; z-index: 1; }
/* decorative tile mosaic, faded behind the heading */
.signup__hero-mosaic {
  position: absolute; top: 18px; right: 18px;
  width: 168px; opacity: 0.55; --mosaic-cols: 6;
  pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(200deg, #000 35%, transparent 80%);
          mask-image: linear-gradient(200deg, #000 35%, transparent 80%);
}
@media (max-width: 520px) { .signup__hero-mosaic { display: none; } }

.signup form > fieldset:last-of-type { margin-bottom: var(--sp-5); }
.signup .submit-row {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.signup .submit-row .muted { text-align: center; }

/* ============ Onboarding hub ============================= */
main.onboarding { max-width: 760px; }

.onboarding__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.onboarding__head h1 { font-size: var(--fs-24); }
.onboarding__sub {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  align-items: center; color: var(--text-muted); font-size: var(--fs-14);
  margin-bottom: var(--sp-6);
}
.onboarding__progress {
  font-size: var(--fs-14); color: var(--text-muted); margin-bottom: var(--sp-4);
}
.onboarding__progress b { color: var(--text); font-weight: var(--fw-semi); }

/* "email these instructions to someone else" handoff on a step */
.handoff {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px dashed var(--border-strong);
}
.handoff__label {
  display: block; font-size: var(--fs-14); color: var(--text-muted); margin-bottom: var(--sp-2);
}
.handoff__row { display: flex; gap: var(--sp-2); align-items: stretch; }
.handoff__row .input { flex: 1; }
.handoff__row .btn { white-space: nowrap; flex: none; }
@media (max-width: 480px) { .handoff__row { flex-direction: column; } }

/* interim "generating your tag" state */
.generating {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-200);
  color: var(--brand-ink);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-14);
}
.generating .spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid var(--brand-tint-200);
  border-top-color: var(--brand);
  border-radius: var(--r-pill);
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .generating .spinner { animation: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ GA connect flow ============================ */
main.ga-connect { max-width: var(--maxw-form); }

.ga-hero { text-align: center; }
.ga-logos {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.ga-logos__node {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); font-weight: 700; color: var(--brand);
}
.ga-logos__node--g { color: #4285f4; }
.ga-logos__link { color: var(--text-subtle); font-size: var(--fs-24); }

.ga-trust {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin: var(--sp-5) 0;
  text-align: left;
}
.ga-trust li {
  display: grid; grid-template-columns: 22px 1fr; gap: var(--sp-3);
  align-items: start; list-style: none; font-size: var(--fs-14); color: var(--n-700);
}
.ga-trust li .tick { color: var(--success); font-weight: 700; }
.ga-trust { padding: 0; margin-inline: 0; }

.ga-foot {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  margin-top: var(--sp-5); color: var(--text-subtle); font-size: var(--fs-12);
}

/* GA4 property radio list */
.prop-filter { margin-bottom: var(--sp-4); }
.prop-filter-empty {
  color: var(--text-muted); font-size: var(--fs-14); text-align: center;
  padding: var(--sp-4) 0 var(--sp-5);
}
.property-list { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.property-list li[hidden] { display: none; }
.property-list label {
  display: flex; align-items: center; gap: var(--sp-3);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.property-list label:hover { border-color: var(--n-400); background: var(--n-50); }
.property-list input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.property-list .prop-name { font-weight: var(--fw-semi); }
.property-list .prop-id { color: var(--text-muted); font-size: var(--fs-12); font-family: var(--font-mono); }
.property-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

.empty-state {
  text-align: center; padding: var(--sp-7) var(--sp-5);
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--text-muted);
}
.empty-state h3 { margin-bottom: var(--sp-2); }

/* big centered status result (callback / invalid) */
.result {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
}
.result__icon {
  width: 64px; height: 64px; border-radius: var(--r-pill); margin: 0 auto var(--sp-5);
  display: grid; place-items: center; font-size: 32px; font-weight: 700;
}
.result__icon--ok   { background: var(--success-tint); color: var(--success); }
.result__icon--err  { background: var(--error-tint);   color: var(--error); }
.result__icon--warn { background: var(--warning-tint); color: var(--warning); }
.result h1 { font-size: var(--fs-24); margin-bottom: var(--sp-3); }
.result p { color: var(--text-muted); max-width: 42ch; margin-inline: auto; }

/* ============ Admin console ============================== */
main.admin { max-width: var(--maxw-wide); }

.admin__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6);
}
.admin__head h1 { font-size: var(--fs-24); }

/* rollup stat cards */
.rollup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.stat__label {
  font-size: var(--fs-12); font-weight: var(--fw-semi);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted);
}
.stat__value {
  font-size: var(--fs-32); font-weight: var(--fw-bold);
  letter-spacing: -0.02em; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.stat__delta { font-size: var(--fs-12); margin-top: 4px; font-weight: var(--fw-medium); }
.stat__delta--up { color: var(--success); }
.stat__delta--down { color: var(--error); }
.stat__delta--flat { color: var(--text-muted); }

/* compact "stores by stage" breakdown inside a stat card */
.stage-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stage-mini .badge { font-size: 11px; padding: 3px 8px; }

.admin__section-title {
  font-size: var(--fs-14); font-weight: var(--fw-semi);
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: var(--sp-3);
}

.table-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
  justify-content: space-between; margin-bottom: var(--sp-3);
}
.table-toolbar .count { color: var(--text-muted); font-size: var(--fs-14); }

/* ---- Store activity dashboard ------------------------------------------- */
.sd { max-width: 1040px; margin: 0 auto; }

/* header */
.sd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding-bottom: var(--sp-5); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }
.sd-head__back { display: inline-block; font-size: var(--fs-14); color: var(--text-muted); text-decoration: none; margin-bottom: var(--sp-2); }
.sd-head__back:hover { color: var(--brand); }
.sd-head__title { font-size: var(--fs-32); font-weight: var(--fw-bold); letter-spacing: -0.02em; margin: 0; }
.sd-head__meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-2); flex-wrap: wrap; }
.sd-head__heartbeat { font-size: var(--fs-14); color: var(--text-muted); }
.sd-head__updated { font-size: var(--fs-12); color: var(--text-subtle); white-space: nowrap; }

/* live/idle status pill */
.sd-pill { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-12); font-weight: var(--fw-semi);
  padding: 4px 10px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: 0.03em; }
.sd-pill__dot { width: 7px; height: 7px; border-radius: var(--r-pill); }
.sd-pill--live { background: var(--success-tint); color: var(--success-ink); }
.sd-pill--live .sd-pill__dot { background: var(--success); animation: sd-pulse 1.8s ease-in-out infinite; }
.sd-pill--idle { background: var(--n-100); color: var(--text-muted); }
.sd-pill--idle .sd-pill__dot { background: var(--n-400); }
@keyframes sd-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(22,131,74,0.45); } 50% { box-shadow: 0 0 0 5px rgba(22,131,74,0); } }

/* not-fully-live notice */
.sd-notice { display: flex; align-items: center; gap: var(--sp-3); background: var(--brand-tint);
  border: 1px solid var(--brand-tint-200); color: var(--brand-ink); border-radius: var(--r-lg);
  padding: 12px 16px; margin-bottom: var(--sp-5); font-size: var(--fs-14); }
.sd-notice__link { color: var(--brand); font-weight: var(--fw-semi); text-decoration: none; margin-left: auto; white-space: nowrap; }

/* hero */
.sd-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr; gap: var(--sp-5);
  background: linear-gradient(135deg, #ffffff 0%, var(--brand-tint) 150%);
  border: 1px solid var(--brand-tint-200); border-radius: 16px; box-shadow: var(--shadow-md);
  padding: var(--sp-6); margin-bottom: var(--sp-5); }
.sd-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), #7c5cff); z-index: 1; }
.sd-hero::after { content: ""; position: absolute; top: -40%; right: -10%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(124,92,255,0.16), transparent 68%); pointer-events: none; }
.sd-hero > * { position: relative; z-index: 1; }
@media (min-width: 760px) { .sd-hero { grid-template-columns: minmax(210px, 0.72fr) 1.5fr; align-items: center; } }
.sd-hero__label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-ink); margin: 0; }
.sd-hero__badge { color: var(--brand); }
.sd-hero__value { font-size: 4rem; line-height: 1; font-weight: var(--fw-bold); letter-spacing: -0.03em; margin: 10px 0; color: var(--n-900); font-variant-numeric: tabular-nums; }
.sd-hero__sub { font-size: var(--fs-14); color: var(--text-muted); margin: 0; line-height: 1.5; }
.sd-hero__sub b { color: var(--text); }
.sd-hero__chart { min-width: 0; }
.sd-hero__axis { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: var(--fs-12); color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.sd-hero__axis-cap { text-transform: uppercase; letter-spacing: 0.04em; }

/* sparkline (server-rendered inline SVG area chart) */
.spark { width: 100%; height: 150px; display: block; }
.spark__line { stroke: var(--brand); }
.spark__dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.spark--empty { display: flex; align-items: center; justify-content: center; height: 120px; color: var(--text-subtle); font-size: var(--fs-14); }

/* secondary stat cards */
.sd-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-5); }
@media (min-width: 760px) { .sd-stats { grid-template-columns: repeat(4, 1fr); } }
.sd-stat { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-sm); transition: box-shadow 0.15s ease, transform 0.15s ease; }
.sd-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.sd-stat--accent { border-color: var(--brand-tint-200); }
.sd-stat--accent::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: var(--r-pill); background: linear-gradient(180deg, var(--brand), #7c5cff); }
.sd-stat__label { font-size: var(--fs-12); font-weight: var(--fw-semi); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0; }
.sd-stat__value { font-size: var(--fs-32); font-weight: var(--fw-bold); letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: var(--text); }
.sd-stat__unit { font-size: var(--fs-12); color: var(--text-subtle); margin: 0; }

/* panel + aside grid */
.sd-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 860px) { .sd-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.sd-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--sp-5); }
.sd-panel--muted { background: var(--surface-2); }
.sd-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.sd-panel__title { font-size: var(--fs-16); font-weight: var(--fw-semi); margin: 0; }
.sd-panel__tag { font-size: var(--fs-12); color: var(--text-muted); background: var(--n-100); padding: 3px 9px; border-radius: var(--r-pill); }
.sd-panel__tag--soon { background: var(--brand-tint); color: var(--brand-ink); }

/* verified-households-by-ZIP bars */
.sd-zips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sd-zip { display: grid; grid-template-columns: 18px 56px 1fr 48px; align-items: center; gap: var(--sp-3); }
.sd-zip__rank { font-size: var(--fs-12); color: var(--text-subtle); font-weight: var(--fw-semi); text-align: center; }
.sd-zip__code { font-variant-numeric: tabular-nums; font-weight: var(--fw-semi); font-size: var(--fs-14); }
.sd-zip__track { background: var(--n-100); border-radius: var(--r-pill); height: 8px; overflow: hidden; }
.sd-zip__fill { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--brand), #7c5cff); }
.sd-zip__count { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: var(--fs-14); }

.sd-aside { display: flex; flex-direction: column; gap: var(--sp-5); }

/* GA4 guide CTA */
.sd-cta { display: flex; align-items: center; gap: var(--sp-4); text-decoration: none; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.sd-cta:hover { box-shadow: var(--shadow-md); border-color: var(--brand-tint-200); }
.sd-cta__icon { flex: none; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand-tint);
  color: var(--brand); display: flex; align-items: center; justify-content: center; }
.sd-cta__body { display: flex; flex-direction: column; gap: 3px; }
.sd-cta__title { font-weight: var(--fw-semi); color: var(--text); font-size: var(--fs-14); }
.sd-cta__sub { font-size: var(--fs-12); color: var(--text-muted); line-height: 1.45; }
.sd-cta__arrow { margin-left: auto; color: var(--brand); font-size: var(--fs-20); transition: transform 0.15s ease; }
.sd-cta:hover .sd-cta__arrow { transform: translateX(3px); }

.sd-mini-stats { display: flex; gap: var(--sp-6); }
.sd-empty { color: var(--text-muted); font-size: var(--fs-14); line-height: 1.5; margin: 0; }

/* setup-progress variant */
.sd-steps { list-style: none; margin: var(--sp-4) 0 var(--sp-5); padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sd-step { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: var(--fs-14); }
.sd-step__mark { flex: none; width: 20px; height: 20px; border-radius: var(--r-pill); border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.sd-step.is-done { color: var(--text); }
.sd-step.is-done .sd-step__mark { background: var(--success); border-color: var(--success); color: #fff; }

/* ---- In-app guides ------------------------------------------------------- */
.guide { max-width: 720px; margin: 0 auto; }
.guide__back { text-decoration: none; color: var(--text-muted); }
.guide__back:hover { color: var(--text); }
.guide__lead { color: var(--text-muted); line-height: 1.6; margin-bottom: var(--sp-4); }
.guide code { background: var(--n-100); padding: 1px 6px; border-radius: var(--r-sm); font-size: var(--fs-14); }
.guide-steps { counter-reset: step; list-style: none; margin: var(--sp-6) 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-5); }
.guide-steps > li { counter-increment: step; position: relative; padding-left: 44px; }
.guide-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-14);
}
.guide-steps h2 { font-size: var(--fs-16); font-weight: var(--fw-semi); margin: 2px 0 4px; }
.guide-steps p { color: var(--text-muted); line-height: 1.55; margin: 0; }
.guide-preview { padding: var(--sp-5); margin-top: var(--sp-4); }
.guide-preview__cap { font-size: var(--fs-12); font-weight: var(--fw-semi); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--sp-3); }
.guide-preview__table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.guide-preview__table th, .guide-preview__table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.guide-preview__table th:last-child, .guide-preview__table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.guide-preview__note { margin-top: var(--sp-3); font-size: var(--fs-12); }
.onboarding__next { background: var(--brand-tint); border: 1px solid var(--brand-tint-200); border-radius: var(--r-md); padding: 10px 14px; margin: var(--sp-3) 0; }

/* Sessions & verified households by source / medium */
/* "Ask this store in Claude" - MCP connector panel on the dashboard */
.sd-connect { margin-top: var(--sp-5); }
.sd-connect__lead { color: var(--text-muted); font-size: var(--fs-14); line-height: 1.5; margin: 0 0 var(--sp-4); }
.sd-connect__row { display: flex; gap: var(--sp-2); align-items: stretch; flex-wrap: wrap; }
.sd-connect__url { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--n-100, #f4f4f5); border: 1px solid var(--border); border-radius: var(--r-md, 8px); padding: var(--sp-3) var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text); display: flex; align-items: center; }
.sd-connect__copy { white-space: nowrap; }
.sd-connect__note { margin: var(--sp-3) 0 0; font-size: var(--fs-12); color: var(--text-muted); }

.sd-src { margin-top: var(--sp-4); }
.sd-src__table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.sd-src__table th, .sd-src__table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.sd-src__table thead th { color: var(--text-muted); font-weight: 600; font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.03em; }
.sd-src__num { text-align: right; font-variant-numeric: tabular-nums; }
.sd-src__sm { font-variant-numeric: tabular-nums; }
.sd-src__table tfoot td { font-weight: 600; border-bottom: none; border-top: 2px solid var(--border); }
.sd-src__table tbody tr:hover { background: var(--brand-tint); }

/* Add-a-store */
.store-new { max-width: 640px; }
.store-new__back { color: var(--text-muted); text-decoration: none; font-size: var(--fs-14); }
.store-new__back:hover { color: var(--text); }
.store-new__actions { display: flex; gap: var(--sp-3); align-items: center; margin-top: var(--sp-4); }
.account__add-store { display: inline-block; margin-right: var(--sp-4); font-size: var(--fs-14); font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; }
.account__add-store:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   "Ask the Showroom" workshop chat - Claude Co-work idiom (warm, light, clay).
   Scoped palette so it reads native to what the room just learned, without
   touching the rest of the app.
--------------------------------------------------------------------------- */
.showroom {
  --sr-bg: #faf9f5;
  --sr-surface: #ffffff;
  --sr-ink: #211f1b;
  --sr-muted: #6b655c;
  --sr-clay: #c8724c;
  --sr-clay-tint: #f6ece4;
  --sr-border: #ece7dd;
  min-height: calc(100vh - 8rem);
  background: var(--sr-bg);
  display: flex;
  justify-content: center;
  padding: var(--sp-6) var(--sp-4);
  color: var(--sr-ink);
}

.sr-panel {
  width: 100%;
  max-width: 46rem;
  background: var(--sr-surface);
  border: 1px solid var(--sr-border);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(33, 31, 27, .04), 0 12px 32px rgba(33, 31, 27, .05);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}

.sr-eyebrow {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-12);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sr-clay);
  font-weight: 600;
}
.sr-title { margin: 0; font-family: var(--font-serif); font-size: var(--fs-32); line-height: 1.1; }
.sr-sub { margin: var(--sp-2) 0 0; color: var(--sr-muted); font-size: var(--fs-16); line-height: 1.5; }
.sr-sub code { font-family: var(--font-mono); font-size: .9em; background: var(--sr-clay-tint); padding: .1em .35em; border-radius: 5px; }

.sr-thread {
  margin: var(--sp-5) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-height: 26rem;
  overflow-y: auto;
  padding-right: var(--sp-2);
}
.sr-msg { display: flex; }
.sr-msg--user { justify-content: flex-end; }
.sr-bubble {
  max-width: 82%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 14px;
  font-size: var(--fs-16);
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.sr-msg--assistant .sr-bubble { background: var(--sr-bg); border: 1px solid var(--sr-border); border-bottom-left-radius: 4px; }
.sr-msg--user .sr-bubble { background: var(--sr-clay); color: #fff; border-bottom-right-radius: 4px; }
.sr-msg--thinking .sr-bubble { color: var(--sr-muted); letter-spacing: .15em; }

/* Show-the-work tool card */
.sr-step { border: 1px solid var(--sr-border); border-radius: 12px; background: #fdfcfa; overflow: hidden; }
.sr-step__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  color: var(--sr-muted);
}
.sr-step__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sr-clay); flex: none; }
.sr-step__name { color: var(--sr-ink); }
.sr-step__out {
  margin: 0;
  padding: var(--sp-3);
  border-top: 1px solid var(--sr-border);
  background: #fbf8f4;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

.sr-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.sr-chip {
  border: 1px solid var(--sr-border);
  background: var(--sr-bg);
  color: var(--sr-ink);
  border-radius: 999px;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-14);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.sr-chip:hover { border-color: var(--sr-clay); background: var(--sr-clay-tint); }

.sr-inputbar { display: flex; gap: var(--sp-2); }
.sr-input {
  flex: 1;
  border: 1px solid var(--sr-border);
  border-radius: 12px;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-16);
  background: var(--sr-surface);
  color: var(--sr-ink);
}
.sr-input:focus { outline: none; border-color: var(--sr-clay); box-shadow: 0 0 0 3px var(--sr-clay-tint); }

.sr-btn { border: 0; border-radius: 12px; padding: var(--sp-3) var(--sp-5); font-size: var(--fs-16); font-weight: 600; cursor: pointer; }
.sr-btn--primary { background: var(--sr-clay); color: #fff; }
.sr-btn--primary:hover { background: #b5643f; }
.sr-btn:disabled { opacity: .5; cursor: default; }

/* Passphrase gate */
.showroom--gate { align-items: center; }
.sr-gate-card { max-width: 24rem; text-align: center; background: var(--sr-surface); border: 1px solid var(--sr-border); border-radius: 18px; padding: var(--sp-6); }
.sr-gate-title { margin: 0 0 var(--sp-2); font-family: var(--font-serif); font-size: var(--fs-32); }
.sr-gate-sub { margin: 0 0 var(--sp-4); color: var(--sr-muted); }
.sr-gate-error { color: var(--error, #b3261e); font-size: var(--fs-14); margin: 0 0 var(--sp-3); }
.sr-gate-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.sr-gate-input { border: 1px solid var(--sr-border); border-radius: 12px; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-16); text-align: center; }
.sr-gate-input:focus { outline: none; border-color: var(--sr-clay); box-shadow: 0 0 0 3px var(--sr-clay-tint); }
/*
 * FocalGraph BuyerMatch — application stylesheet manifest (sprockets)
 * Order matters: tokens define the custom properties the others consume.
 *



 */
