:root {
  --bg: #07080d;
  --bg-alt: #0e1018;
  --surface: #141824;
  --surface-hover: #1a2030;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --text-muted: #8b93a7;
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.15);
  --gold: #f59e0b;
  --gold-dim: rgba(245, 158, 11, 0.12);
  --accent: #6366f1;
  --radius: 14px;
  --radius-sm: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --header-h: 64px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: var(--emerald); text-decoration: none; }
a:hover { color: #34d399; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.container { width: min(1140px, 100% - 2rem); margin: 0 auto; }
.muted { color: var(--text-muted); }
.req { color: var(--gold); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(7, 8, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand img { height: 28px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a:not(.btn) {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #041510;
  border-color: transparent;
}
.btn-primary:hover { filter: brightness(1.08); color: #041510; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 13px; }
.btn-lg { padding: 0.75rem 1.35rem; font-size: 15px; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 0%, rgba(16, 185, 129, 0.12), transparent),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(99, 102, 241, 0.08), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 0 0 0.75rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
}
.hero-lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero-stats strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stats span { font-size: 13px; color: var(--text-muted); }

/* Sections */
.section { padding: 2.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head a { font-size: 14px; font-weight: 500; }
.section-lead { color: var(--text-muted); margin: -0.5rem 0 1.25rem; max-width: 60ch; }

/* Startup grid & cards */
.startup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.startup-grid--compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.startup-card {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.startup-card:hover { border-color: rgba(16, 185, 129, 0.25); background: var(--surface-hover); }

.upvote-btn {
  flex-shrink: 0;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.75rem 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.upvote-btn:hover { color: var(--emerald); background: var(--emerald-dim); }
.upvote-btn.is-upvoted { color: var(--emerald); background: var(--emerald-dim); }
.upvote-btn--lg { width: 72px; border-radius: var(--radius); border: 1px solid var(--border); }
.upvote-arrow { font-size: 11px; line-height: 1; }
.upvote-count { font-size: 14px; font-weight: 700; font-family: var(--mono); }
.upvote-label { display: block; text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 0.35rem; }

.startup-card-link {
  flex: 1;
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1rem 0.85rem 0;
  color: inherit;
  min-width: 0;
}
.startup-card-link:hover { text-decoration: none; color: inherit; }
.startup-card-media { flex-shrink: 0; padding-left: 0.85rem; display: flex; align-items: flex-start; }
.startup-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
}
.startup-logo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--emerald);
}
.startup-card-body { min-width: 0; }
.startup-name {
  margin: 0 0 0.2rem;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.startup-tagline {
  margin: 0 0 0.5rem;
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.startup-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.chip-cat { color: var(--emerald); background: var(--emerald-dim); border-color: rgba(16, 185, 129, 0.2); }
.chip-gold, .chip-gold.chip { color: var(--gold); background: var(--gold-dim); border-color: rgba(245, 158, 11, 0.25); }

/* SOTW */
.sotw-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 768px) { .sotw-card { grid-template-columns: 1fr; } }
.sotw-copy { padding: 0.5rem 0; }
.sotw-copy p { color: var(--text-muted); margin: 0.75rem 0; }
.sotw-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.badge-gold { color: var(--gold); background: var(--gold-dim); border: 1px solid rgba(245, 158, 11, 0.3); }

/* Categories */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.category-card {
  display: block;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.category-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.category-icon { font-size: 1.25rem; color: var(--emerald); display: block; margin-bottom: 0.5rem; }
.category-icon-lg { margin-right: 0.35rem; }
.category-card h3 { margin: 0 0 0.35rem; font-size: 15px; }
.category-card p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; }

/* Ideas */
.ideas-preview, .ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.idea-card {
  display: block;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.15s;
}
.idea-card:hover { border-color: rgba(99, 102, 241, 0.35); text-decoration: none; color: inherit; }
.idea-card h2, .idea-card h3 { margin: 0.5rem 0 0.35rem; font-size: 1rem; }
.idea-card p { margin: 0; font-size: 13px; color: var(--text-muted); }
.idea-card--full .idea-excerpt { margin-top: 0.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-link { display: inline-block; margin-top: 0.75rem; font-size: 13px; font-weight: 600; color: var(--emerald); }
.idea-article h1 { margin: 0.5rem 0; font-size: clamp(1.75rem, 4vw, 2.25rem); letter-spacing: -0.02em; }
.idea-lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 2rem; }
.idea-article section { margin-bottom: 1.75rem; }
.idea-article h2 { font-size: 1rem; margin: 0 0 0.5rem; color: var(--emerald); }
.idea-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; padding-top: 1rem; border-top: 1px solid var(--border); }

/* CTA */
.cta-band {
  padding: 2.5rem 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.06));
  border-top: 1px solid var(--border);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cta-inner h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.cta-inner p { margin: 0; color: var(--text-muted); }
.cta-inline { text-align: center; padding: 2rem 0; }

/* Page layouts */
.page-main { padding: 2rem 0 3rem; }
.page-narrow { max-width: 640px; }
.page-head h1 { margin: 0 0 0.35rem; font-size: clamp(1.75rem, 4vw, 2.25rem); letter-spacing: -0.02em; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--emerald); }

.browse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.sort-tabs { display: flex; gap: 0.35rem; }
.sort-tabs a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.sort-tabs a:hover { color: var(--text); text-decoration: none; }
.sort-tabs a.is-active {
  color: var(--emerald);
  background: var(--emerald-dim);
  border-color: rgba(16, 185, 129, 0.25);
}
.filter-form select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 13px;
}

/* Profile */
.profile-page { padding: 2rem 0 3rem; }
.profile-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
  .profile-layout { flex-direction: column; }
  .profile-vote { display: flex; align-items: center; gap: 0.75rem; }
}
.profile-main { flex: 1; min-width: 0; }
.profile-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.profile-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--border);
}
.profile-logo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--emerald);
}
.profile-kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emerald);
  margin: 0 0 0.25rem;
}
.profile-head h1 { margin: 0; font-size: 1.75rem; letter-spacing: -0.02em; }
.profile-tagline { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 1.05rem; }
.profile-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.profile-chips a.chip:hover { text-decoration: none; }
.profile-desc { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.profile-foot { font-size: 13px; }
.similar-section h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* Submit form */
.submit-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 1rem;
}
.submit-form input,
.submit-form select,
.submit-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.45);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }
.form-error { color: #f87171; background: rgba(248, 113, 113, 0.1); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.success-panel {
  padding: 2rem;
  background: var(--emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius);
}
.success-panel h2 { margin: 0 0 0.5rem; }
.pricing-teaser {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--gold-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
}
.pricing-teaser h3 { margin: 0 0 0.35rem; font-size: 14px; color: var(--gold); }
.pricing-teaser p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  width: min(1140px, 100% - 2rem);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer p { margin: 0; font-size: 13px; color: var(--text-muted); }
.site-footer nav { display: flex; gap: 1rem; font-size: 13px; }
.site-footer nav a { color: var(--text-muted); }
.site-footer nav a:hover { color: var(--text); }

/* Admin */
.page-admin { background: var(--bg-alt); }
.admin-main { padding: 1.5rem 0 3rem; }
.admin-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-login {
  max-width: 360px;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.admin-login label { display: block; margin-bottom: 1rem; }
.admin-login input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.admin-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.admin-stats strong { display: block; font-size: 1.5rem; }
.admin-stats span { font-size: 12px; color: var(--text-muted); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.admin-table tr.is-hidden { opacity: 0.5; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.admin-actions form { display: inline; }
.badge-seed, .badge-pending, .badge-featured, .badge-sotw {
  font-size: 10px;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge-seed { background: #374151; color: #9ca3af; }
.badge-pending { background: var(--gold-dim); color: var(--gold); }
.badge-featured { background: var(--emerald-dim); color: var(--emerald); }
.badge-sotw { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }

.db-banner {
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  padding: 0.65rem 1.25rem;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}
.db-banner code { font-family: var(--mono); font-size: 12px; }
.empty-state { color: var(--text-muted); padding: 2rem 0; }
