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

:root {
  --navy:    #0f172a;
  --navy-lt: #1e293b;
  --blue:    #2563eb;
  --blue-lt: #3b82f6;
  --sky:     #e0f2fe;
  --green:   #16a34a;
  --amber:   #d97706;
  --purple:  #7c3aed;
  --cyan:    #0891b2;
  --gray:    #6b7280;
  --red:     #dc2626;
  --border:  #e2e8f0;
  --bg:      #f8fafc;
  --text:    #1e293b;
  --muted:   #64748b;
  --card-bg: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

/* ── HEADER ── */
header {
  background: var(--navy);
  color: #fff;
  padding: 72px 24px 60px;
  text-align: center;
}
.header-label {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
header h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.2;
  max-width: 820px;
  margin: 0 auto 16px;
}
header .subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: #94a3b8;
  max-width: 640px;
  margin: 0 auto 28px;
}
.meta {
  font-size: 12px;
  color: #64748b;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ── VERDICT BANNER ── */
.verdict-banner {
  background: #fef3c7;
  border-top: 4px solid var(--amber);
  padding: 20px 24px;
  text-align: center;
}
.verdict-banner p {
  max-width: 860px;
  margin: 0 auto;
  font-size: 15px;
  color: #92400e;
}
.verdict-banner strong { font-weight: 700; }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 60px 0; }
section + section { border-top: 1px solid var(--border); }

h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}
h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; color: var(--navy); }
p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px;
  text-align: center;
}
.stat-card .number {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-card .sublabel { font-size: 11px; color: var(--muted); margin-top: 4px; }
.c-blue   { color: var(--blue); }
.c-green  { color: var(--green); }
.c-amber  { color: var(--amber); }
.c-gray   { color: var(--gray); }
.c-purple { color: var(--purple); }
.c-red    { color: var(--red); }

/* ── CHARTS ── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.chart-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.chart-card p.chart-desc { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.chart-wrap { position: relative; }
.chart-wrap canvas { max-height: 260px; }

/* ── LEGEND ── */
.cat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── TABLE CONTROLS ── */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  transition: border-color .15s;
}
.search-box:focus { border-color: var(--blue); }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 7px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  color: var(--text);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-btn[data-cat="successful_founder"].active { background: #16a34a; border-color: #16a34a; }
.filter-btn[data-cat="founder_unclear"].active    { background: #7c3aed; border-color: #7c3aed; }
.filter-btn[data-cat="operator"].active           { background: #0891b2; border-color: #0891b2; }
.filter-btn[data-cat="finance"].active            { background: #d97706; border-color: #d97706; }
.filter-btn[data-cat="technical"].active          { background: #6b7280; border-color: #6b7280; }
.filter-btn[data-cat="unclear"].active            { background: #94a3b8; border-color: #94a3b8; }

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--navy);
  color: #e2e8f0;
  text-align: left;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
thead th:hover { background: var(--navy-lt); }
thead th.sort-asc::after  { content: ' ↑'; opacity: .7; }
thead th.sort-desc::after { content: ' ↓'; opacity: .7; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: var(--sky); }
tbody td { padding: 10px 14px; vertical-align: top; border-top: 1px solid var(--border); }
.name-cell { font-weight: 600; white-space: nowrap; }
.firm-cell { color: var(--muted); font-size: 12px; }
.founded-cell { font-size: 12px; max-width: 160px; }
.invest-cell { font-size: 12px; color: var(--muted); max-width: 200px; }
.conf-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  width: 80px;
  margin-top: 4px;
}
.conf-fill { height: 100%; border-radius: 2px; background: var(--blue); }

.cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.badge-successful_founder { background: #dcfce7; color: #15803d; }
.badge-founder_unclear    { background: #ede9fe; color: #6d28d9; }
.badge-operator           { background: #e0f2fe; color: #0369a1; }
.badge-finance            { background: #fef3c7; color: #92400e; }
.badge-technical          { background: #f1f5f9; color: #475569; }
.badge-unclear            { background: #f3f4f6; color: #6b7280; }

.source-links { font-size: 11px; }
.source-links a { color: var(--blue); text-decoration: none; margin-right: 6px; }
.source-links a:hover { text-decoration: underline; }

.table-footer {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── CASE STUDIES ── */
.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) { .cases-grid { grid-template-columns: 1fr; } }
.case-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.case-header {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}
.case-header.green  { background: var(--green); }
.case-header.amber  { background: var(--amber); }
.case-list { list-style: none; padding: 6px 0; }
.case-list li {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.case-list li:last-child { border-bottom: none; }
.case-list li strong { display: block; font-weight: 600; }
.case-list li span { color: var(--muted); font-size: 12px; }

/* ── ACADEMIC ── */
.paper-list { list-style: none; }
.paper-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.paper-list li:last-child { border-bottom: none; }
.paper-list li strong { display: block; font-weight: 600; margin-bottom: 3px; }
.paper-list li a { color: var(--blue); text-decoration: none; font-size: 13px; }
.paper-list li a:hover { text-decoration: underline; }
.paper-list li .abstract { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── LIMITATIONS / METHODOLOGY ── */
.info-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 20px;
  font-size: 14px;
}
.info-box h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
ul.bullet-list {
  padding-left: 20px;
  font-size: 14px;
}
ul.bullet-list li { margin-bottom: 6px; }

/* ── CONCLUSION ── */
.verdict-box {
  background: var(--navy);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 36px 40px;
  margin-top: 8px;
}
.verdict-box h3 { color: #fff; font-size: 20px; margin-bottom: 16px; }
.verdict-box p { font-size: 15px; margin-bottom: 12px; color: #cbd5e1; }
.verdict-box .verdict-result {
  font-size: 18px;
  font-weight: 700;
  color: #fbbf24;
  margin: 20px 0 4px;
}

/* ── DOWNLOAD ── */
.download-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.download-bar p { margin: 0; font-size: 14px; flex: 1; }
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  border: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--blue); color: var(--blue); }

/* ── SOURCES ── */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.source-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
}
.source-item strong { display: block; font-weight: 600; margin-bottom: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.source-item a { color: var(--blue); text-decoration: none; word-break: break-all; }
.source-item a:hover { text-decoration: underline; }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: #64748b;
  text-align: center;
  padding: 28px 24px;
  font-size: 12px;
}
footer a { color: #94a3b8; text-decoration: none; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
  padding: 12px 24px;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s;
}
nav a:hover { color: #fff; }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
}
