:root {
  --color-primary: #6B21A8;
  --color-primary-light: #9333EA;
  --color-accent: #F59E0B;
  --color-accent-dark: #D97706;
  --color-text: #1e293b;
  --color-text-secondary: #475569;
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-border: #e2e8f0;
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-danger: #F43F5E;
  --color-danger-light: #FFE4E6;
  --font-display: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width-content: 820px;
  --section-gap: clamp(3rem, 6vw, 5rem);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);

    /* --- AUTO-FORCED DARK THEME --- */
    --color-text: #f1f5f9;
    --color-text-secondary: #94a3b8;
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-border: #334155;
    --color-success-light: #064e3b;
    --color-danger-light: #4c0519;
}



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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

a:hover {
  color: var(--color-primary-light);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  color: var(--color-text);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 0;
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}

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

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

li {
  margin-bottom: 0.5em;
}

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

strong {
  font-weight: 600;
}

/* Header */
header {
  padding: 0;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
}

.trust-marker {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* Main Layout - Sidebar TOC */
main {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

article {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 0 1.5rem;
  width: 100%;
}

/* Data Content Sections */
[data-content] {
  max-width: var(--max-width-content);
  margin: 0 auto var(--section-gap);
  padding: 0 1rem;
  grid-column: 2;
}

[data-content]:last-child {
  margin-bottom: 2rem;
}

/* Hero Section */
[data-content="hero"] {
  grid-column: 1 / -1;
  max-width: none;
  width: 100vw;
  margin-left: calc(-1.5rem);
  margin-right: calc(-1.5rem);
  margin-bottom: var(--section-gap);
  padding: 0;
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  overflow: hidden;
}

[data-content="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(243, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

[data-content="hero"] h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-align: center;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 2rem;
}

[data-content="hero"] figure {
  margin: 2rem auto 0;
  max-width: 800px;
}

[data-content="hero"] .hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

[data-content="hero"] figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.75rem;
}

.start-reading-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.85rem 1.75rem;
  background: var(--color-accent);
  color: #1e293b;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 100px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-reading-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
  color: #1e293b;
}

/* TOC Sidebar */
[data-content="toc"] {
  grid-column: 1;
  grid-row: 2 / 20;
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1.25rem;
  margin: 0;
  max-width: none;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

[data-content="toc"]::-webkit-scrollbar {
  width: 4px;
}

[data-content="toc"]::-webkit-scrollbar-track {
  background: transparent;
}

[data-content="toc"]::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

[data-content="toc"] h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav li {
  margin-bottom: 0.25rem;
}

.toc-nav > li > a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.toc-nav > li > a:hover {
  color: var(--color-primary);
}

.toc-nav ul {
  list-style: none;
  padding-left: 0.85rem;
  margin: 0.25rem 0 0.5rem;
  border-left: 1px solid var(--color-border);
}

.toc-nav ul li a {
  display: block;
  padding: 0.25rem 0 0.25rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.toc-nav ul li a:hover {
  color: var(--color-primary);
}

/* TL;DR */
.tldr {
  background: var(--color-surface);
  border-left: 3px solid var(--color-primary);
  padding: 1.5rem 1.75rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--section-gap);
}

.tldr h2 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.tldr ul {
  margin-bottom: 0;
}

.tldr li {
  margin-bottom: 0.75em;
  line-height: 1.6;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9em;
  text-align: left;
}

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

th {
  font-weight: 600;
  background: var(--color-surface);
  color: var(--color-text);
}

tr:nth-child(even) {
  background: var(--color-surface);
}

/* Figure / Images */
figure {
  margin: 2rem auto;
  max-width: 100%;
}

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

.article-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

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

[data-content="faq"] details:first-of-type {
  border-top: 1px solid var(--color-border);
}

[data-content="faq"] summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}

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

[data-content="faq"] summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  transition: transform 0.25s ease;
}

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

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

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

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

@supports not selector(::details-content) {
  [data-content="faq"] details[open] > div {
    animation: fade-in 0.3s ease forwards;
  }
  @keyframes fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

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

[data-content="faq"] details p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Component: info-box */
.info-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-text-secondary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.info-box p {
  margin-bottom: 0.75em;
  text-align: left;
  color: var(--color-text);
}

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

/* Component: callout */
.callout {
  background: var(--color-danger-light);
  border-left: 3px solid var(--color-danger);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5em 0;
}

.callout p {
  margin-bottom: 0;
  text-align: left;
  color: var(--color-text);
}

@media (prefers-color-scheme: dark) {
  .callout {
    background: var(--color-danger-light);
  }
}

/* Component: key-takeaway */
.key-takeaway {
  border-top: 2px solid var(--color-accent);
  padding-top: 1rem;
  margin: 2em 0;
}

.key-takeaway p {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
  text-align: left;
  margin: 0;
}

/* Component: fun-fact */
.fun-fact {
  position: relative;
  padding-left: 1.25rem;
  margin: 1.5em 0;
}

.fun-fact::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 600;
}

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

/* Component: calc-example */
.calc-example {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: dark) {
  .calc-example {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid var(--color-border);
  }
}

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

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

.calc-example .result {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
}

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

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

.card-grid .card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-grid .card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card-grid .card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
  text-align: left;
}

/* Component: comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5em 0;
}

.comparison > div {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.comparison h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.comparison p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
  text-align: left;
}

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

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

.glossary-term .term {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
}

.glossary-term .definition {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

@media (max-width: 600px) {
  .glossary-term {
    flex-direction: column;
    gap: 4px;
  }
}

/* Component: dos-donts */
.dos-donts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5em 0;
}

.dos-donts .do-col {
  background: var(--color-success-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.dos-donts .dont-col {
  background: var(--color-danger-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.dos-donts h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.dos-donts .do-col h4 {
  color: var(--color-success);
}

.dos-donts .dont-col h4 {
  color: var(--color-danger);
}

.dos-donts ul {
  margin: 0;
  padding-left: 1.25em;
}

.dos-donts li {
  font-size: 0.9rem;
  color: var(--color-text);
  text-align: left;
}

@media (max-width: 600px) {
  .dos-donts {
    grid-template-columns: 1fr;
  }
}

/* Component: pre-game-checklist */
.pre-game-checklist {
  margin: 1.5em 0;
}

.pre-game-checklist h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.pre-game-checklist ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-left: 2px solid var(--color-border);
  padding-left: 1.25rem;
}

.pre-game-checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75em;
  font-size: 0.95rem;
}

.pre-game-checklist li::before {
  content: '\2610';
  position: absolute;
  left: -1.35rem;
  color: var(--color-primary);
  background: var(--color-bg);
  padding: 0 2px;
}

/* Component: at-a-glance */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.5em 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

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

.at-a-glance h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.at-a-glance p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  text-align: center;
}

@media (max-width: 700px) {
  .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;
  }
}

/* Component: worked-example */
.worked-example {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  margin: 1.5em 0;
  box-shadow: var(--shadow-sm);
}

.worked-example h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.worked-example .step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--color-border);
}

.worked-example .step:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.worked-example .step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-bg);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.worked-example .step p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin: 0;
  text-align: left;
  color: var(--color-text);
}

.worked-example .result-line {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

/* Component: section-bridge */
.section-bridge {
  text-align: center;
  font-style: italic;
  color: var(--color-primary);
  margin: 2.5rem 0;
  position: relative;
  font-size: 0.95rem;
}

.section-bridge::before,
.section-bridge::after {
  content: '\2014\2014';
  color: var(--color-border);
  margin: 0 0.75rem;
}


/* Mobile Responsive */
@media (max-width: 900px) {
  main {
    display: block;
    padding: 0 1rem;
  }

  article {
    display: block;
    padding: 0;
  }

  [data-content="toc"] {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-bottom: var(--section-gap);
    grid-column: auto;
  }

  [data-content] {
    grid-column: auto;
    padding: 0;
  }

  [data-content="hero"] {
    width: calc(100% + 2rem);
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .header-meta {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    justify-content: center;
    padding: 1rem;
  }

  .hero-inner {
    padding: 4rem 1.5rem 3rem;
  }

  [data-content="hero"] h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }

  .start-reading-btn {
    width: 100%;
    justify-content: center;
  }
}

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

  .hero-inner {
    padding: 3.5rem 1rem 2.5rem;
  }

  .date-badge {
    font-size: 0.65rem;
    padding: 0.35rem 0.7rem;
  }

  .trust-marker {
    font-size: 0.6rem;
  }

  table {
    font-size: 0.8rem;
  }

  th, td {
    padding: 0.6rem 0.75rem;
  }
}

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

/* Header Base */
.site-header {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border, #333);
    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 img {
    max-height: 75px; /* Optimal height for most logos */
    width: auto !important; /* Prevents squishing */
    display: block;
    transition: transform 0.2s ease;
}

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

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

/* Desktop Grid Layout: Logo left, Menu center */
@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%;
        padding: 15px 40px; /* Safe padding from screen edges */
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }
    
    .site-logo {
        grid-column: 1;
        justify-self: start; /* Locks logo to the left edge */
        margin: 0;
    }

    .site-nav--desktop {
        display: block;
        grid-column: 2;
        justify-self: center; /* Locks menu perfectly in the center */
    }

    .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;
}

/* =========================================
   4-COLUMN FOOTER (Sweeps Casino Login)
   ========================================= */
.site-footer-4col {
    background-color: #0f172a; /* Deep navy background */
    color: #94a3b8;
    padding: 60px 20px 30px;
    margin-top: 80px;
    font-family: var(--font-body, sans-serif);
    border-top: 3px solid var(--color-accent, #8b5cf6); /* Purple border */
}

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

/* Legal Disclaimers Block */
.footer-disclaimers {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-disclaimers p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    text-align: left;
}

.footer-disclaimers a {
    color: var(--color-accent, #8b5cf6);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-disclaimers a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Grid Layout */
.footer-4col-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .footer-4col-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-4col-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* Purple Titles (Using div for W3C) */
.widget-title {
    color: var(--color-accent, #8b5cf6); 
    font-family: var(--font-display, sans-serif); 
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    margin-top: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.widget-list a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget-list a:hover {
    color: var(--color-accent, #8b5cf6);
}

/* Bullets */
.bullet-list li {
    position: relative;
    padding-left: 16px;
}

.bullet-list li::before {
    content: '•';
    color: var(--color-accent, #8b5cf6); 
    position: absolute;
    left: 0;
    top: -2px;
    font-size: 1.5rem;
    line-height: 1;
}

.clean-list li {
    padding-left: 0;
    padding-bottom: 0.8rem;
}

.clean-list li::before {
    display: none;
}

.footer-4col-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    text-align: center;
}

.footer-4col-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    text-align: center;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-accent, #8b5cf6);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: #7c3aed;
    transform: translateY(-5px);
}

/* =========================================
   KILL THE ZIGZAG BUG (Pages without TOC)
   ========================================= */
/* Если на странице нет оглавления, выключаем сетку 240px/1fr */
article:not(:has([data-content="toc"])) {
    display: block !important;
}

/* Центрируем заголовки, шапки и одиночные картинки, чтобы они стояли ровно над текстом */
article:not(:has([data-content="toc"])) > h1,
article:not(:has([data-content="toc"])) > header,
article:not(:has([data-content="toc"])) > figure {
    max-width: var(--max-width-content);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding: 0 1rem;
}

body {
  overflow-x: clip;
}