/* Trading Scripts & Strategies — design system. Tokens first, then components. */
/* Geist and Geist Mono (SIL Open Font License, see /static/fonts/GEIST-LICENSE.txt), self-hosted. */
@font-face { font-family: "Geist"; src: url("/static/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  /* Light surfaces */
  --bg: #FFFFFF;
  --bg-soft: #F6F7FB;
  --ink: #0B1220;
  --text: #334155;
  --muted: #556274;
  --line: #E5E8F0;
  --line-strong: #CBD2DE;
  /* Dark surfaces (header, heroes, footer) */
  --dark: #070B16;
  --dark-2: #0D1426;
  --dark-card: rgba(255, 255, 255, 0.04);
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-ink: #F8FAFC;
  --dark-text: #CBD5E1;
  --dark-muted: #94A3B8;
  /* Brand */
  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-soft: #EEF3FF;
  --cyan: #06B6D4;
  --grad: linear-gradient(100deg, #3B82F6 0%, #22D3EE 100%);
  --green: #047857;
  --green-soft: #E7F8F1;
  --amber: #B45309;
  --amber-soft: #FEF3E2;
  /* Type & shape */
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 8px 24px rgba(11, 18, 32, 0.06);
  --shadow-lift: 0 2px 4px rgba(11, 18, 32, 0.05), 0 18px 40px rgba(11, 18, 32, 0.10);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16.5px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 650; letter-spacing: -0.025em; line-height: 1.12; }
h1 { font-size: clamp(36px, 5.6vw, 64px); margin: 0 0 20px; letter-spacing: -0.035em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 14px; }
h3 { font-size: 20px; margin: 0 0 8px; letter-spacing: -0.015em; }
p { margin: 0 0 16px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
::selection { background: #BFDBFE; }

[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #FFF; padding: 8px 12px; z-index: 100; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 11, 22, 0.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--dark-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--dark-ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { color: #FFF; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--grad); box-shadow: 0 0 20px rgba(34, 211, 238, 0.35); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--dark-text); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: #FFF; background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: #FFF; background: rgba(255, 255, 255, 0.09); }
.nav .nav-cta { margin-left: 10px; color: var(--dark); background: #FFF; font-weight: 600; }
.nav .nav-cta:hover { color: var(--dark); background: #E2E8F0; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--dark-line); border-radius: 10px; background: transparent; color: #FFF; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px; background: rgba(7, 11, 22, 0.97); border-bottom: 1px solid var(--dark-line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons, badges, icons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15.5px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #FFF; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { background: var(--brand-dark); color: #FFF; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.45); }
.btn-light { background: #FFF; color: var(--ink); border-color: var(--line-strong); }
.btn-light:hover { color: var(--ink); border-color: var(--ink); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: #FFF; border-color: rgba(255, 255, 255, 0.18); }
.btn-ghost:hover { color: #FFF; background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); }
.btn .icon { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .icon { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.icon { width: 20px; height: 20px; flex: none; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 12.5px/1.6 var(--mono); color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); text-decoration: none; }
a.badge:hover { border-color: var(--line-strong); color: var(--ink); }
.badge-free { color: var(--green); background: var(--green-soft); border-color: transparent; }
.badge-paid { color: var(--amber); background: var(--amber-soft); border-color: transparent; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font: 500 13px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); }
.draft-flag { display: inline-block; font: 500 12px var(--mono); background: #FEE2E2; color: #991B1B; padding: 2px 10px; border-radius: 999px; }

/* ---------- Dark hero / page header ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); color: var(--dark-text); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(48% 60% at 78% 18%, rgba(37, 99, 235, 0.38), transparent 70%),
    radial-gradient(40% 50% at 8% 100%, rgba(6, 182, 212, 0.20), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.55;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%); }
.hero h1, .hero h2, .hero h3 { color: var(--dark-ink); }
.hero .lead { color: var(--dark-text); }
.hero .eyebrow { color: #7DD3FC; }
.hero a:not(.btn) { color: #93C5FD; }
.hero-home { padding: 96px 0 104px; }
.page-hero { padding: 64px 0 72px; }
.page-hero h1 { font-size: clamp(32px, 4.6vw, 52px); max-width: 920px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; max-width: 680px; color: var(--text); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 22px; }
.crumbs a { color: var(--dark-muted); text-decoration: none; }
.crumbs a:hover { color: #FFF; }
.crumbs .sep { color: var(--dark-muted); opacity: 0.6; }
.hero .meta { color: var(--dark-muted); }
.hero .badge { color: var(--dark-text); background: rgba(255, 255, 255, 0.06); border-color: var(--dark-line); }
.hero .badge-paid { color: #FCD34D; background: rgba(245, 158, 11, 0.12); border-color: transparent; }
.hero .badge-free { color: #6EE7B7; background: rgba(16, 185, 129, 0.12); border-color: transparent; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; } .hero-home { padding: 64px 0 72px; } }
.quote { margin: 32px 0 0; padding-left: 14px; border-left: 2px solid rgba(125, 211, 252, 0.5); font-size: 15px; color: var(--dark-muted); font-style: italic; }

/* App-window frame for screenshots */
.window { position: relative; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)); border: 1px solid rgba(255,255,255,0.14); padding: 10px; box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255,255,255,0.03) inset; }
.window::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 70%; height: 80%; z-index: -1; background: radial-gradient(closest-side, rgba(56, 189, 248, 0.35), transparent); filter: blur(10px); }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 10px; font: 500 12.5px var(--mono); color: var(--dark-muted); }
.window-bar .dots { display: flex; gap: 6px; flex: none; }
.window-bar > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-bar .badge { white-space: nowrap; flex: none; }
@media (max-width: 560px) { .window-bar .dots { display: none; } .window { padding: 8px; } }
.window-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.window img { display: block; width: 100%; border-radius: 10px; }
.window-light { background: #FFF; border-color: var(--line); box-shadow: var(--shadow-lift); }
.window-light .window-bar { color: var(--muted); }
.window-light .window-bar .dots i { background: var(--line-strong); }

/* Fact strip under the home hero */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 64px; border: 1px solid var(--dark-line); border-radius: var(--r); background: rgba(255,255,255,0.02); }
.facts div { padding: 18px 22px; border-left: 1px solid var(--dark-line); }
.facts div:first-child { border-left: 0; }
.facts strong { display: block; color: #FFF; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.facts span { font-size: 14px; color: var(--dark-muted); }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 44px; } .facts div { padding: 14px 16px; } .facts strong { font-size: 18px; } .facts span { font-size: 13px; line-height: 1.45; display: block; margin-top: 2px; } .facts div:nth-child(3) { border-left: 0; } .facts div:nth-child(n+3) { border-top: 1px solid var(--dark-line); } }

/* ---------- Sections ---------- */
.section { padding-block: 80px; }
@media (max-width: 760px) { .section { padding-block: 56px; } .section-head { margin-bottom: 24px; } }
.section-tight { padding-block: 56px; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 36px; }
.section-head p { margin: 0; color: var(--muted); max-width: 620px; }
.section-head .eyebrow { color: var(--brand); margin-bottom: 14px; }
.section-head h2 { margin-bottom: 8px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #FFF; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
a.card:hover, .card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: #C7D2FE; color: var(--text); }
.card h3 { margin: 0; }
.card p { margin: 0; }
.card .grow { flex-grow: 1; }
.card .title { font-size: 19px; font-weight: 650; color: var(--ink); letter-spacing: -0.015em; line-height: 1.3; }
.card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); font-size: 15px; }
.card .more .icon { width: 16px; height: 16px; transition: transform .15s; }
a.card:hover .more .icon { transform: translateX(3px); }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.card-icon.cyan { background: #E6FBFE; color: #0E7490; }
.card-icon.green { background: var(--green-soft); color: var(--green); }
.card-icon.amber { background: var(--amber-soft); color: var(--amber); }
.card-media { margin: -24px -24px 4px; border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; overflow: hidden; background: var(--bg-soft); aspect-ratio: 16 / 8; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.post-card .topic { font: 500 12.5px var(--mono); color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; }
.meta { color: var(--muted); font-size: 14px; }

/* Feature (bento) card on dark */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: center; padding: 40px; border-radius: var(--r-lg); background: var(--dark); color: var(--dark-text); position: relative; overflow: hidden; isolation: isolate; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 70% at 85% 10%, rgba(37, 99, 235, 0.35), transparent 70%); }
.feature h3 { color: #FFF; font-size: clamp(24px, 2.6vw, 32px); }
.feature ul { list-style: none; padding: 0; margin: 18px 0 26px; display: grid; gap: 10px; }
.feature li { display: flex; gap: 10px; align-items: flex-start; }
.feature li .icon { color: #67E8F9; margin-top: 3px; width: 18px; height: 18px; }
@media (max-width: 900px) { .feature { grid-template-columns: minmax(0, 1fr); padding: 28px; } }

/* Platform tiles */
.tile { flex-direction: row; align-items: flex-start; gap: 16px; }
.tile .title { display: block; margin-bottom: 4px; }

/* ---------- Two-column layouts, panels ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.sticky { position: sticky; top: 88px; }
.panel { padding: 26px; border-radius: var(--r); background: #FFF; border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel h2, .panel h3 { font-size: 20px; margin: 0 0 8px; }
.panel-dark { background: var(--dark); border-color: var(--dark-line); color: var(--dark-text); }
.panel-dark h2, .panel-dark h3 { color: #FFF; }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--amber-soft); color: #7C2D12; font-size: 15px; border: 1px solid #FCD9A8; }
.hero .notice { background: rgba(245, 158, 11, 0.10); color: #FDE68A; border-color: rgba(245, 158, 11, 0.25); }
.disclaimer { margin-top: 56px; padding: 18px 20px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 36px 40px; border-radius: var(--r-lg); background: var(--dark); color: var(--dark-text); position: relative; overflow: hidden; isolation: isolate; }
.callout::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 100% 0%, rgba(6, 182, 212, 0.28), transparent 60%), radial-gradient(50% 120% at 0% 100%, rgba(37, 99, 235, 0.30), transparent 60%); }
.callout h2 { color: #FFF; font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 6px; }
.callout p { margin: 0; color: var(--dark-muted); }

/* ---------- Article prose ---------- */
.article { max-width: 760px; margin: 0 auto; }
.prose { font-size: 17.5px; line-height: 1.75; color: #1E293B; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 28px; margin: 56px 0 16px; }
.prose h3 { font-size: 21px; margin: 36px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 20px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { font-weight: 500; }
.prose img { display: block; margin: 32px 0; width: 100%; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.prose blockquote { margin: 28px 0; padding: 18px 22px; border-radius: 12px; background: var(--brand-soft); border-left: 3px solid var(--brand); color: var(--ink); }
.prose blockquote p:last-child { margin: 0; }
.table-wrap { margin: 24px 0 28px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th, .prose td[align="right"] { white-space: nowrap; }
.prose td:first-child { min-width: 120px; }
.prose thead th { background: var(--bg-soft); font-weight: 600; color: var(--ink); font-size: 14px; }
.prose tbody th { font-weight: 500; color: var(--muted); background: #FBFCFE; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: #FAFBFE; }
.prose td[align="right"], .prose th[align="right"] { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 14px; }
.prose pre { margin: 24px 0 28px; padding: 16px 18px; overflow-x: auto; max-width: 100%; background: var(--dark); color: #E2E8F0; border-radius: 12px; font-size: 14px; line-height: 1.6; -webkit-overflow-scrolling: touch; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
.prose :not(pre) > code { overflow-wrap: anywhere; }
.prose a { overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose em:only-child { color: var(--muted); }
.prose iframe { border-radius: 12px; }
.article-tags { margin-top: 40px; }
.related { margin-top: 48px; padding: 24px; border-radius: var(--r); background: var(--bg-soft); border: 1px solid var(--line); }
.related h2 { font-size: 18px; margin: 0 0 12px; }
.related ul { margin: 0; padding-left: 20px; }

/* Glossary */
.glossary { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.glossary > div { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .2s; }
.glossary > div:target { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.glossary dt { font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.glossary dd { margin: 0; font-size: 15px; }
.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 24px; margin: 0; }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Book cover */
.cover { aspect-ratio: 2 / 3; width: 100%; max-width: 300px; border-radius: 6px 12px 12px 6px; background: linear-gradient(160deg, #1E3A8A, #0B1220 70%); color: #E2E8F0; display: flex; flex-direction: column; justify-content: space-between; padding: 26px 22px; box-shadow: 0 30px 60px rgba(2, 6, 23, 0.45), inset 6px 0 0 rgba(255,255,255,0.06); font-weight: 650; font-size: 20px; letter-spacing: -0.02em; line-height: 1.2; }
.cover small { font: 500 12px var(--mono); color: #7DD3FC; letter-spacing: 0.05em; text-transform: uppercase; }
img.cover { padding: 0; object-fit: cover; }
.toc { counter-reset: toc; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.toc li { counter-increment: toc; display: flex; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #FFF; }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 500 14px var(--mono); color: var(--brand); padding-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--dark-text); border-top: 1px solid var(--dark-line); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-top: 72px; padding-bottom: 48px; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer .about { grid-column: 1 / -1; } }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.site-footer a { color: var(--dark-text); text-decoration: none; }
.site-footer a:hover { color: #FFF; }
.site-footer .label { font: 500 12.5px var(--mono); letter-spacing: 0.06em; color: var(--dark-muted); text-transform: uppercase; margin-bottom: 4px; }
.site-footer .about p { color: var(--dark-muted); max-width: 320px; }
.site-footer .legal { border-top: 1px solid var(--dark-line); padding: 24px 0 36px; font-size: 13px; line-height: 1.6; color: var(--dark-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Book page hero: cover beside the text, stacked on phones */
.hero-grid.book-grid { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .hero-grid.book-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } .book-grid .cover { max-width: 190px; font-size: 17px; padding: 18px 16px; } }

/* Glow only behind dark-hero windows; never let decoration widen the page */
.window-light::before { display: none; }
main { overflow-x: clip; }

/* Script library filters */
.filters { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 30px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: var(--dark-text); font: 500 14.5px var(--font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.chip:hover { color: #FFF; border-color: rgba(255, 255, 255, 0.35); }
.chip[aria-pressed="true"] { background: #FFF; color: var(--dark); border-color: #FFF; }
.empty { max-width: 560px; margin: 8px auto 0; padding: 40px 28px; text-align: center; background: #FFF; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.empty h2 { font-size: 26px; }
.empty p { color: var(--muted); }
.script-card .card-media { aspect-ratio: 16 / 8.1; }

/* Numbered steps in side panels */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 14px 0 22px; display: grid; gap: 12px; font-size: 15px; }
.steps li { counter-increment: step; position: relative; padding-left: 36px; min-height: 24px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font: 600 12.5px var(--mono); }
.panel-dark .steps li::before { background: rgba(103, 232, 249, 0.12); color: #67E8F9; }
.panel-dark strong { color: #FFF; }

/* Testimonials (TradingView comments) */
.quote-card { margin: 0; justify-content: space-between; }
.quote-card blockquote { position: relative; margin: 0; padding-top: 30px; font-size: 17.5px; line-height: 1.55; color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.quote-card blockquote::before { content: "“"; position: absolute; top: -14px; left: -2px; font-size: 64px; line-height: 1; color: var(--brand); opacity: 0.25; font-weight: 700; }
.quote-card figcaption { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.quote-card .avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #FFF; font-weight: 650; font-size: 15px; }
.quote-card .who { display: block; font-weight: 600; color: var(--ink); text-decoration: none; font-size: 15px; }
.quote-card .who:hover { color: var(--brand); }
.quote-card .meta { font-size: 13.5px; }
.quote-card .meta a { color: var(--muted); }
