/* Website styles — same palette and type as the design canvas. */
:root {
  --ground: #161C2E; --panel: #1D253A; --panel2: #252F48; --border: #323D5A; --grid: #2B3551;
  --ink: #E9EDF6; --muted: #A3ACC2;
  --accent: #6E5EF0; --accent-weak: #2C2A5C; --accent-txt: #AFA4FF;
  --gain: #35D0AE; --loss: #F2707A; --orange: #F2A94B;
  --s-bot: #8577EE; --s-qqq: #C98325; --s-spy: #5FA8D3;   /* chart series (validated on --panel) */
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Fraunces', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); }
a { color: var(--accent-txt); }
a:hover { color: #CFC8FF; }
.wrap { max-width: 1312px; margin: 0 auto; padding: 0 64px; }
main.wrap { padding-top: 64px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 72px; }
main.tight { gap: 40px; }

/* header */
.hdr { background: var(--panel); border-bottom: 1px solid var(--border); }
.hdr > .wrap { height: 72px; display: flex; align-items: center; gap: 40px; }
.brand { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.hdr nav.desk { display: flex; gap: 28px; font-size: 15px; }
.hdr nav.desk a { color: var(--muted); text-decoration: none; }
.hdr nav.desk a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.hdr .sp { flex-grow: 1; }
.hdr .login { color: var(--ink); font-size: 15px; text-decoration: none; }
.langs { display: flex; gap: 10px; }
.hdr .btn .short { display: none; }
.menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--border);
  border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }
.mnav { background: var(--panel); border-top: 1px solid var(--border); }
.mnav .wrap { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 12px; }
.mnav a { display: flex; align-items: center; min-height: 48px; color: var(--ink); font-size: 16px; text-decoration: none; border-bottom: 1px solid var(--grid); }
.mnav a:last-child { border-bottom: none; }
.mnav a[aria-current="page"] { color: var(--accent-txt); font-weight: 600; }
.mnav[hidden] { display: none; }
.hdr { position: relative; z-index: 20; }
.chart svg { touch-action: pan-y; }
.langs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--muted); font-size: 15px; text-decoration: none; }
.langs a:hover { color: var(--ink); }

/* buttons, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 8px;
  font-size: 16px; font-weight: 600; text-decoration: none; border: 1px solid transparent; white-space: nowrap; cursor: pointer; font-family: var(--sans); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #5E4EE0; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { background: var(--panel2); color: var(--ink); }
.btn.sm { min-height: 44px; font-size: 15px; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent-txt); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.busy { opacity: 1; cursor: progress; gap: 10px; }
.btn.busy .spinner { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.accent { background: var(--accent-weak); color: var(--accent-txt); }
.badge.gain { background: var(--gain-bg); color: var(--gain); }
.badge.soon { background: var(--panel2); color: var(--muted); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
/* 2026-10-31: the "Simulated" badge -- a button only so it can be tapped on phones */
.badge.sim { background: var(--orange-bg); color: var(--orange); border: 0; font-family: inherit; font-size: 11.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .07em; cursor: help; }
html[lang="ar"] .badge.sim { letter-spacing: 0; font-size: 12.5px; }
.badge.sim:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.sim-tip { order: 99; flex-basis: 100%; line-height: 1.5; }
.sim-tip[hidden] { display: none; }
.badge.loss { background: var(--loss-bg); color: var(--loss); }
/* The three badge fills were literals, so no theme token could reach them and
   the light theme had to override them by name. They are tokens now, defined
   once per theme like every other colour here. */
:root { --gain-bg: #173D3A; --orange-bg: #3D3020; --loss-bg: #45222A; }
/* Why a field is greyed out. Sits under the input, quiet but readable -- a
   control that disables itself with no reason reads as broken. */
.fnote { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.step-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 18px;
  border-top: 1px solid var(--border); }
.step-nav .sp { flex-grow: 1; }
.fpre { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ftime { color: var(--muted); font-size: 11px; white-space: nowrap; }
.field > .ftime { margin-top: -2px; }   /* 2026-11-05: under its own box */
.tsel-b { display: inline-flex; gap: 6px; margin-inline-start: 10px; }
.fchip { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: inherit; cursor: pointer; }
.fchip:hover, .fchip:focus-visible { border-color: var(--accent); color: var(--accent-txt); }

/* blocks */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.panel.lg { padding: 32px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
h1, h2, h3 { margin: 0; }
.h-display { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; }
.sec-title { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -0.01em; }
.sec-sub { margin: 10px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
p { margin: 0; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row .sp { flex-grow: 1; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero .eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-txt); }
.hero h1 { font-size: 58px; line-height: 1.08; }
.hero .lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 620px; }
.hero .copy { display: flex; flex-direction: column; gap: 26px; }

/* stats */
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .l { font-size: 13px; color: var(--muted); }
.stat .v { font-family: var(--mono); font-size: 30px; font-weight: 500; }
.stat .s { font-size: 12px; color: var(--muted); }
.stat.md .v { font-size: 26px; }
.stat.lg .v { font-size: 34px; }
/* 2026-10-27 f: the two medians side by side in the hero card; the numbers shrink on a phone instead of wrapping */
.typ-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.typ-pair .stat .v { font-size: clamp(20px, 5.8vw, 34px); white-space: nowrap; }
.typ-short { text-decoration: none; font-weight: 600; }
.typ-short:hover { text-decoration: underline; }
.typ-full { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--gain-bg); color: var(--gain); }
#typ { scroll-margin-top: 90px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.tile.dark { background: var(--ground); }
.gain { color: var(--gain); } .loss { color: var(--loss); } .orange { color: var(--orange); }

/* steps & services */
.num { width: 36px; height: 36px; border-radius: 999px; background: var(--accent-weak); color: var(--accent-txt);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.card-t { font-size: 19px; font-weight: 600; }
.card-p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.service { min-height: 210px; }
.service .card-p { flex-grow: 1; }
.link { font-size: 14px; font-weight: 600; text-decoration: none; }

/* trust strip */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust > div { padding: 0 24px; border-inline-start: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.trust b { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.trust span { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: end; padding: 12px 14px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); }
td { text-align: end; vertical-align: top; padding: 12px 14px; font-family: var(--mono); font-size: 14px; line-height: 1.45; border-bottom: 1px solid var(--grid); }
th.t, td.t { text-align: start; font-family: var(--sans); }
.table-scroll { overflow-x: auto; }

/* chart */
.chart { position: relative; width: 100%; direction: ltr; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: #0F1422; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; line-height: 1.5; white-space: nowrap; transform: translate(-50%, -110%); display: none; }
.chart .tip b { font-family: var(--mono); font-weight: 500; }
.legend { display: flex; gap: 18px; font-size: 13px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw-bot { width: 16px; height: 3px; background: var(--s-bot); display: inline-block; }
.sw-qqq { width: 16px; border-top: 2px dashed var(--s-qqq); display: inline-block; }
.sw-spy { width: 16px; border-top: 2px dotted var(--s-spy); display: inline-block; }
.sw-band { width: 14px; height: 14px; background: var(--loss); opacity: .3; display: inline-block; }

/* video, placeholders */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 560px; border-radius: 14px; border: 1px dashed var(--border);
  background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; overflow: hidden; text-align: center; padding: 16px; }
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play { width: 84px; height: 84px; border-radius: 999px; border: none; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.note { background: var(--ground); border: 1px solid var(--border); border-radius: 10px; padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start; }
.note p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.banner { border-radius: 10px; padding: 14px 18px; font-size: 14px; font-weight: 600; }
.banner.bad { background: #45222A; color: #FFD3D7; border: 1px solid var(--loss); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* footer */
footer.ftr { background: var(--panel); border-top: 1px solid var(--border); }
footer.ftr .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 28px; }
footer.ftr .cols { display: flex; gap: 80px; flex-wrap: wrap; }
footer.ftr .col { display: flex; flex-direction: column; gap: 10px; }
footer.ftr .col a { font-size: 14px; color: var(--muted); text-decoration: none; }
footer.ftr .col a:hover { color: var(--ink); }
footer.ftr .h { font-size: 13px; font-weight: 600; }

/* responsive */
@media (max-width: 1100px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .split { grid-template-columns: minmax(0, 1fr) !important; }
  .grid > * { min-width: 0; }
}
@media (max-width: 800px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 32px; gap: 48px; }
  .hdr nav.desk { display: none; }
  .menu-btn { display: inline-flex; }
  .hdr > .wrap { gap: 10px; }
  .brand { font-size: 20px; }
  .hdr .login { display: none; }
  .hdr .btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .hero h1 { font-size: 38px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .sec-title { font-size: 28px; }
}

/* ── Arabic / right-to-left ─────────────────────────────────────── */
:root:lang(ar) {
  --sans: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  --serif: 'Noto Naskh Arabic', 'IBM Plex Sans Arabic', serif;
}
:lang(ar) .h-display, :lang(ar) .sec-title, :lang(ar) .brand, :lang(ar) .trust b { letter-spacing: 0; }
:lang(ar) .hero h1 { font-size: 52px; line-height: 1.35; }
:lang(ar) .hero .eyebrow { letter-spacing: 0; }
:lang(ar) .sec-title { line-height: 1.4; }
:lang(ar) .card-p, :lang(ar) .sec-sub, :lang(ar) .hero .lead { line-height: 1.8; }
:lang(ar) .stat .l, :lang(ar) .stat .s { line-height: 1.5; }
bdi { unicode-bidi: isolate; }
@media (max-width: 800px) {
  :lang(ar) .hero h1 { font-size: 34px; }
  .langs a { font-size: 14px; }
  .hdr .btn .long { display: none; }
  .hdr .btn .short { display: inline; }
}

/* ── backtester: rail · steps · your setup ──────────────────────── */
.bt-wrap { max-width: 1600px; padding-top: 0; padding-bottom: 0; gap: 0; }
.bt-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr) 320px; align-items: start; min-height: calc(100vh - 72px); }

.bt-rail { position: sticky; top: 0; align-self: stretch; box-sizing: border-box; padding: 28px 16px;
  display: flex; flex-direction: column; gap: 4px; background: var(--panel); border-inline-end: 1px solid var(--border); }
.bt-rail .rh { padding: 0 14px 12px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bt-rail .rsep { height: 1px; background: var(--border); margin: 16px 14px; }
.rstep { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.3; text-align: start; cursor: pointer; width: 100%; }
.rstep:hover { background: var(--panel2); }
.rstep[aria-current="true"] { background: var(--accent-weak); color: var(--accent-txt); font-weight: 600; }
.rstep .rn { font-family: var(--mono); font-size: 12px; color: var(--muted); flex-shrink: 0; }
.rstep[aria-current="true"] .rn { color: var(--accent-txt); }
.rstep .rlabel { flex-grow: 1; min-width: 0; }
.rstep[disabled] { opacity: .45; cursor: not-allowed; }
.rstep[disabled]:hover { background: transparent; }
.rtag { font-size: 11px; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; flex-shrink: 0; white-space: nowrap; }
.rcount { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent-weak); color: var(--accent-txt); font-family: var(--mono); font-size: 11px; }
.rstep[aria-current="true"] .rcount { background: var(--accent); color: #fff; }
.bt-rail .rnote { margin: 0; padding: 0 14px; font-size: 12px; line-height: 1.5; color: var(--muted); }

.bt-main { box-sizing: border-box; padding: 32px 40px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.bt-head { display: flex; align-items: flex-start; gap: 20px; }
.bt-head-t { display: flex; flex-direction: column; gap: 6px; flex-grow: 1; min-width: 0; }
.bt-h1 { font-family: var(--serif); font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
:lang(ar) .bt-h1 { letter-spacing: 0; }
.bt-h1-sub { font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 680px; }
.bt-body { display: flex; flex-direction: column; gap: 20px; }
.bt-sec { display: flex; flex-direction: column; gap: 14px; }
.bt-sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bt-sec-h h2 { font-size: 18px; font-weight: 600; }
.bt-sec-h .hint { font-size: 13px; color: var(--muted); }

.bt-side { position: sticky; top: 0; align-self: stretch; box-sizing: border-box; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 16px; background: var(--panel); border-inline-start: 1px solid var(--border); }
.bt-side-t { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.bt-side .srow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.bt-side .sv { font-family: var(--mono); text-align: end; }
.bt-eta { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--ground); font-size: 13px; line-height: 1.5; color: var(--muted); }
.bt-eta b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.bt-go { width: 100%; }
.bt-save { border: none; background: transparent; color: var(--accent-txt); font-family: var(--sans); font-size: 14px; cursor: pointer; min-height: 32px; }
.bt-save:hover { color: #CFC8FF; }
.bt-side .sp { flex-grow: 1; min-height: 8px; }
.bt-fine { line-height: 1.5; }

.seg { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--ground); flex-shrink: 0; }
.seg button { min-height: 36px; padding: 0 14px; border: none; border-radius: 6px; background: transparent; color: var(--muted);
  font-family: var(--sans); font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--panel2); color: var(--ink); font-weight: 600; }

/* a group as a card: toggle, one-line explanation, its fields inline */
.gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(296px, 1fr)); gap: 16px; align-items: start; }
.gcard { box-sizing: border-box; padding: 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px; }
.gcard.on { border: 2px solid var(--accent); padding: 19px; }
.gcard.dis { background: #191F31; }
.gcard .gh { display: flex; align-items: flex-start; gap: 12px; }
.gcard .gh input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.gcard .gt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gcard .gt label { font-size: 16px; font-weight: 600; cursor: pointer; }
.gcard.dis .gt label { color: var(--muted); cursor: default; }
.gcard .gt span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.gcard .gtag { margin-inline-start: auto; flex-shrink: 0; }
.gcard .gnote { font-size: 13px; line-height: 1.5; color: var(--muted); padding-top: 12px; border-top: 1px dashed var(--border); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px; }
/* 1024f alignment: every field label in a grid holds TWO lines, text sitting on the bottom, so all the
   inputs of a row start on the same line whether a label wraps or not -- and notes or chips under an
   input no longer move it (an earlier 'align-items: end' did, measured in the browser). */
.fields .field > label { min-height: 2.6em; display: flex; align-items: flex-end; gap: 4px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: var(--muted); }
.fv { display: flex; align-items: center; gap: 8px; }
.fv input, .field input, .field select { height: 44px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel2); color: var(--ink); font-family: var(--mono); font-size: 15px; width: 100%; min-width: 0; }
.fv.auto { height: 44px; display: flex; align-items: center; font-family: var(--mono); color: var(--muted); }
.fu { font-size: 13px; color: var(--muted); white-space: nowrap; }
/* 1024f: an input never shrinks below a readable width -- '12' showed as '1' when the unit text
   'candles = 3 h' took the room. The unit wraps instead. */
.fv input { min-width: 4.2em; }
.fv .fu { white-space: normal; min-width: 0; }
#tsearch { height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--ink); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 240px; overflow-y: auto; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--ground); font-family: var(--mono); font-size: 14px; cursor: pointer; }
.chip.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-txt); }
.chip input { width: 16px; height: 16px; }
.spinner { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--border); border-top-color: var(--accent-txt);
  animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 999px; background: var(--panel2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
#bt-result { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1000px) {
  .bt-layout { grid-template-columns: minmax(0, 1fr); }
  .bt-side { position: static; }
}

/* ── chips + one shared editor (for the steps that keep growing) ── */
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.fchip.on { border-color: transparent; background: #DDE3F0; color: #161C2E; }
.fchip.sel { box-shadow: 0 0 0 2px var(--accent); }
.fchip.dis { opacity: .55; }
.fchip.soft { opacity: 1; border-style: dashed; color: var(--muted); }
.fchip.soft .fn { color: var(--muted); }
.feditor.soon { border-color: var(--border); border-style: dashed; }
.fchip-main { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: none;
  border-radius: 8px; background: transparent; color: inherit; font-family: var(--sans); font-size: 14px; cursor: pointer; }
.fchip-main:hover { background: rgba(255,255,255,.05); }
.fchip.on .fchip-main:hover { background: rgba(0,0,0,.05); }
.fchip-main[disabled] { cursor: default; }
.fchip.on .fn { color: #4A5270; }
.fchip .fvv { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.fchip .tag { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.fchip.on .tag { color: #4A5270; border-color: #B9C1D6; }
.fchip svg { color: var(--muted); flex-shrink: 0; }
.fchip.on svg { color: #4A5270; }
.fchip-x { display: inline-flex; align-items: center; justify-content: center; width: 34px; border: none;
  border-inline-start: 1px solid #B9C1D6; border-radius: 0; background: transparent; color: inherit; cursor: pointer; }
.fchip-x:hover { color: var(--loss); }
.feditor { box-sizing: border-box; padding: 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--accent);
  display: flex; flex-direction: column; gap: 16px; }
.feditor .eh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feditor .eh h3 { font-size: 16px; font-weight: 600; }
.feditor .eh .ed { font-size: 13px; line-height: 1.45; color: var(--muted); flex-grow: 1; min-width: 200px; }
.feditor .eh .sp { flex-grow: 0; }
.elink { border: none; background: transparent; color: var(--accent-txt); font-family: var(--sans); font-size: 14px;
  font-weight: 600; cursor: pointer; min-height: 32px; padding: 0 4px; }
.elink:hover { color: #CFC8FF; }
.elink.off { color: var(--muted); font-weight: 400; }
.elink.off:hover { color: var(--loss); }
.scope-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.scope-grid > :first-child { grid-row: span 2; }
.scope-grid .panel { padding: 20px; }
@media (max-width: 1000px) { .scope-grid { grid-template-columns: minmax(0, 1fr); } .scope-grid > :first-child { grid-row: auto; } }

/* ── backtester, narrow screens ─────────────────────────────────── */
@media (max-width: 1240px) {
  .bt-shell { grid-template-columns: 200px minmax(0, 1fr) 280px; }
  .bt-main { padding: 28px 24px; }
  .bt-side { padding: 24px 18px; }
}
@media (max-width: 1000px) {
  .bt-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bt-rail { position: sticky; top: 0; z-index: 15; flex-direction: row; gap: 6px; align-items: center;
    padding: 10px 16px; overflow-x: auto; scrollbar-width: none;
    border-inline-end: none; border-bottom: 1px solid var(--border); }
  .bt-rail::-webkit-scrollbar { display: none; }
  .bt-rail .rh, .bt-rail .rsep, .bt-rail .rnote { display: none; }
  .rstep { width: auto; flex-shrink: 0; min-height: 40px; border-radius: 999px; border: 1px solid var(--border); padding: 0 14px; }
  .rstep .rtag { display: none; }
  .bt-main { padding: 24px 16px; }
  .bt-side { position: sticky; bottom: 0; top: auto; align-self: auto; z-index: 15;
    border-inline-start: none; border-top: 1px solid var(--border); padding: 16px; }
  .bt-side .sp, .bt-side .bt-fine, .bt-side .bt-eta { display: none; }
  .bt-side.open .sp, .bt-side.open .bt-fine, .bt-side.open .bt-eta { display: block; }
  .bt-side #bt-summary { display: none; }
  .bt-side.open #bt-summary { display: block; }
  .bt-side-t { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 16px; }
  .bt-side-t::after { content: '▾'; color: var(--muted); font-size: 13px; }
  .bt-side.open .bt-side-t::after { content: '▴'; }
  .gcards { grid-template-columns: minmax(0, 1fr); }
  .bt-h1 { font-size: 26px; }
  .bt-head { flex-direction: column; gap: 14px; }
}

/* ── price chart ────────────────────────────────────────────────── */
.pc { display: flex; flex-direction: column; gap: 8px; direction: ltr; }
.pc-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pc-read { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pc-read b { color: var(--ink); font-weight: 500; }
.pc-hint { font-size: 12px; color: var(--muted); }
.pc-plot { position: relative; border-radius: 10px; background: #161C2E; border: 1px solid var(--border); overflow: hidden; }
.pc-plot svg { display: block; width: 100%; cursor: crosshair; touch-action: pan-y; }
#pc-ticker { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel2);
  color: var(--ink); font-family: var(--mono); font-size: 14px; }
.btn.xs { min-height: 32px; padding: 0 10px; font-size: 13px; }

.pop-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: none;
  border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.pop-x:hover { color: var(--ink); background: var(--panel2); }

/* ── the wizard ─────────────────────────────────────────────────── */
body.wz-open { overflow: hidden; }
#bt-wz { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
#bt-wz[hidden] { display: none; }
.wz-back { position: absolute; inset: 0; background: rgba(10,14,24,.72); }
.wz { position: relative; width: min(720px, 100%); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; gap: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.wz-h { display: flex; align-items: center; gap: 12px; }
.wz-dots { display: flex; gap: 6px; }
.wz-dots span { width: 26px; height: 4px; border-radius: 999px; background: var(--panel2); }
.wz-dots span.done { background: var(--accent-txt); }
.wz-dots span.on { background: var(--accent); }
.wz-n { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.wz-h .sp { flex-grow: 1; }
.wz-q h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.wz-q p { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--muted); }
:lang(ar) .wz-q h2 { letter-spacing: 0; }
.wz-body { display: flex; flex-direction: column; gap: 16px; }
.wz-opts { display: flex; flex-direction: column; gap: 10px; }
.wz-opt { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--ground); cursor: pointer; }
.wz-opt:hover { border-color: var(--accent-txt); }
.wz-opt.on { border-color: var(--accent); background: var(--accent-weak); }
.wz-opt.dis { opacity: .5; cursor: not-allowed; }
.wz-opt input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.wz-ot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wz-ot b { font-size: 15px; font-weight: 600; }
.wz-ot span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.wz-set { padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 12px; }
.wz-set h4 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wz-note { font-size: 13px; line-height: 1.55; color: var(--muted); }
.wz-sentence { padding: 14px 16px; border-radius: 10px; background: var(--ground); border: 1px solid var(--border);
  font-size: 15px; line-height: 1.65; }
.wz-sentence b { font-family: var(--mono); font-weight: 500; color: var(--accent-txt); }
.wz-f { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.wz-f .sp { flex-grow: 1; }
.bt-head-a { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
@media (max-width: 800px) {
  #bt-wz { padding: 0; align-items: flex-end; }
  .wz { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
}

/* ── inner pages: services, about, pricing, contact ─────────────── */
.page-h { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.page-h .eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-txt); }
:lang(ar) .page-h .eyebrow { letter-spacing: 0; }
.page-h h1 { font-size: 46px; line-height: 1.1; }
:lang(ar) .page-h h1 { font-size: 40px; line-height: 1.35; }
.page-h .lead { font-size: 19px; line-height: 1.6; color: var(--muted); }
.svc-list { display: flex; flex-direction: column; gap: 20px; }
.svc-row { flex-direction: row; gap: 24px; align-items: flex-start; }
.svc-n { flex-shrink: 0; }
.svc-c { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cta-band { background: linear-gradient(135deg, var(--panel), var(--accent-weak)); gap: 16px; }
.note-band { border-color: var(--orange); }
.banner.ok { background: #173D3A; color: #B7F0E3; border: 1px solid var(--gain); font-weight: 500; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; gap: 16px; }
.plan.pop { border-color: var(--accent); }
.plan-tag { position: absolute; top: -12px; inset-inline-start: 24px; }
.plan-p { display: flex; align-items: baseline; gap: 10px; }
.plan-p b { font-family: var(--serif); font-size: 38px; font-weight: 600; }
.plan-f { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.plan-f li { position: relative; padding-inline-start: 24px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.plan-f li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--gain); font-weight: 700; }
.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 24px; }
.faq-i h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.mail { gap: 10px; }
.mail-a { font-family: var(--mono); font-size: 24px; text-decoration: none; }
@media (max-width: 1000px) { .plans { grid-template-columns: minmax(0, 1fr); } .faq { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .page-h h1 { font-size: 32px; }
  :lang(ar) .page-h h1 { font-size: 28px; }
  .page-h .lead { font-size: 17px; }
  .svc-row { flex-direction: column; gap: 16px; }
  .mail-a { font-size: 18px; word-break: break-all; }
}


/* ── trade chart: price / RSI / volume ──────────────────────────── */
.pcx { display: flex; flex-direction: column; gap: 6px; direction: ltr; }
.pcx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcx-bar .sp { flex-grow: 1; }
.pcx-steps { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--ground); }
.pcx-steps button { min-height: 30px; padding: 0 10px; border: none; border-radius: 6px; background: transparent;
  color: var(--muted); font-family: var(--mono); font-size: 12px; cursor: pointer; }
.pcx-steps button.on { background: var(--accent-weak); color: var(--accent-txt); font-weight: 600; }
.pcx-auto label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.pcx-tools { display: inline-flex; gap: 4px; }
.pcx-tools button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--ink);
  font-size: 15px; line-height: 1; cursor: pointer; }
.pcx-tools button:hover { background: var(--panel2); }
.pcx-tools button.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-txt); }
.pcx-read { min-height: 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pcx-read b { color: var(--ink); font-weight: 500; }
.pcx-pane { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #161C2E; }
.pcx-pane.sm { border-radius: 8px; }
.pcx-badge, .pcx-tag { position: absolute; top: 6px; left: 8px; z-index: 3; padding: 1px 7px; border-radius: 4px;
  background: rgba(22,28,46,.85); border: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pcx-sel { position: absolute; top: 0; bottom: 0; z-index: 4; background: rgba(110,94,240,.18);
  border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); pointer-events: none; }
.pcx-hint { font-size: 12px; color: var(--muted); }
.tfilter { margin-bottom: 4px; }
.tfilter .chip { min-height: 32px; font-size: 12px; }
tr.trow { cursor: pointer; }
tr.trow:hover td { background: rgba(255,255,255,.03); }
tr.trow.on td { background: var(--accent-weak); }
tr.trow[hidden] { display: none; }

/* ── results page ───────────────────────────────────────────────── */
.rs-top { position: sticky; top: 0; z-index: 25; background: var(--panel); border-bottom: 1px solid var(--border); }
.rs-top-in { max-width: 1600px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rs-top-in .sp { flex-grow: 1; }
.rs-back { font-size: 14px; text-decoration: none; white-space: nowrap; }
.pcx-steps button.busy { opacity: .55; cursor: progress; }
.rs-back::before { content: '←'; margin-inline-end: 6px; }
[dir="rtl"] .rs-back::before { content: '→'; }
.rs-title h1 { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.rs-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.rs-nav a { padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.rs-nav a:hover { background: var(--panel2); color: var(--ink); }
.rs-nav a.on { background: var(--accent-weak); color: var(--accent-txt); font-weight: 600; }
.rs-main { max-width: 1600px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 40px; }
.rs-sec { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 110px; }
.rs-h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; }
:lang(ar) .rs-h2 { letter-spacing: 0; }
.rs-sec .grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.soon-panel { border-style: dashed; }
@media (max-width: 1100px) { .rs-sec .grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .rs-top-in { padding: 12px 16px; gap: 12px; }
  .rs-title h1 { font-size: 18px; }
  .rs-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .rs-nav::-webkit-scrollbar { display: none; }
  .rs-main { padding: 20px 16px; gap: 28px; }
  .rs-h2 { font-size: 21px; }
  .rs-sec .grid.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* a strategy's own extra controls, inside its panel */
.xtras { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--border); }
.xtras-h { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.xrow { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.xrow.dis { opacity: .55; }
.xrow .field { min-width: 132px; }
.xsw { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding-bottom: 11px; cursor: pointer; }
.xrow.dis .xsw { cursor: default; }
.xsw input { width: 18px; height: 18px; accent-color: var(--accent); }
.xrow .badge { align-self: center; margin-bottom: 8px; }

/* ── the trade workspace (panes + dividers + table) ─────────────── */
.pcw { display: flex; flex-direction: column; gap: 8px; direction: ltr; min-width: 0; }
.pcw-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcw-bar .sp { flex-grow: 1; }
.pcw-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.pcw-region { display: flex; flex-direction: column; height: 520px; min-height: 200px; }
.pcw-pane { position: relative; flex: 1 1 auto; min-height: 60px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: #161C2E; }
/* min-height: 0 so the small panes can be dragged away to nothing. They
   inherit .pcw-pane's 60px floor otherwise, and the browser enforces that
   whatever the drag handler allows -- which is why lowering only the JS
   minimum changed nothing. The PRICE pane has no .sm, keeps its 60px, and
   therefore cannot be collapsed by accident. */
.pcw-pane.sm { flex: 0 0 110px; min-height: 0; }
.pcw-div { flex: 0 0 10px; cursor: row-resize; position: relative; touch-action: none; }
.pcw-div::after { content: ''; position: absolute; inset-inline: 0; top: 4px; height: 2px;
  border-radius: 2px; background: var(--border); }
.pcw-div:hover::after { background: var(--accent); }
.pcw-div.h { flex: 0 0 14px; }
.pcw-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.tl { position: absolute; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 10px; font-weight: 500; white-space: nowrap;
  background: rgba(22,28,46,.9); border: 1px solid var(--border); }
.tl.entry { color: #6FE3B4; border-color: #00A84F; }
.tl.target { color: #F3CB68; border-color: #D49B00; }
.tl.stop { color: #FF9AA2; border-color: #E00000; }
.tl.time { color: #79BDF5; border-color: #0077CC; }
.tl.other { color: #CBA6F7; border-color: #9C4DCC; }
.pcw-table { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.pcw-tbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pcw-tbar .sp { flex-grow: 1; }
.pcw-tscroll { overflow: auto; max-height: 340px; border: 1px solid var(--border); border-radius: 10px; }
.pcw-tscroll table { margin: 0; }
.pcw-tscroll thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; }
.pcw-max { position: fixed; inset: 0; z-index: 80; background: var(--panel); padding: 16px;
  overflow: auto; border-radius: 0; }
.pcw-max .pcw-region { height: calc(100vh - 340px); }
body.pcw-locked { overflow: hidden; }
@media (max-width: 800px) {
  .pcw-region { height: 420px; }
  .pcw-pane.sm { flex: 0 0 84px; }
  .pcw-tscroll { max-height: 260px; }
  .pcw-max .pcw-region { height: 52vh; }
}
.combine { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px;
  border: 1px dashed var(--border); border-radius: 10px; background: var(--ground); }

/* the ticker search sets [hidden]; .chip's display rule outranks the UA
   default, so a filtered chip stayed visible. This makes the filter bite. */
.chip[hidden] { display: none; }
/* 240px showed only ~13 of 36 tickers with no sign the box scrolled */
.chips { max-height: 420px; }

/* temporary logo mark beside the brand name */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.bmark { flex: none; display: block; width: auto; height: 34px; }
:root[data-theme="light"] .bmark { filter: drop-shadow(0 0 1px rgba(8, 40, 70, .45)); }
/* brand (2026-10-07): teal of the logo, re-seated for each theme */
:root { --brand-teal: #2FD9E8; }
:root[data-theme="light"] { --brand-teal: #0B8FA3; }
.brand .bq { color: var(--brand-teal); }
.btag { font-size: 13px; letter-spacing: .02em; color: var(--brand-teal); margin-top: -2px; }
/* header fit: menu items never break onto two lines; tighter spacing and the
   short button label below 1440 px so the theme switch always fits */
.hdr nav.desk a, .hdr .login { white-space: nowrap; }
@media (max-width: 1440px) and (min-width: 801px) {
  .hdr > .wrap { gap: 22px; }
  .hdr nav.desk { gap: 18px; }
  .hdr .btn .long { display: none; }
  .hdr .btn .short { display: inline; }
}
@media (max-width: 1100px) and (min-width: 801px) { .hdr nav.desk { gap: 14px; font-size: 14px; } }
@media (max-width: 1240px) { .theme-sw .tsw-l { display: none; } }
@media (max-width: 1100px) and (min-width: 801px) { .hdr .login { display: none; } .hdr > .wrap { gap: 16px; } .hdr nav.desk { gap: 12px; } }
@media (max-width: 960px) and (min-width: 801px) { .hdr nav.desk { font-size: 13px; gap: 10px; } .brand { font-size: 21px; } }
@media (max-width: 800px) { .hdr .langs { display: none; } .theme-sw button { padding: 6px 8px; } }
@media (max-width: 420px) { .brand { font-size: 18px; } .brand .bmark { height: 26px; } .hdr .btn.sm { padding: 0 10px; } }
/* light-mode banners (2026-10-14): light fill AND dark text together -- tokenising one alone gave pale-on-pale */
:root[data-theme="light"] .banner.ok  { background: #DFF5EF; color: #0B5E4C; }
:root[data-theme="light"] .banner.bad { background: #FBE3E6; color: #8A1C27; }


/* ══════════════════════════════════════════════════════════════════════════
   LIGHT THEME — appended 2026-09-26. Nothing above this line was modified.

   The rules above are the DARK theme and stay the dark theme. This layer only
   overrides tokens when <html data-theme="light"> is set, which site.js does by
   default. Specificity: :root[data-theme="light"] (0,1,1) beats :root (0,0,1).

   Every HUE is preserved from the dark palette; only lightness moves. --accent
   is not touched at all. Text colours move DARKER, not lighter — a light violet
   is unreadable on white, and that is the same colour at the lightness a light
   surface needs.
   ══════════════════════════════════════════════════════════════════════════ */
:root[data-theme="light"] {
  --ground: #F4F6FB;        /* same navy hue as #161C2E, lightness inverted */
  --panel:  #FFFFFF;
  --panel2: #EEF1F8;
  --border: #D7DEEC;
  --grid:   #E4E9F3;
  --ink:    #161C2E;        /* the dark theme's --ground, reused exactly */
  --muted:  #5C6780;

  --accent: #6E5EF0;        /* IDENTICAL to dark. Not touched. */
  --accent-weak: #EDEAFE;
  --accent-txt:  #4C3BD4;   /* same violet, darker so it reads on white */

  --gain:   #0E9E80;        /* same teal   */
  --loss:   #D83A48;        /* same salmon */
  --orange: #B9741A;        /* same amber  */

  --s-bot:  #6152D6;        /* chart series, re-seated on the light --panel */
  --s-qqq:  #A6661A;
  --s-spy:  #2F78A8;
}

/* These three fills are hardcoded literals in the rules above, not tokens, so
   a token override cannot reach them. They would remain dark chips on a light
   page. Overridden by name here; converting them to tokens is a follow-up,
   because that would mean editing existing lines. */
:root[data-theme="light"] { --gain-bg: #DFF5EF; --orange-bg: #FBEEDC; --loss-bg: #FBE3E6; }

/* The switch itself. Small, in the header, opposite the brand. */
.theme-sw {
  display: inline-flex; flex: 0 0 auto; overflow: hidden;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel2);
}
.theme-sw button {
  font: inherit; font-size: 12.5px; line-height: 1; padding: 7px 11px;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  min-height: 32px; white-space: nowrap;
}
.theme-sw button[aria-checked="true"] { background: var(--accent); color: #fff; }
.theme-sw button:focus-visible { outline: 2px solid var(--accent-txt); outline-offset: -2px; }
@media (max-width: 640px) { .theme-sw button { padding: 7px 9px; font-size: 12px; } }


/* ══════════════════════════════════════════════════════════════════════════
   WIZARD DENSITY — appended 2026-09-26. Nothing above this line was modified.

   Two columns and a tighter rhythm, so a step that lists eight mechanisms fits
   a laptop screen. NOT a content change: every description is kept in full,
   because the sentence explaining what a control does is the thing that makes
   it usable by someone who did not write it.
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 720px) {
  .wz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
}
.wz-opts { gap: 8px; }
.wz-opt { padding: 9px 11px; gap: 9px; align-items: flex-start; }
.wz-opt .wz-ot { line-height: 1.35; }
.wz-opt .wz-ot b { font-size: 14px; }
.wz-opt .wz-ot > span { font-size: 12.5px; line-height: 1.45; opacity: .88; }

/* Announced, not built: no fields, can never be switched on. Still readable —
   it is advertising the roadmap — just not at full weight. */
.wz-opt.dis { padding: 7px 11px; }
.wz-opt.dis .wz-ot > span { font-size: 12px; opacity: .72; }

/* The tune block under the options is where the numbers live; it gets the room
   the list gave back. */
.wz-set .fields { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.wz-set h4 { margin: 12px 0 8px; }

/* Keyboard navigation has to be visible or it is a trap. */
.wz-f .btn:focus-visible { outline: 2px solid var(--accent-txt); outline-offset: 2px; }
/* scanner: header room for the sixth menu link */
@media (max-width: 1600px) and (min-width: 1441px) { .hdr > .wrap { gap: 22px; } .hdr nav.desk { gap: 18px; } .hdr .btn .long { display: none; } .hdr .btn .short { display: inline; } }
@media (max-width: 1180px) and (min-width: 1101px) { .hdr .login { display: none; } .hdr > .wrap { gap: 16px; } .hdr nav.desk { gap: 12px; font-size: 14px; } }
@media (max-width: 960px) and (min-width: 881px) { .hdr > .wrap { gap: 12px; } .hdr nav.desk { gap: 8px; } }
@media (max-width: 880px) and (min-width: 801px) { .hdr nav.desk { display: none; } .menu-btn { display: inline-flex; } }
/* chart-ux 2026-10-13: ticker in the chart toolbar, clearer selected trade row */
.pcx-tk { display: inline-flex; align-items: center; font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink); }
.pcx-tk:empty { display: none; }
.pcx-tk select { min-height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--ink); font: inherit; }
tr.trow.on td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); font-weight: 600; }
tr.trow.flash td { animation: trowflash 5s ease-out; }
@keyframes trowflash {
  0%, 30% { background: var(--accent); color: #fff; font-size: 115%; }
  100% { background: var(--accent-weak); font-size: 100%; }
}
/* chart-panes 2026-10-13: resizable / hideable trade table */
.pcw-table[style*="--pcw-th"] .pcw-tscroll { max-height: var(--pcw-th); height: var(--pcw-th); }
.pcw-max.pcw-notable .pcw-region { height: calc(100vh - 130px); }
/* capped showcase 2026-10-13 */
.opt-table tr.hl td { background: var(--accent-weak); }

/* 2026-10-15 no flash: keep the header's place while site.js builds it (72px + 1px border) */
body:not(:has(> .hdr)) { padding-top: 73px; }

/* 2026-10-16 welcome banner */
.welcome { background: var(--accent-weak); border-bottom: 1px solid var(--border); }
.welcome .wrap { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; font-size: 14px; line-height: 1.5; }
.welcome b { color: var(--accent-txt); white-space: nowrap; }
.welcome span { flex: 1; color: var(--ink); }
.welcome-x { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 8px; cursor: pointer; }
.welcome-x:hover { color: var(--ink); }
@media (max-width: 800px) { .welcome .wrap { flex-wrap: wrap; } .welcome b { white-space: normal; flex: 1; } .welcome span { order: 3; flex-basis: 100%; } }

/* ⓘ help (2026-10-16 f) */
.qi { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-inline-start: 5px;
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font: 600 14px/1 var(--sans);
  cursor: help; vertical-align: -2px; flex: none; }
.qi:hover, .qi[aria-expanded="true"] { color: var(--accent-txt); }
.qi:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.qi-pop { position: fixed; z-index: 1000; max-width: min(340px, calc(100vw - 24px)); padding: 10px 12px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18); font: 400 13px/1.55 var(--sans); text-align: start; white-space: normal; }

/* the Hunter (2026-10-17): scan -> backtest */
.sc-huntrow { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; flex-wrap: wrap; }
#bt-hunt { margin: 18px 0 -4px; }
#bt-hunt .banner { display: block; line-height: 1.6; }

/* 1017q: scan mode on the backtest page */
.chip.chip-off { opacity: .4; cursor: not-allowed; }
.chip.chip-off input { cursor: not-allowed; }
.bt-hunt-only { flex-basis: 100%; margin: 8px 0 0; }
.bt-linkbtn { background: none; border: 0; padding: 0; color: var(--accent-txt); text-decoration: underline; cursor: pointer; font: inherit; }

/* 2026-10-17: tracked scans */
#sc-tracked { margin-top: 16px; }
#sc-tracked td.t .btn { margin-inline-end: 6px; }

/* 2026-10-18: My bot (preview) */
.mb-main { display: flex; flex-direction: column; gap: 22px; }
.mb-preview { background: var(--accent-weak); color: var(--accent-txt); font-weight: 500; }
.mb-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.mb-tabs button { background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mb-tabs button.on { background: var(--accent-weak); color: var(--accent-txt); }
.mb-tabs button:hover { color: var(--ink); }
.mb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); vertical-align: middle; }
.mb-body { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.mb-controls .btn { min-width: 150px; }
.mb-danger { color: var(--loss); border-color: var(--loss); }
.mb-danger:hover { background: var(--loss-bg); color: var(--loss); }
.mb-danger-fill { background: var(--loss); }
.mb-danger-fill:hover { background: #b51c2a; }
.mb-confirm { border-color: var(--orange); background: var(--panel2); gap: 10px; }
.mb-tiles.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mb-tiles.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mb-recipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mb-recipe { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.mb-recipe.on { border-color: var(--accent); background: var(--accent-weak); }
.mb-recipe input { margin-top: 4px; accent-color: var(--accent); }
.mb-recipe span { display: flex; flex-direction: column; gap: 4px; }
.mb-h4 { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.mb-unit { gap: 8px; flex-wrap: nowrap; }
.mb-unit input { flex: 1; min-width: 0; }
.mb-list { margin: 0; padding-inline-start: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.mb-log td { vertical-align: top; }
@media (max-width: 1000px) { .mb-tiles.grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .mb-tiles.grid.g4, .mb-tiles.grid.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mb-controls .btn { flex: 1; } }

/* 2026-10-18: My bot (preview) */
.mb-main { display: flex; flex-direction: column; gap: 22px; }
.mb-preview { background: var(--accent-weak); color: var(--accent-txt); font-weight: 500; }
.mb-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.mb-tabs button { background: none; border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mb-tabs button.on { background: var(--accent-weak); color: var(--accent-txt); }
.mb-tabs button:hover { color: var(--ink); }
.mb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); vertical-align: middle; }
.mb-body { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.mb-controls .btn { min-width: 150px; }
.mb-danger { color: var(--loss); border-color: var(--loss); }
.mb-danger:hover { background: var(--loss-bg); color: var(--loss); }
.mb-danger-fill { background: var(--loss); }
.mb-danger-fill:hover { background: #b51c2a; }
.mb-confirm { border-color: var(--orange); background: var(--panel2); gap: 10px; }
.mb-tiles.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mb-tiles.grid.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mb-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mb-choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.mb-choice.on { border-color: var(--accent); background: var(--accent-weak); }
.mb-choice input { margin-top: 4px; accent-color: var(--accent); }
.mb-choice span { display: flex; flex-direction: column; gap: 4px; }
.mb-h4 { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.mb-unit { gap: 8px; flex-wrap: nowrap; }
.mb-unit input { flex: 1; min-width: 0; }
.mb-list { margin: 0; padding-inline-start: 18px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.mb-log td { vertical-align: top; }
.mb-pv { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted); padding: 6px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.mb-pv label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.mb-pv input { accent-color: var(--accent); }
.mb-offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mb-offer { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; }
.mb-offer h3 { margin: 0; font-size: 18px; }
.mb-offer .btn { align-self: flex-start; }
@media (max-width: 1000px) { .mb-tiles.grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .mb-tiles.grid.g4, .mb-tiles.grid.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mb-controls .btn { flex: 1; } }


/* 2026-10-20 public pages + waitlist ─────────────────────────────────────────────── */
/* 2026-10-27 g: the site is open (free account = one Google click): every visitor sees the 'open' texts and the
   Try-free buttons; the private-preview / waitlist variants are retired */
.only-out { display: none !important; }
.wl-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; max-width: 520px; }
.wl-l { color: var(--muted); font-size: 14px; padding: 0; }
.wl-in { height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2);
  color: var(--ink); font-family: var(--sans); font-size: 16px; width: 100%; box-sizing: border-box; }
.wl-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.wl-fs { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wl-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; cursor: pointer; }
.wl-check input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.wl-check a { color: var(--accent-txt); }
.wl-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wl-msg { min-height: 20px; margin: 0; font-size: 14px; color: var(--loss); }
.wl-go { border: 0; font-family: var(--sans); font-size: 16px; cursor: pointer; align-self: flex-start; }
.wl-go[disabled] { opacity: .6; cursor: default; }
.legal .legal-s { scroll-margin-top: 90px; margin-bottom: 18px; }
.legal .legal-s p { max-width: 780px; line-height: 1.7; }

/* 2026-11-04 e cookie bar */
.ckbar { position: fixed; z-index: 70; left: 16px; right: 16px; bottom: 16px; max-width: 680px; margin: 0 auto; display: flex; gap: 14px;
  align-items: center; background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.ckbar p { margin: 0; flex: 1; }
.ckbar .ck-btns { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) { .ckbar { flex-direction: column; align-items: stretch; } .ckbar .ck-btns > * { flex: 1; } }
