/* 4ward-Trader — dark & sleek. Night ground from the 4ward palette, glowing gain/loss colours,
   Bricolage Grotesque throughout. */
:root {
  --bg: #070B18; --surface: #0F1530; --surface-2: #151C3D; --line: rgba(255,255,255,.08);
  --text: #EEF1FA; --muted: #8C93AD; --dim: #5D6482;
  --accent: #7C9CFF; --accent-2: #B07CFF; --gain: #2FE6A7; --loss: #FF5C7A; --gold: #FFC857;
  --radius: 18px; --tab-h: 68px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; overflow-x: hidden; }
body {
  font: 14px/1.45 "Bricolage Grotesque", system-ui, sans-serif; color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(124,156,255,.14), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(176,124,255,.10), transparent 60%), var(--bg);
  background-attachment: fixed; min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num, .money { font-variant-numeric: tabular-nums; }
.gain { color: var(--gain); } .loss { color: var(--loss); } .muted { color: var(--muted); } .small { font-size: 12px; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout: side rail on computers, tab bar on phones ---------- */
.shell { display: flex; min-height: 100vh; }
.rail { width: 252px; flex: none; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: rgba(7,11,24,.6); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 4px 26px; white-space: nowrap; }
.brand .mark { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #0B1030;
  background: linear-gradient(160deg, #FFD666, #D69622); box-shadow: 0 0 22px rgba(255,200,87,.45), inset 0 1px 0 rgba(255,255,255,.5); }
.brand .word { font-size: 22px; font-weight: 700; letter-spacing: -.01em;
  background: linear-gradient(90deg, #FFE08A, #FFC857 55%, #E3A63A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; transition: .2s; }
.rail a:hover { color: var(--text); background: var(--surface); }
.rail a.on { color: var(--text); background: linear-gradient(90deg, rgba(124,156,255,.22), rgba(124,156,255,.04)); box-shadow: inset 2px 0 0 var(--accent); }
.rail .signout { margin-top: auto; }
.rail .signout button { width: 100%; display: flex; align-items: center; gap: 12px; background: none; border: 0; color: var(--dim); padding: 11px 12px; cursor: pointer; font-weight: 600; }
.page { flex: 1; min-width: 0; padding: 26px 34px 60px; max-width: 1120px; margin: 0 auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.top h1 { font-size: 24px; margin: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--gold);
  background: rgba(255,200,87,.1); border: 1px solid rgba(255,200,87,.25); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tabbar { display: none; }
.mobile-brand { display: none !important; }

/* ---------- Surfaces ---------- */
.card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.card h2 { font-size: 13px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 16px; } .grid2 > .card { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 26px 26px 0; }
.hero .label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero .big { font-size: 46px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 4px; line-height: 1.05; text-shadow: 0 0 30px rgba(124,156,255,.25); }
.hero .change { font-size: 15px; font-weight: 600; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .chart { margin: 18px -26px 0; height: 170px; }
.hero .chart svg { width: 100%; height: 100%; display: block; }
.hero .empty-chart { height: 110px; display: grid; place-items: center; color: var(--dim); border-top: 1px dashed var(--line); margin: 18px -26px 0; }
.tick { transition: color .4s; } .tick.flash-up { color: var(--gain); } .tick.flash-down { color: var(--loss); }

/* ---------- Platforms ---------- */
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.plat { border-radius: 16px; padding: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plat.live-on { border-color: rgba(47,230,167,.35); background: linear-gradient(160deg, rgba(47,230,167,.10), var(--surface) 60%); }
.plat .row1 { display: flex; justify-content: space-between; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; }
.plat b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.plat .what { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plat .val { font-size: 20px; font-weight: 700; }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.on { color: var(--gain); background: rgba(47,230,167,.12); } .chip.off { color: var(--dim); background: rgba(255,255,255,.05); }
.chip.warn { color: var(--gold); background: rgba(255,200,87,.12); } .chip.bad { color: var(--loss); background: rgba(255,92,122,.12); }
.plat .short { display: none; }
.plat.off { opacity: .75; } .plat.off .val { color: var(--dim); font-size: 13px; font-weight: 600; }

/* ---------- Level & achievements ---------- */
.level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.level-head .lv { font-size: 28px; font-weight: 700; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; margin: 10px 0 8px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px rgba(124,156,255,.6); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.race { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.race div { background: rgba(255,255,255,.03); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.race span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .race b { font-size: 16px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 14px 8px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.badge .ic { width: 42px; height: 42px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--dim); }
.badge.got .ic { background: radial-gradient(circle, rgba(255,200,87,.35), rgba(255,200,87,.08)); color: var(--gold); box-shadow: 0 0 18px rgba(255,200,87,.35); }
.badge b { display: block; font-size: 13px; white-space: nowrap; } .badge span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.badge:not(.got) b { color: var(--muted); }

/* ---------- Story ---------- */
.story p { margin: 0 0 8px; font-size: 15px; display: flex; gap: 10px; } .story p::before { content: "•"; color: var(--accent); }
.story .when { font-size: 12px; color: var(--dim); margin-top: 6px; }

/* ---------- Holdings ---------- */
.hold { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.hold:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 11px; background: linear-gradient(135deg, rgba(124,156,255,.25), rgba(176,124,255,.2)); }
.hold .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hold .sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hold .right { text-align: right; } .hold .right b { display: block; }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 11px 18px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .2s; }
.btn:hover { border-color: rgba(255,255,255,.2); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border: 0; color: #0B1030; }
.btn.stop { background: rgba(255,92,122,.14); border-color: rgba(255,92,122,.4); color: var(--loss); width: 100%; padding: 14px; font-size: 15px; }
.btn.go { background: rgba(47,230,167,.14); border-color: rgba(47,230,167,.4); color: var(--gain); width: 100%; padding: 14px; font-size: 15px; }
.controls form { margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input { border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; background: rgba(255,255,255,.04); min-width: 0; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,156,255,.2); }
.flash { background: rgba(124,156,255,.12); border: 1px solid rgba(124,156,255,.3); border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.banner { border-radius: 14px; padding: 13px 16px; margin-bottom: 16px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.banner.stop { background: rgba(255,92,122,.12); color: var(--loss); border: 1px solid rgba(255,92,122,.3); }
.banner.warn { background: rgba(255,200,87,.1); color: var(--gold); border: 1px solid rgba(255,200,87,.3); }

/* ---------- Activity timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.event { position: relative; margin-bottom: 16px; }
.event::before { content: ""; position: absolute; left: -24px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.event.preview::before { background: var(--dim); box-shadow: none; }
.event .card { margin: 0; }
.event-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.event-head b { font-size: 16px; }
.trades { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.trade { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 9px; white-space: nowrap; }
.trade.buy { background: rgba(47,230,167,.12); color: var(--gain); } .trade.sell { background: rgba(255,92,122,.12); color: var(--loss); }
details summary { cursor: pointer; color: var(--accent); font-weight: 700; margin-top: 8px; font-size: 13px; }
details table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
details td { padding: 6px 4px; border-bottom: 1px solid var(--line); color: var(--muted); } details td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ---------- Lab ---------- */
.lab-head { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .stat b { font-size: 22px; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.method { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.method.pass { border-color: rgba(47,230,167,.4); }
.method .mh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.method .mh b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.method .figs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; }
.method .figs span { color: var(--muted); white-space: nowrap; } .method .figs b { text-align: right; }
.meter { margin: 10px 0 0; } .meter span { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter .bar { height: 7px; margin: 5px 0 0; }
.meter .bar i.skill { background: linear-gradient(90deg, var(--loss), var(--gold), var(--gain)); box-shadow: none; }
.method .why { font-size: 12px; color: var(--muted); margin-top: 8px; }
.bench { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* ---------- Sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-card h1 { font-size: 24px; margin: 0; }
.login-card .brand { margin: 0; }

/* ---------- Phone ---------- */
@media (max-width: 820px) {
  .rail { display: none; }
  .mobile-brand { display: flex !important; margin: 0 0 18px; }
  .page { padding: 18px 16px calc(var(--tab-h) + 28px); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(10,14,32,.92); backdrop-filter: blur(16px); border-top: 1px solid var(--line); z-index: 10; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--dim); }
  .tabbar a.on { color: var(--text); } .tabbar a.on svg { stroke: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
  .grid2 { grid-template-columns: 1fr; }
  .hero { padding: 20px 18px 0; } .hero .big { font-size: 36px; } .hero .chart, .hero .empty-chart { margin: 14px -18px 0; height: 130px; }
  .plat .long { display: none; } .plat .short { display: inline; }
  .hero .empty-chart { height: 70px; }
  .platforms { grid-template-columns: 1fr 1fr; gap: 10px; } .plat { padding: 13px; } .plat .val { font-size: 16px; }
  .card { padding: 16px; border-radius: 16px; }
  .badges { grid-template-columns: repeat(4, 1fr); gap: 8px; } .badge { padding: 10px 4px; } .badge .ic { width: 36px; height: 36px; } .badge span { display: none; } .badge b { font-size: 11px; }
  .top h1 { font-size: 22px; }
  .login-card .brand .mark { width: 42px; height: 42px; font-size: 27px; }
}

/* ---------- Controls bar & holdings table ---------- */
.controlbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; }
.controlbar form { margin: 0; display: flex; gap: 8px; align-items: center; }
.controlbar .btn.stop, .controlbar .btn.go { width: auto; padding: 11px 18px; font-size: 14px; }
.controlbar .withdraw input { width: 210px; }
.controlbar .next { margin-left: auto; white-space: nowrap; }
.htable { width: 100%; border-collapse: collapse; }
.htable th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; }
.htable td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.htable td:first-child { display: flex; align-items: center; gap: 10px; }
.htable tr.extra { display: none; }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.btn.small { padding: 8px 14px; font-size: 13px; margin-top: 12px; }
.holdings-card { overflow-x: auto; }
@media (max-width: 820px) {
  .hide-phone { display: none; }
  .controlbar { gap: 8px; } .controlbar form { flex: 1 1 100%; } .controlbar .withdraw input { flex: 1; width: auto; }
  .controlbar .btn.stop, .controlbar .btn.go { width: 100%; }
  .controlbar .next { margin-left: 0; }
  .htable th, .htable td { padding: 8px 6px; }
}

/* ---------- Logo: the 4ward layout in gold, descriptor "TRADER" ---------- */
.brand.logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0 8px 28px; line-height: 1; }
.lg-top { display: flex; align-items: baseline; font-weight: 700; letter-spacing: -.035em; }
.lg-4 { font-size: 54px; line-height: .9; background: linear-gradient(170deg, #FFE08A 10%, #FFC857 45%, #C98A1E 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255,200,87,.35)); }
.lg-ward { font-size: 40px; color: #F6EBD0; margin-left: 1px; }
.lg-sub { font-size: 12px; font-weight: 600; letter-spacing: .34em; color: #E3B04B; margin-left: 46px; padding-left: 2px; }
.login-card .brand.logo { margin: 0 0 4px; }
@media (max-width: 820px) {
  .mobile-brand.logo { margin: 0 0 18px; }
  .lg-4 { font-size: 42px; } .lg-ward { font-size: 31px; } .lg-sub { font-size: 10px; margin-left: 36px; }
}

/* ---------- Activity grouped by month and day ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg a { padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(124,156,255,.35); }
.month { margin-bottom: 26px; }
.month-h { font-size: 18px; margin: 0 0 12px; }
.day { margin-bottom: 14px; }
.day-h { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 8px 4px; }
.runs { padding: 4px 18px; }
.run { padding: 14px 0; border-bottom: 1px solid var(--line); }
.run:last-child { border-bottom: 0; }
.run-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-head .clock { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; width: 44px; }
.run-head b { font-size: 15px; }
.run-val { margin-left: auto; }
.run .trades { margin: 8px 0 0 54px; }
.run details, .run > .muted { margin-left: 54px; }
.trade.more { background: rgba(255,255,255,.06); color: var(--muted); }
.small-banner { margin: 8px 0 0 54px; padding: 8px 12px; font-size: 13px; }
@media (max-width: 820px) {
  .runs { padding: 2px 14px; }
  .run .trades, .run details, .run > .muted, .small-banner { margin-left: 0; }
  .top { flex-wrap: wrap; }
}

/* ---------- Ticker tape ---------- */
.tape { overflow: hidden; margin: -10px -34px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-track { display: inline-flex; gap: 34px; padding: 10px 0; white-space: nowrap; animation: tape 40s linear infinite; }
.tape-item { display: inline-flex; gap: 8px; font-size: 13px; } .tape-item b { color: var(--muted); font-weight: 600; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero grid, KPIs, donut ---------- */
.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; margin-bottom: 16px; }
.hero-grid > .card { margin-bottom: 0; }
.hero { padding-bottom: 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.kpis div { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.kpis span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.kpis b { font-size: 16px; white-space: nowrap; }
.split-body { display: flex; align-items: center; gap: 18px; }
.donut-wrap { position: relative; width: 150px; flex: none; }
.donut { width: 150px; height: 150px; filter: drop-shadow(0 0 12px rgba(124,156,255,.25)); }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-mid b { font-size: 22px; } .donut-mid span { font-size: 11px; color: var(--muted); }
.legend-list { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.legend-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.legend-list li:last-child { border-bottom: 0; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-list span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Add-platform row, markets, compact tables ---------- */
.add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.add-chip { font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px; border: 1px dashed rgba(255,255,255,.18); color: var(--muted); white-space: nowrap; }
.markets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mkt { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.mkt-top { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.mkt-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { width: 100%; height: 34px; display: block; margin-top: 6px; }
.htable.compact td { padding: 7px 8px; }
@media (max-width: 820px) {
  .tape { margin: -6px -16px 14px; }
  .hero-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .markets { grid-template-columns: 1fr 1fr; }
  .split-body { gap: 12px; } .donut-wrap, .donut { width: 120px; height: 120px; }
}

/* Market tiles: name on its own line so it never gets cut; badges in even rows of four. */
.mkt-top { flex-direction: column; gap: 2px; }
.mkt-top b { overflow: visible; text-overflow: clip; font-size: 12px; }
.mkt-top span { font-size: 12px; font-weight: 700; }
.badges { grid-template-columns: repeat(4, 1fr); }

/* Logo centred (side bar, phone header and sign-in card). */
.brand.logo { align-self: center; align-items: center; margin-left: auto; margin-right: auto; }
.lg-sub { margin-left: 0; padding-left: .34em; text-align: center; }
.mobile-brand.logo { display: flex; width: max-content; }
.login-card .brand.logo { align-self: center; }

/* Bigger logo. */
.rail { width: 290px; }
.lg-4 { font-size: 72px; }
.lg-ward { font-size: 54px; }
.lg-sub { font-size: 15px; letter-spacing: .4em; }
.brand.logo { margin-bottom: 34px; }
.login-card .lg-4 { font-size: 64px; } .login-card .lg-ward { font-size: 48px; }
@media (max-width: 820px) {
  .lg-4 { font-size: 52px; } .lg-ward { font-size: 39px; } .lg-sub { font-size: 12px; }
}

/* Page titles with their symbol. */
.top h1 { display: flex; align-items: center; gap: 12px; }
.top h1 svg.i { width: 30px; height: 30px; padding: 6px; box-sizing: content-box; border-radius: 12px; stroke: var(--gold);
  background: rgba(255,200,87,.1); border: 1px solid rgba(255,200,87,.25); filter: drop-shadow(0 0 8px rgba(255,200,87,.25)); }
@media (max-width: 820px) { .top h1 svg.i { width: 24px; height: 24px; padding: 5px; } }

/* Clickable platform cards and platform pages. */
a.plat { transition: transform .15s, border-color .15s, box-shadow .15s; cursor: pointer; }
a.plat:hover { transform: translateY(-2px); border-color: rgba(47,230,167,.6); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.go-arrow { float: right; font-size: 20px; line-height: 1; color: var(--gain); }
a.add-chip:hover { color: var(--text); border-color: var(--accent); }
.back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back:hover { color: var(--text); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--muted); white-space: nowrap; } .facts b { text-align: right; font-weight: 600; }
.steps { margin: 6px 0 0; padding-left: 20px; } .steps li { margin: 8px 0; font-size: 15px; }

/* Home with a control panel on the right. */
.page { max-width: 1440px; }
.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.side-panel { position: sticky; top: 18px; }
.panel { padding: 20px; }
.big-btn { width: 100%; padding: 16px !important; font-size: 16px !important; border-radius: 14px; }
.center { text-align: center; margin: 8px 0 0; }
.panel-block { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.panel-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.panel-label svg.i { width: 16px; height: 16px; }
.stack { display: flex; gap: 8px; margin-bottom: 8px; }
.stack input { flex: 1; min-width: 0; }
.with-panel .hero-grid { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 1180px) {
  .with-panel { grid-template-columns: 1fr; }
  .side-panel { position: static; order: -1; }
}

/* Profit or loss. */
.pl-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 0 6px; }
.pl-big { font-size: 26px; font-weight: 700; }
.pl-pct { font-size: 16px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.06); }
.pl-note { font-size: 13px; }
.plat-pl { font-size: 13px; font-weight: 700; } .plat-pl span { font-weight: 600; opacity: .8; }

/* Top bar: DEMO badge, Settings and account at the top right. */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 14px; position: relative; z-index: 20; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover, .icon-btn.on { color: var(--text); border-color: rgba(124,156,255,.45); }
.avatar-btn { border-radius: 50%; background: linear-gradient(135deg, rgba(255,200,87,.25), rgba(124,156,255,.2)); color: var(--gold); }
.account { position: relative; }
.account .menu { position: absolute; right: 0; top: 48px; width: 250px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.account .menu a, .account .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px;
  color: var(--text); background: none; border: 0; cursor: pointer; font-weight: 600; font-size: 14px; text-align: left; }
.account .menu a:hover, .account .menu button:hover { background: rgba(255,255,255,.05); }
.top { margin-top: 0; }
@media (max-width: 820px) { .topbar { margin-bottom: 10px; } .topbar .live { font-size: 11px; padding: 4px 9px; } }

/* ===== Black, grey and gold palette ===== */
:root {
  --bg: #08080A; --surface: #121214; --surface-2: #19191C; --line: rgba(255,255,255,.07);
  --text: #F2F0EA; --muted: #9A978F; --dim: #615F59;
  --accent: #E3B04B; --accent-2: #FFD97A; --gold: #FFC857;
}
body { background: radial-gradient(1100px 520px at 85% -12%, rgba(227,176,75,.10), transparent 60%),
                   radial-gradient(800px 480px at -10% 110%, rgba(227,176,75,.06), transparent 60%), var(--bg); }
.rail { background: rgba(10,10,12,.85); }
.rail a.on { background: linear-gradient(90deg, rgba(227,176,75,.20), rgba(227,176,75,.03)); box-shadow: inset 2px 0 0 var(--accent); }
.rail a.on svg { stroke: var(--accent); }
.card { background: linear-gradient(180deg, #17171A, #111113); }
.hero .big { text-shadow: 0 0 30px rgba(227,176,75,.18); }
.btn.primary { background: linear-gradient(90deg, #E3B04B, #FFD97A); color: #141008; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227,176,75,.2); }
.flash { background: rgba(227,176,75,.10); border-color: rgba(227,176,75,.3); }
.bar i { background: linear-gradient(90deg, #C98A1E, #FFD97A); box-shadow: 0 0 14px rgba(227,176,75,.5); }
.level-head .lv { background: linear-gradient(90deg, #E3B04B, #FFE9A8); -webkit-background-clip: text; background-clip: text; }
.avatar { background: linear-gradient(135deg, rgba(227,176,75,.28), rgba(255,255,255,.06)); color: #FFE3A3; }
.seg a.on { box-shadow: inset 0 0 0 1px rgba(227,176,75,.45); color: var(--gold); }
details summary { color: var(--accent); }
.event::before, .tabbar a.on svg { background: var(--accent); }
.tabbar a.on svg { background: none; stroke: var(--accent); filter: drop-shadow(0 0 6px rgba(227,176,75,.6)); }
.icon-btn:hover, .icon-btn.on { border-color: rgba(227,176,75,.45); color: var(--gold); }
.tabbar { background: rgba(10,10,12,.94); }
.donut { filter: drop-shadow(0 0 12px rgba(227,176,75,.2)); }
.card h2 svg.i { stroke: var(--accent); }
a.add-chip:hover { border-color: var(--accent); }
.kpis div, .race div, .mkt, .stat { background: rgba(255,255,255,.03); }
.plat { background: #131315; }
.plat.live-on { border-color: rgba(227,176,75,.35); background: linear-gradient(160deg, rgba(227,176,75,.10), #131315 60%); }
a.plat:hover { border-color: rgba(227,176,75,.7); }
.go-arrow { color: var(--gold); }
.chip.on { color: var(--gold); background: rgba(227,176,75,.12); }
.trade.buy { background: rgba(47,230,167,.10); }

/* ===== Activity ===== */
.act-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.act-strip div { background: linear-gradient(180deg, #19191C, #121214); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.act-strip span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.act-strip b { font-size: 22px; white-space: nowrap; }
.act-chart { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding: 6px 2px 0; }
.act-chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.act-chart .b { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #FFD97A, #C98A1E); box-shadow: 0 0 10px rgba(227,176,75,.35); }
.act-chart .b.zero { background: rgba(255,255,255,.06); box-shadow: none; height: 3px !important; }
.act-chart small { font-size: 10px; color: var(--dim); }
.round { display: grid; grid-template-columns: 6px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.round:last-child { border-bottom: 0; }
.round .stripe { border-radius: 6px; }
.round-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.round-head .clock { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.round-head b { font-size: 16px; }
.round-sums { margin-left: auto; display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.assets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.asset { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line); font-size: 13px; }
.asset .avatar.sm { width: 28px; height: 28px; }
.asset .dir { font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.asset b { font-weight: 700; }
@media (max-width: 820px) { .act-strip { grid-template-columns: 1fr 1fr; } .round-sums { margin-left: 0; width: 100%; } }

/* ===== Lab ===== */
.funnel { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.stage { position: relative; background: linear-gradient(180deg, #1B1B1E, #131315); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; text-align: center; min-width: 0; }
.stage b { display: block; font-size: 26px; color: var(--gold); }
.stage span { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 4px; }
.stage.dead b { color: var(--dim); }
.stage:not(:last-child)::after { content: "›"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; font-size: 18px; z-index: 1; }
.verdict { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.verdict .big-line { font-size: 20px; font-weight: 700; }
.mtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mtabs a { padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: #131315; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.mtabs a.on { color: #141008; background: linear-gradient(90deg, #E3B04B, #FFD97A); border-color: transparent; }
.cmp { display: flex; flex-direction: column; gap: 8px; }
.cmp-row { display: grid; grid-template-columns: 210px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.cmp-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-track { position: relative; height: 14px; background: rgba(255,255,255,.04); border-radius: 7px; }
.cmp-zero { position: absolute; top: -3px; bottom: -3px; width: 1px; background: rgba(255,255,255,.25); }
.cmp-bar { position: absolute; top: 0; bottom: 0; border-radius: 7px; }
.cmp-bar.pos { background: linear-gradient(90deg, #C98A1E, #FFD97A); }
.cmp-bar.neg { background: rgba(255,92,122,.75); }
.cmp-row.market .nm { color: var(--gold); font-weight: 700; }
.cmp-row.market .cmp-bar { background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 6px, transparent 6px 10px); }
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.mcard { background: linear-gradient(180deg, #19191C, #121214); border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-width: 0; }
.mcard.pass { border-color: rgba(47,230,167,.45); }
.mcard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mcard-head b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { font-size: 12px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.mini-stats { display: flex; gap: 14px; margin: 8px 0 10px; font-size: 13px; flex-wrap: wrap; }
.mini-stats span { color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checks li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 12.5px; align-items: start; }
.checks .ok { color: var(--gain); font-weight: 800; } .checks .no { color: var(--loss); font-weight: 800; }
.checks small { display: block; color: var(--muted); font-size: 11.5px; }
.trialrow { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.trialrow:last-child { border-bottom: 0; }
.trialrow.head { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.rules { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.rules div { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.rules span { display: block; font-size: 11.5px; color: var(--muted); } .rules b { font-size: 15px; color: var(--gold); }
@media (max-width: 1000px) { .funnel { grid-template-columns: repeat(4, 1fr); } .stage::after { display: none; } .rules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .cmp-row { grid-template-columns: 120px 1fr 56px; } .trialrow { grid-template-columns: 1fr 1fr; } .funnel { grid-template-columns: repeat(2, 1fr); } }

/* Safety-settings explorer */
.explorer { display: grid; gap: 6px; margin-top: 12px; }
.ex-corner, .ex-col { display: flex; align-items: flex-end; padding: 4px 6px; }
.ex-row { display: flex; align-items: center; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ex-cell { border-radius: 12px; padding: 10px; border: 1px solid rgba(255,255,255,.06); min-width: 0; }
.ex-cell b { display: block; font-size: 15px; color: #fff; }
.ex-cell span { display: block; font-size: 11.5px; color: rgba(255,255,255,.75); }
.ex-cell small { display: block; font-size: 10.5px; color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 820px) { .explorer { grid-template-columns: 90px repeat(4, 1fr) !important; } .ex-cell small { display: none; } .ex-row { font-size: 11px; white-space: normal; } }

/* Currency picker */
.hero-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cur-pick { display: inline-flex; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 3px; gap: 2px; }
.cur-pick button { background: none; border: 0; color: var(--muted); font: 700 11.5px/1 inherit; letter-spacing: .04em; padding: 7px 10px; border-radius: 999px; cursor: pointer; }
.cur-pick button:hover { color: var(--text); }
.cur-pick button.on { background: linear-gradient(135deg, #F3CF7A, #C98A1E); color: #111; }

/* Interactive donut */
#donut .seg { cursor: pointer; transition: opacity .2s, stroke-width .2s; }
#donut.focus .seg { opacity: .3; }
#donut.focus .seg.hi { opacity: 1; stroke-width: 26; }
.donut-mid em { display: block; font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--gold); margin-top: 2px; min-height: 1em; }
.legend-list .leg { display: flex; align-items: center; gap: 10px; width: 100%; color: inherit; padding: 6px 8px; margin: -6px -8px; border-radius: 10px; transition: background .2s; }
.legend-list .leg b { margin-left: auto; }
.legend-list .leg:hover, .legend-list .leg.hi { background: rgba(227,176,75,.1); }

/* Platform page */
.back-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 12px; margin-bottom: 16px; border-radius: 999px;
  background: rgba(227,176,75,.1); border: 1px solid rgba(227,176,75,.35); color: var(--gold); font-weight: 700; font-size: 15px; transition: all .2s; }
.back-btn .i { width: 20px; height: 20px; margin: 0; }
.back-btn:hover { background: rgba(227,176,75,.2); transform: translateX(-3px); color: #FFE3A3; }
.plat-badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-right: 14px; vertical-align: middle;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 60%), var(--pc); box-shadow: 0 8px 30px color-mix(in srgb, var(--pc) 40%, transparent); }
.plat-badge .i, .top h1 .plat-badge .i { width: 26px; height: 26px; margin: 0; stroke: #15130F !important; color: #15130F !important; opacity: 1 !important; stroke-width: 2.2; }
.plat-hero { background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--pc) 16%, transparent), transparent 60%), var(--surface); }
.mixbar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 18px 0 8px; }
.mixbar i { display: block; height: 100%; background: linear-gradient(90deg, #C98A1E, #F3CF7A); border-radius: 99px; }
.mixlegend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); }
.mixlegend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot-g { background: #E3B04B; } .dot-c { background: rgba(255,255,255,.25); }
.plat-chart { margin-top: 14px; height: 90px; } .plat-chart svg { width: 100%; height: 90px; }
.sharebar { width: 120px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.sharebar i { display: block; height: 100%; background: linear-gradient(90deg, #C98A1E, #F3CF7A); }
.htable tbody tr { transition: background .15s; } .htable tbody tr:hover { background: rgba(227,176,75,.05); }
.status-orb { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; font-weight: 700; font-size: 14px;
  background: rgba(47,230,167,.08); color: var(--gain); }
.status-orb.paused { background: rgba(255,92,122,.08); color: var(--loss); }
.status-orb span { width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: orb 2s infinite; }
@keyframes orb { 0% { box-shadow: 0 0 0 0 rgba(47,230,167,.5); } 100% { box-shadow: 0 0 0 10px rgba(47,230,167,0); } }
.top h1 .plat-badge svg.i { padding: 0; background: none; border: 0; box-shadow: none; width: 26px; height: 26px; }
.top h1 .plat-badge { margin-right: 4px; }
.top h1 .plat-badge svg.i { filter: none; }

/* Weekly report */
.report-hero .verdict { font-size: 22px; font-weight: 800; line-height: 1.35; margin: 8px 0 16px; }
.report-hero.ahead .verdict { color: var(--gain); }
.report-hero.behind .verdict { color: #F3CF7A; }
.story-list { margin: 0; padding-left: 18px; display: grid; gap: 10px; line-height: 1.5; }
@media (max-width: 820px) { .report-hero .verdict { font-size: 18px; } }
