/* TendAI Revenue Capture — RoofLeads Pilot Concept
   Design tokens mirror the existing TendAI interface. */

:root {
  --navy: #112638;
  --blue: #146ef5;
  --blue-dark: #0f57c6;
  --muted: #617181;
  --border: #dfe6eb;
  --green: #159b61;
  --page: #edf2f5;
  --secondary: #f2f6f8;
  --card: #ffffff;
  --light-blue: #f4f8ff;
  --success-bg: #f0faf5;
  --warning-bg: #fff8e8;
  --amber: #a56a00;
  --red: #b4342b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 38, 56, .04), 0 10px 28px -20px rgba(17, 38, 56, .22);
  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--page);
  color: var(--navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.22; }
p { margin: 0; }
button { font-family: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--card); color: var(--navy); padding: 12px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 1 auto; min-width: 0; }
.brand-logo {
  width: 42px; height: 42px; flex: 0 0 auto;
  object-fit: contain; display: block;
}
.brand-logo-sm { width: 30px; height: 30px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16.5px; letter-spacing: -.02em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .01em; }

.nav-desktop { display: flex; gap: 2px; margin-left: 10px; }
.nav-link {
  border: 0; background: none; cursor: pointer;
  padding: 8px 13px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); white-space: nowrap;
}
.nav-link:hover { background: var(--secondary); color: var(--navy); }
.nav-link.is-active { background: var(--light-blue); color: var(--blue); font-weight: bold; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.pill {
  font-size: 10px; letter-spacing: .09em; font-weight: bold;
  padding: 5px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--secondary); color: var(--muted);
  white-space: nowrap;
}
.pill-blue { background: var(--light-blue); border-color: #d7e6ff; color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  cursor: pointer; border-radius: 11px; font-size: 14px;
  padding: 11px 17px; border: 1px solid transparent;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}
.btn-primary { background: var(--blue); color: #fff; font-weight: bold; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--navy); }
.btn-ghost:hover { background: var(--secondary); }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-demo { padding: 8px 12px; font-size: 13px; }

/* ---------- views ---------- */
main { padding: 30px 0 40px; }
.view { display: none; }
.view.is-active { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .view.is-active { animation: none; } }

.hero { max-width: 700px; margin-bottom: 28px; }
.hero-tight { margin-bottom: 22px; }
.hero-wide { max-width: 860px; margin-bottom: 24px; }
.eyebrow {
  font-size: 11px; font-weight: bold; letter-spacing: .12em;
  color: var(--blue); margin-bottom: 10px;
}
.hero h1 { font-size: 34px; margin-bottom: 12px; }
.lede { font-size: 16px; color: var(--muted); max-width: 62ch; }
.disclosure { margin-top: 12px; font-size: 12px; color: var(--muted); }
.disclosure-strip {
  margin-top: 18px; display: inline-block;
  font-size: 12px; color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px 14px;
}
.corelines { margin-top: 20px; display: flex; flex-direction: column; gap: 5px; }
.coreline { font-size: 15.5px; font-weight: bold; color: var(--navy); }
.secondline { font-size: 13.5px; color: var(--muted); }

.section-title { font-size: 12.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin: 30px 0 14px; }

/* ---------- statements ---------- */
.statement {
  background: var(--light-blue); border: 1px solid #d7e6ff;
  border-left: 3px solid var(--blue); border-radius: 14px;
  padding: 16px 18px; color: var(--navy);
  font-size: 16.5px; font-weight: bold; line-height: 1.4; letter-spacing: -.01em;
}
.statement-block { margin-top: 18px; }
.statement-label {
  display: block; font-size: 10.5px; font-weight: bold;
  letter-spacing: .12em; color: var(--blue); margin-bottom: 7px;
}
.statement-sub {
  display: block; margin-top: 8px; max-width: 72ch;
  font-size: 13.5px; font-weight: normal; color: var(--muted); line-height: 1.5;
}

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.card-head h2 { font-size: 17px; }
.card-note { margin-top: 16px; font-size: 12px; color: var(--muted); }
.table-card .card-note { padding: 0 14px; }
.card-note.strong { color: var(--navy); font-size: 13px; line-height: 1.55; }

.tag {
  font-size: 10px; letter-spacing: .09em; font-weight: bold;
  color: var(--muted); background: var(--secondary);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 9px; white-space: nowrap; flex: 0 0 auto;
}
.tag-warn { background: var(--warning-bg); border-color: #f2e2bd; color: var(--amber); }
.tag-blue { background: var(--light-blue); border-color: #d7e6ff; color: var(--blue); }

/* ---------- overview layout ---------- */
.overview-grid { display: grid; gap: 18px; align-items: start; }
.metrics-col .section-title { margin-top: 24px; }

/* ---------- why the closed loop matters ---------- */
.why-card { margin-top: 18px; }
.why-grid { display: grid; gap: 18px; align-items: start; }
.why-copy p { font-size: 14.5px; color: var(--muted); max-width: 54ch; }
.why-copy p + p { margin-top: 10px; }
.tick-list {
  list-style: none; margin: 0; padding: 16px 18px;
  display: grid; gap: 9px; align-content: start;
  background: var(--light-blue); border: 1px solid #d7e6ff; border-radius: 16px;
}
.tick-list li { position: relative; padding-left: 20px; font-size: 14.5px; color: var(--navy); }
.tick-list li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}
.why-foot { margin-top: 16px; font-size: 14.5px; color: var(--muted); max-width: 74ch; }
.why-card .statement { margin-top: 18px; }

/* ---------- funnel ---------- */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.funnel li { display: grid; grid-template-columns: 112px 1fr 46px; align-items: center; gap: 14px; }
.funnel-label { font-size: 13px; color: var(--muted); }
.funnel-track { background: var(--secondary); border-radius: 9px; height: 34px; position: relative; overflow: hidden; }
.funnel-fill {
  height: 100%; border-radius: 9px;
  background: var(--blue); display: flex; align-items: center;
  padding-left: 12px; min-width: 54px;
}
.funnel li:last-child .funnel-fill { background: var(--green); }
.funnel-value { color: #fff; font-weight: bold; font-size: 14px; }
.funnel-rate { font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi-value { font-size: 27px; font-weight: bold; letter-spacing: -.03em; }
.kpi-label { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.kpi-success { background: var(--success-bg); border-color: #cdeedd; }
.kpi-success .kpi-value { color: var(--green); }
.kpi-warn { background: var(--warning-bg); border-color: #f2e2bd; }
.kpi-warn .kpi-value { color: var(--amber); }

/* ---------- snapshot ---------- */
.snapshot { margin-top: 20px; padding: 0; overflow: hidden; border-color: #cfdbe4; }
.snapshot-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 26px 26px 22px; background: var(--light-blue); border-bottom: 1px solid var(--border);
}
.snapshot-head h2 { font-size: 24px; }
.snapshot-lede { margin-top: 8px; font-size: 15px; color: var(--muted); }
.snapshot-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.snapshot-item { padding: 22px 26px; border-right: 1px solid var(--border); }
.snapshot-item:last-child { border-right: 0; }
.snapshot-value { display: block; font-size: 30px; font-weight: bold; letter-spacing: -.03em; }
.snapshot-label { font-size: 12.5px; color: var(--muted); }
.snapshot-foot { padding: 20px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.snapshot-foot-note { font-size: 13px; color: var(--muted); max-width: 54ch; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  cursor: pointer; background: var(--card); border: 1px solid var(--border);
  color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px;
}
.chip:hover { background: var(--secondary); color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: bold; }

/* ---------- lead table ---------- */
.table-card { padding: 8px 8px 16px; }
.lead-head, .lead-row {
  display: grid;
  grid-template-columns: 1.35fr .95fr .75fr .6fr .85fr .8fr 1.25fr .7fr;
  gap: 10px; align-items: center;
}
.lead-head {
  padding: 12px 14px 10px; font-size: 10.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border);
}
.lead-list { display: flex; flex-direction: column; }
.lead-row {
  width: 100%; text-align: left; cursor: pointer; background: none;
  border: 0; border-bottom: 1px solid var(--border);
  padding: 15px 14px; font-size: 13.5px; color: var(--navy); border-radius: 12px;
}
.lead-row:last-child { border-bottom: 0; }
.lead-row:hover { background: var(--light-blue); }
.lead-name { font-weight: bold; display: block; }
.lead-sub { display: none; font-size: 12px; color: var(--muted); }
.lead-cell { color: var(--muted); min-width: 0; overflow-wrap: break-word; }
.lead-cell.is-dark { color: var(--navy); }
.lbl-short { display: none; }
.score { font-weight: bold; color: var(--navy); }
.empty { padding: 34px 14px; text-align: center; color: var(--muted); font-size: 14px; }

.badge {
  display: inline-block; font-size: 11px; font-weight: bold;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--secondary); color: var(--muted); white-space: nowrap;
}
.badge-high { background: #fdf0ef; border-color: #f5d5d2; color: var(--red); }
.badge-med { background: var(--warning-bg); border-color: #f2e2bd; color: var(--amber); }
.badge-low { background: var(--light-blue); border-color: #d7e6ff; color: var(--blue); }
.badge-won { background: var(--success-bg); border-color: #cdeedd; color: var(--green); }
.badge-stage { background: var(--card); color: var(--navy); border-color: var(--border); }

/* ---------- leakage ---------- */
.leak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.leak-card {
  cursor: pointer; text-align: left; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.leak-card:hover { border-color: #b9cfe8; }
.leak-card.is-active { border-color: var(--blue); background: var(--light-blue); box-shadow: 0 0 0 1px var(--blue) inset, var(--shadow); }
.leak-key { font-size: 11px; font-weight: bold; letter-spacing: .1em; color: var(--muted); }
.leak-card.is-active .leak-key { color: var(--blue); }
.leak-count { font-size: 26px; font-weight: bold; letter-spacing: -.03em; }
.leak-count span { font-size: 13px; font-weight: normal; color: var(--muted); letter-spacing: 0; }
.leak-value { font-size: 13px; color: var(--muted); }
.pilot-note { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); max-width: 88ch; line-height: 1.55; }

.leak-list { display: flex; flex-direction: column; gap: 12px; }
.leak-item {
  border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; background: var(--card); cursor: pointer; text-align: left; width: 100%;
}
.leak-item:hover { background: var(--light-blue); }
.leak-item-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.leak-item-name { font-weight: bold; font-size: 15px; }
.leak-item-meta { font-size: 12.5px; color: var(--muted); }
.leak-item-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.mini-label { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.mini-value { font-size: 13.5px; color: var(--navy); }

/* ---------- outcome intelligence ---------- */
.question-card { background: var(--navy); border-color: var(--navy); padding: 24px 26px; }
.question-card .tag-blue { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #bcd6ff; }
.question { color: #fff; font-size: 20px; font-weight: bold; letter-spacing: -.02em; margin-top: 14px; max-width: 46ch; line-height: 1.35; }
.concept-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.concept-list li { position: relative; padding-left: 20px; font-size: 15px; color: #e4ecf7; }
.concept-list li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: #5f9bfa;
}
.question-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 12.5px; color: #a9bed3; max-width: 78ch; line-height: 1.55;
}

.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.insight-grid + .card { margin-top: 18px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bars li { display: grid; gap: 6px; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.bar-top strong { font-weight: bold; }
.bar-top span { color: var(--muted); font-size: 12.5px; }
.bar-track { background: var(--secondary); border-radius: 7px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 7px; background: var(--blue); }
.bars li:nth-child(2) .bar-fill { background: #5f9bfa; }
.bars li:nth-child(3) .bar-fill { background: #a9c7f7; }

.attr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attr-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.attr-num {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  background: var(--light-blue); color: var(--blue);
  display: grid; place-items: center; font-size: 12px; font-weight: bold;
}

/* ---------- closed loop ---------- */
.loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.loop li { display: grid; gap: 10px; }
.loop-node {
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px;
  background: var(--secondary);
}
.loop li:first-child .loop-node,
.loop li:last-child .loop-node { background: var(--light-blue); border-color: #d7e6ff; }
.loop li:nth-child(4) .loop-node { background: var(--success-bg); border-color: #cdeedd; }
.loop-title { font-size: 11px; font-weight: bold; letter-spacing: .1em; color: var(--navy); }
.loop-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.loop-arrow { display: grid; place-items: center; color: #b3c2ce; }
.loop-copy { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.loop-copy h3 { font-size: 19px; margin-bottom: 10px; }
.loop-copy p { font-size: 14.5px; color: var(--muted); max-width: 72ch; }
.loop-copy p + p { margin-top: 10px; }
.loop-copy strong { color: var(--navy); }
.loop-copy .card-note { margin-top: 12px; }

/* ---------- pilot thesis ---------- */
.thesis { margin-top: 30px; }
.thesis-head { margin-bottom: 16px; }
.thesis-head h2 { font-size: 24px; max-width: 44ch; }
.pilot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pilot-card { display: flex; flex-direction: column; gap: 9px; }
.pilot-step {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  background: var(--light-blue); color: var(--blue);
  display: grid; place-items: center; font-size: 13px; font-weight: bold;
}
.pilot-card .eyebrow { margin-bottom: 0; }
.pilot-card p:last-child { font-size: 14.5px; color: var(--muted); }

/* ---------- final CTA ---------- */
.cta-card { margin-top: 26px; background: var(--light-blue); border-color: #d7e6ff; padding: 26px; }
.cta-card h2 { font-size: 24px; margin-bottom: 12px; }
.cta-copy { font-size: 15.5px; color: var(--navy); max-width: 64ch; line-height: 1.5; }
.cta-copy + .cta-copy { margin-top: 10px; }
.flowline {
  margin: 20px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px;
}
.flowline span { font-size: 13.5px; font-weight: bold; }
.flowline i { font-style: normal; color: var(--blue); }
.cta-card .disclosure { margin-top: 16px; }

/* ---------- modals ---------- */
.modal {
  border: 0; padding: 0; background: transparent;
  width: min(560px, calc(100% - 28px)); max-height: 88vh;
  margin: auto; color: var(--navy);
}
.modal-wide { width: min(720px, calc(100% - 28px)); }
.modal::backdrop { background: rgba(17, 38, 56, .46); backdrop-filter: blur(2px); }
.modal-inner {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; position: relative; max-height: 88vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-inner h2 { font-size: 21px; padding-right: 34px; }
.modal-lede { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--card);
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.modal-close:hover { background: var(--secondary); color: var(--navy); }
.modal-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.modal-progress { font-size: 12px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; margin-left: auto; }

.demo-step { margin-top: 20px; display: flex; gap: 14px; align-items: flex-start; background: var(--secondary); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.demo-num { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: bold; font-size: 14px; }
.demo-text { font-size: 16px; line-height: 1.45; }
.demo-step.is-final { background: var(--light-blue); border-color: #d7e6ff; }
.demo-step.is-final .demo-text { white-space: pre-line; font-weight: bold; font-size: 17px; letter-spacing: -.01em; }
.modal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.modal-brand .eyebrow { margin-bottom: 0; }
.demo-dots { display: flex; gap: 6px; margin-top: 14px; }
.demo-dots i { width: 22px; height: 4px; border-radius: 3px; background: var(--border); }
.demo-dots i.on { background: var(--blue); }

#pilotForm { display: grid; gap: 13px; margin-top: 20px; }
#pilotForm label { display: grid; gap: 6px; font-size: 12.5px; font-weight: bold; color: var(--navy); }
#pilotForm input, #pilotForm select, #pilotForm textarea {
  font-family: inherit; font-size: 15px; font-weight: normal; color: var(--navy);
  padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); width: 100%; resize: vertical;
}
#pilotForm input:focus, #pilotForm select:focus, #pilotForm textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(20, 110, 245, .12); }
.form-note { margin-top: 12px; font-size: 13px; color: var(--green); background: var(--success-bg); border: 1px solid #cdeedd; border-radius: var(--radius-sm); padding: 12px; display: none; }
.form-note.show { display: block; }
.form-note.is-static {
  display: block; color: var(--muted); background: var(--secondary);
  border-color: var(--border); font-size: 12px;
}

/* ---------- lead detail ---------- */
.detail-head { padding-right: 34px; }
.detail-head h2 { font-size: 24px; }
.detail-market { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 20px; }
.detail-stat { border: 1px solid var(--border); border-radius: 14px; padding: 13px; background: var(--secondary); }
.detail-sub { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 24px 0 14px; font-weight: bold; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding-bottom: 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--blue);
}
.timeline li.is-alert::before { border-color: var(--amber); background: var(--amber); }
.timeline li.is-won::before { border-color: var(--green); background: var(--green); }
.tl-time { font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tl-text { font-size: 14.5px; }
.timeline li.is-alert .tl-text { color: var(--amber); font-weight: bold; }

.signal { margin-top: 22px; border: 1px solid #f2e2bd; background: var(--warning-bg); border-radius: 16px; padding: 18px; }
.signal-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.signal-head strong { font-size: 12px; letter-spacing: .1em; color: var(--amber); }
.signal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }
.signal-body { font-size: 15px; line-height: 1.45; }
.signal-rec { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f2e2bd; }
.signal-rec span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); font-weight: bold; margin-bottom: 6px; }
.signal-rec p { font-size: 14.5px; line-height: 1.45; }
.signal.is-won { background: var(--success-bg); border-color: #cdeedd; }
.signal.is-won .signal-head strong, .signal.is-won .signal-rec span { color: var(--green); }
.signal.is-won .signal-dot { background: var(--green); }
.signal.is-won .signal-rec { border-top-color: #cdeedd; }
.detail-note { margin-top: 18px; font-size: 12px; color: var(--muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--card); padding: 24px 0 32px; margin-top: 30px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer p { font-size: 13px; }
.footer .disclosure { max-width: 84ch; margin-top: 10px; line-height: 1.55; }

/* ---------- mobile nav ---------- */
.nav-mobile { display: none; }

/* ================= RESPONSIVE ================= */
@media (min-width: 981px) {
  .loop { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; }
  .loop li { display: contents; }
  .loop-node { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 104px; padding: 16px 18px; }
  .loop-arrow { transform: rotate(-90deg); }

  main { padding: 36px 0 52px; }
  .topbar-inner { padding: 11px 20px; gap: 22px; }
  .nav-desktop { margin-left: 16px; }
  .hero h1 { font-size: 36px; }
  .overview-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 20px; }
  .metrics-col .section-title { margin-top: 0; }
  .why-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 26px; }
  .concept-list { grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .card { padding: 24px; }
  .card + .card { margin-top: 20px; }
}

/* keep the product nav bar on one line on narrower desktops */
@media (min-width: 981px) and (max-width: 1119px) {
  .topbar-inner { gap: 12px; }
  .nav-desktop { margin-left: 6px; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .pill { font-size: 9.5px; padding: 5px 8px; }
  .btn-demo { padding: 8px 10px; }
}

@media (max-width: 980px) {
  .nav-desktop { display: none; }
  main { padding: 30px 0 100px; }
  .nav-mobile {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px);
  }
  .mnav {
    border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 2px; font-size: 10.5px; color: var(--muted); border-radius: 10px;
    min-height: 48px;
  }
  .mnav svg { width: 21px; height: 21px; }
  .mnav.is-active { color: var(--blue); font-weight: bold; }
  .nav-mobile { max-width: 620px; margin: 0 auto; border-radius: 18px 18px 0 0; border: 1px solid var(--border); border-bottom: 0; }
  .hero h1 { font-size: 28px; }
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
  .snapshot-item:nth-child(2) { border-right: 0; }
  .snapshot-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .insight-grid { grid-template-columns: 1fr; }
  .thesis-head h2, .cta-card h2 { font-size: 22px; }

  .lead-head { display: none; }
  .lead-list { gap: 12px; padding-top: 8px; }
  .lead-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  }
  .lead-row:last-child { border-bottom: 1px solid var(--border); }
  .lead-name-cell { grid-column: 1 / -1; }
  .lead-sub { display: block; margin-top: 2px; }
  .lead-cell-market, .lead-cell-received { display: none; }
  .lead-cell-next { grid-column: 1 / -1; order: 2; }
  .lead-cell[data-label]::before {
    content: attr(data-label);
    display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px;
  }
}

@media (max-width: 760px) {
  main { padding: 22px 0 96px; }
  .nav-mobile { max-width: none; margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  .wrap { padding: 0 16px; }
  .topbar-inner { padding: 8px 16px; gap: 10px; }
  .brand { gap: 9px; }
  .brand-logo { width: 34px; height: 34px; }
  .brand-logo-sm { width: 26px; height: 26px; }
  .btn-demo { padding: 8px 11px; }
  .pill-blue { display: none; }
  .hero h1 { font-size: 25px; }
  .lede { font-size: 15px; }
  .disclosure-strip { margin-top: 16px; padding: 8px 12px; line-height: 1.5; }
  .card { padding: 18px; border-radius: 18px; }
  .card-head { flex-wrap: wrap; }
  .statement { font-size: 15.5px; padding: 15px 16px; border-radius: 16px; }
  .thesis { margin-top: 24px; }
  .thesis-head h2, .cta-card h2 { font-size: 20px; }
  .cta-card { padding: 20px 18px; }
  .cta-copy { font-size: 15px; }
  .flowline { gap: 8px; padding: 13px 14px; }
  .flowline span { font-size: 13px; }
  .question-card { padding: 20px 18px; }
  .footer { padding: 22px 0 28px; }
  .snapshot-head { padding: 20px 18px 18px; }
  .snapshot-head h2 { font-size: 21px; }
  .snapshot-item { padding: 16px 18px; }
  .snapshot-value { font-size: 25px; }
  .snapshot-foot { padding: 18px; }
  .snapshot-foot .btn { width: 100%; }
  .funnel li { grid-template-columns: 84px 1fr 40px; gap: 9px; }
  .funnel-label { font-size: 12px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 23px; }
  .question { font-size: 18px; }
  .concept-list li { font-size: 14.5px; }
  .filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; margin: 0 -16px 16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 9px 15px; }
  .cta-card .btn { width: 100%; }
  .modal-inner { padding: 22px 18px; }
  .modal-inner h2 { font-size: 19px; }
  .detail-head h2 { font-size: 21px; }
  .modal-actions { width: 100%; }
  .modal-actions .btn { flex: 1; }
  .table-card { padding: 8px 8px 14px; }

}

@media (max-width: 430px) {
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .brand-text small { font-size: 10px; }
}

@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .lead-row { grid-template-columns: 1fr; }
}
