/* NexTrader Signals dashboard. Tokens first; light is the base, dark is
   selected from the OS or the theme button (data-theme on <html>). */

:root {
  color-scheme: light;
  --brand: #0092ff;
  --brand-strong: #0072cc;       /* buttons/links on light: 4.9:1 with white */
  --brand-soft: #e6f3ff;
  --tg: #229ed9;
  --tg-strong: #1778a8;         /* 4.8:1 with white */

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9edf2;
  --border: #e3e7ed;
  --grid: #edf0f4;
  --text: #0d1117;
  --text-2: #4a5462;
  --text-3: #6b7685;

  --good: #12813d;
  --good-soft: #e5f5eb;
  --bad: #c9302c;
  --bad-soft: #fdecec;
  --warn: #946200;
  --warn-soft: #fff4d6;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --topbar-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand-strong: #0092ff;
    --brand-soft: #0b2540;
    --tg-strong: #229ed9;
    --bg: #0b0e13;
    --surface: #12161d;
    --surface-2: #181d26;
    --surface-3: #202632;
    --border: #232a36;
    --grid: #1d232e;
    --text: #f3f5f8;
    --text-2: #b4bcc8;
    --text-3: #8791a0;
    --good: #3fcf72;
    --good-soft: #10291a;
    --bad: #ff6b66;
    --bad-soft: #331616;
    --warn: #f0b43c;
    --warn-soft: #30260c;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-strong: #0092ff;
  --brand-soft: #0b2540;
  --tg-strong: #229ed9;
  --bg: #0b0e13;
  --surface: #12161d;
  --surface-2: #181d26;
  --surface-3: #202632;
  --border: #232a36;
  --grid: #1d232e;
  --text: #f3f5f8;
  --text-2: #b4bcc8;
  --text-3: #8791a0;
  --good: #3fcf72;
  --good-soft: #10291a;
  --bad: #ff6b66;
  --bad-soft: #331616;
  --warn: #f0b43c;
  --warn-soft: #30260c;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
}

/* ---- base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;       /* footer sits at the bottom on short pages */
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num, .mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-weight: 500; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-tg { background: var(--tg-strong); color: #fff; }
.btn-tg svg { fill: currentColor; stroke: none; }
.btn-tg:hover { background: var(--tg); box-shadow: 0 6px 18px rgba(34, 158, 217, .3); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-white { background: #fff; color: #0b5c8a; }
.btn-white:hover { background: #eef7ff; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* ---- top bar + tabs ---------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: var(--topbar-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; flex: none; }
.logo { height: 26px; width: auto; display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.brand-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-strong); background: var(--brand-soft); padding: 3px 8px; border-radius: 6px;
}
.tabs { flex: 1; min-width: 0; }
.tabs [role="tablist"] { display: flex; gap: 2px; justify-content: center; }
.tabs [role="tab"] {
  position: relative; height: var(--topbar-h); padding: 0 14px; border: 0; background: none;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-3); cursor: pointer; white-space: nowrap;
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.tabs [role="tab"][aria-selected="true"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(18, 129, 61, .5); animation: pulse 2s infinite; display: inline-block; }
.live-pill.stale .live-dot { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 207, 114, .45); } 70% { box-shadow: 0 0 0 7px rgba(63, 207, 114, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 207, 114, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } * { transition: none !important; } }

/* ---- layout blocks ----------------------------------------------------- */
main.wrap { flex: 1 0 auto; width: 100%; padding-top: 36px; padding-bottom: 56px; }
.footer { flex-shrink: 0; }
.panel { animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); }
.lede { color: var(--text-2); font-size: 16px; margin-top: 8px; max-width: 64ch; }
.link { font-size: 14px; font-weight: 600; }

/* ---- hero -------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 12px 0 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--brand-strong); background: var(--brand-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.hl { color: var(--brand); }
.hero .lede { font-size: 17px; margin-top: 14px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.trust { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 16px; height: 16px; color: var(--good); stroke-width: 2.5; }
.hero-card { padding: 20px; }
.hero-card-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; min-height: 92px; }
.kpi .k { font-size: 12px; font-weight: 600; color: var(--text-3); }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.1; }
.kpi .s { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---- market cards ------------------------------------------------------ */
.markets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.market { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.m-head { display: flex; align-items: center; gap: 12px; }
.m-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; flex: none; letter-spacing: .02em; }
.m-title { min-width: 0; }
.m-name { font-weight: 700; font-size: 16px; }
.m-sub { font-size: 12px; color: var(--text-3); }
.m-price { margin-left: auto; text-align: right; }
.m-price .num { font-size: 16px; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.pill.up { background: var(--good-soft); color: var(--good); }
.pill.down { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.live { background: var(--brand-soft); color: var(--brand-strong); }
.m-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.m-stats > div { padding: 10px 12px; }
.m-stats > div + div { border-left: 1px solid var(--border); }
.m-stats .k { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.m-stats .v { font-size: 16px; font-weight: 600; margin-top: 2px; }
.box { border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.box b { color: var(--text); }
.box b.pos { color: var(--good); }
.box b.neg { color: var(--bad); }
.box-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.meter { height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--good); }
.levels { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; font-size: 13px; align-items: center; }
.levels .lab { color: var(--text-3); font-weight: 600; }
.levels .num { text-align: right; color: var(--text); }
.levels .tick { color: var(--good); font-weight: 700; }
.tp-track { display: flex; gap: 4px; margin-top: 10px; }
.tp-track span { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); }
.tp-track span.on { background: var(--good); }
.m-foot { margin-top: auto; font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; gap: 8px; }

/* ---- overview lower row ------------------------------------------------ */
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 36px; align-items: stretch; }
.latest { list-style: none; margin: 8px 0 0; padding: 0 8px 8px; }
.latest li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; }
.latest li + li { border-top: 1px solid var(--grid); }
.dir { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.dir.buy { background: var(--good-soft); color: var(--good); }
.dir.sell { background: var(--bad-soft); color: var(--bad); }
.latest .t1 { font-weight: 600; font-size: 14px; }
.latest .t2 { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest .res { text-align: right; }
.latest .res .num { font-weight: 600; font-size: 14px; display: block; }
.tg-banner {
  border-radius: var(--radius); padding: 24px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #36b3ff 0%, #0092ff 45%, #0063c4 100%);
  box-shadow: 0 16px 40px rgba(0, 114, 204, .28);
}
.tg-banner::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.tg-badge { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; margin-bottom: 14px; }
.tg-badge svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
.tg-banner h2 { font-size: 20px; color: #fff; }
.tg-banner ul { margin: 14px 0 20px; padding: 0 0 0 18px; font-size: 14px; line-height: 1.7; opacity: .95; }
.tg-banner .small { margin-top: 10px; opacity: .85; }
.tg-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; counter-reset: s; }
.tg-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; font-size: 14px; }
.tg-steps li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.tg-steps span { opacity: .85; font-size: 13px; }
.tg-direct { color: #fff; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.tg-direct:hover { opacity: .9; }

/* ---- join dialog ------------------------------------------------------- */
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover { background: var(--brand); }
dialog.join {
  width: min(480px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.join::backdrop { background: rgba(8, 12, 20, .55); backdrop-filter: blur(3px); }
dialog.join[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.join-close { position: absolute; top: 14px; right: 14px; margin: 0; }
.join-close .icon-btn { border: 0; }
.join-badge { background: var(--tg-strong); }
.join h2 { font-size: 20px; margin-bottom: 6px; }
.join-steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 32px 1fr; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; transition: opacity .15s; }
.step[aria-disabled="true"] { opacity: .55; }
.step.done { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); background: var(--good-soft); }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand-soft); color: var(--brand-strong); }
.step.done .step-dot { background: var(--good); color: #fff; font-size: 0; }
.step.done .step-dot::after { content: "✓"; font-size: 15px; }
.step-body { display: grid; gap: 6px; justify-items: start; }
.step-body .btn { margin-top: 6px; }
#join-telegram[aria-disabled="true"] { pointer-events: none; filter: grayscale(.6); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-top: 4px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--good); }
.tg-banner .btn { position: relative; z-index: 1; }

/* ---- segmented controls ------------------------------------------------ */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-3); flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600;
  height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.seg-full { display: flex; }
.seg-full button { flex: 1; }

/* ---- signals table ----------------------------------------------------- */
.table-card { overflow: hidden; }
.sig-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sig-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.sig-table td { padding: 12px 14px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.sig-table tbody tr:hover td { background: var(--surface-2); }
.sig-table .r { text-align: right; }
.sig-table .c-dir { display: none; font-size: 12px; font-weight: 700; margin-left: 4px; }
.sig-table tr.sk-tr td { padding: 16px 14px; }
/* The pinned line-height keeps every badge one height whatever glyphs land in
   it -- outcome labels carry a "→", which Inter's latin subset does not cover
   and which therefore renders from a fallback font. */
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap; padding: 3px 9px; border-radius: 7px; }
.tag.win { background: var(--good-soft); color: var(--good); }
.tag.loss { background: var(--bad-soft); color: var(--bad); }
.tag.flat { background: var(--surface-3); color: var(--text-2); }
.tag.open { background: var(--brand-soft); color: var(--brand-strong); }
.table-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; }

/* ---- performance ------------------------------------------------------- */
.perf-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.perf-card { padding: 18px; }
.perf-card .m-head { margin-bottom: 14px; }
.perf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.perf-grid .k { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.perf-grid .v { font-size: 17px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-2); padding: 12px 20px 0; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 16px; height: 2px; border-radius: 1px; }
.chart { position: relative; padding: 8px 12px 16px; }
/* The plot carries its own aspect ratio through the viewBox: fixing a height
   here letterboxes it and leaves dead space under the line on a phone. */
.chart svg.plot { display: block; width: 100%; height: auto; stroke: none; fill: none; }
.chart:has(.sk-chart) { min-height: 320px; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 3; min-width: 170px; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13px; opacity: 0; transition: opacity .08s;
}
.chart-tip .t { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.chart-tip .row { display: flex; align-items: center; gap: 8px; }
.chart-tip .row b { font-family: "JetBrains Mono", monospace; font-weight: 600; min-width: 64px; }
.chart-tip .row i { width: 12px; height: 2px; }
.empty { display: grid; place-items: center; text-align: center; gap: 6px; padding: 56px 16px; color: var(--text-3); font-size: 14px; }

/* ---- calculator -------------------------------------------------------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-form { padding: 22px; display: grid; gap: 18px; }
.calc-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.calc-form legend, .calc-form label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.calc-form legend { margin-bottom: 8px; padding: 0; }
.calc-form label { display: grid; gap: 8px; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 600 16px "JetBrains Mono", monospace; padding: 11px 12px; outline: none; }
.affix { padding: 0 12px; color: var(--text-3); font-weight: 600; font-size: 14px; }
.risk-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.small-input { width: 110px; }
.calc-out { padding: 24px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.calc-big { font: 700 44px/1.1 "JetBrains Mono", monospace; letter-spacing: -0.03em; margin: 4px 0 16px; }
.calc-lines { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--border); font-size: 14px; }
.calc-lines dt { color: var(--text-2); }
.calc-lines dd { margin: 0; text-align: right; font-family: "JetBrains Mono", monospace; font-weight: 600; }
.calc-note { margin-top: 16px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* ---- how it works ------------------------------------------------------ */
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { padding: 20px; }
.step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; margin-bottom: 12px; }
.steps p { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.faq { padding: 8px 20px 12px; }
.faq h2 { padding: 14px 0 6px; }
.faq details { border-top: 1px solid var(--grid); }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding: 0 0 14px; max-width: 75ch; }

/* ---- footer + mobile CTA ----------------------------------------------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0 32px; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; }
.footer .logo { height: 20px; margin-bottom: 8px; }
.footer p { margin-top: 6px; }
.mobile-cta { display: none; }

/* ---- skeletons --------------------------------------------------------- */
.sk { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-big { height: 28px; width: 70%; }
.sk-block { height: 64px; margin-top: 12px; }
.sk-row { height: 44px; margin: 8px 4px; list-style: none; }
.sk-chart { height: 300px; }
.sk-card { padding: 18px; min-height: 200px; }
.w40 { width: 40%; } .w60 { width: 60%; }

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 1320px) {
  /* Ornaments go before anything you navigate with. */
  .brand-tag { display: none; }
  .live-pill { display: none; }
  .tabs [role="tab"] { padding: 0 9px; }
}
@media (max-width: 1180px) {
  .topbar-in { gap: 12px; }
  .topbar-actions .btn-tg span { display: none; }
  .topbar-actions .btn-tg { width: 40px; padding: 0; }
}
@media (max-width: 1120px) {
  :root { --topbar-h: 58px; }
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 0 12px; }
  .brand { margin-right: auto; height: 38px; }
  .tabs { order: 3; flex: 0 0 100%; margin: 6px -20px 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs [role="tablist"] { justify-content: flex-start; padding: 0 12px; }
  .tabs [role="tab"] { height: 44px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .markets, .perf-cards { grid-template-columns: minmax(0, 1fr); }
  .split, .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-out { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 24px; padding-bottom: 104px; }
  .tabs { margin: 6px -16px 0; }
  .topbar-actions .btn-tg span { display: none; }
  .topbar-actions .btn-tg { width: 40px; padding: 0; }
  .logo { height: 22px; }
  .brand-tag { display: none; }
  .hero .lede { font-size: 15px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .kpi .v { font-size: 22px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
  .calc-big { font-size: 36px; }
  .page-head .seg { width: 100%; }
  .page-head .seg button { flex: 1; }

  /* Table rows become cards on phones. */
  .sig-table thead { display: none; }
  .sig-table, .sig-table tbody, .sig-table tr, .sig-table td { display: block; width: 100%; }
  .sig-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--grid); }
  .sig-table tbody tr:hover td { background: none; }
  .sig-table td { padding: 0; border: 0; white-space: normal; }
  .sig-table td.c-when { grid-column: 1; font-size: 12px; color: var(--text-3); }
  .sig-table td.c-market { grid-column: 1; font-weight: 700; }
  .sig-table td.c-side { display: none; }
  .sig-table .c-dir { display: inline; }
  .sig-table td.c-setup { grid-column: 1; font-size: 13px; color: var(--text-2); }
  .sig-table td.c-entry, .sig-table td.c-stop { grid-column: 1; font-size: 12px; color: var(--text-3); text-align: left; }
  .sig-table td.c-entry::before { content: "Entry "; }
  .sig-table td.c-stop::before { content: "Stop "; }
  .sig-table td.c-result { grid-column: 2; grid-row: 1 / span 2; text-align: right; align-self: start; }
  .sig-table td.c-pips { grid-column: 2; grid-row: 3; text-align: right; font-size: 16px; font-weight: 600; }
  .sig-table td.c-r { grid-column: 2; grid-row: 4; text-align: right; font-size: 12px; color: var(--text-3); }
  .sig-table td.c-r::after { content: "R"; }

  .mobile-cta {
    display: flex; gap: 8px; align-items: center; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 40; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .mobile-cta .btn { flex: 1; height: 44px; }
  .mobile-cta .icon-btn { border: 0; }
}

/* ---- VIP tab and unlock page ------------------------------------------- */
.vip-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmp td { padding: 12px 16px; border-bottom: 1px solid var(--grid); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp .c { text-align: center; }
.cmp .vipcol { background: color-mix(in srgb, var(--brand) 7%, transparent); font-weight: 600; }
.cmp th.vipcol { color: var(--brand-strong); }
.vip-banner .tg-steps li::before { background: rgba(255, 255, 255, .22); }
.vip-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.vip-actions .btn-ghost { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
.vip-actions .btn-ghost:hover { background: rgba(255, 255, 255, .2); }

main .unlock { max-width: 560px; margin: 8vh auto 40px; padding: 32px; text-align: center; }
.unlock .tg-badge { margin: 0 auto 16px; background: var(--tg-strong); }
.unlock h1 { font-size: 26px; }
.unlock .lede { margin: 10px auto 22px; }
.unlock-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.unlock .copy-card { margin-top: 0; text-align: left; }
.unlock .copy-card + .small { margin-top: 14px; }
.unlock-ok { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.unlock-error .tg-badge { background: var(--bad); }
.unlock .small { margin-top: 16px; }
@media (max-width: 960px) { .vip-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- VIP-first hero ---------------------------------------------------- */
.vip-card { position: relative; padding: 24px; }
.vip-card .crown {
  position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: var(--brand-strong); background: var(--brand-soft); padding: 4px 9px; border-radius: 7px;
}
.vip-card h2 { font-size: 19px; margin-bottom: 16px; }
.steps-mini { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; counter-reset: v; }
.steps-mini li { counter-increment: v; display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; font-size: 14px; }
.steps-mini li::before {
  content: counter(v); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-strong); display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.steps-mini span { color: var(--text-3); font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.center { text-align: center; }
.kpis-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis-row .kpi { background: var(--surface); padding: 16px 18px; }
@media (max-width: 960px) { .kpis-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- VIP unlock dialog -------------------------------------------------- */
.vipdlg { text-align: center; }
.vipdlg .crown { position: static; display: inline-block; margin-bottom: 10px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--brand-strong); background: var(--brand-soft); padding: 4px 10px; border-radius: 7px; }
.vipdlg h2 { font-size: 22px; margin-bottom: 8px; }
.vipdlg .muted { margin-bottom: 20px; }
.vipdlg-actions { display: grid; gap: 10px; margin-bottom: 14px; }
.btn-deriv { background: #323a46; color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.btn-deriv:hover { background: #3d4654; }
.btn-deriv b { color: #ff444f; font-style: italic; font-weight: 800; text-transform: lowercase; letter-spacing: 0; }
.btn-create { background: #ff444f; color: #fff; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.btn-create:hover { background: #ec3039; }

/* Gold crown on every VIP button (an SVG with its own gradient). */
.crown-ico { width: 20px; height: 17px; flex: none; filter: drop-shadow(0 1px 1px rgba(120, 75, 0, .35)); }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 6px; }
.tabs [role="tab"] .crown-ico { width: 15px; height: 15px; }

/* ---- "join our team" walkthrough ---------------------------------------- */
main .unlock.wide { max-width: 680px; text-align: left; }
.tg-intro h1 { font-size: 24px; margin-bottom: 8px; }
.tg-intro .lede { font-size: 15px; margin: 0 0 20px; }
.tg-stage { position: relative; overflow: hidden; border-radius: 14px; background: var(--surface-2); padding: 18px; }
.tg-step { display: grid; gap: 14px; }
.tg-step-head { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; }
.tg-n { width: 38px; height: 38px; border-radius: 50%; background: #ff444f; color: #fff; display: grid; place-items: center; font-weight: 800; }
.tg-step h3 { font-size: 17px; }
.tg-shot { width: auto; max-width: 100%; max-height: min(38vh, 300px); margin: 0 auto; display: block; border-radius: 12px; border: 1px solid var(--border); background: #fff; object-fit: contain; }
.in-right { animation: slide-in-right .28s cubic-bezier(.22, .8, .3, 1); }
.in-left { animation: slide-in-left .28s cubic-bezier(.22, .8, .3, 1); }
@keyframes slide-in-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

.tg-dots { display: flex; gap: 8px; justify-content: center; margin: 16px 0 4px; }
.tg-dot { width: 28px; height: 6px; border: 0; border-radius: 3px; background: var(--surface-3); cursor: pointer; padding: 0; transition: background .2s, width .2s; }
.tg-dot.on { background: var(--brand); width: 40px; }
.tg-nav { display: flex; gap: 10px; justify-content: space-between; margin: 14px 0 10px; }
.tg-nav .btn { flex: 1; height: 46px; }
.btn-done { background: var(--good); }
.btn-done:hover { background: var(--good); filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .in-right, .in-left { animation: none; } }

/* ---- VIP states: loading, success, perks, copy block -------------------- */
.unlock { text-align: center; }
.unlock .lede.center { margin-inline: auto; }
.center-self { display: inline-flex; margin: 0 auto 10px; }

.spinner { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.spinner span { width: 11px; height: 11px; border-radius: 50%; background: var(--brand); animation: bob 1s ease-in-out infinite; }
.spinner span:nth-child(2) { animation-delay: .15s; background: #f7c948; }
.spinner span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-9px); opacity: 1; } }
.load-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin: 22px auto 0; max-width: 260px; }
.load-bar span { display: block; height: 100%; width: 40%; border-radius: 2px; background: linear-gradient(90deg, var(--brand), #f7c948); animation: sweep 1.3s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* Named for its siblings below, not just "win": the signals table also has a
   .tag.win, and a bare .win here sized every winning badge to 96x96. */
.win-medal { position: relative; width: 96px; height: 96px; margin: 0 auto 18px; }
.win-ring {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #fff6d9, #ffe9ae 45%, #f2c85c 100%);
  box-shadow: 0 10px 28px rgba(224, 165, 42, .45), inset 0 -3px 10px rgba(168, 108, 15, .25);
  animation: pop-in .45s cubic-bezier(.2, 1.3, .4, 1);
}
.win-ring img { width: 46px; height: 39px; }
.win-check {
  position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--good); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800;
  border: 3px solid var(--surface); animation: pop-in .4s .2s backwards cubic-bezier(.2, 1.3, .4, 1);
}
@keyframes pop-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
.state-ico { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.state-ico.bad { background: var(--bad-soft); color: var(--bad); }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; margin: 16px auto 0; padding: 7px 14px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: 13px; font-weight: 600; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.btn.glow { box-shadow: 0 8px 24px rgba(34, 158, 217, .35); }
.tg-badge-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a5760c; background: linear-gradient(180deg, #fff3cf, #ffe6a3); padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }

.perks { text-align: left; }
.perks-head { text-align: center; margin-bottom: 16px; }
.perks-crown { display: block; margin: 0 auto 10px; }
.perk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perk-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; animation: rise .35s backwards; animation-delay: calc(var(--i) * 60ms); }
.perk-list b { display: block; font-size: 14px; }
.perk-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tg-nav.single .btn { flex: 1; }
.btn-start { background: linear-gradient(180deg, #f7c948, #e0a52a); color: #3a2a00; }
.btn-start:hover { filter: brightness(1.05); }

.copy-card { border: 2px solid var(--brand); border-radius: 14px; background: var(--surface); padding: 14px; display: grid; gap: 10px; box-shadow: 0 6px 20px rgba(0, 146, 255, .14); }
.copy-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-strong); }
.copy-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 2s infinite; }
.copy-card .copy-text { display: block; background: var(--surface-2); border-radius: 10px; padding: 12px; font-family: "JetBrains Mono", monospace; font-size: 13px; line-height: 1.5; word-break: break-all; color: var(--text); text-align: left; user-select: all; }
.copy-btn { background: var(--brand-strong); color: #fff; height: 46px; font-size: 15px; }
.copy-btn:hover { background: var(--brand); }
.copy-btn.copied { background: var(--good); }
.copy-btn svg { width: 17px; height: 17px; }
@media (prefers-reduced-motion: reduce) { .spinner span, .load-bar span, .win-ring, .win-check, .perk-list li, .copy-dot { animation: none; } }

/* Step instructions: readable, with the thing to click highlighted. */
.tg-text { font-size: 15px; line-height: 1.6; color: var(--text-2); margin-top: 4px; }
.tg-text mark.kw {
  background: linear-gradient(180deg, #fff3cf, #ffe29a); color: #7a5600; border-radius: 6px;
  padding: 1px 7px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(224, 165, 42, .5); white-space: nowrap;
}
:root[data-theme="dark"] .tg-text mark.kw { background: linear-gradient(180deg, #4a3a10, #3a2c0a); color: #ffdf8e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tg-text mark.kw { background: linear-gradient(180deg, #4a3a10, #3a2c0a); color: #ffdf8e; }
}
.tg-step h3 { font-size: 18px; }
.tg-text a.kw-link {
  display: inline-flex; align-items: center; gap: 4px; text-decoration: none;
  background: linear-gradient(180deg, #e8f4ff, #cfe8ff); color: #0b4d80; box-shadow: inset 0 0 0 1px rgba(0, 114, 204, .45);
}
.tg-text a.kw-link::after { content: "↗"; font-size: 11px; opacity: .8; }
.tg-text a.kw-link:hover { filter: brightness(1.04); text-decoration: none; }
:root[data-theme="dark"] .tg-text a.kw-link { background: linear-gradient(180deg, #0f3350, #0b2540); color: #9ed3ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tg-text a.kw-link { background: linear-gradient(180deg, #0f3350, #0b2540); color: #9ed3ff; }
}

/* ---- example account growth -------------------------------------------- */
.growth { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; padding: 24px; margin-top: 24px; align-items: center; }
.growth h2 { font-size: 20px; margin-bottom: 6px; }
.growth-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 16px 0 0; font-size: 14px; }
.growth-lines dt { color: var(--text-2); }
.growth-lines dd { margin: 0; text-align: right; font-weight: 600; }
.growth-figure { text-align: center; background: var(--surface-2); border-radius: 14px; padding: 22px 18px; }
.growth-big { font-size: clamp(34px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.growth-sub { font-size: 14px; color: var(--text-2); margin: 6px 0 16px; }
.growth-figure .btn { width: 100%; }
@media (max-width: 960px) { .growth { grid-template-columns: minmax(0, 1fr); } }
.calc-big.over-risk { color: var(--warn); }

/* Backtest and live figures, side by side and never blended. */
.growth-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.growth-figures .btn { grid-column: 1 / -1; width: 100%; }
.growth-figure { background: var(--surface-2); border-radius: 14px; padding: 18px 14px; text-align: center; }
.growth-figure.live { background: var(--surface); border: 1px solid var(--border); }
.fig-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.growth-figure .growth-big { font-size: clamp(26px, 3.4vw, 34px); }
.growth-figure .growth-sub { font-size: 12px; margin-bottom: 0; }
@media (max-width: 640px) { .growth-figures { grid-template-columns: 1fr; } }

/* Account growth card on the performance tab. */
.growth-figures.single { grid-template-columns: 1fr; }
.acct-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.acct-stat .k { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.acct-stat .v { font-size: 20px; font-weight: 700; }
@media (max-width: 640px) { .acct-stats { gap: 14px; } .acct-stat .v { font-size: 17px; } }

/* What members get, under the hero. */
.perks-strip { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.perks-strip li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.perks-strip b { display: block; font-size: 14px; margin-bottom: 2px; }
.perks-strip .perk-ico { width: 40px; height: 40px; border-radius: 12px; }
@media (max-width: 960px) { .perks-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .perks-strip { grid-template-columns: minmax(0, 1fr); } }

/* Demo mode: a replayed week instead of the live record. Loud on purpose. */
.demo-banner { position: sticky; top: 0; z-index: 60; background: #b45309; color: #fff; text-align: center; padding: 10px 16px; font-size: 13px; line-height: 1.5; }
.demo-banner code { background: rgba(255, 255, 255, .22); border-radius: 5px; padding: 1px 5px; }
body.is-demo .topbar { top: 0; }

/* A replayed month standing in until real results exist. Quiet, but never
   invisible: the reader has to be able to tell it is not the live record. */
.sim-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.sim-note::before { content: ""; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: #d97706; flex: none; }
/* Inside a card it lines up with the heading above it and clears the chart below. */
.card > .sim-note { padding: 14px 20px 0; }
.card > .sim-note + .legend { padding-top: 10px; }
.card > .sim-note + .chart { padding-top: 14px; }
.tag.sim { background: #fef3c7; color: #92400e; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 999px; margin-left: 7px; white-space: nowrap; vertical-align: 1px; }
:root[data-theme="dark"] .tag.sim { background: rgba(252, 211, 77, .16); color: #fcd34d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.sim { background: rgba(252, 211, 77, .16); color: #fcd34d; } }

/* Replayed rows in the history table: readable, and never mistakable for the
   real record above them. */
.sig-divider td { padding: 12px 10px; background: var(--surface-2, rgba(127, 127, 127, .06)); color: var(--muted); font-size: 12.5px; }
tr.is-sim .c-when, tr.is-sim .c-market, tr.is-sim .c-setup { opacity: .85; }
.c-setup .tag.sim { margin-left: 6px; }

/* --- phones: every block gets its own line and its own room --------------- */
@media (max-width: 720px) {
  /* A card heading and its figures stack rather than fight for the row. */
  .card-head { flex-direction: column; gap: 10px; }
  .acct-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; width: 100%; }
  .acct-stat .k { font-size: 11px; }
  .chart { padding: 4px 6px 12px; }
  .legend { padding: 10px 16px 0; gap: 6px 14px; font-size: 12px; }
  .card > .sim-note { padding: 12px 16px 0; font-size: 12px; }
  .sim-block { padding: 14px; }
  .perf-grid { gap: 10px 12px; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
}
@media (max-width: 420px) {
  .acct-stat .v { font-size: 16px; }
  .kpi { min-height: 78px; padding: 12px; }
  .kpi .v { font-size: 20px; }
}

/* The hover card must stay inside the screen on a phone. */
@media (max-width: 720px) {
  .chart-tip { min-width: 0; max-width: calc(100vw - 48px); font-size: 12px; }
  .small-input { width: 92px; }
  .tg-banner::after { display: none; }
}
/* Nothing scrolls sideways: long words and numbers wrap instead. */
@media (max-width: 720px) {
  .card, .sim-block, .kpi, .perf-card { min-width: 0; }
  .latest li, .m-title, .acct-stat { min-width: 0; }
  .m-name, .t1 { overflow-wrap: anywhere; }
}

/* --- the join-the-team steps, sized to the screen they are read on -------- */
.tg-stage { padding: 14px; }
.tg-step { gap: 10px; }
.tg-step-head { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
.tg-dots { margin: 12px 0 2px; }
.tg-nav { margin: 12px 0 8px; }
.tg-nav .btn { height: 44px; }
.copy-card { padding: 12px; gap: 8px; }
.copy-card .copy-text { padding: 10px; font-size: 12.5px; }
.copy-btn { height: 42px; }

/* Short laptop screens: trim everything that is only there to look roomy. */
@media (max-height: 860px) {
  main .unlock.wide { padding-top: 18px; padding-bottom: 18px; }
  .unlock h1 { font-size: 22px; }
  .unlock .lede { font-size: 14px; margin-top: 6px; }
  .tg-shot { max-height: min(30vh, 240px); }
  .tg-stage { padding: 12px; }
  .tg-step h3 { font-size: 15px; }
  .tg-text { font-size: 14px; line-height: 1.5; }
}
@media (max-width: 560px) {
  .tg-step-head { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .tg-step h3 { font-size: 15px; }
  .tg-text { font-size: 14px; }
  .tg-shot { max-height: 34vh; }
  .tg-nav { gap: 8px; }
  .tg-nav .btn { font-size: 14px; padding: 0 10px; }
  .copy-card .copy-text { font-size: 11.5px; word-break: break-all; }
}

/* --- language picker and right-to-left ----------------------------------- */
.lang-pick { position: relative; display: inline-flex; }
.lang-btn, .lang-menu button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 9px; background: none; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.lang-btn { border-color: var(--border); background: var(--surface); }
.lang-btn:hover, .lang-menu button:hover { border-color: var(--text-3); }
.lang-flag { width: 20px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; margin: 0; padding: 5px; list-style: none;
  min-width: 156px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface);
  box-shadow: 0 12px 28px rgba(16, 24, 40, .16);
}
.lang-menu li { display: block; }
.lang-menu button { width: 100%; justify-content: flex-start; }
.lang-menu [aria-selected="true"] { background: var(--surface-2); }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
/* On a phone the flag alone identifies it; the name would push the bar over. */
@media (max-width: 560px) { .lang-btn > span { display: none; } .lang-btn { padding: 0 8px; } }

/* Urdu reads right to left: mirror the layout, but never the numbers, the
   charts or anything price-shaped. */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .num, [dir="rtl"] .plot, [dir="rtl"] .chart, [dir="rtl"] code, [dir="rtl"] .copy-text { direction: ltr; }
[dir="rtl"] .sig-table th, [dir="rtl"] .sig-table td { text-align: right; }
[dir="rtl"] .sig-table td.c-pips, [dir="rtl"] .sig-table td.c-r, [dir="rtl"] .sig-table td.c-entry, [dir="rtl"] .sig-table td.c-stop { text-align: left; }
[dir="rtl"] .tg-steps li, [dir="rtl"] .tg-step-head, [dir="rtl"] .perks-strip li { direction: rtl; }
[dir="rtl"] .m-head, [dir="rtl"] .card-head, [dir="rtl"] .section-head { flex-direction: row-reverse; }
[dir="rtl"] .acct-stats { justify-content: flex-start; }
[dir="rtl"] .sim-note::before { margin: 6px 0 0 8px; }

/* Shown to a visitor whose account has already been verified in this browser. */
.vip-ready { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; background: var(--tg-strong, #0b84c9); color: #fff; font-size: 14px; }
.vip-ready .btn { height: 34px; background: #fff; color: var(--tg-strong, #0b84c9); }
.vip-ready .btn:hover { background: #f1f5f9; }
@media (max-width: 560px) { .vip-ready { font-size: 13px; padding: 9px 12px; } }
