/* leadcard.css — THE lead card. One definition, loaded by both the client app and the admin
 * dashboard, because they had drifted into two separate implementations with different markup,
 * different badge classes and different colours for the same data. Anything card-related belongs
 * here and nowhere else; if it lives in app.css or dashboard.css it will diverge again.
 *
 * Tokens are declared as fallbacks so the file is self-sufficient on either page.
 */
/* The card OWNS its tokens. app.css and dashboard.css define slightly different values for the same
   names (--border .10 vs .09, --text-dim differs by a few points), so inheriting them reintroduced
   exactly the drift this file exists to remove. Measured: three computed-style differences between
   the two surfaces before this block, zero after. */
.lead {
  --lc-accent:   #1fe07a;
  --lc-bg:       #080d12;
  --lc-surface:  rgba(255,255,255,.045);
  --lc-surface2: rgba(255,255,255,.08);
  --lc-border:   rgba(255,255,255,.10);
  --lc-border-s: rgba(255,255,255,.18);
  --lc-text:     #eaf2ef;
  --lc-dim:      #b4c2c7;
  --lc-muted:    #8a98a4;
  --lc-warn:     #e3c27e;
  --lc-info:     #18b8ff;
  --lc-bad:      #ff6b6b;
  --lc-on-accent: #04140b;
}

.list { display: grid; gap: 16px; }

.lead {
  background: var(--lc-bg);
  border: 1px solid var(--lc-border);
  border-radius: 18px;
  padding: 22px 24px;
  transition: border-color .2s var(--ease, ease);
}
.lead:hover { border-color: var(--lc-border-s); }
.lead.is-hot { border-color: rgba(31,224,122,.34); }

/* ── head: content left, score anchored right ─────────────────────────────────────────────── */
.lead-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: nowrap; }
.lead-head { min-width: 0; flex: 1; }
.lead-name { font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif); font-weight: 700; font-size: 1.22rem; letter-spacing: -.015em; line-height: 1.25; color: var(--lc-text); }
.lead-sub { color: var(--lc-muted); font-size: .85rem; margin-top: 2px; }

/* The score is what a broker triages on, so it is the one thing that gets size. */
.lead-score {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 72px; padding: 9px 12px 8px; border-radius: 14px;
  background: var(--lc-surface); border: 1px solid var(--lc-border);
}
.lead-score b { font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, sans-serif); font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lead-score span { margin-top: 4px; font-size:.75rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--lc-muted); }
.lead-score.is-strong { background: var(--accent-soft, rgba(31,224,122,.12)); border-color: rgba(31,224,122,.28); }
.lead-score.is-strong b { color: var(--lc-accent); }
.lead-score.is-mid b { color: var(--lc-warn); }
.lead-score.is-low b { color: var(--lc-muted); }

/* ── the quiet row: only what a broker needs before deciding to open it ───────────────────── */
.lead-flags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lead-new {
  display: inline-flex; align-items: center; gap: 5px; font-size:.75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--lc-accent);
  background: var(--accent-soft, rgba(31,224,122,.12)); border: 1px solid rgba(31,224,122,.26);
  padding: 3px 9px; border-radius: 7px;
}
/* A franchise location: information, not a warning, so it takes the info colour and not the red. */
.lead-franchise {
  display: inline-flex; align-items: center; gap: 5px; font-size:.75rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--lc-info);
  background: rgba(24,184,255,.12); border: 1px solid rgba(24,184,255,.26);
  padding: 3px 9px; border-radius: 7px; cursor: help;
}
/* Everything else — intent, closeability, verification, tier, source, health — folds away. The
   information is all still there, one tap down, instead of eight chips competing with the score. */
.lead-more { margin-top: 10px; }
.lead-more > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: .78rem; font-weight: 600; color: var(--lc-muted);
  padding: 3px 2px; border-radius: 6px; transition: color .18s ease;
}
.lead-more > summary::-webkit-details-marker { display: none; }
.lead-more > summary:hover { color: var(--lc-dim); }
.lead-more > summary::after { content: '▾'; font-size: .8em; transition: transform .18s ease; }
.lead-more[open] > summary::after { transform: rotate(180deg); }
.lead-more[open] > summary { color: var(--lc-dim); }
.lead-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

/* ── badges: one vocabulary for both surfaces ─────────────────────────────────────────────── */
.badge {
  font-size:.75rem; font-weight: 600; padding: 4px 9px; border-radius: 7px;
  text-transform: uppercase; letter-spacing: .045em; white-space: nowrap;
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px;
}
.badge svg { width: 12px; height: 12px; }
.badge.neutral   { background: var(--lc-surface2); color: var(--lc-dim); }
.badge.good      { background: var(--accent-soft, rgba(31,224,122,.12)); color: var(--lc-accent); border: 1px solid rgba(31,224,122,.28); }
.badge.warnish   { background: rgba(227,194,126,.13); color: var(--lc-warn); border: 1px solid rgba(227,194,126,.26); }
.badge.hot       { background: rgba(255,150,50,.15); color: #ffaa5a; border: 1px solid rgba(255,150,50,.28); }
.badge.info      { background: rgba(24,184,255,.13); color: var(--lc-info); border: 1px solid rgba(24,184,255,.26); }
.badge.bad       { background: rgba(255,107,107,.12); color: var(--lc-bad); border: 1px solid rgba(255,107,107,.25); }

/* ── contact row: each item its own flex line so the icon centres on the TEXT ─────────────── */
.lead-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: var(--lc-dim); font-size: .88rem; }
.lead-contact > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.lead-contact .ico { display: inline-flex; align-items: center; opacity: .55; flex: 0 0 auto; }
.lead-contact .ico svg { width: 15px; height: 15px; display: block; }
.lead-contact a { color: var(--lc-dim); }
.lead-contact a:hover { color: var(--lc-accent); }
.lead-contact, .lead-contact a { overflow-wrap: anywhere; }

/* ── the reason is the product's value, so it is the hero block ───────────────────────────── */
.lead .lead-signal { color: var(--lc-muted); background: none; border-radius: 0; font-size: .86rem; margin: 14px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--lc-border-s); line-height: 1.5; }
.lead-reason {
  margin: 14px 0 0; padding: 14px 16px; background: var(--accent-soft, rgba(31,224,122,.12));
  border: 1px solid rgba(31,224,122,.22); border-radius: var(--radius-sm, 10px);
  color: var(--lc-text); font-size: .92rem; line-height: 1.62; max-width: 74ch; text-wrap: pretty;
}
.lead-reason .why { display: block; color: var(--lc-accent); font-weight: 700; font-size:.8125rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 5px; }
.lead-risk { margin: 12px 0 0; padding: 11px 14px; background: rgba(230,166,75,.08); border: 1px solid rgba(230,166,75,.28); border-left: 2px solid #e0a64b; border-radius: var(--radius-sm, 10px); color: var(--lc-dim); font-size: .88rem; line-height: 1.5; }
.lead-srcmeta { margin: 10px 0 0; color: var(--lc-muted); font-size: .78rem; opacity: 1; }
/* the dated money event (eventWhyCall), above the reason: the record, its date and source, and the call angle */
.lead-whycall { margin: 14px 0 0; padding: 12px 16px; border: 1px solid var(--lc-border-s); border-left: 2px solid var(--lc-accent); border-radius: var(--radius-sm, 10px); background: var(--lc-surface); color: var(--lc-text); font-size: .92rem; line-height: 1.55; max-width: 74ch; }
.lead-whycall .why { display: block; color: var(--lc-accent); font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.lead-whycall .whycall-line { overflow-wrap: anywhere; }
.lead-whycall .whycall-age { margin-left: 8px; color: var(--lc-muted); font-size: .82rem; white-space: nowrap; }
.lead-whycall .whycall-angle { margin-top: 4px; color: var(--lc-dim); }

.lead-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }

/* ── drafted email: collapsible, because it was previously impossible to dismiss ──────────── */
.email-box { margin-top: 14px; border: 1px solid var(--lc-border); border-radius: var(--radius-sm, 10px); background: var(--lc-surface); overflow: hidden; }
.email-box > summary {
  display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
  padding: 10px 14px; font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--lc-muted);
}
.email-box > summary::-webkit-details-marker { display: none; }
.email-box > summary::after { content: '▾'; margin-left: auto; transition: transform .18s ease; }
.email-box[open] > summary::after { transform: rotate(180deg); }
.email-box > summary:hover { color: var(--lc-dim); }
.email-inner { padding: 0 14px 14px; }
.email-subj { font-weight: 600; color: var(--lc-text); font-size: .92rem; margin-bottom: 8px; }
.email-body { color: var(--lc-dim); font-size: .89rem; line-height: 1.6; white-space: pre-wrap; }
.email-sent { margin-top: 10px; font-size: .78rem; color: var(--lc-accent); }

@media (max-width: 520px) {
  .lead { padding: 18px 16px; }
  .lead-top { flex-wrap: wrap; }
  .lead-score { min-width: 0; flex-direction: row; gap: 8px; align-items: baseline; padding: 6px 11px; }
  .lead-score b { font-size: 1.5rem; }
  .lead-score span { margin-top: 0; }
}

/* agent-written qualifier + suggested opener — shown on BOTH surfaces */
.lead-note { margin: 12px 0 0; padding: 11px 14px; background: var(--lc-surface); border: 1px solid var(--lc-border); border-radius: var(--radius-sm, 10px); color: var(--lc-dim); font-size: .88rem; line-height: 1.55; }
.lead-note b { color: var(--lc-text); font-weight: 600; }
.lead-note.is-opener { border-left: 2px solid var(--lc-accent); }

/* ── DIAL STRIP ────────────────────────────────────────────────────────────────────────────────
   The three facts that decide whether to dial this merchant right now: their local time, how fresh
   the contact is, and whether we have already tried. All were computed before and hidden — freshness
   behind a collapsed panel, local time only inside Call Mode, prior dials nowhere at all.
   Deliberately quiet: this informs the choice, it never shouts over the score or the reason. */
.dial-strip {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.ds {
  display: inline-flex; align-items: center; gap: 4px;
  font-size:.75rem; line-height: 1; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--lc-border, rgba(255,255,255,0.10));
  color: var(--lc-dim, #93a3ad); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ds svg { opacity: .75; }
.ds-ok   { color: #1fe07a; border-color: rgba(31,224,122,0.30); background: rgba(31,224,122,0.07); }
.ds-warn { color: #e3c27e; border-color: rgba(227,194,126,0.30); background: rgba(227,194,126,0.07); }
.ds-bad  { color: #ff6b6b; border-color: rgba(255,107,107,0.32); background: rgba(255,107,107,0.07); }
.ds-dim  { color: var(--lc-dim, #93a3ad); }
/* a promise made to a merchant — the one thing here that should catch the eye */
.ds-due  {
  color: #05080b; background: #e3c27e; border-color: #e3c27e; font-weight: 650;
}

/* THE RECEIPTS — dated, sourced claims under the prose reason.
 *
 * Styled as a citation list rather than another callout box: the reason above is the argument, this
 * is the footnote, and giving them equal visual weight would make the card shout twice. The source
 * and date sit in a dimmer, tabular run so a broker can scan "how old is this" down the column
 * without reading the claims again.
 *
 * The empty state is deliberately quiet and NOT an error colour. "No dated third-party signal" is
 * ordinary — it is true of most of the pool — and dressing it as a warning would train the eye to
 * ignore real warnings. */
.lead-cites { margin: 12px 0 0; padding: 0 0 0 13px; border-left: 2px solid var(--lc-border, rgba(255,255,255,.10)); }
.lead-cites .cites-head { display: block; color: var(--lc-dim, #9aa3ad); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 7px; }
.lead-cites ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.lead-cites li { color: var(--lc-text, #e8ecf1); font-size: .865rem; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.lead-cites li a { color: var(--lc-text, #e8ecf1); text-decoration: underline; text-decoration-color: rgba(255,255,255,.22); text-underline-offset: 3px; transition: text-decoration-color 160ms ease, color 160ms ease; }
.lead-cites li a:hover { color: var(--lc-accent, #1fe07a); text-decoration-color: currentColor; }
.lead-cites li a:focus-visible { outline: 2px solid var(--lc-accent, #1fe07a); outline-offset: 3px; border-radius: 3px; }
.lead-cites .cite-meta { color: var(--lc-muted, #6f7883); font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lead-cites.is-empty { display: flex; align-items: center; gap: 7px; border-left: 0; padding: 0; margin: 12px 0 0; color: var(--lc-muted, #6f7883); font-size: .82rem; line-height: 1.5; }
.lead-cites.is-empty .ico { opacity: .6; flex: 0 0 auto; }

/* ── ONE CLEAN CARD (2026-10-18): a phone you can tap, one reason, and everything else under Details ─────────── */
.lead-name { overflow-wrap: break-word; word-break: normal; hyphens: none; }
.lead-call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 14px 0 0; padding: 0 18px;
  border-radius: 999px; background: var(--lc-surface2); color: var(--lc-text); font-weight: 600; text-decoration: none; }
.lead-call:hover { background: var(--lc-border-s); }
.lead-call svg { color: var(--lc-accent); }
.lead-details { margin: 12px 0 0; }
.lead-details > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--lc-dim); font-weight: 600; font-size: .92rem; }
.lead-details > summary::-webkit-details-marker { display: none; }
.lead-details > summary::after { content: '›'; transform: rotate(90deg); opacity: .6; }
.lead-details[open] > summary::after { transform: rotate(-90deg); }
.lead-details .lead-badges { margin: 4px 0 10px; }
.lead-details .lead-contact { margin-top: 6px; }
@media (max-width: 767px) {
  .lead { font-size: 16px; }
  .lead-contact, .lead-srcmeta { font-size: .95rem; }
  .lead .btn { min-height: 44px; }
  .lead-contact a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ── THE LIGHT LOOK for the card's own tokens ── */
:root[data-theme="light"] .lead {
  --lc-accent:#0a7d45; --lc-bg:#ffffff; --lc-surface:#f5f5f7; --lc-surface2:#ececf0;
  --lc-border:rgba(0,0,0,.08); --lc-border-s:rgba(0,0,0,.14);
  --lc-text:#1d1d1f; --lc-dim:#515154; --lc-muted:#636366; --lc-warn:#a86b00; --lc-info:#0062c4; --lc-bad:#d70015;
  --lc-on-accent:#ffffff;
}
:root[data-theme="light"] .ds-ok { color:#0a7d45; }
:root[data-theme="light"] .ds-warn { color:#7a5200; }
:root[data-theme="light"] .lead-reason { background:var(--lc-surface); border-color:transparent; }

/* ── THE FRONT (Ari approved, 2026-10-19): one why line, one big Call button, a quiet second row ── */
.lead-whyline { margin:12px 0 0; color:var(--lc-dim); font-size:.98rem; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.lead-whyline.is-record { color:var(--lc-text); font-weight:600; }
.lead { min-width:0; max-width:100%; overflow:hidden; }
.lead-call { display:flex; justify-content:center; width:100%; min-height:52px; margin-top:14px; border-radius:16px;
  background:var(--lc-accent); color:var(--lc-on-accent); font-size:1.05rem; }
.lead-call:hover { filter:brightness(1.05); background:var(--lc-accent); }
.lead-call svg { color:inherit; }
.lead-cbchip { display:inline-flex; align-items:center; gap:6px; margin-top:8px; padding:4px 10px; border-radius:999px;
  background:rgba(31,224,122,.12); color:var(--lc-text); font-size:.85rem; font-weight:600; }
:root[data-theme="light"] .lead-cbchip { background:#e6f4ec; color:#0b6b3c; }
.lead-taxchip { display:inline-flex; align-items:center; gap:6px; margin:8px 0 0 6px; padding:4px 10px; border-radius:999px;
  background:rgba(227,194,126,.12); color:var(--lc-warn); border:1px solid rgba(227,194,126,.26); font-size:.8rem; font-weight:600; }
.lead-taxchip:first-child, .lead-sub + .lead-taxchip { margin-left:0; }
:root[data-theme="light"] .lead-taxchip { background:#fdf3e1; color:#7a5200; border-color:#ecd3a4; }
.lead-details { display:inline-block; margin:10px 16px 0 0; vertical-align:middle; }
.lead-details[open] { display:block; }
.lead-details > summary { min-height:44px; color:var(--lc-dim); font-weight:500; }
.lead-actions { display:inline-flex; align-items:center; gap:14px; margin-top:10px; vertical-align:middle; flex-wrap:wrap; }
/* NO FLOATING POP-UPS (Ari, 2026-10-21). The card's actions are one quiet inline row; the laptop's QR opens inside the
   card under the number. The QR button shows only on a fine pointer that can hover, at laptop width: a phone just dials. */
.lead-actions .quiet-link { min-height:44px; padding:8px 2px; }
.lead-actions .no-email-note, .lead-actions .sent-note { font-size:.88rem; color:var(--lc-dim); }
.lead-actions .sent-note { color:var(--lc-text); font-weight:600; }
.lead-callrow { display:flex; gap:8px; margin-top:14px; min-width:0; }
.lead-callrow .lead-call { flex:1 1 auto; min-width:0; margin-top:0; }
/* Phone withheld (the do-not-call registry): where the green number would be, a plain line with nothing to press. */
.lead-withheld { flex:1 1 auto; display:flex; align-items:center; gap:10px; margin:0; min-height:48px; padding:10px 16px; border-radius:14px;
  border:1px dashed var(--lc-border-s); color:var(--lc-muted); font-weight:600; font-size:.95rem; }
.lead-withheld svg { flex:none; }
/* Do not contact (stop-path lane): the reason and the date where the number was; the card a step quieter. */
.lead-dnc { flex:1 1 auto; display:flex; align-items:center; gap:10px; margin:0; min-height:48px; padding:10px 16px; border-radius:14px;
  border:1px solid var(--lc-bad); color:var(--lc-bad); font-weight:600; font-size:.95rem; }
.lead-dnc svg { flex:none; }
.lead.is-dnc { opacity:.85; }
.lead-san-go { background:none; border:0; padding:0; font:inherit; color:var(--lc-accent); text-decoration:underline; cursor:pointer; min-height:24px; }
.lead-phone-src { margin:6px 0 0; font-size:.8rem; line-height:1.35; color:var(--lc-muted); overflow-wrap:anywhere; }
.lead-qr-btn { display:none; flex:0 0 52px; min-height:52px; border-radius:16px; border:1px solid var(--lc-border); background:var(--lc-surface);
  color:var(--lc-text); cursor:pointer; padding:0; }
.lead-qr-btn:hover, .lead-qr-btn[aria-expanded="true"] { background:var(--lc-surface2); }
@media (hover:hover) and (pointer:fine) and (min-width:768px) { .lead-qr-btn { display:grid; place-items:center; } }
.lead-qr { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-top:10px; padding:12px; border-radius:14px;
  background:var(--lc-surface); border:1px solid var(--lc-border); }
.lead-qr[hidden] { display:none; }
.lead-qr .cm-qr { background:#fff; border-radius:10px; padding:8px; line-height:0; }
.lead-qr .cm-qr[hidden] { display:none; }
.lead-qr .cm-qr img { display:block; width:132px; height:132px; image-rendering:pixelated; }
.lead-qr-main { display:flex; flex-direction:column; gap:8px; align-items:flex-start; min-width:0; }
.lead-qr-hint { color:var(--lc-dim); font-size:.9rem; }
/* The call assistant's "show the merchant's local time" (broker app, 2026-10-25): off hides the "Their time" chip.
   The admin never sets no-localtime, so its cards are unchanged. */
body.no-localtime .ds-time { display:none; }

/* ── the score hover (hover-and-chart §2): a small box under the score, on hover (computer) or a tap (phone) ─── */
.sh { position: relative; flex: 0 0 auto; cursor: pointer; border-radius: 14px; outline: none; }
.sh:focus-visible { box-shadow: 0 0 0 2px var(--lc-info); }
.sh-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: max-content; max-width: min(300px, 82vw);
  background: var(--lc-bg); border: 1px solid var(--lc-border-s); border-radius: 12px; padding: 10px 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.55);
  text-align: left; cursor: auto; }
.sh-pop::before { content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px; } /* the gap the pointer crosses */
.sh-pop ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; color: var(--lc-text); font-size: .85rem; line-height: 1.35; }
.sh-note { margin: 8px 0 0; font-size: .8rem; line-height: 1.35; color: var(--lc-warn); }
:root[data-theme="light"] .sh-note { color: #7a5200; }
.sh-foot { margin: 8px 0 0; padding-top: 7px; border-top: 1px solid var(--lc-border); font-size: .78rem; color: var(--lc-muted); }
.sh-foot a { color: var(--lc-muted); text-decoration: underline; display: inline-block; min-height: 24px; }
.sh.is-open .sh-pop, .sh:focus-visible .sh-pop { display: block; }
@media (hover: hover) and (pointer: fine) { .sh:hover .sh-pop { display: block; } }

/* ── the card, v2 (prototype for Ari, 2026-10-26) ─────────────────────────────────────────── */
.lead.v2 { --band: var(--lc-info); }
.lead.v2.band-hot { --band: #ff6b6b; }
.lead.v2.band-warm { --band: #e3c27e; }
.lead.v2.band-qualify { --band: #18b8ff; }
:root[data-theme="light"] .lead.v2.band-hot { --band: #c4000f; }
:root[data-theme="light"] .lead.v2.band-warm { --band: #7a5200; }
:root[data-theme="light"] .lead.v2.band-qualify { --band: #0b62a8; }
.v2-why { margin-top: 12px; }
.v2-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.v2-recs li, .v2-none { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--lc-text); font-size: 1rem; }
.v2-recs li::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--band); box-shadow: 0 0 0 3px color-mix(in srgb, var(--band) 22%, transparent); }
.ki { width: 18px; height: 18px; flex: 0 0 auto; color: var(--band); }
.v2-none { font-weight: 500; color: var(--lc-dim); margin: 4px 0 0; }
.v2-summary { margin: 0; color: var(--lc-dim); font-size: .95rem; }
.v2-status { margin: 10px 0 0; color: var(--lc-dim); font-size: .86rem; }
.v2-rows { margin-top: 10px; border-top: 1px solid var(--lc-border); }
.v2-row { border-bottom: 1px solid var(--lc-border); }
.v2-row > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 48px; }
.v2-row > summary::-webkit-details-marker { display: none; }
.v2-row-t { font-weight: 600; color: var(--lc-text); }
.v2-peek { color: var(--lc-muted); font-size: .86rem; margin-left: auto; text-align: right; }
.v2-row > summary::after { content: '›'; color: var(--lc-muted); font-size: 1.2rem; transition: transform .18s ease; }
.v2-row[open] > summary::after { transform: rotate(90deg); }
.v2-row ul { list-style: none; margin: 0 0 12px; padding: 0 0 0 2px; display: grid; gap: 5px; font-size: .92rem; color: var(--lc-text); animation: v2-in .18s ease-out; }
.v2-row a { color: var(--lc-dim); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.v2-dim, .v2-news { color: var(--lc-muted); }
.v2-news { font-size: .84rem; }
.v2-risk { color: var(--lc-warn); }
:root[data-theme="light"] .v2-risk { color: #7a5200; }
/* the score's pop-up, designed: the band's edge, what the band means, an icon per record, the source */
.lead.v2 .sh-pop { border-left: 3px solid var(--band); width: 300px; max-width: min(320px, 86vw); padding: 12px 14px; }
.sh-pop .sh-head { margin: 0 0 8px; font-size: .82rem; color: var(--lc-dim); line-height: 1.4; }
.sh-pop .sh-head b { color: var(--band, var(--lc-text)); margin-right: 4px; }
.sh-pop ul { list-style: none; padding-left: 0; }
.sh-pop li { display: flex; gap: 8px; align-items: flex-start; }
.sh-pop li:not(.has-ki)::before { content: ''; width: 6px; height: 6px; margin: 7px 6px 0 6px; border-radius: 50%; background: var(--lc-muted); flex: 0 0 auto; }
.sh-pop .ki { width: 16px; height: 16px; margin-top: 1px; }
.sh.is-open .sh-pop, .sh:hover .sh-pop { animation: v2-in .16s ease-out; }
.sh.is-open { box-shadow: 0 0 0 2px var(--band, var(--lc-info)); }
@keyframes v2-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2-row ul, .sh.is-open .sh-pop, .sh:hover .sh-pop { animation: none; } }
/* ON A PHONE the score's pop-up is a sheet from the bottom (Ari picked variant B, 2026-10-26): the page behind is
   shaded and held still, the sheet keeps clear of the home indicator, never taller than the visible screen (dvh: the
   Safari toolbar grows and shrinks), and scrolls inside itself when its lines are long. */
.sh-scrim { display: none; }
@media (max-width: 767px) {
  .sh.is-open .sh-scrim { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.5); touch-action: none; cursor: default; animation: sh-fade .18s ease-out; }
  .sh.is-open .sh-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; z-index: 60;
    max-height: 80vh; max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 18px 18px 0 0; border-left: 0; border-top: 3px solid var(--band, var(--lc-border-s));
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); font-size: 1rem; transition: transform .15s ease-out; animation: v2-up .22s ease-out; }
  .sh.is-open .sh-pop::after { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--lc-border-s); }
  .sh.is-open .sh-pop ul { font-size: 1rem; gap: 8px; }
  .sh.is-open { box-shadow: none; }
  html.sh-lock, html.sh-lock body { overflow: hidden; overscroll-behavior: none; }
}
@keyframes v2-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sh.is-open .sh-pop, .sh.is-open .sh-scrim { animation: none; } }
/* the actions on a phone: an even grid, so "Deal calc" never sits alone on a line */
@media (max-width: 520px) {
  .lead.v2 .lead-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
  .lead.v2 .lead-actions .no-email-note, .lead.v2 .lead-actions .sent-note { grid-column: 1 / -1; order: 9; }
}
/* the v2 card lets its score pop-up overhang; the badge wears the band's colour, as the dots and the pop-up edge do */
.lead.v2 { overflow: visible; }
.lead.v2 .lead-score { background: color-mix(in srgb, var(--band) 12%, transparent); border-color: color-mix(in srgb, var(--band) 45%, transparent); }
.lead.v2 .lead-score b { color: var(--band); }
.lead.v2 .lead-score span { color: var(--band); opacity: .85; }

/* LEAD_TIDY (item 13): the clock on a revealed, unworked lead, in the sealed clock's look (leadcard.js tidyClock), amber
   under 3 days with its one reminder line. Here, not in app.css, because both pages load the card. */
.tidy-clock { margin: 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--lc-dim); }
.tidy-clock.is-amber { color: var(--lc-warn); }
:root[data-theme="light"] .tidy-clock.is-amber { color: #7a5200; }
.tidy-nudge { margin: 4px 0 0; font-size: .85rem; color: var(--lc-dim); }
