/* Beatpoly — Article Styles v3 — White/Blue System */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #FFFFFF;
  --bg: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-raised: #F0F2F5;
  --border: #E5E8ED;
  --border-hi: rgba(27,111,248,0.25);
  --text: #0F1117;
  --text-secondary: #374151;
  --muted: #4B5563;
  --dim: #9CA3AF;
  --blue: #1B6FF8;
  --blue-light: #EEF4FF;
  --blue-mid: rgba(27,111,248,0.1);
  --orange: #FF5A00;
  --orange-light: #FFF3EE;
  --green: #059669;
  --green-light: #ECFDF5;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* nav styles handled by nav.js */

/* ── BREADCRUMB ── */
.breadcrumb { padding: 80px 0 0; }
.breadcrumb-inner {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  letter-spacing: 0.04em; flex-wrap: wrap;
}
.breadcrumb-inner a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }

/* ── ARTICLE HEADER ── */
.article-header { padding: 28px 0 44px; border-bottom: 1px solid var(--border); }
.article-meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-light);
  border: 1px solid rgba(27,111,248,0.2);
  border-radius: 4px; padding: 3px 9px;
}
.tag-orange {
  color: var(--orange); background: var(--orange-light);
  border-color: rgba(255,90,0,0.2);
}
.read-time { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.article-date { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.article-header h1 {
  font-size: clamp(28px, 4vw, 46px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 18px; max-width: 680px; color: var(--text);
}
.article-header h1 em { font-style: normal; color: var(--blue); }
.article-intro {
  font-size: 18px; color: var(--muted); line-height: 1.65;
  max-width: 620px; font-weight: 400;
}

/* ── LAYOUT ── */
.article-layout {
  display: grid; grid-template-columns: 1fr 268px;
  gap: 56px; padding: 52px 0 80px; align-items: start;
}
.article-body { min-width: 0; }
.article-sidebar { position: sticky; top: 80px; }

/* ── ARTICLE BODY ── */
.article-body h2 {
  font-size: clamp(20px, 2.5vw, 24px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25;
  margin: 48px 0 14px; padding-top: 48px;
  border-top: 1px solid var(--border); color: var(--text);
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 {
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  margin: 28px 0 10px; color: var(--text);
}
.article-body p {
  font-size: 16.5px; line-height: 1.85;
  color: var(--text-secondary); margin-bottom: 20px;
}
.article-body p strong { color: var(--text); font-weight: 600; }
.article-body ul, .article-body ol { padding-left: 20px; margin-bottom: 20px; }
.article-body li {
  font-size: 16px; line-height: 1.75;
  color: var(--text-secondary); margin-bottom: 8px;
}
.article-body li strong { color: var(--text); }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.math-block {
  font-family: var(--mono); background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 20px; font-size: 14px; color: var(--blue);
  margin: 20px 0; overflow-x: auto; line-height: 1.8;
}

/* ── CALLOUT BOXES ── */
.callout { border-radius: 10px; padding: 22px 26px; margin: 28px 0; }
.callout-stat { background: var(--blue-light); border: 1px solid rgba(27,111,248,0.2); }
.callout-warn { background: var(--orange-light); border: 1px solid rgba(255,90,0,0.2); }
.callout-green { background: var(--green-light); border: 1px solid rgba(5,150,105,0.2); }
.callout-neutral { background: var(--bg-raised); border: 1px solid var(--border); }
.callout-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 8px; display: block;
}
.callout-stat .callout-label { color: var(--blue); }
.callout-warn .callout-label { color: var(--orange); }
.callout-green .callout-label { color: var(--green); }
.callout-neutral .callout-label { color: var(--muted); }
.callout-number {
  font-family: var(--mono); font-size: 36px; font-weight: 700;
  line-height: 1; display: block; margin-bottom: 8px;
}
.callout-stat .callout-number { color: var(--blue); }
.callout-warn .callout-number { color: var(--orange); }
.callout-green .callout-number { color: var(--green); }
.callout p { font-size: 14px; margin-bottom: 0; line-height: 1.65; color: var(--text-secondary); }
.callout p strong { color: var(--text); }

/* ── STAT GRID ── */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 28px 0;
}
.stat-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 18px;
}
.stat-card-num {
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  color: var(--blue); display: block; margin-bottom: 5px; line-height: 1;
}
.stat-card-label { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── TABLE ── */
.data-table-wrap {
  overflow-x: auto; margin: 28px 0;
  border-radius: 10px; border: 1px solid var(--border);
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  background: var(--bg); padding: 12px 16px;
  text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  font-size: 14px; color: var(--text-secondary);
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: top; line-height: 1.6;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td strong { color: var(--text); }
.data-table td.cyan { color: var(--blue); font-family: var(--mono); font-size: 13px; }
.data-table td.orange { color: var(--orange); font-family: var(--mono); font-size: 13px; }

/* ── TL;DR ── */
.tldr {
  background: var(--blue-light); border: 1px solid rgba(27,111,248,0.2);
  border-radius: 10px; padding: 22px 26px; margin-bottom: 36px;
}
.tldr-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 12px; display: block;
}
.tldr ul { padding-left: 16px; margin: 0; }
.tldr li { font-size: 14px; color: var(--text); line-height: 1.65; margin-bottom: 6px; }

/* ── KEY TERM ── */
.key-term {
  background: var(--bg-raised); border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 22px 0;
}
.key-term-word {
  font-family: var(--mono); font-size: 11px; color: var(--blue);
  letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 5px;
}
.key-term p { font-size: 14px; margin: 0; color: var(--text-secondary); }

/* ── FAQ ── */
.faq { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--border); }
.faq-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; letter-spacing: -0.02em; }
.faq-item {
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 10px; overflow: hidden;
}
.faq-q {
  padding: 16px 18px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--white); user-select: none;
}
.faq-q:hover { background: var(--bg); }
.faq-q-text { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text); }
.faq-toggle { font-family: var(--mono); font-size: 16px; color: var(--blue); flex-shrink: 0; }
.faq-a { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-a.open { max-height: 500px; padding: 0 18px 16px; }
.faq-a p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.7; }

/* ── SIDEBAR ── */
.sidebar-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.sidebar-card h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 14px;
}
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.sidebar-links a {
  font-size: 13px; color: var(--muted); transition: color 0.15s;
  display: flex; align-items: center; gap: 7px; font-weight: 500;
}
.sidebar-links a:hover { color: var(--blue); text-decoration: none; }
.sidebar-links a::before { content: '→'; font-family: var(--mono); color: var(--dim); font-size: 10px; }

/* Sidebar buttons — consistent blue system */
.btn-kalshi {
  display: flex; align-items: center; justify-content: center;
  background: var(--blue) !important; color: #fff !important;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; padding: 11px; border-radius: 8px;
  transition: opacity 0.15s; margin-bottom: 10px;
}
.btn-kalshi:hover { opacity: 0.88; text-decoration: none; }
.btn-poly {
  display: flex; align-items: center; justify-content: center;
  background: #fff !important; color: var(--blue) !important;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; padding: 11px; border-radius: 8px;
  border: 1.5px solid var(--blue); transition: background 0.15s; margin-bottom: 10px;
}
.btn-poly:hover { background: var(--blue-light); text-decoration: none; }
.btn-discord-sm {
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--muted);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; padding: 11px; border-radius: 8px;
  border: 1.5px solid var(--border); transition: border-color 0.15s; margin-bottom: 10px;
}
.btn-discord-sm:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* ── ARTICLE CTA ── */
.article-cta {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 36px; margin: 56px 0 0;
}
.article-cta h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.02em; }
.article-cta p { font-size: 14px; color: var(--muted); margin-bottom: 22px; max-width: 480px; line-height: 1.6; }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary-sm {
  background: var(--blue) !important; color: #fff !important;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; padding: 11px 18px; border-radius: 7px;
  transition: opacity 0.15s; display: inline-block;
}
.btn-primary-sm:hover { opacity: 0.88; text-decoration: none; }
.btn-secondary-sm {
  background: #fff; color: var(--text);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; padding: 11px 18px; border-radius: 7px;
  border: 1.5px solid var(--border); transition: border-color 0.15s; display: inline-block;
}
.btn-secondary-sm:hover { border-color: var(--blue); text-decoration: none; }
.btn-cyan-sm {
  background: var(--blue); color: #fff;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; padding: 11px 18px; border-radius: 7px;
  transition: opacity 0.15s; display: inline-block;
}
.btn-cyan-sm:hover { opacity: 0.88; text-decoration: none; }

/* ── ARTICLE NAV (bottom prev/next only) ── */
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 44px; padding-top: 36px;
  border-top: 1px solid var(--border);
}
.article-nav-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 18px; transition: border-color 0.15s;
}
.article-nav-card:hover { border-color: var(--blue); text-decoration: none; }
.article-nav-card.next { text-align: right; }
.nav-dir {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--dim); text-transform: uppercase; margin-bottom: 5px;
}
.nav-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; }

/* ── COMING SOON HERO (placeholder pages) ── */
.coming-soon-hero { padding: 80px 0 52px; text-align: center; }
.coming-soon-hero h1 {
  font-size: clamp(26px, 4vw, 48px); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.1;
  margin: 0 auto 16px; max-width: 640px; color: var(--text);
}
.coming-soon-hero h1 em { font-style: normal; color: var(--blue); }
.coming-soon-hero p {
  font-size: 16px; color: var(--muted); max-width: 480px;
  margin: 0 auto 32px; line-height: 1.65;
}

/* Placeholder article cards */
.article-placeholder {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.article-placeholder.soon { opacity: 0.65; }
.placeholder-top { display: flex; justify-content: space-between; align-items: center; }
.placeholder-type { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.status-soon {
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  border: 1px solid var(--border); padding: 2px 7px; border-radius: 3px;
  letter-spacing: 0.04em; background: var(--bg);
}
.article-placeholder h3 { font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text); }
.article-placeholder p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.placeholder-meta { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.chapter-section-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.chapter-section-header h2 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 6px; }
.chapter-section-header p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 520px; }

/* ── COMMUNITY FORM on article pages ── */
.community-capture {
  background: #1F2937; border-radius: 14px;
  padding: 36px; margin: 56px 0 0;
}
.community-capture h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; letter-spacing: -0.02em; }
.community-capture p { font-size: 14px; color: rgba(255,255,255,0.55); margin-bottom: 20px; line-height: 1.6; }
.comm-form { display: flex; gap: 8px; flex-wrap: wrap; }
.comm-input {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px; padding: 11px 14px; color: #fff;
  font-size: 14px; font-family: var(--sans); outline: none;
  transition: border-color 0.15s; flex: 1; min-width: 150px;
}
.comm-input::placeholder { color: rgba(255,255,255,0.3); }
.comm-input:focus { border-color: rgba(27,111,248,0.5); }
.comm-btn {
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 20px; border-radius: 7px; border: none; cursor: pointer;
  transition: opacity 0.15s; font-family: var(--sans); white-space: nowrap; width: 100%;
}
.comm-btn:hover { opacity: 0.88; }
.comm-btn:disabled { opacity: 0.6; cursor: default; }
.comm-note { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 10px; }
.comm-success {
  background: rgba(5,150,105,0.12); border: 1px solid rgba(5,150,105,0.25);
  border-radius: 10px; padding: 20px; text-align: center; display: none;
}
.comm-success-icon { font-size: 24px; color: #34D399; margin-bottom: 6px; }
.comm-success-text { font-size: 14px; font-weight: 600; color: #fff; }
.comm-success-sub { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 4px; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 44px 0 0; background: #1F2937; margin-top: 80px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; padding-bottom: 44px; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.4); max-width: 240px; line-height: 1.6; margin-top: 10px; }
.footer-links h4 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 14px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-disclaimer { font-family: var(--mono); font-size: 10px; color: rgba(255,255,255,0.2); max-width: 560px; line-height: 1.6; }

/* ── ANIMATIONS ── */
.fade-up { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media(max-width: 960px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .article-layout { grid-template-columns: 1fr; gap: 36px; }
  .article-sidebar { position: static; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .comm-form { flex-direction: column; }
  .cta-buttons { flex-direction: column; }
}

/* ── BOTTOM NAV & AFFILIATE BOX OVERRIDES ── */
.art-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.art-nav-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  transition: border-color 0.15s;
  display: block;
  text-decoration: none;
}
.art-nav-card:hover { border-color: var(--blue); }
.art-nav-right { text-align: right; }
.art-nav-dir {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
  display: block;
}
.art-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: block;
}
.art-affiliate-box {
  background: var(--blue);
  border-radius: 14px;
  padding: 28px 32px;
  margin-top: 14px;
}
.art-affiliate-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.art-affiliate-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
  display: block;
}
.art-affiliate-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  display: block;
}
.art-affiliate-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
  max-width: 360px;
  display: block;
}
.art-affiliate-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-width: 200px;
}
.art-btn-kalshi {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #fff !important;
  color: var(--blue) !important;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  transition: opacity 0.15s;
  white-space: nowrap;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  text-decoration: none !important;
}
.art-btn-kalshi:hover { opacity: 0.9; }
.art-btn-poly {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.5);
  transition: border-color 0.15s;
  white-space: nowrap;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  text-decoration: none !important;
}
.art-btn-poly:hover { border-color: #fff; }
@media(max-width: 700px) {
  .art-nav-grid { grid-template-columns: 1fr; }
  .art-affiliate-inner { flex-direction: column; }
  .art-affiliate-btns { width: 100%; }
  .art-btn-kalshi, .art-btn-poly { text-align: center; }
}
