/* Trader-Habit design system */
:root {
    --bg: #F2F4FA;
    --surface: #FFFFFF;
    --surface-2: #F7F8FC;
    --ink: #0E1525;
    --ink-2: #47506A;
    --muted: #8590A6;
    --line: #E3E7F0;
    --brand: #5B4CF5;
    --brand-2: #06B6D4;
    --brand-soft: #EEEBFF;
    --brand-a: #6D5DFC;
    --brand-b: #06B6D4;
    --hero-deep: #2B1E8C;
    --hero-end: #0E7490;
    --grad: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 100%);
    --profit: #0A9A5C;
    --profit-bg: #D9F6E7;
    --profit-strong: #11B26B;
    --loss: #DC2A2A;
    --loss-bg: #FDE1E1;
    --loss-strong: #EF4444;
    --loss-keep: var(--loss-strong);   /* resolved here on the root, so it stays red inside .rp-good (which turns --loss-strong green) */
    --warn: #D98A00;
    --warn-bg: #FFF1D1;
    --serious: #EA6A2F;
    --serious-bg: #FFE6D8;
    --side: #0B1020;
    --side-ink: #C9D0E3;
    --side-muted: #6D7690;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 24px rgba(16, 24, 40, .06);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, .18);
    --r: 18px;
    --r-sm: 12px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #080C17;
    --surface: #111729;
    --surface-2: #161D33;
    --ink: #EEF1F8;
    --ink-2: #B4BCD2;
    --muted: #7A849E;
    --line: #232C45;
    --brand: #8B7FFF;
    --brand-soft: #231F4A;
    --profit: #34D399;
    --profit-bg: #0E3B2A;
    --profit-strong: #34D399;
    --loss: #F87171;
    --loss-bg: #4A1820;
    --loss-strong: #F87171;
    --warn: #FBBF24;
    --warn-bg: #3D2E08;
    --serious: #FB923C;
    --serious-bg: #45230E;
    --side: #060912;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #080C17;
        --surface: #111729;
        --surface-2: #161D33;
        --ink: #EEF1F8;
        --ink-2: #B4BCD2;
        --muted: #7A849E;
        --line: #232C45;
        --brand: #8B7FFF;
        --brand-soft: #231F4A;
        --profit: #34D399;
        --profit-bg: #0E3B2A;
        --profit-strong: #34D399;
        --loss: #F87171;
        --loss-bg: #4A1820;
        --loss-strong: #F87171;
        --warn: #FBBF24;
        --warn-bg: #3D2E08;
        --serious: #FB923C;
        --serious-bg: #45230E;
        --side: #060912;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
        color-scheme: dark;
}
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .mono { font-variant-numeric: tabular-nums; }
.pos { color: var(--profit); }
.neg { color: var(--loss); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden, [hidden] { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex: none; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface);
    padding: 9px 16px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.primary:hover { filter: brightness(1.06); color: #fff; transform: translateY(-1px); }
.btn.danger { color: var(--loss); }
.btn.danger:hover { background: var(--loss-bg); border-color: var(--loss); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
    width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); cursor: pointer;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.input, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
    outline: none; transition: .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-inline-start: 40px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::after {
    content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%;
    transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked + span { background: var(--profit-strong); }
.switch input:checked + span::after { transform: translateX(20px); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.seg button.on.g { color: var(--profit); }
.seg button.on.r { color: var(--loss); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.hicon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.hicon.g { background: var(--profit-bg); color: var(--profit); }
.hicon.r { background: var(--loss-bg); color: var(--loss); }
.hicon.y { background: var(--warn-bg); color: var(--warn); }
.hicon.o { background: var(--serious-bg); color: var(--serious); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* tile rows: UI.balance() sets --cols (7 tiles = 4 + 3, 11 = 4 + 4 + 3); every card keeps one column width, so a short last row lines up under the others */
.grid.g-auto, .hl-tiles, .pat-grid, .cause-grid, .lib-grid, .v-grid { display: flex; flex-wrap: wrap; }
.g-auto > *, .hl-tiles > *, .pat-grid > *, .cause-grid > *, .lib-grid > *, .v-grid > * { flex: 0 1 calc((100% - (var(--cols, 3) - 1) * var(--gap, 18px)) / var(--cols, 3)); min-width: 0; }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }

.chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
    background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.u100 { display: inline-flex; vertical-align: -2px; color: #D99A06; }                 /* admin users: opted in to The Trader-Habit 100 */
.u100 svg { width: 14px; height: 14px; }
.chip svg { width: 13px; height: 13px; }
.chip.g { background: var(--profit-bg); color: var(--profit); border-color: transparent; }
.chip.r { background: var(--loss-bg); color: var(--loss); border-color: transparent; }
.chip.y { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chip.o { background: var(--serious-bg); color: var(--serious); border-color: transparent; }
.chip.b { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.solid { background: var(--brand); color: #fff; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); max-width: 100%; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--surface-2); position: sticky; top: 0; z-index: 1; white-space: nowrap; cursor: default; }
table.t th.sort { cursor: pointer; }
table.t th.sort:hover { color: var(--brand); }
table.t td { padding: 10px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--brand-soft); }
table.t td.r, table.t th.r { text-align: end; }
.side-buy { color: var(--profit); font-weight: 700; }
.side-sell { color: var(--loss); font-weight: 700; }

/* ---------- tooltip, toast, modal ---------- */
.he-tip {
    position: fixed; z-index: 100; pointer-events: none; background: #0E1525; color: #fff; padding: 10px 12px; border-radius: 12px;
    font-size: 12.5px; box-shadow: var(--shadow-lg); max-width: 280px; opacity: 0; transition: opacity .12s; line-height: 1.55;
}
.he-tip b { font-weight: 700; }
.he-tip .tp { color: #4ADE80; } .he-tip .tn { color: #FCA5A5; }
.toasts { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--brand); padding: 12px 16px;
    border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; min-width: 260px; max-width: 420px;
    animation: tin .25s ease;
}
.toast.ok { border-inline-start-color: var(--profit-strong); }
.toast.err { border-inline-start-color: var(--loss-strong); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.modal { position: fixed; inset: 0; background: rgba(8, 12, 23, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal .box {
    background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); width: min(980px, 100%); max-height: 88vh;
    display: flex; flex-direction: column; min-width: 0; animation: tin .2s ease;
}
.modal .box.narrow { width: min(460px, 100%); }
.modal .mh { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { margin: 0; font-size: 17px; }
.modal .mb { padding: 18px 22px; overflow: auto; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    background: var(--side); color: var(--side-ink); padding: 20px 14px; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; text-decoration: none; color: inherit; cursor: pointer; border-radius: 12px; }
a.brand:hover .wm, a.brand:focus-visible .wm { filter: brightness(1.15); }
.brand img { width: 38px; height: 38px; }
.brand .wm { font-size: 20px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.brand .wm span { margin-left: .06em; }                 /* Trader-Habit: a little air between the letters and after the dash (Mohsin, 21 Nov 2026) */
.mobile-bar b { letter-spacing: .02em; }
.brand .wm span, .wm-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .tag { font-size: 10.5px; color: var(--side-muted); letter-spacing: .04em; margin-top: -2px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--side-muted); padding: 14px 12px 6px; font-weight: 700; }
.nav a {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--side-ink); font-weight: 600;
    font-size: 13.5px; transition: .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.on { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-a) 90%, transparent), color-mix(in srgb, var(--brand-b) 75%, transparent)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); }
.nav a .badge { margin-inline-start: auto; background: var(--loss-strong); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11.5px; color: var(--side-muted); }
.side-foot b { color: var(--side-ink); }
.main { padding: 22px 28px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; z-index: 50; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink); width: 100%; border: 0; background: none; cursor: pointer; font-weight: 600; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.mobile-bar { display: none; }
.announce { background: var(--grad); color: #fff; padding: 10px 16px; border-radius: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; font-weight: 600; }
@media (max-width: 960px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 80; transform: translateX(-100%); transition: .25s; }
    .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
    .mobile-bar { display: flex; align-items: center; gap: 10px; }
    .main { padding: 16px 16px 60px; }
}

/* ---------- filter strip ---------- */
.filters {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px; border-radius: 16px; margin-bottom: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-a) 10%, transparent), color-mix(in srgb, var(--brand-b) 10%, transparent)); border: 1px solid color-mix(in srgb, var(--brand-a) 20%, transparent);
}
.flt { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 11px; min-width: 0; }
.flt svg { color: var(--brand); width: 16px; height: 16px; }
.flt .lbl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.flt select { border: 0; background: transparent; font-weight: 700; padding: 5px 4px; outline: none; cursor: pointer; min-width: 0; max-width: 190px; }
.flt.on { border-color: var(--brand); background: var(--brand-soft); }
.flt.on .lbl { color: var(--brand); }
.flt-title { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); padding: 0 6px; }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.kpi .k-val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.kpi .k-sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpi .k-art { position: absolute; inset-inline-end: 14px; bottom: 12px; }
.ratio-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 2px; margin-top: 6px; }
.ratio-bar i { display: block; height: 100%; }

/* ---------- hero insight ---------- */
.insight {
    border-radius: 22px; padding: 22px 24px; color: #fff; position: relative; overflow: hidden;
    background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--brand-b) 55%, transparent), transparent 45%), linear-gradient(135deg, var(--hero-deep) 0%, var(--brand) 55%, var(--hero-end) 100%);
    box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 28%, transparent); margin-bottom: 18px;
}
.insight h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.01em; }
.insight p { margin: 0; opacity: .9; }
.insight .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.insight .pill { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: 12px 16px; border-radius: 16px; min-width: 0; }
.insight .pill .l { font-size: 11.5px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.insight .btn { background: #fff; color: var(--hero-deep); border: 0; }

/* ---------- cause cards ---------- */
/* 2-3 cards per row on a wide screen, one on a phone */
.cause-grid { --gap: 16px; gap: 16px; margin-bottom: 18px; }
.cause { display: flex; flex-direction: column; gap: 12px; position: relative; }
.cause-head { display: flex; gap: 14px; align-items: flex-start; }
.cause-head .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cause-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cause .cause-act { margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.cause .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cause .metrics .metric:nth-child(5):last-child { grid-column: span 2; }
.cause .metric .v { font-size: 16px; }
.cause .stopstart { grid-template-columns: 1fr; margin-bottom: 12px; }
.cause .rank { flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; position: relative; background: var(--surface-2); border: 1.5px solid currentColor; }
.cause .rank svg { width: 24px; height: 24px; }
.cause .rank svg.gl { width: 54px; height: 54px; border-radius: 10px; }
.cause .rank .n { position: absolute; top: -8px; inset-inline-end: -8px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 800; border-radius: 99px; width: 22px; height: 22px; display: grid; place-items: center; }
.cause.critical .rank { color: var(--loss); }
.cause.serious .rank { color: var(--serious); }
.cause.warning .rank { color: var(--warn); }
.cause::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--r) var(--r) 0 0; }
.cause.critical::before { background: linear-gradient(90deg, var(--loss-strong), var(--serious)); }
.cause.serious::before { background: linear-gradient(90deg, var(--serious), var(--warn)); }
.cause.warning::before { background: var(--warn); }
.cause .drain-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 6px; margin-bottom: 12px; }
.cause .drain-box .l { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.drain { display: block; width: 100%; }
/* habit glyphs: tiny chart windows */
.gl { display: block; overflow: hidden; }
.gl .gr { stroke: var(--line); stroke-width: .6; fill: none; }
.gl .u rect, .gl circle.u, .gl path.u { fill: var(--profit-strong); }
.gl .d rect, .gl circle.d, .gl path.d, .gl rect.d { fill: var(--loss-strong); }
.gl .u line { stroke: var(--profit-strong); stroke-width: 1.2; }
.gl .d line { stroke: var(--loss-strong); stroke-width: 1.2; }
.gl .eq, .gl .ar { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.gl .d-s { stroke: var(--loss-strong); }
.gl .u-s { stroke: var(--profit-strong); }
.gl .acc-s { stroke: var(--brand); }
.gl .acc { fill: var(--brand); }
.gl .ghost { stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 3 2.5; }
.gl .ghost-c { fill: none; stroke: var(--loss-strong); stroke-width: 1.3; stroke-dasharray: 2.5 2; }
.gl .lim { stroke: var(--warn); stroke-width: 1.6; stroke-dasharray: 4 2.5; }
.gl .strike { stroke: var(--loss-strong); stroke-width: 1.8; stroke-linecap: round; }
.gl .ln { fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gl .ln.mu { stroke: var(--muted); stroke-width: 1.4; }
.gl .ink { fill: var(--ink-2); }
.gl .cell { fill: var(--line); }
.gl .plus { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.gl .flame { fill: var(--serious); }
.gl .bolt { fill: var(--warn); }
.gl .coin { fill: var(--warn); }
.gl .coin-i { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.4; }
.gl .tx { font: 800 9px var(--font); }
.gl .d-t { fill: var(--loss-strong); }
.gl .w-t { fill: var(--warn); font-size: 7px; }
.gl .coin-t { fill: #fff; font-size: 13px; }
/* strengths: the green pieces of the same glyph kit */
.gl rect.u { fill: var(--profit-strong); }
.gl .u-t { fill: var(--profit-strong); }
.gl .slg { stroke: var(--profit-strong); stroke-width: 2; }
.gl .slg.dash { stroke-width: 1.6; stroke-dasharray: 4 2.5; }
.gl .ghost-d { fill: none; stroke: var(--loss-strong); stroke-width: 1.4; stroke-dasharray: 3 2.5; opacity: .5; stroke-linejoin: round; }
.gl .ghost-u { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2.5 2; }
.gl .chk { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gl .wall { fill: var(--profit-strong); }
.gl .eqs { fill: none; stroke: var(--profit-strong); stroke-width: 3; stroke-linecap: round; }
.gl .sun { fill: var(--warn); } .gl .sun-r { stroke: var(--warn); }
.gl .ring { fill: none; stroke: var(--warn); stroke-width: 1.6; }
.gl .feather { fill: var(--profit-strong); opacity: .8; }
.gl .ln.fq { stroke: var(--surface); stroke-width: 1.1; }
/* small glyph tiles used in lists */
.gtile { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; }
.gtile svg.gl { width: 36px; height: 36px; }
.gtile.r { border-color: var(--loss); } .gtile.o { border-color: var(--serious); } .gtile.y { border-color: var(--warn); } .gtile.g { border-color: var(--profit); }
.cause h4 { margin: 2px 0 0; font-size: 16.5px; line-height: 1.3; }
.cause .what { color: var(--ink-2); margin: 0 0 12px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); min-width: 0; }
.metric .l { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.metric .v { font-size: 17px; font-weight: 800; }
.share-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.share-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--serious), var(--loss-strong)); border-radius: 99px; }
.stopstart { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stopstart > div { border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.stopstart .stop { background: var(--loss-bg); }
.stopstart .start { background: var(--profit-bg); }
.stopstart .l { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stopstart .stop .l, .stopstart .stop svg { color: var(--loss); }
.stopstart .start .l, .stopstart .start svg { color: var(--profit); }
@media (max-width: 720px) { .stopstart { grid-template-columns: 1fr; } }
@media (max-width: 400px) { .cause .metrics { grid-template-columns: 1fr 1fr; } .cause .metrics .metric:nth-child(5):last-child { grid-column: auto; } }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.1fr); gap: 8px; }
.cal .h { text-align: center; font-weight: 700; font-size: 12px; color: var(--muted); padding: 6px 0; background: var(--surface-2); border-radius: 10px; }
.cal .d { min-height: 92px; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: relative; cursor: default; min-width: 0; }
.cal .d .dn { position: absolute; top: 6px; inset-inline-end: 9px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cal .d.w { background: var(--profit-bg); border-color: rgba(10, 154, 92, .35); cursor: pointer; }
.cal .d.l { background: var(--loss-bg); border-color: rgba(220, 42, 42, .35); cursor: pointer; }
.cal .d.z { background: var(--surface-2); cursor: pointer; }
.cal .d .v { font-weight: 800; font-size: 15px; }
.cal .d .v.vs { display: none; }
.cal .d .s { font-size: 11px; color: var(--ink-2); }
.cal .d.today { outline: 2.5px solid var(--brand); outline-offset: 1px; }
.cal .d.empty { border-style: dashed; opacity: .55; }
.cal .wk { border-radius: 14px; padding: 10px 8px; background: var(--surface-2); border: 1.5px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.cal .wk .v { font-weight: 800; font-size: clamp(12px, 1.05vw, 15px); white-space: nowrap; letter-spacing: -.01em; }
.cal .d { padding-top: 24px; }
.cal .d .flag { position: absolute; top: 5px; inset-inline-start: 6px; padding: 1px 6px; font-size: 10.5px; }
/* deposits / withdrawals (5 Nov 2026): their own row above the numbers, so they never cover the P&L; grey = out, teal = in */
.cal .d .dtags { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 100%; margin-bottom: 1px; }
.mchip { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 800; line-height: 15px; color: #fff; border-radius: 5px; padding: 1px 5px; white-space: nowrap; cursor: help; }
.mchip svg { width: 11px; height: 11px; stroke-width: 2.6; flex: none; }
.mchip.out { background: #475569; } .mchip.in { background: #0d9488; }
.cal .d.m { cursor: pointer; } .cal .d.m.faint { opacity: .6; }
.he-tip .msep { border-top: 1px solid rgba(255, 255, 255, .28); margin: 5px 0 3px; }
.mday-box { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.55; padding: 8px 10px; margin: 0 0 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.mday-box svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #0d9488; }
@media (max-width: 720px) {
    .cal { gap: 4px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .cal .wk, .cal .h.wkh { display: none; }
    .cal .d { min-height: 58px; padding: 4px; border-radius: 10px; }
    .cal .d .v { font-size: 11px; } .cal .d .s { display: none; }
    .cal .d .v.vl { display: none; } .cal .d .v.vs { display: block; white-space: nowrap; letter-spacing: -.02em; }
    .mchip { padding: 1px 3px; } .mchip span { display: none; } .cal .d .dtags { gap: 2px; }
    .cal .d.hm { justify-content: flex-start; padding-top: 24px; }     /* a day with a money chip starts under the day number */
}

/* ---------- upload ---------- */
.drop {
    display: block; border: 2.5px dashed color-mix(in srgb, var(--brand-a) 45%, transparent); border-radius: 22px; padding: 38px 20px; text-align: center; cursor: pointer; transition: .2s;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-a) 6%, transparent), color-mix(in srgb, var(--brand-b) 6%, transparent));
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop .big-ic { width: 70px; height: 70px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 35%, transparent); }
.drop .big-ic svg { width: 32px; height: 32px; }
.drop h3 { margin: 0 0 6px; font-size: 19px; justify-content: center; }
.types { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; background: var(--surface); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .2s; }
td[contenteditable] { outline: none; }
td[contenteditable]:focus { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .big-ic { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 16px 36px color-mix(in srgb, var(--brand) 35%, transparent); }
.empty-state .big-ic svg { width: 38px; height: 38px; }
.empty-state h2 { margin: 0 0 8px; font-size: 24px; }
.empty-state p { color: var(--ink-2); max-width: 520px; margin: 0 auto 22px; }

/* ---------- score ---------- */
.score-big { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 40px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.bar-row .track { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; }

/* tiles */
.tile { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s, background-color .15s; min-width: 0; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile.w { background: var(--profit-bg); border-color: rgba(10, 154, 92, .3); }
.tile.l { background: var(--loss-bg); border-color: rgba(220, 42, 42, .3); }
.tile .tt { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.tile .tv { font-size: 21px; font-weight: 800; margin: 6px 0 2px; }
.tile .ts { font-size: 12px; color: var(--ink-2); display: flex; gap: 10px; flex-wrap: wrap; }

.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.spark { display: inline-block; vertical-align: middle; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; font-size: 17px; font-weight: 800; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.note svg { color: var(--brand); margin-top: 2px; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); gap: 14px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media print {
    .sidebar, .topbar .row, .filters, .btn, .mobile-bar { display: none !important; }
    .shell { display: block; } .main { padding: 0; } .card { break-inside: avoid; box-shadow: none; }
}
@media (max-width: 720px) {
    .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .filters::-webkit-scrollbar { display: none; }
    .flt { flex: none; }
    .flt-title { display: none; }
    #printBtn, .user-pill b { display: none; }
    .topbar h1 { font-size: 21px; }
    .insight { padding: 18px; }
    .insight .big { font-size: 24px; }
}

/* ---------- languages ---------- */
:root[lang="ar"] { --font: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', system-ui, sans-serif; }
:root[lang="ur"] { --font: 'Noto Naskh Arabic', 'Plus Jakarta Sans', system-ui, sans-serif; }
:root[lang="hi"] { --font: 'Plus Jakarta Sans', 'Noto Sans Devanagari', system-ui, sans-serif; }
:root[lang="zh"] { --font: 'Plus Jakarta Sans', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Noto Sans SC', system-ui, sans-serif; }
:root[lang="ru"] { --font: 'Golos Text', 'Plus Jakarta Sans', system-ui, sans-serif; }
:root[lang="ar"] body, :root[lang="ur"] body { line-height: 1.7; }
:root[lang="ar"] .kpi .k-val, :root[lang="ur"] .kpi .k-val, :root[dir="rtl"] .num { font-family: 'Plus Jakarta Sans', var(--font); }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.lang-pick svg { width: 17px; height: 17px; color: var(--brand); }
.lang-pick select { border: 0; background: transparent; font-weight: 700; outline: none; cursor: pointer; padding: 4px 2px; max-width: 120px; }
.lang-pick:focus-within { border-color: var(--brand); }
/* right-to-left: the sidebar moves to the right on its own (grid follows direction); charts keep their left-to-right axes */
[dir="rtl"] .chart, [dir="rtl"] .spark, [dir="rtl"] .k-art { direction: ltr; }
[dir="rtl"] .num, [dir="rtl"] td.r { direction: ltr; unicode-bidi: plaintext; }
[dir="rtl"] .ratio-bar { flex-direction: row-reverse; }
@media (max-width: 960px) {
    [dir="rtl"] .sidebar { left: auto; right: 0; transform: translateX(100%); }
    [dir="rtl"] .sidebar.open { transform: none; }
}

/* ---------- profit / loss language: bull = profit, bear = loss ---------- */
/* strong tone for money, soft tone for percentages and counts */
:root { --bull: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Ccircle cx='9.4' cy='12.6' r='1' fill='black'/%3E%3Ccircle cx='14.6' cy='12.6' r='1' fill='black'/%3E%3Cellipse cx='10.5' cy='19.2' rx='.9' ry='1.1' fill='black'/%3E%3Cellipse cx='13.5' cy='19.2' rx='.9' ry='1.1' fill='black'/%3E%3C/mask%3E%3Cg mask='url(%23m)'%3E%3Cpath d='M1.5 2.5c.2 4.6 2.8 7.2 6.6 7.3l.9-2.1C5.9 7.5 3.9 6 3.4 2.5z'/%3E%3Cpath d='M22.5 2.5c-.2 4.6-2.8 7.2-6.6 7.3l-.9-2.1c3.1-.2 5.1-1.7 5.6-5.2z'/%3E%3Cpath d='M8 9.3 3 9.6c.6 2 2.6 2.7 5.2 2.2z'/%3E%3Cpath d='M16 9.3l5 .3c-.6 2-2.6 2.7-5.2 2.2z'/%3E%3Cpath d='M8.2 8h7.6c1.1 0 1.8.9 1.6 2l-1 5.6c-.1.8.4 1.6.4 2.6 0 2-1.6 3.3-3.4 3.3h-2.8c-1.8 0-3.4-1.3-3.4-3.3 0-1 .5-1.8.4-2.6l-1-5.6c-.2-1.1.5-2 1.6-2z'/%3E%3C/g%3E%3C/svg%3E"); --bear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Ccircle cx='5.6' cy='5.6' r='1.3' fill='black'/%3E%3Ccircle cx='18.4' cy='5.6' r='1.3' fill='black'/%3E%3Ccircle cx='8.9' cy='11.8' r='1' fill='black'/%3E%3Ccircle cx='15.1' cy='11.8' r='1' fill='black'/%3E%3Cpath fill-rule='evenodd' fill='black' d='M12 13.6c-2.4 0-4.3 1.5-4.3 3.4s1.9 3.4 4.3 3.4 4.3-1.5 4.3-3.4-1.9-3.4-4.3-3.4zm0 1.2c.9 0 1.6.5 1.6 1.1S12.9 17 12 17s-1.6-.5-1.6-1.1.7-1.1 1.6-1.1z'/%3E%3C/mask%3E%3Cg mask='url(%23m)'%3E%3Ccircle cx='5.6' cy='5.6' r='3.4'/%3E%3Ccircle cx='18.4' cy='5.6' r='3.4'/%3E%3Cellipse cx='12' cy='13.4' rx='9' ry='8.6'/%3E%3C/g%3E%3C/svg%3E"); --loss-deep: #B42318; --profit-deep: #067647; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --loss-deep: #FF8C8C; --profit-deep: #4ADE80; } }
:root[data-theme="dark"] { --loss-deep: #FF8C8C; --profit-deep: #4ADE80; }
.beast { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; background: currentColor; -webkit-mask: var(--bear) center / contain no-repeat; mask: var(--bear) center / contain no-repeat; flex: none; }
.beast.bull { -webkit-mask-image: var(--bull); mask-image: var(--bull); }
.neg-soft { color: color-mix(in srgb, var(--loss) 72%, var(--muted)); }
.pos-soft { color: color-mix(in srgb, var(--profit) 72%, var(--muted)); }
.k-val.neg, .metric .v.neg { color: var(--loss-deep); }
.k-val.pos, .metric .v.pos { color: var(--profit-deep); }
/* KPI cards: strong tint + a big faint bull or bear in the corner */
.card.kpi:has(.k-val.neg) { background: linear-gradient(150deg, color-mix(in srgb, var(--loss-bg) 85%, var(--surface)) 0%, var(--surface) 72%); border-color: color-mix(in srgb, var(--loss) 30%, var(--line)); }
.card.kpi:has(.k-val.pos) { background: linear-gradient(150deg, color-mix(in srgb, var(--profit-bg) 85%, var(--surface)) 0%, var(--surface) 72%); border-color: color-mix(in srgb, var(--profit) 30%, var(--line)); }
.card.kpi:has(.k-val.neg):not(:has(.k-art))::after, .card.kpi:has(.k-val.pos):not(:has(.k-art))::after {
    content: ''; position: absolute; inset-inline-end: -8px; bottom: -14px; width: 92px; height: 92px; opacity: .13; pointer-events: none;
    background: var(--loss); -webkit-mask: var(--bear) center / contain no-repeat; mask: var(--bear) center / contain no-repeat; }
.card.kpi:has(.k-val.pos):not(:has(.k-art))::after { background: var(--profit); -webkit-mask-image: var(--bull); mask-image: var(--bull); }
/* small metric tiles: soft tint + a small bull or bear by the label */
.metric:has(.v.neg) { background: color-mix(in srgb, var(--loss-bg) 55%, var(--surface-2)); border-color: color-mix(in srgb, var(--loss) 22%, var(--line)); }
.metric:has(.v.pos) { background: color-mix(in srgb, var(--profit-bg) 55%, var(--surface-2)); border-color: color-mix(in srgb, var(--profit) 22%, var(--line)); }
.metric:has(.v.neg) .l::before, .metric:has(.v.pos) .l::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-inline-end: 5px; vertical-align: -2px;
    background: var(--loss); -webkit-mask: var(--bear) center / contain no-repeat; mask: var(--bear) center / contain no-repeat; }
.metric:has(.v.pos) .l::before { background: var(--profit); -webkit-mask-image: var(--bull); mask-image: var(--bull); }
/* instrument badges */
.sym-ic { flex: none; width: 26px; height: 26px; border-radius: 99px; display: inline-grid; place-items: center; font: 800 11.5px/1 var(--font); color: #fff; letter-spacing: -.02em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14); }
.sym-ic svg { width: 14px; height: 14px; }
.sym-ic small { font-size: 8px; opacity: .85; margin-inline-start: 1px; }
.sym-ic.metal { background: linear-gradient(135deg, #F7C948, #C98A0B); }
.sym-ic.silver { background: linear-gradient(135deg, #D5DBE5, #8A94A6); }
.sym-ic.btc { background: linear-gradient(135deg, #F9A23A, #E5770F); font-size: 14px; }
.sym-ic.eth { background: linear-gradient(135deg, #8C8DFC, #5559D6); font-size: 14px; }
.sym-ic.crypto { background: linear-gradient(135deg, #22C1A6, #0E8F7B); }
.sym-ic.index { background: linear-gradient(135deg, #4F7BF7, #2747B8); }
.sym-ic.oil { background: linear-gradient(135deg, #4B5563, #1F2937); }
.sym-ic.fx { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.sym-ic.other { background: linear-gradient(135deg, #8590A6, #5B6478); }
.sym-cell { display: inline-flex; align-items: center; gap: 8px; }
/* session / weekday / instrument tiles: bull or bear in the corner */
.tile { position: relative; overflow: hidden; }
.tile.w::after, .tile.l::after { content: ''; position: absolute; inset-inline-end: -6px; bottom: -10px; width: 64px; height: 64px; opacity: .14; pointer-events: none;
    background: var(--loss); -webkit-mask: var(--bear) center / contain no-repeat; mask: var(--bear) center / contain no-repeat; }
.tile.w::after { background: var(--profit); -webkit-mask-image: var(--bull); mask-image: var(--bull); }
.tile .tv.neg { color: var(--loss-deep); } .tile .tv.pos { color: var(--profit-deep); }
/* calendar: a small bull or bear on every traded day */
.cal .d.w::before, .cal .d.l::before { content: ''; position: absolute; top: 7px; inset-inline-start: 8px; width: 15px; height: 15px; opacity: .55;
    background: var(--loss); -webkit-mask: var(--bear) center / contain no-repeat; mask: var(--bear) center / contain no-repeat; }
.cal .d.w::before { background: var(--profit); -webkit-mask-image: var(--bull); mask-image: var(--bull); }
.cal .d.w .v { color: var(--profit-deep); } .cal .d.l .v { color: var(--loss-deep); }
/* trade journal: a green or red edge on every row */
.t tr.tw td:first-child { box-shadow: inset 3px 0 0 var(--profit-strong); }
.t tr.tl td:first-child { box-shadow: inset 3px 0 0 var(--loss-strong); }
:root[dir="rtl"] .t tr.tw td:first-child { box-shadow: inset -3px 0 0 var(--profit-strong); }
:root[dir="rtl"] .t tr.tl td:first-child { box-shadow: inset -3px 0 0 var(--loss-strong); }
.t td[class^="side-"] svg { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 3px; }
/* overview hero: the top habit drawn big */
.hero-gl { flex: none; width: 92px; height: 92px; border-radius: 20px; background: rgba(255, 255, 255, .94); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.hero-gl svg.gl { width: 78px; height: 78px; }
.hero-gl .gl .gr { stroke: #E3E7F0; }
@media (max-width: 720px) { .hero-gl { width: 64px; height: 64px; border-radius: 14px; } .hero-gl svg.gl { width: 54px; height: 54px; } }

/* ---------- colour themes (data-accent on <html>); Violet = default, recommended ---------- */
:root[data-accent="ocean"] { --brand: #1D6FE8; --brand-a: #2F6BFF; --brand-b: #22D3EE; --brand-2: #22D3EE; --hero-deep: #0B2A6B; --hero-end: #0E6A8C; --brand-soft: #E3EDFF; --side: #07142B; }
:root[data-accent="ocean"][data-theme="dark"] { --brand: #6AA8FF; --brand-soft: #10264A; }
:root[data-accent="gold"] { --brand: #B7791F; --brand-a: #E3A008; --brand-b: #F97316; --brand-2: #F97316; --hero-deep: #4A2C05; --hero-end: #9A3412; --brand-soft: #FDF1D8; --side: #15110A; }
:root[data-accent="gold"][data-theme="dark"] { --brand: #F5B83D; --brand-soft: #3A2A0A; }
:root[data-accent="orchid"] { --brand: #A23CD8; --brand-a: #C026D3; --brand-b: #7C3AED; --brand-2: #7C3AED; --hero-deep: #3B0B57; --hero-end: #5B21B6; --brand-soft: #F6E8FD; --side: #170A1F; }
:root[data-accent="orchid"][data-theme="dark"] { --brand: #D58CF7; --brand-soft: #3A1650; }
:root[data-accent="graphite"] { --brand: #334155; --brand-a: #475569; --brand-b: #94A3B8; --brand-2: #94A3B8; --hero-deep: #0B1120; --hero-end: #1E293B; --brand-soft: #E8ECF2; --side: #0E1116; }
:root[data-accent="graphite"][data-theme="dark"] { --brand: #A5B4CC; --brand-soft: #1F2937; }
:root[data-accent="aqua"] { --brand: #0B87A8; --brand-a: #06B6D4; --brand-b: #3B82F6; --brand-2: #3B82F6; --hero-deep: #063B4D; --hero-end: #1E40AF; --brand-soft: #DDF5FA; --side: #04161C; }
:root[data-accent="aqua"][data-theme="dark"] { --brand: #4FD1EA; --brand-soft: #0C3340; }
.accent-pop { position: absolute; z-index: 90; width: 248px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 10px; }
.accent-pop .ah { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px 8px; }
.accent-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; text-align: start; flex-wrap: wrap; min-width: 0; }
.accent-opt:hover { background: var(--surface-2); }
.accent-opt.on { background: var(--brand-soft); }
.accent-opt .sw { flex: none; width: 30px; height: 30px; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.accent-opt .grow { flex: 1; min-width: 0; }
.accent-opt .rec { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--profit-bg); color: var(--profit); }
.accent-opt svg { width: 16px; height: 16px; color: var(--brand); }
.accent-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; margin-top: 14px; }
.accent-row .accent-opt { border: 1.5px solid var(--line); }
.accent-row .accent-opt.on { border-color: var(--brand); }

/* ---------- current streak tile ---------- */
.cs-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 10px 14px; }
.cs-col { min-width: 0; }
.cs-lab { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.cs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cs-ring { width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 16px; border: 3px solid var(--line); color: var(--ink-2); flex: none; }
.cs-ring.w { border-color: var(--profit-strong); color: var(--profit-deep); }
.cs-ring.l { border-color: var(--loss-strong); color: var(--loss-deep); }
.cs-pills { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cs-pills .chip { white-space: nowrap; }
.cs-pills .chip { font-size: 11px; padding: 2px 8px; }
/* ---------- winning & losing streaks ---------- */
.stk-card { margin-bottom: 18px; padding: 14px 18px; }
.stk-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stk-h h3 { margin: 0; font-size: 15px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.stk-line { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; }
.stk-3 { display: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.stk-card.open .stk-3 { display: grid; }
.stk-c h4 { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.stk-b { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.stk-b.w { background: color-mix(in srgb, var(--profit-bg) 60%, var(--surface)); border-color: color-mix(in srgb, var(--profit) 30%, var(--line)); }
.stk-b.l { background: color-mix(in srgb, var(--loss-bg) 60%, var(--surface)); border-color: color-mix(in srgb, var(--loss) 30%, var(--line)); }
.stk-b.none { cursor: default; opacity: .6; }
.stk-b:not(.none):hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.stk-n { font-size: 26px; font-weight: 800; min-width: 34px; text-align: center; }
.stk-b.w .stk-n { color: var(--profit-deep); } .stk-b.l .stk-n { color: var(--loss-deep); }
/* ---------- highlights bar ---------- */
.hl-bar { margin-bottom: 18px; }
.hl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hl-h h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.hl-h h2 svg { color: var(--brand); width: 20px; height: 20px; }
.hl-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hl-btn { --c: var(--brand); display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 12px; cursor: pointer; font: 700 13px var(--font);
    color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent); transition: .15s; }
.hl-btn svg { width: 16px; height: 16px; }
.hl-btn:hover { background: color-mix(in srgb, var(--c) 16%, var(--surface)); transform: translateY(-1px); box-shadow: var(--shadow); }
.hl-summary { --c: #6D5DFC; } .hl-instrument { --c: #2F6BFF; } .hl-bars { --c: #4F46E5; } .hl-lots { --c: #9333EA; }
.hl-burst { --c: #0D9488; } .hl-patterns { --c: #DB2777; } .hl-voice { --c: #E11D48; } .hl-break { --c: #DC2626; } .hl-library { --c: #D97706; }
:root[data-theme="dark"] .hl-btn { color: color-mix(in srgb, var(--c) 55%, #fff); }
@media (max-width: 720px) { .hl-btn { padding: 7px 11px; font-size: 12.5px; } }

/* ---------- highlight report pop-ups ---------- */
.modal .box.wide { width: min(1240px, 100%); }
.hl-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hl-tiles { --gap: 10px; gap: 10px; margin-bottom: 8px; }

.hl-tile { padding: 12px; }
.hl-tile .tt { font-size: 13.5px; gap: 7px; flex-wrap: wrap; min-width: 0; }
.hl-tile .tt .grow { flex: 1 0 auto; max-width: 100%; overflow-wrap: normal; word-break: normal; }
.hl-tile .tt .side-buy, .hl-tile .tt .side-sell { white-space: nowrap; }
.hl-tile .tt svg { width: 16px; height: 16px; color: var(--brand); }
.hl-tile .tv { font-size: 19px; }
.hl-tile .ts { justify-content: space-between; margin-top: 2px; font-size: 11.5px; }
.tile.on { outline: 2.5px solid var(--brand); outline-offset: 1px; }
.tile.empty { opacity: .55; cursor: default; }
.chip.xs { font-size: 10.5px; padding: 1px 7px; }
.hl-sec { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.hl-sec h4 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 7px; }
.hl-sec h4 svg { width: 17px; height: 17px; color: var(--brand); }
.hl-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.hl-f { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--muted); }
.hl-f svg { width: 14px; height: 14px; }
.hl-f.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.hl-f.off { opacity: .55; }
.hl-f select, .hl-f input { border: 0; background: transparent; font: 600 13px var(--font); color: var(--ink); padding: 4px 6px; outline: 0; }
.sbar { display: block; height: 8px; border-radius: 99px; background: var(--profit-strong); min-width: 2px; }
.sbar.neg { background: var(--loss-strong); }
tr.on td { background: var(--brand-soft); }
.input.sm { padding: 6px 10px; font-size: 13px; width: auto; border-radius: 10px; }
.hl-sec .input.sm { margin-inline-start: 6px; }
.rk { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 99px; background: var(--ink); color: var(--surface); font-size: 10.5px; font-weight: 800; }
.sbar.burst { background: linear-gradient(90deg, #14B8A6, #0D9488); }
/* Trades per minute: a window with several instruments lists them one under the other, and the bar keeps its width (29 Oct) */
.b-syms { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.b-bar { width: 80px; }
.side-buy svg, .side-sell svg { width: 13px; height: 13px; vertical-align: -2px; }
.pat-grid { --gap: 10px; gap: 10px; }
.pat { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.pat.click { cursor: pointer; } .pat.click:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.pat.r { background: color-mix(in srgb, var(--loss-bg) 55%, var(--surface)); border-color: color-mix(in srgb, var(--loss) 25%, var(--line)); }
.pat.g { background: color-mix(in srgb, var(--profit-bg) 55%, var(--surface)); border-color: color-mix(in srgb, var(--profit) 25%, var(--line)); }
.pat .pk { font-size: 12px; font-weight: 800; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.pat .pk svg { width: 15px; height: 15px; }
.pat .pv { font-size: 20px; font-weight: 800; margin: 4px 0 2px; }
.pat.r .pv { color: var(--loss-deep); } .pat.g .pv { color: var(--profit-deep); }
.pat .pn { font-size: 12.5px; color: var(--ink-2); }
.hl-top { padding: 14px; }
/* trade break */
.brk-pill { position: fixed; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 10px;
    padding: 8px 8px 8px 14px; border-radius: 99px; background: #B91C1C; color: #fff; box-shadow: 0 10px 30px rgba(185, 28, 28, .45); cursor: pointer; font-size: 13.5px; }
.brk-pill svg { width: 18px; height: 18px; }
.brk-pill .t { font-variant-numeric: tabular-nums; font-weight: 800; }
.brk-pill .btn { background: rgba(255, 255, 255, .18); color: #fff; border: 0; }
.brk-pick, .brk-run { text-align: center; padding: 10px 0; }
.brk-ic { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; background: color-mix(in srgb, #DC2626 12%, var(--surface)); color: #DC2626; }
.brk-ic svg { width: 34px; height: 34px; }
.brk-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.brk-run { position: relative; }
.brk-ring { width: 220px; height: 220px; transform: rotate(-90deg); }
.brk-ring circle { fill: none; stroke-width: 9; }
.brk-ring .bg { stroke: var(--line); }
.brk-ring .fg { stroke: #DC2626; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.brk-left { position: absolute; top: 88px; left: 0; right: 0; font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.brk-run .big-t { font-size: 17px; margin: 8px 0 4px; }
.gl.xs { width: 22px; height: 22px; border-radius: 6px; flex: none; }
/* library */
.lib-pages { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-page { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 13px var(--font); cursor: pointer; }
.lib-page svg { width: 16px; height: 16px; color: var(--brand); }
.lib-page:hover { border-color: var(--brand); }
.lib-page.off { cursor: default; color: var(--muted); }
.lib-grid { --gap: 12px; gap: 12px; }
.lib-card { border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); }
.lib-card.bad { border-top: 4px solid var(--loss-strong); }
.lib-card.ok { border-top: 4px solid var(--profit-strong); }
.lib-h { display: flex; gap: 12px; align-items: center; }
.lib-card .stopstart { grid-template-columns: 1fr; }
/* ---------- my voice ---------- */
.v-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cause.brand .rank { color: var(--brand); } .cause.brand::before { background: var(--grad); }
.cause.ok .rank { color: var(--profit); } .cause.ok::before { background: var(--profit-strong); }
.v-heart svg { width: 30px; height: 30px; }
.voice.playing { box-shadow: 0 0 0 3px var(--brand), var(--shadow-lg); }
.v-line .l { display: flex; align-items: center; gap: 6px; }
.icon-btn.xs { width: 24px; height: 24px; border-radius: 7px; }
.icon-btn.xs svg { width: 13px; height: 13px; }
.clips { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.clip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.clip.on { border-color: var(--brand); background: var(--brand-soft); }
.clip .pb { flex: none; width: 32px; height: 32px; border-radius: 99px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.clip .pb svg { width: 15px; height: 15px; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; min-width: 0; }
.wave i { flex: 1; min-width: 1px; border-radius: 2px; background: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.wave i.on { background: var(--brand); }
.clip .tm { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clip .tm b { color: var(--ink); }
.v-none { font-size: 12.5px; color: var(--muted); padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 12px; margin-bottom: 12px; }
.v-rec { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--loss-bg); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.v-rec .dot { width: 10px; height: 10px; border-radius: 99px; background: var(--loss-strong); animation: vblink 1s infinite; }
@keyframes vblink { 50% { opacity: .25; } }
.v-rec .lvl { flex: 1; height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.v-rec .lvl i { display: block; height: 100%; width: 0; background: var(--loss-strong); transition: width .1s; }
.btn.rec { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 40%, var(--line)); }
.btn.rec svg { color: var(--loss); }
/* overview chart controls */
.ch-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: -4px 0 10px; }
.seg.sm button { padding: 5px 10px; font-size: 12px; }
.seg.sm button svg { width: 14px; height: 14px; }
.ch-tools .hl-f { padding: 2px 2px 2px 8px; }
.ch-tools .hl-f input { font-size: 12px; padding: 3px 4px; }

/* top tiles open a detail pop-up */
.kpi.k-click { position: relative; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.kpi.k-click:hover, .kpi.k-click:focus-visible { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand); outline: none; }
.k-more { position: absolute; top: 10px; inset-inline-end: 10px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--surface-2); opacity: .7; transition: opacity .15s, color .15s; }
.k-more svg { width: 13px; height: 13px; }
.kpi.k-click:hover .k-more, .kpi.k-click:focus-visible .k-more { opacity: 1; color: var(--brand); box-shadow: 0 0 0 4px var(--surface); }
.kpi.k-click .k-more { opacity: 0; }
@media (hover: none) { .kpi.k-click .k-more { opacity: .7; } .kpi.k-click .k-top { padding-inline-end: 26px; } }
.k-runs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.k-runs .k-run { padding: 4px 14px 10px; }
.k-runs .hl-sec { margin-top: 10px; }
.pat.y .pv { color: var(--warn); }
.k-info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); cursor: help; flex: none; margin-inline-start: 2px; }
.k-info svg { width: 14px; height: 14px; }
.k-info:hover, .k-info:focus-visible { color: var(--brand); background: var(--surface-2); outline: none; }
.kpi .k-top { min-width: 0; }
.kpi .k-sub { row-gap: 4px; }
.kpi .k-top { flex-wrap: wrap; row-gap: 4px; }
.nw { white-space: nowrap; }
/* ---------- my voice: compact card (face) + details, like the weekly sheet ---------- */
.v-grid { --gap: 14px; gap: 14px; }
.v-grid > .vc.open { flex-basis: 100%; }
.vc { padding: 14px 16px 12px; cursor: pointer; }
.vc.open { cursor: default; }
.vc .vc-full { display: none; }
.vc.open .vc-full { display: flex; flex-direction: column; gap: 10px; }
.vc.open .vc-face { display: none; }
.vc-face { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.vc-head { display: flex; gap: 10px; align-items: center; min-width: 0; }
.vc-num { flex: none; width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #EA6A2F, #F5B700); box-shadow: 0 3px 8px rgba(234, 106, 47, .35); }
.vc.critical .vc-num { background: linear-gradient(135deg, #DC2A2A, #FB7185); box-shadow: 0 3px 8px rgba(220, 42, 42, .35); }
.vc.brand .vc-num { background: var(--grad); box-shadow: 0 3px 8px rgba(91, 76, 245, .35); }
.vc.ok .vc-num { background: linear-gradient(135deg, #0A9A5C, #34D399); box-shadow: none; }
.vc-gw { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.vc .rank { width: 62px; height: 62px; border-radius: 14px; }
.vc .rank svg.gl { width: 52px; height: 52px; }
.vc.open .rank { width: 74px; height: 74px; } .vc.open .rank svg.gl { width: 64px; height: 64px; }
.vc-cap { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.vc-t { flex: 1; min-width: 0; }
.vc-t h4 { margin: 0; font-size: 14.5px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.vc-t .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.vc-rec { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; align-self: flex-start; }
.vc-rec .muted { font-size: 11px; white-space: nowrap; }
.vc-when { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.vc-face .vc-when { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vc-mini { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, .9fr); gap: 6px; }    /* cost first and widest: AED / INR amounts are longer */
.vc-mini .metric { padding: 6px 9px; border-radius: 10px; min-width: 0; }
.vc-mini .metric .l { font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-mini .metric .v { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.metric.hot { background: var(--loss-bg); border-color: color-mix(in srgb, var(--loss) 25%, var(--line)); }
.vc-spark { height: 30px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.vc-spark svg { display: block; width: 100%; height: 30px; }
.vc-stop { display: flex; gap: 8px; align-items: center; background: var(--loss-bg); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; font-weight: 700; color: var(--loss-deep); min-width: 0; }
.vc-stop .l { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--loss); white-space: nowrap; flex: none; }
.vc-stop .l svg { width: 13px; height: 13px; }
.vc-face .vc-stop .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-note { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.vc .srow-clip { padding: 3px 8px 3px 3px; gap: 8px; }
.vc .srow-clip .pb { width: 26px; height: 26px; } .vc .srow-clip .pb svg { width: 12px; height: 12px; }
.vc .srow-clip .wave { height: 22px; } .vc .srow-clip .tm { font-size: 10.5px; }
.vc-act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; align-items: center; }
.vc-act .vc-more { margin-inline-start: auto; }
.vc-more svg { width: 14px; height: 14px; }
.vc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.vc-two .stopstart { margin: 0; } .vc-two .clips { margin: 0; }
/* open card: the numbers on the left, the running-cost chart on the right and tall enough to read (Mohsin, 28 Oct) */
.vc.open .vc-stats { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 10px 14px; align-items: stretch; }
.vc.open .vc-stats:not(:has(.drain-box)) { grid-template-columns: 1fr; }
.vc.open .vc-nums { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vc.open .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 0; }
.vc.open .metrics .metric:nth-child(5):last-child { grid-column: span 2; }
.vc.open .vc-stats .drain-box { display: flex; flex-direction: column; min-height: 140px; padding: 10px 12px 8px; }
.vc.open .vc-stats .drain-box svg.drain { flex: 1 1 0; height: 0; min-height: 100px; width: 100%; margin-top: 4px; }
.vc.open .share-bar { margin-bottom: 0; }
.vc.open .cause-act { display: flex; gap: 8px; flex-wrap: wrap; }
.vc.open .cause-act .vc-more { margin-inline-start: auto; }
@media (max-width: 900px) { .vc.open .vc-stats { grid-template-columns: 1fr; } .vc.open .vc-stats .drain-box { min-height: 120px; } .vc-two { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .vc.open .metrics { grid-template-columns: 1fr 1fr; } .vc-rec .muted { display: none; } }
.vc .drain-box { margin: 0; }
.hl-tools .seg, .ch-tools .seg { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 520px) {
    .vc-head { flex-wrap: wrap; }
    .vc-t { flex-basis: calc(100% - 120px); }
    .vc-rec { order: 5; flex-direction: row; align-items: center; width: 100%; padding-inline-start: 38px; }
    .vc .rank { width: 54px; height: 54px; } .vc .rank svg.gl { width: 46px; height: 46px; }
}
@media (max-width: 520px) { .vc-mini { gap: 5px; } .vc-mini .metric { padding: 5px 6px; } .vc-mini .metric .v { font-size: 12.5px; letter-spacing: -.02em; } .vc-mini .metric .l { font-size: 9px; } }
@media (max-width: 560px) { .topbar > .grow { flex: 1 1 100%; min-width: 0; } }
/* ---------- compact top tiles: the small numbers; Highlights below are the big part ---------- */
.kpi-row { --gap: 12px; gap: 12px; margin-bottom: 16px; }
.kpi-row .kpi { padding: 12px 14px 11px; gap: 4px; border-radius: 16px; }
.kpi-row .k-top { font-size: 12px; gap: 7px; }
.kpi-row .hicon { width: 26px; height: 26px; border-radius: 8px; }
.kpi-row .hicon svg { width: 14px; height: 14px; }
.kpi-row .k-val { font-size: 20px; }
.kpi-row .k-of { font-size: .62em; }
.kpi-row .k-sub { font-size: 11px; gap: 6px; }
.kpi-row .k-sub svg { width: 12px; height: 12px; }
.kpi-row .k-sub .chip { font-size: 10.5px; padding: 1px 7px; }
.kpi-row .k-art { inset-inline-end: 10px; bottom: 8px; opacity: .95; }
.kpi-row .ratio-bar { height: 6px; margin-top: 3px; }
.kpi-row .k-more { top: 8px; inset-inline-end: 8px; width: 20px; height: 20px; }
.kpi-row .k-info { width: 16px; height: 16px; } .kpi-row .k-info svg { width: 12px; height: 12px; }
.card.kpi-row .kpi::after, .kpi-row .card.kpi:has(.k-val.neg):not(:has(.k-art))::after, .kpi-row .card.kpi:has(.k-val.pos):not(:has(.k-art))::after { width: 58px; height: 58px; bottom: -10px; inset-inline-end: -6px; }
.kpi-row .cs-wrap { grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi-row .cs-ring { width: 30px; height: 30px; font-size: 13.5px; border-width: 2.5px; }
.kpi-row .cs-row { flex-wrap: nowrap; gap: 6px; }
.cs-t { min-width: 0; } .cs-t .cs-lab { margin: 0; font-size: 9.5px; }
.cs-best { font-size: 11.5px; font-weight: 800; white-space: nowrap; }
/* ---------- Highlights: the big tiles (icon, what it is, one live number, open) ---------- */
.hl-grid { display: flex; flex-wrap: wrap; --gap: 14px; gap: 14px; }
.hl-grid > * { flex: 0 1 calc((100% - (var(--cols, 5) - 1) * var(--gap)) / var(--cols, 5)); min-width: 0; }
.hl-card { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: start; cursor: pointer;
    padding: 16px 16px 14px; border-radius: 18px; font: inherit; color: var(--ink); overflow: hidden;
    border: 1.5px solid color-mix(in srgb, var(--c) 28%, var(--line));
    background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 55%), var(--surface);
    box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.hl-card:hover, .hl-card:focus-visible { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 22%, transparent); outline: none; }
.hc-top { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.hc-ic { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.hc-ic svg { width: 24px; height: 24px; stroke-width: 2.2; }
.hc-tt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hc-tt b { font-size: 15px; line-height: 1.25; font-weight: 800; }
.hc-tt span { font-size: 12px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-v { margin-top: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: color-mix(in srgb, var(--c) 80%, var(--ink)); overflow-wrap: anywhere; }
.hc-v.neg { color: var(--loss-deep); } .hc-v.pos { color: var(--profit-deep); }
.hc-n { font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.hc-go { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--c); }
.hc-go svg { width: 14px; height: 14px; transition: transform .15s; }
.hl-card:hover .hc-go svg { transform: translateX(3px); }
[dir="rtl"] .hc-go svg { transform: scaleX(-1); } [dir="rtl"] .hl-card:hover .hc-go svg { transform: scaleX(-1) translateX(3px); }
.hl-streaks { --c: #EA580C; }
:root[data-theme="dark"] .hl-card .hc-go, :root[data-theme="dark"] .hl-card .hc-v:not(.neg):not(.pos) { color: color-mix(in srgb, var(--c) 55%, #fff); }
.hl-h h2 { font-size: 22px; } .hl-h h2 svg { width: 22px; height: 22px; }
.stk-card.in-pop { padding: 0; border: 0; box-shadow: none; background: none; }
.stk-card.in-pop .stk-h { display: none; }
.hl-card.hl-summary { --c: #6D5DFC; } .hl-card.hl-instrument { --c: #2563EB; } .hl-card.hl-bars { --c: #0891B2; } .hl-card.hl-lots { --c: #9333EA; }
.hl-card.hl-burst { --c: #0D9488; } .hl-card.hl-patterns { --c: #DB2777; } .hl-card.hl-streaks { --c: #EA580C; } .hl-card.hl-voice { --c: #E11D48; }
.hl-card.hl-break { --c: #16A34A; } .hl-card.hl-library { --c: #D97706; }
@media (max-width: 520px) { .kpi-row .k-art { display: none; } .kpi-row .cs-wrap { grid-template-columns: 1fr; gap: 6px; } .kpi-row .k-top { row-gap: 2px; } }
.kpi-row .kpi.cs { container-type: inline-size; }
@container (max-width: 165px) { .kpi-row .cs-wrap { grid-template-columns: 1fr; gap: 6px; } }
/* trades pop-up: row numbers + paging */
.t th.rn, .t td.rn { width: 1%; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; white-space: nowrap; padding-inline-end: 6px; }
.pager { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 12px; }
.pager .pg-l { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pager select.input { width: auto; padding: 5px 28px 5px 10px; font-size: 13px; }
.pager .pg-of { font-size: 13px; font-variant-numeric: tabular-nums; }
.pager .pg-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager .btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
[dir="rtl"] .pager .pg-nav svg { transform: scaleX(-1); }
@media (max-width: 560px) { .pager .pg-nav span { display: none; } .pager .grow { display: none; } .pager .pg-nav { width: 100%; justify-content: space-between; } }
.tm-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tm-dates .hl-f input { font-size: 13px; }
/* report tiles: every line stays one line, so all tiles in a row keep the same height */
.hl-tile { container-type: inline-size; }
.hl-tile .ts { flex-wrap: nowrap; gap: 6px; white-space: nowrap; }
.hl-tile .ts > span { min-width: 0; }
.hl-tile .tt .chip.xs { white-space: nowrap; }
@container (max-width: 160px) { .hl-tile .ts { font-size: 10.5px; } .hl-tile .tv { font-size: 17px; } }
/* "best" / "worst": a small tab on the top edge, so it never pushes the tile taller */
.hl-tile { position: relative; overflow: hidden; }
.hl-tile .tt .chip.xs { position: absolute; top: 0; inset-inline-end: 10px; border-radius: 0 0 7px 7px; padding: 1px 7px 2px; font-size: 9.5px; line-height: 1.2; text-transform: uppercase; letter-spacing: .05em; }
/* ---------- hover card on a tile: what it is, how to read it, yours ---------- */
.hc-pop { --c: var(--brand); position: fixed; z-index: 90; width: 320px; max-width: calc(100vw - 20px); border-radius: 16px; overflow: hidden; pointer-events: none;
    background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
    box-shadow: 0 22px 50px rgba(15, 23, 42, .22), 0 0 0 4px color-mix(in srgb, var(--c) 10%, transparent);
    opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .16s, transform .16s; }
.hc-pop.up { transform: translateY(-6px) scale(.98); }
.hc-pop[data-side="right"] { transform: translateX(-6px) scale(.98); } .hc-pop[data-side="left"] { transform: translateX(6px) scale(.98); }
.hc-pop.on { opacity: 1; transform: none; }
.hp-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: #fff; background: linear-gradient(120deg, var(--c), color-mix(in srgb, var(--c) 60%, #0E1525)); }
.hp-h b { font-size: 14.5px; letter-spacing: -.01em; }
.hp-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.hp-ic svg { width: 17px; height: 17px; }
.hp-b { padding: 11px 14px 6px; }
.hp-l { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 2px 0 4px; }
.hp-b p { margin: 0 0 9px; font-size: 12.5px; line-height: 1.5; color: var(--ink); }
.hp-r { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.4; margin-bottom: 5px; color: var(--ink-2); }
.hp-r svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.hp-r.g svg { color: var(--profit); } .hp-r.r svg { color: var(--loss); }
.hp-you { margin-top: 9px; border-radius: 12px; padding: 8px 11px; background: var(--surface-2); border: 1px solid var(--line); }
.hp-you.g { background: var(--profit-bg); border-color: color-mix(in srgb, var(--profit) 30%, transparent); }
.hp-you.r { background: var(--loss-bg); border-color: color-mix(in srgb, var(--loss) 30%, transparent); }
.hp-you.y { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.hp-you .hp-l { margin-top: 0; }
.hp-v { display: inline-block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin-inline-end: 8px; }
.hp-you.g .hp-v { color: var(--profit-deep); } .hp-you.r .hp-v { color: var(--loss-deep); } .hp-you.y .hp-v { color: var(--warn); }
.hp-say { display: inline-block; vertical-align: 3px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--surface); color: var(--ink-2); }
.hp-you.g .hp-say { color: var(--profit-deep); } .hp-you.r .hp-say { color: var(--loss-deep); }
.hp-n { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; }
.hp-f { display: flex; align-items: center; gap: 6px; padding: 8px 14px 10px; font-size: 11.5px; font-weight: 700; color: var(--c); }
.hp-f svg { width: 14px; height: 14px; }
:root[data-theme="dark"] .hp-f { color: color-mix(in srgb, var(--c) 55%, #fff); }
/* Loss DNA: compact cards (same pieces as the voice card) */
.dna .vc-rec .chip { font-size: 12px; font-weight: 800; }
.dna .vc-rec .muted { font-size: 10.5px; }
.metric.cool { background: var(--profit-bg); border-color: color-mix(in srgb, var(--profit) 30%, var(--line)); }
.dna .vc-act .btn.sm { padding: 5px 10px; font-size: 12px; }
.dna .vc-act .chip { font-size: 11.5px; }

/* opened Loss DNA card: numbers, Stop and Build instead on the left, the running cost as a tall panel on the right */
.vc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 38%); gap: 14px; align-items: stretch; }
.vc-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vc.open .vc-left .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vc-right { display: flex; min-width: 0; }
.vc-right .drain-box { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; }
.vc-right .drain { flex: 1 1 auto; height: 100%; min-height: 180px; }
.dr-dates { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.vc.open .stopstart { margin: 0; }
@media (max-width: 900px) { .vc-body { grid-template-columns: 1fr; } .vc-right .drain { min-height: 130px; } }
@media (max-width: 420px) { .vc.open .vc-left .metrics { grid-template-columns: 1fr 1fr; } }
/* Loss DNA: 3 across with air between the cards; Details shows the full card in a pop-up */
.dna-grid { --gap: 24px; gap: 24px; }
.modal .mb > .in-pop { border: 0; box-shadow: none; padding: 0; background: transparent; }
.modal .mb > .in-pop::before { display: none; }
/* Overview calendar card */
.ov-cal { margin-bottom: 18px; }
.ov-cal .card-head { flex-wrap: wrap; row-gap: 8px; }
.ov-cal.off .card-head { margin-bottom: 0; }
/* day pop-up: trades opened per minute on the left (weekly report, 27 Oct); busiest minute red, a click lights its rows */
.tm-split.has-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.tm-main { min-width: 0; }
.tm-min { max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.tm-min-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 2px 4px 6px; font-size: 12.5px; position: sticky; top: -8px; background: var(--surface-2); z-index: 1; }
.tm-min-h svg { width: 15px; height: 15px; color: var(--brand); }
.tm-m { display: grid; grid-template-columns: 64px minmax(30px, 1fr) 34px 74px; align-items: center; gap: 6px; padding: 4px 6px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; text-align: start; }
.tm-m:hover { background: var(--surface); }
.tm-m.on { background: #FEF3C7; box-shadow: inset 0 0 0 1.5px #F59E0B; }
.tm-m .t { white-space: nowrap; color: var(--ink-2); }
.tm-m .b { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tm-m .b i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.tm-m.top .b i { background: var(--loss-strong); } .tm-m.top .n, .tm-m.top .t { color: var(--loss-strong); font-weight: 800; }
.tm-m .n { font-weight: 800; text-align: end; } .tm-m .v { font-weight: 700; text-align: end; white-space: nowrap; font-size: 11.5px; }
.t tr.mhl td { background: #FEF3C7 !important; }
[data-theme="dark"] .tm-m.on, [data-theme="dark"] .t tr.mhl td { background: rgba(245, 158, 11, .22) !important; }
@media (max-width: 900px) { .tm-split.has-side { grid-template-columns: 1fr; } .tm-min { max-height: 220px; } }
/* metal names beside the symbol; Buy is always green and Sell always red (weekly report, 27 Oct) */
.sym-nm { display: inline-block; margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1.5;
    background: rgba(227, 160, 8, .14); color: #B45309; white-space: nowrap; vertical-align: 1px; }
[data-theme="dark"] .sym-nm { color: #FCD34D; }
.seg button[data-side="buy"] { color: var(--profit-deep, var(--profit)); }
.seg button[data-side="sell"] { color: var(--loss-deep, var(--loss)); }
.seg button[data-side="buy"].on { background: var(--profit-strong); color: #fff; }
.seg button[data-side="sell"].on { background: var(--loss-strong); color: #fff; }
/* My voice: the coach's audio line - one piece per recording (as long as its seconds), filling while it plays */
.vline { display: flex; gap: 6px; margin-top: 2px; }
.vseg { min-width: 34px; display: flex; flex-direction: column; gap: 3px; }
.vseg .bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.vseg .bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; transition: width .2s linear; }
.vseg .lab { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.vseg.on .lab { color: var(--brand); font-weight: 800; }
/* Stop from today: the rules pop-up of the Top 30 Days page - number, headline, Hindi line, what it cost (28 Oct) */
.rl-open { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 14px 16px; border: 1.5px solid rgba(220, 42, 42, .35); border-inline-start: 5px solid var(--loss-strong);
    border-radius: 14px; background: var(--loss-bg); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.rl-open:hover { box-shadow: 0 6px 18px rgba(220, 42, 42, .14); }
.rl-open .rl-oi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--loss-strong); color: #fff; flex: none; }
.rl-open .rl-oi svg { width: 22px; height: 22px; }
.rl-open .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rl-open .grow b { font-size: 15px; } .rl-open .grow span { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Open: a red pill with a light running round its edge, and a "Click here" hand nudging at it (Mohsin, 29 Oct) */
.rl-open .rl-go { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px 7px 16px; border-radius: 99px; border: 2.5px solid transparent; font-weight: 800; color: #fff; white-space: nowrap;
    background: linear-gradient(135deg, var(--loss-strong), #F97316) padding-box,
        conic-gradient(from var(--rp-a), var(--loss-strong) 0 48%, #fff 62%, #FFD166 70%, #F97316 82%, var(--loss-strong) 92%) border-box;
    box-shadow: 0 4px 14px rgba(239, 68, 68, .45); animation: rp-spin 1.8s linear infinite, rl-glow 1.6s ease-in-out infinite; }
.rl-open .rl-go svg { width: 15px; height: 15px; }
.rl-open:hover .rl-go { filter: brightness(1.08); }
.rl-hint { --nudge: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--loss-deep, var(--loss)); white-space: nowrap; animation: rl-nudge 1.1s ease-in-out infinite; }
.rl-hint svg { width: 17px; height: 17px; transform: rotate(90deg); }
[dir="rtl"] .rl-hint { --nudge: -6px; } [dir="rtl"] .rl-hint svg { transform: rotate(-90deg); }
[data-theme="dark"] .rl-hint { color: #FCA5A5; }
@keyframes rl-glow { 50% { box-shadow: 0 4px 24px rgba(239, 68, 68, .85), 0 0 0 5px rgba(239, 68, 68, .14); } }
@keyframes rl-nudge { 50% { transform: translateX(var(--nudge)); } }
@media (prefers-reduced-motion: reduce) { .rl-open .rl-go, .rl-hint { animation: none; } }
.rl-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rl-tools input { width: 74px; border: 0; background: transparent; font: inherit; font-weight: 800; color: var(--ink); padding: 2px 4px; outline: none; }
.rl-box { border-inline-start: 5px solid var(--loss-strong); border-radius: 14px; background: var(--surface-2); padding: 12px 18px 6px; margin-bottom: 12px; }
.rl-box.ask { border-inline-start-color: var(--profit-strong); }
.rl-box h3 { margin: 2px 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.rl-box h3 svg { width: 18px; height: 18px; color: var(--profit-strong); }
.rl { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rl:last-child { border-bottom: 0; }
.rl-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #FDE1E1; color: #B42318; font-weight: 800; font-size: 12.5px; margin-top: 1px; }
.rl-box.ask .rl-n { background: #DCF5E8; color: #067647; }
.rl-b { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.rl-en { font-weight: 800; font-size: 14.5px; color: #92400E; }
.rl-hi { font-size: 13.5px; color: #0369A1; }
.rl-c { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.rl-amt { padding: 3px 10px; border-radius: 8px; background: #FDE1E1; border: 1px solid rgba(220, 42, 42, .35); color: #B42318; font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.rl-amt.ok { background: #DCF5E8; border-color: rgba(10, 154, 92, .35); color: #067647; }
.rl-why { font-size: 12.5px; color: var(--ink-2); flex: 1 1 220px; min-width: 0; }    /* wraps under the amount on a phone instead of a 1-word column */
.rl-c .btn.sm { padding: 3px 9px; font-size: 11.5px; }
[data-theme="dark"] .rl-en { color: #FDE68A; } [data-theme="dark"] .rl-hi { color: #7DD3FC; }
[data-theme="dark"] .rl-amt { background: rgba(220, 42, 42, .2); color: #FCA5A5; } [data-theme="dark"] .rl-n { background: rgba(220, 42, 42, .25); color: #FCA5A5; }
@media (max-width: 760px) { .rl-hint { display: none; } }
@media (max-width: 560px) { .rl-open { gap: 10px; padding: 12px; } .rl-open .rl-amt { display: none; } .rl-open .rl-go { padding: 6px 11px 6px 12px; } }
/* currency sits at the right end of the filter row (Mohsin, 28 Oct); boxes a little tighter so the row stays on one line */
.cur-flt { margin-inline-start: auto; }
.filters { gap: 6px; }
.flt { gap: 5px; padding: 4px 4px 4px 9px; }
.flt select { padding: 5px 2px; }
.flt [data-f="ds"] { max-width: 150px; }
/* Overview calendar: a smaller month on the left, the month in numbers on the right (28 Oct) */
.ovc { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.ov-cal .cal { gap: 6px; }
.ov-cal .cal .d { min-height: 70px; padding: 20px 4px 4px; border-radius: 12px; }
.ov-cal .cal .d .v { font-size: 13.5px; } .ov-cal .cal .d .s { font-size: 10.5px; }
.ov-cal .cal .wk { padding: 7px 8px; border-radius: 12px; } .ov-cal .cal .wk .v { font-size: 13px; }
.ov-cal .cal .h { padding: 4px 0; font-size: 11.5px; }
.ovc-side { border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ms-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ms-h svg { width: 15px; height: 15px; color: var(--brand); }
.ms-net { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ms-sub { font-size: 12px; color: var(--muted); margin-top: -6px; }
.ms-bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; padding: 6px 4px 0; border-bottom: 1px dashed var(--line); }
.ms-bars i { flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; cursor: pointer; }
.ms-bars i.g { background: var(--profit-strong); } .ms-bars i.r { background: var(--loss-strong); }
.ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ms-kv { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ms-kv span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-kv b { font-size: 15px; }
.ms-day { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; text-align: start; }
.ms-day svg { width: 17px; height: 17px; flex: none; }
.ms-day.g svg, .ms-day.g b { color: var(--profit-deep, var(--profit)); } .ms-day.r svg, .ms-day.r b { color: var(--loss-deep, var(--loss)); }
.ms-day .grow { display: flex; flex-direction: column; min-width: 0; font-size: 12px; } .ms-day .l { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ms-day b { white-space: nowrap; }
.ms-so { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--loss-bg); font-size: 12.5px; font-weight: 700; }
.ms-so svg { width: 16px; height: 16px; color: var(--loss-strong); }
@media (max-width: 1100px) { .ovc { grid-template-columns: 1fr; } }
.card .row > .cur-flt { margin-inline-start: 0; }    /* inside the calendar row the totals stay at the far right */
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- every device (28 Oct): phones and tablets by touch, iPhone / iPad Safari, Android Chrome ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }          /* iPhone: no text blow-up when turned sideways */
button, a, select, input, label, [data-day] { -webkit-tap-highlight-color: transparent; }
@supports (height: 100dvh) {                                                 /* the phone's address bar no longer hides the bottom */
    .shell { min-height: 100dvh; }
    .sidebar { height: 100dvh; }
    .modal .box { max-height: 88dvh; }
}
@media (pointer: coarse) {
    input, select, textarea { font-size: 16px; }                             /* under 16 px iPhone Safari zooms the whole page in */
    .btn.sm, .icon-btn, .hl-f input, .hl-f select, .flt select, .rl-tools input, .seg button, .pager select { min-height: 36px; }
    .tm-m { min-height: 34px; }
}
/* the first frame on a phone / small tablet, before UI.balance() measures: start at 1 / 2 columns, never wider than the screen */
@media (max-width: 560px) { .g-auto, .hl-tiles, .pat-grid, .cause-grid, .lib-grid, .v-grid, .hl-grid, .dna-grid { --cols: 1; } .kpi-row { --cols: 2; } }
@media (min-width: 561px) and (max-width: 900px) { .g-auto, .pat-grid, .cause-grid, .lib-grid, .v-grid, .hl-grid, .dna-grid { --cols: 2; } }
/* safety net on every device: nothing can make the whole page wobble sideways (wide tables keep their own scroll box);
   clip, not hidden, so the sticky sidebar keeps working */
body { overflow-x: clip; }

/* ---------- Your repeat losses: the glowing button on the Loss DNA card and its pop-up (29 Oct) ---------- */
@property --rp-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.ins-wrap { position: relative; }
.ins-wrap.has-rp { margin-top: 24px; }
.ins-wrap.has-rp .insight { padding-top: 30px; }
.rp-btn { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap;
    padding: 8px 9px 8px 14px; border-radius: 99px; border: 2px solid transparent; color: #fff; font: inherit; font-size: 14px; font-weight: 800; max-width: calc(100% - 24px);
    background: linear-gradient(var(--loss-strong), var(--loss-strong)) padding-box,
        conic-gradient(from var(--rp-a), rgba(255, 255, 255, .15) 0 52%, #fff 66%, #FFD166 74%, rgba(255, 255, 255, .15) 86%) border-box;
    box-shadow: 0 6px 20px rgba(239, 68, 68, .5), 0 0 0 4px var(--bg, #fff); animation: rp-spin 2.2s linear infinite, rp-glow 1.6s ease-in-out infinite; }
.rp-btn svg { width: 16px; height: 16px; }
.rp-btn b { background: #fff; color: var(--loss-strong); border-radius: 99px; min-width: 22px; padding: 1px 7px; font-size: 12px; text-align: center; }
.rp-btn:hover { transform: translateX(-50%) translateY(-1px); }
.rp-btn:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
.rp-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none; }
.rp-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: rp-ping 1.4s ease-out infinite; }
@keyframes rp-spin { to { --rp-a: 360deg; } }
@keyframes rp-glow { 50% { box-shadow: 0 6px 28px rgba(239, 68, 68, .85), 0 0 0 4px var(--bg, #fff); } }
@keyframes rp-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rp-btn, .rp-dot::after { animation: none; } }

.rp-lead { margin: 4px 0 14px; font-size: 13.5px; color: var(--ink-2); }
.rp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 14px; padding: 16px 18px;
    border: 1px solid var(--line); border-inline-start: 5px solid var(--loss-strong); border-radius: 16px; background: var(--surface); }
.rp-l { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.rp-h { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.rp-hb { min-width: 0; }
.rp-gl { width: 60px; height: 60px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 14px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--loss-strong); }
.rp-gl svg.gl { width: 60px; height: 60px; }
.rp-gl > svg:not(.gl) { width: 28px; height: 28px; }
.rp-k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.rp-rank { font-size: 11px; font-weight: 800; color: #fff; background: var(--loss-strong); border-radius: 99px; padding: 1px 8px; }
.rp-amt { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--loss-strong); font-variant-numeric: tabular-nums; }
.rp-sub { font-size: 12.5px; color: var(--ink-2); }
.rp-rule { width: 100%; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.rp-rl { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--loss-strong); }
.rp-rl svg { width: 13px; height: 13px; }
.rp-rule .rl-en { font-size: 14px; }
.rp-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rp-stats > * { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; text-align: start;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: inherit; }
.rp-stats span { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rp-stats b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rp-stats i { font-style: normal; font-size: 11.5px; color: var(--ink-2); }
.rp-wd { cursor: pointer; }
.rp-wd:hover, .rp-wd:focus-visible { border-color: var(--loss-strong); }
.rp-r { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-inline-start: 16px; border-inline-start: 1px dashed var(--line); }
.rp-ct { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.rp-ct svg { width: 15px; height: 15px; color: var(--loss-strong); }
.rp-chart { min-height: 190px; }
.rp-cap { font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) {
    .rp { grid-template-columns: minmax(0, 1fr); padding: 14px; }
    .rp-r { padding: 12px 0 0; border-inline-start: 0; border-top: 1px dashed var(--line); }
    .rp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-amt { font-size: 24px; }
    .rp-btn { font-size: 13px; padding: 7px 8px 7px 11px; gap: 6px; }
}

/* The culprits: a summary of the top 3, then one rich card per habit, the full story one tap away (29 Oct) */
.rp-glowbox { position: relative; isolation: isolate; }
.rp-glowbox::before { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit; padding: 3px;
    background: conic-gradient(from var(--rp-a), transparent 0 58%, #EF4444 70%, #FFD166 78%, #EF4444 86%, transparent 94%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: rp-spin 3s linear infinite; }
.rp-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; align-items: center; margin: 2px 0 14px; padding: 16px 18px; border-radius: 18px; color: #fff;
    background: radial-gradient(circle at 92% 10%, rgba(255, 209, 102, .35), transparent 40%), linear-gradient(135deg, #7F1D1D 0%, #DC2626 55%, #F97316 100%);
    box-shadow: 0 12px 30px rgba(220, 38, 38, .28); }
.rp-sum-i { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
.rp-sum-i svg { width: 28px; height: 28px; animation: rp-shake 2.4s ease-in-out infinite; }
.rp-sum-b { display: flex; flex-direction: column; min-width: 0; }
.rp-sum-k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.rp-sum-v { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rp-sum-n { font-size: 12.5px; opacity: .92; }
.rp-sum-c { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.rp-sum-p { display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: start; cursor: pointer;
    padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font: inherit; min-width: 0; }
.rp-sum-p:hover, .rp-sum-p:focus-visible { background: rgba(255, 255, 255, .24); }
.rp-sum-p .rp-gl { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 0; }
.rp-sum-p .rp-gl svg.gl { width: 38px; height: 38px; }
.rp-sum-t { font-size: 12.5px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-sum-t b { margin-inline-end: 5px; color: #FFD166; }
.rp-sum-a { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes rp-shake { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(5deg); } }

.rp-list { display: flex; flex-direction: column; gap: 10px; }
.rp-card { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) 210px; gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; transition: box-shadow .15s, border-color .15s, transform .15s; }
.rp-card::before { content: ''; position: absolute; inset-block: 12px; inset-inline-start: -1px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--loss-strong), #F97316); }
.rp-card:hover, .rp-card:focus-visible { border-color: var(--loss-strong); box-shadow: 0 10px 26px rgba(239, 68, 68, .16); transform: translateY(-1px); outline: none; }
.rp-card.hot { background: linear-gradient(90deg, color-mix(in srgb, var(--loss-strong) 6%, var(--surface)), var(--surface) 60%); }
.rp-cgl { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; overflow: hidden; color: var(--loss-strong);
    background: var(--surface-2); border: 1px solid var(--line); box-shadow: 0 0 0 4px color-mix(in srgb, var(--loss-strong) 10%, transparent); }
.rp-cgl svg.gl { width: 72px; height: 72px; }
.rp-cgl > svg:not(.gl) { width: 34px; height: 34px; }
.rp-card.hot .rp-cgl { animation: rp-halo 2s ease-in-out infinite; }
@keyframes rp-halo { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--loss-strong) 18%, transparent); } }
.rp-cm { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rp-hot { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: #C2410C; background: #FFEDD5; border-radius: 99px; padding: 1px 8px 1px 6px; }
.rp-hot svg { width: 12px; height: 12px; }
.rp-ttl { margin: 0; font-size: 16.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.rp-why { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.rp-chips span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rp-chips span.r { color: var(--loss-strong); background: color-mix(in srgb, var(--loss-strong) 9%, var(--surface)); border-color: color-mix(in srgb, var(--loss-strong) 28%, transparent); }
.rp-chips svg { width: 13px; height: 13px; }
.rp-ca { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; text-align: end; }
.rp-cl { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rp-camt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--loss-strong); font-variant-numeric: tabular-nums; line-height: 1.1; }
.rp-spark { width: 100%; }
.rp-spark svg { display: block; width: 100%; height: 38px; }
.rp-see { position: relative; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; padding: 7px 12px 7px 14px; cursor: pointer; border-radius: 99px; border: 0;
    font: inherit; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--loss-strong), #F97316); --halo: 239, 68, 68; animation: rp-beat 1.5s ease-in-out infinite; }
.rp-see svg { width: 15px; height: 15px; }
.rp-see:focus-visible { outline: 3px solid #FFD166; outline-offset: 2px; }
.rp-dot2 { position: absolute; top: -4px; inset-inline-end: -4px; width: 12px; height: 12px; border-radius: 50%; background: #FFD166; border: 2px solid var(--surface); }
.rp-dot2::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: #FFD166; animation: rp-ping 1.4s ease-out infinite; }
@keyframes rp-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 50% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); filter: brightness(1.12); } }
/* See why beats like a heart (two beats, a rest) and its yellow light runs round the edge of the button (Mohsin, 29 Oct) */
@keyframes rp-beat { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--halo), .6); filter: none; }
    14% { transform: scale(1.1); filter: brightness(1.18); } 28% { transform: scale(1); }
    42% { transform: scale(1.07); box-shadow: 0 0 0 9px rgba(var(--halo), 0); filter: brightness(1.18); } 66% { transform: scale(1); filter: none; } }
@supports (offset-path: inset(0 round 99px)) {
    .rp-dot2 { inset: 0 auto auto 0; width: 10px; height: 10px; border-color: rgba(255, 255, 255, .9); offset-path: inset(0 round 99px); offset-anchor: center; offset-rotate: 0deg;
        box-shadow: 0 0 8px 3px rgba(255, 209, 102, .95), 0 0 18px 6px rgba(255, 209, 102, .45); animation: rp-orbit 2.2s linear infinite; }
    .rp-dot2::after { display: none; }
}
@keyframes rp-orbit { to { offset-distance: 100%; } }
@media (prefers-reduced-motion: reduce) { .rp-glowbox::before, .rp-sum-i svg, .rp-card.hot .rp-cgl, .rp-see, .rp-dot2, .rp-dot2::after { animation: none; } }
.rp-nav { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.rp-of { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rp-nav .icon-btn:disabled { opacity: .35; cursor: default; }
[dir="rtl"] .rp-see svg, [dir="rtl"] .rp-nav svg { transform: scaleX(-1); }
@media (max-width: 760px) {
    .rp-sum { padding: 14px; }
    .rp-sum-v { font-size: 26px; }
    .rp-sum-c { grid-template-columns: minmax(0, 1fr); }
    .rp-sum-t { white-space: normal; }
    .rp-card { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .rp-cgl, .rp-cgl svg.gl { width: 56px; height: 56px; }
    .rp-ca { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; text-align: start; gap: 2px 12px; }
    .rp-ca .rp-cl, .rp-ca .rp-camt { grid-column: 1; }
    .rp-ca .rp-spark { grid-column: 1 / -1; grid-row: 3; }
    .rp-ca .rp-see { grid-column: 2; grid-row: 1 / 3; }
}

/* culprits: the cause words and figures highlighted, the loss as a pill, the video strip at the top (29 Oct) */
mark.rp-hl, mark.rp-hn { font-weight: 800; border-radius: 6px; padding: 0 5px; color: inherit; }
mark.rp-hl { background: color-mix(in srgb, var(--loss-strong) 16%, var(--surface)); color: var(--loss-deep, #B91C1C); }
mark.rp-hn { background: #FFF1C2; color: #7C4A03; font-variant-numeric: tabular-nums; }
[data-theme="dark"] mark.rp-hn, :root:not([data-theme="light"]) [data-theme="dark"] mark.rp-hn { background: #4A3608; color: #FFD166; }
[data-theme="dark"] mark.rp-hl { color: #FCA5A5; }
.rp-camt, .rp-amt { display: inline-block; padding: 2px 10px; border-radius: 10px; background: color-mix(in srgb, var(--loss-strong) 13%, var(--surface)); }
.rp-vid-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, #06B6D4 12%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.rp-vid-box > svg { width: 30px; height: 30px; color: var(--brand); flex: none; }
.rp-vid-t { display: flex; flex-direction: column; gap: 1px; min-width: 200px; flex: 1 1 240px; }
.rp-vid-t b { font-size: 14px; } .rp-vid-t span { font-size: 12.5px; color: var(--ink-2); }
.rp-vid-w { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.rp-vid { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 9px 14px 9px 12px; border-radius: 99px; text-decoration: none; color: #fff; font-weight: 800; font-size: 13.5px;
    background: linear-gradient(135deg, var(--brand), #06B6D4); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 35%, transparent); animation: rp-blink 1.8s ease-in-out infinite; }
.rp-vid svg { width: 16px; height: 16px; flex: none; }
.rp-vid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.rp-vid i { font-style: normal; font-size: 11.5px; opacity: .85; white-space: nowrap; }
.rp-vid:hover { filter: brightness(1.08); }
.rp-vid-x { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.rp-vid-x svg { width: 13px; height: 13px; } .rp-vid-x:hover { color: var(--loss-strong); border-color: var(--loss-strong); }
.rp-vid-up { cursor: pointer; } .rp-vid-up.busy { opacity: .6; pointer-events: none; }
@media (max-width: 760px) { .rp-vid span { max-width: 200px; } }

.rp-when { display: inline-block; vertical-align: middle; font-size: .78em; font-weight: 800; color: var(--loss-deep, #B91C1C); background: color-mix(in srgb, var(--loss-strong) 14%, var(--surface)); padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; }
[data-theme="dark"] .rp-when { color: #FCA5A5; }
.rp-sum-t .rp-when { color: #FFD166; background: rgba(255, 255, 255, .18); }
.rp-vid.off { background: var(--surface-2); color: var(--muted); box-shadow: none; animation: none; border: 1px dashed var(--line); cursor: default; }
.rp-vid.off svg { color: var(--muted); }

/* Your strengths to keep: the green button at the bottom of the Loss DNA card and the green theme of the shared pop-up (29 Oct) */
.ins-wrap.has-good { margin-bottom: 36px; }
.ins-wrap.has-good .insight { padding-bottom: 32px; }
.rp-btn.good { top: auto; bottom: -19px; background: linear-gradient(#0A9A5C, #0A9A5C) padding-box, conic-gradient(from var(--rp-a), rgba(255, 255, 255, .15) 0 52%, #fff 66%, #FFD166 74%, rgba(255, 255, 255, .15) 86%) border-box;
    box-shadow: 0 6px 20px rgba(10, 154, 92, .5), 0 0 0 4px var(--bg, #fff); animation: rp-spin 2.2s linear infinite, rp-glow-g 1.6s ease-in-out infinite; }
.rp-btn.good b { color: #0A9A5C; }
.rp-btn.good:focus-visible { outline-color: #FFD166; }
@keyframes rp-glow-g { 50% { box-shadow: 0 6px 28px rgba(10, 154, 92, .85), 0 0 0 4px var(--bg, #fff); } }
.rp-glowbox.good::before { background: conic-gradient(from var(--rp-a), transparent 0 58%, #11B26B 70%, #FFD166 78%, #11B26B 86%, transparent 94%); }
.rp-good { --loss: var(--profit); --loss-strong: var(--profit-strong); --loss-deep: var(--profit-deep); }
.rp-good svg.gl { --loss-strong: var(--loss-keep); }     /* a strength glyph still draws its losing candles red */
.rp-good .rp-sum { background: radial-gradient(circle at 92% 10%, rgba(255, 209, 102, .35), transparent 40%), linear-gradient(135deg, #064E3B 0%, #0A9A5C 55%, #06B6D4 100%); box-shadow: 0 12px 30px rgba(10, 154, 92, .28); }
.rp-good .rp-hot { color: #065F46; background: #D1FAE5; }
.rp-good .rp-card::before { background: linear-gradient(var(--profit-strong), #06B6D4); }
.rp-good .rp-card:hover, .rp-good .rp-card:focus-visible { box-shadow: 0 10px 26px rgba(17, 178, 107, .18); }
.rp-good .rp-card.hot { background: linear-gradient(90deg, color-mix(in srgb, var(--profit-strong) 7%, var(--surface)), var(--surface) 60%); }
.rp-good .rp-see { background: linear-gradient(135deg, var(--profit-strong), #06B6D4); --halo: 17, 178, 107; }
@keyframes rp-blink-g { 0%, 100% { box-shadow: 0 0 0 0 rgba(17, 178, 107, .55); } 50% { box-shadow: 0 0 0 7px rgba(17, 178, 107, 0); filter: brightness(1.12); } }
.rp-good .rp-rl, .rp-good .rp-ct svg { color: var(--profit-strong); }
.rp-good .rp-rule .rl-en { color: #065F46; }
[data-theme="dark"] .rp-good .rp-rule .rl-en { color: #6EE7B7; }
.rp-good .rp { border-inline-start-color: var(--profit-strong); }
.rp-good .rp-chips span.r { color: var(--profit-deep); }
[data-theme="dark"] .rp-good mark.rp-hl { color: #6EE7B7; }
@media (prefers-reduced-motion: reduce) { .rp-btn.good { animation: none; } }

/* a row with an icon, a text and a control on the right (admin feature rows, the face sign-in devices in Settings) */
.feat-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }

/* a file dragged over any page of the app: the whole window becomes the drop target (app.js dropAnywhere) */
.drop-all { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; pointer-events: none; padding: 24px;
    background: color-mix(in srgb, var(--brand) 18%, rgba(9, 12, 32, .55)); backdrop-filter: blur(2px); animation: drop-in .15s ease-out; }
.drop-all > div { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; padding: 44px 56px; border-radius: 26px;
    border: 3px dashed rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .08); color: #fff; font-size: 22px; text-align: center; }
.drop-all svg { width: 54px; height: 54px; }
@keyframes drop-in { from { opacity: 0; } }
@media (max-width: 560px) { .drop-all > div { padding: 30px 24px; font-size: 18px; } }

/* upload: "Where to get your file", one coloured section per source, the menu path as steps with arrows between */
.src-list { display: flex; flex-direction: column; gap: 10px; }
.src { --c: var(--brand); display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px;
    background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); border-inline-start: 4px solid var(--c); }
.src-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 32%, transparent); }
.src-ic svg { width: 19px; height: 19px; }
.src-body { min-width: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; line-height: 1.5; }
.src-body > b { font-size: 14.5px; color: var(--ink); }
.src-body p { margin: 0; color: var(--ink-2); }
.src-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 4px; }
.src-steps .sg { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; } /* a chip and its arrow wrap together */
.src-steps span { padding: 3px 9px; border-radius: 8px; font-weight: 650; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere;
    color: color-mix(in srgb, var(--c) 72%, var(--ink)); background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 20%, transparent); }
.src-steps svg { width: 15px; height: 15px; color: var(--c); flex: none; stroke-width: 2.6; }
[dir="rtl"] .src-steps svg { transform: scaleX(-1); }

/* ---------- the two arrows: up at the top middle under the menu, down at the bottom middle (Mohsin, 1 Nov) ---------- */
/* under the side menu and the pop-ups; the bottom one stays clear of the screen edge and rises above the Trade Break pill */
.he-jump { position: fixed; left: 50%; margin-left: -22px; z-index: 70; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; color: #fff;
    background: var(--grad); box-shadow: 0 8px 22px rgba(18, 23, 53, .35); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s, filter .15s; }
.he-jump.up { top: calc(var(--jump-top, 0px) + 10px + env(safe-area-inset-top, 0px)); transform: translateY(-8px); }
.he-jump.down { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); transform: translateY(8px); }
body:has(.brk-pill) .he-jump.down { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.he-jump.on { opacity: 1; visibility: visible; transform: none; }
.he-jump:hover { filter: brightness(1.12); }
.he-jump:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .he-jump { transition: none; } }
@media print { .he-jump { display: none; } }

/* ---------- Before Trader-Habit / Since Trader-Habit performance (Mohsin, 5 Nov): the buttons on the Calendar card and their pop-up ---------- */
.pf-btn.pre { color: color-mix(in srgb, var(--warn) 78%, var(--ink)); background: color-mix(in srgb, var(--warn) 11%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.pf-btn.post { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.pf-btn.pre:hover { background: color-mix(in srgb, var(--warn) 20%, var(--surface)); } .pf-btn.post:hover { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
.ov-cal > .card-head { flex-wrap: wrap; row-gap: 8px; }
.pf-btn .pf-short { display: none; }
@media (max-width: 560px) { .pf-btn .pf-long { display: none; } .pf-btn .pf-short { display: inline; } }      /* a phone: both on one line */
@media (max-width: 420px) { .ov-cal > .card-head { column-gap: 6px; } .btn.sm.pf-btn { padding-inline: 8px; gap: 5px; font-size: 12.5px; } }      /* the smallest phones (360 px): still one line */
.pf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
.pf-top .seg { flex-wrap: wrap; max-width: 100%; }
.pf-lead { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.pf-cmp { margin: 0 0 14px; }
table.t th.pf-on, table.t td.pf-on { background: var(--brand-soft); }
table.t td.pf-on { font-weight: 800; }
.pf-lab { display: block; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 11px; }
.pf-sum { margin: 0 0 14px; flex-wrap: wrap; }
.pf-pairs .pf-subrow td { background: var(--surface-2); font-size: 12.5px; }
.pf-pairs .pf-subrow td:first-child { padding-inline-start: 36px; }
.pf-pairs .pf-subrow.buy td:first-child b { color: var(--profit); } .pf-pairs .pf-subrow.sell td:first-child b { color: var(--loss); }
.pf-pairs .pf-total td { font-weight: 700; border-top: 2px solid var(--line); background: var(--surface-2); }
.pf-car svg { width: 14px; height: 14px; vertical-align: -2px; margin-inline-end: 4px; color: var(--muted); }
.pf-pan { margin-top: 14px; }
.pf-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 4px; }
.pf-ph h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.pf-ph h3 > svg { width: 18px; height: 18px; color: var(--brand); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pf-g { display: grid; gap: 14px; margin-top: 10px; }
.pf-g.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pf-g.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pf-g.g3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .pf-g.g2 { grid-template-columns: minmax(0, 1fr); } }
.pf-box { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--surface); }
.pf-bh { font-weight: 800; font-size: 12.5px; text-align: center; color: #fff; background: #1E293B; border-radius: 8px; padding: 6px 8px; }
.pf-bs { margin: 6px 0 4px; }
.pf-box .chart { min-height: 220px; }
.pf-empty { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; }
.pf-more { text-align: center; margin: 14px 0 0; }
.pf-foot { margin: 14px 0 0; }

/* calendar From / To filter + Search, the bar on ONE line (6 Nov 2026, the same as his weekly report: "make little smaller and fit all
   things on one line"); fitCalBar() adds c1 (short labels), c2 (icon-only buttons, short months), c3 (no days / win chips), wrap (last) */
.calbar { flex-wrap: nowrap; gap: 8px; contain: inline-size; margin-bottom: 14px; }
.ovc-bar { grid-column: 1 / -1; } .ovc-bar .calbar { margin-bottom: 0; } .ovc { row-gap: 12px; }
.calbar > * { flex-shrink: 0; }
.calbar * { transition: none; }   /* .input animates padding for .15 s: the fit steps would measure boxes mid-animation */
.calbar .cb-s { display: none; }
.calbar .cb-dr { gap: 5px; padding-inline-end: 9px; }
.calbar .cb-dr svg { width: 15px; height: 15px; }
.cb-date { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); padding: 4px 0; width: 84px; cursor: pointer; outline: none; min-width: 0; }
.cb-date::-webkit-calendar-picker-indicator { display: none; }
@supports (-moz-appearance: none) { .cb-date { width: 112px; } }   /* Firefox keeps its own calendar icon inside the box */
.calbar .cb-go { white-space: nowrap; }
.calbar .cb-go.due { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.calbar .cb-x { color: var(--loss-deep, #dc2626); }
.calbar .chip.click { cursor: pointer; text-decoration: underline dotted; }
.calbar.c1 { gap: 6px; } .calbar.c1 .cb-l, .calbar.c1 .cur-flt .lbl { display: none; } .calbar.c1 .cb-s { display: inline; } .calbar.c1 .flt { padding-inline-start: 8px; }
.calbar.c2 .cb-t { display: none; } .calbar.c2 .icon-btn { width: 32px; height: 32px; } .calbar.c2 .btn.sm { padding: 6px 9px; } .calbar.c2 .cb-dr > svg { display: none; } .calbar.c2 .input { padding-inline: 8px; }
.calbar .cb-ar { display: none; font-weight: 800; color: var(--muted); } [dir=rtl] .calbar .cb-ar { transform: scaleX(-1); }
.calbar.c3 .cb-opt, .calbar.c3 .cb-fl, .calbar.c3 .cb-tl { display: none; } .calbar.c3 .cb-ar { display: inline; } .calbar.c3 { gap: 5px; }
.calbar.c4 { gap: 4px; } .calbar.c4 .cb-s { display: none; } .calbar.c4 .flt { padding-inline-start: 6px; } .calbar.c4 .btn.sm { padding: 6px 7px; } .calbar.c4 .icon-btn { width: 29px; height: 30px; } .calbar.c4 .input { padding-inline: 6px; }
.calbar.wrap { flex-wrap: wrap; }
.cal .cal-none { grid-column: 1 / -1; text-align: center; padding: 26px 0; color: var(--muted); font-weight: 600; }
/* the day number never touches the amount (6 Nov 2026): its box ends above the amount's row */
.cal .d .dn { line-height: 1.2; } .ov-cal .cal .d .dn { top: 4px; }
/* a square too narrow for the full amount shows the short one (-$1.2K), as phones do */
.cal .d { container-type: inline-size; }
.cal .d.mo::before { display: none; }   /* "28 Oct" / "1 Nov" squares: no bull / bear mark under the longer label */
@container (max-width: 72px) { .cal .d .v.vl { display: none; } .cal .d .v.vs { display: block; white-space: nowrap; letter-spacing: -.02em; } }
@media (max-width: 720px) { .calbar { flex-wrap: wrap; contain: none; }
    .cal .d { padding: 18px 2px 3px; } .cal .d .dn { top: 3px; inset-inline-end: 4px; font-size: 10px; }
    .cal .d .v.vs { font-size: 10px; letter-spacing: -.03em; } }
