:root {
  color-scheme: light;
  --bg: #fff6cf;
  --bg-soft: #f7efd7;
  --bg-deep: #efe5bf;
  --surface: rgba(255, 252, 245, 0.88);
  --surface-alt: rgba(255, 250, 240, 0.95);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(120, 101, 40, 0.14);
  --line-strong: rgba(120, 101, 40, 0.22);
  --text: #17130d;
  --text-soft: #5f5541;
  --text-muted: #8e836f;
  --green: #18b05d;
  --red: #ef4f45;
  --yellow: #ffdd00;
  --shadow: 0 18px 50px rgba(75, 55, 10, 0.08);
  --shadow-soft: 0 6px 20px rgba(75, 55, 10, 0.06);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1117;
  --bg-soft: #141924;
  --bg-deep: #1b2230;
  --surface: rgba(21, 26, 35, 0.88);
  --surface-alt: rgba(24, 30, 42, 0.94);
  --surface-strong: rgba(27, 34, 48, 0.98);
  --line: rgba(255, 221, 0, 0.14);
  --line-strong: rgba(255, 221, 0, 0.24);
  --text: #f6f2e9;
  --text-soft: #cbc1ad;
  --text-muted: #9d9482;
  --green: #46d57f;
  --red: #ff7c72;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 221, 0, 0.18), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.25), transparent 16%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 48%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--sans);
  transition: background 220ms ease, color 220ms ease;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 221, 0, 0.12), transparent 22%),
    radial-gradient(circle at 85% 0%, rgba(85, 115, 255, 0.14), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 48%, var(--bg-deep) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1560px, calc(100vw - 52px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 0 30px;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.brand-link {
  color: inherit;
}

.brand-logo {
  width: 210px;
  height: auto;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(255, 221, 0, 0.18));
}

.eyebrow,
.section-tag,
.leaderboard-head span,
.metric-label,
.resource-type,
.startup-url,
.builder-note {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.brand-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-copy {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.topbar-links a,
.theme-toggle,
.select-shell,
.toolbar-input input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.topbar-links a,
.theme-toggle {
  padding: 11px 16px;
  color: var(--text-soft);
}

.topbar-links a:hover,
.theme-toggle:hover,
.select-shell:hover,
.toolbar-input input:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.theme-toggle {
  cursor: pointer;
}

.brand-link:hover .brand-name {
  text-decoration: underline;
  text-decoration-color: rgba(21, 21, 21, 0.24);
  text-underline-offset: 4px;
}

.metrics-strip {
  margin-bottom: 26px;
}

.mission-strip {
  width: min(1220px, 100%);
  margin: 0 auto 28px;
}

.mission-card {
  padding: 30px 32px;
  background: linear-gradient(135deg, rgba(255, 221, 0, 0.18), var(--surface-strong));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.mission-card h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
}

.mission-card p {
  margin: 0;
  max-width: 64ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric-card {
  padding: 24px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.metric-value {
  display: block;
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}

.metric-note {
  display: block;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.main-layout {
  width: min(1220px, 100%);
  margin: 0 auto;
}

.startup-logo,
.founder-avatar {
  display: grid;
  place-items: center;
}

.leaderboard-card,
.resources-panel,
.blog-card,
.livestream-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.leaderboard-card {
  padding: 28px 28px 14px;
}

.leaderboard-header,
.table-toolbar,
.resources-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.leaderboard-header {
  padding: 2px 2px 22px;
}

.leaderboard-header h1,
.resources-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
}

.section-tag {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.top-controls,
.table-toolbar {
  display: flex;
  gap: 12px;
}

.select-shell {
  position: relative;
}

.select-shell select,
.toolbar-input input {
  height: 52px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.select-shell select {
  min-width: 126px;
  appearance: none;
  cursor: pointer;
}

.select-shell::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #b6b2aa;
  border-bottom: 2px solid #b6b2aa;
  transform: rotate(45deg);
  pointer-events: none;
}

.toolbar-input input {
  min-width: 320px;
}

.builder-shell select {
  min-width: 170px;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: 52px minmax(280px, 1.8fr) minmax(220px, 1fr) minmax(130px, 0.6fr) minmax(110px, 0.45fr);
  gap: 18px;
}

.leaderboard-head {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-head span {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.leaderboard-row {
  padding: 20px 10px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.rank-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
}

.rank-number {
  font-size: 1rem;
}

.medal {
  font-size: 0.9rem;
}

.startup-main,
.founder-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.startup-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex: 0 0 auto;
}

.startup-copy,
.founder-copy {
  min-width: 0;
}

.startup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.startup-title a,
.startup-title span,
.founder-name {
  font-weight: 700;
  font-size: 1rem;
}

.startup-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1c9;
  color: #b76a00;
  font-family: var(--mono);
  font-size: 0.58rem;
  white-space: nowrap;
}

.startup-description,
.resource-description {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.startup-url,
.builder-note {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.founder-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  flex: 0 0 auto;
}

.founder-name {
  font-size: 0.95rem;
}

.mrr-cell {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
}

.growth-cell {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
}

.growth-cell.positive {
  color: var(--green);
}

.growth-cell.negative {
  color: var(--red);
}

.growth-cell.neutral {
  color: var(--text-muted);
}

.empty-state {
  padding: 50px 20px 56px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
}

.main-content {
  width: min(1220px, 100%);
  margin: 28px auto 0;
}

.resources-panel,
.blog-card,
.livestream-card {
  padding: 30px;
}

.resources-heading {
  margin-bottom: 24px;
}

.resources-heading p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

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

.resource-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-alt);
}

.resource-type {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.resource-card h3 {
  margin: 10px 0 8px;
  font-size: 1.2rem;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.resource-status {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 600;
}

.blog-page {
  width: min(1220px, 100%);
  margin: 28px auto 0;
}

.livestream-list {
  display: grid;
  gap: 18px;
}

.livestream-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-alt);
  box-shadow: var(--shadow-soft);
}

.livestream-row h3 {
  margin: 8px 0 8px;
  font-size: 1.2rem;
}

.livestream-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.livestream-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.blog-page-title {
  margin: 0;
  font-size: clamp(1.95rem, 3vw, 2.45rem);
}

.blog-list {
  display: grid;
  gap: 18px;
}

.blog-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-alt);
  box-shadow: var(--shadow-soft);
}

.blog-row h2 {
  margin: 8px 0 8px;
  font-size: 1.28rem;
}

.blog-row p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.blog-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(70, 213, 127, 0.12);
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-row-meta {
  flex: 0 0 auto;
  padding-top: 4px;
}

@media (max-width: 1260px) {
  .main-layout {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .site-header,
  .leaderboard-header,
  .table-toolbar,
  .resources-heading,
  .blog-row,
  .livestream-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats,
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-controls,
  .table-toolbar {
    width: 100%;
    flex-wrap: wrap;
  }

  .toolbar-input input,
  .select-shell,
  .select-shell select {
    width: 100%;
  }

  .leaderboard-card,
  .resources-panel,
  .blog-card,
  .livestream-card,
  .mission-card {
    padding: 24px;
  }

  .leaderboard-head {
    display: none;
  }

  .leaderboard-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .leaderboard-row > div::before {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .rank-cell::before {
    content: "#";
  }

  .startup-cell::before {
    content: "Startup";
  }

  .founder-cell::before {
    content: "Founder";
  }

  .mrr-cell::before {
    content: "MRR";
  }

  .growth-cell::before {
    content: "MoM Growth";
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 24px, 1600px);
    padding: 18px 0 44px;
  }

  .hero-stats,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    flex-direction: column;
  }

  .brand-logo {
    width: 176px;
  }

  .topbar-links {
    width: 100%;
  }

  .topbar-links a,
  .theme-toggle {
    width: 100%;
    text-align: center;
  }
}
