:root {
  color-scheme: dark;
  --background: #11101b;
  --surface: #1b1928;
  --text: #f4f0fa;
  --muted: #bcb4cc;
  --line: #e6ddff26;
  --accent: #d9c9ff;
  --secondary: #9adbcf;
  --positive: #a9e7bd;
  --negative: #ffa9b8;
  font: 15px/1.5 "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 300px;
  color: var(--text);
  background: radial-gradient(ellipse at 6% 3%, #342c3b 0, transparent 43rem),
              radial-gradient(ellipse at 97% 15%, #242444 0, transparent 54rem),
              var(--background);
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
.skip { position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%); padding: 9px 14px; background: #f4f0fa; color: #16111e; border-radius: 8px; }
.skip:focus { transform: translateY(0); }

.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px;
  position: sticky; top: 0; z-index: 10; padding: 13px clamp(18px, 4vw, 66px);
  border-bottom: 1px solid var(--line); background: #14121ee8;
  backdrop-filter: blur(20px);
}
.brand { display: inline-flex; width: fit-content; gap: 10px; align-items: center; font-weight: 670; white-space: nowrap; }
.brand-mark { width: 33px; height: 33px; display: flex; align-items: end; justify-content: center; gap: 2px; padding-bottom: 8px; border-radius: 10px; background: #d2baff1f; border: 1px solid #dccaff4a; color: var(--accent); }
.brand-mark i { width: 3px; height: 7px; background: currentColor; border-radius: 2px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 10px; }
.top nav { display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 28px; background: #ffffff08; }
.top nav a { padding: 6px 13px; border-radius: 24px; font-size: 13px; white-space: nowrap; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: #d7c4ff24; }
.connection { justify-self: end; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b3aac5; box-shadow: 0 0 9px #b3aac552; }
.connection[data-online="true"]::before { background: var(--positive); box-shadow: 0 0 9px #a9e7bd66; }
.top-account { display: flex; align-items: center; gap: 11px; justify-self: end; }
.top-account button { min-height: 32px; padding: 4px 9px; }

main { width: min(1450px, calc(100% - 64px)); margin: 0 auto; }
[id]:is(section) { scroll-margin-top: 90px; }
.hero {
  isolation: isolate; position: relative; overflow: hidden;
  margin: 27px 0 45px; padding: 40px 4.2% 56px; border: 1px solid var(--line); border-radius: 28px;
  background: radial-gradient(ellipse at 17% 3%, #352b3c 0, #1c1727 47%, transparent 74%), #15131f;
}
.hero-heading { position: relative; text-align: center; margin-bottom: 33px; }
h1 { font-size: clamp(42px, 6.3vw, 92px); font-weight: 630; line-height: 1; letter-spacing: -.07em; margin: 15px 0 10px; }
.hero-heading > p:not(.badge) { color: var(--muted); font-size: clamp(14px, 1.35vw, 17px); }
.badge { color: var(--muted); border: 1px solid var(--line); background: #e9dcff0b; padding: 5px 10px; border-radius: 30px; font-size: 11px; font-weight: 520; display: inline-flex; align-items: center; gap: 8px; width: fit-content; }
.live-badge { color: #e4d8fa; background: #d7bcff13; }
.live-badge span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(circle at 17% 24%, #f3e5ffa0 0 1px, transparent 1.5px), radial-gradient(circle at 82% 22%, #f3e5ffb0 0 1px, transparent 1.5px), radial-gradient(circle at 89% 41%, #f3e5ff8a 0 1px, transparent 1.5px); }
.hero-art i:first-child {
  position: absolute; width: min(76%, 905px); height: 450px; left: 50%; top: 41%;
  transform: translateX(-50%) rotate(-10deg);
  border-radius: 54% 46% 59% 41% / 54% 65% 35% 46%;
  background: radial-gradient(ellipse 36% 20% at 28% 9%, #fff0bfdb 0, #bd8f5b85 40%, transparent 100%),
              radial-gradient(ellipse 12% 55% at 86% 43%, #ffeaa8 0, #cb963357 43%, transparent 100%),
              radial-gradient(ellipse 52% 42% at 55% 71%, #334db198 0, transparent 80%),
              radial-gradient(ellipse at 45% 45%, #0b0c1b 18%, #272039 54%, #6d5269 78%, #cbbbd9 99%);
  box-shadow: inset 4px 4px 17px #f8e8ff9c, inset -4px 0 27px #fff3de88, 0 0 46px #ac84d845;
  mask-image: linear-gradient(#000 48%, transparent 87%);
}
.hero-art i:nth-child(2) { position: absolute; top: 47%; left: 30%; width: 37%; height: 40%; transform: rotate(-20deg); border-top: 1px solid #fff2c584; border-radius: 50%; filter: blur(1px); }
.hero-deck { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1.14fr); gap: 14px; align-items: center; }

.panel { min-width: 0; padding: clamp(15px, 2vw, 25px); border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, #ffffff0b, transparent 65%), var(--surface); box-shadow: 0 14px 40px #07060f35; }
.hero-deck .panel { border-color: #e8daff40; background: linear-gradient(143deg, #e8d5ff30, #28213bc0 40%, #171426ed 90%); backdrop-filter: blur(16px); }
.hero-balance { transform: translateY(-11px); }
.hero-pnl { transform: translateY(24px); }
.metric-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.metric-icon, .coin { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; color: var(--accent); background: #e3d1ff20; border-radius: 9px; }
.coin { border-radius: 50%; font-weight: 750; }
.metric-value, .metrics strong { display: block; font-variant-numeric: tabular-nums; font-size: clamp(22px, 2.6vw, 37px); line-height: 1.15; letter-spacing: -.055em; font-weight: 610; margin: 9px 0; overflow-wrap: anywhere; }
.hero-chart .metric-value { margin-bottom: 0; }
small { display: block; color: var(--muted); font-size: 11px; }
small:empty, #demo-result:empty, #market-status:empty { display: none; }
.hero-deck small + small { margin-top: 3px; }
.chart-box { position: relative; width: 100%; }
.overview-chart { height: clamp(115px, 12vw, 175px); }
.capital-chart { height: 254px; }
canvas { display: block; width: 100%; height: 100%; }
.chart-label { color: var(--muted); font-size: 12px; font-weight: 550; }
.chart-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 8px; color: var(--muted); font-size: 11px; }
.legend { display: inline-flex; gap: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend span::before { content: ""; width: 8px; height: 2px; background: var(--accent); }
.legend .legend-sma::before { background: var(--secondary); }

.section { margin: 0 0 43px; }
.section-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 7px 14px; margin-bottom: 13px; }
.section-title { margin: 0 0 15px; padding: 0 2px; }
.section-title h2 { font-size: clamp(28px, 4vw, 47px); line-height: 1.12; letter-spacing: -.055em; font-weight: 610; }
.section-title p { color: var(--muted); margin-top: 5px; }
.section-title > button, .section-title > .badge { align-self: center; }
h3 { font-size: clamp(17px, 2vw, 21px); letter-spacing: -.025em; font-weight: 620; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.demo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.42fr); }
.simulator-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.metrics article > span, .comparison dt { color: #d7cde7; font-size: 13px; }
.model-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.comparison > div { padding: 13px 0; border-bottom: 1px solid var(--line); }
.comparison dd { font-size: 26px; letter-spacing: -.035em; margin-top: 3px; }
.comparison + p { margin-top: 12px; }
.key-values > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.key-values dt { color: var(--muted); }
.key-values dd { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-pnl .key-values { margin: 10px 0; border-top: 1px solid var(--line); }
.hero-pnl .key-values > div { padding: 4px 0; font-size: 12px; border-bottom: 0; }
.key-values + p { margin-top: 12px; }
.decision #reason { font-size: 17px; margin-bottom: 12px; }
.status-line { color: #e1d4ff; font-size: 13px; padding: 9px 12px; border: 1px solid #d0baff32; border-radius: 10px; background: #bda5f415; margin-bottom: 9px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.controls + p { margin-top: 10px; }
button, .action-link { cursor: pointer; min-height: 39px; border: 1px solid var(--line); border-radius: 12px; background: #efdeff0a; color: var(--text); padding: 8px 12px; font: inherit; font-size: 12px; }
button:hover:not(:disabled), .action-link:hover { filter: brightness(1.14); background-color: #e8d5ff17; }
button:disabled { opacity: .42; cursor: default; }
.primary, .primary:hover:not(:disabled), .primary.action-link:hover { color: #191223; background: #eee5ff; font-weight: 680; border-color: #eee5ff; }
.action-link { display: inline-flex; gap: 9px; align-items: center; border-radius: 30px; padding: 9px 14px; margin-top: 17px; box-shadow: 0 0 32px #e1ceff2b; }
.table-scroll { overflow: auto; border-radius: 9px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; white-space: nowrap; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #efeaff08; font-weight: 550; }
td:last-child { white-space: normal; min-width: 120px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fff6ff04; }
.order-ref { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--muted); }
.order-ref code { font: inherit; }
.order-ref button { min-height: 25px; margin-left: 5px; padding: 2px 6px; font-size: 10px; border-radius: 6px; }
.events { padding: 0; margin: 12px 0 0; list-style: none; max-height: 310px; overflow: auto; }
.events li { padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.events time { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.error { margin-top: 18px; border: 1px solid #f3a1ad55; padding: 12px 15px; border-radius: 13px; background: #3c2437; color: #ffd4dc; }
#demo-result { white-space: pre-wrap; overflow-wrap: anywhere; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 19px 0 28px; }

.login-page {
  min-height: 100svh; display: grid; place-items: center;
  padding: clamp(14px, 4vw, 48px) 0;
}
.login-shell {
  isolation: isolate; position: relative; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center;
  width: min(1050px, calc(100% - 44px)); min-height: 575px; overflow: hidden;
  padding: clamp(25px, 5vw, 72px); gap: clamp(30px, 5vw, 80px);
  border: 1px solid var(--line); border-radius: 31px;
  background: radial-gradient(ellipse at 15% 10%,#34283e 0,transparent 64%), #14121e;
  box-shadow: 0 24px 95px #07061077;
}
.login-visual { align-self: start; padding-top: 10px; }
.login-visual .brand { color: #e8ddf5; }
.login-visual .hero-art i:first-child { top: 47%; left: 34%; width: min(68%, 680px); }
.login-visual .hero-art i:nth-child(2) { top: 50%; left: 11%; }
.login-title { max-width: 7em; font-size: clamp(39px, 6.5vw, 77px); font-weight: 640; line-height: .98; letter-spacing: -.075em; margin: 32px 0 15px; }
.login-visual p.muted { max-width: 260px; margin-bottom: 14px; }
.login-card {
  padding: clamp(22px, 3.2vw, 38px); border-color: #e8daff3b; border-radius: 23px;
  background: linear-gradient(145deg,#e8d5ff27,#29223dcc 40%,#171426ec 90%);
  backdrop-filter: blur(20px); box-shadow: 0 24px 60px #0b071a6b;
}
.login-card h1 { font-size: clamp(27px, 3.4vw, 46px); margin: 1px 0 24px; line-height: 1.08; }
.login-card form { display: grid; gap: 8px; }
.login-card label { color: #e4d8f3; font-size: 13px; font-weight: 560; }
.login-card input {
  color: var(--text); width: 100%; min-height: 47px; border: 1px solid #e6d8ff37; border-radius: 11px;
  padding: 10px 13px; font: inherit; background: #140f22a6;
}
.login-card label[for="password"] { margin-top: 7px; }
.password-field { position: relative; }
.password-field input { padding-right: 90px; }
.password-field button { position: absolute; top: 6px; right: 6px; min-height: 35px; padding: 4px 8px; border-radius: 8px; }
.login-card button[type="submit"] { min-height: 46px; margin-top: 13px; font-size: 14px; }
.login-error { color: #ffd4dc; font-size: 13px; padding-top: 3px; }

@media (max-width: 1060px) {
  main { width: calc(100% - 36px); }
  .top { gap: 11px; padding-inline: 18px; }
  .top nav a { padding-inline: 8px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-inline: 3%; }
  .hero-deck { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.18fr); }
}
@media (max-width: 790px) {
  .top { grid-template-columns: 1fr auto; padding-block: 8px; }
  .top nav { grid-column: 1 / -1; grid-row: 2; overflow: auto; }
  .top-account { grid-area: 1 / 2; }
  [id]:is(section) { scroll-margin-top: 120px; }
  .hero-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .hero-chart { grid-column: 1 / -1; grid-row: 1; }
  .hero-balance, .hero-pnl { transform: none; }
  .demo-grid, .simulator-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 23px; margin-bottom: 32px; }
  .overview-chart { height: 153px; }
  .login-shell { grid-template-columns: 1fr 1fr; min-height: 465px; gap: 24px; }
}
@media (max-width: 520px) {
  main { width: calc(100% - 20px); }
  .top { padding-inline: 10px; }
  .brand { gap: 6px; font-size: 13px; }
  .top nav a { font-size: 11px; padding-inline: 8px; }
  .hero { margin-top: 14px; padding: 23px 10px 14px; border-radius: 21px; }
  h1 { font-size: clamp(34px, 9.4vw, 53px); }
  .hero-heading { margin-bottom: 18px; }
  .hero-deck, .metrics, .two-col { gap: 8px; }
  .two-col { grid-template-columns: 1fr; }
  .panel { padding: 12px; border-radius: 15px; }
  .hero-deck .metric-label { align-items: start; gap: 5px; font-size: 11px; }
  .metric-icon { flex-basis: 18px; width: 18px; height: 18px; }
  .hero-pnl .key-values > div { flex-wrap: wrap; gap: 2px 5px; }
  .metric-value, .metrics strong { font-size: clamp(18px, 5.6vw, 27px); }
  .section-title p { font-size: 13px; }
  .capital-chart { height: 190px; }
  .login-shell { grid-template-columns: 1fr; width: calc(100% - 24px); gap: 17px; min-height: 0; padding: 17px; border-radius: 22px; }
  .login-visual { padding: 0 4px; }
  .login-visual .hero-art i:first-child { top: 28%; left: 49%; width: 92%; height: 300px; }
  .login-title { font-size: 37px; max-width: none; margin: 13px 0 7px; }
  .login-visual p.muted { max-width: none; margin-bottom: 8px; font-size: 13px; }
  .login-card { padding: 18px; border-radius: 17px; }
  .login-card h1 { margin-bottom: 17px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
