/* ============================================================
   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; }

.bm a {
  color: var(--brand);
  text-decoration: none;
  font-weight: var(--fw-medium);
}
.bm a: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); }

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

/* 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); }
/* ============================================================
   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; }

/* ---- Tier picker (good / better / best) ----------------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 700px) { .tier-grid { grid-template-columns: 1fr; } }

/* each tier is a label wrapping a hidden radio for no-JS selection */
.tier {
  position: relative;
  display: flex; flex-direction: column;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.tier:hover { border-color: var(--n-400); box-shadow: var(--shadow-sm); }
.tier input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.tier__name { font-size: var(--fs-16); font-weight: var(--fw-semi); }
.tier__price { font-size: var(--fs-24); font-weight: var(--fw-bold); margin: var(--sp-2) 0 2px; letter-spacing: -0.01em; }
.tier__price small { font-size: var(--fs-14); font-weight: var(--fw-medium); color: var(--text-muted); }
.tier__desc { font-size: var(--fs-14); color: var(--text-muted); margin: 0 0 var(--sp-3); }
.tier__features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tier__features li { font-size: var(--fs-14); padding-left: 22px; position: relative; color: var(--n-700); }
.tier__features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--success); font-weight: 700;
}
.tier__badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: var(--fs-12); font-weight: var(--fw-semi);
  background: var(--brand); color: #fff;
  padding: 3px 12px; border-radius: var(--r-pill);
  white-space: nowrap;
}
/* recommended (mid) tier emphasis */
.tier--recommended { border-color: var(--brand); }

/* checked state (drives off the real radio) */
.tier:has(input:checked) {
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.tier:has(input:focus-visible) { box-shadow: var(--ring); }
.tier__check {
  margin-top: var(--sp-4);
  font-size: var(--fs-14); font-weight: var(--fw-semi);
  color: var(--text-subtle);
  display: flex; align-items: center; gap: 8px;
}
.tier__check::before {
  content: ""; width: 18px; height: 18px; border-radius: var(--r-pill);
  border: 2px solid var(--border-strong); display: inline-block; flex: none;
}
.tier:has(input:checked) .tier__check { color: var(--brand); }
.tier:has(input:checked) .tier__check::before {
  border-color: var(--brand); background: var(--brand)
    radial-gradient(circle, #fff 32%, transparent 36%);
}

/* ---- Payment slot (Stripe Elements placeholder) --------- */
.card-field {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-14);
}
.card-field__glyph {
  width: 38px; height: 26px; border-radius: 4px; flex: none;
  background: var(--surface); border: 1px solid var(--border-strong);
  display: grid; place-items: center; color: var(--text-subtle);
}

/* ============ Onboarding hub ============================= */
main.onboarding { max-width: var(--maxw-form); }

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

/* 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 */
.property-list { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.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); }
/*
 * FocalGraph BuyerMatch — application stylesheet manifest (sprockets)
 * Order matters: tokens define the custom properties the others consume.
 *



 */
