/* ==========================================================================
   Sponsor Finder — Camino chemical colour code
   Every colour has ONE job. All colour references go through these variables;
   a hardcoded hex below :root is a defect.
   ========================================================================== */
:root {
  /* Canvas — carbon dark */
  --bg: #15171a;
  --surface: #1c1f23;
  --surface-2: #22262b;
  --border: #2a2e33;
  --text: #f2f4f5;
  --text-dim: #9aa3ab;

  /* Chemical colour code */
  --teal: #00ffd1;      /* system / brand ONLY */
  --green: #2ea35c;     /* go / action buttons ONLY */
  --green-ink: #0d2417; /* dark text on green */
  --orange: #f0993f;    /* progress ONLY */
  --gold: #e8c15a;      /* achievement / secured revenue ONLY */
  --red: #e24b4a;       /* urgency ONLY */

  /* Derived tints (still variable-driven) */
  --teal-soft: color-mix(in srgb, var(--teal) 10%, transparent);
  --teal-line: color-mix(in srgb, var(--teal) 35%, transparent);
  --green-soft: color-mix(in srgb, var(--green) 14%, transparent);
  --orange-soft: color-mix(in srgb, var(--orange) 14%, transparent);
  --gold-soft: color-mix(in srgb, var(--gold) 12%, transparent);
  --red-soft: color-mix(in srgb, var(--red) 12%, transparent);
  --shadow: 0 6px 24px color-mix(in srgb, var(--bg) 60%, transparent);

  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --touch: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .75rem; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .muted { color: var(--text-dim); }
[hidden] { display: none !important; }

/* ---------- Shell / top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; fill: var(--teal); flex: none; }
.brand-name { font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: 4px; }
.nav a {
  color: var(--text-dim); font-weight: 550; padding: 8px 12px;
  border-radius: var(--radius-sm); min-height: var(--touch);
  display: inline-flex; align-items: center;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.nav a.active { color: var(--teal); background: var(--teal-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.credits-pill {
  color: var(--teal); background: var(--teal-soft);
  border: 1px solid var(--teal-line);
  border-radius: 999px; padding: 4px 12px;
  font-size: .82rem; font-weight: 650; white-space: nowrap;
}
a.credits-pill:hover { background: var(--teal-line); text-decoration: none; }
.profile-menu { position: relative; }
@media (max-width: 560px) {
  .topbar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand-name { display: none; }
  .nav { margin-left: 0; }
  .nav a { padding: 8px 10px; }
  .credits-pill { padding: 4px 9px; font-size: .78rem; }
}
.profile-btn {
  width: var(--touch); height: var(--touch);
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.profile-btn svg { width: 22px; height: 22px; fill: var(--text-dim); }
.profile-btn:hover svg { fill: var(--text); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; z-index: 60;
}
.dropdown-name {
  padding: 12px 14px 8px; font-size: .85rem; color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dropdown-item {
  display: flex; align-items: center; width: 100%;
  padding: 12px 14px; min-height: var(--touch);
  background: none; border: none; cursor: pointer;
  color: var(--text); font: inherit; text-align: left;
}
.dropdown-item:hover { background: var(--surface); text-decoration: none; }

/* ---------- Layout ---------- */
.view { max-width: 960px; margin: 0 auto; padding: 20px 16px 72px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: .9rem; margin-bottom: 10px; min-height: 32px; }
.back-link:hover { color: var(--text); text-decoration: none; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.card + .card { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 620; cursor: pointer;
  transition: filter .12s ease, background .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn-ai { background: var(--teal-soft); border-color: var(--teal-line); color: var(--teal); }
.btn-quiet { background: none; border-color: transparent; color: var(--text-dim); }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; }

/* ---------- Forms ---------- */
label.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.field-label .req { color: var(--red); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
  width: 100%; min-height: var(--touch);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit;
  color-scheme: dark;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal-line);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.form-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.check {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--touch); cursor: pointer; margin-bottom: 14px;
}
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.hint { font-size: .82rem; color: var(--text-dim); margin-top: -8px; margin-bottom: 14px; }

.form-error {
  background: var(--red-soft); border: 1px solid var(--red);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: .9rem; margin-bottom: 14px;
}
.notice {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .9rem; color: var(--text-dim); margin-bottom: 14px;
}

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 6vh auto 0; padding: 0 4px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; }
.auth-brand svg { width: 40px; height: 40px; fill: var(--teal); }
.auth-brand span { font-size: 1.35rem; font-weight: 750; }
.auth-sub { text-align: center; color: var(--text-dim); margin: -12px 0 22px; font-size: .92rem; }
.tabs { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 18px; }
.tabs button {
  flex: 1; min-height: 40px; border: none; border-radius: 6px;
  background: none; color: var(--text-dim); font: inherit; font-weight: 620; cursor: pointer;
}
.tabs button.active { background: var(--surface-2); color: var(--text); }

/* ---------- Wizard (onboarding) ---------- */
.wizard-steps { display: flex; justify-content: space-between; gap: 6px; margin: 4px 0 8px; }
.wizard-steps span { font-size: .78rem; color: var(--text-dim); }
.wizard-steps .on { color: var(--text); font-weight: 650; }
.progress-track {
  height: 6px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; margin-bottom: 22px;
}
.progress-fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width .25s ease; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.summary-list { list-style: none; margin: 0 0 16px; padding: 0; }
.summary-list li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .92rem;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list .k { color: var(--text-dim); flex: none; }
.summary-list .v { text-align: right; word-break: break-word; }

/* ---------- Dashboard ---------- */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
@media (min-width: 768px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.metric .m-label { font-size: .8rem; color: var(--text-dim); font-weight: 600; }
.metric .m-value { font-size: 1.55rem; font-weight: 750; margin-top: 2px; line-height: 1.2; }
.metric .m-sub { font-size: .78rem; color: var(--text-dim); margin-top: 2px; }
.metric.gold .m-value { color: var(--gold); }
.metric.alert { border-color: var(--red); }
.metric.alert .m-value { color: var(--red); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); border-radius: 999px;
  min-height: 38px; padding: 6px 16px; font: inherit; font-size: .88rem;
  font-weight: 600; cursor: pointer;
}
.chip.active { background: var(--surface-2); color: var(--text); border-color: var(--text-dim); }

.lead-list { display: grid; gap: 10px; }
@media (min-width: 768px) { .lead-list { grid-template-columns: 1fr 1fr; } }
.lead-card {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.lead-card:hover { border-color: var(--text-dim); text-decoration: none; }
.lead-card .lc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lead-card .lc-name { font-weight: 680; }
.lead-card .lc-sector { font-size: .82rem; color: var(--text-dim); margin-top: 2px; }
.lead-card .lc-next { font-size: .82rem; color: var(--text-dim); margin-top: 8px; }
.lead-card .lc-next.overdue { color: var(--red); font-weight: 650; }
.lead-card .lc-value { color: var(--gold); font-weight: 700; font-size: .88rem; margin-top: 6px; }

.badge {
  flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 999px; padding: 3px 10px;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.secured { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }
.badge.lost { opacity: .6; }

.empty {
  text-align: center; padding: 44px 16px; color: var(--text-dim);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty .btn { margin-top: 14px; }

/* ---------- Pipeline board (staged kanban) ---------- */
/* Mobile-first: stages stacked vertically. The page body never scrolls
   sideways; only the desktop board's own container scrolls horizontally. */
/* Kanban on every screen: all stages are columns you swipe across, so the
   whole pipeline (To Contact → … → Not Now) is always present and scannable
   instead of tall cards burying the later stages. The board scrolls sideways
   on its own; `contain: paint` stops that scroll reaching the page root. */
.board {
  display: flex; flex-direction: row; gap: 12px;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 10px;
  scroll-snap-type: x proximity; align-items: flex-start;
  contain: paint;
}
.stage-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  flex: 0 0 82vw; max-width: 340px; scroll-snap-align: start;
  max-height: calc(100vh - 240px); display: flex; flex-direction: column;
}
.stage-col.won { border-color: color-mix(in srgb, var(--gold) 40%, var(--border)); }
.col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.col-name { font-weight: 700; font-size: .92rem; }
.col-count {
  flex: none; min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text-dim); font-size: .74rem; font-weight: 700;
}
.stage-col.won .col-count { color: var(--gold); border-color: var(--gold); }
.col-total { margin-left: auto; color: var(--gold); font-weight: 750; font-size: .9rem; }
.col-cards { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; flex: 1 1 auto; overflow-y: auto; }
.col-empty {
  text-align: center; color: var(--text-dim); font-size: .84rem;
  padding: 14px 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.col-empty::before { content: "— "; }

.board-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer;
  transition: border-color .12s ease;
}
.board-card:hover { border-color: var(--text-dim); }
.board-card .bc-name { font-weight: 680; font-size: .95rem; }
.board-card .bc-sector { font-size: .8rem; color: var(--text-dim); margin-top: 2px; }
.board-card .bc-value { color: var(--gold); font-weight: 700; font-size: .86rem; margin-top: 6px; }
.board-card .bc-next { font-size: .8rem; color: var(--text-dim); margin-top: 8px; }
.board-card .bc-next.overdue { color: var(--red); font-weight: 650; }
.bc-actions { margin-top: 10px; }
.bc-actions .btn { width: 100%; }
.card-move select { min-height: var(--touch); font-size: .86rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Desktop: let all 7 stage columns share the width so the whole pipeline is
   visible at once (they only scroll sideways if the viewport is very narrow). */
@media (min-width: 900px) {
  /* Columns share the width so all 7 stages fit within the reading column at
     once (they grow comfortably on wider screens). */
  .stage-col {
    flex: 1 1 0; min-width: 128px; max-width: none;
    max-height: calc(100vh - 220px);
  }
  .col-head { padding: 10px 10px; }
  .col-cards { padding: 10px; }
  .board-card { padding: 10px; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; } }
.modal {
  width: 100%; max-width: 520px; max-height: 90vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0; padding: 20px;
}
@media (min-width: 640px) { .modal { border-radius: var(--radius); } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

/* ---------- Search ---------- */
.result-list { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 768px) { .result-list { grid-template-columns: 1fr 1fr; } }
.result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rc-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rc-name { font-weight: 680; }
.rc-dist { flex: none; font-size: .8rem; color: var(--text-dim); white-space: nowrap; }
.rc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--text-dim); align-items: center; }
.quality-dots { display: inline-flex; gap: 3px; align-items: center; }
.quality-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.quality-dots i.on { background: var(--teal); border-color: var(--teal); }
.rc-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; align-items: center; }
.rc-actions { margin-top: auto; padding-top: 4px; }
.rc-added { color: var(--green); font-weight: 650; display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--green); min-height: var(--touch); }
.range-val { min-width: 64px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

/* skeletons */
.skel { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); padding: 14px 16px; }
.skel .bar { height: 12px; border-radius: 6px; background: var(--surface-2); margin: 8px 0; position: relative; overflow: hidden; }
.skel .bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
.skel .bar.w60 { width: 60%; } .skel .bar.w40 { width: 40%; } .skel .bar.w80 { width: 80%; }
@keyframes shimmer { from { transform: translateX(-100%);} to { transform: translateX(100%);} }

/* ---------- Outreach ---------- */
.stagebar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 6px; }
.stagebar .seg { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.stagebar .seg.done { background: var(--orange); border-color: var(--orange); }
.stagebar-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; }
.stagebar-labels span { font-size: .72rem; color: var(--text-dim); text-align: center; }
.stagebar-labels span.on { color: var(--orange); font-weight: 700; }

.stage { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stage > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; min-height: var(--touch); font-weight: 650;
}
.stage > summary::-webkit-details-marker { display: none; }
.stage-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 750;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}
.stage.done .stage-num { background: var(--orange); color: var(--bg); border-color: var(--orange); }
.stage.locked { opacity: .55; }
.stage-state { margin-left: auto; font-size: .78rem; color: var(--text-dim); font-weight: 600; }
.stage.done .stage-state { color: var(--orange); }
.stage-body { padding: 4px 16px 18px; border-top: 1px solid var(--border); }

.link-grid { display: grid; gap: 8px; grid-template-columns: 1fr; margin: 10px 0 14px; }
@media (min-width: 640px) { .link-grid { grid-template-columns: 1fr 1fr; } }
.research-link {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; min-height: var(--touch);
}
.research-link:hover { border-color: var(--teal-line); text-decoration: none; }
.research-link b { color: var(--text); font-weight: 640; font-size: .92rem; }
.research-link small { color: var(--text-dim); }

.contact-found { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; font-size: .92rem; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 10px 0 14px; }
.kv-grid .kv b { display: block; font-size: .78rem; color: var(--text-dim); font-weight: 600; }
.kv-grid .kv span { font-size: .95rem; }

.msg-panel { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--bg); margin-top: 12px; }
.msg-panel.ai { border-color: var(--teal-line); box-shadow: 0 0 0 3px var(--teal-soft); }
.msg-panel .mp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .82rem; color: var(--text-dim); }
.msg-panel.ai .mp-head b { color: var(--teal); }
.gen-row { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 10px; }
@media (min-width: 640px) { .gen-row { grid-template-columns: 1fr 1fr; } }

.status-row { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 6px; }
@media (min-width: 640px) { .status-row { grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; } }
.value-secured input { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.secured-line { color: var(--gold); font-weight: 750; }

.objection-script { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: .92rem; margin-top: 10px; }
.script-q { padding: 10px 0; border-bottom: 1px solid var(--border); }
.script-q:last-child { border-bottom: none; }
.script-q b { display: block; }
.script-q ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-dim); font-size: .88rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 200; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 20px; font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}
.toast.err { border-color: var(--red); }

/* ---------- Utility ---------- */
.gold-text { color: var(--gold); font-weight: 750; }
.red-text { color: var(--red); font-weight: 650; }
.spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--text);
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; }
.mt { margin-top: 14px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* --- Admin log viewer (#/admin/logs) --- */
.log-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.log-row { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.log-row.log-error { border-left: 3px solid var(--red); }
.log-row.log-warn { border-left: 3px solid var(--orange); }
.log-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 4px; }
.log-error .log-level { color: var(--red); font-weight: 600; }
.log-warn .log-level { color: var(--orange); font-weight: 600; }
.log-msg { margin: 0; font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }

/* --- Discovery script bookends (spoken intro + close) --- */
.script-bookend { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; }
.script-bookend.close { border-left-color: var(--green); margin: 16px 0 4px; }
.script-bookend p { margin: 0; }
.script-bookend .script-label { display: block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
.script-bookend.close .script-label { color: var(--green); }
.script-bookend ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-dim); font-size: .9rem; }
