/* ============================================
   1. CSS Variables & Reset
   ============================================ */

:root {
  --color-accent: #2E7D32;
  --color-accent-hover: #1B5E20;
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F3F1ED;
  --color-text: #1A1A1A;
  --color-text-secondary: #5A5A5A;
  --color-text-muted: #8A8A8A;
  --color-border: #E0DCD5;
  --color-border-accent: #2E7D32;
  --color-warning: #D84315;
  --color-link: #2E7D32;
  --color-link-visited: #1B5E20;
  --color-success: #2E7D32;
  --color-danger: #C62828;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --h1-size: clamp(2.25rem, 5vw, 3.5rem);
  --h2-size: clamp(1.75rem, 3.5vw, 2.25rem);
  --h3-size: clamp(1.15rem, 2vw, 1.375rem);
  --body-size: clamp(1rem, 1.5vw, 1.125rem);
  --small-size: 14px;
  --mono-size: 16px;

  --content-width: 820px;
  --section-gap: clamp(64px, 8vw, 112px);
  --element-gap: clamp(28px, 4vw, 44px);

    /* --- AUTO-FORCED DARK THEME --- */
    --color-bg: #141412;
    --color-surface: #1E1E1C;
    --color-surface-alt: #252520;
    --color-text: #E8E8E4;
    --color-text-secondary: #A8A8A4;
    --color-text-muted: #707068;
    --color-border: #3A3A34;
    --color-warning: #FF7043;
}



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

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

body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:visited {
  color: var(--color-link-visited);
}

a:hover {
  color: var(--color-accent-hover);
  opacity: 0.85;
}

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

/* ============================================
   2. General Typography
   ============================================ */
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--h1-size);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--h2-size);
  line-height: 1.15;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--color-text);
  text-align: left;
  scroll-margin-top: 2rem;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--h3-size);
  line-height: 1.35;
  color: var(--color-text);
  text-align: left;
  scroll-margin-top: 2rem;
}

p {
  text-align: left;
  margin-bottom: 1.25em;
}

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

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

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

ul, ol {
  text-align: left;
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

li {
  text-align: left;
  margin-bottom: 0.5em;
  line-height: 1.7;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  font-size: var(--small-size);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--element-gap) 0;
}

/* ============================================
   3. Layout — data-content sections
   ============================================ */
header {
  padding: 0;
  margin: 0;
}

main {
  width: 100%;
}

[data-content] {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  margin-bottom: var(--section-gap);
}

[data-content] h2 {
  margin-bottom: var(--element-gap);
}

[data-content] h3 {
  margin-top: 2em;
  margin-bottom: 1em;
}

[data-content] figure {
  margin: 2em auto;
  max-width: 100%;
}

[data-content] figcaption {
  text-align: center;
  font-size: var(--small-size);
  color: var(--color-text-muted);
  margin-top: 8px;
}

.article-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ============================================
   4. Components
   ============================================ */

/* --- info-box --- */
.info-box {
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-accent);
  padding: 24px 28px;
  margin: 2em 0;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.info-box p {
  text-align: left;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0.75em;
}

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

.info-box strong {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

/* --- odds-example --- */
.odds-example {
  background: #1A1A1A;
  color: #FAFAF8;
  border-radius: 8px;
  padding: 28px 32px;
  margin: 2em 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.odds-example p {
  text-align: left;
  color: #FAFAF8;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0.75em;
}

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

.odds-example p:first-child {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A8A8A;
  background: transparent;
}

.odds-example strong {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
  color: #2E7D32;
}

@media (prefers-color-scheme: dark) {
  .odds-example {
    background: #1A1A1A;
    color: #FAFAF8;
  }
  .odds-example p {
    color: #FAFAF8;
    background: transparent;
  }
  .odds-example p:first-child {
    color: #8A8A8A;
    background: transparent;
  }
  .odds-example strong {
    color: #4CAF50;
  }
}

/* --- callout --- */
.callout {
  background: transparent;
  border: 2px solid var(--color-warning);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 2em 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.callout p {
  text-align: left;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0;
}

.callout strong {
  color: var(--color-warning);
}

/* --- card-grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 2em 0;
}

.card-grid > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-grid > div:hover {
  border-color: var(--color-accent);
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.card-grid > div p {
  text-align: left;
  color: var(--color-text-secondary);
  background: transparent;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 0.75em;
}

.card-grid > div p:first-child {
  color: var(--color-text);
  font-size: 18px;
  margin-bottom: 0.5em;
}

.card-grid > div p:first-child strong {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-text);
}

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

/* --- comparison --- */
.comparison {
  margin: 2em 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border: 1px solid var(--color-border);
}

.comparison table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.comparison thead th {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.03em;
  padding: 16px;
  background: var(--color-surface-alt);
  color: var(--color-text);
  text-align: left;
  border-bottom: 2px solid var(--color-accent);
}

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

.comparison tbody td {
  text-align: left;
  color: var(--color-text);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--body-size);
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

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

/* --- key-takeaway --- */
.key-takeaway {
  border-top: 3px solid var(--color-accent);
  padding-top: 16px;
  margin: 2.5em 0;
}

.key-takeaway p {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.35;
  color: var(--color-text);
  background: transparent;
  margin-bottom: 0;
}

/* --- fun-fact --- */
.fun-fact {
  position: relative;
  padding-left: 20px;
  margin: 2em 0;
}

.fun-fact::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.fun-fact p {
  text-align: left;
  font-style: italic;
  color: var(--color-text-secondary);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0;
}

/* --- glossary-term --- */
.glossary-term {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 1.5em 0;
}

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

.glossary-term strong {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-accent);
  white-space: nowrap;
}

.glossary-term p {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text-secondary);
  background: transparent;
  line-height: 1.7;
}

/* --- dos-donts --- */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 2em 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dos-donts > div:first-child {
  border-right: 1px solid var(--color-border);
}

.dos-donts > div {
  padding: 24px;
  background: var(--color-surface);
}

.dos-donts > div p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  text-align: left;
  background: transparent;
}

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

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

.dos-donts ul {
  padding-left: 1.2em;
}

.dos-donts li {
  text-align: left;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.6;
  margin-bottom: 0.5em;
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
  margin: 2em 0;
}

.pre-bet-checklist p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--small-size);
  color: var(--color-accent);
  background: transparent;
  text-align: left;
  margin-bottom: 16px;
}

.pre-bet-checklist ul {
  list-style: none;
  padding-left: 24px;
  border-left: 2px solid var(--color-border);
}

.pre-bet-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  text-align: left;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
}

.pre-bet-checklist li::before {
  content: '\2610';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 1.1em;
  background: var(--color-bg);
  padding: 0 4px;
  margin-left: -15px;
}

/* --- at-a-glance --- */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin: 2em 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.at-a-glance > div {
  padding: 24px 20px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
}

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

.at-a-glance > div p:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  color: var(--color-text);
  background: transparent;
  margin-bottom: 8px;
}

.at-a-glance > div p {
  text-align: center;
  color: var(--color-text-secondary);
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* --- worked-example --- */
.worked-example {
  background: var(--color-surface-alt);
  border-radius: 8px;
  padding: 28px 32px;
  margin: 2em 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.worked-example p {
  text-align: left;
  color: var(--color-text);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0.75em;
}

.worked-example p:first-child {
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  background: transparent;
  margin-bottom: 16px;
}

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

.worked-example strong {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-text);
}

.worked-example hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 16px 0;
}

/* --- section-bridge --- */
.section-bridge {
  text-align: center;
  margin: 1.5em 0;
  position: relative;
  padding: 0 40px;
}

.section-bridge::before,
.section-bridge::after {
  content: '---';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 12px;
  letter-spacing: 0.3em;
}

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

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

.section-bridge p {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--color-accent);
  background: transparent;
  margin-bottom: 0;
}

/* ============================================
   5. Hero Section
   ============================================ */
[data-content="hero"] {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(60px, 10vw, 120px) 20px clamp(40px, 6vw, 80px);
  margin-bottom: var(--section-gap);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

[data-content="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='500' viewBox='0 0 900 500'%3E%3Cpath d='M-50 450 Q300 350 600 200 Q750 130 950 100' fill='none' stroke='%232E7D32' stroke-width='1.5' opacity='0.08'/%3E%3Cpath d='M-50 470 Q320 370 620 230 Q770 165 950 140' fill='none' stroke='%232E7D32' stroke-width='1.2' opacity='0.06'/%3E%3Cpath d='M-50 500 Q340 400 650 270 Q790 205 950 185' fill='none' stroke='%232E7D32' stroke-width='1' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 70%);
}

[data-content="hero"] .label {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
  position: relative;
}

[data-content="hero"] h1 {
  max-width: 800px;
  margin: 0 auto 24px;
  position: relative;
}

[data-content="hero"] .subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 20px;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  text-align: center;
  line-height: 1.6;
  position: relative;
}

[data-content="hero"] hr {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  border: none;
  margin: 0 auto 28px;
  position: relative;
}

[data-content="hero"] .meta {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  position: relative;
}

[data-content="hero"] .meta .badge {
  display: inline-block;
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-left: 12px;
}

[data-content="hero"] figure {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

[data-content="hero"] figure img {
  width: 100%;
  max-width: 960px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

[data-content="hero"] figure figcaption {
  text-align: center;
  font-size: var(--small-size);
  color: var(--color-text-muted);
  margin-top: 12px;
}

/* ============================================
   5b. TOC Section — Grid 2-column
   ============================================ */
[data-content="toc"] {
  max-width: var(--content-width);
  margin: 0 auto var(--section-gap);
  padding: 0 20px;
}

[data-content="toc"] nav {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 36px;
  background: var(--color-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

[data-content="toc"] nav p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin-bottom: 20px;
  text-align: left;
}

[data-content="toc"] nav > ol {
  column-count: 2;
  column-gap: 40px;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

[data-content="toc"] nav > ol > li {
  break-inside: avoid;
  margin-bottom: 16px;
}

[data-content="toc"] nav > ol > li > a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

[data-content="toc"] nav > ol > li > a:hover {
  color: var(--color-accent);
  opacity: 1;
}

[data-content="toc"] nav ol ol {
  list-style: none;
  padding-left: 16px;
  margin-top: 6px;
  margin-bottom: 0;
}

[data-content="toc"] nav ol ol li {
  margin-bottom: 4px;
}

[data-content="toc"] nav ol ol a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

[data-content="toc"] nav ol ol a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* ============================================
   5c. Start Reading & Back to Top buttons
   ============================================ */
.btn-start-reading,
.btn-back-to-top {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-surface);
  background: var(--color-accent);
  padding: 12px 28px;
  border-radius: 6px;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn-start-reading:visited,
.btn-back-to-top:visited {
  color: var(--color-surface);
}

.btn-start-reading:hover,
.btn-back-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  opacity: 1;
  color: var(--color-surface);
}

.btn-start-reading:focus-visible,
.btn-back-to-top:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-back-to-top {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-back-to-top:visited {
  color: var(--color-accent);
}

.btn-back-to-top:hover {
  background: var(--color-accent);
  color: var(--color-surface);
}

/* ============================================
   6. FAQ — details/summary accordion
   ============================================ */
[data-content="faq"] details {
  border-bottom: 1px solid var(--color-border);
  interpolate-size: allow-keywords;
}

[data-content="faq"] summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--body-size);
  color: var(--color-text);
  list-style: none;
  transition: color 0.2s ease;
}

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

[data-content="faq"] summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

[data-content="faq"] details[open] summary::after {
  transform: rotate(45deg);
}

[data-content="faq"] summary:hover {
  color: var(--color-accent);
}

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

/* Modern ::details-content animation */
[data-content="faq"] ::details-content {
  transition: opacity 0.3s ease, block-size 0.3s ease, content-visibility 0.3s ease allow-discrete;
  opacity: 0;
  block-size: 0;
  overflow: clip;
}

[data-content="faq"] details[open]::details-content {
  opacity: 1;
  block-size: auto;
}

/* Fallback for older browsers */
@supports not selector(::details-content) {
  [data-content="faq"] details[open] > *:not(summary) {
    animation: faqFadeIn 0.3s ease forwards;
  }
  @keyframes faqFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

[data-content="faq"] details div {
  padding-bottom: 20px;
}

[data-content="faq"] details div p {
  text-align: left;
  color: var(--color-text-secondary);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.7;
  margin-bottom: 0;
}


/* ============================================
   8. Media Queries
   ============================================ */
@media (max-width: 768px) {
  [data-content="toc"] nav > ol {
    column-count: 1;
  }

  .dos-donts {
    grid-template-columns: 1fr;
  }

  .dos-donts > div:first-child {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .at-a-glance {
    grid-template-columns: 1fr;
  }

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

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

  .glossary-term {
    flex-direction: column;
    gap: 4px;
  }

  .comparison thead th,
  .comparison tbody td {
    font-size: 14px;
    padding: 10px 12px;
  }

  [data-content="hero"] {
    padding: clamp(40px, 8vw, 80px) 16px clamp(28px, 5vw, 60px);
  }

  [data-content="hero"] .subtitle {
    font-size: 17px;
  }
}

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

  .worked-example {
    padding: 20px;
  }

  .odds-example {
    padding: 20px;
  }

  .odds-example strong {
    font-size: 22px;
  }

  [data-content="toc"] nav {
    padding: 24px 20px;
  }
}

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

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

.top-navigation-bar {
    max-width: var(--wide-width, 1100px);
    margin: 0 auto;
    padding: 15px var(--component-padding, 24px);
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Keep mobile burger on the right */
}

/* --- DESKTOP MENU --- */
.site-nav--desktop {
    display: none; /* Hidden on mobile by default */
}

@media (min-width: 769px) {
    .top-navigation-bar {
        justify-content: center; /* Center the desktop menu */
    }

    .site-nav--desktop {
        display: block;
    }
    .mobile-controls {
        display: none; /* Hide burger on desktop */
    }
    
    .menu-desktop {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .menu-desktop a {
        text-decoration: none;
        color: var(--color-text);
        font-family: var(--font-body, sans-serif);
        font-weight: 500;
        font-size: 16px;
        transition: color 0.2s ease;
    }
    
    .menu-desktop a:hover {
        color: var(--color-accent);
    }
}

/* --- 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);
    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%; /* Hidden off-screen */
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--color-bg);
    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; /* Slide in */
}

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

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

.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);
    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);
    padding-left: 10px; /* Nice slide effect on hover */
}

/* --- 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); /* Beautiful blur effect */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 998;
}

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

/* =========================================
   Footer Structure & Styles
   ========================================= */

.site-footer {
    background-color: #0d110f; /* Dark background matching your site */
    color: #9ca3af; /* Muted text color */
    padding: 70px 20px 20px;
    font-family: inherit;
    border-top: 1px solid #1f2937;
    margin-top: 60px;
}

/* 4-Column Grid System */
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 50px;
}

/* Headings */
.footer-heading {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom List Reset */
.footer-links-custom,
.footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-custom li,
.footer-menu-list li {
    margin-bottom: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    padding-left: 18px; /* Space for the custom bullet */
}

/* Custom Minimalist Bullet */
.footer-links-custom li::before,
.footer-menu-list li::before {
    content: "›"; 
    color: #22c55e; /* Green accent color */
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Footer Links */
.site-footer a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #22c55e; /* Turns green on hover */
}

/* Bottom Copyright Bar */
.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid #1f2937;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 36px;
    }
}

main p {
    margin-bottom: 24px !important;
}

main h1, 
main h2, 
main h3, 
main h4, 
main h5, 
main h6 {
    margin-top: 45px !important;
    margin-bottom: 16px !important;
}

main > *:first-child {
    margin-top: 0 !important;
}

main ul, 
main ol {
    margin-bottom: 24px !important;
}

section[data-content="intro"] {
    margin-top: 20px !important;
}