/* onlyfansstatistics.com — base stylesheet
   Brand: data-cyan + deep-navy. Inter for body, JetBrains Mono for numbers.
*/

:root {
  --bg: #0a1424;
  --bg-2: #0f1c30;
  --bg-3: #14253f;
  --line: #1d3151;
  --line-strong: #2a4670;
  --ink: #e8eef9;
  --ink-2: #b8c5db;
  --ink-3: #7c8aa3;
  --accent: #36e1ff;
  --accent-2: #00b8d4;
  --accent-deep: #007a8a;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --max: 1200px;
  --pad: clamp(16px, 4vw, 32px);
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

/* WCAG 1.4.1 — links inside prose must be distinguishable beyond colour.
   Inline links in body copy, lists, tables, and source lists get an
   underline; structural links (nav, cards, footer columns, buttons) keep
   their decoration off because their layout already signals interactivity. */
.article-body p a,
.article-body li a,
.article-body strong a,
.article-body em a,
.tldr li a,
.sources-list a,
.data-table td a,
.footer-disclaimer a,
.chart-foot a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(54, 225, 255, 0.55);
}

.article-body p a:hover,
.article-body li a:hover,
.tldr li a:hover,
.sources-list a:hover,
.data-table td a:hover,
.footer-disclaimer a:hover,
.chart-foot a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); margin-top: 2em; }
h3 { font-size: 1.25rem; margin-top: 1.5em; }

p { color: var(--ink-2); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 64ch; }

.num, .stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-feature-settings: "tnum";
  color: var(--accent);
}

/* Layout */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 20, 36, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Featured Hero (chart + stat pills) — FINAL v2 ===== */
.hero.hero-v2 {
  padding-top: clamp(28px, 3.4vw, 44px);
  padding-bottom: clamp(20px, 2.4vw, 32px);
}
.hero-meta-row {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
/* Combined pill — eyebrow + pulsing dot + last-updated date */
.hero-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  max-width: 100%;
}
.hero-meta-pill .meta-sep {
  color: var(--ink-3, #7c8aa3);
  opacity: 0.6;
}
.hero-meta-pill .meta-label,
.hero-meta-pill .meta-date {
  color: var(--ink-2, #b8c5db);
  font-weight: 500;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--good, #4ade80);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); opacity: 1; }
  50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); opacity: 0.85; }
}
@media (max-width: 600px) {
  .hero-meta-pill {
    font-size: 0.66rem;
    padding: 5px 12px;
    gap: 6px;
    letter-spacing: 0.3px;
  }
}
.hero.hero-v2 h1 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin: 4px 0;
  max-width: none;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.hero.hero-v2 .hero-tagline {
  font-size: clamp(14px, 1.3vw, 15.5px);
  color: var(--ink-2, #b8c5db);
  margin: 0 0 12px;
  line-height: 1.45;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 8px;
}
.stat-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.stat-pill {
  background: rgba(54, 225, 255, 0.06);
  border: 1px solid rgba(54, 225, 255, 0.18);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, background 0.2s;
}
.stat-pill:hover {
  border-color: rgba(54, 225, 255, 0.4);
  background: rgba(54, 225, 255, 0.1);
}
.stat-pill-value {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  color: #36e1ff;
  line-height: 1.1;
}
.stat-pill-label {
  font-size: 10.5px;
  color: #7c8aa3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-top: 3px;
}
.hero-chart-wrap {
  background: rgba(15, 28, 48, 0.4);
  border: 1px solid rgba(54, 225, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-chart-wrap img {
  width: 100%;
  height: auto;
  max-height: clamp(200px, 42vh, 420px);
  object-fit: contain;
  display: block;
}
.hero-chart-caption {
  font-size: 11px;
  color: #7c8aa3;
  margin: 6px 0 0;
  text-align: center;
  letter-spacing: 0.2px;
}
@media (max-width: 819px) {
  .hero-chart-wrap {
    margin-left: calc(var(--pad, 16px) * -1);
    margin-right: calc(var(--pad, 16px) * -1);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 10px 10px 12px;
  }
  .hero-chart-wrap img { max-height: clamp(180px, 32vh, 280px); }
}
@media (max-width: 480px) {
  .stat-pills { grid-template-columns: repeat(2, 1fr); }
  .hero-chart-wrap img { max-height: clamp(160px, 28vh, 220px); }
}

/* Desktop: push nav-primary + header-actions to the right side
   (grouped — not space-between'd across the full row). */
@media (min-width: 761px) {
  .nav-primary { margin-left: auto; gap: 22px; }
  .header-actions { margin-left: 24px; }
}

/* On mobile, lang-button matches hamburger size exactly */
@media (max-width: 760px) {
  .header-actions { margin-left: auto; }
  .header-actions .lang-current {
    height: 40px;
    min-width: 56px;
    padding: 0 8px;
    box-sizing: border-box;
  }
  .header-actions .lang-current .lang-label { display: none; }
  .header-actions .lang-current .lang-globe { display: none; }
  .header-actions .lang-current .lang-flag { margin: 0; }
  .header-actions .nav-toggle {
    height: 40px;
    padding: 0 10px;
    box-sizing: border-box;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--ink); text-decoration: none; }

.brand-mark {
  width: 32px;
  height: 32px;
  display: inline-block;
}

.brand-name { color: var(--ink); }
.brand-name b { color: var(--accent); }

.nav-primary {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
}

.nav-primary a {
  color: var(--ink-2);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-primary a:hover { color: var(--accent); text-decoration: none; }

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle svg { display: block; width: 22px; height: 22px; }
.nav-toggle .nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .brand-name { font-size: 0.95rem; }

  /* Mobile nav: robust display-based toggle.
     translateY(-110%) was leaving a visible bar on some mobile browsers
     (Edge mobile in particular) — display: none/flex avoids that entirely. */
  .nav-primary {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px var(--pad) 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    z-index: 49;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-primary.is-open { display: flex; }
  .nav-primary a {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav-primary a:last-child { border-bottom: none; }
}

/* Hero */
.hero {
  padding: clamp(64px, 10vw, 128px) 0 clamp(48px, 8vw, 80px);
  background:
    radial-gradient(ellipse at top, rgba(54, 225, 255, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.hero h1 { max-width: 18ch; }
.hero .lede { margin-top: 1.25rem; max-width: 58ch; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease;
}

.stat-card:hover { border-color: var(--line-strong); }

.stat-card .stat-num {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 500;
}

.stat-card .stat-source {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* Footer */
.site-footer {
  margin-top: clamp(64px, 10vw, 128px);
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.footer-grid {
  display: grid;
  /* 2x4 layout: 4 columns on desktop wraps to 2 rows of 4 columns each */
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 28px;
  margin-bottom: 32px;
}

@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.footer-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 12px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-2); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-3);
}

.footer-disclaimer {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--ink-3);
  max-width: 80ch;
  line-height: 1.5;
}

/* === Canonical 6-Col Footer v3.2 === */
.footer-grid-v3 {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1.1fr 1fr 1.1fr 0.9fr;
  gap: 28px;
  padding: 48px 0 32px;
}
.footer-grid-v3 .footer-col {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.footer-grid-v3 .footer-col-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--ink, #b8c5db);
  margin: 0 0 8px; font-family: var(--font-mono, ui-monospace, monospace);
  display: flex; align-items: center; gap: 8px;
}
.footer-grid-v3 .footer-col-title .dot {
  display: inline-block; width: 8px; height: 8px; background: #a78bfa;
  border-radius: 50%; box-shadow: 0 0 0 4px rgba(167,139,250,0.18);
}
.footer-grid-v3 .footer-col-title.research { color: #a78bfa; }
.footer-grid-v3 .footer-col-title.tools { color: #36e1ff; }
.footer-grid-v3 .badge-new, .footer-grid-v3 .badge-live, .footer-grid-v3 .badge-star {
  font-size: 0.55em; padding: 1px 5px; border-radius: 3px; font-weight: 700;
  letter-spacing: 0.05em; vertical-align: middle; margin-left: 4px;
}
.footer-grid-v3 .badge-new { background: #a78bfa; color: #0c1b2e; }
.footer-grid-v3 .badge-live { background: #4ade80; color: #0c1b2e; }
.footer-grid-v3 .badge-star { background: #fbbf24; color: #0c1b2e; }
.footer-grid-v3 .footer-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.footer-grid-v3 .footer-list li { line-height: 1.4; margin: 0; }
.footer-grid-v3 .footer-list a {
  color: var(--ink-2, #b8c5db); text-decoration: none; font-size: 0.86rem;
}
.footer-grid-v3 .footer-list a:hover { color: var(--accent, #36e1ff); text-decoration: underline; }
.footer-grid-v3 .footer-list-compact { gap: 4px; }
.footer-grid-v3 .footer-list-compact a { font-size: 0.82rem; }
.footer-grid-v3 .footer-list-bold a strong { color: #fff; }
.footer-grid-v3 .footer-list-secondary { gap: 4px; opacity: 0.75; }
.footer-grid-v3 .footer-list-secondary a { font-size: 0.78rem; }
.footer-grid-v3 .footer-link-cta {
  display: inline-block; margin-top: 10px; color: #a78bfa;
  font-size: 0.84rem; font-weight: 600; text-decoration: none;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.footer-grid-v3 .footer-link-cta:hover { text-decoration: underline; }
.footer-grid-v3 .footer-divider {
  border: 0; border-top: 1px solid rgba(255,255,255,0.08); margin: 14px 0 10px;
}
.footer-grid-v3 .footer-subhead {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3, #7c8aa3); font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 600; margin: 10px 0 4px;
}
.footer-grid-v3 .footer-brand .brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit; margin-bottom: 4px;
}
.footer-grid-v3 .footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-grid-v3 .footer-brand .brand-name {
  font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink, #e8eef9);
}
.footer-grid-v3 .footer-brand .brand-name b { color: var(--accent, #36e1ff); font-weight: 700; }
.footer-grid-v3 .footer-brand .footer-disclaimer {
  font-size: 0.78rem; color: var(--ink-3, #7c8aa3); line-height: 1.5;
  margin: 4px 0 8px; max-width: none;
}
.footer-grid-v3 .footer-social {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
}
.footer-grid-v3 .footer-social span {
  font-size: 0.65rem; color: var(--ink-3, #7c8aa3); letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600; margin-right: 4px;
}
.footer-grid-v3 .footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--ink-2, #b8c5db); text-decoration: none;
}
.footer-grid-v3 .footer-social a:hover {
  background: rgba(54,225,255,0.1); border-color: rgba(54,225,255,0.3);
  color: var(--accent, #36e1ff);
}
.footer-grid-v3 .footer-copyright {
  font-size: 0.72rem; color: var(--ink-3, #7c8aa3); margin-top: 16px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.footer-grid-v3 .footer-research {
  background: rgba(167,139,250,0.06); border: 1px solid rgba(167,139,250,0.22);
  border-radius: 12px; padding: 20px 22px;
}
.footer-grid-v3 .footer-tools {
  background: rgba(54,225,255,0.05); border: 1px solid rgba(54,225,255,0.22);
  border-radius: 12px; padding: 20px 22px;
}
.footer-meta-v3 {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem; color: var(--ink-3, #7c8aa3);
  font-family: var(--font-mono, ui-monospace, monospace);
}
/* Tablet: 6 → 3 (Brand row, then 5 cols distributed) */
@media (max-width: 1200px) {
  .footer-grid-v3 { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .footer-grid-v3 .footer-brand    { grid-column: 1 / 4; grid-row: 1; }
  .footer-grid-v3 .footer-research { grid-column: 1 / 2; grid-row: 2; }
  .footer-grid-v3 .footer-tools    { grid-column: 2 / 3; grid-row: 2; }
  .footer-grid-v3 .footer-data     { grid-column: 3 / 4; grid-row: 2; }
  .footer-grid-v3 .footer-audience { grid-column: 1 / 3; grid-row: 3; }
  .footer-grid-v3 .footer-site     { grid-column: 3 / 4; grid-row: 3; }
}
/* Phone: 1 col stacked */
@media (max-width: 640px) {
  .footer-grid-v3 { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid-v3 .footer-col { grid-column: auto; grid-row: auto; }
}

/* Coming-soon variant */
.coming-soon {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.coming-soon h1 { margin-bottom: 0.5em; }

.coming-soon .preview-stats {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  width: 100%;
}

.coming-soon .preview-stats h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-weight: 600;
  margin-top: 0;
}

/* ─────────────────────────────────────────
   Article / content-page layout
   ───────────────────────────────────────── */

.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  margin-top: 24px;
}

@media (max-width: 960px) {
  .article { grid-template-columns: 1fr; }
  .article-aside { order: -1; }
}

.article-body p,
.article-body li {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}

.article-body p { margin: 0 0 1em; max-width: 72ch; }
.article-body strong { color: var(--ink); }

.article-body ul, .article-body ol {
  max-width: 72ch;
  padding-left: 1.5em;
}

.article-body li { margin-bottom: 0.4em; }

.article-body h2 {
  scroll-margin-top: 80px;
  margin-top: 2.5em;
  padding-top: 0.5em;
  border-top: 1px solid var(--line);
}

.article-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 1.5em;
}

.article-body h3 {
  scroll-margin-top: 80px;
  color: var(--accent);
  font-size: 1.1rem;
  text-transform: none;
}

/* TL;DR box */
.tldr {
  background: linear-gradient(135deg, rgba(54, 225, 255, 0.06), rgba(54, 225, 255, 0.02));
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
}

.tldr h2 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-family: var(--font-mono);
  border: none;
  padding: 0;
}

.tldr ul { margin: 0; padding-left: 1.2em; }
.tldr li { color: var(--ink); font-size: 0.95rem; margin-bottom: 0.4em; }
.tldr li strong { color: var(--accent); font-family: var(--font-mono); }

/* Inline-aside / sidebar */
.aside-block {
  position: sticky;
  top: 80px;
}

.aside-block h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 12px;
  font-family: var(--font-mono);
}

/* Table of contents */
.toc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}

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

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
}

.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.active { color: var(--accent); }

/* Cite block */
.cite-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}

.cite-block h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
  margin: 0 0 12px;
  font-family: var(--font-mono);
}

.cite-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cite-btn {
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  padding: 5px 10px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cite-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cite-btn.copied {
  border-color: var(--good);
  color: var(--good);
}

.cite-out {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  line-height: 1.5;
  word-break: break-word;
  display: none;
}

.cite-out.visible { display: block; }

/* Chart container */
.chart-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.chart-meta {
  font-size: 0.78rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

.chart-canvas-wrap {
  position: relative;
  height: 320px;
  width: 100%;
}

@media (max-width: 600px) {
  .chart-canvas-wrap { height: 260px; }
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--bg-3);
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-3);
}

.chart-foot a {
  color: var(--ink-3);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
}

.chart-foot a:hover { color: var(--accent); }

/* Embed-this widget */
.embed-block {
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 16px 0 24px;
}

.embed-block summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

.embed-block summary::-webkit-details-marker { display: none; }
.embed-block summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  font-weight: 400;
}

.embed-block[open] summary::after { content: "−"; }

.embed-code {
  display: block;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

.embed-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Data tables */
.data-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  background: var(--bg-2);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-2); }

.data-table .num,
.data-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 500;
}

.data-table .delta-up { color: var(--good); }
.data-table .delta-down { color: var(--bad); }

/* Sources list */
.sources-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  font-size: 0.88rem;
}

.sources-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.sources-list li:last-child { border-bottom: none; }
.sources-list .src-id {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-right: 8px;
}

/* Internal-link grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.related-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.15s ease;
}

.related-card:hover {
  border-color: var(--accent);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-2px);
}

.related-card .rc-eyebrow {
  font-size: 0.72rem;
  color: var(--accent);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.related-card .rc-title {
  display: block;
  font-weight: 600;
  margin-top: 4px;
  color: var(--ink);
}

.related-card .rc-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Editorial pick — affiliate / sister-site block for prominent placement
   inside article body. Sits between sections; clearly distinguished from
   normal content but not spammy. */
.editorial-pick {
  background: linear-gradient(135deg, rgba(54, 225, 255, 0.10), rgba(54, 225, 255, 0.02));
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 32px 0;
}

.editorial-pick h3 {
  color: var(--accent);
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  scroll-margin-top: 80px;
  border: none;
  padding: 0;
}

.editorial-pick p {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

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

.editorial-pick a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(54, 225, 255, 0.55);
}

.editorial-pick a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.editorial-pick .ep-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-3);
  color: var(--ink-3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  font-family: var(--font-mono);
}

/* Updated stamp */
.updated-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--ink-3);
  margin: 12px 0 0;
}

.updated-stamp::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--good);
  border-radius: 50%;
}

/* Embed page (iframe-only) */
body.embed-page {
  background: var(--bg);
  margin: 0;
  padding: 16px;
  min-height: 100vh;
}

body.embed-page .chart-block {
  margin: 0;
  background: var(--bg-2);
}

body.embed-page .chart-foot a {
  color: var(--accent);
}

/* Footnote refs */
sup.fn-ref {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.75em;
  margin-left: 1px;
}

sup.fn-ref a { color: var(--accent); }

/* ─── Language selector (flag-based, 28 langs) ─────────────────────────── */
.lang-selector { position: relative; display: inline-flex; }
.lang-current {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: transparent; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink-2); font: inherit; font-size: 14px;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.lang-current:hover, .lang-current:focus-visible { color: var(--ink); border-color: var(--line-strong); outline: none; }
.lang-current .lang-globe { width: 14px; height: 14px; opacity: 0.85; }
.lang-current .lang-caret { width: 10px; height: 10px; opacity: 0.6; transition: transform 0.15s; }
.lang-current[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-current .lang-flag { width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; margin: 0; list-style: none;
  box-shadow: var(--shadow); z-index: 1000; min-width: 200px;
  max-height: 360px; overflow-y: auto;
}
.lang-menu[hidden] { display: none; }
.lang-menu li { margin: 0; }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 6px;
  text-decoration: none; color: var(--ink-2); font-size: 14px;
  white-space: nowrap;
}
.lang-menu a:hover, .lang-menu a:focus-visible {
  background: rgba(54, 225, 255, 0.08); color: var(--ink); outline: none;
}
.lang-menu a[aria-current="true"], .lang-menu a.is-active { color: var(--accent); font-weight: 600; background: rgba(54, 225, 255, 0.04); }
.lang-menu .lang-flag { width: 22px; height: 16px; flex-shrink: 0; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.lang-menu .lang-native { flex: 1; }
/* Custom scrollbar for the lang dropdown */
.lang-menu::-webkit-scrollbar { width: 8px; }
.lang-menu::-webkit-scrollbar-track { background: transparent; }
.lang-menu::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.lang-menu::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }
@media (max-width: 760px) {
  .lang-selector { margin-left: auto; }
  .lang-menu { right: -6px; min-width: 200px; max-height: 320px; }
}

/* ============ Reading Progress Bar (bounce-rate reducer) ============ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.reading-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent, #36e1ff) 0%, #a78bfa 100%);
  box-shadow: 0 0 8px rgba(54, 225, 255, 0.45);
  transition: width 80ms linear;
  will-change: width;
}
.reading-progress-label {
  position: fixed;
  top: 72px;
  right: 14px;
  background: rgba(15, 28, 48, 0.86);
  color: var(--ink-2, #b8c5db);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 12px;
  z-index: 49;
  border: 1px solid rgba(54, 225, 255, 0.22);
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.reading-progress-label.visible {
  opacity: 1;
  transform: translateY(0);
}
/* RTL: label on the left */
html[dir="rtl"] .reading-progress-label { right: auto; left: 14px; }
/* Mobile: hide label (bar alone is enough, no header conflict) */
@media (max-width: 760px) {
  .reading-progress-label { display: none !important; }
}
/* Print: hide */
@media print {
  .reading-progress, .reading-progress-label { display: none !important; }
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reading-progress-bar { transition: none; }
  .reading-progress-label { transition: opacity 0ms; }
}

/* ============ Inline Income Calculator Widget (bounce-rate reducer) ============ */
.ic-inline-card {
  background: linear-gradient(135deg, #062a26 0%, #0a3a35 60%, #053028 100%);
  border: 1.5px solid rgba(20, 184, 166, 0.4);
  border-radius: 16px;
  padding: 28px;
  margin: 32px auto;
  max-width: 720px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.ic-inline-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), transparent 70%);
  pointer-events: none;
}
.ic-inline-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, #14b8a6 50%, transparent 100%);
  opacity: 0.6;
}
.ic-inline-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}
.ic-inline-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(20, 184, 166, 0.5));
}
.ic-inline-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
}
.ic-inline-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.ic-inline-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.ic-inline-row {
  display: grid;
  grid-template-columns: 160px 1fr 80px;
  align-items: center;
  gap: 14px;
}
.ic-inline-label {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}
.ic-inline-val {
  text-align: right;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 700;
  color: #2dd4bf;
  font-size: 0.92rem;
}
.ic-inline-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.ic-inline-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  cursor: pointer;
  border: 2px solid #062a26;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 120ms;
}
.ic-inline-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.ic-inline-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  cursor: pointer;
  border: 2px solid #062a26;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.5);
}
.ic-inline-row select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  color: #e8eef9;
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.92rem;
  font-family: inherit;
  grid-column: 2 / 4;
}
.ic-inline-row select:focus {
  outline: none;
  border-color: #14b8a6;
}
.ic-inline-result {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(20, 184, 166, 0.2);
  position: relative;
  z-index: 2;
}
.ic-inline-monthly {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ic-inline-label-sm {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(45, 212, 191, 0.85);
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.ic-inline-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ic-inline-amount {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ic-inline-suffix {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.ic-inline-after {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 2px;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.ic-inline-pct {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  text-align: right;
}
.ic-inline-pct b {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 800;
  color: #14b8a6;
  line-height: 1;
  text-shadow: 0 0 18px rgba(20, 184, 166, 0.4);
}
.ic-inline-top {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-weight: 700;
}
.ic-inline-of {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono, ui-monospace, monospace);
}
.ic-inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 10px 18px;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(20, 184, 166, 0.55);
  border-radius: 8px;
  color: #2dd4bf;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
  transition: background 160ms, transform 160ms;
  position: relative;
  z-index: 2;
}
.ic-inline-cta:hover {
  background: rgba(20, 184, 166, 0.32);
  transform: translateX(2px);
  text-decoration: none;
}
/* RTL */
html[dir="rtl"] .ic-inline-cta:hover { transform: translateX(-2px); }
html[dir="rtl"] .ic-inline-pct { align-items: flex-start; text-align: left; }
html[dir="rtl"] .ic-inline-val { text-align: left; }
/* Mobile */
@media (max-width: 640px) {
  .ic-inline-card { padding: 20px; }
  .ic-inline-row { grid-template-columns: 1fr; gap: 6px; }
  .ic-inline-row select { grid-column: auto; }
  .ic-inline-val { text-align: left; }
  .ic-inline-result { grid-template-columns: 1fr; gap: 14px; }
  .ic-inline-pct { align-items: flex-start; text-align: left; }
}

/* ============ Sticky Live-Tracker Widget (bounce-rate reducer) ============ */
.live-tracker {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 28, 48, 0.94);
  border: 1px solid rgba(74, 222, 128, 0.34);
  border-radius: 14px;
  padding: 11px 16px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  z-index: 9997;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74, 222, 128, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 280ms ease, transform 280ms ease;
  max-width: calc(100% - 40px);
}
.live-tracker.visible {
  opacity: 1;
  transform: translateY(0);
}
.live-tracker.dismissed {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.lt-dot-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4ade80;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
}
.lt-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80, 0 0 14px rgba(74, 222, 128, 0.6);
  animation: lt-pulse 1.8s ease-in-out infinite;
}
@keyframes lt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.78); }
}
.lt-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 12px;
}
.lt-stat b {
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: color 240ms;
}
.lt-stat-money b {
  color: #4ade80;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.35);
}
.lt-stat span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 1px;
}
.lt-link {
  color: var(--accent, #36e1ff);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
}
.lt-link:hover {
  text-decoration: underline;
  color: #5ae9ff;
}
.lt-dismiss {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0 2px;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 160ms, background 160ms;
}
.lt-dismiss:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}
/* RTL */
html[dir="rtl"] .live-tracker { right: auto; left: 20px; }
/* Mobile: compact pill bottom-right, whole widget is clickable */
@media (max-width: 640px) {
  .live-tracker {
    bottom: 12px;
    right: 12px;
    left: auto;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    font-size: 0.7rem;
    border-radius: 999px;
    max-width: calc(100vw - 24px);
  }
  .lt-dot-wrap { font-size: 0.55rem; gap: 4px; }
  .lt-dot { width: 7px; height: 7px; }
  .lt-stat { padding-left: 8px; gap: 0; }
  .lt-stat b { font-size: 0.78rem; }
  .lt-stat span { font-size: 0.5rem; letter-spacing: 0.05em; }
  /* On phone, hide creators count (keep just $ ticker + LIVE) */
  .live-tracker .lt-stat:not(.lt-stat-money) { display: none; }
  /* Hide explicit link text — entire widget becomes a tap target */
  .lt-link { display: none; }
  /* Make whole widget feel tappable via cursor + visible "tracker" hint via the link wrapping */
  .live-tracker { cursor: pointer; }
  .lt-dismiss { width: 26px; height: 26px; font-size: 1.1rem; margin-left: 2px; }
}
html[dir="rtl"] .live-tracker { right: auto; left: 20px; }
@media (max-width: 640px) {
  html[dir="rtl"] .live-tracker { right: auto; left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-tracker { transition: opacity 0ms, transform 0ms; }
  .lt-dot { animation: none; }
}
@media print {
  .live-tracker { display: none !important; }
}

/* ============ TOC-Sidebar (research article navigation) ============ */
.toc-sidebar {
  position: fixed;
  top: 120px;
  right: 24px;
  width: 240px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  background: rgba(15, 28, 48, 0.78);
  border: 1px solid rgba(54, 225, 255, 0.18);
  border-radius: 12px;
  padding: 18px 16px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 320ms ease, transform 320ms ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.toc-sidebar.visible {
  opacity: 1;
  transform: translateX(0);
}
.toc-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3, #7c8aa3);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(54, 225, 255, 0.12);
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc-counter;
}
.toc-item {
  position: relative;
  counter-increment: toc-counter;
}
.toc-item.toc-sub {
  padding-left: 12px;
}
.toc-item a {
  display: block;
  padding: 6px 8px 6px 12px;
  color: var(--ink-2, #b8c5db);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.35;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: color 160ms, background 160ms, border-color 160ms;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.toc-item a:hover {
  color: var(--accent, #36e1ff);
  background: rgba(54, 225, 255, 0.05);
}
.toc-item a.active {
  color: var(--accent, #36e1ff);
  border-left-color: var(--accent, #36e1ff);
  background: rgba(54, 225, 255, 0.07);
  font-weight: 600;
}
.toc-item.toc-sub a {
  font-size: 0.72rem;
  opacity: 0.85;
}
.toc-top {
  display: block;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(54, 225, 255, 0.1);
  color: var(--ink-3, #7c8aa3);
  text-decoration: none;
  font-size: 0.72rem;
  text-align: center;
  letter-spacing: 0.04em;
  transition: color 160ms;
}
.toc-top:hover {
  color: var(--accent, #36e1ff);
}
/* Scrollbar styling */
.toc-sidebar::-webkit-scrollbar { width: 6px; }
.toc-sidebar::-webkit-scrollbar-track { background: transparent; }
.toc-sidebar::-webkit-scrollbar-thumb { background: rgba(54, 225, 255, 0.18); border-radius: 3px; }
.toc-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(54, 225, 255, 0.32); }
/* RTL: move to left side */
html[dir="rtl"] .toc-sidebar { right: auto; left: 24px; transform: translateX(-8px); }
html[dir="rtl"] .toc-sidebar.visible { transform: translateX(0); }
html[dir="rtl"] .toc-item a { border-left: 0; border-right: 2px solid transparent; padding: 6px 12px 6px 8px; }
html[dir="rtl"] .toc-item a.active { border-right-color: var(--accent, #36e1ff); border-left-color: transparent; }
html[dir="rtl"] .toc-item.toc-sub { padding-left: 0; padding-right: 12px; }
/* Hide on smaller viewports (JS also handles this) */
@media (max-width: 1199px) {
  .toc-sidebar { display: none; }
}
/* Wider viewports — move further right to clear content */
@media (min-width: 1500px) {
  .toc-sidebar { right: max(24px, calc((100vw - 1400px) / 2 - 280px)); }
  html[dir="rtl"] .toc-sidebar { left: max(24px, calc((100vw - 1400px) / 2 - 280px)); right: auto; }
}
@media print {
  .toc-sidebar { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .toc-sidebar { transition: opacity 0ms; }
}
