/* ===== NexEdge workspace: terminal, journal, edge, notebook, news, sanctuary, academy, settings ===== */

/* ---------- light theme ---------- */
:root[data-theme="light"] {
  --ground: #f6f6f3; --surface: #ffffff; --surface-2: #eeefeb; --line: #dfe1dc; --ink: #15171a; --muted: #62666d;
  --accent: #5b7c00; --accent-ink: #ffffff; --pos: #11935a; --neg: #d33a3a; --warn: #b77a00; color-scheme: light;
}
:root[data-theme="light"] .btn:hover { background: #e6e8e3; border-color: #c9ccc5; }
:root[data-theme="light"] .btn.primary { color: #fff; }
:root[data-theme="light"] .btn.primary:hover { background: #6b8f05; }
:root[data-theme="light"] .top { background: rgba(246, 246, 243, .92); }
:root[data-theme="light"] .v p, :root[data-theme="light"] .steps p, :root[data-theme="light"] .src ol, :root[data-theme="light"] .ex-help p, :root[data-theme="light"] .opt > span:not(.opt-k):not(.opt-cta) { color: #3d4046; }
:root[data-theme="light"] .banner.neg { color: #9b1c1c; } :root[data-theme="light"] .banner.pos { color: #0b6b40; }
:root[data-theme="light"] .opt.main { background: #f3f8e4; } :root[data-theme="light"] .drop.over { background: #f3f8e4; }
:root[data-theme="light"] .drawer-back, :root[data-theme="light"] .mdl-back { background: rgba(20, 22, 26, .35); }
:root[data-theme="light"] .chart .zero { stroke: #c2c5bf; }
:root[data-theme="light"] .brand { color: var(--accent); }
@media (max-width: 820px) { :root[data-theme="light"] .top { background: rgba(246, 246, 243, .98); } }

/* ---------- nav ---------- */
.side { overflow-y: auto; }
.nav-h { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 4px; opacity: .8; }
.nav button { padding: 8px 10px; font-size: 14.5px; position: relative; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 6px; }
@media (max-width: 820px) { .nav-h { display: none; } .nav button { flex: 0 0 auto; min-width: 64px; } .nav-badge { position: absolute; top: 2px; right: 6px; margin: 0; height: 16px; min-width: 16px; font-size: 10px; } }
.top-right { display: flex; align-items: center; gap: 8px; }
body.wide-view #view { max-width: none; }
body.focus-mode .side, body.focus-mode .top { display: none; }
body.focus-mode .shell { grid-template-columns: 1fr; }

/* ---------- shared ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.pill.neg { color: var(--neg); background: color-mix(in srgb, var(--neg) 14%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill.live { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.pill-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; }
.pill-btn.on { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 50%, transparent); }
.banner.warn-b { background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
.banner.prot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; background: none; color: var(--muted); padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.seg.full { display: flex; width: 100%; } .seg.full button { flex: 1; }
.seg.small-seg button { padding: 5px 8px; font-size: 13px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.sec-h { font-size: 20px; margin-bottom: 14px; }
.pdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pc { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 5px 0; cursor: pointer; }
.pc input { margin-top: 3px; accent-color: var(--accent); }
.btn.danger-solid { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.sell { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.rec { border-color: var(--neg); color: var(--neg); animation: pulse 1.4s infinite; }
.chips button.on { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.table-wrap.flat { border: 0; border-radius: 0; }
.split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.split-side { display: flex; flex-direction: column; gap: 4px; }
.split-side input[type=search] { width: 100%; margin-bottom: 8px; }
.side-h { font-size: 11px; letter-spacing: .08em; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; }
.empty-card { text-align: center; padding: 40px 24px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; z-index: 15; min-width: 200px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.g-list { padding-left: 18px; margin: 8px 0; } .g-list li { margin: 6px 0; }

/* ---------- modal ---------- */
.mdl { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.mdl-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.mdl-box { position: relative; width: min(540px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; animation: rise .25s cubic-bezier(.2,.7,.2,1); }
.mdl-box.wide { width: min(860px, 100%); }
.mdl-box h2 { font-size: 22px; margin-bottom: 8px; padding-right: 36px; }
.mdl-x { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.mdl-body { margin-top: 8px; } .mdl-body p { margin-top: 8px; }
.mdl-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- onboarding / protection ---------- */
.ob .mdl-box { width: min(560px, 100%); }
.ob-h { display: flex; justify-content: space-between; margin-bottom: 16px; }
.brand-mini { font: 800 16px var(--display); color: var(--accent); }
.ob-opts { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.ob-opt { display: flex; gap: 14px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: border-color .15s, transform .15s; }
.ob-opt:hover { border-color: var(--accent); transform: translateX(2px); }
.ob-opt.on { border-color: var(--accent); }
.ob-opt strong { display: block; } .ob-opt .muted { font-size: 13px; }
.ob-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); font-size: 18px; flex: none; }
.ob-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.ob-tiles div { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.pr-bar { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; } .pr-bar .gauge { flex: 1; margin: 0; }
.pr-list { display: flex; flex-direction: column; gap: 10px; }
.pr-step { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.pr-step.cur { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.pr-step.done { opacity: .75; } .pr-step p { font-size: 13px; }
.pr-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.pr-step.done .pr-n { background: var(--pos); color: #fff; } .pr-step.cur .pr-n { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 600px) { .pr-step { grid-template-columns: 32px minmax(0,1fr); } .pr-step > .btn, .pr-step > .row-btns { grid-column: 2; justify-self: start; } .ob-tiles { grid-template-columns: 1fr; } }
.rt-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.rt-pill.done { border-color: color-mix(in srgb, var(--pos) 45%, var(--line)); }
.rt-ring { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }

/* ---------- dashboard ---------- */
.dash-row { margin-top: 0; }
.disc { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 14px; }
.streak { border-radius: 12px; background: var(--surface-2); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.streak.on { background: color-mix(in srgb, var(--warn) 16%, var(--surface-2)); }
.streak strong { font: 700 20px var(--display); } .streak .muted { font-size: 12px; }
.ckl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ckl li { padding-left: 24px; position: relative; color: var(--muted); }
.ckl li::before { content: ''; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.ckl li.ok { color: var(--ink); } .ckl li.ok::before { background: var(--pos); border-color: var(--pos); }
.next-a { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.journey { display: flex; align-items: center; gap: 0; margin-top: 18px; }
.journey span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-weight: 700; flex: none; }
.journey span.on { background: var(--pos); border-color: var(--pos); color: #fff; }
.journey i { flex: 1; height: 2px; background: var(--line); }
.es-n { font: 800 30px var(--display); color: var(--accent); }
.chart.radar { max-width: 260px; margin: 0 auto; display: block; }
.chart.radar .ring { fill: none; stroke: var(--line); }
.chart.radar .shape { fill: color-mix(in srgb, var(--accent) 25%, transparent); stroke: var(--accent); stroke-width: 2; }
.chart.radar .axis { font-size: 9px; }
.es-empty { text-align: center; padding: 20px 0; } .es-empty .gauge { max-width: 220px; margin: 12px auto 6px; }

/* ---------- terminal ---------- */
.term { display: flex; flex-direction: column; gap: 14px; }
.term-top { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.term-acct { display: flex; gap: 10px; align-items: center; }
.term-acct select { min-width: 240px; font-weight: 600; }
.term-metrics { display: flex; gap: 26px; flex-wrap: wrap; }
.term-metrics div { display: flex; flex-direction: column; } .term-metrics span { font-size: 12px; color: var(--muted); } .term-metrics strong { font: 700 17px var(--display); }
.term-actions { display: flex; gap: 8px; align-items: center; }
.t-tradebtn { min-width: 110px; background: var(--pos); border-color: var(--pos); color: #06150d; }
.sess-on { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 600; padding: 0 8px; }
.term-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto; gap: 14px; }
.term-chart { padding: 10px; display: flex; flex-direction: column; min-height: 0; }
.tc-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tc-sym { display: flex; gap: 8px; align-items: baseline; } .tc-sym .muted { font-size: 13px; }
.tc-pick { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; font-size: 13px; }
.tc-pick .btn.on { border-color: var(--accent); color: var(--accent); }
.tc-pick select { min-height: 32px; padding: 4px 8px; }
.tc-wrap { position: relative; height: clamp(380px, 58vh, 720px); }
.tv-box { position: absolute; inset: 0; border-radius: 8px; overflow: hidden; }
.lw-empty { position: absolute; left: 16px; top: 16px; font-size: 14px; }
.term-side { display: flex; flex-direction: column; gap: 14px; grid-row: span 2; min-width: 0; }
.term-bottom { padding: 10px 14px; min-width: 0; }
.tb-tabs { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-tabs .tabs { margin-bottom: 0; border: 0; }
.tb-foot { display: flex; gap: 22px; justify-content: flex-end; padding: 10px 4px 2px; font-size: 14px; color: var(--muted); } .tb-foot b { color: var(--ink); }
.empty-t { padding: 30px 0; text-align: center; }
.t-guard { padding: 14px 16px; }
.tg-top { display: flex; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; } .tg-top .linkish { margin-left: auto; font-size: 13px; }
.tg-pnl { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; } .tg-pnl strong { font: 700 20px var(--display); } .tg-pnl span { font-size: 13px; }
.tg-bar { position: relative; height: 6px; border-radius: 3px; margin: 10px 0 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--neg) 55%, transparent), var(--surface-2) 50%, color-mix(in srgb, var(--pos) 55%, transparent)); }
.tg-bar span { position: absolute; top: -4px; width: 4px; height: 14px; border-radius: 2px; background: var(--ink); transform: translateX(-50%); }
.tg-lims { display: flex; justify-content: space-between; font-size: 13px; } .tg-lims span { display: block; }
.tg-trades { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }
.tg-trades i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); margin-right: 4px; }
.tg-trades i.u { background: var(--neg); border-color: var(--neg); }
.t-panel { padding: 10px 14px 14px; min-height: 320px; }
.w-q { width: 100%; margin-bottom: 6px; }
.wl { max-height: 360px; overflow-y: auto; }
.wl-cat { font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 10px 4px 4px; }
.wl-row { display: grid; grid-template-columns: minmax(0,1fr) auto 64px 20px; gap: 8px; align-items: center; padding: 7px 6px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.wl-row:hover, .wl-row.on { background: var(--surface-2); }
.wl-row.add { grid-template-columns: minmax(0,1fr) auto; }
.wl-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.wl-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; opacity: 0; }
.wl-row:hover .wl-x, .nb-item:hover .wl-x { opacity: 1; }
.al-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .al-form input[type=text], .al-form .btn { grid-column: 1 / -1; }
.al-list { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.al-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.al-row.done { opacity: .6; }
.plan-mini h4 { font-size: 13px; margin: 14px 0 4px; color: var(--muted); font-family: var(--text); font-weight: 600; }
.pm-h { display: flex; align-items: center; gap: 8px; }
.t-quote { padding: 14px 16px; }
.tq-h { display: flex; gap: 8px; align-items: center; } .tq-h .pill { margin-left: auto; }
.tq-p { font: 700 28px var(--display); margin: 6px 0 2px; font-variant-numeric: tabular-nums; } .tq-p span { font-size: 15px; }
.tk { display: flex; flex-direction: column; gap: 10px; }
.tk-h { display: flex; gap: 8px; } .tk-h select { flex: 1; font-weight: 600; }
.tk-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-dir button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 10px; cursor: pointer; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; }
.tk-dir button span { font: 700 16px var(--display); font-variant-numeric: tabular-nums; }
.tk-buy { color: var(--pos); } .tk-sell { color: var(--neg); }
.tk-buy.on { background: var(--pos); color: #06150d; border-color: var(--pos); } .tk-sell.on { background: var(--neg); color: #fff; border-color: var(--neg); }
.tk .field { margin: 0; } .tk input { width: 100%; }
.tk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.tk-sum div { display: flex; justify-content: space-between; } .tk-sum span { color: var(--muted); }
.tk-go { width: 100%; }
.tk-note { font-size: 12px; text-align: center; }
.pickon { color: var(--accent); font-style: normal; font-weight: 600; }
@media (max-width: 1180px) { .term-grid { grid-template-columns: 1fr; } .term-side { grid-row: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } }
@media (max-width: 820px) { .term-metrics { gap: 14px; } .term-acct select { min-width: 0; width: 100%; } .term-acct { width: 100%; } .tc-wrap { height: 420px; } .term-side { display: flex; } }

/* ---------- edge ---------- */
.pl-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 9px 8px; border-radius: 8px; cursor: pointer; width: 100%; }
.pl-item:hover, .pl-item.on { background: var(--surface-2); }
.pl-item > span:nth-child(2) { flex: 1; min-width: 0; } .pl-item strong { display: block; font-size: 14px; } .pl-item .muted { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pl-card { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s, transform .15s; }
.pl-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pl-card ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.plan-read h4 { margin-top: 14px; } .plan-read ol { padding-left: 20px; }
.pe { display: flex; flex-direction: column; gap: 14px; }
.pe-head { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.pe-head input[type=color] { width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; }
.pe-name { font: 700 22px var(--display); border: 0 !important; background: transparent !important; padding: 4px 0 !important; }
.pe-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pe-sec h2 { font-size: 16px; } .pe-hint { font-size: 13px; margin: -8px 0 10px; }
.pe-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.pe-list li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto auto; gap: 6px; align-items: center; }
.pe-n { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--accent); }
.pe-list input { width: 100%; }
.pe-add { display: flex; gap: 8px; } .pe-add input { flex: 1; }
.pe-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pe-imgs figure { margin: 0; display: flex; flex-direction: column; gap: 6px; } .pe-imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
@media (max-width: 820px) { .pe-head { grid-template-columns: 44px minmax(0,1fr); } .pe-acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---------- journal ---------- */
.jm-name { font: 700 16px var(--display); min-width: 140px; text-align: center; }
.jgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.jc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.jc-cell { min-height: 92px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); padding: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer; font-size: 12px; }
.jc-cell.out { border: 0; background: transparent; cursor: default; }
.jc-cell.pos { background: color-mix(in srgb, var(--pos) 12%, var(--ground)); border-color: color-mix(in srgb, var(--pos) 35%, transparent); }
.jc-cell.neg { background: color-mix(in srgb, var(--neg) 12%, var(--ground)); border-color: color-mix(in srgb, var(--neg) 35%, transparent); }
.jc-cell.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.jc-d { color: var(--muted); } .jc-n { color: var(--muted); margin-top: auto; } .jc-v { font-weight: 700; font-size: 13px; } .jc-p { color: var(--warn); font-size: 11px; }
.jday-panel { position: static; }
.jp-h { display: flex; justify-content: space-between; align-items: baseline; } .jp-h h2 { font-size: 18px; margin: 0; }
.jp-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.jp-k div { background: var(--surface-2); border-radius: 8px; padding: 10px; text-align: center; } .jp-k strong { display: block; font: 700 20px var(--display); } .jp-k span { font-size: 12px; color: var(--muted); }
.jp-note { position: relative; margin: 12px 0; } .jp-note textarea { min-height: 70px; padding-right: 48px; } .jp-note .icon-btn { position: absolute; right: 8px; bottom: 10px; }
.jp-tr-h { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; }
.jp-trades { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.jp-row { display: grid; grid-template-columns: minmax(60px,1fr) 46px auto minmax(0,1fr) auto auto; gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--ground); cursor: pointer; font-size: 13px; }
.jp-row:hover { border-color: var(--accent); }
.ms-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; }
.chart.rbars rect.pos { fill: var(--pos); } .chart.rbars rect.neg { fill: var(--neg); } .chart.rbars .axis { font-size: 10px; }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.wk { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; } .wk strong { font: 700 18px var(--display); }
@media (max-width: 1180px) { .jgrid { grid-template-columns: 1fr; } .jday-panel { position: static; } }
@media (max-width: 820px) { .jc-cell { min-height: 58px; padding: 4px; } .jc-n, .jc-p { display: none; } .jc-v { font-size: 10px; } .ms-wrap { grid-template-columns: 1fr; } .jp-row { grid-template-columns: 1fr auto auto; } .jp-row > :nth-child(2), .jp-row > :nth-child(4) { display: none; } }

/* ---------- review ---------- */
.rv { padding-bottom: 80px; }
.rv-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.rv-top h1 { font-size: 20px; }
.rv-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-det h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 6px; font-family: var(--text); }
.rv-det dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; font-size: 14px; } .rv-det dt { color: var(--muted); } .rv-det dd { margin: 0; text-align: right; font-weight: 600; }
.rv-pnl { font: 800 34px var(--display); display: flex; flex-direction: column; } .rv-pnl span { font: 500 12px var(--text); }
.rv-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; } .rv-3 div { background: var(--surface-2); border-radius: 8px; padding: 10px; } .rv-3 strong { display: block; } .rv-3 span { font-size: 12px; color: var(--muted); }
.rv-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rv-box { position: relative; height: 380px; }
.rf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.rf-2 select { width: 100%; }
.tagbox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tagbox input { border: 0 !important; background: transparent !important; flex: 1; min-width: 120px; min-height: 28px !important; padding: 2px 4px !important; }
.tg { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); border-radius: 6px; padding: 3px 4px 3px 9px; font-size: 13px; font-weight: 600; }
.tg button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.chips.sug { margin-top: 6px; } .chips.sug button { font-size: 12px; padding: 4px 9px; color: var(--muted); }
.rv-bar { position: fixed; left: 232px; right: 0; bottom: 0; z-index: 8; display: flex; gap: 12px; align-items: center; padding: 12px 28px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(8px); flex-wrap: wrap; font-size: 14px; }
body.focus-mode .rv-bar { left: 0; }
.rv-prog { width: 140px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .rv-prog span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
@media (max-width: 1180px) { .rv-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .rv-bar { left: 0; bottom: 64px; padding: 10px 16px; } .rf-2 { grid-template-columns: 1fr; } .rv-box { height: 300px; } }

/* ---------- notebook ---------- */
.nb-item { display: flex; flex-direction: column; text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; width: 100%; position: relative; color: inherit; }
.nb-item:hover, .nb-item.on { background: var(--surface-2); } .nb-item strong { font-size: 14px; } .nb-item .muted { font-size: 12px; }
.nb-item .wl-x { position: absolute; right: 6px; top: 8px; }
.nb-list { display: flex; flex-direction: column; gap: 2px; }
.tpl-cat { font-size: 15px; margin: 22px 0 10px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.tpl-h { display: flex; justify-content: space-between; gap: 8px; } .tpl-h strong { font-size: 14px; }
.tpl-prev { height: 150px; overflow: hidden; font-size: 11px; color: var(--muted); border-radius: 8px; background: var(--ground); padding: 10px; mask-image: linear-gradient(#000 70%, transparent); -webkit-mask-image: linear-gradient(#000 70%, transparent); }
.tpl-prev h3 { font-size: 12px; margin: 6px 0 2px; color: var(--ink); } .tpl-prev table { font-size: 10px; }
.nb-ed { display: flex; flex-direction: column; gap: 10px; }
.nb-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nb-title { font: 700 24px var(--display); border: 0 !important; background: transparent !important; padding: 4px 0 !important; width: 100%; }
.nb-tools { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.nb-tools button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.nb-tools button.rec { border-color: var(--neg); color: var(--neg); }
.nb-body { min-height: 420px; outline: none; line-height: 1.6; font-size: 15px; }
.nb-body h3 { font-size: 18px; margin: 18px 0 6px; } .nb-body p { margin: 4px 0; }
.nb-body ul.check { list-style: none; padding-left: 0; } .nb-body ul.check li { padding-left: 26px; position: relative; cursor: text; }
.nb-body ul.check li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border: 2px solid var(--muted); border-radius: 4px; cursor: pointer; }
.nb-body ul.check li[data-c="1"] { color: var(--muted); text-decoration: line-through; } .nb-body ul.check li[data-c="1"]::before { background: var(--pos); border-color: var(--pos); }
.nb-tbl { border-collapse: collapse; margin: 8px 0; } .nb-tbl td, .nb-tbl th { border: 1px solid var(--line); padding: 6px 10px; white-space: normal; position: static; background: none; cursor: auto; }
.nb-stats { border-left: 3px solid var(--accent); padding-left: 12px; margin: 8px 0; }
.nb-imgx { max-width: 100%; border-radius: 8px; }
.nb-meta { font-size: 12px; }

/* ---------- news ---------- */
.nw-f h3 { font-size: 16px; margin: 4px 0 10px; } .nw-f h4 { font-size: 13px; margin: 16px 0 6px; display: flex; justify-content: space-between; font-family: var(--text); }
.nw-dates { display: flex; flex-direction: column; gap: 6px; align-items: stretch; } .nw-dates span { display: none; } .nw-dates input { width: 100%; padding: 6px; }
.nw-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.imp { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: middle; }
.imp.High { background: var(--neg); } .imp.Medium { background: var(--warn); } .imp.Low { background: #8a8f98; } .imp.Holiday { background: #5ab0ff; }
.nw-t td { white-space: normal; } .nw-t tr { cursor: default; }
.nw-day td { background: var(--surface-2); font-weight: 700; font-size: 13px; }
.nw-t tr.past td { color: var(--muted); }
.nw-now td { padding: 0; border: 0; } .nw-now span { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 0 6px 6px 0; }
.nw-now td { border-top: 2px solid var(--accent); }
.nw-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.nw-col { border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 300px; display: flex; flex-direction: column; gap: 6px; }
.nw-col.today { border-color: var(--accent); }
.nw-ch { font-weight: 700; font-size: 13px; }
.nw-ev { font-size: 12px; border-left: 3px solid #8a8f98; padding: 4px 6px; border-radius: 4px; background: var(--surface-2); line-height: 1.3; }
.nw-ev span { display: block; color: var(--muted); font-size: 11px; } .nw-ev.High { border-left-color: var(--neg); } .nw-ev.Medium { border-left-color: var(--warn); }
@media (max-width: 1180px) { .nw-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- sanctuary ---------- */
.sn-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.sn-hero { position: relative; border-radius: 16px; min-height: 520px; display: grid; place-items: center; padding: 30px 60px; overflow: hidden; transition: background .6s; }
.sn-card { width: min(380px, 100%); background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 16px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); backdrop-filter: blur(6px); }
.sn-card h2 { text-align: center; font-size: 20px; } .sn-ic { text-align: center; font-size: 26px; }
.sn-card .field { margin-top: 12px; } .sn-card select, .sn-card input[type=range] { width: 100%; }
.sn-dur { display: flex; gap: 8px; align-items: center; } .sn-dur input { width: 90px; }
.sn-card .chips { margin-top: 6px; } .sn-card .chips button { padding: 4px 9px; font-size: 13px; }
.sn-start { width: 100%; margin-top: 16px; }
.sn-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: #111; font-size: 22px; cursor: pointer; }
.sn-arrow.l { left: 14px; } .sn-arrow.r { right: 14px; }
.sn-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; } .sn-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); } .sn-dots span.on { background: #fff; }
.sn-scene { position: absolute; bottom: 12px; right: 16px; color: rgba(255,255,255,.8); font-size: 12px; }
.sn-ring { position: relative; width: 200px; height: 200px; margin: 6px auto 12px; }
.sn-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); } .sn-ring circle { fill: none; stroke-width: 6; } .sn-ring .bg { stroke: var(--surface-2); } .sn-ring .fg { stroke: var(--accent); stroke-dasharray: 1; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.sn-time { position: absolute; inset: 0; display: grid; place-items: center; font: 700 40px var(--display); font-variant-numeric: tabular-nums; }
.sn-side textarea { min-height: 60px; }
.sn-week { display: flex; justify-content: space-between; margin: 8px 0 14px; } .sn-week span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.sn-week i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); } .sn-week span.on i { background: var(--pos); border-color: var(--pos); } .sn-week span.today i { border-color: var(--accent); }
.sn-k { display: grid; gap: 10px; margin-bottom: 12px; } .sn-k div { display: flex; justify-content: space-between; align-items: baseline; } .sn-k strong { font: 700 18px var(--display); } .sn-k .muted { font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tool { position: relative; text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 16px; min-height: 130px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; color: #fff; transition: transform .15s; }
.tool:hover { transform: translateY(-3px); } .tool .pill { align-self: flex-start; background: rgba(0,0,0,.3); color: #fff; } .tool .muted { color: rgba(255,255,255,.8); margin-top: auto; }
.tool.Reboot { background: linear-gradient(150deg, #2b3a67, #4b6cb7); } .tool.Rewire { background: linear-gradient(150deg, #3b2667, #8e5bd0); } .tool.Recovery { background: linear-gradient(150deg, #1d4d3c, #3fa27a); }
.tool .fav { position: absolute; right: 12px; top: 12px; }
.tl-stage { display: grid; place-items: center; gap: 6px; padding: 24px 0; text-align: center; }
.tl-orb { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); opacity: .85; transform: scale(.75); margin-bottom: 18px; }
.tl-label { font: 700 24px var(--display); } .tl-sub { max-width: 380px; } .tl-time { font: 700 30px var(--display); font-variant-numeric: tabular-nums; }
@media (max-width: 1180px) { .sn-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .sn-hero { padding: 24px 16px; min-height: 0; } .sn-arrow { display: none; } }

/* ---------- academy ---------- */
.ac-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 32px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); }
.ac-hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 12px 0; }
.ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .ac-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; } .ac-stats strong { display: block; font: 700 24px var(--display); } .ac-stats span { font-size: 12px; color: var(--muted); }
.ac-mod h2 { display: flex; align-items: center; gap: 10px; }
.ac-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.ac-l { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); cursor: pointer; }
.ac-l:hover { border-color: var(--accent); } .ac-l strong { display: block; font-size: 14px; } .ac-l .muted { font-size: 12px; }
.ac-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; flex: none; } .ac-l.done .ac-n { background: var(--pos); color: #fff; }
.ac-lesson { max-width: 760px; } .ac-lesson h1 { font-size: 34px; margin: 8px 0 18px; }
.ac-body p { font-size: 17px; line-height: 1.7; margin-bottom: 16px; }
.ac-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { .ac-hero { grid-template-columns: 1fr; padding: 22px; } }

/* ---------- settings ---------- */
.st-tabs { margin-bottom: 18px; }
.st-body { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.st-h { font-size: 15px; margin: 22px 0 8px; }
.st-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px; margin: 10px 0; } .st-dl dt { color: var(--muted); } .st-dl dd { margin: 0; }
.st-steps { width: 100%; } .st-steps td, .st-steps th { position: static; cursor: auto; } .st-steps tr { cursor: default; } .st-steps tbody tr:hover td { background: none; }
.st-steps input[type=text] { width: 100%; }
.st-steps.nt td:not(:first-child), .st-steps.nt th:not(:first-child) { text-align: center; width: 90px; }
.nt-cat td { font-weight: 700; padding-top: 18px; color: var(--muted); font-size: 13px; }
.st-tags h4 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); font-family: var(--text); }
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; cursor: pointer; } .switch-row input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; } .switch-row strong { display: block; } .switch-row .muted { font-size: 13px; display: block; }
.gr-box { margin-top: 16px; }
.gr-top { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface-2)); }
.gr-row { display: grid; grid-template-columns: auto 30px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.gr-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 14px; }
.gr-l strong { display: block; } .gr-l .muted { font-size: 13px; }
.gr-v { display: flex; gap: 6px; align-items: center; } .gr-v input[type=number] { width: 90px; } .gr-v input[type=time] { width: 110px; } .gr-v select { min-height: 36px; }
.tgl { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.tgl input { opacity: 0; width: 0; height: 0; }
.tgl span { position: absolute; inset: 0; border-radius: 11px; background: var(--line); cursor: pointer; transition: background .15s; }
.tgl span::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tgl input:checked + span { background: var(--accent); } .tgl input:checked + span::before { transform: translateX(18px); }
.tgl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) { .gr-row { grid-template-columns: auto minmax(0,1fr); } .gr-ic { display: none; } .gr-v { grid-column: 1 / -1; flex-wrap: wrap; } .gr-top { grid-template-columns: auto minmax(0,1fr); } .gr-top .btn { grid-column: 1 / -1; } .split { grid-template-columns: 1fr; } .split-side { position: static; max-height: none; } }

/* ---------- coach ---------- */
.coach-main { display: flex; flex-direction: column; gap: 12px; min-height: 520px; }
.coach-main .chat { max-width: none; flex: 1; max-height: 60vh; overflow-y: auto; }
.coach-hello { text-align: center; padding: 50px 10px 20px; flex: 1; } .ch-ic { color: var(--accent); }
.coach-main .chat-form { max-width: none; align-items: flex-end; } .coach-main .chat-form textarea { flex: 1; min-height: 56px; }
.cf-btns { display: flex; gap: 6px; }
.coach-main .suggest { justify-content: center; }

/* ---------- menus above animated cards ---------- */
.page-h { position: relative; z-index: 12; }
.menu { animation: menuIn .16s cubic-bezier(.2,.7,.2,1); transform-origin: top right; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* ---------- guided tour ---------- */
.tour { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: 16px; padding: 16px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.tour.pop { animation: tourIn .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes tourIn { from { opacity: 0; transform: translateY(18px) scale(.96); } }
.tour-top { display: flex; justify-content: space-between; align-items: center; } .tour-top .linkish { font-size: 13px; color: var(--muted); }
.tour-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 12px 0; }
.tour-bar i { height: 5px; border-radius: 3px; background: var(--surface-2); transition: background .4s; }
.tour-bar i.on { background: var(--pos); } .tour-bar i.cur { background: var(--accent); animation: barPulse 1.4s ease-in-out infinite; }
@keyframes barPulse { 50% { opacity: .45; } }
.tour h3 { font-size: 17px; } .tour p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tour-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .tour-acts:empty { display: none; }
.tour-hl { position: relative; z-index: 55 !important; outline: 3px solid var(--accent) !important; outline-offset: 4px; border-radius: 10px; animation: hlPulse 1.6s ease-in-out infinite; }
@keyframes hlPulse { 0%, 100% { outline-color: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { outline-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); } }
.tour-hint { position: fixed; z-index: 61; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.35); animation: hintBob 1.2s ease-in-out infinite; }
.tour-hint::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: var(--accent); }
.tour-hint.below::after { bottom: auto; top: -6px; border-top: 0; border-bottom: 6px solid var(--accent); }
@keyframes hintBob { 50% { transform: translateY(-4px); } }
@media (max-width: 820px) { .tour { right: 12px; left: 12px; bottom: 78px; width: auto; } }

/* ---------- motion ---------- */
.mdl-back { animation: fade .2s ease; }
.mdl-box { animation: mdlIn .32s cubic-bezier(.2,.9,.3,1.15); }
@keyframes mdlIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.toast.show { animation: toastIn .35s cubic-bezier(.2,.9,.3,1.3); }
@keyframes toastIn { from { transform: translateX(-50%) translateY(24px) scale(.9); } }
.nav button { transition: color .15s, background .2s, transform .15s; }
.nav button:hover { transform: translateX(2px); }
.nav button.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); animation: barIn .3s cubic-bezier(.2,.7,.2,1); }
@keyframes barIn { from { transform: scaleY(0); } }
@media (max-width: 820px) { .nav button.active::before { display: none; } }
.card { transition: border-color .2s, box-shadow .25s, transform .25s; }
.kpi { transition: background .2s; } .kpi:hover { background: var(--surface-2); }
.pl-card, .tool, .ac-l, .tpl, .ob-opt, .jp-row, .wk, .pr-step, .al-row, .nb-item, .pl-item { transition: transform .22s cubic-bezier(.2,.7,.2,1), border-color .2s, background .2s, box-shadow .22s; }
.pl-card:hover, .tpl:hover, .wk:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.ac-l:hover, .jp-row:hover { transform: translateX(3px); }
.jc-cell { transition: transform .18s cubic-bezier(.2,.7,.2,1), border-color .2s, box-shadow .2s; }
.jc-cell:not(.out):hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 1; }
.tk-dir button, .chips button, .seg button, .tabs button { transition: background .18s, color .18s, border-color .18s, transform .12s; }
.tk-dir button:active, .chips button:active { transform: scale(.96); }

.wl-row .num.up { animation: flashUp .9s ease; } .wl-row .num.dn { animation: flashDn .9s ease; }
@keyframes flashUp { 0% { color: var(--pos); background: color-mix(in srgb, var(--pos) 22%, transparent); } }
@keyframes flashDn { 0% { color: var(--neg); background: color-mix(in srgb, var(--neg) 22%, transparent); } }
.streak.on span:first-child { display: inline-block; animation: flame 1.2s ease-in-out infinite; transform-origin: bottom center; }
@keyframes flame { 50% { transform: scale(1.15) rotate(-4deg); } }
.journey span.on { animation: popIn .5s cubic-bezier(.2,.9,.3,1.4) both; } @keyframes popIn { from { transform: scale(0); } }
.ckl li.ok::before { animation: popIn .35s cubic-bezier(.2,.9,.3,1.4) both; }
.chart.radar .shape { transform-origin: center; transform-box: fill-box; animation: radarIn .9s cubic-bezier(.2,.8,.2,1) .2s both; } @keyframes radarIn { from { transform: scale(0); opacity: 0; } }
.banner.prot { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.rv-pnl, .es-n { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
#view.enter .split-side, #view.enter .split-main > *, #view.enter .term-chart, #view.enter .term-side > *, #view.enter .term-bottom, #view.enter .pe-sec, #view.enter .gr-row, #view.enter .rv-main > *, #view.enter .rv-det, #view.enter .sn-hero, #view.enter .sn-side, #view.enter .ac-hero, #view.enter .ac-mod { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
#view.enter .term-side > :nth-child(2), #view.enter .split-main > :nth-child(2) { animation-delay: .06s; } #view.enter .term-side > :nth-child(3), #view.enter .split-main > :nth-child(3) { animation-delay: .12s; }
#view.enter .jc-cell { animation: cellIn .4s cubic-bezier(.2,.7,.2,1) both; }
#view.enter .jc-cell:nth-child(7n+2) { animation-delay: .03s; } #view.enter .jc-cell:nth-child(7n+3) { animation-delay: .06s; } #view.enter .jc-cell:nth-child(7n+4) { animation-delay: .09s; } #view.enter .jc-cell:nth-child(7n+5) { animation-delay: .12s; } #view.enter .jc-cell:nth-child(7n+6) { animation-delay: .15s; } #view.enter .jc-cell:nth-child(7n) { animation-delay: .18s; }
@keyframes cellIn { from { opacity: 0; transform: scale(.92); } }
#view.enter .tool, #view.enter .pl-card, #view.enter .tpl, #view.enter .ac-l { animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.chart.rbars rect { transform-box: fill-box; transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.7,.2,1) .2s both; }
.sn-hero { animation: none; } .sn-card { animation: rise .6s cubic-bezier(.2,.7,.2,1) .1s both; }
.tl-orb { box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent); }
@media (prefers-reduced-motion: reduce) { .tour-hl, .tour-hint, .tour-bar i.cur { animation: none !important; } }

/* ---------- stability: no hover movement that can trigger scrollbars or jumps ---------- */
.nav button:hover, .ac-l:hover, .jp-row:hover, .ob-opt:hover, .v:hover { transform: none; }
.jp-row:hover, .ac-l:hover { border-color: var(--accent); background: var(--surface-2); }
.jp-trades, .wl, .nb-list, .side, .split-side, .al-list, .coach-main .chat { overflow-x: hidden; }
.jp-trades { scrollbar-gutter: stable; }
.jc-cell:not(.out):hover { transform: none; box-shadow: none; border-color: var(--accent); }
.pl-card:hover, .tpl:hover, .wk:hover, .tool:hover { transform: none; }
.pl-card:hover, .tpl:hover, .wk:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: none; }
.tool:hover { filter: brightness(1.12); }
label.drop { display: block; }

/* ---------- sanctuary: smooth scene change ---------- */
.sn-hero { transition: background 0s; }
.sn-bg { position: absolute; inset: 0; transition: opacity .7s ease; }
.sn-hero > :not(.sn-bg) { position: relative; z-index: 1; }
.sn-hero .sn-arrow { position: absolute; z-index: 2; }
.sn-hero .sn-dots, .sn-hero .sn-scene { position: absolute; z-index: 2; }

/* ---------- account statistics ---------- */
.acct-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acct-stats > div { background: var(--surface); padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.acct-stats span { color: var(--muted); } .acct-stats strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--c, var(--accent)) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; margin: 4px auto 10px; }
.ds-ring > div { width: 92px; height: 92px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ds-ring strong { font: 800 28px var(--display); display: block; line-height: 1; } .ds-ring span { font-size: 11px; color: var(--muted); }
.ds-parts { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.ds-parts div { display: grid; grid-template-columns: minmax(0,1fr) 90px 34px; gap: 8px; align-items: center; } .ds-parts .gauge { margin: 0; height: 6px; }
.stat-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 1180px) { .acct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-grid { grid-template-columns: 1fr; } }

/* ---------- one-click trading on the chart ---------- */
.oc { position: absolute; right: 74px; top: 46px; z-index: 5; display: flex; align-items: stretch; gap: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 22px rgba(0,0,0,.35); border: 1px solid var(--line); background: var(--surface); }
.oc button { border: 0; cursor: pointer; padding: 6px 14px; display: flex; flex-direction: column; align-items: center; min-width: 96px; font-weight: 700; font-size: 11px; letter-spacing: .04em; transition: filter .15s; }
.oc button b { font: 700 15px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.oc-sell { background: var(--neg); color: #fff; } .oc-buy { background: var(--pos); color: #06150d; }
.oc button:hover { filter: brightness(1.1); } .oc button:disabled { opacity: .5; cursor: wait; }
.oc input { width: 74px; border: 0 !important; border-radius: 0 !important; text-align: center; background: var(--surface) !important; font-weight: 700; min-height: 0 !important; }
.oc-l { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 4px; background: var(--surface); } .oc-l span { font-size: 10px; color: var(--muted); }

/* ---------- trade chart: draft order + instrument picker ---------- */
.draft { position: absolute; left: 10px; top: 10px; z-index: 6; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: mdlIn .25s cubic-bezier(.2,.9,.3,1.15); max-width: calc(100% - 24px); }
.dr-l { display: flex; flex-direction: column; } .dr-l .muted { font-size: 12px; }
.dr-n { display: flex; gap: 14px; font-size: 13px; color: var(--muted); } .dr-n b { font-variant-numeric: tabular-nums; }
.dr-b { display: flex; gap: 6px; }
.sym-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 6px 10px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.sym-btn:hover { border-color: var(--accent); }
.sym-menu { left: 0; right: auto; width: 300px; max-height: 420px; overflow-y: auto; transform-origin: top left; }
.sym-menu input { width: 100%; margin-bottom: 6px; }
.sym-menu [data-sym] { display: flex !important; justify-content: space-between; gap: 10px; } .sym-menu [data-sym].on { background: var(--surface-2); }
.sym-menu [data-sym] .muted { font-size: 12px; }
.tc-sym { position: relative; z-index: 8; }

/* live terminal panels never animate on updates */
.term .pill, .term .tabs button, .term .tq-p, .term td, .term .tg-bar span { animation: none !important; }
.tg-bar span { transition: left .4s ease; }

/* the sticky top bar always stays above page content (page headers sit above cards, below the bar) */
.top { z-index: 15; }
.page-h { z-index: 12; }

/* ---------- timeframe picker ---------- */
.tf-seg { display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; margin-left: auto; }
.tf-seg button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 4px 7px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; }
.tf-seg button:hover { color: var(--ink); background: var(--surface-2); }
.tf-seg button.on { background: var(--accent); color: var(--accent-ink); }
.tc-pick { margin-left: 0; }

/* ---------- auth extras ---------- */
.auth-forgot { margin-top: 10px; text-align: right; font-size: 14px; }
.auth-err.ok { color: var(--pos); }
.auth select { width: 100%; min-height: 46px; }

/* ---------- AI Mentor memory ---------- */
.mentor-mem { margin-bottom: 20px; }
.mm-list { display: flex; flex-direction: column; gap: 8px; }
.mm { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 8px; }
.mm.high { border-left-color: var(--neg); } .mm.good { border-left-color: var(--pos); } .mm.gone { opacity: .6; }
.mm strong { display: block; font-size: 14px; } .mm .muted { font-size: 13px; }
.mm-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; font-weight: 700; }
.mm-t { font-size: 12px; font-weight: 600; color: var(--muted); }
.mm.worse .mm-t { color: var(--neg); } .mm.improving .mm-t, .mm.gone .mm-t { color: var(--pos); }
.pill.info { color: #8ab4ff; background: color-mix(in srgb, #8ab4ff 15%, transparent); }
.rv-mentor .ai-out { margin-top: 0; }
#t-lvl.on { border-color: var(--accent); color: var(--accent); }

/* ---------- persistent trading layer ---------- */
.term-host { display: block; padding: 28px; outline: none; min-width: 0; }
.term-host[hidden] { display: none !important; }
@media (max-width: 820px) { .term-host { padding: 18px 16px; } }
/* hidden terminal stays laid out off-screen so the TradingView chart never has to repaint */
.term-host.off { position: fixed; left: -20000px; top: 0; width: calc(100vw - 260px); visibility: hidden; pointer-events: none; }
@media (max-width: 820px) { .term-host.off { width: 100vw; } }

/* ---------- price source + multi-account ticket ---------- */
.tk-src { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.tk-refline { font-size: 12px; margin-top: -4px; }
.tk-accts { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.tk-accts summary { cursor: pointer; color: var(--ink); }
.tk-accts .pc { padding: 3px 0; }

/* ---------- price view toggle + level menu ---------- */
.pv { display: flex; gap: 4px; align-items: center; }
.lv-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

/* visible log out in the top bar */
.top-logout{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none}
@media (max-width:1100px){.top-logout span{display:none}}
.top-logout svg{opacity:.8}
/* accounts without a connection */
.off-pill{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;border-color:rgba(255,92,92,.45)!important;color:#ff8a8a!important}
.off-pill .dot{width:8px;height:8px;border-radius:50%;background:#ff5c5c;box-shadow:0 0 0 3px rgba(255,92,92,.18)}
.off-row{border:1px solid rgba(255,92,92,.3);background:rgba(255,92,92,.06);border-radius:10px;padding:12px 14px;margin-top:12px}
.off-row p{margin:6px 0 0;line-height:1.5}
#off-slot:empty{display:none}
@media (max-width:720px){.top-logout span{display:none}}

