:root {
  --ui: 'Inter Tight', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --num: 'JetBrains Mono', Consolas, monospace;
  --bg: #F4F5F8; --surface: #FFFFFF; --surface-2: #F1F3F7; --line: #E3E6EC; --line-2: #D3D8E1;
  --ink: #0C1322; --ink-2: #4A5568; --ink-3: #8690A2;
  --brand: #4F55E8; --bull: #0D9A5F; --bear: #DC3A4D; --amber: #D08505;
  --bull-soft: rgba(13,154,95,.11); --bear-soft: rgba(220,58,77,.10); --amber-soft: rgba(208,133,5,.13);
  --brand-soft: rgba(79,85,232,.10);
  --shadow: 0 1px 2px rgba(15,23,42,.05); --pop: 0 30px 70px -20px rgba(15,23,42,.35);
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #05070B; --surface: #0B0F16; --surface-2: #121823; --line: #19202C; --line-2: #263042;
  --ink: #ECF1F8; --ink-2: #A3AEC0; --ink-3: #66728A;
  --brand: #8083FF; --bull: #1FDE8A; --bear: #FF526B; --amber: #FFB224;
  --bull-soft: rgba(31,222,138,.12); --bear-soft: rgba(255,82,107,.12); --amber-soft: rgba(255,178,36,.13);
  --brand-soft: rgba(128,131,255,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.4); --pop: 0 30px 80px -20px rgba(0,0,0,.9);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.4 var(--ui); -webkit-font-smoothing: antialiased; }
h2 { font-size: 14px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
small, .muted { color: var(--ink-3); }
small { font-size: 12px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.bull { color: var(--bull); } .bear { color: var(--bear); } .amber { color: var(--amber); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.app.min { grid-template-columns: 68px minmax(0, 1fr); }
.app.min .lbl { display: none; }
.app.min .brandrow, .app.min .sidefoot { flex-direction: column; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.mark { display: grid; gap: 3px; width: 22px; }
.mark i { height: 4px; border-radius: 2px; background: var(--bull); }
.mark i:nth-child(2) { width: 70%; background: var(--brand); }
.mark i:nth-child(3) { width: 85%; background: var(--bear); }
.ghost { border: 0; background: none; color: var(--ink-3); font-size: 18px; padding: 2px 6px; border-radius: 6px; }
.ghost:hover { background: var(--surface-2); color: var(--ink); }
nav { display: grid; gap: 4px; }
.navi { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; background: none; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-align: left; }
.navi svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.navi:hover { background: var(--surface-2); }
.navi.on { background: var(--surface-2); color: var(--ink); }
.navi.on svg { color: var(--bull); }
.sect { padding: 18px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sidefoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.status { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-width: 0; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status.live .dot { background: var(--bull); box-shadow: 0 0 0 4px var(--bull-soft); }
.status.opening .dot { background: var(--amber); }
.themes { display: flex; background: var(--surface-2); border-radius: 99px; padding: 3px; flex: none; }
.themes button { width: 30px; height: 28px; border: 0; background: none; border-radius: 99px; color: var(--ink-3); }
.themes button.on { background: var(--surface); color: var(--amber); box-shadow: var(--shadow); }

.main { min-width: 0; }
.topbar { display: flex; padding: 10px 16px 6px; }
.search { position: relative; display: flex; align-items: center; gap: 8px; width: min(380px, 100%); padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.search:focus-within { border-color: var(--brand); }
.search .glass { color: var(--ink-3); font-size: 17px; }
.search input { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: none; outline: 0; }
kbd { font: 600 11px var(--ui); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.results { position: absolute; left: 0; top: 42px; width: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--pop); overflow: hidden; }
.results button { display: flex; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; }
.results button:hover, .results button:focus { background: var(--surface-2); }

main { padding: 6px 16px 14px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 16px 9px; }
.foot { color: var(--ink-3); font-size: 12px; margin: 0; }
.empty { padding: 26px 16px; color: var(--ink-3); text-align: center; }

/* ---------- terminal stage: fan -> cards -> pick panels ---------- */
.stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1fr); height: max(620px, calc(100vh - 92px)); }
.fanwrap { position: relative; min-width: 0; min-height: 0; }
#fan { width: 100%; height: 100%; display: block; cursor: crosshair; }
.seclist { position: absolute; left: 40px; display: grid; gap: 1px; font: 500 10.5px var(--num); pointer-events: none; }
.seclist.up { top: 84px; } .seclist.dn { bottom: 26px; }
.seclist div { display: flex; gap: 10px; justify-content: space-between; min-width: 132px; color: var(--ink-2); }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--bg); padding: 5px 9px; border-radius: 7px; font: 600 12px var(--num); white-space: nowrap; transform: translate(-50%, -140%); }

.cards, .panels { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.panels { padding-left: 10px; }
.half { flex: 1; min-height: 0; }
.cards .half { display: grid; grid-template-columns: 1fr 1fr 1.15fr 1.55fr; gap: 6px; }
.col { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.c1 { grid-column: 1; grid-row: 1; } .c2 { grid-column: 2; grid-row: 1; } .c3 { grid-column: 3; grid-row: 1; } .c4 { grid-column: 4; grid-row: 1; }
.tile-c { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; text-align: left; overflow: hidden;
  border-radius: 5px; border: 1px solid var(--edge); background: linear-gradient(180deg, var(--tint), transparent 130%); color: var(--ink); }
.bull .tile-c { --edge: color-mix(in srgb, var(--bull) 38%, transparent); --tint: var(--bull-soft); --c: var(--bull); }
.bear .tile-c { --edge: color-mix(in srgb, var(--bear) 38%, transparent); --tint: var(--bear-soft); --c: var(--bear); }
.half .tile-c.ev { --edge: color-mix(in srgb, var(--amber) 45%, transparent); --tint: var(--amber-soft); --c: var(--amber); }
.tile-c:hover, .tile-c:focus-visible { border-color: var(--c); outline: 0; box-shadow: 0 0 0 1px var(--c), 0 0 18px -4px var(--c); }
.tile-c.pk { border-color: var(--c); box-shadow: 0 0 22px -8px var(--c); }
.tile-c .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.tile-c .hd b { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.tile-c .hd span { font: 600 10px var(--num); color: var(--c); flex: none; }
.tile-c .sub { display: flex; justify-content: space-between; gap: 4px; overflow: hidden; font: 500 10px var(--num); color: var(--ink-2); white-space: nowrap; }
.tile-c .tg { font: 800 9.5px var(--ui); letter-spacing: .05em; color: var(--ink); white-space: nowrap; }
.tile-c .rk { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; margin-right: 5px; border-radius: 4px; background: var(--c); color: var(--bg); font: 800 10px var(--num); }
.prof { flex: 1; min-height: 6px; width: 100%; display: block; }
.prof rect { fill: var(--c); opacity: .55; } .prof rect.at { opacity: 1; fill: var(--ink); }
.c3 .tile-c .hd, .c4 .tile-c .hd { font-size: 12px; }
.c4 .tile-c { padding: 6px 8px; }

.panels .half { display: flex; flex-direction: column; gap: 8px; }
.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; text-align: left; padding: 8px 10px 4px; border-radius: 10px; overflow: hidden; color: var(--ink);
  border: 1px solid var(--edge); background: linear-gradient(135deg, var(--tint), transparent 70%); }
.panel.bull { --edge: color-mix(in srgb, var(--bull) 35%, transparent); --tint: var(--bull-soft); --c: var(--bull); }
.panel.bear { --edge: color-mix(in srgb, var(--bear) 35%, transparent); --tint: var(--bear-soft); --c: var(--bear); }
.panel:hover { border-color: var(--c); }
.panel .ph { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.panel .ph b { font-size: 15px; } .panel .ph small { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .panel .ph .chip, .panel .ph .r { flex: none; }
.panel .ph .chip { font: 800 10px var(--ui); letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; background: var(--c); color: var(--bg); }
.panel .ph .r { margin-left: auto; font: 600 12px var(--num); }
.panel .pm { display: flex; gap: 12px; font: 500 11px var(--num); color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.panel .pm i { font-style: normal; color: var(--amber); font-weight: 700; }
.panel canvas { flex: 1; min-height: 0; width: 100%; display: block; }
.panel.none { place-content: center; align-items: center; color: var(--ink-3); border-style: dashed; }

/* ---------- popup ---------- */
.spark { width: 100%; height: 22px; }
.spark.big { width: 120px; height: 32px; }
.spark polyline { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4,6,10,.6); display: grid; place-items: center; padding: 20px; }
.pop { width: min(1120px, 100%); max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--pop); }
.pop-head { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pop-head h2 { font-size: 20px; }
.pprice { margin-left: auto; text-align: right; }
.pprice b { display: block; font-size: 20px; }
.pnav { display: flex; gap: 6px; }
.pnav button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); }
.pop-body { display: grid; grid-template-columns: 300px 1fr; }
.facts { padding: 14px 18px; border-right: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.fact { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.fact span { color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.fact b { font: 600 13px var(--num); text-align: right; }
.notice { margin: 8px 0; padding: 9px 11px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.align { margin-top: 10px; display: grid; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.align h3 { margin: 0 0 2px; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; }
.align i { font-style: normal; font-weight: 700; margin-right: 6px; }
.chartwrap { padding: 10px; min-width: 0; }
#chart { width: 100%; height: 440px; display: block; }

/* ---------- journal ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { padding: 14px 16px; }
.tile span { font-size: 12px; color: var(--ink-3); }
.tile b { display: block; font: 700 22px var(--num); }
.jgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
.jform { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jform h2, .wide { grid-column: 1 / -1; }
.jform label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.jform input, .jform select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); min-width: 0; }
.primary { padding: 10px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; }
.err { color: var(--bear); margin: 0; grid-column: 1 / -1; font-size: 13px; }
.calnav { display: flex; align-items: center; gap: 8px; }
.calnav button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; width: 26px; height: 26px; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 16px 16px; }
.calgrid .dow { font-size: 11px; color: var(--ink-3); text-align: center; }
.day { aspect-ratio: 1; border-radius: 7px; background: var(--surface-2); padding: 4px 5px; font-size: 11px; color: var(--ink-3); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.day b { font: 600 10px var(--num); color: var(--ink); }
.day.blank { background: none; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 6px 16px; font-size: 13px; }
.bar i { grid-column: 1 / -1; height: 6px; border-radius: 3px; display: block; }
.bysetup > div { padding-bottom: 10px; }
.tablewrap { overflow-x: auto; padding: 0 8px 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.n, th.n { text-align: right; font-family: var(--num); }
td.note { white-space: normal; min-width: 160px; color: var(--ink-2); }
.del { border: 0; background: none; color: var(--ink-3); }
.del:hover { color: var(--bear); }

@media (max-width: 1500px) { .app { grid-template-columns: 68px minmax(0, 1fr); } .app .lbl { display: none; } .brandrow, .sidefoot { flex-direction: column; }
  .jgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .app, .app.min { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brandrow, .sidefoot { flex-direction: row; padding: 0; border: 0; margin: 0; } #collapse, .sect { display: none; }
  nav { display: flex; } .navi { padding: 8px; } .sidefoot { margin-left: auto; }
  .stage { display: grid; grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
  .fanwrap { height: 380px; } .seclist { display: none; } .panels { padding: 0; order: 2; } .cards { order: 3; }
  .cards .half { grid-template-columns: 1fr 1fr; } .col { display: contents; } .tile-c { min-height: 62px; }
  .c1, .c2, .c3, .c4 { grid-column: auto; grid-row: auto; }
  .panel { min-height: 190px; }
  .tiles { grid-template-columns: repeat(2, 1fr); } .jgrid, .pop-body { grid-template-columns: 1fr; }
  .facts { border-right: 0; border-bottom: 1px solid var(--line); }
  .overlay { padding: 0; place-items: end stretch; } .pop { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .pop-head { flex-wrap: wrap; gap: 10px; } .pop-head .spark { display: none; } #chart { height: 320px; }
}

/* ---------- home and member pages ---------- */
.user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; min-width: 0; }
.user + .sidefoot { margin-top: 10px; }
.avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--bear)); }
.user .lbl { display: grid; min-width: 0; } .user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hello h1 { margin: 6px 0 2px; font-size: 26px; letter-spacing: -.02em; } .hello p { margin: 0; }
.link { color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; } .link:hover { text-decoration: underline; }
.pad { padding: 0 16px 14px; }
.hpicks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 0 16px 16px; }
.hpick { display: grid; gap: 4px; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); min-width: 0; }
.hpick.bull:hover { border-color: var(--bull); } .hpick.bear:hover { border-color: var(--bear); }
.hpick .tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.hpick .sym { display: flex; justify-content: space-between; gap: 6px; font-size: 15px; }
.hpick .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.hgrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; align-items: start; }
.sec { display: grid; grid-template-columns: 96px 62px 1fr; gap: 8px; align-items: center; padding: 5px 0; }
.sec .cells { display: flex; gap: 3px; flex-wrap: wrap; }
.cell { width: 13px; height: 13px; border-radius: 3px; border: 0; padding: 0; } .cell:hover { outline: 2px solid var(--ink); }
.jsum { display: flex; gap: 26px; padding-bottom: 10px; } .jsum span { display: block; font-size: 12px; color: var(--ink-3); } .jsum b { font-size: 20px; }
.jrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.inline { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 16px 16px; }
.inline input, .inline select { flex: 1 1 180px; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); }
.inline select { flex: 0 0 110px; } .inline .primary { padding: 9px 20px; }
.err.pad { padding: 0 16px 12px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vid { overflow: hidden; } .vid iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.vmeta { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; } .vmeta small { display: block; }
.feed { display: grid; gap: 10px; }
.post { padding: 12px 16px; } .post p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.phd { display: flex; align-items: baseline; gap: 10px; } .phd .del { margin-left: auto; }
.narrow { max-width: 560px; }
@media (max-width: 1100px) { .hpicks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hgrid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .user { display: none; } .hpicks { grid-template-columns: repeat(2, minmax(0, 1fr)); } nav { overflow-x: auto; } }
@media (max-width: 1500px) { .user .lbl { display: none; } }
.app.min .user .lbl { display: none; }

/* ---------- v4: cards, strip, stock sheet and floating popup ---------- */
.stage { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.05fr); }
.seclist { left: 34px; gap: 5px; font: inherit; }
.seclist.up { top: 132px; } .seclist.dn { bottom: 24px; }
.secbox { display: grid; gap: 4px; width: 178px; padding: 4px 8px 5px; border: 1px solid var(--line-2); border-radius: 6px; background: color-mix(in srgb, var(--bg) 78%, transparent); }
.secbox > span:first-child { display: flex; justify-content: space-between; gap: 8px; }
.secbox b { font: 600 10.5px var(--ui); letter-spacing: .08em; color: var(--ink-2); }
.secbox i { font: 600 10.5px var(--num); font-style: normal; }
.cellrow { display: flex; gap: 1.5px; } .cellrow i { flex: 1; height: 5px; border-radius: 1px; background: var(--bear); opacity: .75; } .cellrow i.u { background: var(--bull); }

.tile-c { position: relative; display: block; padding: 0; border-radius: 4px; overflow: visible; background: color-mix(in srgb, var(--c) 9%, var(--bg)); }
.tile-c .prof { position: absolute; inset: 0; width: 100%; height: 100%; }
.prof rect { fill: var(--c); opacity: .42; } .prof rect.hi { opacity: .9; }
.tile-c .hdr { position: absolute; left: 3px; top: 3px; display: flex; align-items: flex-start; gap: 5px; max-width: calc(100% - 26px); padding: 2px 5px 3px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.tile-c .hdr > span { display: grid; min-width: 0; line-height: 1.15; }
.tile-c .hdr b { font: 800 11px var(--ui); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-c .hdr em { font: 600 10px var(--num); font-style: normal; color: var(--c); }
.tile-c.s3 .hdr b { font-size: 12.5px; } .tile-c.s4 .hdr b { font-size: 14px; } .tile-c.s4 .hdr em { font-size: 12px; }
.tile-c u { text-decoration: none; }
.stars { font-size: 7px; letter-spacing: 1.5px; color: var(--c); line-height: 1.5; white-space: nowrap; } .stars s { text-decoration: none; opacity: .28; }
.stars.bull { color: var(--bull); } .stars.bear { color: var(--bear); }
.tile-c .tg { font: 800 8.5px var(--ui); letter-spacing: .06em; color: var(--ink); white-space: nowrap; }
.ini { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--bg)); font: 800 10px var(--ui); font-style: normal; color: var(--ink); text-transform: uppercase; }
.rkb { position: absolute; right: 3px; top: 4px; padding: 0 3px; border: 1px solid var(--edge); border-radius: 3px; background: color-mix(in srgb, var(--bg) 70%, transparent); font: 600 9px var(--num); color: var(--c); }
.lastline { position: absolute; left: 4px; right: 0; height: 0; border-top: 1px dashed color-mix(in srgb, var(--ink) 65%, transparent); }
.lastline i { position: absolute; right: 2px; top: -7px; padding: 0 4px; border-radius: 2px; background: var(--ink); color: var(--bg); font: 700 9px var(--num); font-style: normal; line-height: 13px; }
.tile-c.s1 .lastline i { display: none; }
.tile-c.pk::after { content: ''; position: absolute; inset: -3px; pointer-events: none; --k: var(--ink);
  background: linear-gradient(var(--k), var(--k)) 0 0 / 9px 2px no-repeat, linear-gradient(var(--k), var(--k)) 0 0 / 2px 9px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 0 / 9px 2px no-repeat, linear-gradient(var(--k), var(--k)) 100% 0 / 2px 9px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 100% / 9px 2px no-repeat, linear-gradient(var(--k), var(--k)) 0 100% / 2px 9px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 100% / 9px 2px no-repeat, linear-gradient(var(--k), var(--k)) 100% 100% / 2px 9px no-repeat; }

.sh-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sh-head .ini { width: 26px; height: 26px; font-size: 11px; }
.sh-head .nm { display: grid; min-width: 0; line-height: 1.15; } .sh-head .nm b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-head .nm small { font: 500 9.5px var(--num); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-head .spark { margin-left: auto; width: 84px; height: 22px; flex: none; }
.sh-price { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; white-space: nowrap; }
.sh-price b { font-size: 12.5px; } .sh-price span { font-size: 11.5px; font-weight: 600; }
.sh-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; margin-top: 3px; }
.sh-grid.one { grid-template-columns: 1fr; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2.5px 0; font: 500 10.5px var(--num); white-space: nowrap; min-width: 0; }
.kv i { font-style: normal; color: var(--ink-3); letter-spacing: .05em; flex: none; } .kv b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .kv em { font-style: normal; }
.sh-grid:not(.one) .kv:nth-child(odd) { padding-right: 14px; border-right: 1px solid var(--line); }

.panel { flex-direction: row; gap: 10px; padding: 8px 6px 6px 10px; border-left: 3px solid var(--c); }
.panel .pinfo { flex: 0 0 47%; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel .sh-head .spark { display: none; }
.panel canvas { flex: 1; min-width: 0; height: 100%; }
.panel .kv:nth-child(n+7) { display: none; }

.overlay { position: fixed; inset: 0; z-index: 50; display: block; padding: 0; background: none; pointer-events: none; }
.pop { position: absolute; left: 0; top: 0; width: 430px; max-height: none; overflow: visible; padding: 12px 14px 10px; display: flex; flex-direction: column; pointer-events: auto;
  border-radius: 12px; border: 1px solid var(--line-2); border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 5%, var(--surface)); box-shadow: var(--pop), 0 0 0 1px color-mix(in srgb, var(--c) 25%, transparent); }
.pop.bull { --c: var(--bull); } .pop.bear { --c: var(--bear); } .pop .ini { --edge: var(--c); }
.pop .pnav { margin-left: 6px; flex: none; } .pop .pnav button { width: 26px; height: 26px; border-radius: 7px; }
.pop .notice { margin: 6px 0 0; padding: 7px 9px; font-size: 12px; }
#chart { width: 100%; height: 250px; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 900px) {
  .overlay { pointer-events: auto; background: rgba(4,6,10,.6); display: grid; place-items: end stretch; }
  .pop { position: static; width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; overflow: auto; }
  .panel { min-height: 170px; }
}
.seclist .secbox { display: grid; min-width: 0; }
.seclist .secbox > span { display: flex; }
.tile-c .hdr { overflow: hidden; z-index: 1; } .rkb { z-index: 1; }
.panel .kv:nth-child(-n+4), .panel .kv:nth-child(n+8) { display: none; }
.panel .sh-head .ini { width: 22px; height: 22px; font-size: 10px; } .panel .sh-head .nm b { font-size: 14px; }
.panel .sh-price { margin-top: 3px; }
.panel .sh-price { display: none; }
.hp { margin-left: auto; display: grid; text-align: right; line-height: 1.2; flex: none; } .hp b { font-size: 12px; } .hp i { font-style: normal; font-size: 11px; font-weight: 600; }
.panel .sh-grid { margin-top: 5px; }
.panel { padding: 6px 6px 5px 10px; } .panel .kv { padding: 1px 0; font-size: 10px; } .panel .sh-grid { margin-top: 3px; }
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .tile-c { flex: none; height: 76px; }
  .panel { min-height: 150px; }
  .panel .kv { font-size: 10.5px; padding: 2px 0; }
}
.panel .kv:nth-child(7) { display: flex; }
@media (max-height: 820px) and (min-width: 901px) { .panel .sh-head .nm small { display: none; } .panel .sh-grid { margin-top: 1px; } .panel { padding-top: 4px; padding-bottom: 3px; } }

/* ---------- v5: two-column board (fan + card funnel), compact sector boxes, condensed card names ---------- */
@media (min-width: 901px) {
  .stage { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); }
  .panels { display: none; }
  .cards .half { grid-template-columns: .8fr 1fr 1.2fr 1.6fr; gap: 5px; }
}
.seclist { left: 36px; gap: 3px; }
.seclist.up { top: 126px; } .seclist.dn { bottom: 30px; }
.secbox { width: 122px; gap: 2px; padding: 2px 5px 3px; border-radius: 3px; }
.secbox b { font: 600 8.5px var(--ui); letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secbox i { font: 600 8.5px var(--num); }
.cellrow i { height: 4px; }
.tile-c .hdr { max-width: calc(100% - 28px); padding: 2px 6px 3px 5px; }
.tile-c .hdr b { font: 700 12px Bahnschrift, 'Arial Narrow', var(--ui); font-stretch: 82%; letter-spacing: .02em; text-transform: uppercase; }
.tile-c.s2 .hdr b { font-size: 13px; } .tile-c.s3 .hdr b { font-size: 14.5px; } .tile-c.s4 .hdr b { font-size: 17px; }
.tile-c.s3 .hdr em { font-size: 11px; } .tile-c.s4 .hdr em { font-size: 13px; }
.tile-c .prof { -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 3px); }
.rkb { top: 50%; transform: translateY(-50%); }
.tile-c.s4 .rkb, .tile-c.s3 .rkb { top: 22px; transform: none; }
.tile-c.s1 .hdr b { font-size: 11px; font-stretch: 75%; } .tile-c.s1 .hdr { max-width: calc(100% - 22px); padding-right: 3px; }
#flow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* heat: the stronger the move, the deeper the card colour */
.tile-c { background: color-mix(in srgb, var(--c) calc(4% + var(--heat, .3) * 52%), var(--bg)); }
.tile-c .prof rect { opacity: calc(.3 + var(--heat, .3) * .35); } .tile-c .prof rect.hi { opacity: calc(.6 + var(--heat, .3) * .4); }

/* ---------- v6: depth, shadows and springy, physical interaction ---------- */
:root { --shade: rgba(20,30,60,.28); --shade-2: rgba(20,30,60,.4); --gloss: rgba(255,255,255,.7); --spring: cubic-bezier(.34,1.56,.64,1); }
:root[data-theme=dark] { --shade: rgba(0,0,0,.75); --shade-2: rgba(0,0,0,.95); --gloss: rgba(255,255,255,.09); }
.tile-c { --rx: 0deg; --ry: 0deg; transform: perspective(600px) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; will-change: transform;
  transition: transform .4s var(--spring), box-shadow .25s ease, border-color .2s ease;
  box-shadow: inset 0 1px 0 var(--gloss), inset 0 -12px 18px -12px var(--shade), 0 8px 16px -8px var(--shade-2), 0 0 calc(var(--heat, .3) * 30px) -8px var(--c); }
.tile-c:hover, .tile-c:focus-visible, .tile-c.hot { z-index: 5; border-color: var(--c);
  transform: perspective(600px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px) scale(1.05);
  box-shadow: inset 0 1px 0 var(--gloss), 0 22px 34px -12px var(--shade-2), 0 0 0 1px var(--c), 0 0 34px -4px var(--c); }
.tile-c:active { transform: perspective(600px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(0) scale(.96); transition-duration: .08s; }
.tile-c::before { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(130px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--ink) 24%, transparent), transparent 70%); }
.tile-c:hover::before { opacity: 1; }
.tile-c.pk { box-shadow: inset 0 1px 0 var(--gloss), 0 12px 24px -10px var(--shade-2), 0 0 30px -8px var(--c); }
.tile-c .hdr { box-shadow: 0 3px 8px -3px var(--shade); } .rkb, .lastline i { box-shadow: 0 2px 5px -1px var(--shade); }
.secbox { box-shadow: inset 0 1px 0 var(--gloss), 0 6px 12px -6px var(--shade-2); }
.pop { box-shadow: 0 40px 90px -20px var(--shade-2), 0 12px 28px -10px var(--shade), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), 0 0 60px -18px var(--c); animation: popin .34s var(--spring); }
@keyframes popin { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
.navi { transition: transform .3s var(--spring), background .15s ease; } .navi:hover { transform: translateX(3px); } .navi:active { transform: scale(.96); }
.navi.on { box-shadow: inset 0 1px 0 var(--gloss), 0 8px 16px -10px var(--shade-2); }
.search, .status { box-shadow: inset 0 1px 0 var(--gloss), 0 8px 18px -12px var(--shade-2); }
@media (prefers-reduced-motion: reduce) { .tile-c, .navi { transition: none; } .tile-c, .tile-c:hover, .tile-c.hot, .tile-c:active { transform: none; } .pop { animation: none; } }
/* price tick flash */
.lastline i.tk-up { animation: tkup 1.2s ease-out; } .lastline i.tk-dn { animation: tkdn 1.2s ease-out; }
@keyframes tkup { 0% { background: var(--bull); color: #04130c; transform: scale(1.25); box-shadow: 0 0 14px var(--bull); } 100% { transform: none; } }
@keyframes tkdn { 0% { background: var(--bear); color: #fff; transform: scale(1.25); box-shadow: 0 0 14px var(--bear); } 100% { transform: none; } }
.hdr em.tk-up, .hdr em.tk-dn { animation: tkpct 1.2s ease-out; } @keyframes tkpct { 0% { color: var(--ink); text-shadow: 0 0 10px var(--c); } }
/* live ticks: changed digits roll into place and the number flashes, broker-terminal style */
.dg { display: inline-block; }
.dg.ru { animation: rollu .38s cubic-bezier(.2,.8,.2,1); } .dg.rd { animation: rolld .38s cubic-bezier(.2,.8,.2,1); }
@keyframes rollu { from { transform: translateY(80%); opacity: 0; } } @keyframes rolld { from { transform: translateY(-80%); opacity: 0; } }
.lastline i { overflow: hidden; }
.lastline i.tk-up { animation: tkup .9s ease-out; } .lastline i.tk-dn { animation: tkdn .9s ease-out; }
@keyframes tkup { 0%, 35% { background: var(--bull); color: #04130c; box-shadow: 0 0 12px var(--bull); } }
@keyframes tkdn { 0%, 35% { background: var(--bear); color: #fff; box-shadow: 0 0 12px var(--bear); } }
.hdr em.tk-up, .hdr em.tk-dn { animation: tkpct .9s ease-out; }

/* ---------- paper trading desk ---------- */
.idx { display: flex; gap: 10px; flex-wrap: wrap; }
.ix { display: flex; align-items: baseline; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: inset 0 1px 0 var(--gloss), 0 8px 18px -12px var(--shade-2); }
.ix span { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); } .ix b { font-size: 15px; } .ix small { font-size: 12px; font-weight: 600; }
.tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tiles.five .tile b { font-size: 19px; }
.desk { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.wladd { position: relative; padding: 0 12px 8px; } .wladd input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); outline: 0; }
.wladd input:focus { border-color: var(--brand); } .wladd .results { left: 12px; width: calc(100% - 24px); top: 40px; }
.wlrows { max-height: 520px; overflow: auto; }
.wlrow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background .15s ease; }
.wlrow:hover, .wlrow:focus-within { background: var(--surface-2); }
.wn { display: grid; min-width: 0; line-height: 1.25; } .wn b { font-size: 13.5px; } .wn small { font-size: 10.5px; color: var(--ink-3); letter-spacing: .03em; }
.wp { display: grid; justify-items: end; line-height: 1.25; } .wp b { font-size: 13.5px; font-weight: 600; } .wp small { font-size: 10.5px; font-weight: 600; }
.wp .ltp { padding: 0 3px; border-radius: 3px; } .wp .ltp.tk-up { animation: wup .9s ease-out; } .wp .ltp.tk-dn { animation: wdn .9s ease-out; }
@keyframes wup { 0%, 30% { background: color-mix(in srgb, var(--bull) 30%, transparent); } } @keyframes wdn { 0%, 30% { background: color-mix(in srgb, var(--bear) 30%, transparent); } }
.ix .v.tk-up { animation: wup .9s ease-out; } .ix .v.tk-dn { animation: wdn .9s ease-out; } .ix .v { padding: 0 3px; border-radius: 3px; }
.wact { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; gap: 5px; padding: 3px; border-radius: 8px; background: var(--surface-2); box-shadow: -14px 0 12px 2px var(--surface-2); }
.wlrow:hover .wact, .wlrow:focus-within .wact { display: flex; }
.tb { width: 30px; height: 28px; border: 0; border-radius: 6px; font: 800 12px var(--ui); color: #fff; transition: transform .25s var(--spring), filter .15s; box-shadow: 0 4px 10px -4px var(--shade-2); }
.tb:hover { transform: translateY(-1px) scale(1.07); filter: brightness(1.12); } .tb:active { transform: scale(.93); }
.tb.b { background: #12A26A; } .tb.s { background: #E0445A; } .tb.x { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); }
.pop .pnav .tb { width: 28px; height: 26px; color: #fff; }
.book > header { align-items: center; }
.tabs { display: flex; gap: 4px; } .tabs button { padding: 7px 14px; border: 0; border-bottom: 2px solid transparent; background: none; font-weight: 700; color: var(--ink-3); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.bookact { display: flex; gap: 8px; }
.mini { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.mini:hover { border-color: var(--brand); color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { padding: 8px 14px; text-align: right; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; } .tbl small { color: var(--ink-3); font-weight: 500; }
.tbl tr.shut td { opacity: .55; } .tbl tfoot td { font-weight: 700; border-bottom: 0; }
.chip { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; }
.st { padding: 2px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; background: var(--surface-2); }
.st.executed { color: var(--bull); background: var(--bull-soft); } .st.rejected { color: var(--bear); background: var(--bear-soft); } .st.open { color: var(--amber); background: var(--amber-soft); }
.pnote { margin: 0; padding: 10px 16px 12px; font-size: 11.5px; color: var(--ink-3); }
#tBook { overflow-x: auto; min-height: 150px; }
.opad { --c: #12A26A; position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 340px; display: grid; gap: 12px; padding: 0 16px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface);
  box-shadow: 0 40px 90px -20px var(--shade-2), 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 0 50px -16px var(--c); animation: popin .34s var(--spring); }
.opad[hidden] { display: none; } .opad.sell { --c: #E0445A; }
.opad > header { display: flex; align-items: center; gap: 10px; margin: 0 -16px; padding: 12px 12px 12px 16px; border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-bottom: 2px solid var(--c); }
.osym { display: grid; flex: 1; min-width: 0; line-height: 1.3; } .osym b { font-size: 16px; } .osym small { font-size: 12px; font-weight: 600; }
.bs, .seg { display: flex; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.bs button, .seg button { flex: 1; padding: 6px 12px; border: 0; border-radius: 7px; background: none; font-weight: 700; font-size: 12.5px; color: var(--ink-3); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); } .bs button.on { background: var(--c); color: #fff; }
.opad label { display: grid; gap: 5px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); }
.opad label[hidden] { display: none; }
.opad input { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface-2); font: 600 15px var(--num); outline: 0; }
.opad input:focus { border-color: var(--c); }
.oinfo { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12.5px; color: var(--ink-2); } .oinfo b { text-align: right; color: var(--ink); }
.place { height: 44px; border: 0; border-radius: 10px; background: var(--c); color: #fff; font-weight: 800; font-size: 14.5px; box-shadow: 0 12px 22px -10px var(--c); transition: transform .25s var(--spring), filter .15s; }
.place:hover { filter: brightness(1.1); transform: translateY(-1px); } .place:active { transform: scale(.97); }
.opad .err { margin: 0; font-size: 12.5px; color: var(--bear); }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translateX(-50%); max-width: min(560px, 92vw); padding: 11px 18px; border-radius: 11px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13.5px; box-shadow: 0 20px 50px -12px var(--shade-2); animation: popin .3s var(--spring); }
.toast.good { background: #12A26A; color: #fff; } .toast.bad { background: #E0445A; color: #fff; } .toast[hidden] { display: none; }
@media (max-width: 1100px) { .desk { grid-template-columns: minmax(0, 1fr); } .tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wact { display: flex; position: static; transform: none; box-shadow: none; } .opad { right: 8px; left: 8px; bottom: 8px; width: auto; } }

/* ---------- big chart ---------- */
.bigc { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(1240px, 80vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line-2);
  box-shadow: -40px 0 90px -20px var(--shade-2); animation: bigin .32s cubic-bezier(.2,.8,.2,1); }
.bigc[hidden] { display: none; }
@keyframes bigin { from { transform: translateX(40px); opacity: 0; } }
.bigc > header { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.bcsym { display: grid; flex: 1; min-width: 0; line-height: 1.3; } .bcsym b { font-size: 18px; } .bcsym small { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.bcpx { display: grid; justify-items: end; line-height: 1.3; } .bcpx b { font-size: 18px; padding: 0 4px; border-radius: 4px; } .bcpx small { font-size: 12px; font-weight: 600; }
.bcpx b.tk-up { animation: wup .9s ease-out; } .bcpx b.tk-dn { animation: wdn .9s ease-out; }
.tbtn { height: 36px; padding: 0 18px; border: 0; border-radius: 8px; font-weight: 800; font-size: 13px; letter-spacing: .04em; color: #fff; transition: transform .25s var(--spring), filter .15s; }
.tbtn.buy { background: #12A26A; box-shadow: 0 10px 20px -10px #12A26A; } .tbtn.sell { background: #E0445A; box-shadow: 0 10px 20px -10px #E0445A; }
.tbtn:hover { filter: brightness(1.12); transform: translateY(-1px); } .tbtn:active { transform: scale(.95); }
.bctools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px 9px 20px; border-bottom: 1px solid var(--line); }
.bctools .seg button { padding: 5px 11px; font-size: 12px; }
.bcind { display: flex; gap: 6px; flex-wrap: wrap; }
.bcind button { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: none; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.bcind button:hover { color: var(--ink); } .bcind button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.bcohlc { display: flex; gap: 14px; flex-wrap: wrap; min-height: 30px; padding: 8px 20px 0; font-size: 11.5px; color: var(--ink-3); } .bcohlc b { font-weight: 600; color: var(--ink); } .bcohlc span[style] b, .bcohlc span.bull b, .bcohlc span.bear b { color: inherit; }
.bcwrap { position: relative; flex: 1; min-height: 0; padding: 4px 0 0 12px; } #bcCanvas { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; } #bcCanvas.grab { cursor: grabbing; }
.bcnote { position: absolute; left: 22px; bottom: 34px; font-size: 11.5px; }
.bigc > footer { padding: 6px 20px 8px; font-size: 11px; border-top: 1px solid var(--line); }
.clk { cursor: pointer; } .clk:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 900px) { .bigc { width: 100vw; } .bcsym b, .bcpx b { font-size: 15px; } .tbtn { padding: 0 12px; } }

/* ---------- trade agent ---------- */
.aghead { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 20px; }
.aghead h1 { margin: 0 0 6px; font-size: 22px; } .aghead p { margin: 0; max-width: 820px; font-size: 13px; line-height: 1.5; }
.agact { display: grid; gap: 6px; justify-items: end; flex: none; } .agact small { font-size: 11.5px; white-space: nowrap; }
.agact .primary { height: 42px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; box-shadow: 0 12px 24px -12px var(--brand); transition: transform .25s var(--spring), filter .15s; }
.agact .primary:hover { filter: brightness(1.1); transform: translateY(-1px); } .agact .primary:disabled { opacity: .7; cursor: progress; transform: none; }
.agbar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; } .agbar[hidden] { display: none; } .agbar i { display: block; height: 100%; background: var(--brand); transition: width .4s ease; }
.agrows { overflow-x: auto; }
.agt td { vertical-align: middle; line-height: 1.35; } .agt td.strat { text-align: left; white-space: normal; min-width: 170px; font-weight: 600; } .agt th:nth-child(7) { text-align: left; }
.agt td:nth-child(2), .agt th:nth-child(2) { text-align: left; }
.agst { margin-left: 4px; font-weight: 700; } .agst.active { color: var(--amber); } .agst.target-hit { color: var(--bull); } .agst.stopped-out { color: var(--bear); }
.agc { width: 96px; height: 26px; display: block; } .agc polyline { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; } .agc line { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
@media (max-width: 900px) { .aghead { flex-direction: column; align-items: stretch; } .agact { justify-items: stretch; } }

/* trade agent: keep the whole table inside the card */
.agt th,.agt td{padding-left:7px;padding-right:7px}
.agt .strat{white-space:normal;min-width:150px;max-width:190px}
.agt .strat small{white-space:normal}
.agt .agc{width:70px}

@media(max-width:1750px){.agt th:nth-child(10),.agt td:nth-child(10){display:none}.agt td:nth-child(7){white-space:normal;max-width:140px}.agt td:nth-child(2){white-space:normal;max-width:125px}}
.agfc{white-space:nowrap;font-size:12px;line-height:1.7}.agfc small{color:var(--ink-3);margin-right:4px}.agfc .muted{color:var(--ink-3)}


/* trade agent: automatic training status */
.agauto{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;border:1px solid var(--line,#1f2937);font-weight:600;font-size:13px}
.agauto i{width:8px;height:8px;border-radius:50%;background:var(--bull);box-shadow:0 0 0 0 var(--bull);animation:agpulse 1.6s infinite}
.agauto.busy i{background:#a78bfa;animation-duration:.6s}
@keyframes agpulse{70%{box-shadow:0 0 0 8px transparent}100%{box-shadow:0 0 0 0 transparent}}
.agflow.yes{color:var(--bull)}.agflow.no{color:var(--bear)}

.agt tr.plan td.num{opacity:.6;font-style:italic}

/* ask the agent: slide-in chat */
.chatfab{position:fixed;right:22px;bottom:22px;z-index:60;display:inline-flex;align-items:center;gap:8px;padding:12px 18px;border:0;border-radius:999px;background:var(--brand);color:#fff;font:600 14px var(--ui);cursor:pointer;box-shadow:0 12px 30px -8px var(--brand),var(--pop);transition:transform .25s var(--spring),opacity .2s}
.chatfab:hover{transform:translateY(-2px) scale(1.04)}
.chatfab.off{opacity:0;pointer-events:none;transform:scale(.8)}
.chat{position:fixed;top:0;right:0;bottom:0;z-index:70;width:min(420px,100vw);display:flex;flex-direction:column;background:var(--surface);border-left:1px solid var(--line-2);box-shadow:var(--pop);transform:translateX(105%);transition:transform .32s cubic-bezier(.22,1,.36,1)}
.chat.open{transform:none}
.chat>header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--line)}
.chat>header b{font-size:15px}.chat>header small{display:block;color:var(--ink-3);font-weight:400}
.chat>header button{border:0;background:var(--surface-2);color:var(--ink-2);width:30px;height:30px;border-radius:8px;cursor:pointer;font-size:14px}
.chatlog{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px}
.cmsg{max-width:100%;border-radius:14px;padding:10px 12px;font-size:13px;line-height:1.45}
.cmsg p{margin:0 0 8px}.cmsg p:last-child{margin:0}
.cmsg.me{align-self:flex-end;max-width:85%;background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.cmsg.bot{align-self:stretch;background:var(--surface-2);border-bottom-left-radius:4px}
.cnote{color:var(--ink-3);font-size:11px}
.ccard{background:var(--surface);border:1px solid var(--line-2);border-radius:12px;padding:10px;margin:0 0 8px;display:grid;gap:8px}
.chd{display:flex;align-items:baseline;gap:6px}.chd b{font-size:14px}.chd small{color:var(--ink-3)}.chd span{margin-left:auto}.chd i{font-style:normal}
.csug small{color:var(--ink-2)}
.clv{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.clv span{background:var(--surface-2);border-radius:8px;padding:6px 8px;font-size:11px;color:var(--ink-3)}
.clv b{display:block;font-size:13px;color:var(--ink)}.clv b.bull{color:var(--bull)}.clv b.bear{color:var(--bear)}
.copt{font-size:12px}.copt small{color:var(--ink-3)}.copt span{display:block;color:var(--ink-2);font-size:11px}
.cstr{font-size:12px;font-weight:600}.cstr small{font-weight:400;color:var(--ink-3)}
.ctest{width:100%;border-collapse:collapse;font-size:11px}
.ctest th{text-align:right;color:var(--ink-3);font-weight:500;padding:3px 4px;border-bottom:1px solid var(--line)}
.ctest td{text-align:right;padding:3px 4px}.ctest th:first-child,.ctest td:first-child{text-align:left;color:var(--ink-2)}
.cact{display:flex;gap:6px}
.chatchips{display:flex;flex-wrap:wrap;gap:6px;padding:8px 14px 0}
.chatchips button{border:1px solid var(--line-2);background:transparent;color:var(--ink-2);border-radius:999px;padding:5px 10px;font:500 12px var(--ui);cursor:pointer}
.chatchips button:hover{border-color:var(--brand);color:var(--ink)}
.chatform{display:flex;gap:8px;padding:12px 14px 14px}
.chatform input{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--line-2);border-radius:10px;padding:10px 12px;color:var(--ink);font:14px var(--ui)}
.chatform input:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
.chatform button{border:0;border-radius:10px;background:var(--brand);color:#fff;font:600 13px var(--ui);padding:0 16px;cursor:pointer}
.cdots{display:inline-flex;gap:4px}.cdots i{width:6px;height:6px;border-radius:50%;background:var(--ink-3);animation:cdot 1s infinite}
.cdots i:nth-child(2){animation-delay:.15s}.cdots i:nth-child(3){animation-delay:.3s}
@keyframes cdot{30%{transform:translateY(-4px);opacity:1}0%,60%,100%{transform:none;opacity:.5}}

/* command screen */
.cmdbar{padding:14px 16px;display:grid;gap:10px}
.cmdbar form{display:flex;align-items:center;gap:10px}
.cmdprompt{font:700 22px var(--num);color:var(--brand)}
.cmdbar input{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--line-2);border-radius:10px;padding:12px 14px;color:var(--ink);font:600 15px var(--num);letter-spacing:.04em;text-transform:uppercase}
.cmdbar input::placeholder{text-transform:none;letter-spacing:0;font-weight:400;font-family:var(--ui)}
.cmdbar input:focus{outline:2px solid var(--brand-soft);border-color:var(--brand)}
.cmdkeys{display:flex;flex-wrap:wrap;gap:6px}
.cmdkeys button{border:1px solid var(--line-2);background:transparent;color:var(--ink-2);border-radius:8px;padding:5px 10px;font:600 12px var(--num);cursor:pointer}
.cmdkeys button:hover{border-color:var(--brand);color:var(--ink)}
.cmdout{padding:0 0 6px;min-height:240px;transition:opacity .15s}
.cmdout.busy{opacity:.5}
.cmdout>header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:14px 16px}
.cmdout>header h2{font-size:16px}.cmdout>header small{color:var(--ink-3)}
.cmdact{display:flex;gap:8px;padding:0 16px 12px}
.cmdkv{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:1px;background:var(--line);border-block:1px solid var(--line)}
.cmdkv div{background:var(--surface);padding:9px 16px;display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.cmdkv span{color:var(--ink-3);font-size:12px}.cmdkv b{font:600 13px var(--num);text-align:right}
.cmdkv b.bull,.cmdtbl td.bull{color:var(--bull)}.cmdkv b.bear,.cmdtbl td.bear{color:var(--bear)}.cmdkv b.muted,.cmdtbl td.muted{color:var(--ink-3)}
.cmdtbl{overflow-x:auto;max-height:62vh;overflow-y:auto}
.cmdtbl td{font-family:var(--num);font-size:12.5px;white-space:nowrap}
.cmdtbl thead th{position:sticky;top:0;background:var(--surface);z-index:1}
.cmdtbl .csym.on{color:var(--brand)}.cmdtbl .ccode{color:var(--brand)}
.cmdout .pnote{padding:0 16px}

/* candle patterns */
.patt td{vertical-align:middle;line-height:1.35}
.patt td:nth-child(2),.patt th:nth-child(2),.patt td:nth-child(3),.patt th:nth-child(3){text-align:left}
.patt .strat{max-width:300px;min-width:190px}
.patt .agst.new{color:var(--amber)}.patt .agst.running{color:var(--ink-2)}.patt .agst.closed-at-time-exit{color:var(--ink-3)}
#pat .agact{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
#patTf button{white-space:nowrap}

/* live record */
.hotwatch{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;padding:12px 16px 16px}
.hw{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer;background:var(--surface-2)}
.hw:hover{border-color:var(--brand)}.hw small{color:var(--ink-3);font-size:11px}.hw .hwp{font-weight:700;font-size:15px;color:var(--ink-2)}
.hw.up{border-color:var(--bull)}.hw.up .hwp{color:var(--bull)}.hw.dn{border-color:var(--bear)}.hw.dn .hwp{color:var(--bear)}
.hotwatch .empty{grid-column:1/-1}
#patKind button{white-space:nowrap}

/* ---------- paper trading: bracket legs on the order pad, daily risk bar ---------- */
.obr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: end; }
.obr .mini { grid-column: 1; justify-self: start; }
.orisk { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.orisk.warn { color: var(--amber); }
.opad { max-height: calc(100vh - 36px); overflow-y: auto; }
.riskbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 10px 16px; font-size: 13px; color: var(--ink-2); }
.riskbar b { color: var(--ink); font-family: var(--num); }
.riskbar .meter { flex: 1 1 160px; min-width: 120px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.riskbar .meter i { display: block; height: 100%; background: var(--amber); }
.riskbar .meter i.bad { background: var(--bear); }
.riskbar.locked { border-color: var(--bear); background: color-mix(in srgb, var(--bear) 7%, var(--surface)); }
.riskbar .lockmsg { color: var(--bear); font-weight: 700; }
.legs { display: block; font-size: 11px; color: var(--ink-3); }
.jform h3 { margin: 8px 0 0; font-size: 14px; }
.obr[hidden] { display: none; }
.opad { overflow-x: hidden; }
.opad input { width: 100%; min-width: 0; box-sizing: border-box; }
.obr label { min-width: 0; }
#oKind button { padding: 6px 4px; }

/* ---------- alerts ---------- */
.alcard .inline { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0; }
.alcard .inline input, .alcard .inline select { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); min-width: 0; flex: 1 1 110px; }
.algrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px 16px 14px; }
.algrid h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.alrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.alrow > span { flex: 1; min-width: 0; } .alrow small { display: block; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.alrow.done { opacity: .55; }
.alrow .kind { flex: none; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink-2); text-transform: uppercase; }
.alkinds { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.alkinds label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
@media (max-width: 1100px) { .algrid { grid-template-columns: 1fr; } }
.tb.a { background: var(--surface); border: 1px solid var(--line-2); font-size: 11px; }

/* ---------- today page and journal statistics ---------- */
.dtext { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 13.5px/1.5 var(--ui); resize: vertical; }
#dListEdit .mini { margin-top: 8px; }
.dcheck { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); cursor: pointer; }
.dcheck input { width: 16px; height: 16px; accent-color: var(--bull); }
.dcheck.on span { color: var(--ink-3); text-decoration: line-through; }
.dgaps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; font-size: 13px; }
.dgaps div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chips span { padding: 3px 9px; border-radius: 6px; background: var(--bear-soft); color: var(--bear); font-weight: 700; font-size: 12px; }
.dbreak { padding: 6px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 13px; margin-bottom: 6px; }
.dok { padding: 6px 10px; border-radius: 8px; background: var(--bull-soft); color: var(--bull); font-size: 13px; }
.jhead header { display: flex; align-items: center; justify-content: space-between; }
.jcurve { width: 100%; height: 160px; display: block; }
.jcurve polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; } .jcurve line { stroke: var(--line-2); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
#jBy button { padding: 5px 9px; }

/* ---------- market timings ---------- */
#mTable input { width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); }
#mTable td { padding: 4px 6px; }
.mnow { margin: 0; font-size: 13px; color: var(--ink-2); }
.msug { padding: 8px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.msug .mini { margin-left: 8px; }
#mForm { max-width: 1000px; }
#mTable th:nth-child(5), #mTable td:nth-child(5) { width: 40%; }

.user .lbl b{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user .lbl a{color:var(--ink-3)}.user .lbl a:hover{color:var(--brand)}

/* terminal: stock explorer */
.xsearch{padding:14px 16px;display:grid;gap:10px;overflow:visible;position:relative;z-index:5}
.xbox{position:relative;display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:12px;padding:0 12px}
.xbox:focus-within{border-color:var(--brand);outline:2px solid var(--brand-soft)}
.xbox svg{width:18px;height:18px;flex:none;fill:none;stroke:var(--ink-3);stroke-width:1.6;stroke-linecap:round}
.xbox input{flex:1;min-width:0;border:0;background:transparent;padding:13px 0;color:var(--ink);font-size:15px;outline:none}
.xsug{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--surface);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 14px 40px rgba(0,0,0,.35);max-height:380px;overflow:auto;padding:6px}
.xsug div{display:flex;align-items:baseline;gap:12px;padding:9px 10px;border-radius:8px;cursor:pointer}
.xsug div.on,.xsug div:hover{background:var(--surface-2)}
.xsug b{font:700 13px var(--num);min-width:110px}.xsug span{flex:1;color:var(--ink-2);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xsug em{font-style:normal;font-size:12px;color:var(--ink-2)}.xsug i{font-style:normal}.xsug .none{color:var(--ink-3);cursor:default}
.xchips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.xchips small{color:var(--ink-3);margin-right:2px}
.xchips button,.xfilters button{border:1px solid var(--line-2);background:transparent;color:var(--ink-2);border-radius:999px;padding:4px 11px;font:600 12px var(--ui);cursor:pointer}
.xchips button:hover,.xfilters button:hover{border-color:var(--brand);color:var(--ink)}
.xfilters{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.xfilters span{color:var(--ink-3);font-size:12px;margin:0 2px 0 8px}.xfilters span:first-child{margin-left:0}
.xfilters button.on{background:var(--brand);border-color:var(--brand);color:#fff}
.xhead{display:flex;align-items:center;gap:20px;padding:16px 20px;flex-wrap:wrap}
.xhead h1{margin:0 0 3px;font-size:20px}.xhead small{color:var(--ink-3)}
.xpx{margin-left:auto;text-align:right;display:grid;gap:2px}.xpx b{font-size:24px}.xpx span{font-size:13px;font-weight:600}
.xact{display:flex;gap:8px;flex-wrap:wrap}
.xtabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 4px}
.xtabs button{border:0;background:transparent;color:var(--ink-3);padding:10px 14px;font:600 13px var(--ui);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.xtabs button:hover{color:var(--ink)}.xtabs button.on{color:var(--ink);border-bottom-color:var(--brand)}
.xtabs .xback{color:var(--brand)}
.xchart>header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px 4px}
.xcwrap{position:relative;padding:0 8px 8px}.xcwrap canvas{display:block;width:100%;touch-action:none}
.xtip{position:absolute;top:6px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:8px;padding:6px 10px;font-size:12px;pointer-events:none;white-space:nowrap}
.xasof{color:var(--ink-3)}
#cmd .cmdout{min-height:120px;padding-top:0}#cmd .cmdkv{border-top:0}
