:root {
  --bg: #030712;
  --bg-alt: #080f1e;
  --card: #0b1324;
  --card-hover: #0f1a30;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --indigo: #6366f1;
  --indigo-hover: #4f46e5;
  --green: #34d399;
  --green-bg: rgba(16, 185, 129, 0.14);
  --amber: #fbbf24;
  --red: #f87171;
  --red-bg: rgba(239, 68, 68, 0.12);
  --mono: "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
}

.brand-badge {
  background: linear-gradient(135deg, var(--indigo), var(--accent));
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 60%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

h1 {
  font-size: clamp(28px, 4.4vw, 48px);
  line-height: 1.14;
  margin: 0 0 18px;
  max-width: 900px;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 17px;
  color: #cbd5e1;
  max-width: 820px;
  margin: 0 0 26px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #0f172a;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.signup-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 10px;
  max-width: 820px;
  background: var(--card);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}

input,
select,
textarea {
  background: #050a15;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--indigo);
  border-color: transparent;
}

.btn {
  cursor: pointer;
  border-radius: 7px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-primary {
  background: var(--indigo);
  color: #fff;
}

.btn-primary:hover {
  background: var(--indigo-hover);
}

.btn-ghost {
  background: #0f172a;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: #1e293b;
}

.full-width {
  width: 100%;
}

.micro-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 10px 0 28px;
}

.funnel-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.funnel-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 175px;
}

.funnel-stat.danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: var(--red-bg);
}

.funnel-stat.success {
  border-color: rgba(52, 211, 153, 0.4);
  background: var(--green-bg);
}

.stat-val {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}

.stat-lbl {
  font-size: 12px;
  color: var(--muted);
}

.funnel-arrow {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.section-header h2,
.center-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.tier-pill {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1e1b4b;
  border: 1px solid var(--indigo);
  color: #c7d2fe;
}

.pro-feed-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
}

.sponsor-card {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.65));
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 22px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.papers-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.paper-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.15s ease;
}

.paper-card:hover {
  border-color: var(--border-strong);
}

.paper-meta-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: #0f172a;
  color: #cbd5e1;
}

.badge-score {
  background: var(--green-bg);
  border-color: rgba(52, 211, 153, 0.45);
  color: var(--green);
  font-weight: 700;
}

.badge-lic {
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent);
}

.paper-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.paper-title a {
  color: var(--text);
  text-decoration: none;
}

.paper-title a:hover {
  color: var(--accent);
}

.repo-links {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.repo-links a {
  color: var(--accent);
  text-decoration: none;
}

.paper-tldr {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-size: 15px;
}

.paper-why {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.teardown-box {
  background: #050914;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 16px;
}

.teardown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: #a78bfa;
  font-weight: 700;
}

.gotcha-list {
  margin: 8px 0 12px 18px;
  padding: 0;
  color: var(--amber);
  font-size: 13px;
}

.code-block-wrap {
  position: relative;
}

.code-block {
  margin: 0;
  padding: 12px 14px;
  background: #020617;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  overflow-x: auto;
}

.locked-teardown {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.45);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #c7d2fe;
}

.graveyard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.grave-card {
  background: #140a10;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  padding: 18px;
}

.grave-code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  background: rgba(248, 113, 113, 0.14);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.center-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 34px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.price-card.featured {
  border: 2px solid var(--indigo);
  box-shadow: 0 10px 35px rgba(99, 102, 241, 0.14);
}

.plan-tag {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: #1e293b;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.plan-tag.accent-bg {
  background: var(--indigo);
  color: #fff;
}

.price-card h3 {
  margin: 0 0 6px;
  font-size: 21px;
}

.price-tag {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 6px;
}

.price-tag span {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.feature-list {
  margin: 18px 0 22px;
  padding-left: 18px;
  font-size: 13.5px;
  color: #cbd5e1;
  flex: 1;
}

.feature-list li {
  margin-bottom: 9px;
}

.checkout-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sponsor-booking-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
}

.sponsor-form {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sponsor-form h3 {
  margin: 0 0 4px;
}

.sponsor-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: #cbd5e1;
}

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.toast {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid var(--green);
  color: #ecfdf5;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}

.toast.error {
  background: var(--red-bg);
  border-color: var(--red);
  color: #fee2e2;
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.84);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 820px;
  height: 85vh;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-tabs {
  display: flex;
  gap: 8px;
}

#emailPreviewFrame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #020617;
}

@media (max-width: 840px) {
  .signup-bar,
  .filter-bar,
  .sponsor-booking-wrap {
    grid-template-columns: 1fr;
  }
  .nav-links a {
    display: none;
  }
}
