/* ═══════════════════════════════════════════════════════════════
   Day Trading Kills — style.css  (v2)
   Editorial red/white/cream, Bebas Neue heads, Inter body
   Light + dark via [data-theme="dark"]
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --red:           #C0392B;
  --red-deep:      #921E12;
  --red-dark:      #a02820;
  --red-light:     #E74C3C;
  --red-soft:      #FBEFEC;
  --gold:          #C28F2C;

  --bg:            #f6f4ef;
  --bg-alt:        #ece9e1;
  --bg-card:       #ffffff;
  --bg-card-2:     #fbfaf6;
  --text:          #15130f;
  --text-muted:    #56524c;
  --text-subtle:   #8a847b;
  --border:        #ddd9d0;
  --border-light:  #ece8df;

  --shadow-sm:     0 1px 2px rgba(20,15,8,0.04), 0 2px 6px rgba(20,15,8,0.05);
  --shadow:        0 8px 22px rgba(20,15,8,0.07), 0 2px 4px rgba(20,15,8,0.05);
  --shadow-md:     0 22px 48px rgba(20,15,8,0.13), 0 6px 12px rgba(20,15,8,0.06);
  --shadow-lg:     0 36px 72px rgba(20,15,8,0.18), 0 10px 20px rgba(20,15,8,0.08);

  --radius:        12px;
  --radius-lg:     20px;
  --radius-pill:   999px;

  --container:     1180px;
  --header-h:      68px;
  --transition:    0.22s ease;
  --transition-2:  0.4s cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --bg:           #0f0d0a;
  --bg-alt:       #15120e;
  --bg-card:      #1a1612;
  --bg-card-2:    #1f1a15;
  --text:         #f1ece2;
  --text-muted:   #b6ad9f;
  --text-subtle:  #807868;
  --border:       #2c2823;
  --border-light: #221e19;
  --red-soft:     #25130f;

  --shadow-sm:    0 1px 2px rgba(0,0,0,0.3), 0 2px 6px rgba(0,0,0,0.4);
  --shadow:       0 8px 22px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.4);
  --shadow-md:    0 22px 48px rgba(0,0,0,0.55), 0 6px 12px rgba(0,0,0,0.4);
  --shadow-lg:    0 36px 72px rgba(0,0,0,0.7), 0 10px 20px rgba(0,0,0,0.5);

  --red:          #E74C3C;
  --red-dark:     #C0392B;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
ol { padding-left: 0; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }

/* ── TYPOGRAPHY ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text);
}
h1 { font-size: clamp(3.6rem, 9vw, 7.2rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.15; }
h4 { font-family: 'Inter', sans-serif; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--red); }
p  { color: var(--text-muted); font-size: 1rem; line-height: 1.72; }
strong { color: var(--text); font-weight: 600; }
em { font-style: italic; }
blockquote { font-style: italic; }

/* ── LAYOUT HELPERS ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
  display: block;
}
.section-label::before {
  content: ""; display: inline-block;
  width: 18px; height: 2px; background: var(--red); vertical-align: middle;
  margin-right: 0.55rem; transform: translateY(-2px);
}
.centered-label { text-align: center; }
.centered-label::before { display: none; }
.centered-h2 { text-align: center; }
.section-intro {
  text-align: center;
  max-width: 720px;
  margin: 0.85rem auto 3rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ── SCROLL PROGRESS ─────────────────────────────────────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-light));
  z-index: 200;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px rgba(192,57,43,0.5);
}

/* ── HEADER ──────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(20,15,8,0.06); }
.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; letter-spacing: 0.06em;
  color: var(--text);
}
.logo-text strong { color: var(--red); font-weight: inherit; }
.nav-links {
  display: flex; align-items: center; gap: 1.65rem;
  font-size: 0.92rem; font-weight: 500;
}
.nav-links a {
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--red); transform: scaleX(0);
  transform-origin: left center; transition: transform var(--transition);
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--red); color: #fff !important;
  padding: 0.6rem 1.05rem; border-radius: var(--radius-pill);
  font-weight: 600; letter-spacing: 0.01em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(192,57,43,0.35); }
.header-right { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--bg-alt); color: var(--text); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  flex-direction: column; justify-content: center; align-items: center;
  gap: 4px;
}
.menu-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}
.mobile-nav a {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500; color: var(--text-muted);
}
.mobile-nav a.nav-cta {
  margin: 1rem 1.25rem; text-align: center; border-bottom: 0;
}
.mobile-nav.open { display: flex; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-ghost-white {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.95rem 1.55rem;
  font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 22px rgba(192,57,43,0.32), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(192,57,43,0.42); }
.btn-primary svg { transition: transform var(--transition); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-block { display: flex; justify-content: center; margin-top: 1rem; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-white {
  background: #fff; color: var(--red) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-white:hover { background: var(--red-soft); }
.btn-ghost-white {
  background: transparent; color: #fff !important;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-ghost-white:hover { border-color: #fff; background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 80%);
  opacity: 0.55;
}
.warning-tape {
  position: absolute; left: -10%; right: -10%;
  height: 18px;
  background:
    repeating-linear-gradient(135deg,
      var(--red) 0 24px,
      #2c1410 24px 48px);
  opacity: 0.92;
  transform: rotate(-2deg);
}
.warning-tape-top { top: 8%; }
.warning-tape-bottom { bottom: 6%; transform: rotate(2deg); }
[data-theme="dark"] .warning-tape { opacity: 0.75; }

/* ticker */
.hero-ticker {
  position: relative;
  background: var(--red);
  color: #fff;
  font-family: 'JetBrains Mono', 'Bebas Neue', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, var(--red) 70%, #000);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.12);
}
.ticker-track {
  display: flex; gap: 0;
  padding-block: 0.75rem;
  width: max-content;
  animation: ticker 50s linear infinite;
}
.ticker-track span { white-space: nowrap; padding-right: 1.5rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-byline {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--red) 22%, transparent);
  margin-bottom: 1.4rem;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(192,57,43,0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(192,57,43,0.55); }
  70% { box-shadow: 0 0 0 12px rgba(192,57,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
}
.hero h1 {
  letter-spacing: 0.005em;
  line-height: 0.93;
  margin-bottom: 1.4rem;
}
.hero h1 em {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--red);
  font-weight: 700;
  display: inline-block;
  position: relative;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: -4%; right: 8%;
  bottom: 0.05em; height: 0.18em;
  background: var(--red);
  z-index: -1;
  opacity: 0.18;
  transform: skewX(-8deg);
}
.hero-lead {
  font-size: 1.1rem;
  max-width: 560px;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.hero-mini-stats {
  display: flex; align-items: center; gap: 1.1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.hero-mini-stat strong {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem; line-height: 1;
  color: var(--red);
  letter-spacing: 0.01em;
}
.hero-mini-stat span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-top: 0.3rem;
}
.hero-mini-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0.2rem 0; }

/* book stack */
.hero-book-wrap {
  position: relative;
  display: flex; justify-content: center;
  perspective: 1400px;
}
.hero-orn {
  position: absolute;
  color: var(--text-subtle);
  pointer-events: none;
  z-index: 1;
}
.hero-orn-1 { width: 84px; top: 6%; right: 8%; animation: float-rev 8s ease-in-out infinite; }
.hero-orn-2 { width: 130px; bottom: 14%; left: -6%; opacity: 0.85; animation: float 9s ease-in-out infinite; }
.hero-orn-3 { width: 70px; top: 38%; left: 4%; animation: float-rev 11s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes float-rev { 0%,100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-12px) rotate(-3deg); } }
.book-stack { position: relative; }
.book-shadow {
  position: absolute;
  bottom: -34px; left: 8%; right: 8%;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(20,15,8,0.32) 0%, transparent 70%);
  filter: blur(6px);
  z-index: 0;
}
.book-float {
  position: relative;
  z-index: 2;
  animation: book-float 7s ease-in-out infinite;
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 50px rgba(20,15,8,0.32));
}
@keyframes book-float {
  0%, 100% { transform: translateY(0) rotateY(-6deg) rotateX(2deg); }
  50% { transform: translateY(-16px) rotateY(-3deg) rotateX(-1deg); }
}
@media (prefers-reduced-motion: reduce) { .book-float { animation: none; transform: rotateY(-4deg); } }
.book-img {
  width: clamp(240px, 30vw, 340px);
  height: auto;
  border-radius: 4px;
  box-shadow:
    -1px 0 0 rgba(0,0,0,0.18),
    inset -8px 0 14px rgba(0,0,0,0.18),
    inset 1px 0 0 rgba(255,255,255,0.18);
}
.book-base {
  position: absolute;
  bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 86%; height: 16px;
  background: linear-gradient(90deg, transparent, rgba(20,15,8,0.18), transparent);
  border-radius: 50%;
  filter: blur(3px);
  z-index: 1;
}
.book-stamp {
  position: absolute;
  top: -18px; right: -22px;
  background: var(--red);
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  text-align: center;
  transform: rotate(8deg);
  box-shadow: 0 12px 28px rgba(192,57,43,0.45);
  z-index: 4;
  border: 2px dashed rgba(255,255,255,0.4);
}
.book-stamp span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}
.book-stamp strong {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin-top: 2px;
}

/* ── STAT STRIP ──────────────────────────────────────────────── */
.stat-strip {
  background: #15130f;
  color: #f1ece2;
  padding-block: 1.5rem;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .stat-strip {
  background: #07060a;
  border-block: 1px solid var(--border);
}
.stat-strip::before, .stat-strip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(135deg, var(--red) 0 14px, transparent 14px 28px);
}
.stat-strip::before { top: 0; }
.stat-strip::after { bottom: 0; }
.stat-inner { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 0.4rem; }
.stat-item { display: flex; flex-direction: column; gap: 0.25rem; flex: 1 1 180px; min-width: 160px; }
.stat-item strong {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.85rem; line-height: 1;
  color: #fff; letter-spacing: 0.02em;
}
.stat-item span { font-size: 0.82rem; color: rgba(241,236,226,0.75); line-height: 1.4; }
.stat-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,0.12); }

/* ── ABOUT BOOK ──────────────────────────────────────────────── */
.about-book { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-text h2 { margin-bottom: 1.25rem; max-width: 24ch; }
.about-text p { margin-bottom: 1.05rem; max-width: 62ch; }
.about-text blockquote {
  margin: 1.6rem 0;
  padding: 1.4rem 1.6rem;
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.55;
}
.about-text blockquote p { font-style: italic; color: var(--text); margin-bottom: 0.55rem; }
.about-text blockquote cite { font-style: normal; font-family: 'Inter', sans-serif; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.about-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.details-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.details-card-head {
  padding: 1.4rem 1.6rem 1.2rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--red-soft) 100%);
  position: relative;
}
.details-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  background: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
  margin-bottom: 0.8rem;
}
[data-theme="dark"] .details-card-tag { background: var(--bg-card-2); }
.details-card h3 { font-size: 1.65rem; }
.details-card ul { padding: 1rem 1.6rem; display: flex; flex-direction: column; }
.details-card li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-block: 0.7rem;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--border-light);
}
.details-card li:last-of-type { border-bottom: 0; }
.details-card li span:first-child { color: var(--text-subtle); font-weight: 500; }
.details-card li span:last-child { font-weight: 600; color: var(--text); text-align: right; }
.details-card .btn-block { margin: 0 1.6rem 1.6rem; }

/* ── BY THE NUMBERS / DATA ───────────────────────────────────── */
.data-section {
  background:
    radial-gradient(ellipse 600px 280px at 12% 10%, color-mix(in srgb, var(--red) 8%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 700px 320px at 95% 85%, color-mix(in srgb, var(--gold) 10%, transparent) 0%, transparent 70%),
    var(--bg-alt);
  position: relative;
}
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.data-card-head { margin-bottom: 1.4rem; }
.data-card-head h3 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); color: var(--text); letter-spacing: 0.01em; }
.data-card-source {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 500;
}
.data-foot {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  padding-top: 1rem;
}
.data-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.data-pair > .data-card { margin-bottom: 0; }

/* Bars chart */
.bars-chart {
  display: grid;
  grid-template-columns: 90px 1fr 78px;
  row-gap: 0.85rem;
  column-gap: 1rem;
  align-items: center;
}
.bars-row { display: contents; }
.bars-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--text);
}
.bars-track {
  height: 28px;
  background: var(--bg-alt);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-light);
}
.bars-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--red-light));
  border-radius: var(--radius-pill);
  position: relative;
  transition: width 1.4s cubic-bezier(.18,.78,.18,1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 18px rgba(192,57,43,0.25);
}
.bars-fill::after {
  content: "";
  position: absolute; top: 0; bottom: 0; right: 4px;
  width: 1px;
  background: rgba(255,255,255,0.55);
}
.bars-chart.in-view .bars-fill { width: var(--pct); }
.bars-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--red);
  text-align: right;
}

/* Equity curve */
.curve-svg {
  width: 100%;
  height: clamp(220px, 30vw, 300px);
  display: block;
}
.curve-grid line { stroke: var(--border-light); stroke-width: 1; stroke-dasharray: 3 4; }
.curve-baseline { stroke: var(--text-subtle); stroke-width: 1; stroke-dasharray: 5 5; opacity: 0.55; }
.curve-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  fill: var(--text-subtle);
  letter-spacing: 0.1em;
}
.curve-line {
  stroke: var(--red);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 10px rgba(192,57,43,0.3));
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
}
[data-theme="dark"] .curve-line { stroke: #FF6B57; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(255,107,87,0.5)); }
[data-theme="dark"] .curve-grid line { stroke: rgba(241,236,226,0.08); }
[data-theme="dark"] .curve-baseline { stroke: rgba(241,236,226,0.35); }
[data-theme="dark"] .donut-bg { stroke: rgba(241,236,226,0.08); }
[data-theme="dark"] .donut-center { fill: #FF6B57; }
[data-theme="dark"] .press-logo-box { background: var(--bg-card); border-color: var(--border); }
.curve-svg.in-view .curve-line { animation: draw 2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.curve-area { opacity: 0; transition: opacity 0.6s ease 1.2s; }
.curve-svg.in-view .curve-area { opacity: 1; }
.curve-dot { fill: var(--red); opacity: 0; }
.curve-svg.in-view .dot-peak { animation: pop 0.4s ease-out 0.6s forwards; }
.curve-svg.in-view .dot-end { animation: pop 0.4s ease-out 1.8s forwards; }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
.curve-annot text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  fill: var(--text);
  font-weight: 600;
  opacity: 0;
}
.curve-annot .curve-annot-sub { font-weight: 400; fill: var(--text-subtle); font-size: 10px; }
.curve-svg.in-view .curve-annot text { animation: fade-in 0.6s ease 0.9s forwards; }
.curve-svg.in-view .curve-annot-end text { animation: fade-in 0.6s ease 2s forwards; }
@keyframes fade-in { to { opacity: 1; } }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 0.75rem; padding-block: 0.5rem; }
.funnel-row {
  position: relative;
  height: 46px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  overflow: hidden;
  display: flex; align-items: center;
  padding: 0 0.95rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
}
.funnel-row::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 22%, transparent), color-mix(in srgb, var(--red) 8%, transparent));
  transition: width 1.4s cubic-bezier(.18,.78,.18,1);
  border-right: 2px solid var(--red);
}
.funnel.in-view .funnel-row::before { width: var(--w); }
.funnel-row-good::before { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 28%, transparent), color-mix(in srgb, var(--gold) 12%, transparent)); border-right-color: var(--gold); }
.funnel-row-best::before { background: linear-gradient(90deg, color-mix(in srgb, #2E7D32 35%, transparent), color-mix(in srgb, #2E7D32 18%, transparent)); border-right-color: #2E7D32; }
.funnel-pct {
  position: relative; z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  width: 64px;
  flex-shrink: 0;
  color: var(--red);
}
.funnel-row-good .funnel-pct { color: var(--gold); }
.funnel-row-best .funnel-pct { color: #2E7D32; }
.funnel-label { position: relative; z-index: 1; color: var(--text); font-weight: 500; }

/* Donut */
.donut-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: center;
}
.donut-svg { width: 220px; height: 220px; }
.donut-bg { stroke: var(--bg-alt); }
.donut-seg {
  stroke-linecap: butt;
  transition: stroke-dasharray 1.2s cubic-bezier(.18,.78,.18,1);
}
/* draw-on animation: start with 0 length, then go to actual */
.data-card-donut:not(.in-view) .donut-seg { stroke-dasharray: 0 503 !important; }
.donut-svg .seg-1 { stroke: var(--red); }
.donut-svg .seg-2 { stroke: #E58267; }
.donut-svg .seg-3 { stroke: var(--gold); }
.donut-svg .seg-4 { stroke: #6B4226; }
.donut-svg .seg-5 { stroke: #8a847b; }
.donut-center {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  fill: var(--red);
  letter-spacing: 0.04em;
}
.donut-center-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  fill: var(--text-subtle);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.donut-legend { display: flex; flex-direction: column; gap: 0.6rem; }
.donut-legend li {
  display: grid; grid-template-columns: 14px 1fr auto;
  align-items: center; gap: 0.65rem;
  font-size: 0.92rem;
  padding-block: 0.4rem;
  border-bottom: 1px dashed var(--border-light);
}
.donut-legend li:last-child { border-bottom: 0; }
.donut-legend li strong { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--text); }
.donut-legend .lg { width: 12px; height: 12px; border-radius: 3px; }
.lg-1 { background: var(--red); } .lg-2 { background: #E58267; } .lg-3 { background: var(--gold); } .lg-4 { background: #6B4226; } .lg-5 { background: #8a847b; }

/* Compare $10k */
.compare { display: flex; flex-direction: column; gap: 1.4rem; padding-block: 0.4rem; }
.compare-row { padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--border-light); background: var(--bg-card-2); }
.compare-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; flex-wrap: wrap; }
.compare-tag { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.compare-num { font-family: 'Bebas Neue', sans-serif; font-size: 2.1rem; line-height: 1; letter-spacing: 0.02em; }
.compare-num-good { color: #2E7D32; }
.compare-num-bad { color: var(--red); }
.compare-bar { height: 12px; background: var(--bg-alt); border-radius: var(--radius-pill); overflow: hidden; border: 1px solid var(--border-light); }
.compare-fill { height: 100%; width: 0; border-radius: var(--radius-pill); transition: width 1.4s cubic-bezier(.18,.78,.18,1); }
.data-card-compare.in-view .compare-fill { width: var(--w); }
.compare-fill-good { background: linear-gradient(90deg, #2E7D32, #66BB6A); box-shadow: 0 0 18px rgba(46,125,50,0.3); }
.compare-fill-bad { background: linear-gradient(90deg, var(--red-deep), var(--red)); box-shadow: 0 0 18px rgba(192,57,43,0.3); }
.compare-row p { margin-top: 0.55rem; font-size: 0.88rem; color: var(--text-muted); }

/* ── INSIGHTS ──────────────────────────────────────────────── */
.insights-section { background: var(--bg); }
.insights-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.4rem;
}
.insight-card {
  grid-column: span 3;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.insight-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--red);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.insight-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--red) 25%, var(--border)); }
.insight-card:hover::before { transform: scaleY(1); }
.insight-large { grid-column: span 6; }
@media (min-width: 980px) { .insight-large { grid-column: span 4; } .insight-card { grid-column: span 2; } }
.insight-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--red);
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}
.insight-icon {
  font-size: 2.2rem;
  margin-bottom: 0.85rem;
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--red-soft);
}
.insight-card h3 { margin-bottom: 0.7rem; }
.insight-card p { font-size: 0.95rem; }
.insight-source { margin-top: 1rem; padding-top: 0.85rem; border-top: 1px dashed var(--border-light); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--text-subtle); }
.insights-cta { display: flex; justify-content: center; margin-top: 2.4rem; }

/* ── INSIDE THE BOOK ─────────────────────────────────────────── */
.inside-section { background: var(--bg-alt); }
.inside-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.inside-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.inside-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.inside-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.6rem; line-height: 1;
  color: color-mix(in srgb, var(--red) 60%, transparent);
  letter-spacing: 0.04em;
  position: absolute;
  right: 1.4rem; top: 1.4rem;
  opacity: 0.65;
}
.inside-card h3 { font-size: 1.4rem; margin-bottom: 0.6rem; max-width: 80%; }
.inside-card p { font-size: 0.94rem; }

/* ── CHAPTERS ──────────────────────────────────────────────── */
.chapters-section { background: var(--bg); }
.chapters-section h2 { margin-bottom: 0.5rem; }
.chapters-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  margin-top: 1.5rem;
}
.ch-list li {
  display: flex; align-items: baseline; gap: 0.85rem;
  padding-block: 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  transition: padding-left var(--transition), color var(--transition);
}
.ch-list li:hover { padding-left: 6px; color: var(--red); }
.cn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 700;
  width: 28px;
  flex-shrink: 0;
}
.ch-list li:hover .cn { color: var(--red); }

/* ── PRESS ─────────────────────────────────────────────────── */
.press-section { background: var(--bg-alt); }
.press-logos-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 2.6rem;
}
.press-logo-a {
  display: block;
  transition: transform var(--transition);
}
.press-logo-a:hover { transform: translateY(-3px); }
.press-logo-box {
  height: 64px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.press-logo-a:hover .press-logo-box { border-color: var(--red); box-shadow: var(--shadow-sm); }
.press-logo-box svg { max-width: 100%; max-height: 38px; }

.press-quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
  margin-bottom: 2.4rem;
}
.pq {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pq::before {
  content: "\201C";
  position: absolute;
  top: -8px; left: 14px;
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--red);
  opacity: 0.25;
  font-style: italic;
}
.pq:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pq p { font-style: italic; line-height: 1.65; color: var(--text); font-size: 0.98rem; margin-bottom: 0.85rem; }
.pq footer a { font-weight: 600; font-size: 0.88rem; color: var(--red); transition: color var(--transition); }
.pq footer a:hover { color: var(--red-dark); }

.linkedin-cta {
  display: flex; align-items: center; gap: 0.7rem;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.linkedin-link { color: #0A66C2; font-weight: 600; }
.linkedin-link:hover { text-decoration: underline; }

.inline-link { color: var(--red); font-weight: 600; transition: color var(--transition); }
.inline-link:hover { color: var(--red-dark); text-decoration: underline; }

/* ── BUY ───────────────────────────────────────────────────── */
.buy-section { background: var(--bg); }
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.store-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.store-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--red); }
.store-card-feat {
  border: 2px solid var(--red);
  background: linear-gradient(180deg, var(--bg-card), var(--red-soft));
}
.store-logo-wrap {
  width: 56px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.store-logo-wrap svg { width: 100%; height: 44px; max-height: 44px; }
.store-info { display: flex; flex-direction: column; gap: 0.15rem; }
.store-name { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.store-pill {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.store-fmt { font-size: 0.78rem; color: var(--text-subtle); letter-spacing: 0.02em; }
.store-arr {
  font-size: 1.4rem;
  color: var(--text-subtle);
  transition: color var(--transition), transform var(--transition);
}
.store-card:hover .store-arr { color: var(--red); transform: translateX(4px); }

/* ── AUTHOR ────────────────────────────────────────────────── */
.author-section {
  background:
    radial-gradient(ellipse 600px 320px at 90% 0%, color-mix(in srgb, var(--red) 7%, transparent) 0%, transparent 70%),
    var(--bg-alt);
  position: relative;
}
.author-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 4.5vw, 3.5rem);
  align-items: start;
  margin-top: 2rem;
}
.author-portrait-area { position: sticky; top: calc(var(--header-h) + 1.5rem); display: flex; flex-direction: column; gap: 1rem; }
.author-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.author-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.04) saturate(1.05);
  transition: transform 0.6s ease;
}
.author-portrait:hover img { transform: scale(1.04); }
.author-portrait-frame {
  position: absolute;
  inset: 10px;
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}

.amazon-author-btn {
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.05rem;
  background: linear-gradient(135deg, #232f3e, #131a25);
  color: #fff !important;
  border-radius: var(--radius);
  border: 1px solid #2a3645;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.amazon-author-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.amazon-author-btn svg { color: #fff; }
.amazon-author-btn strong { display: block; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em; }
.amazon-author-btn em { display: block; font-style: normal; font-size: 0.74rem; letter-spacing: 0.06em; opacity: 0.78; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.amazon-author-arr { color: #FF9900; font-size: 1.1rem; transition: transform var(--transition); }
.amazon-author-btn:hover .amazon-author-arr { transform: translateX(3px); }

.author-socials { display: flex; flex-direction: column; gap: 0.4rem; }
.social-btn {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-weight: 600; font-size: 0.88rem;
  transition: border-color var(--transition), background var(--transition);
}
.social-btn:hover { border-color: var(--red); color: var(--red); }

.author-content p { margin-bottom: 1.05rem; max-width: 65ch; }
.author-belief {
  font-style: italic;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text);
  border-left: 4px solid var(--red);
  background: var(--red-soft);
  padding: 1.2rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: 1.4rem;
  max-width: none !important;
}

.author-books { margin-top: 2rem; }
.author-books h4 { margin-bottom: 0.95rem; }
.author-books ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.author-books li a {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.95rem 1.05rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.author-books li a:hover { border-color: var(--red); transform: translateY(-2px); }
.author-books li strong { font-size: 0.95rem; color: var(--text); font-weight: 700; }
.author-books li span { font-size: 0.82rem; color: var(--text-subtle); }

/* Certificates grid */
.author-certs { margin-top: 2.2rem; }
.author-certs h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex; align-items: center; gap: 0.6rem;
}
.author-certs h4::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--red);
  display: inline-block;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem 0.7rem;
}
.cert-grid li {
  display: flex; flex-direction: column;
  background: var(--bg-card-2);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--red);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  transition: border-color var(--transition), transform var(--transition);
}
.cert-grid li:hover { border-color: var(--red); transform: translateX(2px); }
.cert-grid .cert-uni {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--red);
  line-height: 1.1;
}
.cert-grid .cert-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}
.cert-grid .cert-name em { font-style: italic; color: var(--text-subtle); font-size: 0.72rem; }
[data-theme="dark"] .cert-grid .cert-uni { color: #FF6B57; }

.author-tags {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin-top: 1.6rem;
}
.author-tags span {
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── FINAL CTA ───────────────────────────────────────────────── */
.final-cta { padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--bg); }
.cta-box {
  position: relative;
  background: linear-gradient(135deg, #1a0d09, #2c1410);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(192,57,43,0.4), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(231,76,60,0.32), transparent 45%);
  z-index: 0;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-eyebrow {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--red-light);
  margin-bottom: 0.95rem;
}
.cta-box h2 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 4rem); margin-bottom: 0.95rem; }
.cta-box p { color: rgba(255,255,255,0.78); font-size: 1.1rem; max-width: 52ch; margin-inline: auto; margin-bottom: 1.8rem; }
.cta-btns { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  background: #15130f;
  color: rgba(241,236,226,0.8);
  padding-block: 2.5rem;
}
[data-theme="dark"] .site-footer {
  background: #07060a;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 1rem 1.6rem;
  font-size: 0.92rem;
}
.footer-nav a { color: rgba(241,236,226,0.78); transition: color var(--transition); }
.footer-nav a:hover { color: #fff; }
.footer-legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: rgba(241,236,226,0.55);
  line-height: 1.6;
}

/* ── REVEAL ANIMATION ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track, .book-float, .hero-orn-1, .hero-orn-2, .hero-orn-3 { animation: none; }
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-book-wrap { order: -1; margin-bottom: 1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
  .data-pair { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .donut-svg { margin-inline: auto; }
  .insights-grid { grid-template-columns: 1fr; }
  .insight-card, .insight-large { grid-column: span 1 !important; }
  .inside-grid { grid-template-columns: 1fr 1fr; }
  .chapters-cols { grid-template-columns: 1fr; gap: 0.4rem; }
  .press-quotes { grid-template-columns: 1fr; }
  .author-layout { grid-template-columns: 1fr; }
  .author-portrait-area { position: static; max-width: 320px; margin-inline: auto; }
  .author-books ul { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .inside-grid { grid-template-columns: 1fr; }
  .bars-chart { grid-template-columns: 70px 1fr 60px; column-gap: 0.6rem; }
  .bars-label { font-size: 1.05rem; }
  .stat-inner { gap: 0.8rem; }
  .stat-sep { display: none; }
  .hero h1 { font-size: clamp(3.2rem, 16vw, 5.2rem); }
  .book-stamp { right: 0; }
}

/* ── Language switcher (header) ───────────────────────────── */
.lang-switch { position: relative; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent; border: 1px solid rgba(0,0,0,0.14);
  color: var(--text); font: inherit; font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.04em; padding: 0.42rem 0.65rem 0.42rem 0.55rem;
  border-radius: 999px; cursor: pointer; transition: all 0.18s ease;
  line-height: 1;
}
.lang-trigger:hover { border-color: var(--red); color: var(--red); }
.lang-trigger .lang-current { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.lang-trigger .lang-caret { transition: transform 0.2s ease; opacity: 0.7; }
.lang-switch.open .lang-trigger .lang-caret { transform: rotate(180deg); }
.lang-switch.open .lang-trigger { border-color: var(--red); color: var(--red); }
[data-theme="dark"] .lang-trigger { border-color: rgba(255,255,255,0.18); }
[data-theme="dark"] .lang-trigger:hover,
[data-theme="dark"] .lang-switch.open .lang-trigger { border-color: var(--red-light); color: var(--red-light); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 80px); overflow-y: auto;
  margin: 0; padding: 0.35rem;
  background: var(--bg); color: var(--text);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 18px 42px -12px rgba(0,0,0,0.22), 0 4px 12px rgba(0,0,0,0.08);
  list-style: none;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
}
.lang-switch.open .lang-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
[data-theme="dark"] .lang-menu { background: #15131a; border-color: rgba(255,255,255,0.10); }

.lang-menu li { margin: 0 !important; list-style: none !important; display: block !important; padding: 0 !important; }
.lang-menu a {
  display: flex !important; align-items: center !important;
  gap: 0.55rem !important; padding: 0.45rem 0.55rem !important;
  text-decoration: none !important; color: inherit !important;
  border-radius: 10px; line-height: 1.2;
  font-size: 0.85rem; font-weight: 600;
  transition: background 0.15s ease;
  width: 100%; box-sizing: border-box;
}
.lang-menu .lang-text {
  display: flex !important; flex-direction: column !important;
  flex: 1 1 auto !important; min-width: 0 !important; overflow: hidden;
}
.lang-menu .lang-text br { display: none !important; }
.lang-menu .lang-name {
  display: block !important;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lang-menu small {
  display: block !important; font-size: 0.7rem !important; line-height: 1 !important;
}
.lang-menu a em {
  display: block !important;
  font-style: normal !important; font-weight: 400; font-size: 0.7rem;
  opacity: 0.6; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lang-menu .lang-code {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  width: 28px !important; height: 28px !important;
  min-width: 28px !important; max-width: 28px !important; flex: 0 0 28px !important;
  background: var(--red) !important; color: #fff !important;
  border-radius: 7px !important;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.65rem;
  letter-spacing: 0.02em;
}
.lang-menu a:hover { background: rgba(192,57,43,0.08); }
.lang-menu a[aria-current="true"] { background: rgba(192,57,43,0.10); }
.lang-menu a[aria-current="true"] .lang-code { background: var(--red-deep); }
[data-theme="dark"] .lang-menu a:hover { background: rgba(255,107,87,0.10); }
[data-theme="dark"] .lang-menu a[aria-current="true"] { background: rgba(255,107,87,0.14); }

@media (max-width: 760px) {
  .lang-trigger { padding: 0.35rem 0.5rem; }
  .lang-trigger .lang-current { font-size: 0.72rem; }
  .lang-menu { right: -8px; min-width: 220px; }
}

/* ── RTL support (Persian / Farsi edition) ───────────────── */
[dir="rtl"] body {
  font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
}
/* Load Vazirmatn for Persian — see HTML for the link */
[dir="rtl"] .nav-links { direction: rtl; }
[dir="rtl"] .footer-nav { direction: rtl; }
[dir="rtl"] .header-inner { direction: rtl; }

/* Language menu: stay anchored to RIGHT edge in RTL too — the language switcher stays in the same screen position */
[dir="rtl"] .lang-menu { right: 0; left: auto; text-align: right; }
[dir="rtl"] .lang-menu a { direction: rtl; flex-direction: row-reverse !important; }
[dir="rtl"] .lang-menu .lang-text { text-align: right; }

/* Hero: flip the book to the LEFT, text to the RIGHT */
[dir="rtl"] .hero-grid { direction: rtl; }
[dir="rtl"] .hero-text { text-align: right; }
[dir="rtl"] .hero-byline { direction: rtl; }
[dir="rtl"] .hero h1 em { font-style: italic; }

/* Hero ticker: keep it scrolling its natural direction (LTR) so market names read normally */
[dir="rtl"] .hero-ticker .ticker-track { direction: ltr; }

/* Stat strip and section content */
[dir="rtl"] .stat-item { direction: rtl; text-align: right; }
[dir="rtl"] .about-grid { direction: rtl; }
[dir="rtl"] .about-text { text-align: right; }
[dir="rtl"] .about-sidebar { text-align: right; }
[dir="rtl"] .details-card ul li { direction: rtl; }
[dir="rtl"] .details-card ul li span:first-child { text-align: right; }
[dir="rtl"] .details-card ul li span:last-child { text-align: left; direction: ltr; }

/* Section labels and intros */
[dir="rtl"] .section-label,
[dir="rtl"] .centered-label,
[dir="rtl"] .section-intro,
[dir="rtl"] .centered-h2 { direction: rtl; }
[dir="rtl"] .chapters-section .section-label,
[dir="rtl"] .chapters-section h2,
[dir="rtl"] .chapters-section .section-intro { text-align: right; }

/* Bars chart: flip layout */
[dir="rtl"] .bars-row { direction: rtl; }
[dir="rtl"] .bars-label { text-align: right; }
[dir="rtl"] .bars-track { direction: ltr; } /* keep fill animation flowing left-to-right visually consistent */
[dir="rtl"] .bars-num { font-feature-settings: "tnum"; }

/* Funnel */
[dir="rtl"] .funnel-row { direction: rtl; text-align: right; }

/* Donut legend */
[dir="rtl"] .donut-legend li { direction: rtl; text-align: right; }

/* Compare cards */
[dir="rtl"] .compare-row { direction: rtl; text-align: right; }
[dir="rtl"] .compare-head { direction: rtl; }

/* Insights, inside-the-book cards */
[dir="rtl"] .insight-card,
[dir="rtl"] .inside-card { direction: rtl; text-align: right; }
[dir="rtl"] .insight-num,
[dir="rtl"] .inside-num { direction: ltr; } /* numbers stay LTR */

/* Chapter list: 2 columns of right-aligned items, numbers on right-of-text */
[dir="rtl"] .chapters-cols { direction: rtl; }
[dir="rtl"] .ch-list { direction: rtl; padding-right: 0; padding-left: 0; }
[dir="rtl"] .ch-list li { direction: rtl; text-align: right; padding-right: 3rem; padding-left: 0; }
[dir="rtl"] .ch-list .cn { right: 0; left: auto; direction: ltr; }

/* Press */
[dir="rtl"] .pq { direction: rtl; text-align: right; }
[dir="rtl"] .pq footer { text-align: left; }

/* Buy / store cards */
[dir="rtl"] .stores-grid { direction: rtl; }
[dir="rtl"] .store-card { direction: rtl; }
[dir="rtl"] .store-info { text-align: right; }
[dir="rtl"] .store-arr { transform: scaleX(-1); }

/* Author */
[dir="rtl"] .author-layout { direction: rtl; }
[dir="rtl"] .author-content { text-align: right; direction: rtl; }
[dir="rtl"] .author-content p { text-align: right; }
[dir="rtl"] .amazon-author-btn { direction: rtl; text-align: right; }
[dir="rtl"] .amazon-author-btn em { direction: ltr; text-align: left; display: inline-block; }
[dir="rtl"] .amazon-author-arr { transform: scaleX(-1); }
[dir="rtl"] .author-tags { direction: rtl; justify-content: flex-end; }
[dir="rtl"] .author-belief { text-align: right; }

/* CTA */
[dir="rtl"] .cta-box { direction: rtl; }
[dir="rtl"] .cta-eyebrow { direction: rtl; }

/* Footer */
[dir="rtl"] .footer-inner { direction: rtl; }
[dir="rtl"] .footer-brand { direction: rtl; }
[dir="rtl"] .footer-legal { direction: rtl; text-align: right; }

/* Buttons: flip arrow icons */
[dir="rtl"] .btn-primary svg { transform: scaleX(-1); }
[dir="rtl"] .btn-ghost-white svg { transform: scaleX(-1); }

/* ISBNs, currency, and other LTR-locked data inside RTL flow */
[dir="rtl"] .compare-num,
[dir="rtl"] .data-card-source,
[dir="rtl"] .insight-source { direction: rtl; }
[dir="rtl"] [data-isbn], [dir="rtl"] .isbn { direction: ltr; unicode-bidi: isolate; }
