/* Stadium AI blog. Tokens mirror constants/colors.ts so the blog matches the app. */
:root {
  --bg: #04112b;
  --bg-elevated: #081a3a;
  --surface: #0d2149;
  --surface-hi: #122c5e;
  --border: #1a3a7a;
  --border-hi: #27509e;
  --text: #f1f6ff;
  --text-dim: #9db4db;
  --text-muted: #5e7aa8;
  --lime: #4fc3ff;
  --lime-dim: #1e88e5;
  --lime-soft: rgba(79, 195, 255, 0.14);
  --money: #ffc06b;
  --max: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
main { position: relative; z-index: 1; }

.glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 640px;
  background: linear-gradient(180deg, rgba(79, 195, 255, 0.16), rgba(4, 17, 43, 0));
  pointer-events: none;
  z-index: 0;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .container { padding: 0 18px; } }

/* ---------- header / footer (matches components/web/SiteChrome.tsx) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(39, 80, 158, 0.45);
  background: rgba(4, 17, 43, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.6px; }
.logo img { width: 30px; height: 30px; border-radius: 7px; }
.logo-ai { color: var(--lime); }
.nav { display: flex; align-items: center; gap: 10px; }
.nav-link { padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.nav-link:hover, .nav-link.is-active { background: var(--surface); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--lime); color: var(--bg);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 800;
}
.nav-cta:hover { opacity: 0.9; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .logo { font-size: 18px; }
  .nav-link { padding: 8px 10px; }
  .nav-cta { padding: 8px 12px; }
}

.site-footer { position: relative; z-index: 1; border-top: 1px solid rgba(39, 80, 158, 0.45); margin-top: 24px; }
.footer-inner {
  min-height: 64px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 22px; padding-top: 16px; padding-bottom: 16px;
  color: var(--text-muted); font-size: 13px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

/* ---------- type ---------- */
.badge {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 7px;
  background: var(--lime-soft); border: 1px solid var(--border-hi); color: var(--lime);
  padding: 7px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px;
}
.h1 { margin: 0; font-size: 56px; line-height: 1.1; font-weight: 800; letter-spacing: -1.8px; }
.accent { color: var(--lime); }
.h2 { margin: 10px 0 0; font-size: 34px; line-height: 1.18; font-weight: 800; letter-spacing: -1px; }
.lead { margin: 0; color: var(--text-dim); font-size: 18px; line-height: 1.6; max-width: 640px; }
.kicker { margin: 0; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.meta .dot { opacity: 0.7; }
.pill {
  display: inline-block; align-self: flex-start;
  background: rgba(255, 192, 107, 0.18); color: var(--money);
  padding: 4px 9px; border-radius: 8px; font-size: 11px; font-weight: 800;
}
@media (max-width: 860px) {
  .h1 { font-size: 40px; letter-spacing: -1.2px; }
  .h2 { font-size: 28px; }
  .lead { font-size: 17px; }
}

/* ---------- sections ---------- */
.hero { padding-top: 72px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 22px; }
.hero .h1 { max-width: 820px; }
.section { padding-top: 48px; padding-bottom: 48px; }
.section-tight { padding-top: 8px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 24px; }
.empty { color: var(--text-dim); }

/* ---------- buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px; border-radius: 12px;
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  color: var(--bg); font-size: 16px; font-weight: 800; white-space: nowrap;
}
.btn-primary:hover { opacity: 0.92; }
.btn-lg { height: 54px; padding: 0 28px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.section-tight .grid { margin-top: 0; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.card-title { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 800; letter-spacing: -0.3px; }
.card-excerpt { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.55; }

.card-featured { flex-direction: row; }
.card-featured .cover { flex: 1; min-height: 300px; }
.card-featured .card-body { flex: 1; justify-content: center; padding: 36px; gap: 14px; }
.card-featured .card-title { font-size: 30px; line-height: 1.18; letter-spacing: -0.8px; }
.card-featured .card-excerpt { font-size: 16px; }
@media (max-width: 860px) {
  .card-featured { flex-direction: column; }
  .card-featured .cover { min-height: 200px; }
  .card-featured .card-body { padding: 24px; }
  .card-featured .card-title { font-size: 24px; }
}

.cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; }
.card-featured .cover { aspect-ratio: auto; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-art {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 22px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(79, 195, 255, 0.30), rgba(79, 195, 255, 0) 60%),
    linear-gradient(135deg, var(--surface-hi), var(--bg-elevated));
  border-bottom: 1px solid var(--border);
}
.card-featured .cover-art { border-bottom: 0; border-right: 1px solid var(--border); padding: 32px; }
.cover-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  background: var(--lime-soft); border: 1px solid var(--border-hi); color: var(--lime);
  padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
}
.cover-title {
  font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -0.4px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-featured .cover-title { font-size: 28px; letter-spacing: -0.8px; }
.cover-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.cover-stats span, .stat {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg); padding: 6px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: var(--text);
}
.cover-stats span:first-child svg, .stat:first-child svg { color: var(--money); }
.cover-stats span svg, .stat svg { color: var(--lime); }

/* ---------- CTA band ---------- */
.band {
  display: flex; align-items: center; gap: 24px;
  border: 1px solid var(--border-hi); border-radius: 20px; padding: 36px;
  background: linear-gradient(135deg, rgba(79, 195, 255, 0.18), rgba(30, 136, 229, 0.06));
}
.band > div { flex: 1; }
.band-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.2; }
.band-sub { margin: 8px 0 0; color: var(--text-dim); font-size: 16px; }
@media (max-width: 760px) {
  .band { flex-direction: column; align-items: stretch; padding: 26px; }
  .band-title { font-size: 24px; }
}

/* ---------- post ---------- */
.post-hero { padding-top: 56px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 20px; }
.post-title { max-width: 900px; font-size: 50px; }
@media (max-width: 860px) { .post-title { font-size: 36px; } }
.crumbs { display: flex; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.crumbs a { color: var(--lime); }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--lime-soft); border: 1px solid var(--border-hi); color: var(--lime); font-weight: 800;
}
.byline-name { font-size: 15px; font-weight: 700; }
.post-cover { border-radius: 18px; border: 1px solid var(--border-hi); margin-top: 12px; }

.post-layout { display: grid; grid-template-columns: minmax(0, 720px) 280px; justify-content: space-between; gap: 56px; padding-bottom: 24px; }
.post-main { min-width: 0; }
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

.toc { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.toc-title { margin: 0; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.toc ol a { color: var(--text-dim); font-size: 14px; line-height: 1.4; }
.toc ol a:hover { color: var(--text); }
.toc-cta {
  margin-top: 10px; display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-elevated); border: 1px solid var(--border-hi); border-radius: 16px; padding: 18px;
}
.toc-cta-title { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.toc-cta-sub { color: var(--text-muted); font-size: 13px; }
.toc-cta-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--lime); font-size: 14px; font-weight: 800; }

/* ---------- prose ---------- */
.prose { color: var(--text-dim); font-size: 18px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose .table-wrap, .prose pre { margin: 0 0 1.3em; }
.prose h2, .prose h3, .prose h4 { color: var(--text); font-weight: 800; scroll-margin-top: 96px; }
.prose h2 { margin: 2.1em 0 0.6em; font-size: 30px; line-height: 1.2; letter-spacing: -0.8px; }
.prose h3 { margin: 1.8em 0 0.5em; font-size: 22px; line-height: 1.3; letter-spacing: -0.4px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose em { color: var(--text); }
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(79, 195, 255, 0.45); }
.prose a:hover { text-decoration-color: var(--lime); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--lime); font-weight: 800; }
.prose blockquote {
  padding: 18px 22px; border-radius: 14px;
  background: var(--lime-soft); border: 1px solid var(--border-hi); border-left: 4px solid var(--lime);
  color: var(--text);
}
.prose blockquote p { margin: 0; }
.prose code { background: var(--surface); padding: 2px 6px; border-radius: 6px; font-size: 0.88em; color: var(--text); }
.prose pre { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border-radius: 14px; border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 520px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface); color: var(--text); font-weight: 800; font-size: 13px; letter-spacing: 0.3px; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--text); font-weight: 700; }
@media (max-width: 640px) {
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
}

/* ---------- inline CTA (mirrors the landing page's idea card) ---------- */
.inline-cta {
  margin: 40px 0; display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: 18px; padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.inline-cta-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-cta-title { flex: 1; min-width: 200px; font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.first-action {
  display: flex; gap: 8px; align-items: flex-start;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 14px; line-height: 1.45;
}
.first-action svg { color: var(--lime); flex-shrink: 0; margin-top: 3px; }
.inline-cta .btn-primary { align-self: flex-start; margin-top: 4px; }

/* ---------- FAQs ---------- */
.faqs { margin-top: 8px; }
.faqs h2 { margin: 0 0 18px; font-size: 28px; font-weight: 800; letter-spacing: -0.8px; }
.faqs details {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 20px; margin-bottom: 10px;
}
.faqs details[open] { border-color: var(--border-hi); }
.faqs summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--lime); font-size: 22px; font-weight: 600;
}
.faqs details[open] summary::after { content: "−"; }
.faqs details p { margin: 0 0 18px; color: var(--text-dim); font-size: 15px; line-height: 1.65; }
