:root {
  color-scheme: dark;
  --bg: #0d0f12; --panel: #171a1f; --panel2: #1e2228; --panel3: #262b33;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #eceae4; --text2: #b9b7ae; --muted: #85837c;
  --accent: #3987e5; --accent-soft: rgba(57,135,229,.16);
  --pos: #19a37a; --neg: #e66767; --pos-text: #3fcf9c; --neg-text: #f28b8b;
  --pos-soft: rgba(25,163,122,.16); --neg-soft: rgba(230,103,103,.15);
  --warn: #fab219;
  --r: 10px;
}
:root[data-colors="cn"] {
  --pos: #e66767; --neg: #19a37a; --pos-text: #f28b8b; --neg-text: #3fcf9c;
  --pos-soft: rgba(230,103,103,.15); --neg-soft: rgba(25,163,122,.16);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 13.5px/1.5 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Microsoft YaHei UI", "PingFang SC", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c313a; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

#app { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100%; }
#side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #101317; border-right: 1px solid var(--line); padding: 16px 12px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 18px; }
.brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: .12em; line-height: 1.15; }
.brand span { display: block; font-size: 10px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.brand img { display: block; flex: none; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text2); text-decoration: none; }
#nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
#nav a:hover { background: var(--panel); color: var(--text); }
#nav a.on { background: var(--accent-soft); color: #fff; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px; }
#conn { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--pos); } .dot.bad { background: var(--warn); }

main { min-width: 0; padding: 0 22px 40px; }
#top { position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--bg) 82%, transparent); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 0 12px; }
#top h1 { font-size: 19px; margin-right: auto; }
#filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#banner:empty { display: none; }
.note { border: 1px solid var(--line2); background: var(--panel); border-radius: var(--r); padding: 10px 14px; margin-bottom: 12px; color: var(--text2); line-height: 1.7; }
.note > .btn, .note > select, .note > input { margin: 0 4px; }
.note.warn { border-color: rgba(250,178,25,.4); }
.note b { color: var(--text); }

.btn { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--panel3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--neg-text); }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn.icon { padding: 6px 8px; display: inline-flex; align-items: center; }
.btn.icon svg { width: 17px; height: 17px; display: block; }
.btn.icon.spinning svg { animation: sp .9s linear infinite; }
.btn.wide { width: 100%; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
.seg { display: inline-flex; justify-self: start; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 6px 11px; cursor: pointer; color: var(--text2); }
.seg button.on { background: var(--panel3); color: #fff; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 6px 9px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { width: 100%; resize: vertical; min-height: 70px; line-height: 1.6; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; vertical-align: -2px; }
label.chk { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }

.grid { display: grid; gap: 12px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g21, .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.mt { margin-top: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.card > h3, .card-h { font-size: 13px; color: var(--text2); font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-h .sp { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.stat { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 50px; }
.card:has(.sub2) .stat { min-height: 34px; }
.stat .v { font-size: 24px; font-weight: 650; letter-spacing: -.2px; line-height: 1.15; }
.stat .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.stat > div:first-child { min-width: 0; } .stat svg { flex: none; }
.sub2 { color: var(--muted); font-size: 12px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos { color: var(--pos-text); } .neg { color: var(--neg-text); } .muted { color: var(--muted); } .tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 280px; }
.chart.sm { height: 230px; } .chart.lg { height: 420px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 8px; border-radius: 20px; background: var(--panel3); color: var(--text2); white-space: nowrap; }
.pill.w { background: var(--pos-soft); color: var(--pos-text); } .pill.l { background: var(--neg-soft); color: var(--neg-text); }
.pill.tag-s { background: var(--accent-soft); color: #9cc4f5; } .pill.tag-m { background: rgba(250,178,25,.14); color: #f5c860; }
.pill button { all: unset; cursor: pointer; opacity: .7; padding-left: 2px; } .pill button:hover { opacity: 1; }
.ratio { display: flex; gap: 2px; height: 6px; border-radius: 4px; overflow: hidden; margin-top: 8px; background: var(--panel3); }
.ratio i { display: block; height: 100%; } .ratio .a { background: var(--pos); } .ratio .b { background: var(--neg); }
.ratio-l { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 500; color: var(--muted); position: sticky; top: 0; background: var(--panel); user-select: none; }
th[data-sort] { cursor: pointer; } th[data-sort]:hover { color: var(--text); }
td.r, th.r { text-align: right; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: rgba(255,255,255,.035); }
tbody tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow: auto; }
.kv { display: grid; grid-template-columns: 1fr auto; }
.kv > div { padding: 7px 2px; border-bottom: 1px solid var(--line); }
.kv > div:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.kv > div:nth-child(odd) { color: var(--text2); }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.winbar { display: inline-flex; width: 110px; height: 6px; border-radius: 4px; overflow: hidden; background: var(--neg); vertical-align: middle; margin-right: 8px; }
.winbar i { background: var(--pos); border-right: 2px solid var(--panel); }
.winbar.none { background: var(--panel3); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.05fr); gap: 6px; }
.cal .hd { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cal .c { min-height: 82px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.cal .c.out { opacity: .35; }
.cal .c.has { cursor: pointer; } .cal .c.has:hover { border-color: var(--line2); }
.cal .c.w { background: var(--pos-soft); border-color: rgba(25,163,122,.35); } .cal .c.l { background: var(--neg-soft); border-color: rgba(230,103,103,.35); }
:root[data-colors="cn"] .cal .c.w { border-color: rgba(230,103,103,.35); } :root[data-colors="cn"] .cal .c.l { border-color: rgba(25,163,122,.35); }
.cal .c.today .dn { color: var(--accent); font-weight: 700; }
.cal .dn { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }
.cal .pv { font-weight: 650; font-size: 13.5px; margin-top: auto; white-space: nowrap; letter-spacing: -.2px; }
.cal .ct { font-size: 11.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .wk { background: var(--panel2); }

/* journal */
.day { margin-bottom: 12px; }
.day-h { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.day-h h3 { font-size: 15px; margin-right: auto; }
.day-s { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.day-s .big { display: flex; align-items: center; gap: 14px; padding-right: 24px; }
.day-s .big .v { font-size: 22px; font-weight: 650; }
.day-s .m { padding: 2px 18px; border-left: 1px solid var(--line); }
.day-s .m > span { display: block; font-size: 11.5px; color: var(--muted); }
.day-s .m b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day-note { color: var(--text2); white-space: pre-wrap; margin-top: 12px; padding: 9px 12px; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }

/* report layout */
.rep { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 16px; align-items: start; }
.rep-nav { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 1px; }
.rep-nav h4 { margin: 12px 8px 4px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.rep-nav a { padding: 6px 10px; border-radius: 7px; color: var(--text2); text-decoration: none; }
.rep-nav a:hover { background: var(--panel); } .rep-nav a.on { color: var(--pos-text); background: var(--panel); font-weight: 600; }

/* settings */
.form { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 14px; align-items: center; max-width: 720px; }
.form label { color: var(--text2); } .form select { justify-self: start; min-width: 260px; } .form .hint { grid-column: 2; margin-top: -6px; }
.hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sect { margin-bottom: 14px; } .sect h2 { font-size: 15px; margin-bottom: 4px; } .sect > p { color: var(--muted); margin: 0 0 12px; font-size: 12.5px; }
td input[type=text], td input[type=number] { width: 96px; padding: 4px 7px; }

/* modal / popover / toast */
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; padding: 28px 20px; overflow: auto; }
#modal[hidden], #pop[hidden] { display: none; }
.dlg { background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; width: min(1280px, 100%); padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.dlg-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dlg-h h2 { font-size: 17px; margin-right: auto; display: flex; gap: 10px; align-items: center; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; }
@media (max-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr); } }
#pop { position: fixed; z-index: 60; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.5); max-height: 340px; overflow: auto; min-width: 190px; }
#pop label { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
#pop label:hover { background: var(--panel3); }
#pop .pop-f { display: flex; gap: 6px; padding: 6px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--panel3); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 14px; max-width: 420px; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.toast.err { border-color: var(--neg); } .toast.ok { border-color: var(--pos); }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty h2 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.stars { display: inline-flex; gap: 2px; } .stars button { all: unset; cursor: pointer; font-size: 17px; color: var(--panel3); } .stars button.on { color: var(--warn); }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding-top: 10px; color: var(--muted); }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin, .btn.icon.spinning svg { animation: none; } }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; color: var(--text2); }
.form input[type=text].path { width: 100%; }

/* ---------- setups (V0.6) ---------- */
.seg a { padding: 6px 13px; color: var(--text2); text-decoration: none; }
.seg a.on { background: var(--panel3); color: #fff; }
.seg.wrap { flex-wrap: wrap; }
.sp-ctl { gap: 10px; }
a.sp-back { text-decoration: none; display: inline-block; color: var(--text); }
.sp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sp-map { flex: 1; display: flex; flex-direction: column; } .sp-map .chart { flex: 1; min-height: 300px; }
.sp-gap { flex: 1; }
.sp-tabs a { font-weight: 600; }
.pill.tag-a { background: transparent; border: 1px dashed var(--line2); color: var(--text2); }
.pill.vd.lp { color: var(--pos-text); } .pill.vd.ln { color: var(--neg-text); }
.pill.vd.few { background: transparent; border: 1px dashed var(--line2); color: var(--muted); }
.fav-dot { color: var(--warn); font-size: 12px; }
button.pill.add { border: 1px dashed var(--line2); background: transparent; color: var(--text2); cursor: pointer; font-family: inherit; }
button.pill.add:hover { color: var(--text); border-color: var(--accent); }
.row.quick { margin-top: 7px; gap: 6px; }
.star { all: unset; cursor: pointer; font-size: 16px; line-height: 1; color: #3a404a; padding: 2px 3px; flex: none; }
.star:hover { color: var(--muted); } .star.on { color: var(--warn); } .star.lg { font-size: 20px; }
.star:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.ins { display: flex; flex-direction: column; gap: 10px; }
.ins-i { border-left: 3px solid var(--line2); padding: 1px 0 1px 11px; }
.ins-i.pos { border-color: var(--pos); } .ins-i.neg { border-color: var(--neg); } .ins-i.info { border-color: var(--accent); }
.ins-i > b { font-size: 12.5px; }
.ins-i p { margin: 2px 0 0; color: var(--text2); line-height: 1.55; } .ins-i p b { color: var(--text); }
.sp-tbl .go { color: var(--accent); white-space: nowrap; }
.sp-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; } .sp-name h2 { font-size: 19px; }
.sp-desc { color: var(--text2); margin: 8px 0 10px; line-height: 1.6; }
.lib-form { display: grid; gap: 8px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.lib-form textarea, .lib-form .hint, .lib-form .row, .lib-form label { grid-column: 1 / -1; } .lib-form .btn.primary { justify-self: start; }
.lib-form textarea { min-height: 54px; }
.sdlg { width: min(560px, 100%); } .sdlg .lib-form { grid-template-columns: minmax(0, 1fr); } .sdlg .lib-form label { margin-bottom: -4px; }
.lib-row { display: flex; gap: 9px; align-items: flex-start; padding: 9px 2px; border-top: 1px solid var(--line); }
.lib-row[hidden], .lib-sec[hidden], #libNone[hidden] { display: none; }
.lib-n { flex: 1; min-width: 0; } .lib-n a { color: var(--text); text-decoration: none; } .lib-n a:hover { color: var(--accent); }
.lib-d { color: var(--text2); font-size: 12.5px; margin-top: 2px; line-height: 1.5; }
.lib-cat { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 2px 5px; }
.lib-used { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 2px 2px 10px; } .lib-used a { text-decoration: none; }
table.mini td, table.mini th { padding: 6px 8px; }
#spick { position: fixed; z-index: 65; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 14px 44px rgba(0,0,0,.55); display: flex; flex-direction: column; overflow: hidden; }
#spick[hidden] { display: none; }
.sp-top { display: flex; gap: 8px; padding: 9px; border-bottom: 1px solid var(--line); } .sp-top input { flex: 1; background: var(--panel); }
.sp-t { padding: 7px 12px; font-size: 12px; color: var(--text2); border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.sp-list { overflow: auto; flex: 1; min-height: 0; padding: 0 5px 6px; overscroll-behavior: contain; }
.sp-h { position: sticky; top: 0; background: var(--panel2); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 9px 7px 4px; z-index: 1; }
.sp-row { display: flex; align-items: center; gap: 9px; padding: 6px 7px; border-radius: 7px; cursor: pointer; }
.sp-row:hover { background: var(--panel3); }
.sp-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line2); flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; color: #fff; }
.sp-row.on .sp-box { background: var(--accent); border-color: var(--accent); } .sp-row.on .sp-box::after { content: "✓"; }
.sp-row.part .sp-box { border-color: var(--accent); } .sp-row.part .sp-box::after { content: ""; width: 8px; height: 2px; background: var(--accent); border-radius: 1px; }
.sp-row.new .sp-box { border-style: dashed; color: var(--text2); }
.sp-n { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sp-n b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-d { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-c { font-size: 11.5px; color: var(--muted); }
.sp-none { padding: 22px 10px; text-align: center; color: var(--muted); }
.sp-f { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- GDTA EDGE + prop-firm ledger (V0.7) ---------- */
:root { --ge-pos: 25,163,122; --ge-neg: 230,103,103; }
:root[data-colors="cn"] { --ge-pos: 230,103,103; --ge-neg: 25,163,122; }
.ge-card { background: linear-gradient(180deg, #151920, #0f1216); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 12px; min-width: 0; }
.ge-head { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.ge-hl, .ge-hr { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; } .ge-hl { margin-right: auto; }
.ge-title { font-weight: 800; letter-spacing: .16em; font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ge-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 8px var(--pos); animation: geBlink 1.8s ease-in-out infinite; }
@keyframes geBlink { 50% { opacity: .35; } }
.ge-mode button.on { background: var(--accent); color: #fff; }
.ge-ib { padding: 6px 9px; min-width: 34px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ge-ib svg, .ge-size svg { display: block; flex: none; }
.ge-size button { display: inline-flex; align-items: center; gap: 6px; }
.ge-size button.on { background: var(--accent-soft); color: #fff; }
.ge-head .btn.ge-spc, .ge-head .btn.ge-moreb { display: none; } /* phone only */
.ge-spc { font-variant-numeric: tabular-nums; }
.ge-dates { display: inline-flex; align-items: center; gap: 6px; }
.ge-dates input { padding: 5px 8px; width: 138px; }
.ge-dates .ge-ib { font-size: 16px; padding: 4px 8px; min-width: 28px; }
.ge-vol { width: 84px; accent-color: var(--accent); margin: 0; }
/* the stage. Its size decides the layout (web/edge.js); the figure, the label and the headline follow the variables below */
.ge-stage { position: relative; height: clamp(250px, calc(50vh - 62px), 640px); margin-top: 6px; overflow: hidden; --ge-fs: 46px; --ge-cx: 50%; --ge-cy: 50%; --ge-by: 22%; }
.ge-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.ge-num { position: absolute; left: var(--ge-cx); top: var(--ge-cy); transform: translate(-50%, -56%); text-align: center; pointer-events: none; white-space: nowrap; }
.ge-amt { font-size: var(--ge-fs); font-weight: 700; letter-spacing: -.012em; line-height: 1.05; color: var(--pos-text); font-variant-numeric: tabular-nums; text-shadow: 0 0 .48em rgba(var(--ge-pos), .45); transition: text-shadow .7s; }
.ge-amt.neg { color: var(--neg-text); text-shadow: 0 0 .48em rgba(var(--ge-neg), .4); }
.ge-lock .ge-amt { text-shadow: 0 0 .74em rgba(var(--ge-pos), .8), 0 0 2px rgba(255,255,255,.35); }
.ge-lock .ge-amt.neg { text-shadow: 0 0 .74em rgba(var(--ge-neg), .7), 0 0 2px rgba(255,255,255,.3); }
.ge-sub { font-size: clamp(10px, calc(var(--ge-fs) * .17), 16px); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: .55em; }
.ge-demo .ge-sub { color: var(--accent); }
.ge-ban { position: absolute; left: var(--ge-cx); top: var(--ge-by); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; white-space: nowrap; font-weight: 800; font-size: clamp(12px, calc(var(--ge-fs) * .3), 36px); letter-spacing: .28em; text-indent: .28em; color: #fff; text-shadow: 0 0 .7em var(--accent), 0 1px 0 rgba(0,0,0,.6); }
.ge-ban.pos { color: var(--pos-text); text-shadow: 0 0 .7em rgba(var(--ge-pos), .95), 0 1px 0 rgba(0,0,0,.6); }
.ge-ban.neg { color: var(--neg-text); text-shadow: 0 0 .7em rgba(var(--ge-neg), .95), 0 1px 0 rgba(0,0,0,.6); }
.ge-ban span { margin-left: .5em; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ge-ban.hold { opacity: .92; }
.ge-log, .ge-stat { position: absolute; bottom: 5px; font: 11px/1.3 Consolas, "Cascadia Mono", ui-monospace, monospace; color: var(--muted); pointer-events: none; white-space: nowrap; }
.ge-log { left: 2px; } .ge-stat { right: 2px; }
/* full screen: the card covers the whole window; on the PC the controls lie over the top of the stage and fade while the mouse rests */
html.ge-fullon, html.ge-fullon body { overflow: hidden; }
.ge-card.ge-full { position: fixed; inset: 0; z-index: 45; margin: 0; padding: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; background: radial-gradient(120% 95% at 50% 46%, #161c25 0%, #0d1014 58%, #090b0e 100%); }
.ge-full .ge-stage { flex: 1 1 auto; height: auto; min-height: 0; margin: 0; }
.ge-full .ge-head { position: absolute; left: 0; right: 0; top: 0; z-index: 3; padding: 12px 18px 26px; background: linear-gradient(rgba(9,11,14,.92) 55%, rgba(9,11,14,0)); transition: opacity .45s; }
.ge-full.ge-idle { cursor: none; }
.ge-full.ge-idle .ge-head { opacity: 0; pointer-events: none; }
.ge-full .ge-log { left: 18px; bottom: 8px; } .ge-full .ge-stat { right: 18px; bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .ge-title i { animation: none; } }
.pf-form { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.pf-form label { color: var(--text2); } .pf-form .row { grid-column: 1 / -1; margin-top: 4px; } .pf-form input, .pf-form select { width: 100%; }
td.pf-note { white-space: normal; max-width: 320px; color: var(--text2); }

/* compact amounts used by the phone layout only */
.pv-s { display: none; }

/* ---------- V0.8: folded GDTA EDGE, sortable + resizable tables, guides, Help ---------- */
.ge-card.ge-min { padding: 7px 12px 7px 16px; background: var(--panel); }
.ge-min .ge-title { font-size: 12px; color: var(--text2); } .ge-min .ge-title i { animation: none; opacity: .5; box-shadow: none; }
.ge-ib.on { border-color: var(--accent); background: var(--accent-soft); }

.card-h .seg button { padding: 3px 9px; font-size: 12px; }
th.sorted { color: var(--text); }
.tbl-hint { color: var(--muted); font-size: 11.5px; padding: 8px 2px 0; }
.colh { position: absolute; top: 0; right: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 3; }
.colh::after { content: ''; position: absolute; top: 22%; bottom: 22%; right: 0; width: 1px; background: var(--line2); opacity: 0; transition: opacity .12s; }
th:hover > .colh::after { opacity: 1; } .colh:hover::after { opacity: 1; width: 3px; background: var(--accent); border-radius: 2px; }
body.colresizing, body.colresizing * { cursor: col-resize !important; user-select: none !important; }

details.guide { border: 1px solid var(--line2); background: var(--panel); border-radius: var(--r); margin-bottom: 12px; }
details.guide > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--text); list-style: none; display: flex; align-items: center; gap: 8px; user-select: none; }
details.guide > summary::-webkit-details-marker { display: none; }
details.guide > summary::before { content: '?'; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: #9cc4f5; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
details.guide > summary::after { content: 'Show ▾'; margin-left: auto; font-weight: 400; font-size: 12px; color: var(--muted); }
details.guide[open] > summary::after { content: 'Hide ▴'; }
.guide-b { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; padding: 2px 16px 14px; border-top: 1px solid var(--line); }
.guide-c h4 { margin: 12px 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.guide-c p { margin: 0 0 4px; color: var(--text2); line-height: 1.6; }
.guide-c ul, .guide-c ol { margin: 0; padding-left: 18px; color: var(--text2); line-height: 1.6; } .guide-c li { margin: 3px 0; white-space: normal; } .guide-c li b { color: var(--text); font-weight: 600; }

.hp { max-width: 1060px; }
.hp-top { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.hp-lead { flex: 1 1 320px; color: var(--text2); line-height: 1.6; max-width: 60ch; }
.hp-find { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex: 0 1 380px; }
.hp-find input { width: 100%; padding: 9px 12px; font-size: 14px; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hp-chips .pill { font-size: 12.5px; padding: 4px 11px; text-decoration: none; cursor: pointer; } .hp-chips .pill:hover { color: var(--text); background: var(--accent-soft); }
.hp-sec { margin-bottom: 12px; padding: 6px 18px 8px; scroll-margin-top: 12px; }
.hp-sec > h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 10px 0 2px; }
.hp-e { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 4px 22px; padding: 11px 0; border-top: 1px solid var(--line); }
.hp-sec > h3 + .hp-e { border-top: 0; }
.hp-e[hidden], .hp-sec[hidden] { display: none; }
.hp-t b { display: block; color: var(--text); font-weight: 600; font-size: 14px; } .hp-zh { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.hp-d { color: var(--text2); line-height: 1.65; max-width: 76ch; } .hp-d b { color: var(--text); font-weight: 600; }
.hp-f { margin-top: 6px; padding: 6px 10px; background: var(--panel2); border-radius: 7px; color: var(--text); font-variant-numeric: tabular-nums; font-size: 13px; }
.hp-f span { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-right: 10px; }
.hp-w { display: block; width: fit-content; margin-top: 5px; color: #9cc4f5; text-decoration: none; font-size: 12.5px; } .hp-w:hover { text-decoration: underline; }
.hp-foot { padding: 4px 2px 16px; }

/* Recent trades: five columns in a narrow card. Qty gives way first when the card itself is narrow (it is one click away in the trade). */
.rt-card { container: rt / inline-size; }
.rt-tbl th, .rt-tbl td { padding-left: 7px; padding-right: 7px; }
@container rt (max-width: 392px) { .rt-tbl .dq { display: none; } }
@container rt (max-width: 356px) { .rt-tbl th, .rt-tbl td { padding-left: 4px; padding-right: 4px; font-size: 12.5px; } .rt-tbl .rt-side { font-size: 0; padding: 1px 6px; } .rt-tbl .rt-side::before { content: attr(data-s); font-size: 11px; } }
@media (max-width: 1260px) { .g21 { grid-template-columns: minmax(0, 1fr); } }

/* V1.0 — backup check */
.bk-ok { border: 1px solid rgba(var(--ge-pos), .4); background: var(--pos-soft); border-radius: var(--r); padding: 9px 14px; margin-bottom: 10px; color: var(--text2); } .bk-ok b { color: var(--pos-text); }

/* V1.0 — setup descriptions may be a whole written plan: line breaks are kept; the library shows three lines until clicked */
.sp-desc, .lib-d { white-space: pre-line; overflow-wrap: anywhere; }
.lib-d.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; cursor: pointer; }
.lib-d.clamp.open { display: block; }
.lib-form textarea#nsDesc, .lib-form textarea#esDesc { min-height: 120px; }

/* V1.0 — loss analysis (web/loss.js) */
.lx-intro { line-height: 1.6; }
.lx-bar { display: flex; height: 22px; gap: 2px; margin: 10px 0 0; border-radius: 6px; overflow: hidden; }
.lx-bar i { display: flex; align-items: center; min-width: 4px; overflow: hidden; font-style: normal; }
.lx-bar i span { font-size: 11.5px; padding: 0 8px; white-space: nowrap; color: #fff; }
.lx-bar .m { background: rgba(var(--ge-neg), .78); } .lx-bar .g { background: rgba(57,135,229,.6); } .lx-bar .o { background: var(--panel3); } .lx-bar .o span { color: var(--text2); }
.lx-fix { margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 26px; line-height: 1.55; color: var(--text2); }
.lx-fx { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.lx-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--neg-soft); color: var(--neg-text); font-weight: 700; }
.lx-fix b { color: var(--text); }
.lx-fix .btn { margin-top: 8px; display: block; }
.lx-rule { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 6px 6px 0; color: var(--text); font-size: 13px; }
.lx-none { padding: 8px 0 4px; line-height: 1.6; }
.lx-tbl td { vertical-align: middle; }
.lx-wk { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; vertical-align: middle; }
.lx-wk i { width: 7px; background: var(--panel3); border-radius: 2px; } .lx-wk i.on { background: #f5c860; }
.lx-checks { display: grid; }
.lx-c { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lx-c:last-child { border-bottom: 0; }
.lx-flag { font-size: 11.5px; font-weight: 600; text-align: center; padding: 3px 6px; border-radius: 20px; background: var(--panel3); color: var(--muted); line-height: 1.25; }
.lx-c.bad .lx-flag { background: var(--neg-soft); color: var(--neg-text); } .lx-c.watch .lx-flag { background: rgba(250,178,25,.14); color: #f5c860; } .lx-c.ok .lx-flag { background: var(--pos-soft); color: var(--pos-text); }
.lx-c.na .lx-ct { opacity: .7; }
.lx-fig { color: var(--text2); margin: 2px 0; font-variant-numeric: tabular-nums; }
.lx-cls { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 6px 26px; }
.lx-cl h5 { margin: 8px 0 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.lx-row { display: grid; grid-template-columns: minmax(88px, 1fr) minmax(40px, 1.3fr) minmax(86px, auto) 40px; gap: 8px; align-items: center; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; cursor: pointer; }
.lx-row:hover { background: var(--panel2); }
.lx-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-b { height: 8px; background: var(--panel3); border-radius: 4px; overflow: hidden; } .lx-b i { display: block; height: 100%; background: rgba(var(--ge-neg), .75); }
.lx-row .tiny, .lx-row > .neg { text-align: right; }
.lx-h { margin: 22px 0 10px; font-size: 15px; } .lx-h .muted { font-weight: 400; font-size: 13px; }
.lx-q { padding: 12px 14px; }
.lx-qh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 3px; }
.lx-qa { margin-top: 9px; gap: 6px; }
.lx-ok { border-color: rgba(57,135,229,.5); }
.lx-done { color: var(--text2); }
.lx-one .btn.on { background: var(--accent-soft); border-color: var(--accent); color: #fff; }
/* V1.0 — add location (Scale-in analysis) */
.al-sum { color: var(--text2); margin: 2px 0 10px; line-height: 1.6; } .al-sum b { color: var(--text); }
.al-strip { margin: 0 0 14px; }
.al-track { position: relative; height: 62px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.al-track .z { position: absolute; top: 0; bottom: 0; background: rgba(57,135,229,.07); }
.al-track .g, .al-track .x { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line2); } .al-track .x { width: 2px; background: var(--accent); }
.al-track b { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; opacity: .82; }
.al-track b.p { background: var(--pos); } .al-track b.n { background: var(--neg); }
.al-track b:hover { opacity: 1; outline: 2px solid #fff; z-index: 2; }
.al-axis { position: relative; height: 18px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.al-axis span { position: absolute; white-space: nowrap; } .al-axis .c { transform: translateX(-50%); } .al-axis .e { right: 0; }
