/* Maker Playbooks — scannable table UI
   Type: Bricolage Grotesque (display) + Hanken Grotesk (text).
   Color: committed orange brand. Accent text uses --accent-ink for AA contrast;
   --accent stays vibrant for fills and large display type. */
:root {
  --bg: #faf8f4;
  --surface: #fffdfa;
  --surface-2: #f4efe7;
  --ink: #1b1714;
  --muted: #645c52;     /* ~6.2:1 on --bg — body-safe */
  --faint: #6f6657;     /* AA on both --bg and --surface-2 — small-print-safe */
  --line: #ece6dc;
  --line-2: #e1dacd;
  --accent: #ef4710;        /* vibrant — fills + large display only */
  --accent-ink: #c4380b;    /* ~5:1 on light — accent as small text */
  --accent-soft: #fdeee7;
  --money: #0c7a52;
  --chip: #f3efe7;
  --chip-ink: #3f3a33;
  --glass: rgba(250, 248, 244, 0.85);
  --shadow: 0 1px 2px rgba(28, 22, 16, 0.05);
  --shadow-lift: 0 16px 40px rgba(28, 22, 16, 0.18);
  --radius: 14px;
  --maxw: 1180px;
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* semantic z-index scale */
  --z-sticky: 10;
  --z-tooltip: 60;
}

[data-theme="dark"] {
  --bg: #131110;
  --surface: #1c1917;
  --surface-2: #221e1b;
  --ink: #f3ede4;
  --muted: #a9a094;
  --faint: #968d80;     /* ~5.7:1 on dark — small-print-safe */
  --line: #2a2521;
  --line-2: #332d28;
  --accent: #ff6a3d;
  --accent-ink: #ff7a50;   /* already AA on dark */
  --accent-soft: #2a1b13;
  --money: #34c38a;
  --chip: #262220;
  --chip-ink: #d8d0c5;
  --glass: rgba(19, 17, 16, 0.85);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 16px 50px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html {
  overflow-x: clip; /* contain hover tooltips without breaking scroll/sticky */
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
.faint { color: var(--faint); }
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ----------------------------------------------------------------- top -- */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; }
.brand-mark { display: inline-flex; }
.brand-name { font-family: var(--font-display); font-size: 1.06rem; letter-spacing: -0.02em; }
.brand-name span { color: var(--accent-ink); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--faint); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------------------------------------------------------------- hero -- */
/* Left-aligned editorial spine instead of a centered stack. */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 46px 24px 28px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.eyebrow a:hover { text-decoration-thickness: 2px; }
.hero-sub a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.hero-sub a:hover { text-decoration: underline; text-underline-offset: 2px; }
.hero h1 {
  font-family: var(--font-display);
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { margin: 0; max-width: 60ch; font-size: 1.08rem; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ------------------------------------------------------------ controls -- */
.controls {
  background: transparent;
  margin-top: 10px;
}
.controls-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 180px;
  padding: 0 12px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 11px;
  color: var(--faint);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field input {
  border: 0; background: none; outline: none; flex: 1;
  font: inherit; font-size: 0.95rem; color: var(--ink);
}
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.controls select {
  height: 44px;
  padding: 0 30px 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: var(--ink);
  font: inherit; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; appearance: none; -webkit-appearance: none; max-width: 190px;
}
.controls select:hover { border-color: var(--faint); }
.controls select:focus-visible, .reset-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.result-count { margin-left: auto; font-size: 0.88rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.reset-btn {
  height: 44px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.reset-btn:hover { color: var(--ink); border-color: var(--faint); }
.reset-btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --------------------------------------------------------------- table -- */
.table-region { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 6px; }
.table-wrap {
  overflow-x: auto;
  overflow-y: hidden; /* horizontal-only scroller: lets vertical swipes scroll the page on touch */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
table.founders {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.founders thead th {
  text-align: left;
  padding: 12px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.founders tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
  color: var(--ink);
  height: 46px;
}
.founders tbody tr:last-child td { border-bottom: 0; }
.founders tbody tr { transition: background 0.12s; }
.founders tbody tr:hover { background: var(--surface-2); }

/* column sizing */
.c-rank { width: 44px; text-align: center; color: var(--faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.c-company { min-width: 178px; }
.c-founder { min-width: 138px; }
.c-mrr { width: 130px; }
.c-cat { width: 110px; }
.c-chan { min-width: 138px; }
.c-watch { width: 84px; }
.c-details { width: 104px; text-align: center; }

/* sticky rank + company (left) and the playbook button (right) while
   scrolling sideways, so the key context + the open-card action are always
   visible no matter how wide the table gets. */
.founders th.c-rank, .founders td.c-rank { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.founders th.c-company, .founders td.c-company { position: sticky; left: 44px; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.founders th.c-details, .founders td.c-details { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: inset 1px 0 0 var(--line); }
.founders thead th.c-rank, .founders thead th.c-company, .founders thead th.c-details { z-index: 3; background: var(--surface-2); }
.founders tbody tr:hover td.c-rank, .founders tbody tr:hover td.c-company, .founders tbody tr:hover td.c-details { background: var(--surface-2); }

/* company cell */
.fav {
  width: 22px; height: 22px; border-radius: 5px; object-fit: contain;
  background: var(--surface-2); border: 1px solid var(--line); padding: 2px;
  vertical-align: middle; margin-right: 9px;
}
.company {
  display: inline-block; max-width: 128px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  font-weight: 650; letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
a.company:hover { color: var(--accent-ink); }

/* founder cell */
.founder { display: inline-flex; align-items: center; gap: 6px; max-width: 124px; text-decoration: none; color: var(--muted); font-weight: 500; }
.founder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.founder:hover { color: var(--accent-ink); }
.founder-ic { display: inline-flex; color: var(--faint); flex: 0 0 auto; }
.founder-ic svg { width: 13px; height: 13px; }
a.founder:hover .founder-ic { color: var(--accent-ink); }

/* revenue cell */
.rev-line { display: inline-flex; align-items: baseline; gap: 5px; }
.rev-num { font-size: 0.98rem; font-weight: 750; letter-spacing: -0.02em; color: var(--money); font-variant-numeric: tabular-nums; }
.rev-b-none .rev-num { color: var(--ink); }
.rev-num.rev-dash { color: var(--faint); }
.rev-qual { font-size: 0.62rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.rev-qual.rev-annualized, .rev-qual.rev-derived { color: var(--accent-ink); }
.info { display: inline-flex; align-items: center; position: relative; color: var(--faint); cursor: help; }
.info svg { width: 14px; height: 14px; }
.info:hover, .info:focus { color: var(--accent-ink); outline: none; }
.tip {
  position: absolute; top: calc(100% + 8px); right: -4px;
  width: 250px; max-width: 70vw; padding: 10px 12px;
  background: var(--ink); color: var(--bg);
  font-size: 0.78rem; font-weight: 450; line-height: 1.45; letter-spacing: 0;
  text-align: left; white-space: normal; border-radius: 10px; box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s; z-index: var(--z-tooltip);
}
.tip::after { content: ""; position: absolute; top: -5px; right: 9px; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); }
.info:hover .tip, .info:focus .tip { opacity: 1; visibility: visible; transform: none; }

/* category badge */
.cat-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 650;
  padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); white-space: nowrap;
}
.cat-web-saas { background: #e8f0fe; color: #14478f; }
.cat-mobile-app { background: #eafaf1; color: #0b6a41; }
.cat-portfolio-multiple { background: #f3ecfe; color: #5d2bb0; }
.cat-agency-service { background: #fef0e8; color: #a8480c; }
.cat-content-newsletter { background: #fff4e0; color: #8a6108; }
.cat-ecommerce { background: #fde9f1; color: #a8235e; }
.cat-course-info-product { background: #e6f6fb; color: #0a6b85; }
.cat-chrome-extension { background: #eef1f4; color: #3f4a59; }
[data-theme="dark"] .cat-badge { background: var(--chip); color: var(--chip-ink); }

/* icon cells */
.ic-row { display: inline-flex; align-items: center; gap: 6px; }
.cell-ic { display: inline-flex; color: var(--ic, var(--muted)); }
.cell-ic svg { width: 16px; height: 16px; display: block; }

/* watch cell */
.watch { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 550; }
.watch:hover { color: var(--ink); }
.watch-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); flex: 0 0 auto; }
.watch-ic svg { width: 11px; height: 11px; }
.watch:hover .watch-ic { background: var(--accent); color: #fff; }

/* details button — accent-tinted so it reads as the row's primary action */
.details-btn {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--accent-soft);
  background: var(--accent-soft); color: var(--accent-ink);
  font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: color 0.13s, background 0.13s, border-color 0.13s;
}
.details-btn:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.details-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* pills (used in detail card) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 8px; border-radius: 999px;
  background: var(--chip); color: var(--chip-ink); font-size: 0.8rem; font-weight: 550;
}
.pill-ic { display: inline-flex; color: var(--ic, var(--faint)); }
.pill-ic svg { width: 14px; height: 14px; display: block; }
.mtags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.mtag { font-size: 0.72rem; font-weight: 550; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--chip-ink); border: 1px solid var(--line); }

/* ----------------------------------------------------------- detail card -- */
.detail {
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 26px 28px 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
  position: fixed;
  inset: 0;
  margin: auto;
}
.detail::backdrop { background: rgba(20, 16, 12, 0.5); backdrop-filter: blur(3px); }
.detail-close {
  position: absolute; top: 14px; right: 16px;
  width: 36px; height: 36px; border-radius: 9px; border: 0;
  background: var(--surface-2); color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.detail-close:hover { color: var(--ink); background: var(--chip); }
.detail-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-head { display: flex; align-items: flex-start; gap: 14px; padding-right: 36px; }
.d-fav { width: 46px; height: 46px; border-radius: 11px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); padding: 5px; flex: 0 0 auto; }
.d-head h3 { font-family: var(--font-display); margin: 0; font-size: 1.34rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-head h3 a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.d-head h3 a:hover { color: var(--accent-ink); }
.d-head h3 .ext svg { width: 14px; height: 14px; }
.d-sub { margin: 5px 0 0; font-size: 0.9rem; color: var(--muted); }
.d-sub a { text-decoration: none; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.d-sub a:hover { color: var(--accent-ink); }
.d-rev { margin-left: auto; text-align: right; white-space: nowrap; }
.d-rev .rev-num { font-size: 1.4rem; }
.d-revnote { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); font-style: italic; }
/* quote: hanging mark, no side-stripe */
.d-quote {
  margin: 18px 0 4px; padding: 4px 0 4px 0; position: relative;
  font-size: 1.08rem; line-height: 1.5; font-weight: 500; font-style: italic; color: var(--ink);
}
.d-quote::before {
  content: "\201C"; font-family: Georgia, "Times New Roman", serif;
  font-style: normal; font-size: 1.6em; line-height: 0; color: var(--accent);
  margin-right: 4px; vertical-align: -0.35em;
}
.d-pills { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 4px; }
.d-pillgroup { display: flex; flex-direction: column; gap: 7px; }
.d-pilllabel { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); }
.d-sec { margin-top: 18px; }
.d-sec h4 { margin: 0 0 6px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.01em; color: var(--accent-ink); }
.d-sec p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--muted); max-width: 64ch; }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.d-btn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 10px 15px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: 0.88rem; font-weight: 600;
}
.d-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-btn:hover { border-color: var(--faint); }
.d-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.d-btn.primary .watch-ic { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* empty / error */
.empty-state { padding: 56px 24px; text-align: center; }
.empty-state h3 { font-family: var(--font-display); margin: 0 0 16px; font-weight: 700; }
.load-error { padding: 40px; text-align: center; color: var(--muted); }
#sentinel { height: 1px; }

/* ---------------------------------------------------------- analytics --- */
.insights { border-top: 1px solid var(--line); margin-top: 48px; }
/* full-bleed bands that alternate background so each section reads as its own
   block; the hairline between bands is the only divider (none under headings) */
.ins-band { background: var(--surface-2); }
.ins-band-alt { background: var(--bg); }
.ins-band + .ins-band { border-top: 1px solid var(--line); }
.insights-inner { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; }
.ins-band:first-child .insights-inner { padding-top: 68px; }
.ins-band:last-child .insights-inner { padding-bottom: 48px; }

/* section intro — left-aligned editorial, no uppercase eyebrow */
.ins-head { max-width: 760px; }
.ins-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 700; letter-spacing: -0.005em;
  color: var(--accent-ink); margin-bottom: 14px;
}
.ins-kicker-ic { display: inline-flex; color: var(--accent); }
.ins-kicker-ic svg { width: 16px; height: 16px; }
.ins-head h2 { font-family: var(--font-display); margin: 0 0 14px; font-size: clamp(1.9rem, 4.6vw, 2.8rem); letter-spacing: -0.035em; font-weight: 800; line-height: 1.04; text-wrap: balance; }
.ins-head h2 em { font-style: normal; color: var(--accent); }
.ins-head p { margin: 0; font-size: 1.06rem; line-height: 1.65; color: var(--muted); max-width: 62ch; text-wrap: pretty; }

/* decorative brand-icon band */
.icon-map { display: flex; flex-wrap: wrap; gap: 15px; margin: 28px 0 0; max-width: 640px; }
.map-ic { display: inline-flex; color: var(--ic, var(--faint)); opacity: 0.6; transition: opacity 0.15s, transform 0.15s; }
.map-ic:hover { opacity: 1; transform: translateY(-2px); }
.map-ic svg { width: 22px; height: 22px; display: block; }

/* editorial stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 44px 0 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 26px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-num { font-family: var(--font-display); display: block; font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.stat-num small { font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-left: 1px; }
.stat-label { display: block; margin-top: 11px; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }

/* sections — heading-led, no numbered scaffolding */
.sec { margin-top: 50px; }
.insights-inner > .sec:first-child { margin-top: 0; }
.sec-head { margin-bottom: 28px; max-width: 760px; }
.sec-titles h3 { font-family: var(--font-display); margin: 0; font-size: clamp(1.45rem, 3vw, 1.8rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
.sec-titles p { margin: 8px 0 0; font-size: 0.98rem; line-height: 1.55; color: var(--muted); max-width: 62ch; text-wrap: pretty; }

/* consensus playbook — editorial list, not boxes */
.playbook { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 40px; }
.playbook li { display: flex; gap: 15px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pb-ic {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.pb-ic svg { width: 19px; height: 19px; }
.pb-body h4 { font-family: var(--font-display); margin: 0 0 5px; font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.pb-body h4 em { font-style: normal; color: var(--accent-ink); }
.pb-body p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--muted); max-width: 52ch; text-wrap: pretty; }
.pb-body p em { font-style: italic; color: var(--ink); }

/* bar charts */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 22px; box-shadow: var(--shadow);
}
.chart-card.chart-wide { grid-column: 1 / -1; }
.chart-card h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 0.92rem; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.ch-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); flex: 0 0 auto; }
.ch-ic svg { width: 15px; height: 15px; }
.chart-note { font-weight: 500; letter-spacing: 0; color: var(--faint); font-size: 0.78rem; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 42px; align-items: center; gap: 12px; }
.bar-label { display: inline-flex; align-items: center; gap: 7px; font-size: 0.84rem; font-weight: 550; color: var(--ink); min-width: 0; }
.bar-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-ic { display: inline-flex; color: var(--ic, var(--muted)); flex: 0 0 auto; }
.bar-ic svg { width: 15px; height: 15px; display: block; }
.bar-track { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
[data-theme="dark"] .bar-track { background: var(--chip); }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); transform-origin: left center; }
.bar-val { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* distribution engines — no side-stripe; a header rule carries the distinction */
.engines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.engine {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 20px; box-shadow: var(--shadow);
}
.engine-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.engine-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.engine-ic svg { width: 22px; height: 22px; }
.engine-tag { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: -0.005em; color: var(--accent-ink); }
.engine-head h4 { font-family: var(--font-display); margin: 3px 0 0; font-size: 1.16rem; font-weight: 800; letter-spacing: -0.02em; }
.engine ol { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 10px; }
.engine li { font-size: 0.9rem; line-height: 1.5; color: var(--muted); padding-left: 4px; max-width: 56ch; }
.engine li::marker { color: var(--accent-ink); font-weight: 700; }
.engine li em { font-style: italic; color: var(--ink); }

/* quotes — a featured lead quote breaks the identical-card grid */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote-grid blockquote {
  margin: 0; position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 30px 22px 20px; box-shadow: var(--shadow);
}
.quote-grid blockquote.lead { grid-column: span 2; background: var(--ink); border-color: var(--ink); }
.quote-grid blockquote.lead p { color: var(--bg); font-size: 1.4rem; line-height: 1.32; }
/* lead card inverts per theme, so the orange must flip to stay AA on it */
.quote-grid blockquote.lead cite { color: #ff7a50; }
.quote-grid blockquote.lead::before { color: #ff7a50; opacity: 0.9; }
[data-theme="dark"] .quote-grid blockquote.lead cite,
[data-theme="dark"] .quote-grid blockquote.lead::before { color: #c4380b; }
.quote-grid blockquote::before {
  content: "\201C"; position: absolute; left: 18px; top: 10px;
  font-family: Georgia, "Times New Roman", serif; font-size: 3rem; line-height: 1; color: var(--accent); opacity: 0.3;
}
.quote-grid blockquote p { margin: 0; font-size: 0.98rem; line-height: 1.5; font-weight: 500; font-style: italic; color: var(--ink); position: relative; }
.q-by { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.q-avatar {
  position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--av, var(--accent)); color: #fff; font-size: 0.86rem; font-weight: 700; line-height: 1;
}
.q-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--av, var(--accent)); }
.quote-grid cite { font-style: normal; font-size: 0.8rem; font-weight: 700; color: var(--accent-ink); }

.ins-caveat { max-width: 64ch; margin: 50px 0 0; font-size: 0.86rem; line-height: 1.6; color: var(--faint); text-wrap: pretty; }

/* footer */
.site-foot {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 24px 48px;
  border-top: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 0.88rem; color: var(--muted);
}
.foot-thanks { max-width: 64ch; }
.foot-thanks p { margin: 0; line-height: 1.6; }
.foot-thanks .foot-fine { margin-top: 6px; font-size: 0.82rem; color: var(--faint); }
.foot-thanks a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-thanks a:hover { color: var(--accent-ink); }
.site-foot .twitter { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; color: var(--ink); white-space: nowrap; flex: 0 0 auto; }
.site-foot .twitter:hover { color: var(--accent-ink); }

/* ------------------------------------------------------------- motion --- */
/* Reveal-safe: hidden initial state applies ONLY when JS is present AND the
   user accepts motion. No JS, reduced motion, or headless render => visible. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(16px); }
  html.js .reveal.in {
    opacity: 1; transform: none;
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html.js .reveal.stagger > * { opacity: 0; transform: translateY(14px); }
  html.js .reveal.stagger.in > * {
    opacity: 1; transform: none;
    transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html.js .reveal.stagger.in > *:nth-child(2) { transition-delay: 0.06s; }
  html.js .reveal.stagger.in > *:nth-child(3) { transition-delay: 0.12s; }
  html.js .reveal.stagger.in > *:nth-child(4) { transition-delay: 0.18s; }
  html.js .reveal.stagger.in > *:nth-child(5) { transition-delay: 0.24s; }
  html.js .reveal.stagger.in > *:nth-child(6) { transition-delay: 0.30s; }

  /* hero entrance on load */
  html.js .hero .eyebrow,
  html.js .hero h1,
  html.js .hero-sub { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
  html.js .hero h1 { animation-delay: 0.06s; }
  html.js .hero-sub { animation-delay: 0.14s; }

  /* bars grow from zero when their card scrolls into view */
  html.js .chart-card .bar-fill { transform: scaleX(0); }
  html.js .chart-card.in .bar-fill { transform: scaleX(1); transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
  html.js .chart-card.in .bar-row:nth-child(2) .bar-fill { transition-delay: 0.05s; }
  html.js .chart-card.in .bar-row:nth-child(3) .bar-fill { transition-delay: 0.1s; }
  html.js .chart-card.in .bar-row:nth-child(4) .bar-fill { transition-delay: 0.15s; }
  html.js .chart-card.in .bar-row:nth-child(5) .bar-fill { transition-delay: 0.2s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 940px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card.chart-wide { grid-column: auto; }
  .playbook { grid-template-columns: 1fr; gap: 0; }
  .engines { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid blockquote.lead { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .controls select { flex: 1 1 auto; max-width: none; }
  .result-count { width: 100%; margin-left: 0; order: 5; }
  .table-region { padding: 16px 12px 6px; }
  .detail { padding: 22px 20px 20px; }
  .d-head h3 { font-size: 1.18rem; }
  .d-rev { margin-left: 0; }
  .insights-inner { padding: 44px 16px; }
  .ins-band:first-child .insights-inner { padding-top: 46px; }
  .sec { margin-top: 40px; }

  /* phones: drop the sticky columns so the whole table scrolls as one block,
     instead of a tiny strip wedged between the sticky columns */
  .founders th.c-rank, .founders td.c-rank,
  .founders th.c-company, .founders td.c-company,
  .founders th.c-details, .founders td.c-details {
    position: static;
    box-shadow: none;
  }
  .stat-num { font-size: 2.2rem; }
  .quote-grid { grid-template-columns: 1fr; }
  .quote-grid blockquote.lead { grid-column: auto; }
  .quote-grid blockquote.lead p { font-size: 1.2rem; }
  .bar-row { grid-template-columns: 124px 1fr 40px; gap: 9px; }
}

@media (max-width: 480px) {
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
