/* ========================================
   1. CSS Variables & Reset
   ======================================== */
:root {
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Lora', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-logo: 'Poppins', sans-serif;

  --h1-size: clamp(2.2rem, 4vw, 3.2rem);
  --h2-size: clamp(1.6rem, 3vw, 2.2rem);
  --h3-size: clamp(1.2rem, 2.2vw, 1.6rem);
  --heading-weight: 700;
  --heading-letter-spacing: -0.02em;
  --heading-line-height: 1.15;

  --body-size: clamp(1rem, 1.1vw, 1.125rem);
  --body-weight: 400;
  --body-line-height: 1.75;
  --mono-size: 0.9em;

  --content-width: 840px;
  --content-padding: clamp(1rem, 4vw, 2rem);
  --section-gap: clamp(3.5rem, 6vw, 5rem);

  --bg-page: #121212;
  --bg-header: #1a1a1a;
  --bg-footer: #0d0d0d;
  --bg-card: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #9e9e9e;
  --accent: #a8e519;
  --accent-dark: #8bc20a;
  --border-color: #2a2a2a;

  --success: #4caf50;
  --danger: #ef5350;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-line-height);
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* ========================================
   2. General Typography
   ======================================== */
h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-letter-spacing);
  line-height: var(--heading-line-height);
  color: var(--text-primary);
  text-align: left;
}

h1 {
  font-size: var(--h1-size);
}

h2 {
  font-size: var(--h2-size);
  margin-bottom: 1.25rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: var(--h3-size);
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}

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

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

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

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

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

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

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

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

th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

figure {
  margin: 1.5em auto;
}

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

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

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

/* ========================================
   3. Layout — Sections
   ======================================== */
main {
  width: 100%;
}

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

[data-content="hero"] {
  margin-top: 0;
}

[data-content="intro"] {
  margin-top: 2.5rem;
}

[data-content="tldr"] {
  margin-top: 2.5rem;
}

[data-content="toc"] {
  margin-top: 2rem;
}

[data-content="intro"]>h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.article-image {
  border-radius: 4px;
  margin: 1.5em auto;
}

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

/* --- info-box --- */
.info-box {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

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

/* --- callout --- */
.callout {
  background: rgba(168, 229, 25, 0.06);
  border: 1px solid rgba(168, 229, 25, 0.15);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

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

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

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

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

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

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

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

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

.glossary-term strong {
  font-family: var(--font-mono);
  font-size: var(--mono-size);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: dotted;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- odds-example --- */
.odds-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 1.75rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.odds-example>div {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
}

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

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

.odds-example p strong {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* --- comparison --- */
.comparison {
  margin: 1.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison table {
  min-width: 600px;
}

.comparison th {
  background: var(--bg-card);
}

.comparison td {
  color: var(--text-primary);
  vertical-align: top;
}

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

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

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

.dos-donts p {
  text-align: left;
  color: var(--text-primary);
}

.dos-donts p strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.75rem;
}

.dos-donts ul {
  padding-left: 1.25rem;
}

.dos-donts li {
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  font-size: 0.95em;
  text-align: left;
}

/* --- pre-bet-checklist --- */
.pre-bet-checklist {
  margin: 1.75rem 0;
}

.pre-bet-checklist>p strong {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}

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

.pre-bet-checklist li {
  position: relative;
  margin-bottom: 0.75rem;
  text-align: left;
  color: var(--text-primary);
}

.pre-bet-checklist li::before {
  content: "\2610";
  position: absolute;
  left: -1.75rem;
  top: 0;
  color: var(--accent);
  font-size: 1.1em;
  background: var(--bg-page);
  padding: 0 2px;
  line-height: var(--body-line-height);
}

/* --- at-a-glance --- */
.at-a-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 1.75rem 0;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

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

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

.at-a-glance p {
  text-align: center;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.at-a-glance p:last-child {
  font-size: 0.8em;
  color: var(--text-secondary);
  line-height: 1.4;
}

.at-a-glance p strong {
  font-family: var(--font-mono);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

/* --- worked-example --- */
.worked-example {
  background: var(--bg-card);
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

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

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

.worked-example p strong {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* --- section-bridge --- */
.section-bridge {
  text-align: center;
  margin: 2.5rem 0 0.5rem;
  position: relative;
  padding: 0 2rem;
}

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

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

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

.section-bridge p {
  text-align: center;
  font-style: italic;
  color: var(--accent);
  font-size: 0.95em;
  margin-bottom: 0;
}

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

.card-grid>div {
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.card-grid p {
  text-align: left;
  color: var(--text-primary);
}

/* --- tldr --- */
.tldr {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 1.5rem 1.75rem;
  border-radius: 0 4px 4px 0;
}

.tldr h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  margin-bottom: 1rem;
  color: var(--accent);
}

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

.tldr li {
  margin-bottom: 0.6rem;
  font-size: 0.92em;
  color: var(--text-primary);
  text-align: left;
}

/* --- author-bio --- */
.author-bio {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: var(--section-gap);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
  width: 100%;
}

/* ========================================
   5. Hero Section
   ======================================== */
[data-content="hero"] {
  max-width: none;
  padding-top: 4rem;
  padding-bottom: 3.5rem;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

[data-content="hero"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(168, 229, 25, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

[data-content="hero"]>* {
  position: relative;
  z-index: 1;
}

.hero-rubric {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

[data-content="hero"] h1 {
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto 1rem;
  padding: 0 var(--content-padding);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  max-width: var(--content-width);
  margin: 0 auto 1.75rem;
  padding: 0 var(--content-padding);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  padding: 0 var(--content-padding);
}

.hero-meta span {
  white-space: nowrap;
}

[data-content="hero"] figure {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  position: relative;
  z-index: 1;
}

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

/* ========================================
   5b. Header
   ======================================== */
.site-header {
  background: var(--bg-header);
  padding: 0.75rem var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

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

.header-utils {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
}

.header-date {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

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

/* ========================================
   6. TOC — Horizontal
   ======================================== */
[data-content="toc"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

[data-content="toc"] a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

[data-content="toc"] a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

[data-content="faq"] summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  transition: color 0.2s ease;
}

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

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

[data-content="faq"] summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2em;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

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

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

[data-content="faq"] details>div {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

[data-content="faq"] details[open]>div {
  max-height: 500px;
  opacity: 1;
}

[data-content="faq"] details>div p {
  padding-bottom: 1rem;
  color: var(--text-secondary);
  text-align: left;
}

@supports selector(::details-content) {
  [data-content="faq"] details>div {
    max-height: none;
    opacity: 1;
    overflow: visible;
    transition: none;
  }

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

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

/* ========================================
   8. Footer
   ======================================== */
.site-footer {
  background: var(--bg-footer);
  margin-top: var(--section-gap);
  padding: 3rem var(--content-padding) 1.5rem;
  color: #888;
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 960px;
  margin: 0 auto 2.5rem;
}

.footer-grid h4 {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.footer-grid p {
  text-align: left;
  color: #888;
  margin-bottom: 0.5rem;
}

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

.footer-grid li {
  margin-bottom: 0.4rem;
  text-align: left;
}

.footer-grid a {
  color: #888;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 1rem;
  text-align: center;
  color: #888;
  font-size: 0.72rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ========================================
   9. Media Queries
   ======================================== */
@media (max-width: 768px) {
  [data-content] {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .odds-example {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .comparison table {
    font-size: 0.82em;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  [data-content="toc"] {
    justify-content: flex-start;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.4rem;
  }

  [data-content="hero"] {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

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

  .card-grid {
    grid-template-columns: 1fr;
  }
}

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

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

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

.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);
  box-sizing: border-box;
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .toc-columns {
    display: grid;
    /* Было: grid-template-columns: 1fr 1fr; */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
  }
}

.toc-columns a {
  white-space: normal;
  /* Разрешает перенос текста на новую строку */
  word-wrap: break-word;
  /* Позволяет разрывать длинные слова, если они не помещаются */
  box-sizing: border-box;
  /* Учитывает внутренние отступы в ширине элемента */
  width: 100%;
  /* Гарантирует, что элемент не превышает ширину колонки */
  display: inline-block;
  /* Или flex, в зависимости от вашей текущей верстки */
}

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


/* FIX: constrain header width on desktop */
@media (min-width: 1024px) {
  .top-navigation-bar {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Constrain showcase trust-header flag so badges never overlap on any width */
.tc-trust-header--s1 .tc-trust-flag {
  max-width: 24px !important;
  width: auto !important;
  height: auto !important;
}

/* Make 1win banner on inner pages match the homepage (wide, not narrow/tall) */
.cl-main .tc-s1-banner,
.article-main .tc-s1-banner {
  width: 100% !important;
  max-width: 100% !important;
}

.cl-main .tc-s1-bn--hor,
.article-main .tc-s1-bn--hor {
  aspect-ratio: 868 / 190 !important;
  height: auto !important;
  min-height: 0 !important;
  background-size: cover !important;
  background-position: center !important;
}