/* Aqxle Commerce Graph · PCMag laptop audit */
:root {
  --navy: #122F5B;
  --navy-deep: #0B1F3F;
  --cyan: #23AFD3;
  --cyan-dk: #1A8AAA;
  --cream: #FAF6EE;
  --paper: #FFFFFF;
  --mint: #2BB082;
  --mint-dark: #0E7A52;
  --terra: #C84545;
  --terra-dk: #A33333;
  --gold: #D4A24C;
  --text: #1F2937;
  --muted: #7A8B9C;
  --line: #E5DCC9;
  --line-strong: #C9BFA8;
  --line-cool: #DDE5EC;
  --card-bg: #FFFFFF;
  --card-shadow: 0 1px 0 rgba(10,25,41,0.04), 0 10px 28px -16px rgba(10,25,41,0.18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-width: 1280px; }

/* Top bar */
.topbar {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  gap: 24px;
}
.topbar-left { display: flex; gap: 22px; align-items: flex-end; }
.logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
  padding-bottom: 4px;
}
.logo img { display: block; height: 28px; width: auto; }
.logo:hover { opacity: 0.85; }
.title-block { max-width: 1100px; }
.kicker {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  color: var(--cyan-dk); text-transform: uppercase; font-weight: 600;
  display: block;
}
.eyebrow {
  display: inline-block; margin-top: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--navy); text-transform: uppercase; font-weight: 700;
  padding: 3px 9px 2px;
  background: rgba(35, 175, 211, 0.18);
  border: 1px solid rgba(18, 47, 91, 0.18);
  border-radius: 3px;
}
.title {
  margin: 6px 0 0 0;
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.25;
}
.topbar-right { display: flex; gap: 24px; flex-shrink: 0; }
.topstat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.topstat .num { font-size: 16px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.topstat .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* Tab nav */
.tabnav {
  display: flex;
  gap: 4px;
  padding: 10px 28px 0;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.tabnav a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  transition: color 0.12s, border-color 0.12s;
}
.tabnav a:hover { color: var(--navy); }
.tabnav a.tab-active { color: var(--navy); border-bottom-color: var(--cyan); }

/* Intro */
.intro {
  max-width: 1180px;
  margin: 16px 28px 6px;
  font-size: 13px; line-height: 1.55; color: #3a4756;
}

/* TL;DR strip — 2-row grid (stats on top, label + jump on bottom) */
.tldr {
  margin: 10px 28px 14px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "stat1 stat2 stat3"
    "label label  jump";
  column-gap: 22px;
  row-gap: 12px;
  background: linear-gradient(90deg, rgba(35,175,211,0.10), rgba(18,47,91,0.04));
  border: 1px solid rgba(18,47,91,0.16);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
}
.tldr-stat:nth-of-type(1) { grid-area: stat1; }
.tldr-stat:nth-of-type(2) { grid-area: stat2; }
.tldr-stat:nth-of-type(3) { grid-area: stat3; }
.tldr-label { grid-area: label; align-self: center; }
.tldr-jump  { grid-area: jump;  justify-self: end; align-self: center; }

.tldr-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--navy); text-transform: uppercase;
  padding-top: 8px; border-top: 1px solid rgba(18,47,91,0.18);
}
.tldr-stat { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tldr-num {
  font-size: 22px; font-weight: 700; color: var(--navy);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  flex-shrink: 0;
}
.tldr-lbl { font-size: 12px; color: #3a4756; line-height: 1.35; }
.tldr-jump {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--cyan-dk); text-decoration: none;
  text-transform: uppercase;
  padding: 6px 10px; border: 1px solid rgba(35,175,211,0.5); border-radius: 3px;
  transition: background 0.15s;
}
.tldr-jump:hover { background: rgba(35,175,211,0.15); }

/* Narrow screens — stack stats vertically */
@media (max-width: 900px) {
  .tldr {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "stat1"
      "stat2"
      "stat3"
      "jump";
  }
  .tldr-label { padding-top: 0; border-top: none; padding-bottom: 4px; }
  .tldr-jump  { justify-self: start; }
}

/* Flow board — 7 columns */
.flow {
  padding: 14px 28px 36px;
  display: grid;
  grid-template-columns: 0.65fr 0.8fr 1fr 0.95fr 1.1fr 1fr 0.9fr;
  gap: 14px;
  align-items: start;
}

.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.col-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff;
  font-family: var(--mono); font-weight: 600; font-size: 11px;
  flex-shrink: 0;
}
.col-title { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--navy); text-transform: uppercase; font-weight: 600; }
.col-note { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* Cards (generic) */
.card, .bucket, .net, .ret, .resolve-card, .brand, .advisory-card, .rev-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--card-shadow);
}

/* Col 1: Source */
.card-source { border-top: 3px solid var(--navy); padding: 14px 14px 16px; }
.card-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.card-big { font-size: 22px; font-weight: 700; color: var(--navy); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.card-sub { font-size: 12px; color: var(--text); margin-top: 2px; }
.card-meta { font-size: 11px; color: var(--muted); margin-top: 8px; font-family: var(--mono); }

/* Col 2: Link Type */
.bucket-affiliate { border-left: 3px solid var(--cyan); }
.bucket-direct    { border-left: 3px solid var(--mint); }
.bucket-other     { border-left: 3px solid var(--line-strong); opacity: 0.86; }
.bucket-pct { font-size: 18px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.bucket-name { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 2px; }
.bucket-count { font-size: 11px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }

/* Col 3: Networks */
.net { padding: 10px 12px; }
.net-primary { border-left: 3px solid var(--cyan); background: #F5FBFC; }
.net-quiet { opacity: 0.78; }
.net-pct { font-size: 13px; font-weight: 700; color: var(--cyan-dk); font-family: var(--mono); }
.net-primary .net-pct { color: var(--cyan-dk); }
.net-name { font-size: 12.5px; font-weight: 600; color: var(--text); margin-top: 2px; line-height: 1.3; }
.net-count { font-size: 10.5px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }
.net-divider {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase; padding: 12px 4px 4px;
}
.ret { padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.ret-name { font-size: 12px; color: var(--text); font-family: var(--mono); }
.ret-count { font-size: 12px; color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Col 4: Resolved */
.resolve-card { padding: 14px 16px 16px; border-top: 3px solid var(--cyan); }
.resolve-head { font-size: 12.5px; font-weight: 700; color: var(--navy); }
.resolve-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.resolve-list { width: 100%; margin-top: 10px; }
.resolve-row {
  padding: 6px 0 7px;
  border-bottom: 1px dashed var(--line);
}
.resolve-row:last-child { border-bottom: none; }
.resolve-card-name { font-size: 11px; color: var(--text); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resolve-dest { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.resolve-domain { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: break-word; }
.resolve-pct { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--navy); white-space: nowrap; flex-shrink: 0; }
.resolve-row--highlight .resolve-card-name,
.resolve-row--highlight .resolve-domain,
.resolve-row--highlight .resolve-pct { color: var(--cyan-dk); }
.resolve-note {
  margin-top: 12px; padding: 10px 12px;
  background: #FDF8EC; border: 1px solid #EEDEB1; border-radius: 8px;
  font-size: 11.5px; line-height: 1.5; color: #6E5A2B;
}

/* Col 5: Brand benchmark */
.brand { padding: 11px 13px 13px; }
.brand-leader { border-left: 3px solid var(--mint); }
.brand-laggard { border-left: 3px solid var(--terra); }
.brand-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand-name { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.brand-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 999px;
  font-weight: 600;
}
.tag-roundup { background: #E5F5EE; color: var(--mint-dark); border: 1px solid #BFE7D4; }
.tag-noroundup { background: #FCEAEA; color: var(--terra-dk); border: 1px solid #F0C2C2; }
.brand-meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }
.brand-routes { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.route { display: grid; grid-template-columns: 1fr 60px 36px; gap: 8px; align-items: center; font-size: 11.5px; }
.route-name { color: var(--text); }
.route-bar { background: #F0EAD9; height: 6px; border-radius: 3px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--mint); width: var(--w); border-radius: 3px; }
.bar-warn { background: var(--terra); }
.bar-mute { background: var(--muted); opacity: 0.4; }
.bar-mint { background: var(--mint); }
.route-pct { font-family: var(--mono); color: var(--navy); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Col 6: Advisory */
.advisory-card { padding: 14px 16px; border-top: 3px solid var(--navy); }
.adv-head { font-size: 12.5px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.adv-list { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 8px; }
.adv-list li { font-size: 12px; line-height: 1.5; color: var(--text); }
.adv-list b { color: var(--navy); }

/* Col 7: Revenue */
.rev-card { padding: 14px 16px; border-top: 3px solid var(--gold); }
.rev-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.rev-big { font-size: 28px; font-weight: 700; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.rev-sub { font-size: 11.5px; color: var(--text); margin-top: 2px; }
.rev-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rev-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; align-items: center; font-size: 11.5px; }
.rev-row span:first-child { color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; }
.rev-bar { background: #F0EAD9; height: 8px; border-radius: 4px; overflow: hidden; }
.rev-scope { margin-top: 12px; padding: 10px 12px; background: #FFF5E6; border: 1px solid #F0DEB8; border-radius: 8px; font-size: 10.5px; line-height: 1.5; color: #6E5A2B; }
.rev-scope b { color: var(--navy); }

/* Takeaway */
.takeaway {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 28px 40px;
}
.take-head { max-width: 1000px; margin-bottom: 26px; }
.take-head h2 { margin: 8px 0 0; font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: -0.015em; line-height: 1.25; }
.take-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
.take-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 22px 24px;
}
.take-num { font-size: 38px; font-weight: 700; color: var(--cyan-dk); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.take-lbl { font-size: 13px; font-weight: 600; color: var(--navy); margin-top: 8px; line-height: 1.35; }
.take-take { font-size: 12.5px; color: #3a4756; margin-top: 10px; line-height: 1.55; }

/* CTA */
.cta {
  padding: 40px 28px;
  background: var(--navy);
  color: #fff;
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: 36px;
  align-items: center;
  max-width: 1400px;
}
.cta .kicker { color: var(--cyan); }
.cta-text h2 { margin: 8px 0 8px; font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -0.015em; }
.cta-text p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #C4D2E4; max-width: 720px; }
.cta-btn {
  display: inline-flex; align-items: center;
  background: var(--cyan); color: var(--navy-deep);
  padding: 14px 22px; border-radius: 8px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  border: 1px solid var(--cyan);
  transition: background 120ms, transform 120ms;
}
.cta-btn:hover { background: #fff; transform: translateY(-1px); }
.cta-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.cta-alt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: #C4D2E4;
}
.cta-alt a { color: var(--cyan); text-decoration: none; font-weight: 600; }
.cta-alt a:hover { color: #fff; }

/* Footer */
.foot {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 28px 24px;
  background: var(--cream);
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
  font-family: var(--mono);
  gap: 24px;
}
.foot-left { max-width: 1100px; display: flex; flex-direction: column; gap: 10px; }
.foot-disclaimer {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--navy);
  font-weight: 600;
  text-transform: uppercase;
}
.foot-method { line-height: 1.55; }
.foot-brand { color: var(--navy); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; flex-shrink: 0; padding-top: 2px; }
.foot-brand:hover { color: var(--cyan-dk); }

/* Brand case study — MAC vs NARS */
.case {
  padding: 44px 56px 40px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.case-head { max-width: 900px; margin-bottom: 22px; }
.case-head h2 {
  margin: 8px 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.case-lede {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #3a4756;
  max-width: 780px;
}
.case-fig {
  margin: 0 0 24px;
  padding: 0;
  background: #FAF9F6;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.case-fig img {
  display: block;
  width: 100%;
  height: auto;
}
.case-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.case-note {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  border-top: 3px solid var(--gold);
}
.case-note-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin-bottom: 6px;
  line-height: 1.35;
}
.case-note-b {
  font-size: 12.5px;
  color: #3a4756;
  line-height: 1.55;
}
.case-note:has(.case-caveat) {
  grid-column: 1 / -1;
  border-top-color: #C5C1B8;
  background: #FFF9EE;
  border-color: #F0DEB8;
}
.case-caveat { color: #6E5A2B; }
.case-caveat b { color: var(--navy); }
@media (max-width: 900px) {
  .case { padding: 32px 24px; }
  .case-notes { grid-template-columns: 1fr; }
}

/* ============================================================
   FUNNEL SECTION (interactive React island)
   ============================================================ */
.funnel-section {
  padding: 72px 40px 80px;
  background: #F0E7D2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.funnel-section .kicker { margin-bottom: 8px; }
.funnel-section h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.funnel-section .funnel-lede {
  font-size: 15px;
  color: var(--muted);
  max-width: 780px;
  margin: 0 0 32px;
  line-height: 1.55;
}

.funnel-app {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,27,45,0.04);
}

/* Controls bar */
.funnel-controls {
  padding: 20px 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.funnel-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.funnel-controls-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 100px;
}
.funnel-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  --chip-color: #1A365D;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--chip-color);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--chip-color);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.chip:hover { transform: translateY(-1px); }
.chip-on {
  background: var(--chip-color);
  color: #FFFFFF;
}
.chip-off { opacity: 0.55; }
.chip-off:hover { opacity: 0.85; }
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chip-color);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--chip-color);
}
.chip-on .chip-dot {
  background: #FFFFFF;
  border-color: var(--chip-color);
  box-shadow: 0 0 0 1px #FFFFFF;
}
.chip-reset {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  margin-left: 8px;
}
.chip-reset:hover:not(:disabled) { border-color: var(--navy); color: var(--navy); }
.chip-reset:disabled { opacity: 0.35; cursor: not-allowed; }

/* Mode selector */
.mode-seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}
.mode-btn {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s;
}
.mode-btn:last-child { border-right: none; }
.mode-btn:hover { background: #F0E7D2; }
.mode-btn-on {
  background: var(--navy);
  color: #FFFFFF;
}
.mode-btn-on:hover { background: var(--navy); }

/* Body */
.funnel-body { padding: 32px 24px; }

/* Funnel view */
.funnel-grid { display: flex; flex-direction: column; gap: 18px; }
.funnel-col-labels {
  display: grid;
  grid-template-columns: 180px 1fr 200px 1fr 130px;
  align-items: end;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.funnel-col-lbl { text-align: center; }
.funnel-col-lbl-left { grid-column: 2; text-align: right; }
.funnel-col-lbl-mid { grid-column: 3; }
.funnel-col-lbl-right { grid-column: 4; text-align: left; }
.funnel-col-head {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
}
.funnel-col-sub {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}
.funnel-row {
  display: grid;
  grid-template-columns: 180px 1fr 200px 1fr 130px;
  align-items: center;
  gap: 0;
  min-height: 56px;
}
.funnel-name { text-align: right; padding-right: 20px; }
.funnel-name-t { font-weight: 700; font-size: 14px; color: var(--navy); }
.funnel-name-s { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.funnel-bar-left, .funnel-bar-right { position: relative; }
.funnel-bar-track { position: relative; height: 44px; }
.funnel-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.funnel-bar-fill-left {
  margin-left: auto;
  justify-content: flex-end;
  padding-right: 12px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.funnel-bar-fill-right {
  justify-content: flex-start;
  padding-left: 12px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.funnel-bar-val {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.funnel-bar-sub {
  font-size: 10.5px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 4px;
  padding-left: 4px;
}
.funnel-idx {
  text-align: center;
  padding: 0 12px;
}
.funnel-idx-num {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.funnel-idx-delta {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 4px;
  font-family: var(--mono);
}
.idx-over { color: var(--mint-dark); }
.idx-under { color: var(--terra-dk); }
.funnel-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* Index view (deviation bar chart) */
.idx-view { padding: 12px 0; }
.idx-legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--muted);
}
.idx-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.idx-legend-swatch {
  width: 14px; height: 14px; border-radius: 2px;
  display: inline-block;
}
.idx-legend-over { background: var(--mint-dark); }
.idx-legend-under { background: var(--terra-dk); }
.idx-chart {
  max-width: 900px;
  margin: 0 auto;
}
.idx-axis {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  padding: 0 0 6px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--line-strong);
}
.idx-axis-tick {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.idx-axis-tick-neg  { grid-column: 2; justify-self: start; }
.idx-axis-zero      { grid-column: 2; justify-self: center; color: var(--navy); }
.idx-axis-tick-pos  { grid-column: 2; justify-self: end; }
.idx-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  min-height: 40px;
  gap: 12px;
}
.idx-name {
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
}
.idx-track {
  position: relative;
  height: 28px;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
}
.idx-track-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
  z-index: 2;
}
.idx-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.idx-bar-pos { justify-content: flex-end; padding-right: 8px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.idx-bar-neg { justify-content: flex-start; padding-left: 8px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.idx-bar-val {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.idx-delta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: left;
}

/* Compare view */
.compare-view { padding: 8px 0; }
.compare-picker {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  justify-content: center;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--cream);
  border-radius: 4px;
}
.compare-picker-col { display: flex; flex-direction: column; gap: 6px; }
.compare-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}
.compare-select {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  min-width: 220px;
}
.compare-select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.compare-vs {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 10px;
}
.compare-cards {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  gap: 0;
  margin-bottom: 8px;
}
.compare-card {
  padding: 14px 20px;
  border-top: 3px solid var(--navy);
  background: var(--cream);
  text-align: center;
}
.compare-card-headers { background: transparent; border-top: none; }
.compare-card-name {
  font-weight: 700;
  font-size: 15px;
}
.compare-rows {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  border-bottom: 1px solid var(--line);
}
.compare-row:last-child { border-bottom: none; }
.compare-row-hi { background: var(--cream); }
.compare-cell {
  padding: 14px 20px;
  font-size: 14px;
  color: var(--navy);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.compare-cell-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: var(--cream);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.compare-row-hi .compare-cell-lbl { background: #F0E7D2; }
.compare-cell-a { text-align: right; padding-right: 32px; font-weight: 600; }
.compare-cell-b { text-align: left; padding-left: 32px; font-weight: 600; }
.compare-row-hi .compare-cell-a,
.compare-row-hi .compare-cell-b {
  font-size: 22px;
  font-weight: 700;
}
.compare-win { color: var(--mint-dark); }
.compare-verdict {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--cream);
  border-left: 3px solid var(--cyan);
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--navy);
}
.compare-verdict-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.compare-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

/* Live badge */
.funnel-live-badge {
  padding: 12px 24px;
  background: var(--cream);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-dark);
  box-shadow: 0 0 0 4px rgba(44, 122, 94, 0.15);
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(44, 122, 94, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(44, 122, 94, 0.05); }
}

/* Presentation mode responsive tweaks — keep the desktop-first layout
   but allow the funnel section to breathe at narrower widths */
@media (max-width: 1280px) {
  .funnel-col-labels, .funnel-row {
    grid-template-columns: 150px 1fr 170px 1fr 110px;
  }
}
