/* Evidence Sales — hand-rolled, no framework. Dark is the default theme. */

:root {
  --bg: #0b0c0f;
  --surface: #14161c;
  --surface-2: #1a1d24;
  --text: #e9ebee;
  --muted: #9aa1ab;
  --border: #262a33;
  --accent: #35d399;
  --accent-ink: #062b1d;
  --bad: #ff7b72;
  --good: #35d399;
  --warn: #e3b341;
  --info: #58a6ff;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-h: 4rem;
}

:root[data-theme="light"] {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --text: #191c22;
  --muted: #5c6470;
  --border: #e2ded6;
  --accent: #0c8f63;
  --accent-ink: #ffffff;
  --bad: #c62f2f;
  --good: #0c8f63;
  --warn: #b7791f;
  --info: #0b6bcb;
  --shadow: 0 24px 60px rgba(25, 28, 34, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}

.wordmark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.wordmark:hover { text-decoration: none; }
.wordmark .accent { color: var(--accent); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); }
:root[data-theme="dark"] .theme-toggle-light { display: none; }
:root[data-theme="light"] .theme-toggle-dark { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

.link-cta {
  background: none;
  border: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  padding: 0.85rem 0.25rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  gap: 3rem;
  padding-block: 4rem 5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; padding-block: 6rem 7rem; }
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.subhead {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ---------- pipeline mock ---------- */

.pipeline-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.halluc-rate {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.halluc-label { color: var(--muted); font-weight: 600; }
.halluc-value {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bad);
}

.table-scroll { overflow-x: auto; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  min-width: 480px;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
thead th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tr.row-link { cursor: pointer; }
tr.row-link:hover th, tr.row-link:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.derived-bad { color: var(--bad); }
.derived-good { color: var(--good); }
.gap-bad { color: var(--bad); font-weight: 700; }
.gap-zero { color: var(--good); font-weight: 700; }

.pipeline-mock figcaption {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- sections ---------- */

.section {
  padding-block: 4.5rem;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.beats {
  display: grid;
  gap: 1.25rem;
  max-width: 44em;
  color: var(--muted);
}
.beats p { font-size: 1.05rem; }

.law, .mirror-caption, .positioning, .sandbox-line {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 2.5rem;
  max-width: 22em;
}
.law { color: var(--accent); }

/* ---------- mirror ---------- */

.mirror {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 760px) {
  .mirror { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
}
.card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.card-fiction h3 { color: var(--muted); }
.card-evidence { border-color: var(--accent); }
.card-evidence h3 { color: var(--accent); }

.card dl div {
  display: grid;
  grid-template-columns: 8.5em 1fr;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.card dl div:last-child { border-bottom: 0; }
.card dt { color: var(--muted); font-size: 0.9rem; }
.card dd { font-weight: 600; }

.mirror-caption { margin-top: 2rem; }

/* ---------- steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}
.steps h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.steps p { color: var(--muted); font-size: 0.95rem; }

/* ---------- manifesto ---------- */

.manifesto-intro { color: var(--muted); max-width: 40em; margin-bottom: 2rem; }

.principles {
  list-style: none;
  counter-reset: principle;
  display: grid;
  gap: 0;
  max-width: 46em;
}
.principles li {
  counter-increment: principle;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.principles li::before {
  content: counter(principle);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- forms ---------- */

.capture-form { margin-top: 2.5rem; max-width: 46em; }
.capture-label { font-weight: 700; margin-bottom: 0.75rem; }

.capture-fields {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .capture-fields { grid-template-columns: 1fr 1.4fr auto; }
}

input[type="text"], input[type="email"] {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  width: 100%;
}
input:focus-visible, .btn:focus-visible, .link-cta:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-feedback { margin-top: 0.6rem; font-size: 0.9rem; min-height: 1.4em; }
.form-feedback.error { color: var(--bad); }
.form-feedback.success { color: var(--good); font-weight: 600; }

/* ---------- sandbox ---------- */

.section-sandbox { text-align: left; }
.section-sandbox > p { color: var(--muted); max-width: 44em; }
.section-sandbox .btn { margin-top: 2rem; }
.sandbox-line { color: var(--accent); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
}
.status-dot {
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.3em;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(26rem, 100%);
  padding: 2rem;
}
.modal h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.modal-sub { color: var(--muted); margin-bottom: 1.5rem; }
.modal label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem;
}
.modal .btn-block { margin-top: 1.5rem; }

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }

/* ---------- admin & app ---------- */

.admin { padding-block: 3rem; }
.admin h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.admin h2 { margin-top: 3rem; font-size: 1.4rem; }
.admin-count { color: var(--muted); font-weight: 400; }
.admin .table-scroll {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 1rem;
}

.app-hold { display: block; text-align: left; padding-block: 6rem; }
.app-hold .subhead { margin-bottom: 2rem; }

/* ---------- product (/app) ---------- */

.header-right { display: flex; align-items: center; gap: 1rem; }
.app-nav { display: flex; align-items: center; gap: 1rem; font-weight: 600; font-size: 0.95rem; }
.app-nav a { color: var(--text); }
.app-nav a:hover { color: var(--accent); text-decoration: none; }
.inline-form { display: inline; }
.nav-logout { padding: 0; text-decoration: none; color: var(--muted); }
.nav-logout:hover { color: var(--text); }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 { margin-bottom: 0; }
.narrow { max-width: 42rem; }
.subhead-sm { color: var(--muted); margin-bottom: 1.5rem; max-width: 38em; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); filter: none; }

.badge-sample {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.1rem 0.55rem;
  vertical-align: middle;
}

.sample-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.sample-banner p { color: var(--muted); max-width: 42em; }
.sample-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 760px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-halluc .stat-value { color: var(--bad); font-size: 2rem; }
.stat-good { color: var(--good); }
.stat-bad { color: var(--bad); }

.deal-sub {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}
.deal-sub-h1 { color: var(--muted); font-weight: 400; }
.table-note { color: var(--muted); font-size: 0.85rem; margin-top: 0.75rem; max-width: 50em; }

.principle-callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  max-width: 50em;
}

.deal-layout { margin-top: 1rem; }
.deal-main { min-width: 0; }
.deal-main > section + section { margin-top: 2.5rem; }
.deal-page h2 { font-size: 1.3rem; margin-bottom: 1rem; }
/* The sticky jump-bar and the site header both sit above anchored sections —
   push jump targets clear of both so a jumped-to card lands in view, not under
   the bar. (header ~3.6rem + bar ~2.4rem + breathing room.) */
.ladder-stage, .milestone-card, #history { scroll-margin-top: 10.25rem; }

.section-help { color: var(--muted); font-size: 0.9rem; margin: -0.5rem 0 1rem; max-width: 46em; }
.section-help strong { color: var(--text); }

/* Stage rail — a horizontal jump-nav that sits under the metrics and above the
   items. It sticks below the site header on scroll so a rep can jump to any
   stage's card to see its proof or what's still missing. */
.stage-rail-scroll {
  position: sticky;
  /* Sits a touch below the header height so the bar's own background always
     underlaps the sticky header — no page content leaks through, whatever the
     header's height (it grows when the nav wraps on narrow screens). The extra
     top padding keeps the dots clear of the tallest (wrapped) header. */
  top: var(--header-h);
  z-index: 5;
  margin: 0 0 1.75rem;
  padding: 0.7rem 0 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stage-rail {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.25rem;
  align-items: start;
}
.rail-step { position: relative; }
.rail-step > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}
.rail-step > a:hover { background: var(--surface); color: var(--text); }
/* connector segment bridging each dot to the next */
.rail-step:not(:last-child) > a::before {
  content: "";
  position: absolute;
  top: calc(0.4rem + 5px);
  right: -0.25rem;
  width: 0.5rem;
  height: 2px;
  background: var(--border);
}
.rail-done > a::before { background: var(--accent); }
.rail-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  z-index: 1;
  background: var(--surface-2);
  border: 2px solid var(--border);
}
.rail-done .rail-dot { background: var(--accent); border-color: var(--accent); }
.rail-current .rail-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.rail-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rail-current > a .rail-label { color: var(--text); }
.rail-flag, .rail-next-chip {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
}
.rail-flag { color: var(--muted); border: 1px solid var(--border); }
.rail-claimed-ahead .rail-flag { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }
.rail-claimed-ahead .rail-dot { border-color: var(--bad); }
.rail-next-chip { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border)); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.rail-qualified-out .rail-dot { background: var(--surface-2); border-color: var(--border); box-shadow: none; }
.rail-qualified-out .rail-step > a::before { background: var(--border); }
.rail-history { margin-left: 0.1rem; padding-left: 0.35rem; border-left: 1px solid var(--border); }
.rail-history > a::before { display: none; }
/* scroll-spy highlight (progressive enhancement from app.js) */
.rail-active > a { background: var(--surface); color: var(--text); }
.rail-active > a .rail-label { color: var(--text); }
/* pulled up under the sticky bar's bottom margin so the note hugs it */
.rail-note { font-size: 0.85rem; margin: -1.25rem 0 1.5rem; padding-left: 0.2rem; }
.rail-note-terminal { color: var(--good); font-weight: 600; }
.rail-note-blocked { color: var(--bad); }

/* Top overview — key facts + completed (with dates) + next step + Copy for CRM */
.deal-overview {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.overview-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.overview-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.75rem 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
/* Proof-gate progress — bar + Not started / In progress / Completed tiles */
.progress-summary { margin: 0 0 1.1rem; }
.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.progress-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.progress-count { font-size: 0.9rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--good);
  transition: width 0.3s ease;
}
.progress-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.ptile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
}
.ptile-num { font-size: 1.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ptile-todo { color: var(--info); }
.ptile-next { color: var(--warn); }
.ptile-done { color: var(--good); }
.ptile-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.overview-cols { display: grid; gap: 1.25rem; }
@media (min-width: 560px) {
  .overview-cols { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
.overview-col-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.overview-done { list-style: none; display: grid; gap: 0.15rem; }
.done-summary {
  display: grid;
  grid-template-columns: 1.1rem 1fr auto;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
  padding: 0.2rem 0.3rem;
}
.done-summary::-webkit-details-marker { display: none; }
.done-summary:hover { background: var(--surface-2); }
.done-item[open] > .done-summary { background: var(--surface-2); }
.overview-done-label { min-width: 0; }
.overview-done-label::after {
  content: "▸";
  margin-left: 0.4rem;
  font-size: 0.7em;
  color: var(--muted);
}
.done-item[open] .overview-done-label::after { content: "▾"; }
.done-evidence {
  margin: 0.25rem 0 0.5rem 1.6rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.done-ev-action { color: var(--good); margin-top: 0.2rem; }
.overview-empty { color: var(--muted); font-size: 0.9rem; }
.overview-next {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.overview-next-hint { color: var(--muted); font-size: 0.85rem; }

/* Status banner — qualified out / stalled, shown with its evidence */
.overview-status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0.9rem 0 0.25rem;
  border: 1px solid var(--border);
}
.status-badge {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-title { font-weight: 700; font-size: 0.95rem; line-height: 1.4; }
.status-evidence { color: var(--muted); font-size: 0.88rem; margin-top: 0.25rem; }
.status-ev-key { font-weight: 700; color: var(--text); }
.status-stalled {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}
.status-stalled .status-badge { color: var(--accent-ink); background: var(--warn); }
.status-stalled .status-title { color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.status-closed {
  border-color: color-mix(in srgb, var(--good) 50%, var(--border));
  background: color-mix(in srgb, var(--good) 9%, var(--surface));
}
.status-closed .status-badge { color: var(--accent-ink); background: var(--good); }

.summary-mark { font-weight: 800; color: var(--muted); }
.summary-mark-done { color: var(--good); }
.summary-mark-next { color: var(--accent); }
.summary-key {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-right: 0.35rem;
}
.summary-when { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.copy-btn.copied {
  border-color: color-mix(in srgb, var(--good) 55%, var(--border));
  color: var(--good);
}
/* Hidden off-screen but still selectable for the execCommand copy fallback */
.crm-text {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  white-space: pre;
}

.gate-count { font-size: 0.8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

/* "Do this next" — the one clear action, up top */
.do-next {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}
.do-next-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.do-next-title { font-size: 1.1rem; font-weight: 700; }
.do-next-hint { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0.5rem; }
.do-next-lock { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }
.do-next-closed { border-color: var(--border); background: var(--surface); }
.do-next-closed .do-next-title { font-size: 1rem; font-weight: 600; color: var(--muted); }

/* Compact progress ladder — completed stages collapse to one line */
.ladder { list-style: none; display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.ladder-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
}
.ladder-stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.ladder-stage-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 700;
}
.ladder-stage-done { border-color: color-mix(in srgb, var(--good) 35%, var(--border)); }
.ladder-stage-done .ladder-stage-name { color: var(--text); }
.gate-count-done { color: var(--good); }

.gate-log { margin-top: 0.5rem; }
.gate-log summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}
.gate-log summary::-webkit-details-marker { display: none; }
.gate-log summary::before { content: "+ "; }
.gate-log[open] summary::before { content: "\2212\00a0"; }
.gate-log-open { margin-top: 0.75rem; }
.gate-log-form { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.gate-log-form label { font-size: 0.8rem; font-weight: 600; margin-top: 0.4rem; }
.gate-log-form .btn { margin-top: 0.75rem; justify-self: start; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }
.qualify-out {
  border: 1px dashed color-mix(in srgb, var(--good) 40%, var(--border));
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}
.qualify-out summary { color: var(--good); }

.next-chip {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}
/* Numbered proof-gate steps — each a card with a numbered badge + status pill */
.step-list { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.step {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.step-done .step-num { background: var(--good); color: var(--accent-ink); border-color: var(--good); }
.step-next .step-num { background: var(--warn); color: #1a1400; border-color: var(--warn); }
.step-todo .step-num { color: var(--info); border-color: color-mix(in srgb, var(--info) 55%, var(--border)); }
.step-next {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: color-mix(in srgb, var(--warn) 7%, var(--bg));
}
.step-body { min-width: 0; }
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.step-name { font-weight: 700; font-size: 0.95rem; }
.step-detail { color: var(--muted); font-size: 0.85rem; margin-top: 0.15rem; }
.step-date { white-space: nowrap; }
.step-pill {
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--border);
  color: var(--muted);
}
.step-pill-done { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--border)); background: color-mix(in srgb, var(--good) 12%, transparent); }
.step-pill-next { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.step-pill-todo { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, var(--border)); background: color-mix(in srgb, var(--info) 12%, transparent); }
.step-pill-current { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Prospect / Discovery milestone cards — no proof gate, just a status */
.milestone-card { background: var(--surface); scroll-margin-top: 1rem; }
.step-current .step-num { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.step-current { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }

/* "How to complete this" — suggested next step + concrete options */
.step-play {
  margin-top: 0.6rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.step-play-label {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.step-play-step { font-size: 0.88rem; font-weight: 600; }
.step-play-options {
  list-style: none;
  display: grid;
  gap: 0.2rem;
  margin-top: 0.4rem;
}
.step-play-options li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.83rem;
  color: var(--muted);
}
.step-play-options li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Per-step actions — Log/Update proof form (status is set in the header) */
.step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
}
.step-actions .gate-log { margin-top: 0; }

/* Status dropdown — pill-shaped select, coloured by the chosen status */
.gate-status-form { margin: 0; flex: 0 0 auto; }
.gate-status-select {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 1.7rem 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background-color: transparent;
  /* custom chevron so both themes match */
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.6rem;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.gate-status-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate-status-select option { color: var(--text); background: var(--surface); }
.gsel-todo {
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 50%, var(--border));
  background-color: color-mix(in srgb, var(--info) 12%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%2358a6ff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}
.gsel-next {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 55%, var(--border));
  background-color: color-mix(in srgb, var(--warn) 14%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23e3b341' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}

.evidence-log { list-style: none; display: grid; gap: 0.4rem; margin-bottom: 2rem; }
.evidence-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
}
.evidence-gate { border-left: 3px solid var(--accent); }
.evidence-activity { border-left: 3px solid var(--border); }
.evidence-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.evidence-type { font-weight: 700; font-size: 0.85rem; }
.evidence-activity .evidence-type { color: var(--muted); }
.evidence-date { color: var(--muted); font-size: 0.8rem; }
.evidence-action { color: var(--good); font-size: 0.85rem; margin-top: 0.3rem; }
.empty-note { color: var(--muted); margin-bottom: 1.5rem; }

.evidence-form, .stacked-form { display: grid; gap: 0.35rem; margin-bottom: 2rem; }
.evidence-form h3 { margin-bottom: 0.5rem; }
.evidence-form label, .stacked-form label, .claimed-form label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.6rem;
}
.evidence-form .btn, .stacked-form .btn { margin-top: 1rem; justify-self: start; }

select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  width: 100%;
}
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.claimed-form { margin-bottom: 2rem; }
.claimed-row { display: flex; gap: 0.6rem; margin-top: 0.35rem; }
.claimed-row select { flex: 1; }

.paywall-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.paywall-note p { color: var(--muted); margin-bottom: 1rem; }

.plain-list { list-style: disc; padding-left: 1.25rem; color: var(--muted); display: grid; gap: 0.4rem; margin-bottom: 1.75rem; }

/* ---------- brand & media kit ---------- */

.media { padding-block: 3rem 4rem; }

.media-hero { max-width: 46rem; margin-bottom: 2.5rem; }
.media-hero h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  letter-spacing: -0.03em;
  margin: 0.4rem 0 0.8rem;
}
.media-hero .lead { color: var(--muted); font-size: 1.1rem; }

.media-section { margin-top: 3rem; }
.media-section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
}
.media-note {
  color: var(--muted);
  max-width: 46rem;
  margin-bottom: 1.5rem;
}
.media-note .accent { color: var(--accent); }

.asset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.asset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}
/* Logos are drawn on ink; keep that backdrop in both themes so they read true. */
.asset-dark { background: #0b0c0f; }
.asset img { display: block; height: auto; max-width: 100%; }
.asset figcaption {
  color: #9aa1ab;
  font-size: 0.85rem;
  text-align: center;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}
.asset figcaption a { font-weight: 600; }
.favicon-grid .asset { align-items: center; justify-content: flex-end; }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.swatch {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.swatch-chip {
  padding: 1.4rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.swatch figcaption {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.swatch-hex {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85rem;
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.2em 0.55em;
  cursor: pointer;
}
.swatch-hex:hover { border-color: var(--accent); }
.swatch-hex.is-copied { color: var(--accent); border-color: var(--accent); }
.swatch-role { color: var(--muted); font-size: 0.85rem; }

/* ---------- pricing (/pricing) ---------- */
.pricing { padding-block: 4rem 5rem; }
.pricing-head { text-align: center; max-width: 40em; margin: 0 auto 3rem; }
.pricing-head h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pricing-head p { color: var(--muted); margin-top: 1rem; font-size: 1.1rem; }

.tiers { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, 1fr); } }

.tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}
.tier-featured { border-color: var(--accent); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .tier-featured { transform: translateY(-0.5rem); }
}
.tier-flag {
  align-self: flex-start;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.tier-name { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 0; }
.tier-price { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.tier-amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; }
.tier-unit { color: var(--muted); font-size: 0.9rem; }
.tier-tagline { color: var(--muted); }
.tier-features { list-style: none; display: grid; gap: 0.6rem; margin: 0.25rem 0; }
.tier-features li { position: relative; padding-left: 1.5rem; font-size: 0.95rem; }
.tier-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
}
.tier .btn { margin-top: auto; }
.tier-note { color: var(--muted); font-size: 0.82rem; }
.pricing-foot { text-align: center; color: var(--muted); margin-top: 2.5rem; }

/* ---------- auth landing (/signin) ---------- */
.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 4rem 5rem;
}
.auth-card {
  width: min(26rem, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
}
.auth-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.auth-actions { display: grid; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.auth-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.g-mark {
  display: inline-grid;
  place-items: center;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.9rem;
}
.auth-switch { color: var(--muted); font-size: 0.95rem; text-align: center; }
.auth-divider { border: 0; border-top: 1px solid var(--border); margin: 1.75rem 0; }
.auth-sso-title { font-weight: 700; margin-bottom: 0.35rem; }
.auth-sso-body { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.auth-note {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.auth-foot { margin-top: 1.5rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { transition: none; }
}
