/* base.css — the design system, shared by every screen.
 *
 * ─── LIGHT, BECAUSE IT HAS TO BE READ ────────────────────────────────────────
 *
 * The first version was dark, on the theory that a rep works in a dim room. That
 * was a rationalisation. Reps work in offices with the lights on, this page is
 * dense with prose they have to read while a stranger waits, and dark grey text
 * on darker grey is the hardest possible version of that. It is also what every
 * other sales tool looks like.
 *
 * So: near-black on warm white, at real contrast. Unremarkable as a decision,
 * which is the point — the colour on this page is supposed to come from
 * somewhere else.
 *
 * ─── THE ACCENT BELONGS TO THE PROSPECT ──────────────────────────────────────
 *
 * Every lead page wears the company's OWN colours, pulled from their site by
 * brand.js. Ridgeline's page is Ridgeline blue; Globex's is Globex green. A rep
 * knows whose page they are looking at before reading a word, and thirty leads
 * stop being thirty identical screens.
 *
 * --accent and friends are therefore OVERRIDDEN PER PAGE, inline, from the
 * extracted brand. What is defined here is only the fallback for a company whose
 * colour could not be read — deliberately sober, so an unbranded page looks
 * plain rather than looking like someone else's brand.
 *
 * Never hard-code an accent in a component. Always var(--accent).
 */

:root {
  /* Ground — the DRiX look, verbatim from DRiX-Leads via drix-ui.css. Dark is
   * the product's identity, not a preference: a rep sits on this page between
   * dials all day, and every other DRiX surface is already this colour. The
   * token names below are unchanged, so every component that already says
   * var(--bg) or var(--ink) follows without being touched. */
  --bg:        #0a0e13;
  --surface:   #121820;
  --surface-2: #1a222c;
  --rule:      #2a3542;
  --rule-soft: #222c38;

  /* Ink — light on dark, same roles as before. */
  --ink:   #e8ecf2;
  --mid:   #a8b2c0;
  --soft:  #6b7685;
  --faint: #55606e;

  /* Fallback accent for a company whose brand could not be read. DRiX blue.
   * NOTE: --accent is overridden per record with the prospect's own brand
   * colour. On this dark ground a dark brand colour can fall below contrast,
   * which it never did on the old white. brand.js must floor the luminance. */
  --accent:      #5aa9ff;
  --accent-text: #8cc3ff;
  --accent-ink:  #0a0e13;
  --accent-wash: #1a222c;
  --accent-edge: #2a3542;

  /* Semantic, and independent of whatever the prospect's colour turns out to
   * be — "this counter is unproven" must not change meaning because a company
   * happens to be amber. */
  --proven: #3ddc84;
  --judge:  #ffc757;
  --failed: #ff5a5a;

  /* The three pain tiers, so a tier reads the same here as in the gallery. */
  --tier-company:     #ff5a5a;
  --tier-subindustry: #ff9d5a;
  --tier-industry:    #5ad4ff;

  --display: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --data: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
body.centred { display: grid; place-items: center; padding: 2rem 1.25rem; }

::selection { background: var(--accent-wash); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

kbd {
  font: 500 .68rem/1 var(--data);
  color: var(--soft); background: var(--surface-2);
  border: 1px solid var(--rule); border-radius: 3px; padding: .2em .4em;
}

/* ── Type ─────────────────────────────────────────────────────────────────── */
.eyebrow, .p-eyebrow {
  font: 600 .7rem/1 var(--data); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-text); margin: 0 0 .9rem;
}
h1 {
  font: 600 clamp(1.75rem, 3vw, 2.4rem)/1.15 var(--display);
  letter-spacing: -.022em; margin: 0 0 .8rem; text-wrap: balance; color: var(--ink);
}
h2 {
  font: 600 .72rem/1 var(--data); letter-spacing: .15em; text-transform: uppercase;
  color: var(--soft); margin: 2.75rem 0 1rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--rule);
}
h3 { font: 600 1.05rem/1.4 var(--body); margin: 0 0 .35rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; max-width: 68ch; }
.lede { color: var(--mid); font-size: 1.08rem; line-height: 1.65; }
.hint, .meta, .counter { color: var(--soft); font-size: .875rem; }
.hint { margin: .4rem 0 0; }
.counter { margin: .5rem 0 0; font-variant-numeric: tabular-nums; }
.err { color: var(--failed); margin: 1rem 0 0; font-size: .92rem; }
a { color: var(--accent-text); }

/* ── Surfaces ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 6px; padding: 1.15rem 1.35rem; margin-bottom: .85rem;
}
.card.accent {
  border-color: var(--accent-edge);
  background: var(--accent-wash);
}
.note {
  background: var(--accent-wash); border: 1px solid var(--accent-edge);
  border-radius: 6px; padding: 1rem 1.15rem; color: var(--mid); margin: 1.5rem 0;
}
.empty {
  background: var(--surface); border: 1px dashed var(--rule);
  border-radius: 6px; padding: 3rem 2rem; text-align: center; color: var(--mid);
}

.chip {
  display: inline-block; font: 500 .74rem/1.5 var(--data);
  border: 1px solid var(--rule); border-radius: 3px; padding: .12rem .5rem;
  color: var(--mid); background: var(--surface);
  margin: 0 .3rem .3rem 0; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip.hot  { border-color: var(--accent-edge); color: var(--accent-text); background: var(--accent-wash); }
.chip.warn { border-color: color-mix(in srgb, var(--judge) 35%, transparent); color: var(--judge); }
.chip.ok   { border-color: color-mix(in srgb, var(--proven) 35%, transparent); color: var(--proven); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.6rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--ink); }
input, textarea, select {
  width: 100%; padding: .65rem .75rem; font: inherit; font-size: .98rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 5px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
textarea { font: .9rem/1.6 var(--data); resize: vertical; }

button, .btn {
  display: inline-block; padding: .7rem 1.3rem;
  font: 600 .95rem var(--body); letter-spacing: 0;
  color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: 5px; cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.12); }
button:disabled { opacity: .5; cursor: default; filter: none; }

.btn-quiet {
  padding: .5rem .9rem; font: 500 .88rem var(--body);
  color: var(--mid); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 5px; cursor: pointer; text-decoration: none;
}
.btn-quiet:hover { color: var(--accent-text); border-color: var(--accent-edge); filter: none; }

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

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.bar, .topbar {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 3.25rem; padding: 0 1.5rem;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 40;
}
.brand {
  font: 700 .95rem/1 var(--display); letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent-text); }
.who { margin-left: auto; display: flex; align-items: center; gap: .9rem;
       font-size: .875rem; color: var(--soft); }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 2rem 7rem; }
.wrap.wide { max-width: 72rem; }
.loading { padding: 5rem; text-align: center; color: var(--soft); }
.row-between { display: flex; justify-content: space-between; align-items: flex-end;
               gap: 1rem; flex-wrap: wrap; }
.actions { display: flex; gap: .6rem; }
hr.split { border: 0; border-top: 1px solid var(--rule); margin: 3.5rem 0 2.5rem; }

@media (max-width: 48rem) {
  .bar, .topbar { gap: .9rem; padding: 0 1rem; }
  .wrap { padding: 2rem 1.1rem 4rem; }
}
