/* ===================================================================
   Badr Edge · design system v2 ("terminal ledger")
   Ink-teal canvas, one working accent (market teal) and one brand metal
   (brass), set in Manrope (tracked caps for the wordmark) and IBM Plex Mono for data.
   Hairlines over shadows, small radii, no glow, no decorative motion.
   Dark is the default; html[data-theme="light"] swaps the tokens only.
   ========================================================================== */
:root {
  color-scheme: dark;
  /* surfaces: the original warm black */
  --bg: #07080a;
  --bg-2: #0b0c0f;
  --panel: #0f1013;
  --panel-2: #14161a;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --line-3: rgba(255, 255, 255, 0.22);
  /* ink */
  --text: #ece8df;
  --text-2: #c4c6cb;
  --muted: #8f939b;
  --dim: #767b84;
  /* champagne gold: the brand colour. Buttons, links, the moon, key figures */
  --accent: #d9b46c;
  --accent-2: #f3deb0;
  --accent-ink: #17120a;
  --accent-soft: rgba(217, 180, 108, 0.1);
  --accent-line: rgba(217, 180, 108, 0.3);
  --amber: #d9b46c;
  --amber-2: #f3deb0;
  --amber-soft: rgba(217, 180, 108, 0.1);
  --amber-line: rgba(217, 180, 108, 0.32);
  /* market teal: the one added colour. Live state, labels, up candles */
  --live: #4fb8a0;
  --live-2: #7fd0bc;
  --live-soft: rgba(79, 184, 160, 0.1);
  --live-line: rgba(79, 184, 160, 0.36);
  --up: #4fb8a0;
  --down: #e07a6c;
  --down-soft: rgba(224, 122, 108, 0.08);
  /* legacy aliases used by generated pages */
  --gold: var(--amber); --gold-2: var(--accent-2); --gold-3: var(--amber);
  --gold-soft: var(--accent-soft); --gold-line: var(--accent-line);
  --good: var(--up); --bad: var(--down);
  /* shape + type */
  --r-sm: 3px;
  --r: 6px;
  --r-lg: 8px;
  --radius: var(--r-lg);
  --max: 1200px;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4ee;
  --bg-2: #f1ece3;
  --panel: #fffdf9;
  --panel-2: #f6f2ea;
  --line: rgba(40, 30, 12, 0.1);
  --line-2: rgba(40, 30, 12, 0.18);
  --line-3: rgba(40, 30, 12, 0.28);
  --text: #16130e;
  --text-2: #3a362f;
  --muted: #5d5850;
  --dim: #6f695f;
  --accent: #8e6a22;
  --accent-2: #74561a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(176, 134, 58, 0.1);
  --accent-line: rgba(142, 106, 34, 0.34);
  --amber: #8e6a22;
  --amber-2: #74561a;
  --amber-soft: rgba(176, 134, 58, 0.1);
  --amber-line: rgba(142, 106, 34, 0.32);
  --live: #1d6b5c;
  --live-2: #175c4f;
  --live-soft: rgba(29, 107, 92, 0.08);
  --live-line: rgba(29, 107, 92, 0.34);
  --up: #1d7a66;
  --down: #b2463a;
  --down-soft: rgba(178, 70, 58, 0.07);
}
html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6; font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden; font-feature-settings: "ss01" 0;
}
::selection { background: var(--accent-line); color: var(--text); }
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { .wrap { padding: 0 16px; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; color: var(--text); }
.moon {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 63% 60%, rgba(100, 74, 34, .32) 0 9%, transparent 10%),
    radial-gradient(circle at 40% 70%, rgba(100, 74, 34, .24) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 32%, rgba(100, 74, 34, .2) 0 5%, transparent 6%),
    radial-gradient(circle at 34% 30%, #f6e6c2 0%, #e2c58c 24%, #c8a15c 55%, #8a6a32 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 196, .14), 0 0 14px rgba(200, 161, 92, .28);
}
html[data-theme="light"] .moon { box-shadow: inset 0 0 0 1px rgba(110, 80, 32, .25), 0 1px 2px rgba(60, 40, 10, .2); }
.brand .wm { font-weight: 600; font-size: 14px; letter-spacing: 0.32em; text-transform: uppercase; line-height: 1; }
.brand .word-2 { color: var(--amber); font-weight: 600; }
@media (max-width: 400px) { .brand .wm { letter-spacing: 0.24em; font-size: 13px; } }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav { display: flex; align-items: center; gap: 0; height: 100%; }
.nav a {
  position: relative; display: inline-flex; align-items: center; height: 100%;
  text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 500; padding: 0 14px; transition: color .15s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); }
.nav .cta {
  height: 34px; margin-left: 14px; padding: 0 14px; border-radius: var(--r);
  color: var(--accent-ink); background: var(--accent); font-weight: 600;
}
.nav .cta:hover { color: var(--accent-ink); background: var(--accent-2); }
.head-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn, .menu-btn {
  height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  border-radius: var(--r); border: 1px solid var(--line-2); background: transparent; transition: color .15s, border-color .15s;
}
.theme-btn { width: 34px; flex: none; }
.theme-btn:hover, .menu-btn:hover { color: var(--text); border-color: var(--line-3); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .i-sun { display: none; }
html[data-theme="light"] .theme-btn .i-sun { display: block; }
html[data-theme="light"] .theme-btn .i-moon { display: none; }
.menu-btn { display: none; padding: 0 12px; font: 500 13px/1 var(--sans); color: var(--text); }
@media (min-width: 881px) { .head-actions { order: 3; } .nav { margin-left: auto; } }
@media (max-width: 880px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; height: auto; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line-2); padding: 6px 16px 18px; }
  .nav.open { display: flex; }
  .nav a { height: auto; padding: 14px 2px; font-size: 15px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]::after { left: 0; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; margin-left: -10px; }
  .nav .cta { margin: 14px 0 0; justify-content: center; height: 44px; border: 0; }
}

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  color: var(--live-2); font: 500 11.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--amber); transform: rotate(45deg); flex: none; }
h1, h2, h3 { font-weight: 700; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.02; }
h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.025em; }
h3 { font-size: 18px; font-stretch: 106%; letter-spacing: -0.01em; }
h1 .gold, h2 .gold { color: var(--amber); }
.gold { color: var(--amber); }
.lede { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.62; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* ---------- Sections ---------- */
section { padding: 104px 0; position: relative; }
@media (max-width: 760px) { section { padding: 64px 0; } }
.sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 72ch; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  font: 600 14px/1 var(--sans); letter-spacing: 0; height: 44px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--line-3); background: transparent; color: var(--text); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.btn::after { content: ""; width: 12px; height: 12px; flex: none; background: currentColor; transition: transform .2s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6h9M6.5 2.5 10 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1 6h9M6.5 2.5 10 6l-3.5 3.5' fill='none' stroke='black' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn:hover { border-color: var(--text); }
.btn:hover::after { transform: translateX(3px); }
.btn.primary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 96px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { /* chart paper: fine grid fading out to the left */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 75%); mask-image: linear-gradient(90deg, transparent 30%, #000 75%); opacity: .7;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 64px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 0; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.hero-meta > div { padding-right: 28px; }
.hero-meta > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.hero-meta dt { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.hero-meta dd { font-size: 14px; color: var(--text-2); }
@media (max-width: 1000px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; } .hero { padding: 56px 0 64px; } }
@media (max-width: 560px) { .hero-meta > div { padding-right: 14px; } .hero-meta > div + div { padding-left: 14px; } .hero-meta dd { font-size: 13px; } }

/* ---------- Terminal panel (hero) ---------- */
.term { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); font: 400 11.5px/1 var(--mono); color: var(--dim); }
.term-bar b { color: var(--text); font-weight: 500; margin-right: 6px; }
.term-tabs { display: flex; gap: 2px; }
.term-tabs span { padding: 5px 7px; border-radius: var(--r-sm); }
.term-tabs span.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.term-tag { letter-spacing: .08em; text-transform: uppercase; font-size: 10px; }
.term-chart { padding: 10px 0 4px 14px; border-bottom: 1px solid var(--line); }
.term-chart svg { width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--dim); font: 400 9.5px var(--mono); }
.ch-up { fill: var(--up); stroke: var(--up); }
.ch-dn { fill: var(--panel); stroke: var(--down); }
.ch-wick-up { stroke: var(--up); }
.ch-wick-dn { stroke: var(--down); }
.ch-or { fill: var(--amber-soft); stroke: none; }
.ch-orl { stroke: var(--amber); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-orlab { fill: var(--amber); font: 500 9px var(--mono); letter-spacing: .06em; }
.ch-vw { fill: none; stroke: var(--muted); stroke-width: 1; opacity: .7; }
.ch-last { fill: var(--accent); }
.ch-lastt { fill: var(--accent-ink); font: 500 9.5px var(--mono); }
.ch-lastl { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 1 2; }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 8px 14px 10px; border-bottom: 1px solid var(--line); font: 400 10.5px/1 var(--mono); color: var(--dim); }
.ch-legend i { display: inline-block; width: 12px; height: 0; border-top: 1px dashed var(--amber); margin-right: 7px; vertical-align: 3px; }
.ch-legend i.vw { border-top: 1px solid var(--muted); }
.ch-legend i.bx { height: 8px; border: 0; background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); vertical-align: 0; }

/* desk index rows (inside the terminal) */
.desk { display: grid; }
.desk-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 13px 14px; text-decoration: none; color: inherit; transition: background .15s;
}
.desk-row + .desk-row { border-top: 1px solid var(--line); }
a.desk-row:hover { background: var(--panel-2); }
a.desk-row:hover .desk-name { color: var(--accent-2); }
.desk-ico { width: 28px; height: 28px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.desk-ico svg { width: 15px; height: 15px; }
.desk-name { font-weight: 600; font-size: 14.5px; min-width: 0; transition: color .15s; }
.desk-name small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-state { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.desk-state.live { color: var(--live-2); }
.desk-state.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 8px var(--live); background: var(--live); margin-right: 8px; vertical-align: 0; }

/* ---------- Spec bar (replaces the marquee) ---------- */
.specbar { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.specbar dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.specbar dl > div { padding: 20px 24px 20px 0; }
.specbar dl > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.specbar dt { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 9px; }
.specbar dd { font: 500 13.5px/1.35 var(--mono); color: var(--text-2); }
.specbar dd span { color: var(--dim); }
@media (max-width: 860px) { .specbar dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .specbar dl > div:nth-child(3) { padding-left: 0; border-left: 0; } .specbar dl > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 920px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px 24px 22px; text-decoration: none; color: inherit;
  background: var(--panel); transition: border-color .2s, background .2s;
}
.card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(90deg, var(--accent), var(--live)); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
a.card:hover { border-color: var(--line-3); background: var(--panel-2); }
a.card:hover::before { transform: scaleX(1); }
.card h3 { margin-top: 4px; }
.card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card .go { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-size: 13.5px; font-weight: 600; }
.card .go::after { content: "→"; transition: transform .2s var(--ease); }
a.card:hover .go::after { transform: translateX(3px); }
.card .go:not(:empty)::after { content: ""; }
a.card .go { }
.icon { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; color: var(--accent); margin-bottom: 6px; border: 1px solid var(--line-2); background: var(--bg-2); }
.icon svg { width: 18px; height: 18px; }
.tagline { position: absolute; top: 26px; right: 24px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.card ul { list-style: none; display: grid; gap: 8px; color: var(--muted); font-size: 13.5px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.card ul li { display: flex; gap: 10px; }
.card ul li::before { content: ""; flex: none; margin-top: 9px; width: 8px; height: 1px; background: var(--live); }
.doors .card { min-height: 220px; }
.card.is-soon { opacity: .8; }
.card.is-soon .go { color: var(--dim); }

/* ---------- Steps ---------- */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
@media (max-width: 920px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { counter-increment: s; padding: 28px 32px 8px 0; display: flex; flex-direction: column; gap: 10px; }
.step + .step { padding-left: 32px; border-left: 1px solid var(--line); }
@media (max-width: 920px) { .step, .step + .step { padding: 24px 0; border-left: 0; } .step + .step { border-top: 1px solid var(--line); } }
.step::before { content: "0" counter(s); font: 500 12px/1 var(--mono); color: var(--amber); letter-spacing: .08em; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; line-height: 1.62; }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 920px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .principles { grid-template-columns: minmax(0, 1fr); } }
.principle { background: var(--panel); padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; }
.principle b { font-size: 15.5px; font-weight: 700; font-stretch: 106%; letter-spacing: -0.01em; }
.principle b::before { content: ""; display: block; width: 14px; height: 2px; background: var(--live); margin-bottom: 16px; }
.principle span { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------- Split / checklist ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
@media (max-width: 920px) { .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; color: var(--muted); }
.checklist li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: var(--r-sm); border: 1px solid var(--accent-line);
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%234fa893' stroke-width='2'/%3E%3C/svg%3E") center/11px no-repeat; }
.checklist li b { color: var(--text); font-weight: 600; }

/* ---------- Code window ---------- */
.code {
  position: relative; font-family: var(--mono); font-size: 12.8px; line-height: 1.75; color: var(--text-2); white-space: pre; overflow-x: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 52px 22px 20px;
}
.code::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 36px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.code::after { content: "strategy.pine"; position: absolute; top: 12px; left: 16px; font-size: 11px; color: var(--dim); letter-spacing: .04em; }
.code .c { color: var(--dim); } .code .k { color: var(--amber); } .code .s { color: var(--accent-2); } .code .n { color: #8fb0d8; }
html[data-theme="light"] .code .n { color: #3d5f96; }

/* ---------- FAQ ---------- */
.faq { display: grid; max-width: 880px; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; transition: color .15s; }
.faq summary:hover { color: var(--accent-2); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; transition: transform .25s var(--ease);
  background: linear-gradient(var(--muted), var(--muted)) center/12px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center/1.5px 12px no-repeat;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 66ch; line-height: 1.7; font-size: 15px; }
.faq a { color: var(--accent-2); }

/* ---------- CTA band ---------- */
.cta-band { border-top: 1px solid var(--line); }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 48px; }
.cta-band .wrap > .eyebrow, .cta-band .wrap > h2, .cta-band .wrap > .lede { grid-column: 1; }
.cta-band .hero-actions { grid-column: 2; grid-row: 1 / span 3; align-self: end; justify-content: flex-end !important; }
@media (max-width: 760px) { .cta-band .wrap { grid-template-columns: minmax(0, 1fr); } .cta-band .hero-actions { grid-column: 1; grid-row: auto; justify-content: flex-start !important; } }

/* ---------- Articles & page heads ---------- */
.page-head, .article-head { position: relative; border-bottom: 1px solid var(--line); }
.page-head { padding: 80px 0 48px; }
.page-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-head + section { padding-top: 48px !important; }
.article-head { padding: 80px 0 40px; margin-bottom: 48px; }
.article-head .wrap, .prose { max-width: 760px; }
.article-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.article-head h1 { font-size: clamp(32px, 4.4vw, 50px); }
.meta { color: var(--dim); font: 400 12.5px/1.4 var(--mono); letter-spacing: .02em; }
.prose { margin: 0 auto; padding: 0 32px 88px; font-size: 16.5px; }
@media (max-width: 760px) { .prose { padding: 0 16px 64px; } }
.prose > * + * { margin-top: 20px; }
.prose h2 { font-size: 26px; margin-top: 52px; }
.prose h3 { margin-top: 32px; }
.prose p, .prose li { color: var(--text-2); line-height: 1.75; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose li::marker { color: var(--live); }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { font-style: italic; color: var(--text); }
.prose a { color: var(--accent-2); text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-lg); }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose td:not(:first-child), .prose th:not(:first-child) { text-align: right; }
.prose tbody tr:hover td { background: var(--accent-soft); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { color: var(--dim); font: 500 10.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; background: var(--bg-2); border-bottom-color: var(--line-2); }
.prose td { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); }
.prose td:first-child { font-family: var(--sans); font-size: 14px; color: var(--text); }
.callout { position: relative; border: 1px solid var(--line-2); border-left: 2px solid var(--amber); background: var(--panel); border-radius: 0 var(--r) var(--r) 0; padding: 18px 22px; }
.callout p { color: var(--text-2); }
.callout strong { color: var(--text); }
.callout a { color: var(--accent-2); }
.note { border-left: 1px solid var(--line-3); padding-left: 16px; color: var(--dim); font-size: 13.5px; }
.figure { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 20px; }
.figure figcaption { color: var(--dim); font-size: 12.5px; margin-top: 14px; font-family: var(--mono); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line-2); background: var(--bg-2); }
.site-foot .wrap { padding-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-grid h4 { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.foot-grid ul { list-style: none; display: grid; gap: 10px; }
.foot-grid a { text-decoration: none; color: var(--muted); font-size: 14px; transition: color .15s; }
.foot-grid a:hover { color: var(--text); }
.foot-grid .brand { color: var(--text); }
.foot-about { margin-top: 18px; max-width: 36ch; color: var(--muted); font-size: 14px; line-height: 1.6; }
.foot-mail { display: inline-block; margin-top: 16px; font: 500 13px/1 var(--mono); color: var(--accent-2) !important; }
.foot-mail:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; line-height: 1.7; display: grid; gap: 8px; max-width: 110ch; }
.foot-legal strong { color: var(--muted); font-weight: 600; }
.foot-bar { margin-top: 24px; padding: 20px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; font-size: 12.5px; color: var(--dim); }
.foot-bar a { color: var(--dim); text-decoration: none; }
.foot-bar a:hover { color: var(--text); }
.foot-bar .sep { display: inline-block; width: 1px; height: 10px; background: var(--line-3); margin: 0 12px; vertical-align: -1px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Research ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: var(--r-sm); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.status.st-no { color: var(--down); border-color: color-mix(in srgb, var(--down) 35%, transparent); background: var(--down-soft); }
.status.st-exp { color: #8fb0d8; border-color: rgba(143, 176, 216, .32); background: rgba(143, 176, 216, .06); }
.status.st-uns { color: #b9a0d0; border-color: rgba(185, 160, 208, .32); background: rgba(185, 160, 208, .06); }
.status.st-obs { color: var(--amber-2); border-color: var(--amber-line); background: var(--amber-soft); }
html[data-theme="light"] .status.st-exp { color: #3d5f96; border-color: rgba(61, 95, 150, .3); background: rgba(61, 95, 150, .06); }
html[data-theme="light"] .status.st-uns { color: #6f4a8a; border-color: rgba(111, 74, 138, .3); background: rgba(111, 74, 138, .06); }
.callout .status { margin-bottom: 6px; }
.card.fam { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.card.fam h3 { margin: 0; }
.fam-mk { margin-top: auto; font: 400 11.5px/1.5 var(--mono); color: var(--dim); }
h2.grp { font-size: 20px; margin: 48px 0 18px; }
h2.grp:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; }
.stats > div { background: var(--panel); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.stats b { font: 500 clamp(30px, 3.6vw, 42px)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: -0.03em; }
.stats > div:first-child b { color: var(--amber); }
.stats span { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rbars { display: grid; gap: 12px; }
.rbar { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 28px; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.rbar .rt { height: 6px; background: var(--line); overflow: hidden; }
.rbar .rt i { display: block; height: 100%; background: var(--live); }
.rbar:first-child .rt i { background: var(--amber); }
.rbar b { font: 500 12.5px/1 var(--mono); color: var(--text); text-align: right; }
@media (max-width: 560px) { .rbar { grid-template-columns: minmax(0, 1fr) 28px; } .rbar .rt { grid-column: 1 / -1; grid-row: 2; } }
.lessons { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.lesson { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.lesson .ln { font: 500 12px/1.9 var(--mono); color: var(--amber); }
.lesson h3 { font-size: 18px; margin-bottom: 8px; }
.lesson p { color: var(--text-2); line-height: 1.7; font-size: 15px; }
.lesson a { color: var(--accent-2); text-underline-offset: 4px; text-decoration-color: var(--accent-line); }
.fam-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.fam-nav a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); text-decoration: none; color: var(--text); font-size: 14.5px; background: var(--panel); }
.fam-nav a:hover { border-color: var(--accent-line); }
.fam-nav a span { font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.fam-nav a.next { text-align: right; align-items: flex-end; }
@media (max-width: 560px) { .fam-nav { grid-template-columns: 1fr; } .fam-nav a.next { text-align: left; align-items: flex-start; } }
.prose.rs td { white-space: normal; min-width: 120px; }

/* ---------- About: record panel ---------- */
.record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
@media (max-width: 860px) { .record { grid-template-columns: minmax(0, 1fr); } }
.record-fig { padding: 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; background: var(--bg-2); }
@media (max-width: 860px) { .record-fig { border-right: 0; border-bottom: 1px solid var(--line); } }
.record-fig .k { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.record-fig .v { font: 500 clamp(36px, 4.4vw, 52px)/1 var(--mono); letter-spacing: -0.04em; color: var(--amber); font-variant-numeric: tabular-nums; }
.record-fig .v.pending { font: 700 22px/1.25 var(--sans); font-stretch: 110%; letter-spacing: -0.01em; color: var(--text); }
.record-fig p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.record-fig .proof { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--accent-2); text-decoration: none; padding-top: 8px; }
.record-fig .proof.off { color: var(--dim); }
.record dl { display: grid; }
.record dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 24px; }
.record dl > div + div { border-top: 1px solid var(--line); }
.record dt { font: 500 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.record dd { font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.record dd b { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .record dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.focus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 760px) { .focus { grid-template-columns: minmax(0, 1fr); } }
.focus > div { background: var(--panel); padding: 20px 22px; }
.focus b { display: block; font-size: 15px; font-weight: 700; font-stretch: 106%; margin-bottom: 6px; }
.focus b::before { content: attr(data-n); font: 500 11px/1 var(--mono); color: var(--amber); margin-right: 10px; letter-spacing: .06em; }
.focus span { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- Hero moon: a rendered gold moon with two candles on slow orbits ---------- */
.hero-visual { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.moon-stage { position: relative; width: 540px; height: 540px; margin: -30px 0 -150px; }
.big-moon {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 44%; height: auto; transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 60px rgba(217, 180, 108, .28)) drop-shadow(0 0 140px rgba(217, 180, 108, .12));
}
html[data-theme="light"] .big-moon { filter: drop-shadow(0 30px 50px rgba(90, 64, 24, .35)); }
/* tilted elliptical orbits; the back half is drawn under the moon, the front half over it */
.orbit-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orbit-lines.back { z-index: 0; } .orbit-lines.front { z-index: 3; }
.orbit-lines ellipse { fill: none; stroke: rgba(217, 180, 108, .2); stroke-width: 1; }
.orbit-lines ellipse + ellipse { stroke: rgba(217, 180, 108, .13); stroke-dasharray: 2 5; }
.orbit-lines.back ellipse { opacity: .55; }
html[data-theme="light"] .orbit-lines ellipse { stroke: rgba(142, 106, 34, .3); }
/* riders travel the orbit paths, stay upright, pass in front of the moon on the near side and behind it on the far side */
.rider { position: absolute; left: 0; top: 0; offset-rotate: 0deg; offset-anchor: center; z-index: 4; }
.rider.r1 { offset-path: path("M522.4,216.4 A258,80 -12 1 1 17.6,323.6 A258,80 -12 1 1 522.4,216.4"); --t: 64s; }
.rider.r2 { offset-path: path("M465.9,333.7 A206,62 18 1 1 74.1,206.3 A206,62 18 1 1 465.9,333.7"); --t: 88s; }
@media (prefers-reduced-motion: no-preference) {
  .rider { animation: be-ride var(--t) linear infinite; animation-delay: calc(var(--d) * var(--t) / 100); }
}
@media (prefers-reduced-motion: reduce) { .rider { offset-distance: calc(var(--d) * -1%); } }
@keyframes be-ride {
  0% { offset-distance: 0%; z-index: 4; scale: 1; opacity: 1; }
  25% { scale: 1.12; }
  49.9% { z-index: 4; }
  50% { z-index: 1; scale: 1; }
  75% { scale: .78; opacity: .7; }
  100% { offset-distance: 100%; z-index: 1; scale: 1; opacity: 1; }
}
.cdl { width: 10px; height: 30px; }
.r2.cdl { width: 8px; height: 24px; }
.cdl::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; margin-left: -.75px; background: currentColor; }
.cdl::before { content: ""; position: absolute; left: 0; right: 0; top: 26%; bottom: 22%; background: currentColor; border-radius: 1px; box-shadow: 0 0 14px currentColor; }
.cdl.up { color: var(--live); }
.cdl.dn { color: var(--down); }
/* ticker tokens */
.tk { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1d1e23, #0b0c0f 70%);
  box-shadow: inset 0 0 0 1px rgba(217, 180, 108, .55), inset 0 0 0 3px #0b0c0f, inset 0 0 0 4px rgba(217, 180, 108, .22), 0 6px 18px -6px rgba(0, 0, 0, .8); }
.tk b { font: 600 9.5px/1 var(--mono); letter-spacing: .04em; color: #f3deb0; }
html[data-theme="light"] .tk { background: radial-gradient(circle at 35% 30%, #ffffff, #f1ece3 70%);
  box-shadow: inset 0 0 0 1px rgba(142, 106, 34, .55), inset 0 0 0 3px #fffdf9, inset 0 0 0 4px rgba(142, 106, 34, .22), 0 6px 16px -6px rgba(60, 40, 10, .35); }
html[data-theme="light"] .tk b { color: #74561a; }
@media (max-width: 1000px) { .moon-stage { zoom: .8; } }
@media (max-width: 600px) { .moon-stage { zoom: .66; } }
.hero-visual .term { position: relative; width: 100%; max-width: 520px; }
.term-bar b { font: 600 13px/1 var(--sans); }


/* gold buttons keep the original champagne finish */
.btn.primary, .nav .cta { background: linear-gradient(180deg, #f1d9a6 0%, #d9b46c 55%, #c49c52 100%); border-color: transparent; color: #17120a; }
.btn.primary:hover, .nav .cta:hover { background: linear-gradient(180deg, #f6e2b8 0%, #e0bd78 55%, #c9a159 100%); color: #17120a; }
.eyebrow::before { background: var(--live); }

/* ---------- Last year's picks table (research) ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: var(--r-lg); margin: 8px 0 10px; background: var(--panel); }
table.picks { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.picks caption { caption-side: top; text-align: left; padding: 12px 14px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); }
table.picks th { text-align: right; padding: 10px 14px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.picks td { text-align: right; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text-2); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.picks th:first-child, table.picks td:first-child { text-align: left; font-family: var(--sans); }
table.picks td:first-child a { color: var(--text); font-weight: 600; }
table.picks td:first-child a:hover { color: var(--accent-2); }
table.picks td small { display: block; font: 400 11.5px/1.4 var(--sans); color: var(--dim); }
table.picks tr.tot td { color: var(--text); font-weight: 600; background: var(--panel-2); }
.prose .tbl-wrap table.picks { display: table; border: 0; border-radius: 0; }

/* About: the record (credential strip, no figures) */
.record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.record-cell { background: var(--panel); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.record-k { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.record-cell b { font-size: 20px; font-weight: 700; color: var(--text); }
.record-cell span:last-child { color: var(--muted); font-size: 14px; line-height: 1.55; }
@media (max-width: 640px) { .record { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Market board (hero) ---------- */
.board .term-bar { height: 44px; }
.mb-tabs { display: flex; gap: 4px; }
.mb-tabs button { font: 600 12.5px/1 var(--sans); color: var(--muted); background: none; border: 0; padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; }
.mb-tabs button[aria-selected="true"] { color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.mb-tabs button:hover { color: var(--text); }
.ev-row + .ev-row { border-top: 1px solid var(--line); }
.ev-next { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--live); }
.ev-next .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.ev-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 56px 30px; align-items: center; gap: 10px; padding: 10px 14px; }
.ev-row.past { opacity: .5; }
.ev-row.next { background: color-mix(in srgb, var(--amber) 7%, transparent); box-shadow: inset 2px 0 0 var(--amber); }
.ev-when b, .ev-name b { display: block; font: 600 12.5px/1.25 var(--sans); color: var(--text); }
.ev-when small, .ev-name small { display: block; font: 400 11px/1.4 var(--mono); color: var(--dim); }
.ev-imp { display: flex; gap: 2px; justify-content: flex-end; }
.ev-imp i { width: 4px; height: 12px; border-radius: 1px; background: var(--down); }
.ev-more { display: block; padding: 11px 14px; border-top: 1px solid var(--line); font: 500 12px/1 var(--sans); color: var(--accent-2); }
@media (max-width: 560px) { .ev-imp { display: none; } }

/* Market board: forex sessions timeline + official calendar */
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent); }
.fx-now-time { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.fx-clock-main { font: 600 26px/1 var(--mono); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.fx-date { font: 400 12px/1.3 var(--sans); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-status { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 11px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; }
.fx-status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.fx-status.live { color: var(--live); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 45%, transparent); }
.fx-status.live i { background: var(--live); box-shadow: 0 0 10px var(--live); animation: fxpulse 2s ease-in-out infinite; }
@keyframes fxpulse { 50% { opacity: .35; } }
.fx-body { --id: 118px; position: relative; padding: 4px 16px 10px; }
.fx-axis, .fx-row { display: grid; grid-template-columns: var(--id) minmax(0, 1fr); gap: 12px; align-items: center; }
.fx-axis { height: 30px; }
.fx-axis-l { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.fx-ticks { position: relative; height: 100%; }
.fx-ticks span { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 400 10.5px/1 var(--mono); color: var(--dim); }
.fx-ticks span:first-child { transform: translate(0, -50%); }
.fx-ticks span:last-child { transform: translate(-100%, -50%); }
.fx-row { padding: 9px 0; border-top: 1px solid var(--line); }
.fx-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-id b { font: 600 13.5px/1.2 var(--sans); color: var(--text); }
.fx-clock { font: 400 11px/1.3 var(--mono); color: var(--dim); white-space: nowrap; }
.fx-st { display: flex; align-items: center; gap: 6px; font: 500 11px/1.3 var(--sans); color: var(--muted); white-space: nowrap; }
.fx-st i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.fx-st em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.fx-row.open .fx-st { color: var(--live); }
.fx-row.open .fx-st i { background: var(--live); box-shadow: 0 0 8px var(--live); }
.fx-track { position: relative; height: 30px; border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line) calc(25% - 1px) 25%), var(--panel-2); }
.fx-track i { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; display: flex; align-items: center; overflow: hidden; background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
.fx-track i.on { background: linear-gradient(90deg, color-mix(in srgb, var(--live) 70%, transparent), color-mix(in srgb, var(--live) 38%, transparent)); box-shadow: inset 0 0 0 1px var(--live), 0 0 16px color-mix(in srgb, var(--live) 35%, transparent); }
.fx-track em { padding: 0 8px; font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-track i.on em { color: var(--text); }
.fx-flow-row .fx-id b { font-size: 12.5px; color: var(--muted); }
.fx-flow { display: block; width: 100%; height: 40px; color: var(--accent); overflow: visible; }
.fx-area { fill: url(#fxg); }
.fx-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.fx-plot { position: absolute; top: 30px; bottom: 10px; left: calc(16px + var(--id) + 12px); right: 16px; pointer-events: none; }
.fx-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--accent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.fx-now::after { content: ""; position: absolute; bottom: -4px; left: -4.75px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.fx-now em { position: absolute; top: -24px; left: 0; transform: translateX(-50%); padding: 3px 6px; border-radius: 4px; background: var(--accent); color: var(--bg); font: 600 10px/1 var(--mono); font-style: normal; white-space: nowrap; }
.fx-now.lo em { transform: none; }
.fx-now.hi em { transform: translateX(-100%); }
@media (max-width: 560px) {
  .fx-head { padding: 12px 14px 10px; flex-wrap: wrap; }
  .fx-clock-main { font-size: 22px; }
  .fx-body { --id: 104px; padding: 4px 12px 8px; }
  .fx-plot { left: calc(12px + var(--id) + 12px); right: 12px; }
  .fx-ticks span.minor { display: none; }
  .fx-track em { display: none; }
  .fx-st { font-size: 10.5px; }
}
.ev-row[hidden] { display: none; }
.ev-src { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); text-align: right; }
.ev-src-note { margin: 0; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.5; color: var(--dim); }
@media (max-width: 560px) { .ev-row { grid-template-columns: 74px minmax(0, 1fr) 50px; } }

/* ---------- Nav: highlighted Backtested strategies ---------- */
.nav a.nav-hl { color: var(--text); gap: 8px; }
.nav a.nav-hl::before { content: ""; position: absolute; inset: 15px 4px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, transparent); z-index: -1; transition: background .15s, border-color .15s; }
.nav a.nav-hl:hover::before { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: var(--accent); }
.nav a.nav-hl { margin-right: 6px; padding: 0 16px; isolation: isolate; }
.hl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.nav a.nav-hl[aria-current="page"]::after { display: none; }
.nav a.nav-hl[aria-current="page"]::before { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); }
@media (max-width: 900px) { .nav a.nav-hl::before { display: none; } .nav a.nav-hl { margin: 0; padding: 14px 2px; color: var(--accent-2); } }

/* ---------- Research charts (viz.py) ---------- */
.viz { margin: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 18px 18px 14px; min-width: 0; }
.viz figcaption { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.viz figcaption b { font: 600 15px/1.3 var(--sans); color: var(--text); }
.viz figcaption > span { font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 16px; }
.prose .viz { margin: 18px 0; }
.hb-body { position: relative; display: flex; flex-direction: column; gap: 2px; }
.hb-row, .pr-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 56px; align-items: center; gap: 10px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; }
.hb-row:hover, .pr-row:hover { background: var(--panel-2); }
.hb-lab { font-size: 12.5px; line-height: 1.25; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-lab a { color: var(--text); text-decoration: none; font-weight: 500; }
.hb-lab a:hover { color: var(--accent-2); }
.hb-lab small { display: block; font-size: 11px; color: var(--dim); }
.hb-track { position: relative; height: 10px; }
.hb-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; opacity: .9; }
.hb-row:hover .hb-bar { opacity: 1; }
.hb-bar.over { border-radius: 0; background: linear-gradient(90deg, var(--accent) 92%, transparent 92%, transparent 94%, var(--accent) 94%); }
.hb-val { font: 500 12px/1 var(--mono); color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.hb-refm { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--text-2); }
.viz .legend { display: flex; gap: 14px; margin-top: 6px; }
.lg-ref { width: 0 !important; height: 12px !important; border-left: 1px dashed var(--text-2); border-radius: 0 !important; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lg i { width: 10px; height: 10px; border-radius: 2px; }
.pr-row { grid-template-columns: minmax(0, 150px) minmax(0, 1fr); }
.pr-bars { display: flex; flex-direction: column; gap: 2px; }
.pr-line { position: relative; display: flex; align-items: center; gap: 6px; height: 10px; padding-right: 64px; }
.pr-line i { height: 8px; border-radius: 0 4px 4px 0; flex: none; }
.pr-line em { font: 400 11px/1 var(--mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.pr-a { background: var(--accent); }
.pr-b { background: var(--muted); opacity: .55; }
.split { position: relative; display: flex; justify-content: space-between; height: 26px; border-radius: 6px; background: var(--panel-2); overflow: hidden; font: 500 11.5px/26px var(--mono); }
.split i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--live) 30%, transparent); border-right: 2px solid var(--live); }
.split span { position: relative; padding: 0 10px; color: var(--text); }
.pick-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.pick-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pc-head b { display: block; font: 600 15px/1.3 var(--sans); color: var(--text); }
.pc-head span { font-size: 12.5px; color: var(--dim); }
.pc-k { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.pc-k div { margin: 0; }
.pc-k dt { font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pc-k dd { margin: 2px 0 0; font: 500 16px/1.2 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 14px 0 22px; padding: 0; counter-reset: st; }
.prose .stepper li { margin: 0; padding: 26px 12px 0 0; position: relative; counter-increment: st; }
.stepper li::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--line-2); }
.stepper li::after { content: counter(st); position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px/1 var(--mono); background: var(--panel-2); color: var(--dim); border: 1px solid var(--line-2); }
.stepper li.done::before { background: var(--live); }
.stepper li.done::after { content: "✓"; background: color-mix(in srgb, var(--live) 18%, var(--panel)); color: var(--live); border-color: var(--live); }
.stepper li.now::after { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.stepper b { display: block; font: 600 13.5px/1.3 var(--sans); color: var(--muted); }
.stepper li.now b, .stepper li.done b { color: var(--text); }
.stepper small { display: block; font-size: 12px; line-height: 1.4; color: var(--dim); margin-top: 3px; }
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 18px; padding: 0; }
.prose .pipeline li { margin: 0; position: relative; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.pipeline li:last-child { border-color: color-mix(in srgb, var(--live) 50%, var(--line-2)); }
.pl-n { font: 500 11px/1 var(--mono); color: var(--amber); letter-spacing: .06em; }
.pipeline b { font: 600 14.5px/1.3 var(--sans); color: var(--text); }
.pipeline small { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.tl-body { padding: 28px 0 0; }
.tl-lane { position: relative; height: 34px; background: var(--panel-2); border-radius: 6px; }
.tl-span { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; display: flex; align-items: center; overflow: hidden; }
.tl-span em { font: 500 11px/1 var(--sans); font-style: normal; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-span.frozen { background: color-mix(in srgb, var(--accent) 26%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.tl-span.frozen em { color: var(--text); }
.tl-span.explore { background: color-mix(in srgb, var(--muted) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 40%, transparent); }
.tl-span.explore em { color: var(--text-2); }
.tl-span.forward { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--live) 26%, transparent) 0 6px, color-mix(in srgb, var(--live) 12%, transparent) 6px 12px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--live) 55%, transparent); }
.tl-span.forward em { color: var(--live); }
.tl-mark { position: absolute; top: -24px; bottom: -4px; border-left: 1px dashed var(--muted); }
.tl-mark em { position: absolute; top: 0; right: 5px; font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--dim); white-space: nowrap; }
.tl-axis { position: relative; height: 18px; margin-top: 6px; }
.tl-tick { position: absolute; transform: translateX(-50%); font: 400 10.5px/1 var(--mono); color: var(--dim); }
.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.gauge { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.g-head b { font: 600 13.5px/1.3 var(--sans); color: var(--text); }
.g-head span { font: 500 15px/1 var(--mono); color: var(--amber); }
.g-track { position: relative; height: 10px; background: var(--panel-2); border-radius: 5px; margin-bottom: 14px; }
.g-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); border-radius: 5px; opacity: .85; }
.g-lim { position: absolute; top: -4px; bottom: -4px; border-left: 2px solid var(--text-2); }
.g-lim em { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); font: 400 10.5px/1 var(--mono); font-style: normal; color: var(--dim); white-space: nowrap; }
.gauge small { font-size: 12px; color: var(--dim); }
@media (max-width: 760px) {
  .viz-grid, .gauges { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stepper { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 14px; }
  .hb-row, .pr-row { grid-template-columns: minmax(0, 112px) minmax(0, 1fr) 50px; }
  .pr-row { grid-template-columns: minmax(0, 112px) minmax(0, 1fr); }
  .tl-mark em { display: none; }
}

.prose ol.pipeline, .prose ol.stepper { padding-left: 0; margin-left: 0; }

@media (max-width: 400px) { .moon-stage { zoom: .56; } .hero { overflow-x: clip; } }
.mb-tabs button { white-space: nowrap; }
@media (max-width: 380px) { .board .ss-tz { display: none; } }
