/* ========================================
       1. CSS VARIABLES & RESET
       ======================================== */
    :root {
      /* Colors - Light Theme */
      --color-primary: #C8102E;
      --color-bg: #FAFAFA;
      --color-surface: #FFFFFF;
      --color-text: #1A1A1A;
      --color-text-secondary: #4A4A4A;
      --color-text-muted: #6B6B6B;
      --color-border: #E5E5E5;
      --color-border-accent: rgba(200, 16, 46, 0.3);
      --color-success: #16A34A;
      --color-danger: #DC2626;
      
      /* Typography */
      --font-display: 'Bebas Neue', sans-serif;
      --font-body: 'Inter', sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
      
      /* Spacing */
      --section-gap: 64px;
      --content-max-width: 820px;
      --content-padding: 24px;
      
      /* Transitions */
      --transition-fast: 150ms ease;
      --transition-base: 250ms ease;
    
    /* --- AUTO-FORCED DARK THEME --- */
    --color-bg: #0F0F0F;
        --color-surface: #1A1A1A;
        --color-text: #F5F5F5;
        --color-text-secondary: #B0B0B0;
        --color-text-muted: #808080;
        --color-border: #2A2A2A;
        --color-border-accent: rgba(200, 16, 46, 0.4);
}
    
    
    
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    html {
      scroll-behavior: smooth;
    }
    
    body {
      font-family: var(--font-body);
      font-size: 18px;
      line-height: 1.7;
      color: var(--color-text);
      background-color: var(--color-bg);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    
    /* ========================================
       2. GENERAL TYPOGRAPHY
       ======================================== */
    h1 {
      font-family: var(--font-display);
      font-size: clamp(48px, 6vw, 72px);
      font-weight: 400;
      letter-spacing: 0.02em;
      line-height: 1.1;
      text-transform: uppercase;
    }
    
    h2 {
      font-family: var(--font-display);
      font-size: clamp(32px, 4vw, 48px);
      font-weight: 400;
      letter-spacing: 0.01em;
      line-height: 1.2;
      text-transform: uppercase;
      text-align: left;
      margin-bottom: 24px;
      scroll-margin-top: 2rem;
    }
    
    h3 {
      font-family: var(--font-body);
      font-size: clamp(20px, 2.5vw, 28px);
      font-weight: 600;
      letter-spacing: -0.01em;
      line-height: 1.3;
      text-align: left;
      margin-bottom: 16px;
      scroll-margin-top: 2rem;
    }
    
    p {
      text-align: left;
      margin-bottom: 1.25em;
      max-width: 65ch;
    }
    
    a {
      color: var(--color-primary);
      text-decoration: underline;
      text-underline-offset: 2px;
      transition: opacity var(--transition-fast);
    }
    
    a:hover {
      opacity: 0.8;
    }
    
    a:focus {
      outline: 2px solid var(--color-primary);
      outline-offset: 2px;
    }
    
    ul, ol {
      text-align: left;
      margin-bottom: 1.25em;
      padding-left: 1.5em;
    }
    
    li {
      margin-bottom: 0.5em;
    }
    
    strong {
      font-weight: 600;
    }
    
    em {
      font-style: italic;
    }
    
    blockquote {
      text-align: left;
      border-left: 3px solid var(--color-primary);
      padding-left: 1.5em;
      margin: 1.5em 0;
      font-style: italic;
      color: var(--color-text-secondary);
    }
    
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 1.5em 0;
      text-align: left;
    }
    
    th, td {
      padding: 12px 16px;
      border-bottom: 1px solid var(--color-border);
      text-align: left;
    }
    
    th {
      font-weight: 600;
      background-color: var(--color-surface);
    }
    
    figure {
      margin: 2em auto;
      max-width: 100%;
    }
    
    figcaption {
      font-size: 14px;
      color: var(--color-text-muted);
      text-align: center;
      margin-top: 12px;
    }
    
    img {
      max-width: 100%;
      height: auto;
      display: block;
    }
    
    /* ========================================
       3. LAYOUT - DATA-CONTENT SECTIONS
       ======================================== */
    header {
      /* Empty header should not create visual gap */
    }
    
    main {
      width: 100%;
    }
    
    [data-content] {
      max-width: var(--content-max-width);
      margin-left: auto;
      margin-right: auto;
      padding: var(--section-gap) var(--content-padding);
    }
    
    [data-content="hero"] {
      max-width: none;
      padding: 0;
    }
    
    [data-content="toc"] {
      padding-top: 32px;
      padding-bottom: 32px;
    }
    
    /* ========================================
       4. VISUAL COMPONENTS
       ======================================== */
    
    /* --- info-box --- */
    .info-box {
      background-color: var(--color-surface);
      border-left: 4px solid var(--color-primary);
      padding: 24px;
      margin: 2em 0;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    @media (prefers-color-scheme: dark) {
      .info-box {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      }
    }
    
    .info-box p {
      margin-bottom: 0.75em;
      text-align: left;
      color: var(--color-text);
    }
    
    .info-box p:last-child {
      margin-bottom: 0;
    }
    
    .info-box p:first-child {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--color-text-muted);
      margin-bottom: 8px;
    }
    
    /* --- odds-example --- */
    .odds-example {
      background-color: #1A1A1A;
      border-radius: 8px;
      padding: 32px;
      margin: 2em 0;
      color: #F5F5F5;
    }
    
    @media (prefers-color-scheme: dark) {
      .odds-example {
        background-color: #252525;
        color: #F5F5F5;
      }
    }
    
    .odds-example p {
      text-align: center;
      color: #F5F5F5;
      margin-bottom: 1em;
    }
    
    .odds-example p strong {
      font-family: var(--font-body);
      font-size: 16px;
      font-weight: 600;
      color: #F5F5F5;
    }
    
    .odds-example table {
      background-color: transparent;
      margin: 0;
    }
    
    .odds-example th,
    .odds-example td {
      text-align: center;
      border-bottom-color: rgba(255, 255, 255, 0.1);
      color: #F5F5F5;
      background-color: transparent;
    }
    
    .odds-example th {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: rgba(255, 255, 255, 0.6);
      background-color: transparent;
    }
    
    .odds-example td:nth-child(2) {
      font-family: var(--font-mono);
      font-size: 20px;
      font-weight: 500;
      color: var(--color-primary);
    }
    
    /* --- callout --- */
    .callout {
      background-color: transparent;
      border: 1px dashed var(--color-primary);
      border-radius: 4px;
      padding: 20px;
      margin: 2em 0;
      position: relative;
    }
    
    .callout::before {
      content: "!";
      position: absolute;
      left: -12px;
      top: 16px;
      width: 24px;
      height: 24px;
      background-color: var(--color-primary);
      color: var(--color-surface);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 14px;
    }
    
    .callout p {
      font-style: italic;
      text-align: left;
      color: var(--color-text);
      margin-bottom: 0;
      padding-left: 16px;
    }
    
    /* --- card-grid --- */
    .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 24px;
      margin: 2em 0;
    }
    
    .card-grid > div {
      background-color: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: 8px;
      padding: 24px;
      transition: box-shadow var(--transition-base);
    }
    
    .card-grid > div:hover {
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .card-grid p {
      text-align: left;
      color: var(--color-text);
    }
    
    /* --- comparison --- */
    .comparison {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      margin: 2em 0;
      border: 1px solid var(--color-border);
      border-radius: 8px;
      overflow: hidden;
    }
    
    @media (max-width: 600px) {
      .comparison {
        grid-template-columns: 1fr;
      }
    }
    
    .comparison > div {
      padding: 24px;
      background-color: var(--color-surface);
    }
    
    .comparison > div:first-child {
      border-right: 1px solid var(--color-border);
    }
    
    @media (max-width: 600px) {
      .comparison > div:first-child {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
      }
    }
    
    .comparison p {
      text-align: left;
      color: var(--color-text);
    }
    
    .comparison p strong {
      display: block;
      margin-bottom: 12px;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--color-text);
    }
    
    .comparison ul {
      margin-bottom: 0;
    }
    
    .comparison li {
      color: var(--color-text);
    }
    
    /* --- key-takeaway --- */
    .key-takeaway {
      border-top: 2px solid var(--color-primary);
      padding-top: 20px;
      margin: 2em 0;
    }
    
    .key-takeaway p {
      font-family: var(--font-body);
      font-size: clamp(20px, 2.5vw, 24px);
      font-weight: 500;
      line-height: 1.5;
      text-align: left;
      color: var(--color-text);
      margin-bottom: 0;
    }
    
    /* --- fun-fact --- */
    .fun-fact {
      position: relative;
      padding-left: 20px;
      margin: 2em 0;
    }
    
    .fun-fact::before {
      content: "—";
      position: absolute;
      left: 0;
      top: 0;
      color: var(--color-primary);
      font-weight: 600;
    }
    
    .fun-fact p {
      font-style: italic;
      font-size: 14px;
      color: var(--color-text-secondary);
      text-align: left;
      margin-bottom: 0;
    }
    
    /* --- glossary-term --- */
    .glossary-term {
      display: flex;
      align-items: baseline;
      gap: 12px;
      margin: 1.5em 0;
    }
    
    @media (max-width: 500px) {
      .glossary-term {
        flex-direction: column;
        gap: 4px;
      }
    }
    
    .glossary-term strong {
      font-family: var(--font-mono);
      color: var(--color-primary);
      text-decoration: underline;
      text-underline-offset: 3px;
      white-space: nowrap;
    }
    
    .glossary-term span {
      color: var(--color-text-secondary);
    }
    
    /* --- dos-donts --- */
    .dos-donts {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      margin: 2em 0;
    }
    
    @media (max-width: 600px) {
      .dos-donts {
        grid-template-columns: 1fr;
      }
    }
    
    .dos-donts > div {
      padding: 24px;
    }
    
    .dos-donts > div:first-child {
      background-color: rgba(22, 163, 74, 0.05);
      border-left: 3px solid var(--color-success);
    }
    
    .dos-donts > div:last-child {
      background-color: rgba(220, 38, 38, 0.05);
      border-left: 3px solid var(--color-danger);
    }
    
    @media (prefers-color-scheme: dark) {
      .dos-donts > div:first-child {
        background-color: rgba(22, 163, 74, 0.1);
      }
      .dos-donts > div:last-child {
        background-color: rgba(220, 38, 38, 0.1);
      }
    }
    
    .dos-donts p {
      text-align: left;
      color: var(--color-text);
    }
    
    .dos-donts p strong {
      display: block;
      margin-bottom: 12px;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }
    
    .dos-donts > div:first-child p strong {
      color: var(--color-success);
    }
    
    .dos-donts > div:last-child p strong {
      color: var(--color-danger);
    }
    
    .dos-donts ul {
      margin-bottom: 0;
    }
    
    .dos-donts li {
      color: var(--color-text);
    }
    
    /* --- pre-bet-checklist --- */
    .pre-bet-checklist {
      margin: 2em 0;
    }
    
    .pre-bet-checklist > p:first-child {
      font-family: var(--font-display);
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--color-primary);
      margin-bottom: 16px;
      text-align: left;
    }
    
    .pre-bet-checklist ul {
      list-style: none;
      padding-left: 0;
      margin: 0;
      border-left: 2px solid var(--color-border);
      padding-left: 24px;
      position: relative;
    }
    
    .pre-bet-checklist li {
      position: relative;
      padding-left: 28px;
      margin-bottom: 12px;
      color: var(--color-text);
    }
    
    .pre-bet-checklist li::before {
      content: "☐";
      position: absolute;
      left: 0;
      color: var(--color-primary);
      background-color: var(--color-bg);
      padding: 0 4px;
      margin-left: -4px;
    }
    
    /* --- at-a-glance --- */
    .at-a-glance {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0;
      background-color: var(--color-surface);
      border-radius: 4px;
      margin: 2em 0;
      overflow: hidden;
      border: 1px solid var(--color-border);
    }
    
    @media (max-width: 700px) {
      .at-a-glance {
        grid-template-columns: repeat(2, 1fr);
      }
    }
    
    @media (max-width: 400px) {
      .at-a-glance {
        grid-template-columns: 1fr;
      }
    }
    
    .at-a-glance > div {
      padding: 20px;
      text-align: center;
      border-right: 1px solid var(--color-border);
    }
    
    .at-a-glance > div:last-child {
      border-right: none;
    }
    
    @media (max-width: 700px) {
      .at-a-glance > div:nth-child(2n) {
        border-right: none;
      }
      .at-a-glance > div:nth-child(1),
      .at-a-glance > div:nth-child(2) {
        border-bottom: 1px solid var(--color-border);
      }
    }
    
    @media (max-width: 400px) {
      .at-a-glance > div {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
      }
      .at-a-glance > div:last-child {
        border-bottom: none;
      }
    }
    
    .at-a-glance p {
      margin-bottom: 0;
      text-align: center;
      color: var(--color-text);
    }
    
    .at-a-glance p strong {
      display: block;
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--color-text-muted);
      margin-bottom: 8px;
      font-weight: 500;
    }
    
    .at-a-glance p:last-child {
      font-family: var(--font-mono);
      font-size: 18px;
      font-weight: 500;
      color: var(--color-text);
    }
    
    /* --- worked-example --- */
    .worked-example {
      background-color: var(--color-surface);
      padding: 32px;
      margin: 2em 0;
      border-radius: 4px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    @media (prefers-color-scheme: dark) {
      .worked-example {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
      }
    }
    
    .worked-example p {
      text-align: left;
      color: var(--color-text);
    }
    
    .worked-example code {
      font-family: var(--font-mono);
      background-color: var(--color-bg);
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 0.9em;
      color: var(--color-text);
    }
    
    .worked-example hr {
      border: none;
      border-top: 1px dashed var(--color-border);
      margin: 16px 0;
    }
    
    .worked-example .result {
      font-family: var(--font-mono);
      font-size: 20px;
      font-weight: 500;
      color: var(--color-primary);
    }
    
    /* --- section-bridge --- */
    .section-bridge {
      text-align: center;
      margin: 2em 0;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
    }
    
    .section-bridge::before,
    .section-bridge::after {
      content: "";
      flex: 1;
      max-width: 60px;
      height: 1px;
      background-color: var(--color-border);
    }
    
    .section-bridge p {
      font-style: italic;
      font-size: 16px;
      color: var(--color-text-muted);
      text-align: center;
      margin-bottom: 0;
      max-width: none;
    }
    
    /* ========================================
       5. HERO SECTION
       ======================================== */
    .hero {
      width: 100vw;
      margin-left: calc(50% - 50vw);
      position: relative;
      padding: 80px var(--content-padding) 60px;
      background: 
        radial-gradient(ellipse at 25% 30%, rgba(200, 16, 46, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, 
          transparent 0%, transparent 10%,
          rgba(26, 26, 26, 0.02) 10%, rgba(26, 26, 26, 0.02) 11%,
          transparent 11%, transparent 20%,
          rgba(26, 26, 26, 0.015) 20%, rgba(26, 26, 26, 0.015) 21%,
          transparent 21%, transparent 30%,
          rgba(200, 16, 46, 0.02) 30%, rgba(200, 16, 46, 0.02) 31%,
          transparent 31%
        ),
        var(--color-bg);
      overflow: hidden;
    }
    
    @media (prefers-color-scheme: dark) {
      .hero {
        background: 
          radial-gradient(ellipse at 25% 30%, rgba(200, 16, 46, 0.12) 0%, transparent 45%),
          radial-gradient(circle at 85% 85%, 
            transparent 0%, transparent 10%,
            rgba(255, 255, 255, 0.02) 10%, rgba(255, 255, 255, 0.02) 11%,
            transparent 11%, transparent 20%,
            rgba(255, 255, 255, 0.015) 20%, rgba(255, 255, 255, 0.015) 21%,
            transparent 21%, transparent 30%,
            rgba(200, 16, 46, 0.03) 30%, rgba(200, 16, 46, 0.03) 31%,
            transparent 31%
          ),
          var(--color-bg);
      }
    }
    
    .hero-inner {
      max-width: var(--content-max-width);
      margin: 0 auto;
    }
    
    .hero .label {
      display: inline-block;
      font-size: 12px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--color-primary);
      margin-bottom: 16px;
    }
    
    .hero h1 {
      text-align: center;
      margin-bottom: 20px;
      color: var(--color-text);
    }
    
    .hero .subtitle {
      font-size: 20px;
      color: var(--color-text-muted);
      text-align: center;
      max-width: 540px;
      margin: 0 auto 24px;
      line-height: 1.6;
    }
    
    .hero-divider {
      width: 60px;
      height: 3px;
      background-color: var(--color-primary);
      margin: 0 auto 24px;
    }
    
    .hero-meta {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      font-size: 14px;
      color: var(--color-text-muted);
      margin-bottom: 40px;
    }
    
    .hero-meta time {
      color: var(--color-text-muted);
    }
    
    .hero-meta .badge {
      display: inline-block;
      background-color: var(--color-primary);
      color: var(--color-surface);
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 4px 10px;
      border-radius: 3px;
    }
    
    .hero figure {
      max-width: 900px;
      margin: 0 auto;
    }
    
    .hero figure img {
      width: 100%;
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
      border-radius: 4px;
    }
    
    .hero figure figcaption {
      margin-top: 12px;
    }
    
    .hero .start-reading {
      display: block;
      width: fit-content;
      margin: 32px auto 0;
      padding: 12px 28px;
      background-color: var(--color-primary);
      color: var(--color-surface);
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 500;
      text-decoration: none;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-radius: 4px;
      transition: transform var(--transition-fast), opacity var(--transition-fast);
    }
    
    .hero .start-reading:hover {
      opacity: 0.9;
      transform: translateY(-1px);
    }
    
    .hero .start-reading:focus {
      outline: 2px solid var(--color-primary);
      outline-offset: 2px;
    }
    
    /* ========================================
       6. TABLE OF CONTENTS (Horizontal)
       ======================================== */
    .toc {
      border-top: 1px solid var(--color-border);
      border-bottom: 1px solid var(--color-border);
      background-color: var(--color-surface);
    }
    
    .toc h2 {
      font-size: 14px;
      font-family: var(--font-body);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--color-text-muted);
      margin-bottom: 20px;
      text-align: center;
    }
    
    .toc-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 8px 16px;
      list-style: none;
      padding: 0;
      margin: 0;
    }
    
    .toc-list a {
      display: inline-block;
      font-size: 14px;
      font-weight: 500;
      color: var(--color-text);
      text-decoration: none;
      padding: 6px 12px;
      border: 1px solid var(--color-border);
      border-radius: 4px;
      transition: border-color var(--transition-fast), color var(--transition-fast);
    }
    
    .toc-list a:hover {
      border-color: var(--color-primary);
      color: var(--color-primary);
    }
    
    .toc-list a:focus {
      outline: 2px solid var(--color-primary);
      outline-offset: 2px;
    }
    
    /* ========================================
       7. FAQ SECTION
       ======================================== */
    details {
      border-bottom: 1px solid var(--color-border);
      interpolate-size: allow-keywords;
    }
    
    details:first-of-type {
      border-top: 1px solid var(--color-border);
    }
    
    summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px 0;
      cursor: pointer;
      font-weight: 600;
      font-size: 18px;
      color: var(--color-text);
      list-style: none;
      transition: color var(--transition-fast);
    }
    
    summary::-webkit-details-marker {
      display: none;
    }
    
    summary::after {
      content: "+";
      font-size: 24px;
      font-weight: 400;
      color: var(--color-text-muted);
      transition: transform var(--transition-base);
    }
    
    details[open] summary::after {
      transform: rotate(45deg);
    }
    
    summary:hover {
      color: var(--color-primary);
    }
    
    summary:focus {
      outline: 2px solid var(--color-primary);
      outline-offset: 2px;
    }
    
    /* Modern details animation */
    ::details-content {
      opacity: 0;
      block-size: 0;
      overflow: hidden;
      transition: 
        opacity var(--transition-base),
        block-size var(--transition-base),
        content-visibility var(--transition-base) allow-discrete;
    }
    
    details[open]::details-content {
      opacity: 1;
      block-size: auto;
    }
    
    /* Fallback for older browsers */
    @supports not selector(::details-content) {
      details[open] > *:not(summary) {
        animation: fade-in 0.3s ease forwards;
      }
      
      @keyframes fade-in {
        from {
          opacity: 0;
          transform: translateY(-8px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
    }
    
    details > div {
      padding-bottom: 20px;
    }
    
    details > div p {
      text-align: left;
      color: var(--color-text-secondary);
    }
    
    /* ========================================
       8. IMAGES
       ======================================== */
    .hero-image {
      width: 100%;
      max-width: 100%;
      height: auto;
      display: block;
    }
    
    .article-image {
      max-width: 100%;
      height: auto;
      display: block;
      margin: 0 auto;
    }
    
 
    
    /* ========================================
       10. BACK TO TOP
       ======================================== */
    .back-to-top {
      display: block;
      width: fit-content;
      margin: 40px auto 0;
      padding: 10px 20px;
      font-size: 13px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--color-text-muted);
      text-decoration: none;
      border: 1px solid var(--color-border);
      border-radius: 4px;
      transition: border-color var(--transition-fast), color var(--transition-fast);
    }
    
    .back-to-top:hover {
      border-color: var(--color-primary);
      color: var(--color-primary);
    }
    
    .back-to-top:focus {
      outline: 2px solid var(--color-primary);
      outline-offset: 2px;
    }
    
    
    
    /* ========================================
       11. MEDIA QUERIES
       ======================================== */
    @media (max-width: 768px) {
      :root {
        --section-gap: 48px;
        --content-padding: 20px;
      }
      
      body {
        font-size: 17px;
      }
      
      .hero {
        padding: 60px var(--content-padding) 40px;
      }
      
      .hero-meta {
        flex-direction: column;
        gap: 8px;
      }
      
      .toc-list {
        gap: 8px 12px;
      }
      
      .toc-list a {
        font-size: 13px;
        padding: 5px 10px;
      }
    }
    
    @media (max-width: 480px) {
      :root {
        --section-gap: 40px;
        --content-padding: 16px;
      }
      
      body {
        font-size: 16px;
      }
      
      summary {
        font-size: 16px;
        padding: 16px 0;
      }
    }

/* =========================================
   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;
}

/* Custom Footer Styles */
.custom-footer {
    background-color: #111827; /* Dark blue-grey background */
    color: #9ca3af; /* Light grey text */
    padding: 60px 20px 20px;
    font-family: sans-serif;
    border-top: 1px solid #374151;
}

.custom-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.custom-footer .footer-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.custom-footer .footer-col h4 {
    color: #f3f4f6; /* White headings */
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Subtle blue accent line under headings */
.custom-footer .footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #3b82f6; 
}

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

.custom-footer .footer-col ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Custom bullet points */
.custom-footer .footer-col ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background-color: #3b82f6; /* Blue dots */
    border-radius: 50%;
}

.custom-footer a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-footer a:hover {
    color: #60a5fa; /* Lighter blue on hover */
}

/* Footer bottom bar */
.custom-footer .footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.custom-footer .footer-bottom p {
    margin: 0 auto; /* Center the block itself */
    max-width: 100%; /* Override the global 65ch limit */
    text-align: center; /* Center the text horizontally */
}
/* Mobile responsiveness */
@media (max-width: 768px) {
    .custom-footer .footer-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

html, body {
  overflow-x: hidden;
}