@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-base:       #0a0c10;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.14);

  --teal:          #00d4b4;
  --teal-dim:      rgba(0, 212, 180, 0.15);
  --teal-glow:     rgba(0, 212, 180, 0.3);
  --amber:         #f5a623;
  --amber-dim:     rgba(245, 166, 35, 0.15);
  --rose:          #ff5f7e;
  --rose-dim:      rgba(255, 95, 126, 0.12);
  --violet:        #a78bfa;
  --violet-dim:    rgba(167, 139, 250, 0.12);

  --text-primary:  #f0f4f8;
  --text-secondary:#8a9bb0;
  --text-muted:    #4a5568;

  --font-sans:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-glow:   0 0 40px rgba(0, 212, 180, 0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

/* ── Layout ─────────────────────────────────────── */
.app-wrapper { max-width: 1280px; margin: 0 auto; padding: 0 24px 80px; }

/* ── Hero ───────────────────────────────────────── */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,212,180,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,180,0.25);
  color: var(--teal);
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px; border-radius: 99px;
  margin-bottom: 24px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--teal); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #f0f4f8 0%, #8a9bb0 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.hero h1 span { -webkit-text-fill-color: var(--teal); }

.hero-sub {
  font-size: 15px; color: var(--text-secondary);
  max-width: 560px; line-height: 1.7;
}

.scope-strip {
  margin-top: 16px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 212, 180, 0.24);
  background: rgba(0, 212, 180, 0.09);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-mono);
}

.scope-strip strong {
  color: var(--teal);
}

.thesis-line {
  margin-top: 12px;
  max-width: 900px;
  border-left: 3px solid var(--amber);
  background: rgba(245, 166, 35, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  margin-top: 32px;
}
.hero-meta-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  font-family: var(--font-mono);
}
.hero-meta-item strong { color: var(--text-secondary); }

/* ── Summary Cards ──────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: default;
}
.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-top, var(--teal));
  opacity: 0.6;
}
.stat-card.amber::before { --accent-top: var(--amber); }
.stat-card.rose::before  { --accent-top: var(--rose); }
.stat-card.violet::before { --accent-top: var(--violet); }

.stat-icon {
  font-size: 20px; margin-bottom: 12px;
  display: block;
}
.stat-value {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
}
.stat-delta {
  font-size: 11px; font-family: var(--font-mono);
  color: var(--teal); margin-top: 8px;
}

/* ── Section Header ─────────────────────────────── */
.section { margin-bottom: 48px; }
.section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.section-title-group {}
.section-title {
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.section-title .icon { font-size: 16px; }
.section-sub {
  font-size: 13px; color: var(--text-muted); margin-top: 4px;
}
.section-badge {
  display: inline-flex; align-items: center;
  background: var(--teal-dim); color: var(--teal);
  border: 1px solid rgba(0,212,180,0.2);
  font-size: 11px; font-weight: 600; font-family: var(--font-mono);
  padding: 4px 10px; border-radius: 99px;
  white-space: nowrap; align-self: flex-start; margin-top: 4px;
}
.section-badge.amber { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,166,35,0.2); }
.section-badge.rose  { background: var(--rose-dim);  color: var(--rose);  border-color: rgba(255,95,126,0.2); }

.decision-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.map-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 12px;
  font-size: 12px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.map-item span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
}

.map-item:hover {
  border-color: rgba(0, 212, 180, 0.35);
  background: rgba(0, 212, 180, 0.1);
  color: var(--text-primary);
}

/* ── Executive / Method Summary ────────────────── */
.summary-card,
.method-card {
  padding: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.summary-item p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.evidence-links {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.method-col {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
}

.method-col h4 {
  color: var(--text-primary);
  font-size: 13px;
  margin-bottom: 8px;
}

.plain-list {
  list-style: none;
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.plain-list li::before {
  content: '• ';
  color: var(--teal);
}

.reconcile-line {
  margin-top: 10px;
  border: 1px solid rgba(0, 212, 180, 0.22);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 212, 180, 0.08);
}

.reconcile-line strong {
  color: var(--teal);
}

.qa-note {
  margin-top: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap.tall { height: 320px; }

/* ── Anchor Intel Card ──────────────────────────── */
.anchor-card {
  background: linear-gradient(135deg, rgba(0,212,180,0.06) 0%, rgba(0,0,0,0) 60%);
  border: 1px solid rgba(0,212,180,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
  position: relative; overflow: hidden;
}
.anchor-card::after {
  content: '🔑 ANCHOR NETWORK';
  position: absolute; top: 20px; right: 24px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--teal); opacity: 0.5;
  font-family: var(--font-mono);
}

/* ── Tables ─────────────────────────────────────── */
.table-scroll { overflow-x: auto; border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: rgba(255,255,255,0.04); }
th {
  text-align: left; padding: 12px 16px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.03); color: var(--text-primary); }
tbody tr { transition: background 0.15s; }

.handle-cell {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--teal) !important;
}
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 600; font-family: var(--font-mono);
  white-space: nowrap;
}
.badge-anchor { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(0,212,180,0.2); }
.badge-y      { background: rgba(0,212,180,0.1); color: #6ee7d9; }
.badge-n      { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge-lovable { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.badge-gamma   { background: rgba(245,166,35,0.12); color: var(--amber); }
.badge-cartesia{ background: rgba(255,95,126,0.12); color: var(--rose); }
.badge-wispr   { background: rgba(0,212,180,0.12); color: var(--teal); }
.badge-wisprflow { background: rgba(0,212,180,0.12); color: var(--teal); }
.badge-airwallex { background: rgba(96,165,250,0.16); color: #93c5fd; }
.badge-polyai { background: rgba(192,132,252,0.16); color: #d8b4fe; }
.badge-handshake { background: rgba(34,197,94,0.16); color: #86efac; }
.badge-triplewhale { background: rgba(234,179,8,0.16); color: #fde047; }
.badge-superblocks { background: rgba(244,63,94,0.16); color: #fda4af; }
.badge-x       { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.badge-linkedin{ background: rgba(10,102,194,0.2); color: #60a5fa; }
.badge-risk-low { background: rgba(34,197,94,0.16); color: #86efac; border: 1px solid rgba(34,197,94,0.28); }
.badge-risk-medium { background: rgba(245,166,35,0.14); color: #fcd34d; border: 1px solid rgba(245,166,35,0.28); }
.badge-risk-high { background: rgba(244,63,94,0.16); color: #fda4af; border: 1px solid rgba(244,63,94,0.28); }

.num { font-family: var(--font-mono); font-size: 12px; }
.num-good { color: var(--teal); }
.num-mid  { color: var(--amber); }
.num-low  { color: var(--text-muted); }

/* ── Filter Bar ─────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 16px; align-items: center;
}
.filter-bar label { font-size: 12px; color: var(--text-muted); }
.filter-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-family: var(--font-sans);
  padding: 6px 14px; border-radius: 99px; cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--teal-dim); border-color: rgba(0,212,180,0.3);
  color: var(--teal);
}
.filter-btn.active.amber { background: var(--amber-dim); border-color: rgba(245,166,35,0.3); color: var(--amber); }
.filter-btn.active.rose  { background: var(--rose-dim);  border-color: rgba(255,95,126,0.3); color: var(--rose); }
.filter-btn.active.violet{ background: var(--violet-dim);border-color: rgba(167,139,250,0.3);color: var(--violet); }

/* ── Finding Callouts ───────────────────────────── */
.finding-strip {
  background: linear-gradient(90deg, var(--teal-dim) 0%, transparent 100%);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}
.finding-strip strong { color: var(--teal); }

.confidence-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 8px;
  margin-right: 8px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.confidence-high {
  color: #6ee7d9;
  border: 1px solid rgba(0, 212, 180, 0.35);
  background: rgba(0, 212, 180, 0.12);
}

.confidence-medium {
  color: #fcd34d;
  border: 1px solid rgba(245, 166, 35, 0.35);
  background: rgba(245, 166, 35, 0.12);
}

.confidence-directional {
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
}

.evidence-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 8px;
  margin-right: 8px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.evidence-direct {
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(96, 165, 250, 0.14);
}

.evidence-supporting {
  color: #fcd34d;
  border: 1px solid rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.14);
}

.action-line {
  margin-top: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.caveat-line {
  margin-top: 8px;
  padding: 8px 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

/* ── Rollout Timeline ───────────────────────────── */
.timeline-wrap { display: flex; gap: 12px; padding: 8px 0; }
.day-col { flex: 1; }
.day-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
  text-align: center; margin-bottom: 8px;
}
.day-bar-outer {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 8px;
  min-height: 80px;
  display: flex; flex-direction: column; gap: 5px;
}
.post-chip {
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,180,0.2);
  border-radius: 4px; padding: 3px 6px;
  font-size: 10px; font-family: var(--font-mono);
  color: var(--teal); cursor: default;
  transition: background 0.15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-chip:hover { background: rgba(0,212,180,0.25); }
.post-chip.amplified { border-color: rgba(0,212,180,0.5); font-weight: 600; }
.post-chip.campaign-gamma { background: var(--amber-dim); border-color: rgba(245,166,35,0.25); color: var(--amber); }
.post-chip.campaign-cartesia { background: var(--rose-dim); border-color: rgba(255,95,126,0.25); color: var(--rose); }
.post-chip.campaign-wispr { background: var(--violet-dim); border-color: rgba(167,139,250,0.25); color: var(--violet); }
.post-chip.campaign-lovable { background: var(--violet-dim); border-color: rgba(167,139,250,0.25); color: #c4b5fd; }
.post-chip.campaign-wisprflow { background: var(--teal-dim); border-color: rgba(0,212,180,0.3); color: var(--teal); }
.post-chip.campaign-airwallex { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.3); color: #93c5fd; }
.post-chip.campaign-polyai { background: rgba(192,132,252,0.16); border-color: rgba(192,132,252,0.3); color: #d8b4fe; }
.post-chip.campaign-handshake { background: rgba(34,197,94,0.14); border-color: rgba(34,197,94,0.3); color: #86efac; }
.post-chip.campaign-triplewhale { background: rgba(234,179,8,0.16); border-color: rgba(234,179,8,0.3); color: #fde047; }
.post-chip.campaign-superblocks { background: rgba(244,63,94,0.16); border-color: rgba(244,63,94,0.3); color: #fda4af; }

/* ── Tweet Links ─────────────────────────────────── */
.tweet-link {
  color: var(--teal);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  transition: opacity 0.15s;
}
.tweet-link:hover { opacity: 0.75; text-decoration: underline; }
.link-icon {
  font-size: 10px; opacity: 0.5;
  font-style: normal; font-family: var(--font-mono);
  transition: opacity 0.15s;
}
.tweet-link:hover .link-icon { opacity: 1; }

.tweet-link-inline {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tweet-link-inline:hover {
  opacity: 0.75;
}

/* ── Footer ─────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); margin-top: 64px;
  padding: 32px 0; text-align: center;
  font-size: 12px; color: var(--text-muted); font-family: var(--font-mono);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .scope-strip { display: block; }
  .chart-wrap { height: 220px; }
}
