/* ========================================
   1. CSS VARIABLES & RESET
   ======================================== */
:root {
  /* Colors (dark theme) */
  --accent: #19e5a8;
  --accent-dim: rgba(25, 229, 168, 0.08);
  --accent-glow: rgba(25, 229, 168, 0.06);
  --secondary-accent: #ffffff;
  --page-bg: #0f1115;
  --header-bg: #1a1d22;
  --footer-bg: #0b0d11;
  --surface: #171a1f;
  --surface-elevated: #1d2026;
  --text-primary: #e8ecf1;
  --text-secondary: #9aa3ae;
  --border: #232830;
  --success: #3ee89a;
  --danger: #ff6b6b;

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-logo: 'Syncopate', 'Space Grotesk', sans-serif;

  /* Sizes */
  --content-width: 760px;
  --wide-width: 1080px;
  --section-gap: clamp(3rem, 6vw, 5.5rem);
  --block-gap: 1.5rem;

  /* Radii & effects */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--page-bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--secondary-accent);
  text-decoration-color: var(--accent);
}

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

/* ========================================
   2. GLOBAL TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0 0 1rem;
  text-align: left;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1 {
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 2rem;
}

p {
  margin: 0 0 1.25rem;
  text-align: left;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
  color: var(--text-primary);
}

em {
  font-style: italic;
}

ul, ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  text-align: left;
}

li:last-child {
  margin-bottom: 0;
}

blockquote {
  margin: 1.5rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--text-secondary);
  text-align: left;
}

figure {
  margin: 1.5em auto;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

figcaption {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* ========================================
   3. LAYOUT — SECTIONS & WRAPPERS
   ======================================== */
main {
  width: 100%;
  display: block;
  padding-bottom: 2rem;
}

article {
  display: block;
  width: 100%;
}

[data-content] {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  margin-bottom: var(--section-gap);
  position: static;
}

[data-content]:last-child {
  margin-bottom: var(--section-gap);
}

/* ========================================
   4. COMPONENTS
   ======================================== */

/* info-box — bordered surface with accent left rail */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.info-box p {
  margin-bottom: 0.75rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box p:first-child strong {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: inline-block;
}

.info-box p strong + *,
.info-box p:not(:first-child) {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

.info-box p:not(:first-child) {
  font-family: var(--font-body);
  color: var(--text-primary);
}

/* callout — accent-tinted box */
.callout {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}

.callout::before {
  content: "!";
  position: absolute;
  top: 1.5rem;
  left: -12px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--page-bg);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout p {
  margin-bottom: 0.75rem;
  text-align: left;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout p:first-child strong {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.01em;
}

/* key-takeaway — borderless emphasis line */
.key-takeaway {
  border-top: 2px solid var(--accent);
  padding: 1.25rem 0 0;
  margin: 2.25rem 0;
  background: none;
  box-shadow: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
}

.key-takeaway p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  text-align: left;
  margin: 0;
}

/* fun-fact — margin note, italic, no container */
.fun-fact {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.fun-fact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1rem;
  height: 2px;
  background: var(--accent);
}

.fun-fact p {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-align: left;
}

.fun-fact p:last-child {
  margin-bottom: 0;
}

.fun-fact p:first-child strong {
  font-family: var(--font-mono);
  font-style: normal;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* glossary-term — inline definition row */
.glossary-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1.75rem 0;
  padding: 0.5rem 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.glossary-term p {
  margin: 0;
  text-align: left;
}

.glossary-term p strong:first-child {
  font-family: var(--font-mono);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  font-size: 0.95rem;
}

.glossary-term p {
  color: var(--text-secondary);
}

/* at-a-glance — horizontal data strip */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 2.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.at-a-glance > div {
  padding: 0.5rem 0.9rem;
  border-right: 1px solid var(--border);
  text-align: left;
}

.at-a-glance > div:last-child {
  border-right: none;
}

.at-a-glance > div p {
  margin: 0 0 0.35rem;
  text-align: left;
}

.at-a-glance > div p:first-child {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.at-a-glance > div p:first-child strong {
  font-weight: 500;
  color: var(--text-secondary);
}

.at-a-glance > div p:not(:first-child) {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* odds-example — monospace card with centered content */
.odds-example {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.odds-example p {
  font-family: var(--font-mono);
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.odds-example p:last-child {
  margin-bottom: 0;
}

.odds-example p:first-child {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.odds-example p:first-child strong {
  color: var(--accent);
  font-family: var(--font-heading);
}

/* comparison — two-column table */
.comparison {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.comparison table {
  min-width: 100%;
}

.comparison th {
  font-size: 0.72rem;
  padding: 1rem 1.25rem;
  background: var(--surface-elevated);
  color: var(--accent);
}

.comparison th:first-child {
  border-right: 1px solid var(--border);
}

.comparison td {
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.comparison td:first-child {
  border-right: 1px solid var(--border);
  color: var(--text-primary);
}

.comparison td:last-child {
  color: var(--text-secondary);
}

.comparison tr:last-child td {
  border-bottom: none;
}

/* pre-bet-checklist — vertical list with connector line */
.pre-bet-checklist {
  margin: 2rem 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.pre-bet-checklist p:first-child {
  margin: 0 0 1rem;
  text-align: left;
}

.pre-bet-checklist p:first-child strong {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.pre-bet-checklist ul {
  list-style: none;
  padding: 0 0 0 1.75rem;
  margin: 0;
}

.pre-bet-checklist ul li {
  position: relative;
  padding: 0.5rem 0 0.5rem 0.5rem;
  margin-bottom: 0.5rem;
  text-align: left;
}

.pre-bet-checklist ul li::before {
  content: "☐";
  position: absolute;
  left: -2.1rem;
  top: 0.5rem;
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

/* Variant: list of notes / principles (no checkboxes, no connector line) */
.pre-bet-checklist--notes ul {
  padding-left: 0;
  border-left: none;
}

.pre-bet-checklist--notes ul li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  margin-bottom: 0.35rem;
}

.pre-bet-checklist--notes ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.85rem;
  height: 2px;
  background: var(--accent);
  color: transparent;
  display: block;
  border-radius: 1px;
}

/* dos-donts — two columns (green / red) */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

.dos-donts > div {
  padding: 1.5rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border-top: 3px solid;
  box-shadow: var(--shadow-soft);
}

.dos-donts > div:first-child {
  border-top-color: var(--success);
}

.dos-donts > div:last-child {
  border-top-color: var(--danger);
}

.dos-donts > div p:first-child {
  margin: 0 0 0.85rem;
  text-align: left;
}

.dos-donts > div:first-child p:first-child strong {
  font-family: var(--font-heading);
  color: var(--success);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dos-donts > div:last-child p:first-child strong {
  font-family: var(--font-heading);
  color: var(--danger);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dos-donts ul {
  margin: 0;
  padding-left: 1.1rem;
  list-style: none;
}

.dos-donts li {
  position: relative;
  padding-left: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: left;
}

.dos-donts > div:first-child li::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.dos-donts > div:last-child li::before {
  content: "";
  position: absolute;
  left: -1rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
}

/* card-grid — stacked horizontal cards (full width each) */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.card-grid > div {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card-grid > div:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-grid > div p {
  text-align: left;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.card-grid > div p:last-child {
  margin-bottom: 0;
}

.card-grid > div p:first-child strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: -0.005em;
  display: block;
  margin-bottom: 0.35rem;
}

/* section-bridge — italic centered transition */
.section-bridge {
  text-align: center;
  margin: 2.5rem auto 2rem;
  padding: 1rem 0;
  position: relative;
  max-width: 560px;
}

.section-bridge p {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--accent);
  margin: 0;
  text-align: center;
  position: relative;
  display: inline-block;
  padding: 0 2rem;
}

.section-bridge p::before,
.section-bridge p::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.2rem;
  height: 1px;
  background: var(--border);
}

.section-bridge p::before {
  left: 0;
}

.section-bridge p::after {
  right: 0;
}

/* tldr — data-content block */
.tldr {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1.75rem 2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-soft);
  /* CRITICAL: use margin-top/bottom separately, not shorthand */
  margin-top: 0;
  margin-bottom: var(--section-gap);
}

.tldr h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: -0.005em;
  text-align: left;
}

.tldr ul {
  margin: 0;
  padding-left: 1.25rem;
}

.tldr li {
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.tldr li::marker {
  color: var(--accent);
}

/* worked-example — step-by-step calculation */
.worked-example {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.worked-example p {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  text-align: left;
  color: var(--text-primary);
}

.worked-example p:first-child strong {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.worked-example hr {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 1rem 0;
}

/* author-bio — badge at end of article */
.author-bio {
  max-width: var(--content-width);
  margin: 0 auto var(--section-gap);
  padding: 1rem 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.author-bio strong {
  color: var(--text-primary);
  font-weight: 500;
  font-style: normal;
  font-family: var(--font-logo);
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

/* ========================================
   5. HEADER
   ======================================== */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
  position: relative;
  z-index: 10;
}

.site-header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  display: block;
  width: 220px;
  height: auto;
  max-width: 100%;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.header-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.header-trust {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========================================
   6. HERO SECTION
   ======================================== */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 6rem) 1.5rem clamp(3rem, 6vw, 5rem);
  background: var(--page-bg);
  overflow: hidden;
  text-align: center;
  max-width: none !important;
  margin-bottom: var(--section-gap);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.12;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, transparent 85%);
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 80% 20%, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin: 0 auto 1.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: rgba(25, 229, 168, 0.06);
}

.hero h1 {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0 auto 1rem;
  max-width: 900px;
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0 auto 1.75rem;
  max-width: 600px;
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-byline {
  position: relative;
  z-index: 1;
  text-align: center;
  margin: 0 auto 2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hero-byline strong {
  color: var(--text-primary);
  font-weight: 500;
}

.hero figure {
  position: relative;
  z-index: 1;
  margin: 2rem auto 0;
  max-width: var(--content-width);
  text-align: center;
}

.hero figure img,
.hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ========================================
   7. TOC — Vertical with column-count: 2
   ======================================== */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-soft);
}

.toc h2 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  column-count: 2;
  column-gap: 2.5rem;
}

.toc > ul > li {
  break-inside: avoid;
  margin-bottom: 0.65rem;
  padding-left: 0;
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.toc > ul > li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 1.8rem;
}

.toc ul {
  counter-reset: toc-counter;
}

.toc a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.toc a:hover {
  color: var(--accent);
  padding-left: 3px;
}

.toc ul ul {
  column-count: 1;
  padding-left: 1rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.toc ul ul li {
  margin-bottom: 0.35rem;
}

/* ========================================
   8. FAQ — details/summary with max-height animation
   ======================================== */
[data-content="faq"] details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

[data-content="faq"] details[open] {
  border-color: var(--accent);
}

[data-content="faq"] summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3rem 1.1rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-primary);
  position: relative;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

[data-content="faq"] summary::-webkit-details-marker {
  display: none;
}

[data-content="faq"] summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.25s ease;
  line-height: 1;
}

[data-content="faq"] details[open] summary {
  color: var(--accent);
  background: rgba(25, 229, 168, 0.04);
}

[data-content="faq"] details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

[data-content="faq"] summary:hover {
  background: rgba(25, 229, 168, 0.04);
}

[data-content="faq"] summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* FAQ content animation via max-height */
[data-content="faq"] details > div {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}

[data-content="faq"] details[open] > div {
  max-height: 800px;
  opacity: 1;
  padding: 0 1.5rem 1.25rem;
}

[data-content="faq"] details > div p {
  margin: 0;
  line-height: 1.65;
  color: var(--text-primary);
  text-align: left;
}

/* ========================================
   9. FOOTER
   ======================================== */
.site-footer {
  background: var(--footer-bg);
  color: var(--text-secondary);
  padding: 3rem 1.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  margin-top: 3rem;
}

.footer-columns {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-columns h3 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.footer-columns p,
.footer-columns li {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-columns a:hover {
  color: var(--accent);
}

.footer-warning-badge {
  display: inline-block;
  background: var(--danger);
  color: var(--page-bg);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.footer-bottom {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-bottom p {
  margin: 0;
  line-height: 1.5;
}

.footer-bottom p strong {
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: inherit !important;
}

/* ========================================
   10. RESPONSIVE (mobile)
   ======================================== */

/* Mid breakpoint: 5-column at-a-glance becomes too cramped below this width */
@media (max-width: 1200px) {
  .at-a-glance {
    grid-template-columns: 1fr;
  }

  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0.5rem;
  }

  .at-a-glance > div:last-child {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  :root {
    --section-gap: 2.5rem;
  }

  body {
    font-size: 1rem;
  }

  h1 {
    font-size: clamp(1.85rem, 7vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }

  [data-content] {
    padding: 0 1rem;
  }

  h2 {
    margin-top: 2rem;
  }

  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .site-header-inner {
    gap: 0.75rem;
  }

  .header-meta {
    gap: 0.6rem;
  }

  .header-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.65rem;
  }

  .header-trust {
    font-size: 0.65rem;
  }

  .site-logo img {
    width: 180px;
  }

  /* Two-column components collapse to one column */
  .dos-donts,
  .at-a-glance {
    grid-template-columns: 1fr;
  }

  .at-a-glance > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0.5rem;
  }

  .at-a-glance > div:last-child {
    border-bottom: none;
  }

  /* Comparison: allow horizontal scroll */
  .comparison {
    overflow-x: auto;
  }

  .comparison table {
    font-size: 0.9rem;
  }

  /* Glossary: stack vertically */
  .glossary-term {
    flex-direction: column;
    gap: 6px;
  }

  /* TOC: single column */
  .toc {
    padding: 1.25rem 1.25rem;
  }

  .toc ul {
    column-count: 1;
  }

  /* Footer: 2 columns then 1 */
  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  /* FAQ compact */
  [data-content="faq"] summary {
    padding: 1rem 2.5rem 1rem 1.25rem;
    font-size: 0.95rem;
  }

  [data-content="faq"] details > div {
    padding: 0 1.25rem;
  }

  [data-content="faq"] details[open] > div {
    padding: 0 1.25rem 1rem;
  }

  /* Component padding adjustments */
  .info-box, .callout, .worked-example, .tldr {
    padding: 1.25rem 1.25rem;
  }

  .pre-bet-checklist ul {
    padding-left: 1.5rem;
  }

  .pre-bet-checklist ul li::before {
    left: -1.85rem;
  }

  .section-bridge p {
    font-size: 0.95rem;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .footer-columns {
    grid-template-columns: 1fr;
  }
}

/* Print safety */
@media print {
  .hero::before,
  .hero::after {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* =========================================
   UNIVERSAL DESKTOP & MOBILE MENU + LOGO
   ========================================= */

/* Header Base */
.site-header {
    background-color: var(--color-bg, #121212);
    border-bottom: 1px solid var(--color-border, #333333);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Mobile defaults for navigation bar */
.top-navigation-bar {
    width: 100%;
    margin: 0 auto;
    padding: 15px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Fixes */
.site-logo {
    min-width: 180px;
    margin: 0;
}

.site-logo img {
    max-height: 50px !important;
    max-width: none !important;
    width: auto !important; 
    display: block;
    transition: transform 0.2s ease;
}

.site-logo img:hover {
    transform: scale(1.02);
}

/* Desktop Menu */
.site-nav--desktop {
    display: none; 
}

/* Desktop Grid Layout: Logo left, Menu center */
@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%;
        padding: 15px 40px; 
        display: flex; 
        justify-content: space-between;
        align-items: center;
        gap: 30px;
    }
    
    .site-nav--desktop {
        display: block;
        flex: 1; 
        min-width: 0; 
    }

    .mobile-controls {
        display: none; 
    }
    
    .site-nav--desktop ul {
        display: flex;
        flex-wrap: wrap; 
        justify-content: flex-end; 
        gap: 15px 25px; 
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .site-nav--desktop a {
        text-decoration: none;
        color: var(--color-text, #ffffff);
        font-family: var(--font-body, sans-serif);
        font-weight: 500;
        font-size: 14px; 
        transition: color 0.2s ease;
        white-space: normal !important;
        line-height: 1.2;
    }
    
    .site-nav--desktop a:hover {
        color: var(--color-accent, #eab308);
    }
}

/* Mobile Burger Button */
.burger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
    z-index: 1000;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-text, #ffffff);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

/* Burger Animation to X */
.burger.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.burger.is-active span:nth-child(2) {
    opacity: 0;
}
.burger.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Slider */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-bg, #121212);
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    overflow-y: auto;
    padding: 60px 30px;
}

.mobile-menu.is-open {
    right: 0; 
}

.mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 36px;
    line-height: 1;
    color: var(--color-text, #ffffff);
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-menu__close:hover {
    color: var(--color-accent, #eab308);
}

.menu-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.menu-mobile a {
    text-decoration: none;
    color: var(--color-text, #ffffff);
    font-size: 20px;
    font-family: var(--font-display, sans-serif);
    font-weight: 600;
    display: block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.menu-mobile a:hover {
    color: var(--color-accent, #eab308);
    padding-left: 10px; 
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px); 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 998;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.sitemap-main{
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.sitemap-title{
  margin: 0 0 8px;
  text-align: center;
}

.sitemap-subtitle{
  margin: 0 0 24px;
  text-align: center;
  opacity: 0.75;
}

.sitemap-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sitemap-link{
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  text-decoration: none;
}

.sitemap-link:hover{
  border-color: rgba(255,255,255,0.2);
}

/* ===== Universal hub (NO body_class needed) ===== */

main.hub-children-main{
  padding-bottom: 48px;
}

/* Article wrapper */
main.hub-children-main .hub-children-article{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
main.hub-children-main .hub-children-header{
  text-align: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

main.hub-children-main .hub-children-title{
  margin: 0 0 10px;
}

main.hub-children-main .hub-children-intro{
  max-width: 900px;
  margin: 0 auto;
  opacity: .9;
}

/* Grid */
main.hub-children-main .hub-children-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 12px;
}

/* Card */
main.hub-children-main .hub-children-card{
  display: block;
  text-decoration: none;
}

main.hub-children-main .hub-children-card__media{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  transition: transform .22s ease, box-shadow .22s ease;
}

main.hub-children-main .hub-children-card:hover .hub-children-card__media{
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}

/* Image */
main.hub-children-main .hub-children-card__img{
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

/* Overlay */
main.hub-children-main .hub-children-card__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.70) 100%
  );
}

/* Text */
main.hub-children-main .hub-children-card__content{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}

main.hub-children-main .hub-children-card__title{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,.55);
}

/* Responsive */
@media (max-width: 1024px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: 1fr;
  }
}

.home main > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero),
.home main article > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero) {
    max-width: var(--content-max-width, 940px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

.home main iframe,
.home main article iframe {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    width: 100% !important;
}

/* ===== ХЛЕБНЫЕ КРОШКИ (BREADCRUMBS) - LIGHT & DARK ===== */

/* БАЗОВАЯ (СВЕТЛАЯ) ТЕМА */
#crumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b; 
    text-align: center; 
}

#crumbs a {
    text-decoration: none;
    color: #475569; 
    transition: color 0.2s ease;
}

#crumbs a:hover {
    color: #2563eb; 
    text-decoration: underline;
}

#crumbs .current {
    font-weight: 600;
    color: #0f172a; 
}

/* ТЕМНАЯ ТЕМА (Автоматическое переключение) */
@media (prefers-color-scheme: dark) {
    #crumbs {
        color: rgba(255, 255, 255, 0.5); 
    }

    #crumbs a {
        color: rgba(255, 255, 255, 0.7); 
    }

    #crumbs a:hover {
        color: #ffffff; 
    }

    #crumbs .current {
        color: #ffffff; 
    }
}

/* =========================================
   СТИЛИ ДЛЯ ОГЛАВЛЕНИЯ (TOC) - LIGHT & DARK
   ========================================= */

/* БАЗОВАЯ (СВЕТЛАЯ) ТЕМА */
.toc-card {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 10px;
    padding: 25px 30px;
    margin: 40px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.toc-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1e293b; 
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.toc-columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-group a {
    color: #475569 !important; 
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.toc-group a:hover {
    color: #2563eb !important; 
    transform: translateX(4px);
}

/* Две колонки на компьютерах */
@media (min-width: 768px) {
    .toc-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
    }
}

/* ТЕМНАЯ ТЕМА */
@media (prefers-color-scheme: dark) {
    .toc-card {
        background: #1a1a1f;
        border-color: #2d2d35;
        box-shadow: none;
    }

    .toc-card h2 {
        color: #ffffff;
        border-bottom-color: #2d2d35;
    }

    .toc-group a {
        color: #a0a0b0 !important; 
    }

    .toc-group a:hover {
        color: #ffffff !important; 
    }
}

/* =========================================
   CUSTOM USER STYLES (AUTOMATIC INJECTION)
   ========================================= */

/* Grid for child pages */
.child-pages-small-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .child-pages-small-grid {
        grid-template-columns: 1fr;
    }
}

/* Universal Image Scaling & Styling */
.cl-hero img,
.content-article img,
img.article-image,
img.wp-post-image {
    max-width: 100%;
    width: 100%;
    height: auto !important;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
