/* intel-template v3 — sidebar dashboard
   Inspired by Elefante CRM + dashboard.html.
   No framework. Inter + DM Serif Display from Google Fonts.
   Chart.js drives Sankey + sparklines + donut. */

:root {
  /* Paper system — IPV palette: palm-mint + cream */
  --paper:     #FAFAF7;
  --paper-2:   #F1EFE8;
  --surface:   #FFFFFF;
  --ink:       #1d1d1f;
  --ink-2:     #424245;
  --muted:     #86868b;
  --muted-2:   #A8A8AC;
  --hairline:  rgba(0, 0, 0, 0.06);
  --hairline-2: rgba(0, 0, 0, 0.10);

  /* IPV accent — palm mint (their site is verdant) */
  --palm:        #d0e9e1;
  --palm-deep:   #6FA191;
  --palm-ink:    #21443B;
  --tbd-gold:    #8C7338;

  /* Tag colors */
  --t-strong:    #2E7D3F;    --t-strong-bg:    #E3F7E8;
  --t-exposed:   #A03D33;    --t-exposed-bg:   #FDECEC;
  --t-opp:       #8C7338;    --t-opp-bg:       #FFF3E0;
  --t-watch:     #4A6FB8;    --t-watch-bg:     #E7EFFB;
  --t-risk:      #7A1A1A;    --t-risk-bg:      #FBE0E0;
  --t-money:     #5C5C60;    --t-money-bg:     #ECECEE;
  --t-momentum:  #1F7A8C;    --t-momentum-bg:  #DFF3F7;
  --t-insight:   #5A3F92;    --t-insight-bg:   #EEE6FB;

  /* Severity colors (vulnerability heatmap) */
  --sev-crit:  #9a1a1a;
  --sev-high:  #c25714;
  --sev-med:   #b88e2c;
  --sev-low:   #5a6b78;

  /* Effort colors (leverage audit) */
  --eff-xs: #2E7D3F;  --eff-xs-bg: #E3F7E8;
  --eff-s:  #8C7338;  --eff-s-bg:  #FFF3E0;
  --eff-m:  #B05A2B;  --eff-m-bg:  #FCE3D2;
  --eff-l:  #A03D33;  --eff-l-bg:  #FDECEC;

  /* Fonts — Inter only (v7 redesign: kill serif) */
  --sans:  'Inter', -apple-system, system-ui, sans-serif;
  --serif: 'Inter', -apple-system, system-ui, sans-serif; /* aliased — keeps legacy refs harmless */

  /* Morph timing (flip-morph.js) */
  --morph: 0.55s cubic-bezier(0.22, 0.84, 0.28, 1.02);

  /* Layout */
  --sidebar-w: 240px;
  --main-pad-x: clamp(28px, 4vw, 56px);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
body { display: block; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
[hidden] { display: none !important; }

/* ============================================================
   v7 — Typographic scale (Inter-only · bigger · clearer)
   h1=64/1.05/700/-0.03em · h2=36/1.15/600/-0.02em
   h3=22/1.3/600/-0.01em · h4=17/1.3/600
   body=15/1.6 · caption=12/1.4/500
   ============================================================ */
h1 { font-family: var(--sans); font-size: clamp(40px, 5.4vw, 64px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
h2 { font-family: var(--sans); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-family: var(--sans); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-family: var(--sans); font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.005em; }
.caption, .muted.small, .muted.tiny { font-size: 12px; line-height: 1.4; font-weight: 500; color: var(--muted); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  padding: 28px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 0 10px; margin-bottom: 28px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--r-xs);
  background: linear-gradient(135deg, var(--palm), var(--palm-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--palm-ink);
  flex-shrink: 0;
  font-family: var(--serif);
}
.brand-name { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.brand-sub  { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 14px 10px 6px;
}
.nav-label:first-child { padding-top: 0; }
.nav-item {
  display: block;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-item:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.nav-item.active { background: #2c2c2e; color: white; font-weight: 600; }

.sidebar-foot { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--hairline); }
.legend { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; gap: 8px; align-items: center; }

/* ============================================================
   MAIN — v7: 1180px wrap · 96px top/bottom · 64px between sections
   ============================================================ */
.main {
  padding: 96px var(--main-pad-x) 96px;
  max-width: calc(1180px + var(--main-pad-x) * 2);
  margin: 0 auto;
  width: 100%;
  /* leave room on the right for the collapsed TOC rail (~36px) */
  padding-right: calc(var(--main-pad-x) + 24px);
}

/* TOPBAR */
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 96px;
  gap: 16px; flex-wrap: wrap;
}
.topbar h1 {
  font-family: var(--sans);
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.topbar-sub { font-size: 14px; color: var(--muted); margin-top: 10px; font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; }
.btn {
  padding: 9px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.btn-primary { background: #2c2c2e; color: white; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border: 1px solid var(--hairline-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }

/* ============================================================
   AI BRAIN section
   ============================================================ */
.ai-brain {
  background: linear-gradient(160deg, var(--palm) 0%, #F7F8F4 55%, #FAFAF7 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: clamp(40px, 5vw, 64px);
  margin-bottom: 96px;
  position: relative;
  overflow: hidden;
}
.ai-brain::before {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(208,233,225,0.55) 0%, transparent 70%);
  pointer-events: none;
}
.ai-brain-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.ai-brain-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--palm-ink); color: var(--palm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.ai-brain-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--palm-ink); text-transform: uppercase; margin-bottom: 6px;
  display: inline-flex; align-items: center; gap: 8px;
}
.ai-brain-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 99px; background: var(--palm-deep);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.ai-brain-title {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em; line-height: 1.15; color: var(--ink);
}
.ai-brain-title em { color: var(--palm-deep); font-style: italic; }
.ai-brain-body {
  font-size: 15.5px; line-height: 1.55; color: var(--ink-2);
  max-width: 78ch; margin-bottom: 24px;
}
.ai-brain-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ai-brain-card { background: var(--surface); padding: 16px; border-radius: var(--r-sm); border: 1px solid var(--hairline); }
.ai-brain-card h4 { font-size: 14px; font-weight: 700; margin: 8px 0 6px; letter-spacing: -0.01em; }
.ai-brain-card p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 900px) { .ai-brain-cards { grid-template-columns: 1fr; } }

/* ============================================================
   KPI ROW
   ============================================================ */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 96px;
}
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kpi-row { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 130px;
  box-shadow: var(--shadow-card);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.kpi-trend {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 3px;
}
.kpi-trend[data-trend="up"]    { background: var(--t-strong-bg); color: var(--t-strong); }
.kpi-trend[data-trend="down"]  { background: var(--t-exposed-bg); color: var(--t-exposed); }
.kpi-trend[data-trend="flat"]  { background: var(--t-money-bg); color: var(--t-money); }
.kpi-trend:empty { display: none; }
.kpi-val {
  font-family: var(--sans);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.kpi-val.xl { font-size: 44px; }
.kpi-val.xxl { font-size: clamp(40px, 5vw, 60px); }
.kpi-foot { font-size: 12px; color: var(--muted); }
.kpi-spark { margin-top: auto; min-height: 36px; }
.kpi-spark canvas { display: block; width: 100%; height: 36px; }
.kpi-big { display: flex; flex-direction: column; gap: 8px; padding: 22px; }

/* ============================================================
   Section labels + grids
   ============================================================ */
.dash-section { padding: 0 0 64px; margin-bottom: 32px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }
.sec-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.10em;
  margin-bottom: 12px;
}
.sec-title {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.02em; line-height: 1.15;
  max-width: 22ch;
}
.sec-title em { font-style: normal; font-weight: 600; color: var(--palm-deep); }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 16px; }
.card h4 { font-size: 17px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; line-height: 1.3; }

.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.grid-1 { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) {
  .col-8, .col-6, .col-4, .col-3 { grid-column: span 12; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }

/* ============================================================
   TAGS — the scannable layer
   ============================================================ */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag[data-tag="strong"], .tag-strong       { background: var(--t-strong-bg); color: var(--t-strong); }
.tag[data-tag="exposed"], .tag-exposed     { background: var(--t-exposed-bg); color: var(--t-exposed); }
.tag[data-tag="opp"], .tag-opp             { background: var(--t-opp-bg); color: var(--t-opp); }
.tag[data-tag="watch"], .tag-watch         { background: var(--t-watch-bg); color: var(--t-watch); }
.tag[data-tag="risk"], .tag-risk           { background: var(--t-risk-bg); color: var(--t-risk); }
.tag[data-tag="money"], .tag-money         { background: var(--t-money-bg); color: var(--t-money); }
.tag[data-tag="momentum"], .tag-momentum   { background: var(--t-momentum-bg); color: var(--t-momentum); }
.tag[data-tag="insight"], .tag-insight     { background: var(--t-insight-bg); color: var(--t-insight); }
/* Severity tags reuse — site-problems can use exposed/risk/watch */

/* ============================================================
   FINDINGS GRID
   ============================================================ */
.findings-counts { display: flex; gap: 6px; }
.count-pill {
  font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}
.count-pill b { margin-right: 4px; font-weight: 800; }
.findings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.finding-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.finding-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.finding-card h4 { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; line-height: 1.3; }
.finding-body { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.finding-foot { margin-top: 10px; }
.finding-cite { font-size: 11px; color: var(--muted); font-style: italic; }

/* ============================================================
   FINANCIALS — Sankey + bars
   ============================================================ */
.sankey-wrap { width: 100%; height: 360px; margin-top: 8px; }
.sankey-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-tall { height: 240px; margin-top: 8px; }
.chart-mid  { height: 200px; margin-top: 8px; }
.chart-tall canvas, .chart-mid canvas { width: 100% !important; height: 100% !important; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 10.5px; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--ink);
}
.data-table td { padding: 10px; border-bottom: 1px solid var(--hairline); }
.data-table.compact th, .data-table.compact td { padding: 6px 10px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: rgba(0,0,0,0.015); }

/* ============================================================
   COMPETITORS
   ============================================================ */
.competitor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .competitor-grid { grid-template-columns: 1fr; } }
.competitor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.competitor-head h4 { font-size: 16px; font-weight: 700; margin: 0; }
.threat-score {
  text-align: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--t-money-bg);
  flex-shrink: 0;
}
.threat-score[data-score="high"]     { background: var(--t-exposed-bg); color: var(--t-exposed); }
.threat-score[data-score="medium"]   { background: var(--t-opp-bg); color: var(--t-opp); }
.threat-score[data-score="low"]      { background: var(--t-strong-bg); color: var(--t-strong); }
.threat-num { font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1; display: block; }
.threat-label { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.competitor-pos { font-size: 13px; color: var(--ink-2); margin: 6px 0 12px; line-height: 1.5; }
.competitor-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 12px 0; }
.competitor-kpis div { background: var(--paper-2); padding: 8px 10px; border-radius: 8px; }
.competitor-kpis span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.competitor-kpis b { font-size: 12.5px; font-weight: 700; }
.competitor-threat { font-size: 12.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--hairline); }

/* ============================================================
   TECH STACK badges
   ============================================================ */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stack-group h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge {
  display: inline-block; padding: 4px 9px;
  font-size: 11px; font-weight: 600;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.badge.solid { background: var(--ink); color: white; }
.badge.tiny { font-size: 10px; padding: 2px 6px; }

/* ============================================================
   VULNERABILITY heatmap
   ============================================================ */
.vuln-heatmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.severity {
  border-radius: var(--r-md); padding: 24px; color: white;
  display: flex; align-items: baseline; justify-content: space-between;
  font-weight: 700;
}
.severity span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.92; }
.severity b { font-family: var(--serif); font-size: 44px; font-weight: 400; line-height: 1; }
.severity.sev-crit { background: var(--sev-crit); }
.severity.sev-high { background: var(--sev-high); }
.severity.sev-med  { background: var(--sev-med); }
.severity.sev-low  { background: var(--sev-low); }
.sev-pill {
  display: inline-block; padding: 4px 9px; border-radius: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: white;
}
.sev-pill[data-sev="critical"] { background: var(--sev-crit); }
.sev-pill[data-sev="high"]     { background: var(--sev-high); }
.sev-pill[data-sev="medium"]   { background: var(--sev-med); }
.sev-pill[data-sev="low"]      { background: var(--sev-low); }
.vuln-list { list-style: none; padding: 0; }
.vuln-row { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.vuln-row:first-child { border-top: 0; padding-top: 0; }
.vuln-body h4 { font-size: 14px; margin: 0 0 6px; }
.vuln-fix { margin-top: 8px; padding: 8px 10px; background: var(--t-strong-bg); border-left: 3px solid var(--t-strong); font-size: 12.5px; color: var(--t-strong); border-radius: 0 6px 6px 0; }
.vuln-fix b { color: var(--ink); }

/* ============================================================
   PEOPLE
   ============================================================ */
.people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.person-card h4 { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.person-card .role { font-size: 12px; font-weight: 600; color: var(--t-insight); margin-bottom: 4px; }
.person-card .person-signal { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.ip-list { list-style: none; padding: 0; }
.ip-row { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 12.5px; line-height: 1.5; }
.ip-row:first-child { border-top: 0; }
.badge[data-ip-status="pending"] { background: var(--t-opp-bg); color: var(--t-opp); font-weight: 700; }
.badge[data-ip-status="granted"] { background: var(--t-strong-bg); color: var(--t-strong); }

/* ============================================================
   LEVERAGE AUDIT tabs
   ============================================================ */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--hairline-2); padding-bottom: 0; }
.tab {
  padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.leverage-list { list-style: none; padding: 0; }
.leverage-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--hairline);
}
.leverage-item:first-child { border-top: 0; padding-top: 0; }
.leverage-body h4 { font-size: 14.5px; margin: 0 0 6px; }
.effort-pill {
  display: inline-block; padding: 5px 0; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; text-align: center;
  width: 50px; height: fit-content;
}
.effort-pill[data-effort="XS"] { background: var(--eff-xs-bg); color: var(--eff-xs); }
.effort-pill[data-effort="S"]  { background: var(--eff-s-bg);  color: var(--eff-s); }
.effort-pill[data-effort="M"]  { background: var(--eff-m-bg);  color: var(--eff-m); }
.effort-pill[data-effort="L"]  { background: var(--eff-l-bg);  color: var(--eff-l); }

/* ============================================================
   SITE PROBLEMS — vivid cards
   ============================================================ */
.problems-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.problem-card { border-left: 4px solid var(--t-exposed); }
.problem-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.problem-impact {
  font-family: var(--serif); font-size: 18px; font-weight: 400;
  color: var(--t-exposed); letter-spacing: -0.02em;
}
.problem-card h4 { font-size: 15px; margin: 4px 0 8px; }
.problem-evidence { font-size: 13px; color: var(--ink-2); line-height: 1.5; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 10px; }
.problem-fix { font-size: 12.5px; color: var(--t-strong); padding: 6px 10px; background: var(--t-strong-bg); border-radius: 6px; line-height: 1.5; }
.problem-fix b { color: var(--ink); }

/* ============================================================
   AD CARDS (marketing samples)
   ============================================================ */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ad-card {
  background: var(--paper-2); padding: 14px;
  border-radius: var(--r-sm); border: 1px solid var(--hairline);
}
.ad-card-top { display: flex; gap: 6px; margin-bottom: 8px; }
.ad-card p { font-size: 13px; line-height: 1.5; font-style: italic; color: var(--ink-2); }

/* ============================================================
   CICERO FIT
   ============================================================ */
.cicero-card { border-top: 4px solid #C9A86C; }
.cicero-card .lead { font-family: var(--serif); font-size: 19px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.5; color: var(--ink); margin-bottom: 18px; }
.cicero-card h4 { margin-top: 18px; }
.cicero-card ul { padding-left: 20px; font-size: 13px; }
.cicero-card li { margin-bottom: 6px; line-height: 1.5; }

/* ============================================================
   SOURCES
   ============================================================ */
.source-list { list-style: none; padding: 0; columns: 2; column-gap: 24px; margin-top: 12px; font-size: 12.5px; }
.source-list li { break-inside: avoid; padding: 5px 0; }
.source-list a { color: var(--ink); border-bottom: 1px dashed var(--muted-2); }
.badge[data-status="ok"]         { background: var(--t-strong-bg); color: var(--t-strong); }
.badge[data-status="paywalled"]  { background: var(--t-opp-bg); color: var(--t-opp); }
.badge[data-status="failed"]     { background: var(--t-exposed-bg); color: var(--t-exposed); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: 60px;
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   TBD CHIP — meta-marker for assumptions to confirm
   ============================================================ */
.tbd-chip {
  display: inline-block;
  padding: 2px 7px;
  background: transparent;
  border: 1px dashed var(--tbd-gold);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  color: var(--tbd-gold);
  text-transform: lowercase;
  vertical-align: middle;
  line-height: 1.3;
}

/* ============================================================
   SECTION SUB (intro under sec-title)
   ============================================================ */
.sec-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 72ch;
}

/* ============================================================
   ASSUMPTIONS TO CONFIRM — the meeting agenda
   ============================================================ */
.assumptions-section {
  background: linear-gradient(180deg, #FFF9EC 0%, var(--paper) 100%);
  padding: 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  margin-bottom: 48px;
}
.assumptions-section .sec-title em {
  color: var(--tbd-gold);
  font-style: italic;
}
.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.assumption-card {
  border-left: 4px solid var(--tbd-gold);
  position: relative;
}
.assumption-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.assumption-num {
  font-family: var(--serif);
  font-size: 22px; font-weight: 400;
  color: var(--tbd-gold);
  letter-spacing: -0.02em;
}
.assumption-card h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.assumption-why,
.assumption-q {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.assumption-why b,
.assumption-q b {
  color: var(--ink);
  font-weight: 700;
}
.assumption-q em {
  font-style: italic;
  color: var(--palm-ink);
}
.assumption-q {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  margin-bottom: 0;
}

/* ============================================================
   DUAL PRODUCT OFFER — the 4 cards
   ============================================================ */
.dual-product-section .sec-title em {
  color: var(--palm-deep);
  font-style: italic;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
/* 6-card layout: 3 across on wide screens, 2 across on mid, 1 on mobile */
.products-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1280px) {
  .products-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: 1fr; }
  .products-grid-6 { grid-template-columns: 1fr; }
}
.product-card {
  position: relative;
  padding: 24px;
  display: flex; flex-direction: column;
  border-top: 4px solid var(--palm-deep);
}
.product-card:nth-child(2) { border-top-color: var(--t-watch); }
.product-card:nth-child(3) { border-top-color: var(--t-insight); }
.product-card:nth-child(4) { border-top-color: var(--t-opp); }
.product-card:nth-child(5) { border-top-color: var(--t-momentum); }
.product-card:nth-child(6) { border-top-color: var(--t-money); }

.product-num {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--muted-2);
  letter-spacing: -0.02em;
  line-height: 1;
}
.product-eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--palm-deep);
  margin-bottom: 6px;
}
.product-card:nth-child(2) .product-eyebrow { color: var(--t-watch); }
.product-card:nth-child(3) .product-eyebrow { color: var(--t-insight); }
.product-card:nth-child(4) .product-eyebrow { color: var(--t-opp); }
.product-card:nth-child(5) .product-eyebrow { color: var(--t-momentum); }
.product-card:nth-child(6) .product-eyebrow { color: var(--t-money); }

.product-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.1;
}
.product-target {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  font-style: italic;
}
.product-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 12.5px;
}
.product-features li {
  position: relative;
  padding: 6px 0 6px 18px;
  line-height: 1.5;
  border-top: 1px solid var(--hairline);
  color: var(--ink-2);
}
.product-features li:first-child { border-top: 0; }
.product-features li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--palm-deep);
  font-weight: 700;
}
.product-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--hairline-2);
}
.product-pricing {
  display: flex; flex-direction: column; gap: 4px;
}
.product-pricing .kpi-label { font-size: 10px; }
.product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.product-pricing .tbd-chip {
  align-self: flex-start;
  margin-top: 4px;
}

/* Memory positioning card — deep statement */
.memory-card {
  background: var(--palm-ink);
  color: white;
  padding: 28px 32px;
  border: 0;
  border-radius: var(--r-md);
}
.memory-card h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: white;
  line-height: 1.2;
  margin: 8px 0 16px;
}
.memory-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--palm);
  opacity: 0.85;
}
.memory-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.86);
  max-width: 75ch;
}

/* ============================================================
   TRIP CODE flow
   ============================================================ */
#trip-code .sec-title em {
  color: var(--palm-deep);
  font-style: italic;
}
.trip-flow {
  margin-bottom: 24px;
}
.trip-step {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
}
@media (max-width: 1100px) {
  .trip-step { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .trip-step { grid-template-columns: 1fr; }
}
.trip-step-card {
  padding: 20px;
  position: relative;
}
.trip-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--palm);
  color: var(--palm-ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.trip-step-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.trip-step-card p {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.destination-list {
  list-style: none; padding: 0; margin-top: 8px;
}
.destination-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  line-height: 1.5;
}
.destination-row:first-child { border-top: 0; padding-top: 4px; }
.destination-place {
  font-weight: 700;
  color: var(--palm-ink);
}
.destination-value {
  color: var(--ink-2);
}
.math-card {
  background: linear-gradient(135deg, #FFF5DC 0%, #FAFAF7 100%);
  border-left: 4px solid var(--tbd-gold);
}
.math-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.math-equation {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--palm-ink);
  padding: 14px 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 12px;
}

/* ============================================================
   DOSSIER list (sources section)
   ============================================================ */
.dossier-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
}
@media (max-width: 800px) {
  .dossier-list { grid-template-columns: 1fr; }
}
.dossier-row {
  padding: 8px 12px;
  background: var(--paper-2);
  border-radius: 8px;
  border-left: 3px solid var(--palm-deep);
}
.dossier-row a {
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.dossier-row a:hover { color: var(--palm-ink); }

/* ============================================================
   BULLET LIST (conversion stack etc.)
   ============================================================ */
.bullet-list {
  list-style: none;
  padding: 0;
  margin-top: 8px;
  font-size: 13px;
}
.bullet-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  line-height: 1.55;
  color: var(--ink-2);
  border-top: 1px solid var(--hairline);
}
.bullet-list li:first-child { border-top: 0; }
.bullet-list li::before {
  content: "·";
  position: absolute; left: 6px;
  color: var(--palm-deep);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
}

/* ============================================================
   CICERO FIT — overrides for IPV context
   ============================================================ */
.cicero-card { border-top: 4px solid var(--palm-deep); }
.cicero-card .lead { color: var(--palm-ink); }

/* ============================================================
   PRODUCT · data + iteration block (per card)
   ============================================================ */
.product-iteration {
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #F8FBFA 0%, #F2F6F4 100%);
  border-left: 3px solid var(--palm-deep);
  border-radius: 0 8px 8px 0;
}
.product-iteration-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--palm-ink);
  margin-bottom: 6px;
}
.product-iteration p {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

/* Second memory card variant — for FDE positioning */
.memory-card-fde {
  margin-top: 14px;
  background: linear-gradient(135deg, var(--palm-ink) 0%, #163029 100%);
}

/* ============================================================
   TOC RAIL — right-edge Notion-style
   ============================================================ */
.toc-rail {
  position: fixed;
  right: 12px;
  /* 64px original + 36px for the new sticky breadcrumb rail */
  top: 100px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.toc-card {
  pointer-events: auto;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 4px 8px 6px;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  transition: background 150ms ease-out,
              border-color 150ms ease-out,
              box-shadow 150ms ease-out,
              padding 150ms ease-out;
}
.toc-card::-webkit-scrollbar { display: none; }

.toc-rail:hover .toc-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 12px;
}

.toc-header {
  display: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(0, 0, 0, 0.45);
  margin-bottom: 8px;
  padding-left: 4px;
}
.toc-rail:hover .toc-header { display: block; }

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 0;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: background 150ms ease-out, color 150ms ease-out, padding 150ms ease-out;
}
.toc-rail:hover .toc-item {
  padding: 4px 8px;
}
.toc-rail:hover .toc-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
.toc-rail:hover .toc-item.is-active {
  background: #000;
  color: #fff;
}

.toc-label-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width 200ms ease-out, opacity 150ms ease-out;
}
.toc-rail:hover .toc-label-wrap {
  max-width: 220px;
  opacity: 1;
}

.toc-num {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.35);
}
.toc-item.is-active .toc-num,
.toc-rail:hover .toc-item.is-active .toc-num {
  color: rgba(255, 255, 255, 0.55);
}

.toc-label {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.75);
}
.toc-item.is-active .toc-label,
.toc-rail:hover .toc-item.is-active .toc-label {
  color: #fff;
}

.toc-tick {
  display: block;
  height: 2px;
  width: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.30);
  flex-shrink: 0;
  transition: width 150ms ease-out, background 150ms ease-out;
}
.toc-item.is-active .toc-tick {
  width: 24px;
  background: #000;
}
.toc-rail:hover .toc-tick {
  width: 16px;
  background: rgba(0, 0, 0, 0.45);
}
.toc-rail:hover .toc-item.is-active .toc-tick {
  background: #fff;
  width: 24px;
}

/* ============================================================
   CROSS-ORIGIN STICKY BREADCRUMB RAIL (bc-rail)
   Renders the inbound ?bc=<chain> + this page. See bc.js.
   Sits ABOVE everything else (z-index 50). Height ~36px.
   ============================================================ */
.bc-rail {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px 24px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  font-family: var(--sans);
  min-height: 36px;
  display: flex;
  align-items: center;
}
.bc-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.bc-rail li { display: flex; align-items: center; gap: 6px; }
.bc-rail .sep { color: rgba(0, 0, 0, 0.25); }
.bc-rail a {
  color: rgba(0, 0, 0, 0.55);
  text-decoration: none;
  transition: color 0.15s;
}
.bc-rail a:hover { color: var(--ink); text-decoration: underline; }
.bc-rail .current { color: var(--ink); font-weight: 500; }

/* ============================================================
   PUBLIC FOOTPRINT — chi è IPV pubblicamente
   ============================================================ */
.footprint-section .sec-title em {
  color: var(--palm-deep);
  font-style: italic;
}
.footprint-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 1100px) {
  .footprint-grid { grid-template-columns: 1fr; }
}
.footprint-block {
  border-left: 4px solid var(--palm-deep);
  display: flex;
  flex-direction: column;
}
.footprint-block[data-block="web"]       { border-left-color: var(--t-watch); }
.footprint-block[data-block="social"]    { border-left-color: var(--t-momentum); }
.footprint-block[data-block="press"]     { border-left-color: var(--t-insight); }
.footprint-block[data-block="partners"]  { border-left-color: var(--t-strong); }
.footprint-block[data-block="b2bVsB2c"]  { border-left-color: var(--t-opp); }
.footprint-block[data-block="geography"] { border-left-color: var(--t-money); }
.footprint-head { margin-bottom: 10px; }
.footprint-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.footprint-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}
.footprint-paragraph {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 10px 0 14px;
}
.footprint-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footprint-item {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  padding: 8px 10px;
  background: var(--paper-2);
  border-radius: var(--r-xs);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
}
.footprint-item-cat {
  font-weight: 700;
  color: var(--ink);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 130px;
}
.footprint-item-entries {
  flex: 1;
  min-width: 200px;
}
.footprint-item-link {
  color: var(--palm-deep);
  text-decoration: underline;
  font-weight: 600;
}
.footprint-item-link[href=""] { pointer-events: none; text-decoration: none; color: var(--ink-2); }
.footprint-item-note {
  color: var(--muted);
  font-size: 11.5px;
  display: block;
  margin-top: 2px;
  width: 100%;
}

/* ============================================================
   FUNNEL TEARDOWN — oggi / domani / data collection
   ============================================================ */
.funnel-section .sec-title em {
  color: var(--t-opp);
  font-style: italic;
}
.funnel-block {
  margin-bottom: 20px;
}
.funnel-block-c {
  margin-top: 20px;
}
.funnel-block-head {
  margin-bottom: 14px;
}
.funnel-block-head h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 6px 0 4px;
}
.funnel-block-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
}
.funnel-eyebrow-today {
  background: var(--t-exposed-bg);
  color: var(--t-exposed);
}
.funnel-eyebrow-tomorrow {
  background: var(--t-strong-bg);
  color: var(--t-strong);
}
.funnel-eyebrow-data {
  background: var(--t-insight-bg);
  color: var(--t-insight);
}
.funnel-table-wrap {
  overflow-x: auto;
}
.funnel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 720px;
}
.funnel-table th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--hairline-2);
  background: var(--paper-2);
}
.funnel-table td {
  padding: 12px;
  border-bottom: 1px solid var(--hairline);
  line-height: 1.5;
  vertical-align: top;
  color: var(--ink-2);
}
.funnel-table tr:last-child td { border-bottom: 0; }
.funnel-table tr.funnel-row:hover td { background: rgba(0,0,0,0.015); }
.funnel-table .funnel-step {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  min-width: 130px;
}
.funnel-table .funnel-friction {
  color: var(--t-exposed);
}
.funnel-table .funnel-cut {
  color: var(--t-exposed);
}
.funnel-table .funnel-fix {
  color: var(--t-strong);
}
.funnel-table .funnel-delta {
  color: var(--palm-ink);
  font-weight: 600;
  white-space: normal;
  min-width: 160px;
}

/* Data collection cards */
.data-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 1280px) { .data-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .data-cards-grid { grid-template-columns: 1fr; } }
.data-card {
  position: relative;
  border-top: 3px solid var(--t-insight);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.data-card-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--t-insight);
  line-height: 1;
  letter-spacing: -0.02em;
}
.data-card-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.data-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.data-card-body {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  flex: 1;
}
.data-card-metric {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t-insight);
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--hairline);
}

/* ============================================================
   ASSUMPTIONS TABLE — replaces card grid
   ============================================================ */
.assumptions-table-wrap {
  overflow-x: auto;
  padding: 0;
}
.assumptions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 900px;
}
.assumptions-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  background: #FFF9EC;
  border-bottom: 2px solid var(--hairline-2);
  position: sticky;
  top: 0;
}
.assumptions-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  line-height: 1.5;
  vertical-align: top;
  color: var(--ink-2);
}
.assumptions-table tr.assumption-row:hover td {
  background: #FFFCF3;
}
.assumptions-table .col-id {
  width: 56px;
  min-width: 56px;
}
.assumptions-table .col-domain {
  width: 110px;
  min-width: 100px;
}
.assumptions-table .col-assumption {
  font-weight: 600;
  color: var(--ink);
  min-width: 280px;
}
.assumptions-table .col-why {
  min-width: 220px;
}
.assumptions-table .col-question {
  min-width: 240px;
}
.assumptions-table .col-question em {
  font-style: italic;
  color: var(--palm-ink);
}
.assumption-id-pill {
  display: inline-block;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--tbd-gold);
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 2px 8px;
  background: rgba(140, 115, 56, 0.08);
  border-radius: 6px;
}
.assumptions-table tr:last-child td { border-bottom: 0; }

/* Mobile stack for assumptions table */
@media (max-width: 720px) {
  .assumptions-table { min-width: 0; font-size: 12px; }
  .assumptions-table thead { display: none; }
  .assumptions-table, .assumptions-table tbody, .assumptions-table tr, .assumptions-table td {
    display: block;
    width: 100%;
  }
  .assumptions-table tr.assumption-row {
    padding: 14px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 6px;
  }
  .assumptions-table tbody td {
    padding: 4px 0;
    border: 0;
  }
  .assumptions-table .col-id,
  .assumptions-table .col-domain {
    display: inline-block;
    width: auto;
    margin-right: 8px;
  }
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 800px) {
  .main { padding-right: var(--main-pad-x); }
  /* Keep the rail visible on mobile but pinned + compact */
  .toc-rail { top: 92px; bottom: 16px; right: 6px; }
  .bc-rail { padding: 6px 16px; min-height: 32px; font-size: 11px; }
}

/* ============================================================
   v7 — FLIP-MORPH CARDS (flip-morph.js)
   Auto-applied to any .morph-card with an .extra child.
   Click → animates to centered modal box.
   ============================================================ */
.morph-card {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
  position: relative;
}
.morph-card:hover:not(.is-expanded) {
  border-color: var(--ink-2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.morph-card:active:not(.is-expanded) { transform: scale(0.992); }
.morph-card.is-expanded {
  position: fixed;
  z-index: 101;
  overflow-y: auto;
  cursor: default;
  max-width: none;
  transition:
    top var(--morph),
    left var(--morph),
    width var(--morph),
    height var(--morph),
    border-radius var(--morph),
    box-shadow 0.6s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--hairline-2);
  padding: 36px 36px 32px;
  border-radius: var(--r-lg);
}

/* The .extra container — hidden by default, reveals on expand */
.morph-card .extra {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--morph), opacity 0.3s ease;
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.morph-card.is-expanded .extra {
  max-height: 800px;
  opacity: 1;
  transition: max-height var(--morph), opacity 0.3s ease 0.2s;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--hairline-2);
}

/* Placeholder occupies the grid slot while card is detached */
.morph-card-placeholder {
  visibility: hidden;
}

/* Backdrop blur (whole page) */
.morph-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.morph-backdrop.on {
  background: rgba(20, 20, 22, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

/* Close X — injected by flip-morph.js, only visible when expanded */
.morph-close-x {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink-2);
  z-index: 2;
  transition: background 0.15s ease, color 0.15s ease;
}
.morph-card.is-expanded .morph-close-x { display: flex; }
.morph-close-x:hover { background: rgba(0, 0, 0, 0.12); color: var(--ink); }

/* Re-fade source on close */
@keyframes cardFadeIn {
  0% { opacity: 0; transform: scale(0.985); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   v7 — MARKETING ACCOUNTS GRID + paid + constellation
   ============================================================ */
.marketing-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(160deg, #F5F9F7 0%, #FAFAF7 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
@media (max-width: 800px) { .marketing-kpi-strip { grid-template-columns: 1fr; } }
.marketing-kpi-cell {
  display: flex; flex-direction: column; gap: 6px;
}
.marketing-kpi-cell-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.marketing-kpi-cell-value {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.marketing-kpi-cell-foot {
  font-size: 12px; color: var(--muted); line-height: 1.4;
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.account-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  min-height: 160px;
}
.account-card .account-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.account-platform {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.account-platform[data-platform="instagram"]  { background: #FCE7EE; color: #C13584; }
.account-platform[data-platform="facebook"]   { background: #E3EAF8; color: #1877F2; }
.account-platform[data-platform="linkedin"]   { background: #DCE9F4; color: #0A66C2; }
.account-platform[data-platform="tiktok"]     { background: #E8E8EA; color: #1d1d1f; }
.account-platform[data-platform="youtube"]    { background: #FBE2E2; color: #FF0000; }
.account-platform[data-platform="trustpilot"] { background: #DFF5E6; color: #00B67A; }
.account-platform[data-platform="indeed"]     { background: #DBEAF8; color: #2557A7; }
.account-platform[data-platform="twitter"]    { background: #E8E8EA; color: #1d1d1f; }

.account-quality {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px; border-radius: 4px;
}
.account-quality[data-q="live"]      { background: var(--t-strong-bg); color: var(--t-strong); }
.account-quality[data-q="estimated"] { background: var(--t-opp-bg); color: var(--t-opp); }
.account-quality[data-q="tbd"]       { background: var(--t-watch-bg); color: var(--t-watch); }

.account-handle {
  font-size: 14px; font-weight: 600;
  color: var(--ink); line-height: 1.3;
  word-break: break-all;
}
.account-followers {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}
.account-bio {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.account-card .extra {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.account-card .extra .extra-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
.account-card .extra .extra-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
}
.account-card .extra .extra-row:first-child { border-top: 0; }
.account-card .extra .extra-row dt { font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 1px; }
.account-card .extra .extra-row dd { color: var(--ink-2); }
.account-card .extra .extra-detail {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--paper-2);
  border-radius: 8px;
  border-left: 3px solid var(--palm-deep);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.account-card .extra .extra-link {
  margin-top: 10px;
  font-size: 12px;
}
.account-card .extra .extra-link a {
  color: var(--palm-deep);
  text-decoration: underline;
  font-weight: 600;
}

/* Paid sources strip */
.paid-strip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.paid-card {
  padding: 22px;
}
.paid-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.paid-source-name {
  font-size: 16px; font-weight: 700;
  color: var(--ink);
}
.paid-metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12.5px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.paid-metric-row:first-of-type { border-top: 0; }
.paid-metric-row dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.paid-metric-row dd { color: var(--ink); font-weight: 600; }
.paid-notes {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--hairline-2);
  font-style: italic;
}

/* Constellation mini-block */
.constellation-block {
  margin-top: 16px;
  padding: 22px;
  background: linear-gradient(180deg, #F8F9F7 0%, var(--paper) 100%);
  border: 1px dashed var(--hairline-2);
  border-radius: var(--r-md);
}
.constellation-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.constellation-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  font-size: 12px;
}
.constellation-brand { font-weight: 700; color: var(--ink); font-size: 13px; }
.constellation-handle { color: var(--palm-deep); font-weight: 600; }
.constellation-note { color: var(--muted); font-size: 11.5px; line-height: 1.4; }

/* ============================================================
   v7 — COMPETITOR BENCHMARK
   ============================================================ */
.cb-section .sec-title em {
  color: var(--t-momentum);
  font-style: normal;
  font-weight: 600;
}
.cb-baseline-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--palm-ink);
  color: white;
  border-radius: var(--r-md);
}
@media (max-width: 900px) { .cb-baseline-strip { grid-template-columns: repeat(2, 1fr); } }
.cb-baseline-cell {
  display: flex; flex-direction: column; gap: 4px;
}
.cb-baseline-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--palm);
}
.cb-baseline-value {
  font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1; color: white; font-variant-numeric: tabular-nums;
}
.cb-baseline-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 18px;
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.cb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .cb-grid { grid-template-columns: 1fr; } }
.cb-card {
  padding: 28px;
  display: flex; flex-direction: column;
  border-top: 4px solid var(--t-momentum);
  min-height: 200px;
}
.cb-card:nth-child(1) { border-top-color: var(--t-insight); }
.cb-card:nth-child(2) { border-top-color: var(--t-opp); }
.cb-card:nth-child(3) { border-top-color: var(--t-watch); }
.cb-card:nth-child(4) { border-top-color: var(--t-strong); }

.cb-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.cb-name { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.cb-url { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cb-positioning {
  font-size: 13.5px; line-height: 1.5; color: var(--ink-2);
  margin: 8px 0 16px;
}
.cb-signal {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 14px;
  background: var(--paper-2);
  border-radius: 8px;
  border-left: 3px solid var(--t-momentum);
  margin-bottom: 12px;
}
.cb-card:nth-child(1) .cb-signal { border-left-color: var(--t-insight); }
.cb-card:nth-child(2) .cb-signal { border-left-color: var(--t-opp); }
.cb-card:nth-child(3) .cb-signal { border-left-color: var(--t-watch); }
.cb-card:nth-child(4) .cb-signal { border-left-color: var(--t-strong); }

.cb-delta {
  font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
}
.cb-delta b { color: var(--ink); }

/* Inside .extra — full channel breakdown */
.cb-channel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 6px;
}
.cb-channel-table th {
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--hairline-2);
}
.cb-channel-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.cb-channel-table td:first-child { font-weight: 700; color: var(--ink); width: 110px; }
.cb-channel-table td:last-child { font-size: 10px; }
.cb-channel-handle { color: var(--palm-deep); font-weight: 600; }
.cb-channel-handle a { text-decoration: underline; }
.cb-channel-followers {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cb-q-pill {
  display: inline-block;
  font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
}
.cb-q-pill[data-q="live"]      { background: var(--t-strong-bg); color: var(--t-strong); }
.cb-q-pill[data-q="estimated"] { background: var(--t-opp-bg); color: var(--t-opp); }
.cb-q-pill[data-q="tbd"]       { background: var(--t-watch-bg); color: var(--t-watch); }

.cb-detail {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ============================================================
   v7 — MAKE EXISTING CARDS HEADLINE-ONLY BY DEFAULT
   (extra blocks transition like morph-card)
   ============================================================ */

/* Finding card: collapse body+foot into .extra */
.finding-card.morph-card .finding-body,
.finding-card.morph-card .finding-foot { display: none; }
.finding-card.morph-card.is-expanded .finding-body,
.finding-card.morph-card.is-expanded .finding-foot { display: block; }
.finding-card.morph-card.is-expanded .finding-foot { margin-top: 10px; }

/* Product card: collapse features + iteration + foot */
.product-card.morph-card .product-features,
.product-card.morph-card .product-iteration,
.product-card.morph-card .product-foot { display: none; }
.product-card.morph-card.is-expanded .product-features,
.product-card.morph-card.is-expanded .product-iteration,
.product-card.morph-card.is-expanded .product-foot { display: block; }

/* Person card: collapse tenure + signal */
.person-card.morph-card .person-signal { display: none; }
.person-card.morph-card.is-expanded .person-signal { display: block; }

/* Competitor card: collapse kpis + tags + threat */
.competitor-card.morph-card .competitor-kpis,
.competitor-card.morph-card .competitor-threat,
.competitor-card.morph-card .finding-tags { display: none; }
.competitor-card.morph-card.is-expanded .competitor-kpis { display: grid; }
.competitor-card.morph-card.is-expanded .competitor-threat { display: block; }
.competitor-card.morph-card.is-expanded .finding-tags { display: flex; }

/* Footprint block items: collapse the long item list */
.footprint-block.morph-card .footprint-items,
.footprint-block.morph-card .footprint-paragraph { display: none; }
.footprint-block.morph-card.is-expanded .footprint-items { display: flex; }
.footprint-block.morph-card.is-expanded .footprint-paragraph { display: block; }

/* Funnel-table rows: clickable rows expand a detail row below */
.funnel-table tr.morph-row { cursor: pointer; }
.funnel-table tr.morph-row:hover td { background: rgba(0, 0, 0, 0.025); }

/* Assumptions table rows: clickable */
.assumptions-table tr.morph-row { cursor: pointer; }

/* ============================================================
   v7 — RESPONSIVE adjustments
   ============================================================ */
@media (max-width: 800px) {
  .main { padding: 64px var(--main-pad-x) 64px; padding-right: var(--main-pad-x); }
  .topbar { margin-bottom: 64px; }
  .ai-brain { padding: 32px; margin-bottom: 64px; }
  .dash-section { padding-bottom: 48px; }
  .sec-head { margin-bottom: 32px; }
  .card { padding: 24px; }
  .marketing-kpi-strip { padding: 18px; }
  .cb-baseline-strip { padding: 18px; gap: 12px; }
}
