/* EventLead – sponsor app
   Palette follows the approved mockups: deep navy + petrol teal, with
   hot / warm / cold as the only bright colours on screen. */
:root {
  /* DWP Congress 2026 — ivory palace, gold leaf, royal navy */
  --ink: #1f2750;          /* navy: nav links and body text on the congress site */
  --ink-2: #4a4f6c;
  --ink-3: #7d8098;
  --gold: #b08a45;
  --gold-hi: #d1ad63;
  --gold-deep: #8c6a2f;
  --gold-grad: linear-gradient(180deg, #cfab62 0%, #b08a45 55%, #9c7738 100%);
  --teal: var(--gold);             /* legacy alias: primary accent */
  --teal-hover: var(--gold-deep);
  --teal-soft: #f3ead8;
  --paper: #f8f3ea;        /* ivory */
  --card: #fffdf8;
  --line: #e9dec9;
  --hot: #b3413a;   --hot-bg: #f8e4e1;
  --warm: #b86b1f;  --warm-bg: #f7ead9;
  --cold: #3d5c9e;  --cold-bg: #e5eaf5;
  --ok: #3f7a55;    --ok-bg: #e6f0e7;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
}
a { color: var(--teal); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--serif); font-size: 1.75rem; font-weight: 700; color: var(--gold-deep); letter-spacing: 0; }
h2 { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #d9bf85; outline-offset: 2px; border-radius: 4px; }

/* ---------- App shell ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; background: rgba(255,252,245,.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand img { height: 44px; width: auto; display: block; }
.who { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ink); color: #f3e3bd; font-weight: 700; font-size: .85rem;
}
.avatar.lg { width: 48px; height: 48px; font-size: 1rem; background: var(--teal-soft); color: var(--teal); }
.who-text { display: none; line-height: 1.2; }
.who-text small { display: block; color: var(--ink-3); }

.main { padding: 20px 16px calc(var(--nav-h) + 28px); max-width: 960px; margin: 0 auto; }

/* Bottom nav (mobile). The scan button is the one loud element in the app. */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: 1fr 1fr 1.1fr 1fr 1fr;
  align-items: center; background: #fffcf6; border-top: 1px solid var(--line);
}
.navlink {
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; color: var(--ink-3);
  text-decoration: none; padding: 6px 0; background: none; border: 0; font-family: inherit; cursor: pointer;
}
.navlink svg { width: 22px; height: 22px; }
.navlink.active { color: var(--gold-deep); font-weight: 700; }
.navscan {
  justify-self: center; width: 62px; height: 62px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-grad); color: #fff; text-decoration: none;
  box-shadow: 0 6px 16px rgba(140,106,47,.4), 0 0 0 5px #fffcf6;
}
.navscan svg { width: 28px; height: 28px; }
.navscan:hover { filter: brightness(.95); }
.sidenav { display: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .topbar { grid-column: 1 / -1; padding: 14px 28px; }
  .who-text { display: block; }
  .brand img { height: 56px; }
  .bottomnav { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; border-right: 1px solid var(--line);
    background: #fffcf6; position: sticky; top: 63px; height: calc(100vh - 63px);
  }
  .sidenav .navlink { flex-direction: row; gap: 12px; font-size: .95rem; padding: 10px 12px; border-radius: var(--radius-sm); width: 100%; }
  .sidenav .navlink:hover { background: var(--paper); color: var(--ink); }
  .sidenav .navlink.active { background: var(--teal-soft); }
  .sidenav .scan-cta { margin: 4px 0 16px; }
  .sidenav form { margin-top: auto; }
  .main { padding: 32px 36px 48px; margin: 0; max-width: 1040px; width: 100%; }
}

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: 600 .95rem var(--font); cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--gold-grad); color: #fff; border-radius: 999px; letter-spacing: .02em; box-shadow: 0 2px 8px rgba(140,106,47,.25); }
.btn-primary:hover { filter: brightness(.95); }
.btn-outline { background: transparent; color: var(--gold-deep); border-color: var(--gold); border-radius: 999px; }
.btn-outline:hover { background: var(--teal-soft); }
.btn-ghost { background: none; color: var(--ink-2); min-height: 40px; padding: 0 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.input, textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 1rem var(--font); color: var(--ink); background: #fff;
}
.input:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(176,138,69,.18); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 18px; }
.field-error { color: var(--hot); font-size: .85rem; margin-top: 6px; }

/* ---------- Messages ---------- */
.msgs { display: grid; gap: 8px; margin-bottom: 16px; }
.msg { padding: 12px 14px; border-radius: var(--radius-sm); font-size: .9rem; background: var(--teal-soft); color: var(--ink); }
.msg.warning, .msg.error { background: var(--warm-bg); }
.msg.success { background: var(--ok-bg); }

/* ---------- Cards ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* ---------- Dashboard ---------- */
.greet { margin-bottom: 20px; }
.greet p { color: var(--ink-3); margin-top: 4px; }
.scan-hero {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--radius); text-decoration: none;
  background: var(--ink); color: #fff; margin-bottom: 16px; border: 1px solid #2d376a;
  background-image: radial-gradient(circle at 100% 0%, rgba(209,173,99,.22), transparent 55%);
}
.scan-hero .ic { width: 56px; height: 56px; border-radius: 50%; background: var(--gold-grad); color: #fff; display: grid; place-items: center; flex: none; }
.scan-hero .ic svg { width: 30px; height: 30px; }
.scan-hero strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: #f3e3bd; }
.scan-hero span { font-size: .88rem; color: #c3c7dc; }
.scan-hero .chev { margin-left: auto; width: 22px; height: 22px; }
.scan-hero:hover { background-color: #283166; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  text-decoration: none; color: var(--ink);
}
.stat:hover { border-color: #b9ccd2; }
.stat .k { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); }
.stat .k svg { width: 18px; height: 18px; }
.stat .v { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: var(--ink-3); }
.stat.total .k svg { color: var(--gold); }
.stat.hot .k svg { color: var(--hot); }
.stat.fav .k svg { color: var(--gold); }
.stat.fu .k svg { color: var(--cold); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.mix { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--paper); margin: 8px 0 12px; }
.mix span { display: block; height: 100%; }
.mix .h { background: var(--hot); } .mix .w { background: var(--warm); } .mix .c { background: var(--cold); } .mix .u { background: #ddd3c0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Lead rows ---------- */
.lead-list { list-style: none; margin: 0; padding: 0; }
.lead-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.lead-row:last-child { border-bottom: 0; }
.lead-row .body { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: grid; grid-template-columns: 48px minmax(0,1fr); column-gap: 12px; align-items: center; }
.lead-row .body > .avatar { grid-row: span 2; }
.lead-row .contact { display: none; }
.lead-row > .time { display: none; }
.lead-row .when { font-size: .75rem; color: var(--ink-3); align-self: center; }
.lead-row .txt { min-width: 0; flex: 1; }
.lead-row .name { font-weight: 700; }
.lead-row .co { font-size: .87rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-row .tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.lead-row .time { font-size: .78rem; color: var(--ink-3); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.star {
  background: none; border: 0; padding: 8px; cursor: pointer; color: #cbbfa8; border-radius: 50%; line-height: 0;
}
.star svg { width: 22px; height: 22px; }
.star[aria-pressed="true"] { color: var(--gold); }
.star[aria-pressed="true"] svg { fill: currentColor; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--paper); color: var(--ink-2); }
.tag.hot { background: var(--hot-bg); color: var(--hot); }
.tag.warm { background: var(--warm-bg); color: var(--warm); }
.tag.cold { background: var(--cold-bg); color: var(--cold); }
.tag.fu { background: var(--ok-bg); color: var(--ok); }
.tag.draft { background: transparent; border: 1px dashed #cdbd9c; color: var(--ink-3); }

/* ---------- Lead list page ---------- */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search .input { padding-left: 42px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236f8791' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: .87rem;
  color: var(--ink-2); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #f3e3bd; font-weight: 600; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; font-size: .9rem; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.empty .btn { margin-top: 16px; }

/* Desktop: table-like columns */
@media (min-width: 900px) {
  .lead-row { padding: 12px 8px; }
  .lead-row .tags { margin-top: 0; }
  .lead-row > .time { display: block; }
  .lead-row .when { display: none; }
  .lead-row .body { grid-template-columns: 48px minmax(0,1.4fr) minmax(0,1fr) 190px; }
  .lead-row .body > .avatar { grid-row: auto; }
  .lead-row .contact { display: block; font-size: .85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Scan page ---------- */
.scan-wrap { max-width: 520px; margin: 0 auto; }
.viewfinder {
  position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #161c3d; margin: 16px 0; border: 3px solid var(--gold-hi);
}
#reader { width: 100%; height: 100%; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.frame { position: absolute; inset: 14%; pointer-events: none; }
.frame::before, .frame::after, .frame span::before, .frame span::after {
  content: ""; position: absolute; width: 36px; height: 36px; border: 4px solid #fff;
}
.frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.frame::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.frame span::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.frame span::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scan-state {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; text-align: center; color: #fff; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.cam-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: #d7d9e8; }
.cam-off .btn { margin-top: 14px; }
.scan-result { display: none; }
.scan-result.show { display: block; }
.scan-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hint { font-size: .87rem; color: var(--ink-3); text-align: center; }
.success-flash { position: absolute; inset: 0; background: rgba(31,138,91,.35); opacity: 0; transition: opacity .2s; pointer-events: none; }
.success-flash.on { opacity: 1; }

/* ---------- Qualification ---------- */
.detail-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 340px 1fr; align-items: start; } .detail-grid .person { position: sticky; top: 96px; } }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: .9rem; margin-bottom: 12px; }
.back svg { width: 18px; height: 18px; }
.person-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.person-top h2 { font-size: 1.2rem; }
.person-top p { color: var(--ink-2); font-size: .9rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: center; font-size: .92rem; word-break: break-word; }
.facts svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.facts a { color: var(--ink); text-decoration: none; }
.facts a:hover { text-decoration: underline; }
.scanned-at { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; cursor: pointer;
  font-weight: 600; color: var(--ink-2); background: var(--card); border-right: 1px solid var(--line);
}
.seg label:last-of-type { border-right: 0; }
.seg label svg { width: 17px; height: 17px; }
.seg input:focus-visible + label { outline: 3px solid #d9bf85; outline-offset: -3px; }
.seg input[value="hot"]:checked + label { background: var(--hot); color: #fff; }
.seg input[value="warm"]:checked + label { background: var(--warm); color: #fff; }
.seg input[value="cold"]:checked + label { background: var(--cold); color: #fff; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.toggle-row label { margin: 0; }
.toggle-row small { display: block; font-weight: 400; color: var(--ink-3); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d8ccb4; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid #d9bf85; outline-offset: 2px; }

.savebar { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.savebar .btn { flex: 1; }
.autosave { font-size: .82rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; min-height: 20px; margin-top: 10px; }
.autosave .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.autosave.saving .dot { background: var(--warm); }
.autosave.err .dot { background: var(--hot); }
@media (max-width: 899px) {
  .savebar { position: sticky; bottom: calc(var(--nav-h) + 8px); background: var(--paper); padding: 8px 0; }
}

/* ---------- Success ---------- */
.done { max-width: 460px; margin: 0 auto; text-align: center; }
.tick { width: 84px; height: 84px; margin: 12px auto 16px; border-radius: 50%; background: var(--gold-grad); box-shadow: 0 0 0 6px #f3ead8, 0 0 0 7px var(--gold-hi); color: #fff; display: grid; place-items: center; }
.tick svg { width: 44px; height: 44px; }
.tick svg path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .15s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tick svg path { animation: none; stroke-dashoffset: 0; } }
.done .panel { text-align: left; margin: 20px 0; }
.done .actions { display: grid; gap: 10px; }

/* ---------- Auth: the palace arch ---------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, #fffaf0 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, #efe3cc 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, #efe3cc 0%, transparent 55%),
    var(--paper);
  color: var(--ink);
}
.auth-inner { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.arch { position: relative; padding: 110px 26px 30px; }
.arch > svg.arch-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.arch-fill { fill: #fffdf8; }
.arch-stroke { fill: none; stroke: var(--gold); stroke-width: 1.6; }
.arch-stroke.inner { stroke-width: .8; opacity: .6; }
.arch > * { position: relative; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { width: 230px; max-width: 80%; height: auto; }
.event-when { text-align: center; color: var(--ink); font-size: .95rem; line-height: 1.45; margin-bottom: 6px; }
.auth-title { text-align: center; font-family: var(--serif); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  color: var(--gold); font-size: 1.55rem; line-height: 1.15; margin: 10px 0 18px; }
.auth-card { color: var(--ink); }
.auth-card h1 { font-size: 1.25rem; color: var(--ink); }
.auth-card .lead { color: var(--ink-2); margin: 6px 0 18px; font-size: .92rem; }
.code-input { font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: .5em; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .88rem; }
.auth-foot form { margin: 0; }
.auth a { color: var(--gold-deep); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; cursor: pointer; text-decoration: underline; }
.notice { background: var(--warm-bg); color: #6b4414; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 16px; }
.auth .msgs { margin-bottom: 14px; }
.powered { text-align: center; margin-top: 20px; font-size: .8rem; color: var(--ink-3); }

/* ---------- Send leads ---------- */
.send-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .send-grid { grid-template-columns: 1fr 320px; align-items: start; } }
.scope-list { display: grid; gap: 8px; margin-bottom: 18px; }
.scope { position: relative; }
.scope input { position: absolute; opacity: 0; }
.scope label {
  display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 14px 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font-weight: 600;
}
.scope label span { font-family: var(--serif); font-size: 1.15rem; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.scope input:checked + label { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: #fdf7ea; }
.scope input:focus-visible + label { outline: 3px solid #d9bf85; outline-offset: 2px; }
.to-me { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--teal-soft); margin-bottom: 18px; font-size: .92rem; }
.to-me svg { width: 20px; height: 20px; color: var(--gold-deep); flex: none; }
.help { font-size: .82rem; color: var(--ink-3); margin-top: 6px; }
.send-actions { display: grid; gap: 10px; }
.history { list-style: none; margin: 0; padding: 0; font-size: .87rem; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history small { display: block; color: var(--ink-3); }

/* ---------- Lead card (view + captured) ---------- */
.lead-card .person-top .grow { flex: 1; min-width: 0; }
.lead-card .person-top .star { align-self: flex-start; margin: -6px -6px 0 0; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tag.lg { font-size: .85rem; padding: 6px 14px; }
.tag.lg svg { width: 15px; height: 15px; }
.tag.solid.hot { background: var(--hot); color: #fff; }
.tag.solid.warm { background: var(--warm); color: #fff; }
.tag.solid.cold { background: var(--cold); color: #fff; }
.tag.fav { background: var(--teal-soft); color: var(--gold-deep); }
.tag.fav svg { fill: currentColor; }
.done.view { text-align: left; }
.done.view .lead-card { margin: 4px 0 16px; }
.notes-panel { margin-bottom: 20px; }
.notes-panel .panel-head { margin-bottom: 8px; }
.notes-text { white-space: normal; line-height: 1.6; }
.edit-link { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--gold-deep); text-decoration: none; }
.edit-link svg { width: 16px; height: 16px; }
.edit-link:hover { text-decoration: underline; }
.row-arrow { display: grid; place-items: center; width: 32px; height: 40px; color: var(--ink-3); margin-right: -6px; }
.row-arrow svg { width: 20px; height: 20px; }
.lead-row:hover .row-arrow { color: var(--gold-deep); }
.lead-row .star { padding: 8px 4px; }

/* Celebration marks around the tick (one moment, respects reduced motion) */
.tick-wrap { position: relative; width: 140px; height: 120px; margin: 4px auto 8px; display: grid; place-items: center; }
.tick-wrap .tick { margin: 0; }
.spark { position: absolute; width: 12px; height: 4px; border-radius: 4px; background: var(--gold-hi); opacity: 0; animation: spark .5s .35s ease-out forwards; }
.spark.s1 { left: 12px; top: 40px; transform: rotate(20deg); }
.spark.s2 { left: 26px; top: 88px; transform: rotate(-35deg); background: var(--ink); }
.spark.s3 { left: 38px; top: 12px; transform: rotate(40deg); }
.spark.s4 { right: 14px; top: 44px; transform: rotate(-20deg); }
.spark.s5 { right: 26px; top: 90px; transform: rotate(35deg); }
.spark.s6 { right: 38px; top: 10px; transform: rotate(-45deg); background: var(--ink); }
@keyframes spark { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .spark { animation: none; opacity: 1; } }

/* Delegate photos */
img.avatar.photo { object-fit: cover; background: var(--teal-soft); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.lead-card .person-top img.avatar.photo, .person .person-top img.avatar.photo { width: 64px; height: 64px; }