/* =============================================
   PipelineIQ — Theme CSS
   ============================================= */

:root {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --border: #27272a;
  --fg: #fafafa;
  --fg-muted: #71717a;
  --fg-subtle: #52525b;
  --accent: #22d66e;
  --accent-dim: rgba(34, 214, 110, 0.12);
  --danger: #ef4444;
  --warning: #f59e0b;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }
.nav-cta-link {
  color: var(--accent) !important;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 13px !important;
  transition: background 0.15s, color 0.15s !important;
}
.nav-cta-link:hover { background: var(--accent) !important; color: #09090b !important; }

/* Hero CTA row */
.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  background: var(--accent);
  color: #09090b;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}
.hero-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.hero-cta-note { font-size: 12px; color: var(--fg-subtle); }

/* Section base */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-headline {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 20px;
}

.section-body {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 640px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(34, 214, 110, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 214, 110, 0.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  padding: 0 24px 0 0;
}

.proof-stat:first-child { padding-left: 0; }

.proof-num {
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.proof-label {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.proof-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
  margin: 0 24px 0 0;
}

/* Diagnostic Widget */
.diagnostic-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  font-size: 13px;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.widget-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.widget-score {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.score-warning { color: var(--warning); }

.widget-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.widget-metric {
  background: var(--surface-2);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.metric-val.danger { color: var(--danger); }
.metric-val.warning { color: var(--warning); }
.metric-val.success { color: var(--accent); }

.metric-label {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.widget-stage-bar { margin-bottom: 20px; }

.stage-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 10px;
}

.stage-bars { display: flex; flex-direction: column; gap: 8px; }

.stage-bar-item {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.bar-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.stage-1 { background: #22d66e; }
.stage-2 { background: #3b82f6; }
.stage-3 { background: #a855f7; }
.stage-4 { background: #f59e0b; }
.stage-5 { background: #ef4444; }

.stage-name { font-size: 12px; color: var(--fg-muted); }
.stage-count { font-size: 12px; color: var(--fg); text-align: right; font-weight: 500; }

.widget-risk-list {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px;
}

.risk-header {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.risk-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.risk-item:last-child { border-bottom: none; padding-bottom: 0; }

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.risk-dot.danger { background: var(--danger); }
.risk-dot.warning { background: var(--warning); }

.risk-name { font-size: 13px; color: var(--fg); font-weight: 500; }
.risk-tag { font-size: 11px; color: var(--fg-subtle); }

/* Diagnostics section */
.diagnostics {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.diag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}

.diag-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.diag-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 214, 110, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.diag-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
}

.diag-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}

.diag-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 0;
}

.dstat {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 32px 0 0;
}

.dstat:first-child { padding-left: 0; }

.dstat-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.dstat-text {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.dstat-sep {
  width: 1px;
  height: 60px;
  background: var(--border);
  margin: 0 32px 0 0;
}

/* Features */
.features {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
}

.feat-card {
  background: var(--surface);
  padding: 36px 32px;
}

.feat-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 214, 110, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.feat-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
}

.feat-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* How It Works */
.how-it-works {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 64px;
}

.step {
  flex: 1;
}

.step-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
  opacity: 0.4;
}

.step-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
}

.step-body p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.step-connector {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  margin: 28px 32px 0;
  flex-shrink: 0;
}

/* Pricing */
.pricing {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
}

.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(34, 214, 110, 0.05) 0%, var(--surface) 100%);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
}

.pricing-tier {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.pricing-price {
  font-size: 44px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.per-mo {
  font-size: 18px;
  font-weight: 400;
  color: var(--fg-muted);
}

.pricing-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--fg-muted);
  padding-left: 20px;
  position: relative;
}

.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

.pricing-note {
  font-size: 12px;
  color: var(--fg-subtle);
  font-style: italic;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Closing */
.closing {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.closing h2 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 24px;
}

.closing-sub {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 600px;
  margin: 0 auto 56px;
}

.closing-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.cp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 0 32px;
}

.cp-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}

.cp-label {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  text-align: center;
}

.cp-sep {
  width: 1px;
  height: 60px;
  background: var(--border);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--fg);
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

.footer-copy {
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { display: none; }
  .diag-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; gap: 32px; }
  .step-connector { width: 40px; height: 1px; margin: 0; }
  .diag-stats { flex-direction: column; gap: 24px; }
  .dstat-sep { width: 40px; height: 1px; }
  .closing-proof { flex-direction: column; gap: 24px; }
  .cp-sep { width: 40px; height: 1px; }
  .hero-proof { flex-wrap: wrap; gap: 16px; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .section-inner { padding: 0 20px; }
  .hero-inner { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
}

/* =============================================
   Ghost Deal Detector — /detector
   ============================================= */

.detector-hero {
  padding: 120px 32px 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.detector-hero-inner { max-width: 720px; margin: 0 auto; }

.detector-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 16px;
}
.detector-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.detector-privacy {
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Input section */
.detector-input-section {
  padding: 48px 32px;
}
.detector-inner {
  max-width: 900px;
  margin: 0 auto;
}

.input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.tab-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--fg); border-color: var(--fg-muted); }
.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #09090b;
  font-weight: 600;
}

.tab-panel { /* visible by default */ }
.tab-panel.hidden { display: none; }

.tab-desc {
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.tab-desc code {
  font-family: monospace;
  font-size: 12px;
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--accent);
  color: #09090b;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-secondary:hover { color: var(--fg); border-color: var(--fg-muted); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.csv-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: monospace;
  font-size: 13px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.csv-textarea:focus { outline: none; border-color: var(--accent); }
.csv-textarea::placeholder { color: var(--fg-subtle); }

.csv-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.csv-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 6px;
  padding: 10px 14px;
}
.csv-error.hidden { display: none; }

/* Results */
.detector-results {
  padding: 0 32px 56px;
  animation: fadeIn 0.3s ease;
}
.detector-results.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.results-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.summary-stat { text-align: center; min-width: 72px; }
.summary-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.summary-label { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }
.summary-stat-ghost .summary-num { color: var(--danger); }
.summary-stat-atrisk .summary-num { color: var(--warning); }
.summary-stat-healthy .summary-num { color: var(--accent); }
.summary-divider { width: 1px; height: 48px; background: var(--border); }
.summary-headline { font-size: 1rem; color: var(--fg); line-height: 1.5; flex: 1; min-width: 200px; }
.pct-flag { color: var(--danger); font-weight: 700; font-size: 1.1em; }

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.tier-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { color: var(--fg); }
.filter-btn.active { background: var(--surface-2); color: var(--fg); border-color: var(--fg-muted); }

.table-scroll { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.results-table th {
  background: var(--surface);
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.results-table th.sortable { cursor: pointer; user-select: none; }
.results-table th.sortable:hover { color: var(--fg); }
.sort-icon { opacity: 0.4; font-size: 10px; }
.results-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--fg);
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--surface); }

.td-name { font-weight: 500; white-space: nowrap; }
.td-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-stage { white-space: nowrap; color: var(--fg-muted); }
.td-score { width: 72px; text-align: center; }
.td-tier { white-space: nowrap; }
.td-reason { color: var(--fg-muted); font-size: 13px; min-width: 220px; max-width: 380px; line-height: 1.4; }

.score-pill {
  display: inline-block;
  width: 42px;
  text-align: center;
  padding: 3px 0;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.score-ghost { background: rgba(239,68,68,0.12); color: #f87171; }
.score-atrisk { background: rgba(245,158,11,0.12); color: #fbbf24; }
.score-healthy { background: rgba(34,214,110,0.12); color: #4ade80; }

.tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tier-ghost { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.tier-atrisk { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.tier-healthy { background: rgba(34,214,110,0.12); color: #4ade80; border: 1px solid rgba(34,214,110,0.25); }

/* Disclosure section */
.how-works-disclosure {
  padding: 64px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.disclosure-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--fg);
}
.disclosure-intro {
  color: var(--fg-muted);
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.disclosure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.disclosure-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.disclosure-weight {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.disclosure-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.disclosure-card p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.disclosure-tiers { display: flex; gap: 12px; flex-wrap: wrap; }

/* Bottom CTA */
.detector-cta {
  padding: 80px 32px;
  text-align: center;
}
.cta-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 12px;
}
.cta-sub {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.btn-cta {
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 10px;
}
.cta-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--fg-subtle);
}

/* Post-results Conversion CTA */
.detector-conversion {
  padding: 0 32px 48px;
}
.detector-conversion.hidden { display: none; }

.conversion-box {
  background: linear-gradient(135deg, rgba(34,214,110,0.08) 0%, rgba(34,214,110,0.03) 100%);
  border: 1px solid rgba(34,214,110,0.25);
  border-radius: 16px;
  padding: 40px 44px;
  text-align: center;
  animation: fadeIn 0.35s ease;
}

.conv-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 14px;
  line-height: 1.25;
}

.conv-sub {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.conv-cta-btn {
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 10px;
  background: var(--accent);
  color: #09090b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.conv-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px auto;
  max-width: 380px;
  color: var(--fg-subtle);
  font-size: 13px;
}
.conv-divider::before, .conv-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.conv-lead-form { max-width: 420px; margin: 0 auto; }
.conv-lead-label {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.conv-lead-row {
  display: flex;
  gap: 10px;
}

.conv-email-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color 0.15s;
}
.conv-email-input:focus { outline: none; border-color: var(--accent); }
.conv-email-input::placeholder { color: var(--fg-subtle); }

.conv-lead-msg { font-size: 13px; margin-top: 10px; }
.conv-lead-msg.hidden { display: none; }
.conv-lead-msg-success { color: var(--accent); }
.conv-lead-msg-error { color: var(--danger); }

/* Detector responsive */
@media (max-width: 900px) {
  .disclosure-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .detector-hero { padding: 100px 20px 40px; }
  .detector-input-section, .detector-results, .how-works-disclosure, .detector-cta, .detector-conversion { padding-left: 20px; padding-right: 20px; }
  .results-summary { flex-direction: column; align-items: flex-start; gap: 16px; }
  .summary-divider { width: 100%; height: 1px; }
  .disclosure-grid { grid-template-columns: 1fr; }
  .conversion-box { padding: 28px 20px; }
  .conv-lead-row { flex-direction: column; }
}