/* ============================================================
   SportsEdgePro — shared styles for /blog/ pages
   Tokens are copied from index.html's inline <style>. If the
   homepage palette changes, mirror the :root blocks here.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg: #eceff6;
  --panel: #ffffff;
  --panel-2: #f4f7fc;
  --ink: #0f1e3a;
  --ink-soft: #46567a;
  --ink-mute: #8090ac;
  --rule: #d7deed;
  --rule-strong: #c2cbde;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-wash: rgba(37,99,235,0.08);
  --profit: #1c9a53;
  --loss: #cf383d;
  --bar-1: #a9b4c4;
  --bar-2: #4a78d0;
  --bar-3: #2563eb;
  --shadow: 0 1px 2px rgba(20,32,60,0.05), 0 12px 32px -12px rgba(20,32,60,0.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1120;
    --panel: #111c30;
    --panel-2: #0d1626;
    --ink: #cdd7e7;
    --ink-soft: #94a2be;
    --ink-mute: #63728e;
    --rule: #1e2c48;
    --rule-strong: #2a3a5c;
    --accent: #4f86ff;
    --accent-ink: #050d1c;
    --accent-wash: rgba(79,134,255,0.12);
    --profit: #3fb46e;
    --loss: #e55a5f;
    --bar-1: #8b97ab;
    --bar-2: #5f8fe0;
    --bar-3: #4f86ff;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 18px 40px -16px rgba(0,0,0,0.55);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1120;
  --panel: #111c30;
  --panel-2: #0d1626;
  --ink: #cdd7e7;
  --ink-soft: #94a2be;
  --ink-mute: #63728e;
  --rule: #1e2c48;
  --rule-strong: #2a3a5c;
  --accent: #4f86ff;
  --accent-ink: #050d1c;
  --accent-wash: rgba(79,134,255,0.12);
  --profit: #3fb46e;
  --loss: #e55a5f;
  --bar-1: #8b97ab;
  --bar-2: #5f8fe0;
  --bar-3: #4f86ff;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 18px 40px -16px rgba(0,0,0,0.55);
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, .nav-brand-name, .btn {
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---------- NAV (mirrors index.html) ---------- */
nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-brand { display: flex; flex-direction: row; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand-mark { width: 26px; height: auto; flex-shrink: 0; display: block; }
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nav-brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-brand-name span { color: var(--accent); }
.nav-brand-sub { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
  padding: 7px 11px; border-radius: 6px;
}
.nav-links a:hover { color: var(--ink); background: var(--accent-wash); }
.nav-links a.active { color: var(--ink); }
.nav-links a.cta { color: var(--accent-ink); background: var(--accent); }
.nav-links a.cta:hover { filter: brightness(1.06); color: var(--accent-ink); }
@media (max-width: 720px) { .nav-links a.hide-sm { display: none; } }

/* ---------- BLOG INDEX ---------- */
.blog-head { padding: 64px 0 34px; }
.blog-head h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 14px 0 16px;
}
.blog-head p { color: var(--ink-soft); max-width: 60ch; font-size: 1.08rem; }

.bloglist { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 70px; border-top: 1px solid var(--rule); }
.bloglist-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.bloglist-card:hover .bloglist-title { color: var(--accent); }
.bloglist-thumb {
  width: 200px; aspect-ratio: 16 / 10;
  object-fit: cover; border-radius: 8px;
  border: 1px solid var(--rule);
}
.bloglist-meta {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-bottom: 9px;
}
.bloglist-title {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.bloglist-excerpt { color: var(--ink-soft); font-size: 0.98rem; max-width: 64ch; }
@media (max-width: 640px) {
  .bloglist-card { grid-template-columns: 1fr; gap: 14px; }
  .bloglist-thumb { width: 100%; max-width: 320px; }
}

/* ---------- ARTICLE ---------- */
.post { padding: 52px 0 20px; }
.post-header { max-width: 44rem; margin: 0 auto; }
.post-header h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 14px 0 18px;
}
.post-meta {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.post-hero {
  max-width: 60rem; margin: 34px auto 0;
  width: 100%; aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--rule);
}

.post-body { max-width: 44rem; margin: 40px auto 0; }
.post-body > * + * { margin-top: 1.35em; }
.post-body p, .post-body li { font-size: 1.16rem; line-height: 1.78; color: var(--ink); }
.post-body h2 {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-top: 2.1em;
  padding-top: 0.3em;
}
.post-body h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-top: 1.7em;
}
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 0.5em; }
.post-body strong { font-weight: 600; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: var(--ink-soft);
  font-style: italic;
}
.post-body code {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 5px;
}
.post-body pre {
  background: var(--panel-2);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 16px 18px;
  overflow-x: auto;
}
.post-body pre code { background: none; border: 0; padding: 0; font-size: 0.86rem; }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.post-body figure { margin: 2em 0; }
.post-body figure img { width: 100%; border-radius: 10px; border: 1px solid var(--rule); }
.post-body figcaption {
  margin-top: 8px;
  font-size: 0.82rem; color: var(--ink-mute);
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.03em;
}
.post-body .lead { font-size: 1.28rem; line-height: 1.7; color: var(--ink-soft); }

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.post-body table th, .post-body table td {
  text-align: left;
  padding: 9px 13px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.post-body table thead th {
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--panel-2);
  white-space: nowrap;
}
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 9px; }
/* let prose tables use a little more width than the text column, and wrap cell text */
.post-body .table-scroll {
  width: min(50rem, 92vw);
  margin-left: 50%;
  transform: translateX(-50%);
}

/* CTA panel + footer nav for articles */
.post-cta {
  max-width: 44rem;
  margin: 56px auto 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 30px 32px;
}
.post-cta h2 {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.post-cta p { color: var(--ink-soft); font-size: 1rem; margin-bottom: 18px; max-width: 52ch; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
  text-decoration: none;
  padding: 12px 20px; border-radius: 7px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.07); }
.btn .arw { font-family: "IBM Plex Mono", monospace; }

.post-back {
  max-width: 44rem; margin: 40px auto 0;
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.post-back a { color: var(--ink-soft); text-decoration: none; }
.post-back a:hover { color: var(--accent); }

.post-disclaimer {
  max-width: 44rem; margin: 30px auto 0;
  font-size: 0.82rem; color: var(--ink-mute);
  border-top: 1px solid var(--rule); padding-top: 18px;
}

/* ---------- FOOTER (mirrors index.html) ---------- */
footer { border-top: 1px solid var(--rule); margin-top: 64px; padding: 40px 0 56px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 26px; }
.foot-brand-name { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1rem; }
.foot-brand-name span { color: var(--accent); }
.foot-brand-mark { width: 20px; height: auto; vertical-align: -4px; margin-right: 8px; }
.foot-col h4 {
  font-family: "IBM Plex Mono", monospace; font-size: 0.64rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px; font-weight: 500;
}
.foot-col a { display: block; text-decoration: none; color: var(--ink-soft); font-size: 0.88rem; padding: 4px 0; }
.foot-col a:hover { color: var(--accent); }
.foot-social a { display: flex; align-items: center; gap: 8px; }
.foot-social svg { width: 14px; height: 14px; flex-shrink: 0; fill: currentColor; }
.foot-social .soon {
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); border: 1px solid var(--rule-strong);
  border-radius: 4px; padding: 1px 5px;
}
.foot-legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-legal p { font-size: 0.78rem; color: var(--ink-mute); }

/* ---------- LEGAL PAGES (/privacy/, /terms/) ---------- */
.legal { max-width: 46rem; margin: 0 auto; padding: 56px 0 20px; }
.legal h1 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 8px;
}
.legal .updated {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 34px;
}
.legal .intro { font-size: 1.12rem; color: var(--ink-soft); }
.legal h2 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 700; font-size: 1.2rem; letter-spacing: -0.015em;
  margin: 34px 0 10px;
}
.legal p, .legal li { font-size: 1.03rem; line-height: 1.75; color: var(--ink); }
.legal p { margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 1.4em; margin: 8px 0 14px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal strong { font-weight: 600; }
.legal .contact-box {
  margin-top: 34px; background: var(--panel);
  border: 1px solid var(--rule); border-radius: 11px;
  padding: 20px 24px; box-shadow: var(--shadow); font-size: 0.98rem;
}
.legal .contact-box p { margin: 0; color: var(--ink-soft); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
