:root, [data-chartbg="dark"] {
  --bg: #131722;
  --panel: #1e222d;
  --border: #2a2e39;
  --text: #d1d4dc;
  --muted: #787b86;
  /* PlotVibe's colour: the V of the logo (static/brand/pv-mark.svg), owner 2026-11-25 */
  --accent: #8a12fd;
  --accent-hover: #9d2bff;
  --accent-rgb: 138, 18, 253;
  --accent-text: #b98aff;         /* the brand colour as text and icons on dark */
  --accent-grad: linear-gradient(135deg, #5a0ee0 0%, #8a12fd 52%, #b53efc 100%);
  --accent-soft: rgba(138, 18, 253, 0.2);
  --up: #089981;
  --down: #f23645;
  --warn: #f5a623;
  --on-bg: #fff;          /* the strongest text: white on dark, near-black on light */
  --c-000000: #000000;
  --c-089981: #089981;
  --c-089981-018: rgba(8, 153, 129, 0.18);
  --c-089981-02: rgba(8, 153, 129, 0.2);
  --c-089981-035: rgba(8, 153, 129, 0.35);
  --c-089981-085: rgba(8, 153, 129, 0.85);
  --c-0c0f16: #0c0f16;
  --c-0e1118: #0e1118;
  --c-0f121a: #0f121a;
  --c-10131b: #10131b;
  --c-12151e: #12151e;
  --c-131722-092: rgba(19, 23, 34, 0.92);
  --c-13261f: #13261f;
  --c-141824: #141824;
  --c-161a24: #161a24;
  --c-161a25: #161a25;
  --c-161a25-094: rgba(22, 26, 37, 0.94);
  --c-171b26: #171b26;
  --c-181c27: #181c27;
  --c-1a1e2a: #1a1e2a;
  --c-1a1e2b: #1a1e2b;
  --c-1b1f2b: #1b1f2b;
  --c-1b1f2e: #1b1f2e;
  --c-1b2030: #1b2030;
  --c-1c212d: #1c212d;
  --c-1c2130: #1c2130;
  --c-1e222d-094: rgba(30, 34, 45, 0.94);
  --c-1e222d-095: rgba(30, 34, 45, 0.95);
  --c-1e222d-096: rgba(30, 34, 45, 0.96);
  --c-1e222d-098: rgba(30, 34, 45, 0.98);
  --c-1e222d-099: rgba(30, 34, 45, 0.99);
  --c-1e3a8a: #3a1b6e;
  --c-1f2330: #1f2330;
  --c-1f2433: #1f2433;
  --c-222633: #222633;
  --c-22283a: #22283a;
  --c-22304f: #2a1d4d;
  --c-232733: #232733;
  --c-232837: #232837;
  --c-232838: #232838;
  --c-234536: #234536;
  --c-262b38: #262b38;
  --c-262b39: #262b39;
  --c-2a2340: #2a2340;
  --c-2a2e39-085: rgba(42, 46, 57, 0.85);
  --c-2a2e39-095: rgba(42, 46, 57, 0.95);
  --c-2a2f3f: #2a2f3f;
  --c-2a3042: #2a3042;
  --c-2b3042: #2b3042;
  --c-2c3140: #2c3140;
  --c-2c3243: #2c3243;
  --c-2c3244: #2c3244;
  --c-2f3445: #2f3445;
  --c-2f3546: #2f3546;
  --c-2f3650: #2f3650;
  --c-30364a: #30364a;
  --c-323849: #323849;
  --c-343947: #343947;
  --c-343a4c: #343a4c;
  --c-343a4d: #343a4d;
  --c-363a45: #363a45;
  --c-363c4e: #363c4e;
  --c-3a2328: #3a2328;
  --c-3a3f4d: #3a3f4d;
  --c-3a3f52: #3a3f52;
  --c-3a4052: #3a4052;
  --c-3a4054: #3a4054;
  --c-3b2f7c: #3b2f7c;
  --c-3c4150: #3c4150;
  --c-3d4456: #3d4456;
  --c-3d4458: #3d4458;
  --c-3d4558: #3d4558;
  --c-3d4560: #3d4560;
  --c-434651: #434651;
  --c-454b60: #454b60;
  --c-4a5168: #4a5168;
  --c-50535e: #50535e;
  --c-50566a: #50566a;
  --c-5c6378: #5c6378;
  --c-5d606b: #5d606b;
  --c-5d6272: #5d6272;
  --c-5d6273: #5d6273;
  --c-6a3036: #6a3036;
  --c-6a6d78: #6a6d78;
  --c-6a6f80: #6a6f80;
  --c-6a7186: #6a7186;
  --c-6b7080: #6b7080;
  --c-6b7185: #6b7185;
  --c-6f7587: #6f7587;
  --c-6f7588: #6f7588;
  --c-7f7f7f-025: rgba(127, 127, 127, 0.25);
  --c-868b9a: #868b9a;
  --c-8b90a0: #8b90a0;
  --c-8fb0ff: #8fb0ff;
  --c-8fb1ff: var(--accent-text);
  --c-9598a1: #9598a1;
  --c-9aa0b0: #9aa0b0;
  --c-b2b5be: #b2b5be;
  --c-b3a37a: #b3a37a;
  --c-b5ccff: #d6bfff;
  --c-c3c7d1: #c3c7d1;
  --c-c9b8ff: #c9b8ff;
  --c-c9ccd6: #c9ccd6;
  --c-dfe6ff: #efe4ff;
  --c-e0e3eb: #e0e3eb;
  --c-e3e6ee: #e3e6ee;
  --c-e6e8ee: #e6e8ee;
  --c-e8eaf0: #e8eaf0;
  --c-eef0f5: #eef0f5;
  --c-ff8a95: #ff8a95;
  --c-ffb3c0: #ffb3c0;
  --shadow-03: rgba(0, 0, 0, 0.3);
  --shadow-035: rgba(0, 0, 0, 0.35);
  --shadow-04: rgba(0, 0, 0, 0.4);
  --shadow-045: rgba(0, 0, 0, 0.45);
  --shadow-05: rgba(0, 0, 0, 0.5);
  --shadow-055: rgba(0, 0, 0, 0.55);
  --shadow-06: rgba(0, 0, 0, 0.6);
  --veil-003: rgba(255, 255, 255, 0.03);
  --veil-004: rgba(255, 255, 255, 0.04);
  --veil-006: rgba(255, 255, 255, 0.06);
  --veil-008: rgba(255, 255, 255, 0.08);
  --veil-01: rgba(255, 255, 255, 0.1);
  --veil-012: rgba(255,255,255,0.12);
  --veil-06: rgba(255, 255, 255, 0.6);
  --veil-12: rgba(255,255,255,.12);
  --c-3ddc97: #3ddc97;
  --c-5b8cff: var(--accent-text);
  --c-ff5c7a: #ff5c7a;
  --c-f5c400: #f5c400;
  --c-f5c542: #f5c542;
  --c-f0b54a: #f0b54a;
  --c-ff8a3d: #ff8a3d;
  --c-ff7a59: #ff7a59;
}

/* Light theme (Settings › General › Theme, the app menu): the same tokens on a light scale. */
:root[data-theme="light"], [data-chartbg="light"] {
  --accent-text: #7a0ce6;         /* the brand colour as text and icons on light */
  --accent-hover: #7a0ce6;
  --bg: #ffffff;
  --panel: #ffffff;
  --border: #e0e3eb;
  --text: #131722;
  --muted: #6a6d78;
  --on-bg: #131722;
  --c-000000: #ffffff;
  --c-089981: #089981;
  --c-089981-018: rgba(8, 153, 129, 0.18);
  --c-089981-02: rgba(8, 153, 129, 0.2);
  --c-089981-035: rgba(8, 153, 129, 0.35);
  --c-089981-085: rgba(8, 153, 129, 0.85);
  --c-0c0f16: #ffffff;
  --c-0e1118: #ffffff;
  --c-0f121a: #ffffff;
  --c-10131b: #ffffff;
  --c-12151e: #ffffff;
  --c-131722-092: rgba(255, 255, 255, 1);
  --c-13261f: #ffffff;
  --c-141824: #ffffff;
  --c-161a24: #ffffff;
  --c-161a25: #ffffff;
  --c-161a25-094: rgba(255, 255, 255, 1);
  --c-171b26: #ffffff;
  --c-181c27: #ffffff;
  --c-1a1e2a: #ffffff;
  --c-1a1e2b: #ffffff;
  --c-1b1f2b: #ffffff;
  --c-1b1f2e: #ffffff;
  --c-1b2030: #fefeff;
  --c-1c212d: #ffffff;
  --c-1c2130: #fefefe;
  --c-1e222d-094: rgba(254, 254, 255, 1);
  --c-1e222d-095: rgba(254, 254, 255, 1);
  --c-1e222d-096: rgba(254, 254, 255, 1);
  --c-1e222d-098: rgba(254, 254, 255, 1);
  --c-1e222d-099: rgba(254, 254, 255, 1);
  --c-1e3a8a: #ece0ff;
  --c-1f2330: #fcfcfd;
  --c-1f2433: #fafafc;
  --c-222633: #f8f8fa;
  --c-22283a: #f2f3f7;
  --c-22304f: #ece0ff;
  --c-232733: #f7f8fa;
  --c-232837: #f4f5f8;
  --c-232838: #f3f4f8;
  --c-234536: #e2efe9;
  --c-262b38: #f0f2f5;
  --c-262b39: #eff0f4;
  --c-2a2340: #ebe9f2;
  --c-2a2e39-085: rgba(235, 236, 240, 0.85);
  --c-2a2e39-095: rgba(235, 236, 240, 1);
  --c-2a2f3f: #e3e5ec;
  --c-2a3042: #dfe2eb;
  --c-2b3042: #dfe1ea;
  --c-2c3140: #e0e3ea;
  --c-2c3243: #dee1e9;
  --c-2c3244: #dde0e9;
  --c-2f3445: #dbdee7;
  --c-2f3546: #dbdee7;
  --c-2f3650: #d2d6e4;
  --c-30364a: #d7dae5;
  --c-323849: #d7dbe4;
  --c-343947: #d8dbe3;
  --c-343a4c: #d4d7e1;
  --c-343a4d: #d3d6e1;
  --c-363a45: #d9dce2;
  --c-363c4e: #d1d5df;
  --c-3a2328: #f6f1f2;
  --c-3a3f4d: #d1d4dc;
  --c-3a3f52: #cccfdb;
  --c-3a4052: #ccd0db;
  --c-3a4054: #cacedb;
  --c-3b2f7c: #dfdcef;
  --c-3c4150: #cdd0da;
  --c-3d4456: #c7ccd8;
  --c-3d4458: #c6cad7;
  --c-3d4558: #c6cbd7;
  --c-3d4560: #bec3d6;
  --c-434651: #caccd3;
  --c-454b60: #bbc0ce;
  --c-4a5168: #b2b7c8;
  --c-50535e: #babcc5;
  --c-50566a: #aeb3c2;
  --c-5c6378: #9aa0b2;
  --c-5d606b: #aaadb5;
  --c-5d6272: #a2a6b3;
  --c-5d6273: #a1a5b3;
  --c-6a3036: #eedddf;
  --c-6a6d78: #9396a0;
  --c-6a6f80: #888d9d;
  --c-6a7186: #80869a;
  --c-6b7080: #888c9b;
  --c-6b7185: #818699;
  --c-6f7587: #7c8293;
  --c-6f7588: #7b8093;
  --c-7f7f7f-025: rgba(128, 128, 128, 0.25);
  --c-868b9a: #656a79;
  --c-8b90a0: #5f6474;
  --c-8fb0ff: #003fd6;
  --c-8fb1ff: var(--accent-text);
  --c-9598a1: #5e616a;
  --c-9aa0b0: #4e5464;
  --c-b2b5be: #3d4048;
  --c-b3a37a: #83744e;
  --c-b5ccff: #5a0bb0;
  --c-c3c7d1: #262931;
  --c-c9b8ff: #6a3fd9;
  --c-c9ccd6: #21242c;
  --c-dfe6ff: #5a0bb0;
  --c-e0e3eb: #151921;
  --c-e3e6ee: #141821;
  --c-e6e8ee: #15181f;
  --c-e8eaf0: #151720;
  --c-eef0f5: #131620;
  --c-ff8a95: #d60014;
  --c-ffb3c0: #d60025;
  --shadow-03: rgba(15, 20, 35, 0.096);
  --shadow-035: rgba(15, 20, 35, 0.112);
  --shadow-04: rgba(15, 20, 35, 0.128);
  --shadow-045: rgba(15, 20, 35, 0.144);
  --shadow-05: rgba(15, 20, 35, 0.16);
  --shadow-055: rgba(15, 20, 35, 0.176);
  --shadow-06: rgba(15, 20, 35, 0.192);
  --veil-003: rgba(0, 0, 0, 0.021);
  --veil-004: rgba(0, 0, 0, 0.028);
  --veil-006: rgba(0, 0, 0, 0.042);
  --veil-008: rgba(0, 0, 0, 0.056);
  --veil-01: rgba(0, 0, 0, 0.07);
  --veil-012: rgba(0, 0, 0, 0.084);
  --veil-06: rgba(0, 0, 0, 0.42);
  --veil-12: rgba(0, 0, 0, 0.084);
  --c-3ddc97: #089981;
  --c-5b8cff: var(--accent-text);
  --c-ff5c7a: #f23645;
  --c-f5c400: #b88a00;
  --c-f5c542: #b88a00;
  --c-f0b54a: #b07a12;
  --c-ff8a3d: #d9661f;
  --c-ff7a59: #e0553a;
}


* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 var(--pv-font, 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif);   /* the chosen font (platform/font.ts) */
}

body { display: flex; flex-direction: column; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;            /* one line: crowded, it gives way step by step (ui/topbar.ts fitTopBar) */
  min-width: 0;
}
.toolbar > * { flex-shrink: 0; }
.toolbar > .spacer { flex: 1 1 0; min-width: 0; }
.toolbar.fit-1 { gap: 6px; padding: 6px 8px; }
.toolbar.fit-1 .hdr-sep { margin: 0 2px; }
.toolbar.fit-2 .pv-ind-btn span, .toolbar.fit-2 .pv-alert-btn span, .toolbar.fit-2 .replay-btn:not(.pv-trade-btn) > span { display: none; }
.toolbar.fit-3 .status .label, .toolbar.fit-3 .pv-lay-favs { display: none; }
.toolbar.fit-4 .history, .toolbar.fit-4 .hdr-sep:has(+ .history) { display: none; }
.toolbar.fit-5 .pv-tf-btns button:not(.active) { display: none; }
.toolbar.fit-6 .pv-lay-name { max-width: 72px; }
.toolbar.fit-6 .hdr-sep { display: none; }
.toolbar.fit-7 { overflow-x: auto; scrollbar-width: none; }

.brand { font-weight: 700; letter-spacing: 0.02em; color: var(--text); }

select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font: inherit;
  font-weight: 600;
}

.tfs { display: flex; gap: 2px; }

.tfs, .pv-tf-btns { display: flex; align-items: center; gap: 2px; }
.tfs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
}

.tfs button:hover { background: var(--border); color: var(--text); }
.tfs button.active { color: var(--accent); font-weight: 600; }

.ohlc { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ohlc b { color: var(--text); font-weight: 500; margin-right: 8px; }
.ohlc .up { color: var(--up); }
.ohlc .down { color: var(--down); }

.spacer { flex: 1; }

.status { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live .dot { background: var(--up); }
.status.closed .dot { background: var(--warn); }
.status.offline .dot { background: var(--down); }

.workspace { flex: 1; min-height: 0; display: flex; }

.chart { flex: 1; min-width: 0; position: relative; }

.tools {
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  overflow: visible;
}

.tool {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.tool.small { width: 30px; height: 30px; }
.tool:hover:not(:disabled) { background: var(--border); color: var(--text); }
.tool.active, .tool.on { color: var(--accent); background: rgba(var(--accent-rgb), 0.12); }
.tool.armed { color: #fff; background: var(--down); }
.tool:disabled { opacity: 0.35; cursor: default; }

.tool-wrap { position: relative; }
.tool-more {
  position: absolute; right: -5px; top: 0; bottom: 0; width: 9px;
  display: grid; place-items: center; padding: 0;
  background: transparent; border: 0; border-radius: 2px; color: var(--muted); cursor: pointer; opacity: 0;
}
.tool-wrap:hover .tool-more { opacity: 1; }
.tool-more:hover { background: var(--border); color: var(--text); }

.tool-sep { width: 24px; height: 1px; background: var(--border); margin: 4px 0; flex: none; }

.flyout {
  position: fixed; z-index: 50; min-width: 250px; max-height: calc(100vh - 16px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 6px 0;
  box-shadow: 0 8px 24px var(--shadow-045);
}
.flyout.palette {
  min-width: 0; display: grid; grid-template-columns: repeat(6, 20px); gap: 6px; padding: 10px;
}
.flyout.palette input[type=color] { grid-column: span 6; width: 100%; height: 24px; border: 0; background: none; padding: 0; }
.fly-head { padding: 8px 14px 4px; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.fly-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 14px; cursor: pointer; color: var(--text);
}
.fly-row:hover { background: var(--border); }
.fly-row.active { color: var(--accent); }
.fly-title { flex: 1; white-space: nowrap; }
.fly-key { color: var(--muted); font-size: 11px; }
.fly-star { background: none; border: 0; padding: 2px; color: var(--muted); cursor: pointer; display: grid; opacity: 0.6; }
.fly-row:hover .fly-star, .fly-star.on { opacity: 1; }
.fly-star.on { color: var(--warn); }

.swatch { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; }
.swatch.active { outline: 2px solid var(--text); outline-offset: 2px; }

.favbar, .propbar {
  position: absolute; z-index: 10; display: flex; align-items: center; gap: 2px; padding: 3px 6px 3px 2px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 4px 14px var(--shadow-04);
}
.propbar { display: none; }
.favbar-grip { color: var(--muted); cursor: var(--pv-grab); display: grid; padding: 0 2px; touch-action: none; }
.favbar-grip:active { cursor: var(--pv-grabbing); }
.prop-color { width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--border); cursor: pointer; margin: 0 4px; }
.prop-select { padding: 3px 4px; font-weight: 400; font-size: 12px; }
.prop-text {
  width: 140px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 4px 6px; font: inherit; font-size: 12px;
}
.prop-levels { width: 180px; }
.prop-textarea { height: 44px; width: 180px; resize: vertical; line-height: 1.3; }
.prop-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.navbar {
  position: absolute; z-index: 10; left: 50%; bottom: 44px; transform: translateX(-50%);
  display: flex; gap: 6px; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.navbar.show { opacity: 1; pointer-events: auto; }
.nav-btn {
  width: 30px; height: 30px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
}
.nav-btn:hover { background: var(--border); }

.history { display: flex; gap: 2px; }

.drawings-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.drawings-host.drawing-mode canvas { cursor: crosshair !important; }
.drawings-host.cursor-dot canvas { cursor: crosshair !important; }
.drawings-host.cursor-arrow canvas { cursor: default !important; }
.drawings-host.cursor-eraser canvas { cursor: not-allowed !important; }
.drawings-host.over-drawing:not(.drawing-mode) canvas { cursor: pointer !important; }  /* hand over a drawing */
.drawings-host.over-handle:not(.drawing-mode) canvas { cursor: default !important; }   /* arrow over a handle */
.drawings-host.over-ns:not(.drawing-mode) canvas { cursor: ns-resize !important; }  /* up/down only */
.drawings-host.over-ew:not(.drawing-mode) canvas { cursor: ew-resize !important; }  /* left/right only */

.footer {
  display: flex;
  gap: 16px;
  padding: 3px 12px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
}

.footer a { color: var(--muted); margin-left: auto; }

.message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
  z-index: 5;
}
/* The loading mark (ui/loader.ts): the logo writing itself, its text under it; it fades in after a moment, so a
   quick load shows nothing. */
.pv-loading { flex-direction: column; gap: 10px; animation: pv-loading-in 0.3s ease 0.25s both; }
.pv-loading .pv-loader-mark { width: 92px; height: auto; user-select: none; }
.pv-loading span { font-size: 12.5px; letter-spacing: 0.2px; }
.pv-loading.small { display: flex; align-items: center; gap: 6px; padding: 18px 0; }
.pv-loading.small .pv-loader-mark { width: 54px; }
@keyframes pv-loading-in { from { opacity: 0; } to { opacity: 1; } }
/* Live price label and the countdown under it: same size, rounded corners. */
.lastprice { position: absolute; z-index: 5; display: none; pointer-events: none; padding: 0 3px 0 2px; box-sizing: border-box; }
.lastprice-box {
  height: 20px; line-height: 20px; border-radius: 4px; padding-left: 6px; color: #fff; font-size: 12px;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden;
}
.lastprice-timer { margin-top: 1px; padding-left: 0; text-align: center; }

/* Bar replay */
.replay-btn {
  display: flex; align-items: center; gap: 5px; background: none; border: 1px solid transparent; color: var(--text);
  border-radius: 4px; padding: 3px 8px; cursor: pointer; font: inherit; font-size: 13px;
}
.replay-btn:hover { background: var(--border); }
.replay-btn.active { color: var(--accent); border-color: var(--accent); }
.replaybar {
  position: absolute; z-index: 35; top: 8px; left: 50%; display: none; align-items: center;  /* (placed by replay.ts) */
  gap: 4px; padding: 3px 6px; background: var(--panel, var(--panel)); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 4px 14px var(--shadow-04);
}
.replay-date { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; font: inherit; font-size: 12px; color-scheme: dark; }
.replay-when { color: var(--accent); font-size: 12px; padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.replay-pick { position: absolute; left: 0; top: 0; z-index: 9; display: none; cursor: col-resize; overflow: hidden; }
.replay-pick-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--accent); }
.replay-pick-shade { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(var(--accent-rgb), 0.12); }
.status.replay .dot { background: var(--accent); }

/* Replay: update interval, practice trading */
.replay-trade-btn {
  height: 28px; padding: 0 12px; background: var(--c-171b26); border: 1px solid var(--c-2c3140); color: var(--text); border-radius: 7px;
  cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; transition: border-color 0.15s, background 0.15s;
}
.replay-trade-btn:hover { border-color: var(--c-3d4456); background: var(--c-1b2030); }
.replay-trade-btn.on { color: #fff; background: var(--accent); border-color: var(--accent); }


/* ---- PlotVibe dropdowns and date picker (ui_controls.js) ---- */
.pv-native { display: none !important; }
.pv-select, .pv-date {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 9px 0 10px;
  background: var(--c-171b26); color: var(--text); border: 1px solid var(--c-2c3140); border-radius: 7px;
  font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.pv-select:hover, .pv-date:hover { border-color: var(--c-3d4456); background: var(--c-1b2030); }
.pv-select:focus-visible, .pv-date:focus-visible { border-color: var(--accent); }
.pv-select.open, .pv-date.open { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.pv-select:disabled { opacity: 0.45; cursor: default; }
.pv-select-label { flex: 1; text-align: left; }
.pv-select-chevron { display: grid; color: var(--c-8b90a0); transition: transform 0.18s, color 0.15s; }
.pv-select:hover .pv-select-chevron { color: var(--text); }
.pv-select.open .pv-select-chevron { transform: rotate(180deg); color: var(--accent); }
.toolbar .pv-select { height: 30px; font-size: 13px; font-weight: 600; padding: 0 10px 0 12px; }
.pv-date-icon { display: grid; color: var(--c-8b90a0); }
.pv-date:hover .pv-date-icon, .pv-date.open .pv-date-icon { color: var(--accent); }
.pv-date-label.empty { color: var(--muted); }

.pv-menu, .pv-cal {
  position: fixed; z-index: 100; background: var(--c-1e222d-098); border: 1px solid var(--c-2f3546); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow-05), 0 2px 6px var(--shadow-03); padding: 5px;
  backdrop-filter: blur(6px); animation: pv-pop 0.12s ease-out;
}
@keyframes pv-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
.pv-menu { max-height: 320px; overflow-y: auto; font-size: 12px; }
.pv-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 6px; cursor: pointer;
  color: var(--text); white-space: nowrap;
}
.pv-menu-item:hover, .pv-menu-item.active { background: var(--c-2a2f3f); }
.pv-menu-item.selected { color: var(--c-5b8cff); }
.pv-menu-item.disabled { opacity: 0.4; cursor: default; }
.pv-menu-check { width: 12px; display: grid; }
.pv-menu::-webkit-scrollbar { width: 8px; }
.pv-menu::-webkit-scrollbar-thumb { background: var(--c-363c4e); border-radius: 4px; }

.pv-cal { width: 252px; padding: 10px; font-size: 12px; }
.pv-cal-head { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.pv-cal-title { flex: 1; text-align: center; font-weight: 600; font-size: 13px; color: var(--text); }
.pv-cal-title span { color: var(--muted); font-weight: 500; }
.pv-cal-nav {
  display: inline-flex; align-items: center; justify-content: center; gap: 0; height: 26px; min-width: 26px; padding: 0 4px;
  background: none; border: 0; border-radius: 6px; color: var(--c-9aa0b0); cursor: pointer;
}
.pv-cal-nav:hover { background: var(--c-2a2f3f); color: var(--text); }
.pv-cal-nav:disabled { opacity: 0.3; cursor: default; background: none; }
.pv-cal-week, .pv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.pv-cal-week span { text-align: center; color: var(--muted); font-size: 11px; padding: 4px 0; }
.pv-day {
  height: 30px; border: 0; border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 12px;
  cursor: pointer; font-variant-numeric: tabular-nums; transition: background 0.1s;
}
.pv-day:hover { background: var(--c-2a2f3f); }
.pv-day.other { color: var(--c-5d6272); }
.pv-day.today { box-shadow: inset 0 0 0 1px var(--c-4a5168); }
.pv-day.selected { background: var(--accent); color: #fff; box-shadow: none; }
.pv-day:disabled { color: var(--c-3c4150); cursor: default; background: none; }
.pv-cal-foot { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-2a2f3f); }
.pv-cal-link { background: none; border: 0; color: var(--c-5b8cff); font: inherit; font-size: 12px; cursor: pointer; padding: 3px 8px; border-radius: 5px; }
.pv-cal-link:hover { background: var(--c-2a2f3f); }

/* ---- Properties bar: compact tray + panels (draw/propbar.js) ---- */
.propbar { gap: 2px; padding: 4px 6px 4px 2px; border-radius: 10px; }
.pv-tray-btn {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; background: none;
  border: 0; border-radius: 7px; color: var(--c-c3c7d1); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.pv-tray-btn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-tray-btn.open { background: var(--c-2a2f3f); color: var(--on-bg); box-shadow: inset 0 0 0 1px var(--c-3d4558); }
.pv-tray-btn.on { color: var(--accent); }
.pv-tray-bar { position: absolute; left: 9px; right: 9px; bottom: 5px; height: 3px; border-radius: 2px; }
.pv-tray-bar.empty { opacity: 0.35; }
.pv-tray-btn svg { margin-bottom: 2px; }
.pv-tray-line { width: 18px; background: currentColor; border-radius: 2px; }
.pv-tray-emoji { font-size: 17px; line-height: 1; }

.pv-pop {
  position: fixed; z-index: 100; padding: 10px; min-width: 200px; max-width: 320px;
  background: var(--c-1e222d-098); border: 1px solid var(--c-2f3546); border-radius: 12px; color: var(--text); font-size: 12px;
  box-shadow: 0 14px 36px var(--shadow-055), 0 2px 6px var(--shadow-03); animation: pv-pop 0.12s ease-out;
}
.pv-pop[data-key="color"] { max-width: none; }
.pv-pop { overflow-y: auto; }
.pv-pop::-webkit-scrollbar { width: 8px; }
.pv-pop::-webkit-scrollbar-thumb { background: var(--c-363c4e); border-radius: 4px; }
.pv-pop-section + .pv-pop-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-2a2f3f); }
.pv-pop-title { color: var(--muted); font-size: 11px; letter-spacing: 0.02em; margin-bottom: 6px; }
.pv-seg { display: flex; gap: 2px; padding: 2px; background: var(--c-171b26); border: 1px solid var(--c-2c3140); border-radius: 8px; }
.pv-seg-btn {
  flex: 1 0 auto; display: grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px;
  background: none; color: var(--c-b2b5be); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.pv-seg-btn:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-seg-btn.on { background: var(--c-2f3650); color: var(--on-bg); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.55); }
.pv-seg-small .pv-seg-btn { padding: 0 4px; min-width: 26px; }
.pv-seg-lines .pv-seg-btn { height: 30px; }
.pv-thick { display: block; width: 32px; background: currentColor; border-radius: 2px; }
.pv-field {
  width: 100%; box-sizing: border-box; background: var(--c-171b26); color: var(--text); border: 1px solid var(--c-2c3140); border-radius: 8px;
  padding: 7px 9px; font: inherit; font-size: 12px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.pv-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.pv-field::placeholder { color: var(--c-6a6f80); }
.pv-textarea { min-height: 64px; resize: vertical; line-height: 1.4; }
.pv-switch-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 14px; padding: 7px 4px; border: 0;
  background: none; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; border-radius: 6px; text-align: left;
}
.pv-switch-row:hover { background: var(--c-262b39); }
.pv-switch { position: relative; width: 30px; height: 17px; flex: none; border-radius: 9px; background: var(--c-3a4052); transition: background 0.15s; }
.pv-switch span { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.pv-switch-row.on .pv-switch { background: var(--accent); }
.pv-switch-row.on .pv-switch span { transform: translateX(13px); }
.pv-action {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 4px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
}
.pv-action:hover { background: var(--c-262b39); }
.pv-action .pv-kbd { margin-left: auto; }
.pv-action.danger:hover { color: #f7525f; }
.pv-emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pv-emoji { height: 34px; border: 0; border-radius: 7px; background: none; font-size: 19px; cursor: pointer; }
.pv-emoji:hover { background: var(--c-262b39); }
.pv-emoji.on { background: var(--c-2f3650); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.55); }

/* Colour picker */
.pv-swatches { display: grid; grid-template-columns: repeat(10, 22px); gap: 5px; }
.pv-swatch-gap { grid-column: 1 / -1; height: 3px; }
.pv-swatch {
  width: 22px; height: 22px; padding: 0; border: 0; border-radius: 5px; background: var(--c); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--veil-006); transition: transform 0.1s, box-shadow 0.1s;
}
.pv-swatch:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--veil-06); }
.pv-swatch.active { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px #fff; }
.pv-custom-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-2a2f3f); }
.pv-plus { display: grid; place-items: center; background: none; color: var(--c-b2b5be); box-shadow: inset 0 0 0 1px var(--c-3d4456); }
.pv-plus:hover { color: var(--on-bg); box-shadow: inset 0 0 0 1px var(--c-6a7186); transform: none; }
.pv-colors.editing .pv-plus { color: #fff; background: var(--accent); box-shadow: none; }
.pv-editor { display: none; margin-top: 10px; }
.pv-colors.editing .pv-editor { display: block; }
.pv-sv { position: relative; height: 120px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.pv-sv-thumb, .pv-hue-thumb {
  position: absolute; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #fff, 0 1px 4px var(--shadow-06); pointer-events: none;
}
.pv-hue {
  position: relative; height: 12px; margin-top: 10px; border-radius: 6px; cursor: pointer; touch-action: none;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.pv-hue-thumb { top: 50%; background: transparent; }
.pv-editor-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pv-chip { width: 28px; height: 28px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 1px var(--veil-01); }
.pv-hex {
  flex: 1; min-width: 0; background: var(--c-171b26); color: var(--text); border: 1px solid var(--c-2c3140); border-radius: 7px; padding: 6px 8px;
  font: inherit; font-size: 12px; font-family: ui-monospace, Consolas, monospace; outline: none;
}
.pv-hex:focus { border-color: var(--accent); }
.pv-add { height: 28px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.pv-add:hover { background: var(--accent-hover); }

/* ---- Left toolbar, flyouts and favourites bar, in the same look as the panels ---- */
.tools { gap: 2px; padding: 8px 0; }
.tool { width: 36px; height: 36px; border-radius: 8px; color: var(--c-9aa0b0); transition: background 0.12s, color 0.12s; }
.tool.small { width: 34px; height: 34px; border-radius: 7px; }
.tool:hover:not(:disabled) { background: var(--c-2a2f3f); color: var(--on-bg); }
.tool.active, .tool.on { color: var(--c-5b8cff); background: rgba(var(--accent-rgb), 0.16); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.35); }
.tool.armed { color: #fff; background: var(--down); box-shadow: none; }
.tool-sep { width: 22px; background: var(--c-2a2f3f); margin: 6px 0; }
/* The "more tools" arrow: a small chevron on the button's right edge, shown on hover. */
.tool-more {
  right: -7px; top: 50%; bottom: auto; width: 12px; height: 22px; transform: translateY(-50%); border-radius: 4px;
  color: var(--c-8b90a0); transition: opacity 0.12s, background 0.12s;
}
.tool-more:hover { background: var(--c-2a2f3f); color: var(--on-bg); }

.flyout {
  min-width: 270px; padding: 6px; border-radius: 12px; background: var(--c-1e222d-098); border: 1px solid var(--c-2f3546);
  box-shadow: 0 14px 36px var(--shadow-055), 0 2px 6px var(--shadow-03); animation: pv-pop 0.12s ease-out;
}
.flyout::-webkit-scrollbar { width: 8px; }
.flyout::-webkit-scrollbar-thumb { background: var(--c-363c4e); border-radius: 4px; }
.fly-head {
  padding: 10px 10px 5px; color: var(--c-6f7587); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
}
.fly-head:first-child { padding-top: 4px; }
.fly-row {
  gap: 11px; padding: 7px 8px 7px 10px; border-radius: 7px; color: var(--text); font-size: 13px;
  transition: background 0.1s;
}
.fly-row svg { color: var(--c-9aa0b0); flex: none; }
.fly-row:hover { background: var(--c-2a2f3f); }
.fly-row:hover svg { color: var(--on-bg); }
.fly-row.active { background: rgba(var(--accent-rgb), 0.14); color: var(--on-bg); }
.fly-row.active svg { color: var(--c-5b8cff); }
.fly-key:not(:empty) {
  padding: 1px 6px; border: 1px solid var(--c-3a4052); border-bottom-width: 2px; border-radius: 5px; color: var(--c-9aa0b0);
  font-size: 10.5px; font-family: inherit; background: var(--c-171b26);
}
.fly-star {
  width: 24px; height: 24px; place-items: center; border-radius: 6px; color: var(--c-6f7587); opacity: 0;
  transition: opacity 0.1s, color 0.1s, background 0.1s;
}
.fly-row:hover .fly-star { opacity: 1; }
.fly-star:hover { background: var(--c-343a4c); color: var(--c-f5c542); }
.fly-star.on { opacity: 1; color: var(--c-f5c542); }

.favbar { gap: 2px; padding: 4px 6px 4px 2px; border-radius: 10px; background: var(--c-1e222d-098); border-color: var(--c-2f3546);
  box-shadow: 0 10px 28px var(--shadow-045); }
.propbar { background: var(--c-1e222d-098); border-color: var(--c-2f3546); box-shadow: 0 10px 28px var(--shadow-045); }
.favbar .tool.small { width: 34px; height: 34px; color: var(--c-c3c7d1); }
.favbar-grip { color: var(--c-5d6272); padding: 0 3px; border-radius: 5px; transition: color 0.12s; }
.favbar-grip:hover { color: var(--c-b2b5be); }

/* ---- Bottom navigation: one rounded tray, grouped zoom | scroll | reset ---- */
.navbar {
  gap: 2px; padding: 4px; border-radius: 12px; background: var(--c-1e222d-094); border: 1px solid var(--c-2f3546);
  box-shadow: 0 10px 28px var(--shadow-045); backdrop-filter: blur(6px);
  transform: translate(-50%, 6px); transition: opacity 0.18s, transform 0.18s;
}
.navbar.show { transform: translate(-50%, 0); }
.nav-btn {
  position: relative; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--c-b2b5be);
  transition: background 0.12s, color 0.12s;
}
.nav-btn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.nav-btn:active { background: var(--c-323849); transform: translateY(0.5px); }
/* Thin dividers before "scroll back" and before "reset". */
.nav-btn:nth-child(3), .nav-btn:nth-child(5) { margin-left: 9px; }
.nav-btn:nth-child(3)::before, .nav-btn:nth-child(5)::before {
  content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 1px; background: var(--c-2f3546);
}

/* ---- Typing on the chart and the text settings card (draw/textedit.js) ---- */
.pv-texteditor {
  position: absolute; z-index: 9; margin: 0; padding: 4px 6px; box-sizing: border-box; resize: none; overflow: hidden;
  border: 1px solid var(--accent); border-radius: 2px; outline: none; white-space: pre; caret-color: #fff;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.pv-texteditor::placeholder { color: var(--c-8b90a0); opacity: 1; }
.pv-card {
  position: fixed; z-index: 90; width: 340px; background: var(--c-1e222d-099); border: 1px solid var(--c-2f3546); border-radius: 14px;
  box-shadow: 0 20px 48px var(--shadow-06), 0 2px 8px var(--shadow-03); color: var(--text); font-size: 13px;
  animation: pv-pop 0.14s ease-out;
}
.pv-card-head { cursor: var(--pv-grab); user-select: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; font-size: 15px; }
.pv-card-x { width: 28px; height: 28px; border: 0; border-radius: 7px; background: none; color: var(--c-9aa0b0); font-size: 20px; line-height: 1; cursor: pointer; }
.pv-card-x:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-card-body { padding: 8px 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.pv-card-row { display: flex; align-items: center; gap: 8px; }
.pv-card-row .pv-check { flex: 1; }
.pv-card-text { min-height: 90px; }
.pv-chipbtn {
  width: 30px; height: 30px; flex: none; padding: 0; border-radius: 8px; border: 1px solid var(--c-2c3140); cursor: pointer;
  background: linear-gradient(var(--c), var(--c)) center / 18px 18px no-repeat, var(--c-171b26);
}
.pv-chipbtn:hover { border-color: var(--c-4a5168); }
.pv-fmt { width: 30px; height: 30px; border: 1px solid var(--c-2c3140); border-radius: 8px; background: var(--c-171b26); color: var(--c-b2b5be); cursor: pointer; font: inherit; font-size: 14px; }
.pv-fmt:hover { border-color: var(--c-4a5168); color: var(--on-bg); }
.pv-fmt.on { background: var(--c-2f3650); color: var(--on-bg); border-color: rgba(var(--accent-rgb), 0.6); }
.pv-colorslot:empty { display: none; }
.pv-colorslot { padding: 10px; background: var(--c-171b26); border: 1px solid var(--c-2c3140); border-radius: 10px; }
.pv-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.pv-check input { display: none; }
.pv-check span {
  width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--c-4a5168); display: grid; place-items: center;
  transition: background 0.12s, border-color 0.12s;
}
.pv-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.pv-check input:checked + span::after {
  content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px);
}
.pv-card-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 14px; margin-top: 8px; border-top: 1px solid var(--c-2a2f3f); }
.pv-btn { height: 32px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--c-2c3140); background: var(--c-171b26); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.pv-btn:hover { border-color: var(--c-4a5168); }
.pv-ok { background: var(--accent-grad); border-color: transparent; color: #fff; }
.pv-ok:hover { background: var(--accent-grad); border-color: transparent; filter: brightness(1.12); }
.pv-opacity { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-2a2f3f); }
.pv-opacity-label { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.pv-opacity-row { display: flex; align-items: center; gap: 10px; }
.pv-opacity-track {
  flex: 1; height: 12px; border-radius: 6px; position: relative;
  background: linear-gradient(to right, transparent, var(--c)), repeating-conic-gradient(var(--c-3a3f4d) 0% 25%, #23273280 0% 50%) 0 0 / 8px 8px;
}
.pv-op-range { position: absolute; inset: -4px 0; width: 100%; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pv-op-range::-webkit-slider-runnable-track { height: 20px; background: none; }
.pv-op-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 1px var(--shadow-03), 0 1px 4px var(--shadow-05);
}
.pv-op-range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.pv-op-box {
  display: flex; align-items: center; gap: 2px; padding: 0 8px; height: 28px; background: var(--c-171b26); border: 1px solid var(--c-2c3140);
  border-radius: 7px; color: var(--muted); font-size: 12px;
}
.pv-op-num { width: 30px; background: none; border: 0; color: var(--text); font: inherit; font-size: 12px; text-align: right; outline: none; -moz-appearance: textfield; appearance: textfield; }
.pv-op-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pv-card { overflow: visible; }
.pv-card-palette { position: absolute; z-index: 3; max-width: none; }
.pv-card-foot { align-items: center; }
.pv-card-gap { flex: 1; }
.pv-tpl-wrap { position: relative; }
.pv-tpl { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.pv-tpl-chev { color: var(--muted); font-size: 10px; }
.pv-tpl-menu { position: absolute; left: 0; bottom: calc(100% + 6px); min-width: 210px; animation: pv-pop 0.12s ease-out; }
.pv-tpl-sep { height: 1px; background: var(--c-2a2f3f); margin: 4px 6px; }
.pv-tpl-name { flex: 1; }
.pv-tpl-del { width: 22px; height: 22px; border: 0; border-radius: 5px; background: none; color: var(--c-6f7587); cursor: pointer; font-size: 15px; opacity: 0; }
.pv-menu-item:hover .pv-tpl-del { opacity: 1; }
.pv-tpl-del:hover { background: var(--c-343a4c); color: var(--on-bg); }
.pv-tpl-save { display: flex; gap: 6px; padding: 4px; }
.pv-tpl-save .pv-field { width: 150px; }
.pv-card-head:active { cursor: var(--pv-grabbing); }
.pv-tpl-list { display: flex; flex-direction: column; min-width: 190px; }
.pv-pop-hint { color: var(--muted); font-size: 11.5px; line-height: 1.4; max-width: 220px; }
/* Shortcut shown on the right of a menu action (e.g. Clone: Ctrl + Drag). */
.pv-kbd {
  margin-left: auto; padding: 1px 6px; border: 1px solid var(--c-3a4052); border-bottom-width: 2px; border-radius: 5px;
  background: var(--c-171b26); color: var(--c-9aa0b0); font: inherit; font-size: 10.5px; white-space: nowrap;
}
/* Settings card for every drawing (draw/settings.js) */
.pv-settings { width: 360px; }
.pv-settings-body { max-height: min(62vh, 560px); overflow-y: auto; gap: 0; }
.pv-settings-body::-webkit-scrollbar { width: 8px; }
.pv-settings-body::-webkit-scrollbar-thumb { background: var(--c-363c4e); border-radius: 4px; }
.pv-set-section { padding: 10px 0; }
.pv-set-section + .pv-set-section { border-top: 1px solid var(--c-2a2f3f); }
.pv-set-section > .pv-pop-title { font-weight: 600; color: var(--c-b2b5be); font-size: 12px; margin-bottom: 8px; }
.pv-set-section .pv-pop-section + .pv-pop-section { margin-top: 10px; padding-top: 0; border-top: 0; }
.pv-set-label { color: var(--text); }
/* Small name dialog (PVControls.prompt), e.g. "Save drawing template" */
.pv-prompt { width: 320px; z-index: 110; }
.pv-prompt .pv-card-body { gap: 6px; padding-bottom: 6px; }
.pv-prompt-label { color: var(--muted); font-size: 12px; }
.pv-btn:disabled { opacity: 0.45; cursor: default; }
/* Card buttons carry an icon before their label (owner 2026-11-15): by their part, or data-icon. */
.pv-card-foot .pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pv-card-foot .pv-btn[data-icon]::before { content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--btn-ic) center / contain no-repeat; mask: var(--btn-ic) center / contain no-repeat; }
.pv-btn[data-icon="check"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="x"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="trash"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h14M10 7V4h4v3M7 7l1 13h8l1-13'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="reset"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12a7 7 0 11-2.05-4.95M19 4v4h-4'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="download"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="pencil"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4.5-1L19 8.5 15.5 5 5 15.5z'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="chart"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M7 16v-5M12 16V6M17 16v-8'/%3E%3C/svg%3E"); }
.pv-btn[data-icon="exit"] { --btn-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h5v16h-5M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E"); }


/* Settings card of a styled text box (callout, note, ...): labels line up so the colour chips form a column. */
.pv-set-wide { min-width: 96px; }
.pv-card-row .pv-check.pv-set-wide { flex: 0 0 96px; }
.pv-settings .pv-size { width: 72px; }

/* Card tabs (Text / Style, Coordinates, Visibility), like TradingView's: a line under the active one. */
.pv-tabs { display: flex; gap: 18px; padding: 2px 16px 0; border-bottom: 1px solid var(--c-2c3140); margin-bottom: 4px; }
.pv-tab { background: none; border: 0; padding: 8px 0 9px; color: var(--c-9aa0b0); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; position: relative; }
.pv-tab:hover { color: var(--text); }
.pv-tab.on { color: var(--on-bg); }
.pv-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.pv-set-note { color: var(--muted); font-size: 11.5px; line-height: 1.45; padding: 4px 0 2px; }

/* Coordinates: #1  [price]  [date][hh:mm] */
.pv-coord-row { display: grid; grid-template-columns: 26px 1fr 1.45fr; align-items: center; gap: 8px; }
.pv-coord-label { color: var(--c-9aa0b0); font-size: 12px; font-weight: 600; }
.pv-coord-when { display: flex; gap: 6px; align-items: center; min-width: 0; }
.pv-coord-when .pv-date { flex: 1; min-width: 0; }
.pv-coord-time { width: 58px; flex: none; text-align: center; }
.pv-coord-time.bad { border-color: #f23645; }

/* Visibility: [x] Minutes  [1] ===o=====o=== [59] */
.pv-vis-row { display: grid; grid-template-columns: 92px 52px 1fr 52px; align-items: center; gap: 10px; }
.pv-vis-row.here .pv-check { color: var(--on-bg); }
.pv-vis-row.off .pv-vis-num, .pv-vis-row.off .pv-dual { opacity: 0.35; }
.pv-vis-num { text-align: center; padding: 6px 4px; }
.pv-dual { position: relative; height: 18px; }
.pv-dual::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 2px; background: var(--c-2c3140); }
.pv-dual-fill { position: absolute; top: 7px; height: 4px; border-radius: 2px; background: var(--accent); }
.pv-dual input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; height: 18px; }
.pv-dual input[type=range]::-webkit-slider-runnable-track { background: none; height: 18px; }
.pv-dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px;
  margin-top: 2px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: pointer; }
.pv-dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: #fff;
  border: 2px solid var(--accent); cursor: pointer; }
.pv-dual input[type=range]:disabled::-webkit-slider-thumb { cursor: default; }

/* Fibonacci / Gann card: level table in two columns (one for time levels), line chips, selects. */
.pv-settings.pv-wide { width: 384px; }
.pv-settings .pv-settings-body { max-height: min(62vh, 560px); overflow-y: auto; }
.pv-lv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.pv-lv-grid.one { grid-template-columns: 1fr; max-width: 220px; }
.pv-lv { display: flex; align-items: center; gap: 8px; }
.pv-lv.off .pv-lv-val { color: var(--c-6b7080); }
.pv-lv .pv-check { gap: 0; }
.pv-lv-val { width: 74px; flex: none; padding: 5px 7px; }
.pv-linechip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 7px; border-radius: 7px;
  border: 1px solid var(--c-2c3140); background: var(--c-171b26); color: var(--text); cursor: pointer; }
.pv-linechip:hover { border-color: var(--c-3d4458); }
.pv-linechip-sw { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--veil-012); }
.pv-linechip-line { display: inline-flex; color: var(--c-c9ccd6); }
.pv-fib-select { min-width: 96px; }
.pv-pop-line { margin-top: 10px; }
.pv-pop-line .pv-seg { margin-top: 6px; }
.pv-fib-op { flex: 1; accent-color: var(--accent); }
.pv-settings .pv-set-section > .pv-card-row { min-height: 30px; }
.pv-lv.off .pv-linechip, .pv-lv .pv-lv-val:disabled { opacity: 0.4; cursor: default; }
.pv-linechip:disabled { pointer-events: none; }

/* Chart settings (chart_settings.js): gear in the top bar, the Settings window with its tabs on the left, and the
   chart's right-click menu. */
.toolbar-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none;
  color: var(--c-b2b5be); cursor: pointer; margin-right: 6px; }
.toolbar-btn:hover { background: var(--border); color: var(--on-bg); }
.pv-dialog-back { position: fixed; inset: 0; z-index: 95; background: rgba(8, 10, 16, 0.45); display: grid; place-items: center;
  animation: pv-fade 0.12s ease-out; }
@keyframes pv-fade { from { opacity: 0; } to { opacity: 1; } }
.pv-dialog { width: min(680px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px)); display: flex; flex-direction: column;
  background: var(--c-1e222d-099); border: 1px solid var(--c-2f3546); border-radius: 14px; color: var(--text); font-size: 13px;
  box-shadow: 0 24px 60px var(--shadow-06), 0 2px 8px var(--shadow-03); animation: pv-pop 0.14s ease-out; }
.pv-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 16px; }
.pv-dialog-main { display: flex; min-height: 0; flex: 1; border-top: 1px solid var(--c-2a2f3f); border-bottom: 1px solid var(--c-2a2f3f); }
.pv-dialog-nav { width: 176px; flex: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--c-2a2f3f); }
.pv-dialog-tab { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--c-b2b5be); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pv-dialog-tab:hover { background: var(--c-262b38); color: var(--on-bg); }
.pv-dialog-tab.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); font-weight: 600; }
.pv-dialog-body { flex: 1; overflow-y: auto; padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 14px; min-height: 360px; }
.pv-dialog-body::-webkit-scrollbar { width: 8px; }
.pv-dialog-body::-webkit-scrollbar-thumb { background: var(--c-363c4e); border-radius: 4px; }
.pv-dialog .pv-pop-title { text-transform: uppercase; letter-spacing: 0.06em; font-size: 10.5px; margin-bottom: 8px; }
.pv-dlg-row { min-height: 34px; gap: 10px; }
.pv-dlg-label { min-width: 190px; }
.pv-card-row .pv-check.pv-dlg-label { flex: 0 0 190px; }
.pv-dlg-select { min-width: 150px; }
.pv-dlg-pair { display: inline-flex; gap: 6px; }
.pv-dlg-num { display: inline-flex; align-items: center; gap: 8px; }
.pv-dlg-num .pv-field { width: 76px; }
.pv-dlg-unit { color: var(--muted); font-size: 12px; }
.pv-dlg-pop { z-index: 110; }
.pv-dialog .pv-card-foot { padding: 12px 16px; }
.pv-ctx { min-width: 250px; z-index: 120; }
.pv-ctx .pv-menu-item { padding: 7px 12px 7px 10px; }
.pv-ctx-ic { width: 18px; display: grid; place-items: center; color: var(--c-9aa0b0); }
.pv-ctx-label { flex: 1; }
.pv-ctx-key { color: var(--muted); font-size: 11px; margin-left: 18px; }
.pv-ctx-danger:hover { color: #f7525f; }
.pv-ctx-danger:hover .pv-ctx-ic { color: #f7525f; }
.pv-card-row .pv-check.pv-dlg-label:only-child { flex: 1; }

/* Buttons on the chart: A / L at the foot of the price scale, navigation above the time scale (chart settings:
   visible on mouse over, always, or never). */
.pv-scalebtns { position: absolute; z-index: 6; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.pv-scalebtns button { pointer-events: auto; border: 0; cursor: pointer; display: grid; place-items: center;
  color: var(--c-b2b5be); background: var(--c-262b38); border-radius: 6px; font: 600 11px/1 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.pv-scalebtns button { width: 22px; height: 22px; }
.pv-scalebtns button:hover { background: var(--c-363c4e); color: var(--on-bg); }
.pv-scalebtns button.on { background: var(--accent); color: #fff; }
.pv-scalebtns { opacity: 0; transition: opacity 0.15s; }
.pv-chart:hover .pv-scalebtns[data-show="hover"], .pv-scalebtns[data-show="always"] { opacity: 1; }
.pv-scalebtns[data-show="hidden"] { display: none; }
/* The navigation bar (draw/ui.js) follows the same setting: always shown, or never. */
.navbar[data-show="always"] { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.navbar[data-show="hidden"] { display: none; }
.pv-ctx-sub .pv-ctx-key { font-size: 14px; }
/* Parallel channel: its own two lines (0 and 1) have no tick box, as in TradingView, but keep the row aligned. */
.pv-lv-fixed { visibility: hidden; }

/* Right-hand bar and the object tree / data window panel (object_tree.js). */
.pv-rightbar { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0;
  background: var(--panel); border-left: 1px solid var(--border); }
.pv-rightbar-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none;
  color: var(--c-b2b5be); cursor: pointer; }
.pv-rightbar-btn:hover { background: var(--border); color: var(--on-bg); }
.pv-rightbar-btn.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pv-side { width: 0; flex: none; overflow: hidden; background: var(--panel); border-left: 1px solid var(--border); display: none;
  flex-direction: column; font-size: 13px; color: var(--text); }
.pv-side.open { width: 272px; display: flex; }
.pv-side-tabs { display: flex; gap: 4px; padding: 10px 10px 8px; }
.pv-side-tabs button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--c-9aa0b0); font: inherit;
  font-weight: 600; cursor: pointer; }
.pv-side-tabs button:hover { color: var(--on-bg); }
.pv-side-tabs button.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-side-body { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.pv-tree-row { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: 7px; cursor: pointer; }
.pv-tree-row:hover { background: var(--c-262b38); }
.pv-tree-row.selected { background: var(--c-22304f); }
.pv-tree-row.hidden .pv-tree-name, .pv-tree-row.hidden .pv-tree-ic { opacity: 0.4; }
.pv-tree-symbol { font-weight: 600; cursor: default; }
.pv-tree-ic { width: 20px; display: grid; place-items: center; color: var(--c-b2b5be); flex: none; }
.pv-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tree-acts { display: flex; gap: 2px; opacity: 0; }
.pv-tree-row:hover .pv-tree-acts, .pv-tree-acts:has(.on) { opacity: 1; }
.pv-tree-act { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none;
  color: var(--c-9aa0b0); cursor: pointer; }
.pv-tree-act:hover { background: var(--c-363c4e); color: var(--on-bg); }
.pv-tree-act.on { color: var(--c-5b8cff); }
.pv-tree-rename { height: 26px; padding: 3px 7px; flex: 1; min-width: 0; }
.pv-tree-empty { color: var(--muted); font-size: 12px; padding: 10px 8px; }
.pv-data { display: flex; flex-direction: column; gap: 2px; }
.pv-data-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; font-size: 12.5px; }
.pv-data-k { color: var(--c-9aa0b0); }
.pv-data-v.up { color: var(--c-089981); }
.pv-data-v.down { color: #f23645; }
.pv-data .pv-tree-symbol { margin: 6px 0 2px; }

/* Object tree: toolbar, groups, drag and drop. */
.pv-tree-tools { display: flex; gap: 2px; padding: 0 4px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--c-2a2f3f); }
.pv-tree-tool { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none;
  color: var(--c-b2b5be); cursor: pointer; }
.pv-tree-tool:hover:not(:disabled) { background: var(--border); color: var(--on-bg); }
.pv-tree-tool:disabled { opacity: 0.35; cursor: default; }
.pv-tree-group { font-weight: 600; }
.pv-tree-group .pv-tree-ic { color: #d1a54a; }
.pv-tree-row.in-group { padding-left: 30px; }
.pv-tree-chev { width: 16px; height: 20px; margin-right: -6px; border: 0; background: none; color: var(--c-9aa0b0); font-size: 15px;
  cursor: pointer; transform: rotate(90deg); transition: transform 0.12s; padding: 0; }
.pv-tree-chev.folded { transform: none; }
.pv-tree-row[data-id] { cursor: var(--pv-grab); }
.pv-tree-row.dragging { opacity: 0.45; }
.pv-tree-row.drop-above { box-shadow: inset 0 2px 0 var(--accent); }
.pv-tree-row.drop-below { box-shadow: inset 0 -2px 0 var(--accent); }
.pv-tree-row.drop-into { background: var(--c-22304f); box-shadow: inset 0 0 0 1px var(--accent); }

/* Locked vertical cursor line (right-click > Lock vertical cursor line by time). */
.pv-vlock { position: absolute; top: 0; width: 0; border-left: 1px dashed var(--c-9598a1); pointer-events: none; z-index: 4; }
.pv-vlock-label { position: absolute; transform: translateX(-50%); padding: 3px 7px; border-radius: 3px; background: var(--c-363a45);
  color: var(--on-bg); font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 4; }

/* Long / short position card. */
.pv-pos-num { width: 110px; }
.pv-pos-stats { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; padding: 0 10px; height: 30px; }
.pv-pos-statlist { display: none; flex-direction: column; gap: 6px; padding: 6px 2px 4px 12px; }
.pv-pos-statlist.open { display: flex; }

/* Status line on the chart's top-left (legend.js, app.js showOhlc), like TradingView's. */
.pv-legend { position: absolute; top: 6px; left: calc(var(--pane-left, 0px) + 8px); z-index: 5; padding: 3px 8px 4px 6px; border-radius: 6px; pointer-events: none;
  font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; max-width: calc(100% - 120px); }
.pv-legend-row { display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; }
.pv-legend-title { font-weight: 600; font-size: 14px; }
.pv-legend-logo { position: relative; width: 22px; height: 18px; flex: none; }
.pv-legend-logo .a { position: absolute; left: 0; top: 0; }
.pv-legend-logo .b { position: absolute; left: 9px; top: 7px; }
.pv-legend-logo svg { display: block; }
.pv-legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #f23645; flex: none; margin: 0 -2px; }
.pv-legend-dot.live { background: var(--c-089981); } .pv-legend-dot.closed { background: #f5a623; }
.pv-legend-vals > span { margin: 0 6px 0 2px; }
.pv-legend .up { color: var(--up); } .pv-legend .down { color: var(--down); }
.pv-legend-quote { display: flex; align-items: center; gap: 6px; margin-top: 5px; pointer-events: auto; }
.pv-legend-quote > span { display: inline-flex; flex-direction: column; align-items: center; min-width: 76px; padding: 3px 8px;
  border-radius: 5px; font-weight: 600; font-size: 13px; line-height: 1.15; }
.pv-legend-quote small { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.pv-legend-quote .bid { color: #f23645; border: 1px solid #f23645; }
.pv-legend-quote .ask { color: #2962ff; border: 1px solid #2962ff; }
.pv-legend-quote .spread { min-width: 0; padding: 0 2px; color: var(--muted); font-weight: 400; font-size: 11px; border: 0; }

/* Timeframe bar and its list (timeframes.js), like TradingView's interval menu. */
.tfs .pv-tf-arrow { padding: 4px 4px; display: grid; place-items: center; }
.tfs .pv-tf-arrow.open svg { transform: rotate(180deg); }
.pv-tf-menu { width: 200px; max-height: 70vh; padding: 6px; }
.pv-tf-group { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px; color: var(--muted);
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; user-select: none; }
.pv-tf-group:hover { color: var(--text); }
.pv-tf-group.folded svg { transform: rotate(180deg); }
.pv-tf-row { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 6px 0 10px; border-radius: 6px;
  cursor: pointer; font-size: 13px; color: var(--text); }
.pv-tf-row:hover { background: var(--c-2a2f3f); }
.pv-tf-row.active { background: var(--accent); color: #fff; }
.pv-tf-star { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none;
  color: var(--c-9aa0b0); cursor: pointer; opacity: 0; }
.pv-tf-row:hover .pv-tf-star, .pv-tf-row.fav .pv-tf-star { opacity: 1; }
.pv-tf-row.fav .pv-tf-star { color: #f5c518; }
.pv-tf-row.active .pv-tf-star { color: var(--on-bg); }
.pv-tf-star:hover { background: var(--veil-12); }

/* Chart type button and list (charttypes.js); faint dividers between the top bar's groups. */
.tfs .pv-ct-main { display: grid; place-items: center; padding: 4px 6px; color: var(--text); }
.tfs .pv-tf-btns button { display: grid; place-items: center; }
.pv-ct-row { gap: 10px; justify-content: flex-start; }
.pv-ct-row > span { flex: 1; }
.pv-ct-row svg { flex: none; }
.hdr-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; flex: none; }

/* Price alerts (alerts.js): the card, chart tags, the + on the price scale, toasts and the panel. */
.pv-alert-card { width: 460px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
.pv-alert-card .pv-card-body { overflow-y: auto; }
.pv-al-title { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.pv-al-title .pv-select { height: 30px; font-weight: 600; }
.pv-al-symbtn { height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 8px 0 5px; border: 1px solid var(--c-363c4e);
  border-radius: 8px; background: var(--c-262b39); color: var(--c-e6e8ee); font: inherit; font-size: 13.5px; cursor: pointer; }
.pv-al-symbtn:hover { border-color: var(--c-50566a); background: var(--c-2a2f3f); }
.pv-al-symbtn b { font-weight: 600; }
.pv-al-symicon { width: 22px; display: grid; place-items: center; }
.pv-al-symicon .pv-ss-badge { width: 20px; height: 20px; font-size: 8.5px; }
.pv-al-caret { color: var(--c-9aa0b0); font-size: 10px; }
.pv-al-body { gap: 12px; }
.pv-al-row { display: grid; grid-template-columns: 92px 1fr; align-items: start; gap: 10px; }
.pv-al-row > label { color: var(--muted); padding-top: 7px; }
.pv-al-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pv-al-static { height: 32px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: var(--c-2a2f3f); }
.pv-al-price { position: relative; }
.pv-al-price .pv-field { width: 100%; padding-right: 30px; font-variant-numeric: tabular-nums; }
.pv-al-steps { position: absolute; right: 4px; top: 3px; bottom: 3px; display: flex; flex-direction: column; }
.pv-al-steps button { flex: 1; width: 22px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 10px; line-height: 1; padding: 0; }
.pv-al-steps button:hover { color: var(--on-bg); }
.pv-alert-card .pv-field { width: 100%; }
.pv-alert-card textarea.pv-field { resize: vertical; min-height: 64px; font: inherit; }
.pv-alert-card .pv-select { width: 100%; }
.pv-alert-card .bad { border-color: var(--down) !important; }
.pv-al-sep { height: 1px; background: var(--c-2a2f3f); margin: 2px 0; }
.pv-al-small { height: 28px; padding: 0 12px; font-size: 12px; }
.pv-al-soundrow { display: flex; gap: 6px; align-items: center; padding-left: 25px; }
.pv-al-soundrow.off { opacity: 0.45; }
.pv-al-soundrow .pv-select { flex: 1.4; width: auto; }
.pv-al-soundrow > .pv-select:last-child { flex: 1; }
.pv-al-play { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--c-b2b5be); cursor: pointer; }
.pv-al-play:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-al-soundmenu { max-height: 360px; }
.pv-al-soundmenu .pv-menu-item { padding: 3px 4px 3px 12px; }
.pv-al-soundmenu .pv-ctx-label { flex: 1; }
.pv-al-group { padding: 8px 12px 4px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pv-al-custom { display: flex; flex-direction: column; gap: 8px; }
.pv-al-days { display: flex; gap: 4px; }
.pv-al-day { flex: 1; height: 28px; border: 1px solid var(--c-2c3140); border-radius: 7px; background: var(--c-171b26); color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.pv-al-day.on { background: var(--c-2f3650); color: var(--on-bg); border-color: rgba(var(--accent-rgb), 0.6); }
.pv-al-times { display: flex; align-items: center; gap: 8px; }
.pv-al-times .pv-field { flex: 1; }
.pv-al-note { color: var(--muted); font-size: 11px; }
.pv-al-del { padding: 0 10px; color: var(--down); display: grid; place-items: center; }
.pv-danger { background: var(--down); border-color: var(--down); color: #fff; }
.pv-danger:hover { background: #ff4a5a; }
.pv-al-confirm { width: 360px; }

.pv-alert-tag { position: absolute; z-index: 6; display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 4px 0 7px;
  border: 1px solid var(--c-50566a); border-radius: 6px; background: var(--c-131722-092); color: var(--text); font-size: 12px;
  white-space: nowrap; cursor: ns-resize; user-select: none; }
.pv-alert-tag:hover { border-color: var(--c-8b90a0); }
.pv-alert-tag .ic { display: grid; color: var(--c-b2b5be); }
.pv-alert-tag .del { width: 18px; height: 18px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.pv-alert-tag .del:hover { background: var(--c-2a2f3f); color: var(--down); }
.pv-al-plus { position: absolute; z-index: 6; display: none; width: 18px; height: 18px; padding: 0; border: 1px solid var(--c-50566a); border-radius: 50%;
  background: var(--panel); color: var(--text); font-size: 14px; line-height: 15px; text-align: center; cursor: pointer; }
.pv-al-plus:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.pv-toasts { position: fixed; right: 16px; bottom: 36px; z-index: 120; display: flex; flex-direction: column; gap: 8px; width: 340px; }
.pv-toast { display: flex; gap: 10px; padding: 12px 10px 12px 14px; border-radius: 10px; background: var(--c-1e222d-098);
  border: 1px solid var(--c-2f3546); border-left: 3px solid var(--accent); box-shadow: 0 12px 32px var(--shadow-05); animation: pv-pop 0.15s ease-out; }
.pv-toast-ic { color: var(--accent); padding-top: 1px; }
.pv-toast-main { flex: 1; min-width: 0; cursor: pointer; }
.pv-toast-msg { margin-top: 2px; word-wrap: break-word; }
.pv-toast-time { margin-top: 4px; color: var(--muted); font-size: 11px; }
.pv-toast-acts { display: flex; align-items: flex-start; gap: 2px; }
.pv-toast-x, .pv-toast-mute { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 0; }
.pv-toast-x:hover, .pv-toast-mute:hover { background: var(--c-2a2f3f); color: var(--on-bg); }

.pv-rightbar-btn.pv-has { color: var(--accent); }
.pv-al-bar { display: flex; align-items: center; gap: 10px; padding: 0 10px 8px; }
.pv-al-count { color: var(--muted); font-size: 12px; }
.pv-al-empty { padding: 16px 10px; color: var(--muted); }
.pv-al-item { display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-radius: 8px; cursor: pointer; }
.pv-al-item:hover { background: var(--c-262b38); }
.pv-al-item:hover .pv-tree-acts { opacity: 1; }
.pv-al-item-main { flex: 1; min-width: 0; }
.pv-al-item-top { display: flex; align-items: center; gap: 8px; }
.pv-al-item-msg { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-al-item-sub, .pv-al-when { color: var(--muted); font-size: 11px; }
.pv-al-when { margin-left: auto; }
.pv-al-badge { font-size: 10px; padding: 1px 6px; border-radius: 9px; background: var(--c-2a2f3f); color: var(--muted); }
.pv-al-item.active .pv-al-badge { background: var(--c-089981-018); color: var(--up); }
.pv-al-item.triggered .pv-al-badge { background: rgba(var(--accent-rgb), 0.18); color: var(--c-5b8cff); }
.pv-al-item.expired, .pv-al-item.stopped { opacity: 0.7; }

/* ---- Scrollbars, everywhere in PlotVibe: slim rounded thumb on a clear track, no arrow buttons. Colours come from the
   theme's own text colour, so they suit whichever background the page has. ---- */
:root {
  --sb-thumb: color-mix(in srgb, var(--text) 22%, transparent);
  --sb-thumb-hover: color-mix(in srgb, var(--text) 40%, transparent);
  --sb-thumb-active: color-mix(in srgb, var(--accent) 75%, transparent);
}
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; min-height: 36px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--sb-thumb-hover); border-width: 2px; }
::-webkit-scrollbar-thumb:active { background-color: var(--sb-thumb-active); border-width: 2px; }
::-webkit-scrollbar-button, ::-webkit-scrollbar-corner { display: none; background: transparent; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent; } }
.pv-menu::-webkit-scrollbar-thumb, .pv-pop::-webkit-scrollbar-thumb, .flyout::-webkit-scrollbar-thumb,
.pv-settings-body::-webkit-scrollbar-thumb, .pv-dialog-body::-webkit-scrollbar-thumb { background: var(--sb-thumb); background-clip: padding-box; }
.pv-alert-card .pv-card-body { scrollbar-gutter: stable; margin-right: 4px; }

/* ---- Time picker (ui_controls.js time()): hours and minutes columns, same look as the date picker. ---- */
.pv-time { min-width: 92px; }
.pv-timepop { width: 168px; }
.pv-time-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-time-col { max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.pv-time-head { position: sticky; top: 0; z-index: 1; padding: 2px 0 6px; text-align: center; color: var(--muted); font-size: 11px;
  background: var(--c-1e222d-098); }
.pv-time-cell { height: 28px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit;
  font-size: 12.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.pv-time-cell:hover { background: var(--c-2a2f3f); }
.pv-time-cell.selected { background: var(--accent); color: #fff; font-weight: 600; }
.pv-timepop .pv-cal-foot { justify-content: space-between; }

/* Expiry date + time, schedule times, volume. */
.pv-al-exp { display: flex; gap: 8px; }
.pv-al-exp > .pv-date { flex: 1 1 0; min-width: 0; justify-content: flex-start; }
.pv-al-exp > .pv-time { flex: 0 0 116px; }
.pv-al-times > .pv-date { flex: 1 1 0; }
.pv-alert-card .pv-date { height: 32px; font-size: 13px; }
.pv-al-exp.bad .pv-date { border-color: var(--down); }
.pv-al-times .pv-date { flex: 1; }
.pv-al-vol { display: flex; align-items: center; gap: 10px; padding-left: 25px; color: var(--muted); font-size: 12px; }
.pv-al-vol.off { opacity: 0.45; }
.pv-al-vol .pv-range { flex: 1; }
.pv-al-vol b { width: 38px; text-align: right; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* Sliders (volume, status line background). */
.pv-range { -webkit-appearance: none; appearance: none; height: 18px; background: none; cursor: pointer; margin: 0; }
.pv-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.pv-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 4px var(--shadow-04); }
.pv-range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.pv-range::-moz-range-track { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.pv-range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }

/* ---- paper trading (src/paper): the panel under the chart, the order ticket, account cards, toasts ---- */
.pv-center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-center .chart { flex: 1; min-height: 0; }
.pv-paper { display: flex; flex: none; flex-direction: column; position: relative; min-height: 140px; background: var(--panel);
  border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text); }
.pv-paper.open { display: flex; }
.pp-grip { position: absolute; left: 0; right: 0; top: -3px; height: 6px; cursor: ns-resize; z-index: 2; }
.pp-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; }
.pp-title { font-weight: 600; }
.pp-mode { font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--c-2a2f3f); color: var(--c-b2b5be); }
.pp-mode.replay { background: rgba(var(--accent-rgb), 0.18); color: var(--accent-text); }
.pp-icon { width: 26px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); cursor: pointer; font-size: 14px; }
.pp-icon:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; padding: 6px 10px; color: var(--muted); }
.pp-bar b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 4px; }
.pp-bar .up, .pp-table .up, .pp-stats .up { color: var(--up); }
.pp-bar .down, .pp-table .down, .pp-stats .down { color: var(--down); }
.pp-account { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--c-181c27); color: var(--text); font: inherit; cursor: pointer; }
.pp-account:hover { border-color: var(--c-3d4456); }
.pp-account b { margin: 0; }
.pp-tabs, .pp-sub { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 6px; }
.pp-tabs button, .pp-sub button { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--c-262b39); color: var(--c-b2b5be);
  font: inherit; cursor: pointer; }
.pp-sub button { height: 24px; background: none; }
.pp-tabs button:hover, .pp-sub button:hover { color: var(--on-bg); }
.pp-tabs button.on { background: var(--accent-grad); color: #fff; }
.pp-sub button.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pp-tabs small { opacity: 0.7; }
.pp-body { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 8px; }
.pp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pp-table th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 400; text-align: left;
  padding: 6px 8px; white-space: nowrap; border-bottom: 1px solid var(--border); }
.pp-table td { padding: 6px 8px; white-space: nowrap; border-bottom: 1px solid var(--c-232733); }
.pp-table tr:hover td { background: var(--c-222633); }
.pp-side { display: inline-block; padding: 1px 6px; border-radius: 4px; font-weight: 600; font-size: 11.5px; }
.pp-side.buy { color: var(--c-8fb0ff); background: rgba(41, 98, 255, 0.16); }
.pp-side.sell { color: var(--c-ff8a95); background: rgba(242, 54, 69, 0.14); }
.pp-status.working { color: var(--c-8fb0ff); } .pp-status.filled { color: var(--up); }
.pp-status.cancelled { color: var(--muted); } .pp-status.rejected { color: var(--down); }
.pp-status small { color: var(--muted); }
.pp-act { width: 24px; height: 22px; border: 0; border-radius: 5px; background: none; color: var(--c-9aa0b0); cursor: pointer; font-size: 14px; }
.pp-act:hover { background: var(--c-2f3546); color: var(--on-bg); }
.pp-empty { padding: 36px 0; text-align: center; color: var(--muted); }
.pp-start { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 0; }
.pp-start b { font-size: 15px; }
.pp-start span { color: var(--muted); }
.pp-pill { height: 30px; padding: 0 18px; border: 0; border-radius: 15px; color: #fff; font: inherit; font-weight: 600; cursor: pointer; margin: 6px 4px 0; }
.pp-pill.sell { background: var(--down); } .pp-pill.buy { background: var(--accent); }
.pp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 8px 0; }
.pp-stats div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; background: var(--c-181c27); }
.pp-stats span { color: var(--muted); }
.pp-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.pp-accounts .pp-menu-head { padding: 6px 12px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.pp-toasts { right: auto; left: 56px; }
.pp-toast { border-left-color: var(--accent); cursor: default; }
.pp-toast.filled { border-left-color: var(--up); }
.pp-toast.bad { border-left-color: var(--down); }
.pp-toast-ic { width: 20px; text-align: center; font-weight: 700; color: var(--accent); }
.pp-toast.filled .pp-toast-ic { color: var(--up); }
.pp-toast.bad .pp-toast-ic { color: var(--down); }
.pv-trade-btn svg { margin-right: 2px; }
.pv-trade-mark { display: grid; place-items: center; width: 20px; height: 20px; margin: 0 6px 0 -2px; border-radius: 50%; background: #fff; flex: none; }
.pv-trade-mark img { width: 15px; height: auto; display: block; transform: translateX(0.5px); }
/* Clicking the chart's BID / ASK boxes opens the order ticket. */
.pv-legend-quote .bid, .pv-legend-quote .ask { cursor: pointer; }

/* The order ticket. */
.pv-ticket { position: fixed; z-index: 130; width: 330px; padding-bottom: 12px; }
.pv-ticket .pv-card-head { padding-bottom: 6px; }
.tk-sides { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 14px; }
.tk-side { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--c-181c27); color: var(--c-b2b5be); font: inherit; cursor: pointer; font-variant-numeric: tabular-nums; }
.tk-side.buy { align-items: flex-end; }
.tk-side b { font-size: 15px; color: var(--text); }
.tk-side.sell.on { background: var(--down); border-color: var(--down); color: #fff; }
.tk-side.buy.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tk-side.on b { color: var(--on-bg); }
.tk-spread { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 1px 6px; border-radius: 4px;
  background: var(--bg); color: var(--c-b2b5be); font-size: 11px; }
.tk-tabs { display: flex; margin: 10px 14px 0; border-bottom: 1px solid var(--border); }
.tk-tabs button { flex: 1; height: 30px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--c-9aa0b0); font: inherit; cursor: pointer; }
.tk-tabs button.on { color: var(--on-bg); border-bottom-color: var(--accent); }
.tk-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 0; }
.tk-row { display: grid; grid-template-columns: 112px 1fr; gap: 6px; align-items: center; }
.tk-row label { color: var(--muted); }
.tk-field { position: relative; }
.tk-field .pv-field { width: 100%; box-sizing: border-box; padding-right: 92px; font-variant-numeric: tabular-nums; }
.tk-hint { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11.5px; pointer-events: none; }
.tk-summary { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 8px; background: var(--c-181c27); font-size: 12px; }
.tk-summary div { display: flex; justify-content: space-between; color: var(--muted); }
.tk-summary b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-dim { color: var(--muted); }
.tk-section { display: flex; justify-content: space-between; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600;
  padding: 4px 0; cursor: pointer; }
.tk-section .tk-chev { transition: transform 0.15s; transform: rotate(-90deg); }
.tk-section.open .tk-chev { transform: none; }
.tk-exits { display: flex; flex-direction: column; gap: 8px; }
.tk-exit { display: flex; flex-direction: column; gap: 4px; }
.tk-exit-head { display: flex; align-items: center; justify-content: space-between; }
.tk-exit-on { padding: 0; background: none; }
.tk-exit-on input { display: none; }
.tk-exit-on input:checked + .pv-switch { background: var(--accent); }
.tk-exit-on input:checked + .pv-switch span { transform: translateX(13px); }
.tk-exit.off .tk-field { opacity: 0.5; }
.tk-field .pv-field.bad { border-color: var(--down); }
.tk-extra { display: grid; grid-template-columns: 112px 1fr; gap: 6px; align-items: center; color: var(--muted); }
.tk-error { min-height: 16px; padding: 6px 14px 0; color: var(--c-ff8a95); font-size: 12px; }
.tk-submit { display: flex; flex-direction: column; align-items: center; width: calc(100% - 28px); margin: 6px 14px 0; padding: 8px 0;
  border: 0; border-radius: 8px; color: #fff; font: inherit; cursor: pointer; }
.tk-submit.buy { background: var(--accent); }
.tk-submit.sell { background: var(--down); }
.tk-submit b { font-size: 15px; }
.tk-submit small { font-variant-numeric: tabular-nums; opacity: 0.9; }
.tk-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* Create account / Account settings and the small editors. */
.pv-paper-card, .pp-edit { position: fixed; z-index: 140; width: 380px; }
.pv-paper-card .pv-btn { white-space: nowrap; }
.pv-paper-card .pv-card-body, .pp-edit .pv-card-body { display: flex; flex-direction: column; gap: 6px; }
.pa-label { color: var(--muted); font-size: 12px; margin-top: 4px; }
.pa-two, .pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pa-two > div, .pa-grid > div { display: flex; flex-direction: column; gap: 4px; }
.pa-section { margin-top: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.pa-error { min-height: 16px; color: var(--c-ff8a95); font-size: 12px; }

/* ---- paper trading, part 2 (recording 2026-11-12 141430): the trading tab strip, the Trade button, trades on the chart ---- */
/* The Trade button has a border, like TradingView's. */
.pv-trade-btn { border: 1px solid var(--c-434651); border-radius: 8px; }
.pv-trade-btn:hover { border-color: var(--c-5d606b); }
.pv-trade-btn.active { border-color: var(--accent); }
/* The trading tab is always there as a strip under the chart; opened, it shows the account and the tabs. */
.pv-paper { display: flex; min-height: 0; }
.pv-paper:not(.open) .pp-grip { display: none; }
.pp-head { padding: 3px 8px; min-height: 30px; }
.pv-paper.open .pp-head { border-bottom: 1px solid var(--border); }
.pp-title { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.pp-title:hover { background: var(--c-2a2f3f); }
.pp-chev { color: var(--muted); font-size: 11px; }
.pp-rot { display: inline-flex; transition: transform 0.15s; }
.pp-rot.down { transform: rotate(180deg); }
.pv-menu-item.disabled { opacity: 0.55; cursor: default; }
.pv-menu-item.disabled:hover { background: none; }

/* Trades on the chart: a tag on each line (position, stop loss, take profit, working orders, the order being set up). */
.pt-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.pt-tag { position: absolute; display: flex; align-items: center; gap: 0; height: 22px; border: 1px solid var(--c); border-radius: 4px;
  background: var(--bg); color: var(--on-bg); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: auto;
  box-shadow: 0 2px 8px var(--shadow-035); overflow: hidden; }
.pt-tag.draggable { cursor: ns-resize; }
.pt-tag.faded { opacity: 0.6; pointer-events: none; border-style: dashed; }
.pt-tag > b { padding: 0 7px; height: 100%; display: flex; align-items: center; background: var(--c); }
.pt-tag .pt-qty { padding: 0 7px; height: 100%; display: flex; align-items: center; background: var(--c); font-weight: 600; }
.pt-tag > b + .pt-qty { background: none; border-left: 1px solid var(--c); }
.pt-pnl { padding: 0 7px; color: var(--text); }
.pt-pnl.up { color: var(--up); }
.pt-pnl.down { color: var(--down); }
.pt-btn, .pt-add { height: 100%; border: 0; border-left: 1px solid var(--border); background: none; color: var(--c-b2b5be); font: inherit; cursor: pointer; padding: 0 7px; }
.pt-btn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pt-add { font-size: 11px; font-weight: 600; cursor: ns-resize; }
.pt-add[data-k="tp"] { color: var(--up); }
.pt-add[data-k="sl"] { color: var(--down); }
.pt-add:hover { background: var(--c-2a2f3f); }

/* Analytics: the performance chart. */
.pp-analytics { display: flex; flex-direction: column; gap: 8px; }
.pp-perf { padding: 10px 12px; border-radius: 8px; background: var(--c-181c27); }
.pp-perf-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.pp-perf-head span { color: var(--muted); font-size: 11.5px; }
.pp-perf-svg { width: 100%; height: 180px; display: block; }
.pp-perf-zero { stroke: var(--c-363a45); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.pp-perf-dd { stroke: rgba(242, 54, 69, 0.35); stroke-width: 6; vector-effect: non-scaling-stroke; }
.pp-perf-line { fill: none; stroke-width: 2; }
.pp-perf-line.up { stroke: var(--up); }
.pp-perf-line.down { stroke: var(--down); }
/* Maximized: the trading tab takes the chart's place (TradingView's Maximize panel). */

/* ---- motion (owner, 2026-11-12): things open and close smoothly, ease-in-out, never instantly ---- */
@keyframes pv-in { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pv-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(0.97); } }
@keyframes pv-nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.pv-card, .pv-dialog { animation: pv-in 0.2s ease-in-out; }
.pv-menu, .pv-pop, .pv-tpl-menu { animation: pv-in 0.16s ease-in-out; }
.pv-dialog-back, .pv-confirm-back { animation: pv-fade 0.2s ease-in-out; }
.pv-card.pv-closing, .pv-confirm-back.pv-closing { animation: pv-out 0.14s ease-in-out forwards; pointer-events: none; }
.pv-card.pv-nudge { animation: pv-nudge 0.4s ease-in-out; }
/* The trading tab slides open, closed and maximized (its height moves; the chart gives way). */
.pv-paper { overflow: hidden; transition: height 0.25s ease-in-out; }
.pv-paper.resizing { transition: none; }
.pv-paper.open.max { flex: none; }
.pv-center:has(> .pv-paper.open.max) > .chart { flex: 1; min-height: 0; overflow: hidden; }
/* Confirmation dialogs (Discard? Reset? Delete?) over everything. */
.pv-confirm-back { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(8, 10, 16, 0.5); }
.pv-confirm { position: relative; width: min(380px, calc(100vw - 32px)); }
.pv-confirm .pv-card-head { cursor: default; }
.pv-confirm-text { margin: 0; color: var(--c-b2b5be); line-height: 1.45; }
/* Cards fit small windows: never wider than the window, the body scrolls, the footer buttons wrap. */
.pv-card { max-width: calc(100vw - 24px); }
.pv-paper-card .pv-card-body { max-height: calc(100vh - 190px); overflow-y: auto; }
.pv-card-foot { flex-wrap: wrap; row-gap: 8px; }
.pv-card-foot .pv-btn { white-space: nowrap; }
/* The order being set up in the ticket (not sent yet): dashed tags that can be dragged, joined by dashed links. */
.pt-tag.pending { border-style: dashed; cursor: ns-resize; box-shadow: 0 2px 10px var(--shadow-045); }
.pt-tag.pending > b { opacity: 0.92; }
.pt-link { position: absolute; width: 0; border-left: 1px dashed; pointer-events: none; opacity: 0.85; }
/* The sound chooser (Settings > Trading): the dropdown, play / stop, and the volume. */
.pv-soundpick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pv-soundpick .sp-pick { min-width: 160px; }
.sp-vol { display: inline-flex; align-items: center; gap: 6px; }
.sp-vol input { width: 90px; }
.sp-vol b { font-weight: 500; color: var(--muted); min-width: 34px; }

/* Ticket: the ⇄ switch inside the price and size fields, the ⋯ menu, the compact button. */
.tk-swap { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 22px; border: 0; border-radius: 5px;
  background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.tk-swap:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.tk-swap ~ .tk-hint { right: 32px; }
.tk-field:has(.tk-swap) .pv-field { padding-right: 120px; }
.tk-compact.on { color: var(--accent); }
.tk-menu { position: fixed; z-index: 140; min-width: 250px; }  /* above the ticket (130) */
.tk-menu .pv-menu-check { display: inline-block; width: 16px; color: var(--accent); }

/* Trading tab: export button, performance switches, run-ups, hover tooltip. */
.pp-tabs .pv-card-gap { flex: 1; }
.pp-tabs .pp-export { width: 30px; height: 28px; padding: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); display: inline-flex; align-items: center; justify-content: center; }
.pp-tabs .pp-export:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pp-perf { position: relative; }
.pp-perf-head { align-items: center; flex-wrap: wrap; }
.pp-perf-head .pv-card-gap { flex: 1; }
.pp-perf-head .pv-check { font-size: 12px; color: var(--c-b2b5be); }
.pp-perf-ru { stroke: var(--c-089981-035); stroke-width: 6; vector-effect: non-scaling-stroke; }
.pp-perf-cursor { stroke: var(--c-6a6d78); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.pp-perf-tip { display: none; position: absolute; top: 40px; z-index: 2; flex-direction: column; gap: 2px; width: 208px; padding: 7px 9px;
  border-radius: 6px; background: var(--border); box-shadow: 0 4px 14px var(--shadow-04); font-size: 12px; pointer-events: none; }
.pp-perf-tip span { color: var(--muted); }

/* Paper toasts: the newest two, the rest folded behind Show more (n). */
.pp-toast.folded { display: none; }
.pp-toast-more { order: 99; align-self: flex-start; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--border);
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.pp-toast-more:hover { background: var(--c-363a45); color: var(--on-bg); }

/* The hover tooltip on a stop loss / take profit tag. */
.pt-tip { position: absolute; z-index: 5; padding: 5px 9px; border-radius: 5px; background: var(--border); color: var(--text); font-size: 12px;
  white-space: nowrap; box-shadow: 0 3px 10px var(--shadow-04); pointer-events: none; font-variant-numeric: tabular-nums; }

/* Multiple exit levels in the ticket. */
.tk-levels { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tk-levels:empty { display: none; }
.tk-lv-first { color: var(--muted); font-size: 11.5px; }
.tk-lv-first.bad { color: var(--down); }
.tk-level { display: grid; grid-template-columns: 38px 1fr 64px 26px; align-items: center; gap: 6px; animation: pv-in .2s ease-in-out; }
.tk-lv-n { color: var(--muted); font-size: 12px; }
.tk-level .tk-field .pv-field { padding-right: 70px; }
.tk-lv-pct { position: relative; }
.tk-lv-pct .pv-field { width: 100%; box-sizing: border-box; padding-right: 20px; text-align: right; }
.tk-lv-pct span { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; pointer-events: none; }
.tk-add-level { margin-top: 6px; padding: 4px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.tk-add-level:hover:not(:disabled) { text-decoration: underline; }
.tk-add-level:disabled { color: var(--muted); cursor: default; opacity: 0.6; }
.tk-exit.off .tk-add-level { display: none; }

/* The settings window: dragged by its title bar (after the first drag it stays where it was put). */
.pv-dialog-head { cursor: move; user-select: none; }
.pv-dialog-head .pv-card-x { cursor: pointer; }
.pv-dialog.moved { position: absolute; margin: 0; animation: none; }

/* The properties bar for several drawings: how many are selected. */
.pv-tray-count { min-width: 22px; height: 22px; margin: 0 4px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }

/* Favourites bar: drag a tool to reorder. */
.favbar .tool.small { touch-action: none; }
.favbar.reordering .tool.small { cursor: var(--pv-grabbing); }
/* the dragged tool follows the pointer over the others (as the right sidebar's buttons) */
.favbar .tool.small.fav-dragging { position: relative; z-index: 2; background: var(--c-2a2f3f); color: var(--on-bg);
  box-shadow: 0 4px 12px var(--shadow-03); transition: none; }

/* PlotVibe's tooltip (ui/tooltip.ts), for everything with a title: pops up with a little bounce, arrow at the element. */
.pv-tip { position: fixed; z-index: 400; display: flex; align-items: center; gap: 8px; max-width: 320px; padding: 7px 11px;
  border-radius: 8px; background: var(--c-2b3042); color: var(--c-e6e8ee); font-size: 12.5px; font-weight: 500; line-height: 1.35;
  border: 1px solid var(--c-3a4054); box-shadow: 0 10px 24px var(--shadow-045), 0 2px 6px var(--shadow-03); pointer-events: none;
  opacity: 0; transition: opacity 0.16s ease-out, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pv-tip span { white-space: normal; }
.pv-tip.top { transform: translateY(10px) scale(0.92); transform-origin: var(--arrow, 50%) 100%; }
.pv-tip.bottom { transform: translateY(-10px) scale(0.92); transform-origin: var(--arrow, 50%) 0; }
.pv-tip.right { transform: translateX(-10px) scale(0.92); transform-origin: 0 var(--arrow, 50%); }
.pv-tip.left { transform: translateX(10px) scale(0.92); transform-origin: 100% var(--arrow, 50%); }
.pv-tip.show { opacity: 1; transform: none; }
.pv-tip::before { content: ""; position: absolute; width: 8px; height: 8px; background: var(--c-2b3042); transform: rotate(45deg); }
.pv-tip.top::before { bottom: -5px; left: var(--arrow, 50%); margin-left: -4px; border-right: 1px solid var(--c-3a4054); border-bottom: 1px solid var(--c-3a4054); }
.pv-tip.bottom::before { top: -5px; left: var(--arrow, 50%); margin-left: -4px; border-left: 1px solid var(--c-3a4054); border-top: 1px solid var(--c-3a4054); }
.pv-tip.right::before { left: -5px; top: var(--arrow, 50%); margin-top: -4px; border-left: 1px solid var(--c-3a4054); border-bottom: 1px solid var(--c-3a4054); }
.pv-tip.left::before { right: -5px; top: var(--arrow, 50%); margin-top: -4px; border-right: 1px solid var(--c-3a4054); border-top: 1px solid var(--c-3a4054); }
.pv-tip kbd { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--veil-008); border: 1px solid var(--c-454b60);
  color: var(--c-b2b5be); font-family: inherit; font-size: 11px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .pv-tip, .pv-tip.top, .pv-tip.bottom, .pv-tip.left, .pv-tip.right { transform: none; transition: opacity 0.1s; } }

/* Several charts (chart/layout.ts): the grid, the dividers, the active chart's outline, maximise, the layout menu. */
.pv-layout { overflow: hidden; }
.pv-grid { position: absolute; inset: 0; display: flex; }
.pv-split { display: flex; min-width: 0; min-height: 0; }
.pv-split.row { flex-direction: row; }
.pv-split.col { flex-direction: column; }
.pv-cell { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.pv-chart { position: absolute; inset: 0; }
.pv-divider { flex: 0 0 4px; background: var(--border); position: relative; z-index: 2; transition: background 0.12s; }
.pv-divider.row { cursor: col-resize; }
.pv-divider.col { cursor: row-resize; }
.pv-divider:hover, .pv-divider.dragging { background: var(--accent); }
.pv-divider::after { content: ""; position: absolute; inset: -3px; }  /* easier to grab */
.pv-layout.multi .pv-cell.active::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--accent); pointer-events: none; z-index: 30; }
.pv-layout-btn svg rect { stroke-width: 1.4; }
.pv-layout-btn.open { background: var(--border); color: var(--on-bg); }
.pv-layout-menu { position: fixed; z-index: 140; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; max-height: none; }
.pv-layout-row { display: flex; align-items: center; gap: 4px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.pv-layout-row:last-child { border-bottom: 0; }
.pv-layout-n { width: 18px; color: var(--muted); font-size: 12px; text-align: right; margin-right: 6px; }
.pv-layout-opt { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--c-b2b5be); cursor: pointer; }
.pv-layout-opt:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-layout-opt.on { background: var(--accent-grad); color: #fff; }

/* Sync in layout (the layout menu's switches) and each chart's sync group mark. */
.pv-layout-head { padding: 8px 2px 4px; color: var(--muted); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.pv-layout-sync { display: flex; align-items: center; gap: 6px; padding: 5px 2px; cursor: pointer; font-size: 13px; color: var(--text); }
.pv-layout-sync input { display: none; }
.pv-layout-sync-name { flex: none; }
.pv-layout-info { color: var(--muted); font-size: 12px; cursor: help; margin-right: auto; }
.pv-layout-sync .pv-switch { flex: none; }
.pv-sync-mark { position: absolute; top: 9px; left: calc(var(--pane-left, 0px) + 8px); z-index: 6; width: 20px; height: 20px; display: none; place-items: center;
  border: 0; border-radius: 5px; background: var(--c-2a2e39-085); color: var(--c-6a6d78); cursor: pointer; padding: 0; }
.pv-sync-mark:hover { background: var(--c-363a45); color: var(--text); }
.pv-sync-mark.grouped { background: var(--c-2a2e39-095); }
.pv-cell.has-mark .pv-sync-mark { display: grid; }
.pv-cell.has-mark .pv-legend { left: calc(var(--pane-left, 0px) + 32px); }
.pv-sync-menu { position: fixed; z-index: 140; min-width: 150px; }
.pv-sync-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; box-sizing: border-box; }
.pv-layout-sync input:checked + .pv-switch { background: var(--accent); }
.pv-layout-sync input:checked + .pv-switch span { transform: translateX(13px); }

/* Another chart's crosshair (Sync in layout: Crosshair). */
.pv-xsync-v { position: absolute; top: 0; width: 0; border-left: 1px dashed var(--c-9598a1); pointer-events: none; z-index: 4; display: none; }
.pv-xsync-h { position: absolute; left: 0; height: 0; border-top: 1px dashed var(--c-9598a1); pointer-events: none; z-index: 4; display: none; }

/* The replay controls, shorter: the date as its calendar icon, short labels; a grip to drag them. */
.replaybar .pv-date { padding: 0 6px; }
.replaybar .pv-date-label { display: none; }
.replaybar .prop-select, .replaybar .pv-select { min-width: 0; }
.replaybar .replay-grip { cursor: var(--pv-grab); }
.replaybar .replay-grip:active { cursor: var(--pv-grabbing); }

/* Maximise / restore at the end of each chart's navigation buttons (with several charts), after a thin divider. */
.nav-btn.nav-max { display: none; margin-left: 9px; }
.pv-layout.multi .nav-btn.nav-max { display: inline-grid; place-items: center; }
.nav-btn.nav-max::before { content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 1px; background: var(--c-2f3546); }
.pv-layout.maxed .nav-btn.nav-max { color: var(--accent); }

/* The header's symbol button and the Symbol search window (ui/symbolSearch.ts). */
.pv-sym-btn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 9px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--c-1a1e2a); color: var(--c-e6e8ee); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pv-sym-btn:hover { background: var(--c-22283a); border-color: var(--c-363c4e); }
.pv-sym-search { color: var(--c-9aa0b0); display: grid; }
.pv-ss-back { position: fixed; inset: 0; z-index: 260; background: rgba(8, 10, 16, 0.45); display: flex; justify-content: center;
  align-items: flex-start; padding-top: 56px; animation: pv-fade 0.16s ease-out; }
.pv-ss { width: min(760px, calc(100vw - 24px)); height: min(640px, calc(100vh - 90px)); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--c-2f3546); border-radius: 12px; box-shadow: 0 20px 50px var(--shadow-055);
  overflow: hidden; animation: pv-in 0.2s ease-in-out; position: relative; }
.pv-ss-back.pv-closing { animation: pv-out 0.14s ease-in forwards; }
.pv-ss-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.pv-ss-icon { color: var(--c-9aa0b0); display: grid; }
.pv-ss-input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--c-e6e8ee); font: inherit; font-size: 16px; }
.pv-ss-input::placeholder { color: var(--c-6a6d78); }
.pv-ss-clear, .pv-ss-x { width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); cursor: pointer; font-size: 16px; }
.pv-ss-clear:hover, .pv-ss-x:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-ss-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pv-ss-chip { height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--c-262b39); color: var(--c-b2b5be); font: inherit;
  font-size: 12.5px; cursor: pointer; }
.pv-ss-chip:hover { color: var(--on-bg); }
.pv-ss-chip.on { background: var(--accent-grad); color: #fff; }
.pv-ss-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.pv-ss-filters[hidden] { display: none; }
.pv-ss-filter { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--c-363c4e);
  border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-ss-filter:hover, .pv-ss-filter.open { background: var(--c-2a2f3f); }
.pv-ss-filter.on { border-color: var(--accent); color: var(--on-bg); }
.pv-ss-caret { color: var(--c-9aa0b0); font-size: 10px; }
.pv-ss-reset { height: 28px; padding: 0 8px; border: 0; background: none; color: var(--c-5b8cff); font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-ss-reset:hover { color: var(--accent-text); }
.pv-ss-menu { position: absolute; z-index: 2; width: 240px; max-height: 320px; overflow-y: auto; padding: 4px 0; background: var(--panel);
  border: 1px solid var(--c-363c4e); border-radius: 8px; box-shadow: 0 10px 30px var(--shadow-05); animation: pv-in 0.12s ease-out; }
.pv-ss-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; border: 0;
  background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pv-ss-opt:hover { background: var(--border); }
.pv-ss-opt.on { color: var(--c-5b8cff); }
.pv-ss-count { color: var(--c-6a6d78); font-size: 11.5px; }
.pv-ss-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.pv-ss-section { padding: 10px 16px 4px; color: var(--c-6a6d78); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.pv-ss-row { display: flex; align-items: center; gap: 12px; padding: 7px 16px; cursor: pointer; }
.pv-ss-row.active { background: rgba(var(--accent-rgb), 0.14); }
.pv-ss-logo { width: 26px; display: grid; place-items: center; flex: none; }
.pv-ss-logo .pv-legend-logo { transform: scale(1.15); }
.pv-ss-badge { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 9.5px;
  font-weight: 700; }
.pv-ss-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.pv-ss-main b { min-width: 92px; color: var(--c-e6e8ee); font-size: 13.5px; }
.pv-ss-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-b2b5be); font-size: 12.5px; }
.pv-ss-tag { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--c-2a2f3f); color: var(--c-9aa0b0); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.03em; }
.pv-ss .hit { color: var(--accent); }
.pv-ss-src { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-ss-srcdot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c-f5c400); color: var(--bg);
  font-size: 10px; font-weight: 800; }
.pv-ss-empty { padding: 28px 16px; color: var(--c-9aa0b0); text-align: center; }
.pv-ss-foot { padding: 8px 14px; border-top: 1px solid var(--border); color: var(--c-6a6d78); font-size: 11.5px; }
@media (max-width: 560px) { .pv-ss-desc { display: none; } .pv-ss-main b { min-width: 0; } }

/* ---- named layouts (layouts/menu.ts): the name, its menu, the starred layouts, the Open layout window ---- */
.pv-lay-names { display: inline-flex; align-items: center; gap: 2px; margin-right: 4px; }
.pv-lay-name { max-width: 180px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--text);
  font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pv-lay-caret { width: 20px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); font-size: 10px; cursor: pointer; }
.pv-lay-name:hover, .pv-lay-caret:hover, .pv-lay-name.open, .pv-lay-caret.open { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-lay-favs { display: inline-flex; gap: 4px; margin-left: 4px; }
.pv-lay-favs:empty { display: none; }
.pv-lay-fav { width: 22px; height: 22px; padding: 0; border: 1px solid var(--c-50566a); border-radius: 50%; background: none; color: var(--text);
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.pv-lay-fav:hover { border-color: var(--c-b2b5be); color: var(--on-bg); }
.pv-lay-fav.on { background: var(--accent-grad); border-color: transparent; color: #fff; }
.pv-lay-menu { position: fixed; z-index: 120; width: 250px; max-height: none; padding: 6px 0; background: var(--panel); border: 1px solid var(--c-2f3546);
  border-radius: 10px; box-shadow: 0 14px 36px var(--shadow-05); animation: pv-in 0.12s ease-out; }
.pv-lay-item { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; background: none;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; }
.pv-lay-hint { color: var(--c-6a6d78); font-size: 11.5px; }
.pv-lay-sep { height: 1px; margin: 6px 0; background: var(--border); }
.pv-lay-head { padding: 4px 14px 2px; color: var(--c-6a6d78); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.pv-lay-row { display: flex; align-items: center; gap: 8px; margin: 1px 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.pv-lay-row:hover { background: var(--border); }
.pv-lay-row.on { background: var(--accent-grad); color: #fff; }
.pv-lay-row.on small { color: rgba(255, 255, 255, 0.78); }
.pv-lay-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-lay-text b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-lay-text small { color: var(--c-8b90a0); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-lay-star, .pv-lay-del { flex: none; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0;
  border-radius: 5px; background: none; color: inherit; opacity: 0.45; cursor: pointer; }
.pv-lay-star.fav { opacity: 1; color: var(--c-f5c400); }
.pv-lay-row.on .pv-lay-star.fav { color: #fff; }
.pv-lay-del { opacity: 0; }
.pv-lay-row:hover .pv-lay-star, .pv-lay-row:hover .pv-lay-del { opacity: 1; }
.pv-lay-star:hover, .pv-lay-del:hover { background: var(--c-7f7f7f-025); }
.pv-lay-win { position: relative; width: min(460px, calc(100vw - 32px)); height: min(560px, calc(100vh - 80px)); display: flex; flex-direction: column; }
.pv-lay-win .pv-card-head { cursor: default; }
.pv-lay-search { padding: 4px 16px 8px; }
.pv-lay-search input { width: 100%; box-sizing: border-box; }
.pv-lay-cols { display: flex; justify-content: space-between; align-items: center; padding: 4px 22px; color: var(--c-6a6d78); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; }
.pv-lay-sort { border: 0; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 11px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.pv-lay-sort:hover { color: var(--on-bg); }
.pv-lay-list { flex: 1; overflow-y: auto; padding: 2px 10px 12px; }
.pv-lay-empty { padding: 24px; color: var(--c-8b90a0); text-align: center; }
.pv-prompt-label { display: block; margin-bottom: 6px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-prompt-input { width: 100%; box-sizing: border-box; }
@media (max-width: 760px) { .pv-lay-name { max-width: 96px; } .pv-lay-favs { display: none; } }
.pv-lay-switch { width: calc(100% - 12px); margin: 0 6px; padding: 7px 8px; font-size: 13px; }
.pv-lay-item:disabled { opacity: 0.45; cursor: default; }
.pv-lay-item:disabled:hover { background: none; }
.pv-lay-name.unsaved::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%;
  background: #f5a623; vertical-align: middle; }
.pv-notice { position: fixed; left: 50%; bottom: 48px; z-index: 400; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 8px; background: var(--c-2a2f3f); border: 1px solid var(--c-3a4052); color: var(--c-e6e8ee); font-size: 13px;
  box-shadow: 0 10px 30px var(--shadow-045); animation: pv-in 0.16s ease-out; cursor: pointer; }
.pv-notice.bad { border-color: #f23645; }
/* Settings > Downloads (chart/settingsWindow.ts), as Chrome's: one card, a row per choice */
.pv-dl-card { border: 1px solid var(--c-343a4d); border-radius: 10px; background: var(--c-1b1f2b); overflow: hidden; }
.pv-dl-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; }
.pv-dl-row + .pv-dl-row { border-top: 1px solid var(--c-2c3243); }
.pv-dl-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.pv-dl-text small { color: var(--c-9aa0b0); font-size: 12px; overflow-wrap: anywhere; }
.pv-dl-change { flex: none; padding: 7px 18px; border: 1px solid var(--accent); border-radius: 999px; background: none; color: var(--c-8fb1ff);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pv-dl-change:hover { background: rgba(var(--accent-rgb), 0.14); }
.pv-dl-reset { flex: none; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 12px; cursor: pointer; }
.pv-dl-reset:hover { background: var(--c-262b39); color: var(--text); }
.pv-dl-switch { flex: none; display: inline-flex; cursor: pointer; }
.pv-dl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pv-dl-switch input:checked + .pv-switch { background: var(--accent); }
.pv-dl-switch input:checked + .pv-switch span { transform: translateX(13px); }
.pv-dl-switch input:focus-visible + .pv-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-notice.with-action { display: flex; align-items: center; gap: 14px; padding-right: 8px; }
.pv-notice-text { min-width: 0; overflow-wrap: anywhere; }
.pv-notice-btn { flex: none; padding: 5px 12px; border: 1px solid var(--c-4a5168); border-radius: 6px; background: none; color: var(--c-8fb1ff);
  font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pv-notice-btn:hover { background: var(--c-343a4d); color: var(--c-b5ccff); }
.pv-notice.pv-closing { animation: pv-out 0.2s ease-in forwards; }

/* The order ticket docked to the right of the chart (paper/ticket.ts: ⋯ > Dock to right) */
.pv-side.pv-ticket-dock { flex: none; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--panel, var(--panel)); }
.pv-ticket.docked { position: static; width: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
  flex: 1; background: transparent; }
.pv-ticket.docked .pv-card-head { cursor: default; }
.tk-rr { display: flex; justify-content: space-between; margin: 6px 0 2px; padding: 7px 10px; border-radius: 6px; background: var(--c-262b39);
  color: var(--c-9aa0b0); font-size: 12px; }
.tk-rr b { color: var(--c-e6e8ee); font-weight: 600; }
.tk-extra-box { margin-top: 6px; }
/* The price row: its label above the box (as TradingView), so the price and its "Ask + n" hint both fit. */
.tk-price-row { grid-template-columns: 1fr; gap: 3px; }
.tk-price-row label { font-size: 12px; }

/* ---- the watchlist (watchlist/panel.ts) ---- */
.pv-side.pv-wl.open { width: 300px; flex-direction: column; }
.pv-wl-head { display: flex; align-items: center; gap: 2px; padding: 8px 8px 6px 10px; }
.pv-wl-name { display: inline-flex; align-items: center; gap: 6px; max-width: 190px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px;
  background: none; color: var(--c-e6e8ee); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.pv-wl-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-wl-name:hover { background: var(--c-2a2f3f); }
.pv-wl-caret { color: var(--c-9aa0b0); font-size: 10px; }
.pv-wl-ic { width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--c-b2b5be); font: inherit; font-size: 17px; cursor: pointer; }
.pv-wl-ic:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-wl-cols, .pv-wl-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--wl-cols, 3), minmax(52px, auto)); column-gap: 10px;
  align-items: center; }
.pv-wl-cols { padding: 4px 12px 6px; color: var(--c-6a6d78); font-size: 11px; border-bottom: 1px solid var(--border); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-wl-body { flex: 1; overflow-y: auto; padding: 4px 0 8px; }
.pv-wl-row { position: relative; margin: 0 4px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.pv-wl-row:hover { background: var(--border); }
.pv-wl-row.on { border-color: var(--c-b2b5be); }
.pv-wl-row.stale .num { opacity: 0.6; }
.pv-wl-sym { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pv-wl-sym b { font-weight: 600; color: var(--c-e6e8ee); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-wl-logo { width: 20px; flex: none; display: grid; place-items: center; }
.pv-wl-logo .pv-ss-badge { width: 18px; height: 18px; font-size: 8px; }
.pv-wl-logo .pv-legend-logo { transform: scale(0.9); }
.pv-wl-row .up { color: var(--c-089981); } .pv-wl-row .down { color: #f23645; }
.pv-wl-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; padding: 0; border: 0;
  border-radius: 4px; background: var(--c-363c4e); color: var(--text); font-size: 14px; line-height: 1; cursor: pointer; display: none; }
.pv-wl-row:hover .pv-wl-x, .pv-wl-sec:hover .pv-wl-x { display: block; }
.pv-wl-x:hover { background: #f23645; color: #fff; }
.pv-wl-sec { position: relative; display: flex; align-items: center; gap: 6px; margin: 6px 4px 2px; padding: 4px 8px; border-radius: 6px;
  color: var(--c-8b90a0); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; cursor: pointer; user-select: none; }
.pv-wl-sec:hover { background: var(--c-262b39); color: var(--text); }
.pv-wl-fold { font-size: 9px; transition: transform 0.12s; }
.pv-wl-sec.folded .pv-wl-fold { transform: rotate(-90deg); }
.pv-wl-input { flex: 1; min-width: 0; height: 20px; padding: 0 6px; border: 1px solid var(--accent); border-radius: 4px; background: var(--bg);
  color: var(--on-bg); font: inherit; font-size: 11px; letter-spacing: 0.04em; outline: none; }
.pv-wl-row.dragging, .pv-wl-sec.dragging { opacity: 0.4; }
.drop-above { box-shadow: inset 0 2px 0 var(--accent); } .drop-below { box-shadow: inset 0 -2px 0 var(--accent); }
.pv-wl-empty { padding: 24px 16px; color: var(--c-8b90a0); text-align: center; line-height: 1.5; }
.pv-wl-menu { position: fixed; z-index: 120; width: 230px; max-height: none; padding: 6px 0; background: var(--panel); border: 1px solid var(--c-2f3546);
  border-radius: 10px; box-shadow: 0 14px 36px var(--shadow-05); }
.pv-wl-count { color: var(--c-8b90a0); font-size: 12px; margin-right: 6px; }
.pv-ss-add { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--c-b2b5be); font-size: 17px; }
.pv-ss-row:hover .pv-ss-add { background: var(--c-363c4e); }
.pv-ss-add.on { color: var(--c-5b8cff); font-size: 14px; }

/* watchlist stage 2: flags, groups, details, the width grip */
.pv-side.pv-wl.open { position: relative; }
.pv-wl-grip { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 2; }
.pv-wl-grip:hover { background: rgba(var(--accent-rgb), 0.35); }
.pv-wl-flag { position: absolute; left: -4px; top: 3px; bottom: 3px; width: 6px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; cursor: pointer; }
.pv-wl-row:hover .pv-wl-flag { background: var(--c-50566a); }
.pv-wl-flag.on, .pv-wl-row:hover .pv-wl-flag.on { background: var(--flag); }
.pv-wl-flags { display: flex; flex-wrap: wrap; gap: 6px; width: auto; padding: 8px; }
.pv-wl-swatch { width: 20px; height: 20px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.pv-wl-swatch.on { border-color: #fff; }
.pv-wl-swatch.none { background: var(--c-363c4e); color: var(--text); font-size: 12px; line-height: 1; }
.pv-wl-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; vertical-align: middle; }
.pv-wl-gsec { cursor: default; }
.pv-wl-detail { flex: none; border-top: 1px solid var(--border); padding: 4px 12px 10px; font-size: 12px; }
.pv-wl-detail[hidden] { display: none; }
.pv-wl-dhead { width: 100%; padding: 6px 0; border: 0; background: none; color: var(--c-8b90a0); font: inherit; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-align: left; text-transform: uppercase; cursor: pointer; }
.pv-wl-dhead:hover { color: var(--text); }
.pv-wl-dnote { color: var(--c-8b90a0); padding: 2px 0 4px; }
.pv-wl-dtop { display: flex; align-items: center; gap: 8px; }
.pv-wl-dtop b { font-size: 14px; color: var(--c-e6e8ee); }
.pv-wl-dname { margin: 2px 0 8px; color: var(--c-9aa0b0); }
.pv-wl-dprice { display: flex; align-items: baseline; gap: 10px; }
.pv-wl-dprice b { font-size: 22px; color: var(--c-e6e8ee); font-variant-numeric: tabular-nums; }
.pv-wl-dprice .up { color: var(--c-089981); } .pv-wl-dprice .down { color: #f23645; }
.pv-wl-dsub { margin: 2px 0 10px; color: var(--c-6a6d78); font-size: 11px; }
.pv-wl-rbar { position: relative; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #f23645, var(--muted), var(--c-089981)); }
.pv-wl-rbar i { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; background: var(--on-bg); border-radius: 1px; }
.pv-wl-rnums { display: flex; justify-content: space-between; margin-top: 4px; color: var(--c-8b90a0); font-size: 11px; font-variant-numeric: tabular-nums; }
.pv-wl-drow { display: flex; justify-content: space-between; margin-top: 8px; color: var(--c-9aa0b0); }
.pv-wl-drow b { color: var(--text); font-weight: 500; }
/* The flag slot: wide enough to hit, in its own space at the row's left (owner, 2026-11-13: it was too thin). */
.pv-wl-row { padding-left: 22px; }
.pv-wl-flag { left: 3px; top: 4px; bottom: 4px; width: 13px; border-radius: 4px; }
.pv-wl-row:hover .pv-wl-flag { background: var(--c-363c4e); }
.pv-wl-flag:hover, .pv-wl-row:hover .pv-wl-flag:hover { background: var(--c-50566a); box-shadow: 0 0 0 1px var(--c-8b90a0); }
.pv-wl-flag.on:hover { background: var(--flag); box-shadow: 0 0 0 1px #fff; }
/* Download for offline (watchlist/offline.ts) */
.pv-off { width: min(440px, calc(100vw - 32px)); }
.pv-off-label { margin: 12px 0 6px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-off-tfs { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-off-tfs.off { pointer-events: none; opacity: 0.5; }
.pv-off-tf { min-width: 40px; height: 28px; padding: 0 10px; border: 1px solid var(--c-363c4e); border-radius: 6px; background: none; color: var(--c-b2b5be);
  font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-off-tf:hover { border-color: var(--c-50566a); color: var(--on-bg); }
.pv-off-tf.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pv-off-note { margin: 12px 0 0; color: var(--c-8b90a0); font-size: 12px; line-height: 1.5; }
.pv-off-progress { margin-top: 14px; }
.pv-off-progress[hidden] { display: none; }
.pv-off-bar { height: 6px; border-radius: 3px; background: var(--c-2a2f3f); overflow: hidden; }
.pv-off-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.pv-off-line { margin-top: 8px; color: var(--text); font-size: 12.5px; }
.pv-off-fails { margin-top: 4px; color: #f23645; font-size: 12px; }

/* watchlist stage 4: selection, dragging, menus, compact view, full width */
.pv-wl-row.sel, .pv-wl-sec.sel { background: var(--c-1e3a8a); }
.pv-wl-row.sel:hover { background: #47228a; }
.pv-wl-row, .pv-wl-sec { touch-action: none; }
.pv-wl.dragging, .pv-wl.dragging * { cursor: var(--pv-grabbing) !important; user-select: none; }
.pv-wl-ghost { position: fixed; z-index: 400; pointer-events: none; opacity: 0.92; background: var(--c-2a2f3f); border-radius: 6px;
  box-shadow: 0 8px 24px var(--shadow-05); }
.pv-wl-ghost .pv-wl-x, .pv-wl-ghost .pv-wl-flag { display: none; }
.pv-wl-swatches { display: flex; gap: 7px; padding: 4px 14px 8px; }
.pv-wl-check { display: inline-block; width: 16px; color: var(--c-5b8cff); }
.pv-wl.compact .pv-wl-cols { display: none; }
.pv-side.pv-wl.full { position: absolute; top: 0; bottom: 0; right: 44px; left: 0; width: auto; z-index: 30; }
.pv-wl.full .pv-wl-grip { display: none; }
.workspace { position: relative; }
.pv-wl-ren, .pv-wl-cp { opacity: 0; }
.pv-lay-row:hover .pv-wl-ren, .pv-lay-row:hover .pv-wl-cp { opacity: 1; }
.pv-wl-back { opacity: 1; font-size: 16px; }

/* "Add to watchlist" side panel (scrolls; a search box with many lists) */
.pv-wl-menu { overflow: visible; }
.pv-wl-sub { position: absolute; width: 240px; padding: 6px 0; background: var(--panel); border: 1px solid var(--c-2f3546); border-radius: 10px;
  box-shadow: 0 14px 36px var(--shadow-05); }
.pv-wl-subsearch { display: block; width: calc(100% - 16px); margin: 2px 8px 6px; box-sizing: border-box; }
.pv-wl-sublist { max-height: 264px; overflow-y: auto; }
.pv-wl-box { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 8px; border: 1px solid var(--c-50566a);
  border-radius: 3px; font-size: 10px; vertical-align: -2px; }
.pv-wl-box.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- tabs and the New tab page (shell/shell.ts, shell/home.ts) ---- */
body.pv-shell { display: flex; flex-direction: column; overflow: hidden; }
.pv-tabbar { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 34px; padding: 0 8px; background: var(--c-0e1118);
  border-bottom: 1px solid var(--border); }
.pv-tabstrip { display: flex; align-items: flex-end; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pv-tab { position: relative; display: flex; align-items: center; gap: 6px; flex: 0 1 220px; min-width: 90px; height: 28px;
  padding: 0 6px 0 12px; border-radius: 8px 8px 0 0; background: var(--c-161a24); color: var(--c-9aa0b0); font-size: 12px; cursor: default;
  user-select: none; }
.pv-tab:hover { background: var(--c-1c212d); color: var(--text); }
.pv-tab.on { background: var(--bg); color: var(--c-e6e8ee); }
.pv-tab.drop-before::before { content: ""; position: absolute; left: -2px; top: 4px; bottom: 4px; width: 2px; background: var(--accent); }
.pv-tabtext { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tabx { flex: none; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; color: inherit;
  font-size: 14px; line-height: 1; cursor: pointer; opacity: 0.7; }
.pv-tabx:hover { background: var(--c-363c4e); opacity: 1; }
.pv-tabplus { flex: none; width: 26px; height: 26px; margin: 0 0 1px 4px; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0);
  font-size: 18px; cursor: pointer; }
.pv-tabplus:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-tabplus:disabled { opacity: 0.3; cursor: default; }
.pv-frames { position: relative; flex: 1; min-height: 0; }
.pv-frame, .pv-home { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; }
.pv-frame.on, .pv-home.on { visibility: visible; }
.pv-home { overflow-y: auto; padding: 28px 40px; box-sizing: border-box; background: var(--bg); }
.pv-home-head { display: flex; align-items: center; gap: 12px; max-width: 1100px; margin-bottom: 20px; }
.pv-home-head h1 { flex: 1; margin: 0; font-size: 22px; color: var(--c-e6e8ee); }
.pv-home-search { width: 260px; }
.pv-home-sort { height: 30px; padding: 0 10px; border: 1px solid var(--c-363c4e); border-radius: 6px; background: none; color: var(--c-b2b5be); font: inherit;
  font-size: 12px; cursor: pointer; }
.pv-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-width: 1100px; }
.pv-home-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 86px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--c-161a24); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pv-home-card:hover { border-color: var(--c-50566a); background: var(--c-1c212d); }
.pv-home-card b { font-size: 14px; color: var(--c-e6e8ee); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 22px; }
.pv-home-card small { color: var(--c-8b90a0); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-home-new { align-items: center; justify-content: center; font-size: 14px; color: var(--c-e6e8ee); }
.pv-home-top { display: flex; align-items: center; gap: 8px; }
.pv-home-star { width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--c-50566a); font-size: 14px; cursor: pointer; }
.pv-home-star.on { color: var(--c-f5c400); }
.pv-home-letter { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--c-50566a); border-radius: 50%;
  font-size: 10px; font-weight: 600; }
.pv-home-more { position: absolute; right: 8px; bottom: 10px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 5px;
  background: none; color: var(--c-9aa0b0); font-size: 16px; cursor: pointer; }
.pv-home-more:hover { background: var(--c-363c4e); color: var(--on-bg); }

/* the tab row as the window's title bar (desktop): window buttons, the empty part drags the window */
.pv-tabbar { align-items: stretch; padding-right: 0; }
.pv-tabstrip, .pv-tabplus { align-self: flex-end; }
.pv-tabgap { flex: 1; min-width: 40px; }
.pv-winctl { display: flex; align-self: stretch; }
.pv-winbtn { width: 46px; border: 0; background: none; color: var(--c-b2b5be); display: grid; place-items: center; cursor: default; }
.pv-winbtn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-winbtn.close:hover { background: #e81123; color: #fff; }

/* ---- backtesting sessions (backtest/window.ts, backtest/session.ts) ---- */
.pv-replay-caret { padding: 0 6px; margin-left: -6px; font-size: 10px; opacity: 0.8; }
.pv-bt-menu { width: 280px; }
.pv-bt-menu .pv-lay-item span { display: flex; flex-direction: column; gap: 2px; }
.pv-bt-menu small { color: var(--c-8b90a0); font-size: 11px; }
.pv-bt-back { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% 0%, rgba(var(--accent-rgb), 0.10), transparent 60%), rgba(6, 8, 13, 0.62);
  backdrop-filter: blur(3px); animation: pv-fade 0.18s ease-out; }
.pv-bt-back.pv-closing { animation: pv-out 0.16s ease-in forwards; }
.pv-bt { --acc: var(--accent); width: min(1040px, 100%); height: min(720px, calc(100vh - 48px)); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--c-1b2030) 0%, var(--c-161a25) 100%); border: 1px solid var(--c-2c3244); border-radius: 16px;
  box-shadow: 0 30px 80px var(--shadow-06), inset 0 1px 0 var(--veil-004); overflow: hidden; animation: pv-in 0.22s ease-out; }
.pv-bt-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 14px; }
.pv-bt-logo { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #fff;
  background: var(--accent-grad); box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.35); }
.pv-bt-titles { flex: 1; min-width: 0; }
.pv-bt-titles h2 { margin: 0; font-size: 19px; color: var(--c-eef0f5); letter-spacing: 0.01em; }
.pv-bt-titles p { margin: 3px 0 0; color: var(--c-8b90a0); font-size: 12.5px; }
.pv-bt-primary { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  background: var(--accent-grad); box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.35); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; }
.pv-bt-primary:hover { filter: brightness(1.08); }
.pv-bt-primary:disabled { opacity: 0.5; cursor: default; }
.pv-bt .pv-card-x { font-size: 20px; }
.pv-bt-backbtn { width: 34px; height: 34px; border: 1px solid var(--c-363c4e); border-radius: 9px; background: none; color: var(--text); font-size: 16px; cursor: pointer; }
.pv-bt-backbtn:hover { background: var(--c-262b39); }
.pv-bt-tools { display: flex; align-items: center; gap: 12px; padding: 0 22px 14px; border-bottom: 1px solid var(--c-262b38); }
.pv-bt-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--c-12151e); border: 1px solid var(--c-262b38); }
.pv-bt-seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 12.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pv-bt-seg button span { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--c-262b39); color: var(--c-b2b5be); font-size: 11px; line-height: 17px; }
.pv-bt-seg button.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-bt-seg button.on span { background: var(--accent); color: #fff; }
.pv-bt-search { flex: 1; max-width: 320px; margin-left: auto; }
.pv-bt-grid { flex: 1; overflow-y: auto; padding: 18px 22px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px; align-content: start; }
.pv-bt-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 12px; border-radius: 14px;
  background: linear-gradient(180deg, var(--c-1f2433), var(--c-1a1e2b)); border: 1px solid var(--c-2a3042); overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.pv-bt-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--acc); }
.pv-bt-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 22%, transparent), transparent 70%); pointer-events: none; }
.pv-bt-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--acc) 55%, var(--c-2a3042)); box-shadow: 0 14px 30px var(--shadow-035); }
.pv-bt-card.ended { opacity: 0.88; }
.pv-bt-card-top { display: flex; align-items: center; justify-content: space-between; }
.pv-bt-sym { display: inline-flex; align-items: center; gap: 7px; }
.pv-bt-sym b { color: var(--c-e6e8ee); font-size: 13px; }
.pv-bt-sym i { font-style: normal; padding: 1px 6px; border-radius: 5px; background: var(--c-2a2f3f); color: var(--c-b2b5be); font-size: 10.5px; }
.pv-bt-status { padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.pv-bt-status.active { color: var(--c-3ddc97); background: rgba(61, 220, 151, 0.12); }
.pv-bt-status.active::before { content: "\25CF  "; }
.pv-bt-status.ended { color: var(--c-9aa0b0); background: var(--c-2a2f3f); }
.pv-bt-status.live { color: #fff; background: var(--acc); }
.pv-bt-card h3 { margin: 4px 0 0; font-size: 16px; color: var(--c-eef0f5); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bt-strategy { margin: -4px 0 0; color: var(--c-b2b5be); font-size: 12.5px; }
.pv-bt-strategy.none { color: var(--c-6a6d78); font-style: italic; }
.pv-bt-period { display: flex; align-items: center; gap: 7px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-bt-period em { margin-left: auto; font-style: normal; color: var(--c-6a6d78); }
.pv-bt-progress { height: 6px; border-radius: 4px; background: var(--c-12151e); overflow: hidden; }
.pv-bt-progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 70%, var(--c-000000)), var(--acc));
  box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 60%, transparent); }
.pv-bt-at { color: var(--c-6a6d78); font-size: 11px; margin-top: -3px; }
.pv-bt-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 10px 0 4px; border-top: 1px solid var(--c-262b38); }
.pv-bt-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-bt-stats span { color: var(--c-6a6d78); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.pv-bt-stats b { color: var(--c-e6e8ee); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bt-stats b.up { color: var(--c-3ddc97); } .pv-bt-stats b.down { color: var(--c-ff5c7a); }
.pv-bt-stats small { color: var(--c-8b90a0); font-size: 11px; }
.pv-bt-card footer { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.pv-bt-go { flex: 1; height: 32px; border: 1px solid color-mix(in srgb, var(--acc) 60%, transparent); border-radius: 9px; font: inherit; font-size: 13px;
  font-weight: 600; color: var(--on-bg); background: color-mix(in srgb, var(--acc) 22%, transparent); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pv-bt-go:hover { background: var(--acc); }
.pv-bt-more { width: 32px; height: 32px; border: 1px solid var(--c-363c4e); border-radius: 9px; background: none; color: var(--c-b2b5be); font-size: 16px; cursor: pointer; }
.pv-bt-more:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-bt-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 20px; color: var(--c-9aa0b0); text-align: center; }
.pv-bt-empty b { color: var(--c-e6e8ee); font-size: 16px; }
.pv-bt-empty p { max-width: 420px; margin: 0 0 8px; line-height: 1.5; font-size: 13px; }
/* the form */
.pv-bt-form { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; padding: 6px 22px 18px; }
.pv-bt-form section { display: flex; flex-direction: column; gap: 12px; }
.pv-bt-form h4 { margin: 8px 0 -2px; color: var(--c-8b90a0); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.pv-bt-form label { display: flex; flex-direction: column; gap: 5px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-bt-form .pv-field { width: 100%; box-sizing: border-box; }
.pv-bt-form textarea { resize: vertical; min-height: 96px; font: inherit; line-height: 1.45; }
.pv-bt-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.pv-bt-row label { flex: 1; min-width: 110px; }
.pv-bt-dates > span { padding-bottom: 8px; color: var(--c-6a6d78); }
.pv-bt-form .pv-bt-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; flex: none; min-width: 0; }
.pv-bt-symbol { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; border: 1px solid var(--c-363c4e); border-radius: 9px;
  background: var(--c-12151e); color: var(--c-e6e8ee); font: inherit; cursor: pointer; }
.pv-bt-symbol b { font-size: 14px; }
.pv-bt-symbol span { color: var(--c-8b90a0); font-size: 11.5px; }
.pv-bt-symbol:hover { border-color: var(--c-50566a); }
.pv-bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-bt-chips button { height: 30px; padding: 0 12px; border: 1px solid var(--c-363c4e); border-radius: 8px; background: none; color: var(--c-b2b5be); font: inherit;
  font-size: 12.5px; cursor: pointer; }
.pv-bt-chips button:hover { border-color: var(--c-50566a); color: var(--on-bg); }
.pv-bt-chips button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 20%, transparent); color: var(--on-bg); }
.pv-bt-colors { display: flex; gap: 8px; margin-top: 4px; }
.pv-bt-colors button { width: 22px; height: 22px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--shadow-03); }
.pv-bt-colors button.on { border-color: #fff; transform: scale(1.12); }
.pv-bt-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--c-262b38); background: rgba(10, 12, 18, 0.35); }
.pv-bt-summary { flex: 1; color: var(--c-9aa0b0); font-size: 12.5px; }
.pv-bt-summary b { color: var(--c-e6e8ee); }
.pv-bt-error { color: var(--c-ff5c7a); font-size: 12.5px; }
.pv-bt-cancel { height: 34px; padding: 0 14px; border: 1px solid var(--c-363c4e); border-radius: 9px; background: none; color: var(--text); font: inherit; cursor: pointer; }
.pv-bt-cancel:hover { background: var(--c-262b39); }
.pv-bt-foot .pv-bt-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 85%, #fff), var(--acc)); }
@media (max-width: 760px) { .pv-bt-form { grid-template-columns: 1fr; } .pv-bt-tools { flex-wrap: wrap; } .pv-bt-search { max-width: none; } }
/* the session bar over the chart */
.pv-sess { --acc: var(--accent); position: absolute; left: 50%; bottom: 46px; z-index: 34; transform: translateX(-50%); display: flex; align-items: center;
  gap: 12px; max-width: calc(100% - 24px); padding: 7px 8px 7px 14px; border-radius: 14px; background: var(--c-161a25-094);
  border: 1px solid color-mix(in srgb, var(--acc) 45%, var(--c-2c3244)); box-shadow: 0 12px 30px var(--shadow-045); backdrop-filter: blur(6px); }
.pv-sess-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent); }
.pv-sess-name { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.pv-sess-name b { color: var(--c-eef0f5); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-sess-name small { color: var(--c-8b90a0); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-sess-track { width: 120px; height: 5px; flex: none; border-radius: 3px; background: var(--c-0f121a); overflow: hidden; }
.pv-sess-track i { display: block; height: 100%; width: 0; background: var(--acc); transition: width 0.3s ease; }
.pv-sess-when { color: var(--c-b2b5be); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-sess-end, .pv-sess-leave { height: 30px; padding: 0 12px; border-radius: 9px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.pv-sess-end { border: 0; color: #fff; background: var(--acc); font-weight: 600; }
.pv-sess-leave { border: 1px solid var(--c-363c4e); background: none; color: var(--text); }
.pv-sess-leave:hover { background: var(--c-262b39); }
.pv-sess.at-end .pv-sess-end { animation: pv-pulse 1.4s ease-in-out infinite; }
.pv-sess.ended .pv-sess-dot { background: var(--c-6a6d78); box-shadow: none; }
@keyframes pv-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 60%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 760px) { .pv-sess-track, .pv-sess-when { display: none; } }
/* the summary when a session ends */
.pv-sess-sum { --acc: var(--accent); width: min(420px, calc(100vw - 32px)); padding-top: 18px; }
.pv-sess-sum-top { display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.pv-sess-sum-top div { display: flex; flex-direction: column; }
.pv-sess-sum-top b { color: var(--c-eef0f5); font-size: 15px; }
.pv-sess-sum-top small { color: var(--c-8b90a0); font-size: 12px; }
.pv-sess-sum-net { padding: 18px 18px 6px; font-size: 28px; font-weight: 700; color: var(--c-e6e8ee); font-variant-numeric: tabular-nums; }
.pv-sess-sum-net span { margin-left: 10px; font-size: 14px; font-weight: 600; opacity: 0.85; }
.pv-sess-sum-net.up { color: var(--c-3ddc97); } .pv-sess-sum-net.down { color: var(--c-ff5c7a); }
.pv-sess-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 18px 4px; }
.pv-sess-sum-grid div { padding: 10px 12px; border-radius: 10px; background: var(--c-12151e); display: flex; flex-direction: column; gap: 3px; }
.pv-sess-sum-grid span { color: var(--c-6a6d78); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.pv-sess-sum-grid b { color: var(--c-e6e8ee); font-size: 15px; font-variant-numeric: tabular-nums; }
.pv-sess-sum-note { margin: 10px 18px 4px; color: var(--c-8b90a0); font-size: 12px; line-height: 1.45; }
.pv-menu.pv-bt-over { z-index: 260; }   /* a card menu over the Backtesting window */

/* ---- the session bar: dragged by its grip, small (a chip) or hidden; placed by backtest/session.ts ---- */
.pv-sess { left: 0; top: 0; bottom: auto; transform: none; gap: 10px; padding-left: 6px; touch-action: none; }
.pv-sess.dragging { cursor: var(--pv-grabbing); opacity: 0.92; user-select: none; }
.pv-sess-grip { display: grid; place-items: center; width: 16px; height: 30px; color: var(--c-5d6273); cursor: var(--pv-grab); border-radius: 6px; flex: none; }
.pv-sess-grip:hover { color: var(--c-b2b5be); background: var(--c-232837); }
.pv-sess-pct { display: none; color: var(--c-b2b5be); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-sess-min { width: 26px; height: 26px; flex: none; border: 0; border-radius: 7px; background: none; color: var(--c-8b90a0); font: inherit; font-size: 16px;
  line-height: 1; cursor: pointer; }
.pv-sess-min:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-sess.mini { gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; cursor: var(--pv-grab); }
.pv-sess.mini .pv-sess-grip, .pv-sess.mini .pv-sess-name small, .pv-sess.mini .pv-sess-when, .pv-sess.mini .pv-sess-end,
.pv-sess.mini .pv-sess-leave, .pv-sess.mini .pv-sess-min { display: none; }
.pv-sess.mini .pv-sess-name b { font-size: 12px; max-width: 140px; }
.pv-sess.mini .pv-sess-track { width: 44px; height: 4px; }
.pv-sess.mini .pv-sess-pct { display: inline; }
.pv-sess.mini:hover { border-color: var(--acc); }

/* ---- the Backtesting button and panel in the right-hand bar ---- */
.pv-rightbar-sep { width: 22px; height: 1px; margin: 2px 0; background: var(--border); flex: none; }
.pv-rightbar-btn.pv-bt-rail { color: var(--accent-text); }
.pv-rightbar-btn.pv-bt-rail svg { width: 21px; height: 21px; }
.pv-rightbar-btn.pv-bt-rail.pv-has { position: relative; color: var(--on-bg); }
.pv-rightbar-btn.pv-bt-rail.pv-has::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-3ddc97); box-shadow: 0 0 0 2px var(--panel); }
.pv-side.pv-bt-side.open { width: 310px; flex-direction: column; }
.pv-bts-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 10px 12px; }
.pv-bts-head b { flex: 1; color: var(--c-eef0f5); font-size: 14px; }
.pv-bts-logo { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #fff;
  background: var(--accent-grad); }
.pv-bts-logo svg { width: 16px; height: 16px; }
.pv-bts-new { height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; }
.pv-bts-new:hover { filter: brightness(1.1); }
.pv-bts-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border: 0; border-radius: 8px; background: none;
  color: var(--c-8b90a0); font: inherit; font-size: 15px; cursor: pointer; }
.pv-bts-icon:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-bts-now:empty { display: none; }
.pv-bts-hero { --acc: var(--accent); margin: 0 10px 10px; padding: 12px; border-radius: 12px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 16%, var(--c-161a25)), var(--c-141824) 60%);
  border: 1px solid color-mix(in srgb, var(--acc) 40%, var(--c-262b38)); }
.pv-bts-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pv-bts-live { display: inline-flex; align-items: center; gap: 6px; color: var(--c-3ddc97); font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; }
.pv-bts-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pv-pulse 1.6s ease-in-out infinite; }
.pv-bts-hero.ended .pv-bts-live { color: var(--c-8b90a0); }
.pv-bts-hero.ended .pv-bts-live::before { animation: none; }
.pv-bts-tf { color: var(--c-9aa0b0); font-size: 11.5px; }
.pv-bts-hero h3 { margin: 8px 0 1px; color: var(--c-eef0f5); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bts-strat { margin: 0; color: var(--c-8b90a0); font-size: 12px; }
.pv-bts-prog { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pv-bts-prog .pv-bt-progress { flex: 1; margin: 0; }
.pv-bts-pct { color: var(--text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pv-bts-when { margin-top: 4px; color: var(--c-8b90a0); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pv-bts-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.pv-bts-stats div { padding: 7px 9px; border-radius: 9px; background: rgba(10, 12, 18, 0.45); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pv-bts-stats span { color: var(--c-6a6d78); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.pv-bts-stats b { color: var(--c-e6e8ee); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bts-stats b.up { color: var(--c-3ddc97); }
.pv-bts-stats b.down { color: var(--c-ff5c7a); }
.pv-bts-stats small { color: var(--c-8b90a0); font-size: 11px; }
.pv-bts-acts { display: flex; gap: 6px; margin-top: 10px; }
.pv-bts-acts button { flex: 1; height: 32px; border-radius: 9px; font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-bts-end { border: 0; background: var(--acc); color: #fff; font-weight: 600; }
.pv-bts-end:hover { filter: brightness(1.1); }
.pv-bts-leave { border: 1px solid var(--c-363c4e); background: none; color: var(--text); }
.pv-bts-leave:hover { background: var(--c-262b39); }
.pv-bts-barrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--c-8b90a0); font-size: 11.5px; }
.pv-bts-mode { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: rgba(10, 12, 18, 0.5); }
.pv-bts-mode button { height: 22px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 11.5px; cursor: pointer; }
.pv-bts-mode button.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-bts-tools { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 8px; }
.pv-bts-seg { display: flex; }
.pv-bts-seg button { flex: 1; padding: 0 6px; font-size: 12px; justify-content: center; }
.pv-bts-search { height: 30px; font-size: 12.5px; }
.pv-bts-list { flex: 1; overflow-y: auto; padding: 0 6px 10px; }
.pv-bts-row { --acc: var(--accent); display: flex; align-items: center; gap: 8px; padding: 9px 6px 9px 12px; margin-bottom: 2px; border-radius: 10px;
  position: relative; cursor: pointer; }
.pv-bts-row::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--acc); }
.pv-bts-row:hover { background: var(--c-1f2330); }
.pv-bts-row.here { background: color-mix(in srgb, var(--acc) 12%, transparent); cursor: default; }
.pv-bts-row.ended::before { opacity: 0.4; }
.pv-bts-row-main { flex: 1; min-width: 0; }
.pv-bts-row-top { display: flex; align-items: center; gap: 6px; }
.pv-bts-row-top b { color: var(--c-e6e8ee); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bts-tag { padding: 0 6px; border-radius: 6px; background: #3ddc9722; color: var(--c-3ddc97); font-size: 10.5px; font-weight: 600; line-height: 17px; }
.pv-bts-row-sub { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--c-8b90a0); font-size: 11.5px; white-space: nowrap; }
.pv-bts-row-sub > :first-child { transform: scale(0.8); flex: none; }
.pv-bts-row-sub em { margin-left: auto; font-style: normal; color: var(--c-6a6d78); overflow: hidden; text-overflow: ellipsis; }
.pv-bts-row .pv-bt-progress { height: 3px; margin: 6px 0 0; }
.pv-bts-row-net { display: flex; flex-direction: column; align-items: flex-end; min-width: 48px; color: var(--c-b2b5be); font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; }
.pv-bts-row-net.up { color: var(--c-3ddc97); }
.pv-bts-row-net.down { color: var(--c-ff5c7a); }
.pv-bts-row-net small { color: var(--c-6a6d78); font-size: 10.5px; font-weight: 400; }
.pv-bts-more { width: 24px; height: 28px; opacity: 0; }
.pv-bts-row:hover .pv-bts-more { opacity: 1; }
.pv-bts-empty { padding: 26px 18px; text-align: center; color: var(--c-8b90a0); font-size: 12.5px; line-height: 1.5; }
.pv-bts-empty b { display: block; margin: 10px 0 4px; color: var(--c-e6e8ee); font-size: 14px; }
.pv-bts-empty p { margin: 0 0 14px; }
.pv-bts-seg button { white-space: nowrap; font-size: 11.5px; gap: 5px; }

/* ---- the New session form uses PlotVibe's dropdowns, date pickers and checkbox (ui/controls.ts, .pv-check) ---- */
.pv-bt-form .pv-bt-lab { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 110px; color: var(--c-9aa0b0); font-size: 12px; }
.pv-bt-form .pv-select, .pv-bt-form .pv-date { width: 100%; height: 36px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.pv-bt-form .pv-check.pv-bt-check { gap: 8px; padding-bottom: 10px; color: var(--text); font-size: 12.5px; }
.pv-date:disabled { opacity: 0.45; cursor: default; }
.pv-date:disabled:hover { border-color: var(--c-2c3140); background: var(--c-171b26); }
/* the session ⋮ menu: icons, a compact width */
.pv-ctx.pv-bt-ctx { min-width: 180px; padding: 4px; }
.pv-bt-ctx .pv-menu-item { gap: 10px; border-radius: 7px; }
.pv-bt-ctx .pv-lay-sep { margin: 4px 6px; }

/* ---- the trading tab's other view (a backtest's results) and its review strip ---- */
.pp-xtab { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none;
  color: var(--c-9aa0b0); font: inherit; font-weight: 600; cursor: pointer; }
.pp-xtab[hidden] { display: none; }
.pp-xtab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-3ddc97); }
.pp-xtab:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pp-xtab.on, .pp-title.off:hover { color: var(--on-bg); }
.pp-xtab.on { background: rgba(var(--accent-rgb), 0.2); }
.pp-title.off { color: var(--c-9aa0b0); }
.pp-title.off .pp-chev { display: none; }
.pv-paper.pp-x .pp-bar, .pv-paper.pp-x .pp-tabs, .pv-paper.pp-x .pp-sub { display: none; }
.pp-strip { display: flex; min-width: 0; }
.pp-strip:empty, .pv-paper.open .pp-strip { display: none; }

.btr-strip { display: flex; align-items: center; gap: 2px; height: 26px; padding: 0 2px; border-radius: 8px; background: var(--c-1b2030);
  border: 1px solid var(--c-2f3546); min-width: 0; }
.btr-step { width: 26px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--c-b2b5be); font: inherit; font-size: 11px; cursor: pointer; flex: none; }
.btr-step:hover:not(:disabled) { background: var(--c-2a2f3f); color: var(--on-bg); }
.btr-step:disabled { opacity: 0.3; cursor: default; }
.btr-strip-x { font-size: 15px; }
.btr-strip-main { display: flex; align-items: center; gap: 10px; height: 22px; padding: 0 8px; border: 0; border-radius: 6px; background: none;
  color: var(--c-9aa0b0); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; min-width: 0; overflow: hidden; }
.btr-strip-main:hover { background: var(--c-2a2f3f); }
.btr-strip-main b { color: var(--c-eef0f5); }
.btr-strip-main .up { color: var(--c-3ddc97); font-weight: 600; }
.btr-strip-main .down { color: var(--c-ff5c7a); font-weight: 600; }

/* ---- a closed trade in focus on the chart ---- */
.pt-focus { position: absolute; inset: 0; pointer-events: none; }
.pt-focus i { position: absolute; display: block; }
.pt-focus-risk { background: rgba(242, 54, 69, 0.13); border-top: 1px dashed rgba(242, 54, 69, 0.7); border-bottom: 1px dashed rgba(242, 54, 69, 0.7); }
.pt-focus-res { background: var(--c-089981-02); border: 1px solid var(--c-089981-085); border-radius: 2px; }
.pt-focus-res.down { background: rgba(242, 54, 69, 0.2); border-color: rgba(242, 54, 69, 0.85); }
.pt-focus-lab { position: absolute; padding: 1px 6px; border-radius: 4px; background: var(--c-131722-092); border: 1px solid var(--c-363c4e);
  color: var(--c-e6e8ee); font-size: 11px; line-height: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- the results view ---- */
.btr { --acc: var(--accent); display: flex; flex-direction: column; gap: 10px; padding-top: 8px; min-height: 100%; }
.btr-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btr-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); flex: none; }
.btr-head b { color: var(--c-eef0f5); font-size: 13.5px; }
.btr-head small { color: var(--c-8b90a0); font-size: 12px; }
.btr-parts { display: inline-flex; margin-left: auto; padding: 3px; gap: 2px; border-radius: 10px; background: var(--c-12151e); border: 1px solid var(--c-262b38); }
.btr-parts button { height: 26px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.btr-parts button span { padding: 0 6px; border-radius: 8px; background: var(--c-262b39); font-size: 11px; line-height: 16px; }
.btr-parts button.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.btr-empty { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 30px 16px; color: var(--c-8b90a0); text-align: center; font-size: 12.5px; }
.btr-empty b { color: var(--c-e6e8ee); font-size: 14px; }
.btr-empty span { max-width: 460px; line-height: 1.5; }
.btr-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.btr-tile { padding: 10px 12px; border-radius: 10px; background: var(--c-161a25); border: 1px solid var(--c-232838); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.btr-tile span { color: var(--c-8b90a0); font-size: 11px; }
.btr-tile b { color: var(--c-eef0f5); font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btr-tile b i { font-style: normal; font-size: 11px; color: var(--c-8b90a0); font-weight: 500; }
.btr-tile b.up { color: var(--c-3ddc97); }
.btr-tile b.down { color: var(--c-ff5c7a); }
.btr-tile small { color: var(--c-6a6d78); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btr-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 1px; margin-top: 8px; border-radius: 10px; overflow: hidden; background: var(--c-232838);
  border: 1px solid var(--c-232838); }
.btr-grid div { padding: 7px 10px; background: var(--panel); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.btr-grid span { color: var(--c-6a6d78); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btr-grid b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btr-grid b.up { color: var(--c-3ddc97); }
.btr-grid b.down { color: var(--c-ff5c7a); }
.btr-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-top: 10px; }
.btr section h4 { margin: 0; color: var(--text); font-size: 12.5px; }
.btr section p { margin: 1px 0 6px; color: var(--c-6a6d78); font-size: 11px; }
.btr-charts section, .btr-rows, .btr-cols { padding: 10px 12px; border-radius: 10px; background: var(--c-161a25); border: 1px solid var(--c-232838); min-width: 0; }
.btr-bd { display: flex; flex-direction: column; gap: 10px; }
.btr-bd-top { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
.btr-bd-mid { display: grid; grid-template-columns: 0.8fr 1.6fr 1fr; gap: 10px; }
.btr-row { display: grid; grid-template-columns: 120px 1fr 90px 130px; align-items: center; gap: 10px; height: 26px; font-size: 12px; }
.btr-row-l { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btr-row-bar { position: relative; height: 10px; }
.btr-row-bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--c-363c4e); }
.btr-row-bar i { position: absolute; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--c-089981); }
.btr-row-bar i.down { background: #f23645; border-radius: 4px 0 0 4px; }
.btr-row b { text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.btr-row b.up { color: var(--c-3ddc97); }
.btr-row b.down { color: var(--c-ff5c7a); }
.btr-row small { color: var(--c-6a6d78); font-size: 11px; white-space: nowrap; }
.btr-row.muted { opacity: 0.45; }
.btr-trades { padding-top: 2px; }
.btr-table tbody tr { cursor: pointer; }
.btr-table td.up { color: var(--c-3ddc97); }
.btr-table td.down { color: var(--c-ff5c7a); }
.btr-table tr.sel td { background: color-mix(in srgb, var(--acc) 18%, transparent); }
.btr-hint { margin: 8px 2px; color: var(--c-6a6d78); font-size: 11.5px; }
@media (max-width: 1100px) { .btr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .btr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btr-charts, .btr-bd-top, .btr-bd-mid { grid-template-columns: 1fr; } }

/* ---- the small charts (backtest/charts.ts) ---- */
.btc { position: relative; }
.btc-plot { position: relative; height: 150px; margin-left: 44px; }
.btc-plot.pickable { cursor: pointer; }
.btc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.btc-grid { stroke: var(--c-232838); stroke-width: 1; vector-effect: non-scaling-stroke; }
.btc-stroke { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.btc-svg.up .btc-stroke { stroke: var(--c-3ddc97); } .btc-svg.up .btc-area { fill: rgba(61, 220, 151, 0.1); }
.btc-svg.down .btc-stroke { stroke: var(--c-ff5c7a); } .btc-svg.down .btc-area { fill: rgba(255, 92, 122, 0.1); }
.btc-svg.accent .btc-stroke { stroke: var(--c-5b8cff); } .btc-svg.accent .btc-area { fill: rgba(var(--accent-rgb), 0.1); }
.btc-ylab { position: absolute; right: calc(100% + 8px); transform: translateY(-50%); color: var(--c-6a6d78); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btc-cursor { display: none; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--c-4a5168); pointer-events: none; }
.btc-dot { display: none; position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
.btc-dot.up { background: var(--c-3ddc97); } .btc-dot.down { background: var(--c-ff5c7a); } .btc-dot.accent { background: var(--c-5b8cff); }
.btc-tip { display: none; position: absolute; z-index: 5; padding: 6px 9px; border-radius: 8px; background: var(--c-1e222d-098); border: 1px solid var(--c-2f3546);
  box-shadow: 0 8px 20px var(--shadow-04); pointer-events: none; font-size: 11.5px; white-space: nowrap; }
.btc-tip b { display: block; color: var(--c-eef0f5); font-variant-numeric: tabular-nums; }
.btc-tip span { display: block; color: var(--c-8b90a0); }
.btc-colplot { position: relative; display: flex; gap: 2px; }
.btc-zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--c-363c4e); }
.btc-slot { position: relative; flex: 1; display: flex; justify-content: center; min-width: 0; }
.btc-slot.hot { background: var(--veil-003); border-radius: 4px; }
.btc-col { position: absolute; width: 70%; }
.btc-col.pos { border-radius: 4px 4px 0 0; }
.btc-col.neg { border-radius: 0 0 4px 4px; }
.btc-col.up { background: var(--c-089981); } .btc-col.down { background: #f23645; } .btc-col.flat { background: var(--c-4a5168); }
.btc-slot.muted .btc-col { opacity: 0.5; }
.btc-collabs { display: flex; gap: 2px; margin-top: 6px; }
.btc-collabs span { flex: 1; min-width: 0; text-align: center; color: var(--c-8b90a0); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.btc-collabs span.muted { color: var(--c-4a5168); }

/* ---- the Backtesting panel's link to the full results ---- */
.pv-bts-full { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 30px; margin-top: 10px; padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--acc) 45%, var(--c-2c3244)); border-radius: 9px; background: color-mix(in srgb, var(--acc) 10%, transparent);
  color: var(--c-e6e8ee); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pv-bts-full:hover { background: color-mix(in srgb, var(--acc) 20%, transparent); }
.pv-sess-full { margin-right: auto; }
/* the results fit the room the tab has (side panels open or not), not the window's width */
.btr-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.btr-grid { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.btr-charts { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.btr-bd-top { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.btr-bd-mid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.btr-grid { background: none; border: 0; gap: 6px; }
.btr-grid div { border-radius: 8px; background: var(--c-161a25); border: 1px solid var(--c-232838); }
.btc-collabs span { overflow: visible; }
.btr-head { position: sticky; top: 0; z-index: 3; margin: -8px -10px 0; padding: 8px 10px 6px; background: var(--panel); }
.pp-title, .pp-xtab { white-space: nowrap; flex: none; }
.pv-paper:not(.open):has(.pp-strip:not(:empty)) .pp-mode { display: none; }

/* ---- a trade's journal beside the results' trade list (backtest/journal.ts) ---- */
.btr-trades.with-pane { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.btr-tablebox { min-width: 0; overflow-x: auto; }
.btr-marks { display: flex; gap: 4px; align-items: center; color: var(--accent-text); }
.btr-m { display: inline-grid; place-items: center; font-style: normal; }
.btr-m.note { color: var(--c-f0b54a); font-size: 12px; }
.btj { position: sticky; top: 44px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--c-161a25);
  border: 1px solid var(--c-232838); }
.btj h5 { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--c-8b90a0); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.btj-head { display: flex; align-items: center; gap: 6px; }
.btj-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.btj-title b { color: var(--c-eef0f5); font-size: 14px; }
.btj-title b span { color: var(--c-6a6d78); font-weight: 400; font-size: 12px; }
.btj-title small { color: var(--c-9aa0b0); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btj-title .up { color: var(--c-3ddc97); } .btj-title .down { color: var(--c-ff5c7a); }
.btj-nav { width: 26px; height: 26px; border: 0; border-radius: 7px; background: var(--c-1f2433); color: var(--text); font-size: 16px; cursor: pointer; }
.btj-nav:hover:not(:disabled) { background: var(--c-2a2f3f); }
.btj-nav:disabled { opacity: 0.3; cursor: default; }
.btj-show { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--c-363c4e); border-radius: 7px; background: none;
  color: var(--text); font: inherit; font-size: 11.5px; cursor: pointer; }
.btj-show:hover { background: var(--c-262b39); }
.btj-snaps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btj-snap { display: flex; flex-direction: column; border-radius: 9px; overflow: hidden; background: var(--c-10131b); border: 1px solid var(--c-262b38); min-width: 0; }
.btj-thumb { position: relative; display: block; padding: 0; border: 0; background: var(--c-0c0f16); aspect-ratio: 16 / 9; cursor: pointer; overflow: hidden; }
.btj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.btj-thumb:hover img { transform: scale(1.04); }
.btj-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: 0; background: rgba(8, 10, 16, 0.35); transition: opacity 0.15s; }
.btj-play svg { width: 26px; height: 26px; padding: 8px; border-radius: 50%; background: rgba(var(--accent-rgb), 0.9); box-sizing: content-box; }
.btj-thumb:hover .btj-play { opacity: 1; }
.btj-snap-foot { display: grid; grid-template-columns: 1fr auto; padding: 5px 4px 6px 8px; align-items: center; }
.btj-snap-foot b { color: var(--text); font-size: 12px; }
.btj-snap-foot small { grid-column: 1; color: var(--c-6a6d78); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btj-x { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--c-6a6d78); font-size: 15px; cursor: pointer; }
.btj-x:hover { background: var(--c-2a2f3f); color: var(--c-ff5c7a); }
.btj-snap.empty { border-style: dashed; }
.btj-empty-in { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; text-align: center; color: var(--c-6a6d78); aspect-ratio: auto; }
.btj-empty-in b { color: var(--c-b2b5be); font-size: 12px; }
.btj-empty-in small { font-size: 10.5px; line-height: 1.35; }
/* (one line at any drawer width: an icon and a short label, the card's width at most; owner 2026-11-15) */
.btj-take { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; height: 26px; padding: 0 10px;
  border: 1px solid var(--c-363c4e); border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 11.5px; white-space: nowrap; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s; }
.btj-take svg { width: 14px; height: 14px; flex: none; }
.btj-take span { overflow: hidden; text-overflow: ellipsis; }
.btj-take:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btj-take:active { transform: translateY(1px); }
.btj-setup { height: 32px; font-size: 12.5px; }
.btj-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.btj-chips button { height: 24px; padding: 0 9px; border: 1px solid var(--c-2c3244); border-radius: 12px; background: none; color: var(--c-9aa0b0); font: inherit; font-size: 11.5px; cursor: pointer; }
.btj-chips button:hover { color: var(--on-bg); border-color: var(--c-3d4456); }
.btj-chips button.on { background: rgba(255, 92, 122, 0.14); border-color: rgba(255, 92, 122, 0.55); color: var(--c-ffb3c0); }
.btj-chips .btj-add { border-style: dashed; }
.btj-addin { height: 24px; width: 140px; font-size: 11.5px; }
.btj-notes { resize: vertical; min-height: 80px; font: inherit; font-size: 12.5px; line-height: 1.45; }
.btj-saved { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--c-6a6d78); }
.btj-saved.ok { color: var(--c-3ddc97); } .btj-saved.bad { color: var(--c-ff5c7a); }
@media (max-width: 1100px) { .btr-trades.with-pane { grid-template-columns: 1fr; } .btj { position: static; } }

/* ---- the session bar's camera, its menu, the flash and a Before's curtain ---- */
.pv-sess-cam { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--c-363c4e); border-radius: 9px; background: none;
  color: var(--text); cursor: pointer; }
.pv-sess-cam:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-sess.mini .pv-sess-cam { display: none; }
.pv-bt-ctx .pv-ctx-label { display: flex; flex-direction: column; }
.pv-shot-menu { min-width: 260px; }
.pv-shot-menu .pv-ctx-label { display: flex; flex-direction: column; gap: 1px; }
.pv-shot-menu .pv-ctx-label small { color: var(--c-6a6d78); font-size: 11px; }
.toolbar-btn.active { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-bt-ctx .pv-ctx-label small { color: var(--c-6a6d78); font-size: 11px; }
.pv-snapflash { position: absolute; inset: 0; z-index: 40; background: #fff; pointer-events: none; animation: pv-snapflash 0.45s ease-out forwards; }
@keyframes pv-snapflash { from { opacity: 0.55; } to { opacity: 0; } }
.pv-snapcurtain { position: absolute; top: 0; z-index: 3; pointer-events: none; }
/* the starting candle picked on the chart (replay pick mode) */
.replay-pick-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 8px; background: var(--c-1e222d-095);
  border: 1px solid var(--c-2f3546); color: var(--text); font-size: 12px; white-space: nowrap; pointer-events: none; }
.pv-bt-pick { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--c-2c3140); border-radius: 9px; background: var(--c-171b26);
  color: var(--text); cursor: pointer; align-self: flex-end; }
.pv-bt-pick:hover { border-color: var(--accent); color: var(--on-bg); }
.pv-bt-candle { margin-top: -4px; color: var(--accent-text); font-size: 11.5px; }
.pv-bt-candle:empty { display: none; }

/* ---- comparing sessions (backtest/compare.ts) and exporting ---- */
.pv-bt-cmp { height: 32px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 9px; background: rgba(var(--accent-rgb), 0.14); color: var(--c-dfe6ff);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pv-bt-cmp:hover:not(:disabled) { background: rgba(var(--accent-rgb), 0.26); }
.pv-bt-cmp:disabled { border-color: var(--c-2c3140); background: none; color: var(--c-6a6d78); cursor: default; }
.pv-bt-card-top { gap: 8px; }
.pv-bt-card-top .pv-bt-status { margin-left: auto; }
.pv-bt-pickcmp { flex: none; }
.pv-bt-card.picked { box-shadow: 0 0 0 2px var(--accent) inset; }
.pv-bt-compare { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.pv-cmp-body { flex: 1; overflow-y: auto; padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 12px; }
.pv-cmp-card { padding: 12px 14px; border-radius: 12px; background: var(--c-161a25); border: 1px solid var(--c-232838); min-width: 0; }
.pv-cmp-card h4 { margin: 0; color: var(--text); font-size: 13px; }
.pv-cmp-card > p { margin: 2px 0 8px; color: var(--c-6a6d78); font-size: 11.5px; }
.pv-cmp-tablebox { overflow-x: auto; padding: 4px 6px; }
.pv-cmp-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pv-cmp-table th { text-align: left; font-weight: 400; color: var(--c-8b90a0); padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--c-262b38); }
.pv-cmp-table td { padding: 7px 10px; color: var(--text); border-bottom: 1px solid var(--c-1f2330); white-space: nowrap; }
.pv-cmp-table td:first-child { color: var(--c-9aa0b0); }
.pv-cmp-table tbody tr:hover td { background: var(--c-1b2030); }
.pv-cmp-table td.best { color: var(--on-bg); font-weight: 600; background: rgba(61, 220, 151, 0.08); }
.pv-cmp-star { margin-right: 6px; color: var(--c-3ddc97); }
.pv-cmp-table td.up { color: var(--c-3ddc97); } .pv-cmp-table td.down { color: var(--c-ff5c7a); }
.pv-cmp-sess { display: flex; align-items: flex-start; gap: 8px; min-width: 150px; }
.pv-cmp-sess span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pv-cmp-sess b { color: var(--c-eef0f5); font-size: 13px; font-weight: 600; }
.pv-cmp-sess small { color: var(--c-6a6d78); font-size: 11px; white-space: nowrap; }
.pv-cmp-key { width: 12px; height: 3px; margin-top: 8px; border-radius: 2px; flex: none; }
.pv-cmp-own { width: 7px; height: 7px; margin: 5px 0 0 auto; border-radius: 50%; flex: none; opacity: 0.8; }
.pv-cmp-setups td:first-child { color: var(--c-e6e8ee); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pv-cmp-empty { color: var(--c-6a6d78); font-size: 12px; padding: 8px 0; }
.btc-multi .btc-plot { height: 200px; margin-right: 70px; }
.btc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 8px 44px; color: var(--c-b2b5be); font-size: 11.5px; }
.btc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.btc-legend i, .btc-endlab i, .btc-tip span i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; }
.btc-endlab { position: absolute; transform: translate(8px, -50%); display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 11px;
  font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.btc-grid.zero { stroke: var(--c-363c4e); }
.btc-tip span { display: flex; align-items: center; gap: 6px; }
.btr-export { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--c-2c3244); border-radius: 9px; background: none;
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.btr-export:hover { background: var(--c-262b39); }
.pv-cmp-body > * { flex: none; }   /* (the body scrolls; its cards keep their height) */

/* ---- the right-hand panels slide open and shut (ui/sidePanel.ts): 0.3 s, slow at first and fast at the end ---- */
:root { --pv-slide: 0.3s cubic-bezier(0.55, 0.055, 0.675, 0.19); }
.pv-side.pv-slide { display: flex; position: relative; border-left-width: 0; transition: width var(--pv-slide); }
.pv-side.pv-slide.open { border-left-width: 1px; }
.pv-side.pv-slide.resizing { transition: none; }
/* (the content keeps the panel's width while it slides: clipped, never squeezed) */
.pv-side.pv-slide > :not(.pv-side-grip) { min-width: calc(var(--pw, 272px) - 1px); }
.pv-side.pv-wl.full > :not(.pv-side-grip) { min-width: 0; }
.pv-side-grip { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 3; }
.pv-side-grip:hover, .pv-side.resizing .pv-side-grip { background: rgba(var(--accent-rgb), 0.35); }
.pv-side:not(.open) .pv-side-grip, .pv-side.pv-wl.full .pv-side-grip { display: none; }
.pv-paper { transition: height var(--pv-slide); }
.pv-bt-tfmore + .pv-select { height: 30px; min-width: 110px; }
.pv-bt-hint { margin: -4px 0 0; color: var(--c-6a6d78); font-size: 11.5px; }
.pv-bt-form .pv-bt-tfmore + .pv-select { width: auto; height: 32px; font-size: 12.5px; }
.btj-close { width: 26px; height: 26px; flex: none; border: 0; border-radius: 7px; background: none; color: var(--c-8b90a0); font-size: 17px; cursor: pointer; }
.btj-close:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
/* a drawing being dragged keeps its cursor wherever the pointer goes (draw/layer.ts) */
html.pv-dragging, html.pv-dragging * { cursor: var(--pv-drag-cursor, default) !important; }
.btr-strip-note { color: var(--c-6a6d78); font-size: 11px; }
/* a draggable trade line (stop loss, take profit, working order) can be grabbed along its length (paper/chartTrade.ts) */
.pt-hit { position: absolute; height: 8px; pointer-events: auto; cursor: ns-resize; }
/* the floating order ticket always fits the window: its body scrolls when the window is short (its send button stays
   reachable) */
.pv-ticket:not(.docked) { display: flex; flex-direction: column; max-height: calc(100vh - 16px); }
.pv-ticket:not(.docked) .tk-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 4px; }
.pv-ticket .tk-body > * { flex-shrink: 0; }   /* (its body scrolls: sections keep their height, a folding one slides) */
/* Backtesting panel: the running session is a page of its own; ← goes back to the list (owner, 2026-11-15). */
.pv-bts-on-session .pv-bts-tools, .pv-bts-on-session .pv-bts-list { display: none !important; }
.pv-bts-backrow { display: flex; align-items: center; gap: 6px; margin: 0 10px 8px; padding: 4px 6px; border: 0; border-radius: 6px;
  background: none; color: var(--c-8b90a0); font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-bts-backrow:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-bts-backrow span { font-size: 15px; line-height: 1; }
.pv-bts-on-session .pv-bts-now, .pv-bt-side:not(.pv-bts-on-session) .pv-bts-list { animation: pv-bts-in var(--pv-slide); }
@keyframes pv-bts-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
/* A right-hand panel opening over another (ui/sidePanel.ts): beside the right-hand bar, above the one it replaces. */
.pv-side.open.pv-side-over { position: absolute; top: 0; bottom: 0; right: 44px; z-index: 32; box-shadow: -8px 0 24px var(--shadow-035); }
/* Backtesting panel header on a narrow panel or screen: "+ New" stays on one line, the title gives way. */
.pv-bts-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-bts-new { flex: none; white-space: nowrap; }
/* On a small screen a right-hand panel never gets wider than the window leaves it (the right-hand bar and a strip of
   chart stay in view). */
.pv-side.pv-slide.open { max-width: calc(100vw - 90px); }
.pv-side.pv-slide > :not(.pv-side-grip) { min-width: min(calc(var(--pw, 272px) - 1px), calc(100vw - 91px)); }
/* The replay bar shows only its date (empty before a start); at the latest candle the date is marked. */
.replay-when:empty { display: none; }
.replay-when.at-end { color: #f7a600; }
/* Template menus: a saved template's bin shows on hover (the drawing toolbar's list too). */
.pv-tpl-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pv-tpl-row .pv-tpl-name { flex: 1; text-align: left; }
.pv-tpl-del { display: grid; place-items: center; }
.pv-tpl-row:hover .pv-tpl-del, .pv-tpl-row:focus-within .pv-tpl-del { opacity: 1; }
/* PlotVibe's logo at the chart's bottom left (chart/view.ts), like TradingView's own. */
.pv-brand { position: absolute; z-index: 3; display: flex; align-items: center; gap: 3px; pointer-events: none; user-select: none;
  opacity: 0.9; }
.pv-brand[hidden] { display: none; }
.pv-brand img { height: 28px; width: auto; display: block; }
/* the wordmark: Exo 2 bold italic (slanted and geometric like the mark), white into the P's lavender. Its letters are
   as tall as the mark (owner, 2026-11-15): their ink is 0.74 of the font size, the mark's 594 / 650 of its height, so
   34.5px beside the 28px mark, nudged up 1.5px to line up their tops and bottoms (measured in the browser). */
.pv-brand span { font-family: 'Exo 2', var(--pv-font, sans-serif); font-style: italic; font-weight: 700; font-size: 34.5px;
  transform: translateY(-1.5px);
  letter-spacing: 0.01em; line-height: 1; background: linear-gradient(180deg, #ffffff 30%, var(--c-c9b8ff)); -webkit-background-clip: text;
  background-clip: text; color: transparent; padding-right: 2px; }
/* The trade drawer (backtest/results.ts): the selected trade's journal beside the chart, like the watchlist's drawer. */
.pv-side.pv-btj-side.open { flex-direction: column; }
.pv-btj-side > .btj { position: static; flex: 1; min-height: 0; overflow-y: auto; border-radius: 0; border: 0; background: var(--panel); }
.btj-back { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none;
  color: var(--c-b2b5be); font: inherit; font-size: 17px; cursor: pointer; }
.btj-back:hover { background: var(--c-262b39); color: var(--on-bg); }

/* ---- top bar: Indicators and the user's picture (ui/topbar.ts) ---- */
.pv-avatar-btn { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.pv-avatar-btn:hover .pv-avatar, .pv-avatar-btn.active .pv-avatar { box-shadow: 0 0 0 2px var(--accent); }
.pv-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; color: var(--c-c9b8ff);
  background: linear-gradient(160deg, var(--c-3b2f7c), var(--c-1b1f2e)); transition: box-shadow 0.12s; }
.pv-avatar svg { width: 20px; height: 20px; margin-top: 5px; }
.pv-avatar.big { width: 40px; height: 40px; flex: none; }
.pv-avatar.big svg { width: 28px; height: 28px; margin-top: 7px; }
.pv-profile-menu { width: 270px; }
.pv-profile-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--c-2a2f3f); margin-bottom: 4px; }
.pv-profile-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-profile-head b { color: var(--c-eef0f5); font-size: 13.5px; }
.pv-profile-head span { color: var(--c-8b90a0); font-size: 11.5px; line-height: 1.35; }
.pv-ind-menu { width: 300px; padding-bottom: 6px; max-height: none; overflow: visible; }
.pv-ind-head { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px 8px; }
.pv-ind-head b { color: var(--c-eef0f5); font-size: 13.5px; }
.pv-ind-head span { color: var(--c-8b90a0); font-size: 11.5px; line-height: 1.35; }
.pv-ind-menu .pv-menu-item.disabled { opacity: 1; color: var(--c-9aa0b0); }
.pv-ind-soon { margin-left: auto; padding: 1px 7px; border-radius: 9px; background: var(--c-232838); color: var(--c-8b90a0); font-size: 10.5px; }

/* ---- Smart screenshots and their playlists (screenshots/panel.ts): YouTube-style playlists ---- */
.pv-side.pv-ss-side.open { width: 320px; flex-direction: column; }
.pv-ss-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 12px; }
.pv-ss-head b { flex: 1; min-width: 0; color: var(--c-eef0f5); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ss-logo { width: 26px; height: 26px; display: grid; place-items: center; flex: none; border-radius: 8px; color: #fff;
  background: linear-gradient(135deg, #ff4e6a, var(--c-ff8a3d)); }
.pv-ss-logo svg { width: 16px; height: 16px; }
.pv-ss-take { flex: none; height: 28px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pv-ss-take:hover { filter: brightness(1.1); }
.pv-ss-chips { display: flex; gap: 6px; padding: 2px 10px 10px; overflow-x: auto; scrollbar-width: none; }
.pv-ss-chips::-webkit-scrollbar { display: none; }
.pv-ss-chip { flex: none; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 8px;
  background: var(--border); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; max-width: 180px; }
.pv-ss-chip span { overflow: hidden; text-overflow: ellipsis; }
.pv-ss-chip i { font-style: normal; font-size: 11px; color: var(--c-8b90a0); }
.pv-ss-chip:hover { background: var(--c-343947); }
.pv-ss-chip.on { background: var(--accent-grad); color: #fff; }
.pv-ss-chip.on i { color: rgba(255, 255, 255, 0.78); }
.pv-ss-chip-new { background: none; border: 1px dashed var(--c-3a4052); color: var(--c-9aa0b0); }
.pv-ss-chip-new:hover { background: var(--c-1f2330); color: var(--on-bg); }
.pv-ss-plhead:empty { display: none; }
.pv-ss-plhead { margin: 0 10px 10px; padding: 10px; border-radius: 12px; background: linear-gradient(160deg, var(--c-2a2340), var(--c-1b1f2b) 70%); border: 1px solid var(--c-30364a); }
.pv-ss-plcard { display: flex; align-items: center; gap: 10px; }
.pv-ss-plcard img, .pv-ss-plempty { width: 72px; height: 44px; flex: none; border-radius: 7px; object-fit: cover; background: var(--bg); }
.pv-ss-plempty { display: grid; place-items: center; color: var(--c-8b90a0); }
.pv-ss-plinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pv-ss-plinfo b { color: var(--on-bg); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ss-plinfo small { color: var(--c-9aa0b0); font-size: 11.5px; }
.pv-ss-playall { margin-top: 10px; width: 100%; height: 32px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0;
  border-radius: 999px; background: var(--on-bg); color: var(--bg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pv-ss-playall:hover { background: var(--c-e3e6ee); }
.pv-ss-playall:disabled { opacity: 0.4; cursor: default; }
.pv-ss-tools { padding: 0 10px 8px; }
.pv-ss-search { width: 100%; height: 30px; font-size: 12.5px; }
.pv-ss-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 6px 12px; }
.pv-ss-empty { padding: 18px 10px; color: var(--c-8b90a0); font-size: 12.5px; line-height: 1.5; text-align: center; }
.pv-ss-card { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; position: relative; }
.pv-ss-card:hover { background: var(--c-262b39); }
.pv-ss-card.on { background: var(--c-22304f); }
.pv-ss-card.dragging { opacity: 0.4; }
.pv-ss-card.drop { box-shadow: inset 0 2px 0 var(--accent); }
.pv-ss-thumb { width: 116px; height: 66px; flex: none; position: relative; border-radius: 8px; overflow: hidden; background: var(--bg); }
.pv-ss-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-ss-tf { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.78); color: #fff;
  font-size: 10.5px; font-weight: 600; }
.pv-ss-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.35); opacity: 0;
  transition: opacity 0.15s; }
.pv-ss-play svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }
.pv-ss-card:hover .pv-ss-play, .pv-ss-card.on .pv-ss-play { opacity: 1; }
.pv-ss-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pv-ss-meta b { color: var(--c-eef0f5); font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.pv-ss-meta small { color: var(--c-8b90a0); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ss-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none;
  color: var(--c-9aa0b0); font: inherit; font-size: 16px; cursor: pointer; }
.pv-ss-icon:hover { background: var(--c-2f3445); color: var(--on-bg); }
.pv-ss-icon:disabled { opacity: 0.3; cursor: default; background: none; }
.pv-ss-more { opacity: 0; }
.pv-ss-card:hover .pv-ss-more, .pv-ss-more:focus-visible { opacity: 1; }
.pv-ss-menu { min-width: 200px; }
.pv-ss-saveto { position: fixed; z-index: 500; width: 240px; padding: 8px 0; }
.pv-ss-saveto-head { padding: 4px 14px 8px; color: var(--c-eef0f5); font-size: 13px; font-weight: 600; }
.pv-ss-saveto-list { max-height: 240px; overflow-y: auto; }
.pv-ss-saveto-row { display: flex; align-items: center; gap: 8px; padding: 7px 14px; cursor: pointer; }
.pv-ss-saveto-row:hover { background: var(--c-262b39); }
.pv-ss-saveto-row em { font-style: normal; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ss-saveto-none { padding: 4px 14px 8px; color: var(--c-8b90a0); font-size: 12px; }
.pv-ss-saveto-new { width: calc(100% - 16px); margin: 6px 8px 0; height: 32px; border: 0; border-radius: 7px; background: var(--c-262b39); color: var(--text);
  font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; padding: 0 10px; }
.pv-ss-saveto-new:hover { background: var(--c-2f3445); color: var(--on-bg); }
/* the strip over the chart while a screenshot is back on it */
.pv-ss-strip { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 25; display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 32px); padding: 6px 6px 6px 10px; border-radius: 12px; background: var(--c-1e222d-096); border: 1px solid var(--c-363c4e);
  box-shadow: 0 10px 30px var(--shadow-045); color: var(--text); font-size: 12.5px; animation: pv-in 0.16s ease-out; }
.pv-ss-strip-ic { color: var(--c-ff7a59); display: grid; place-items: center; }
.pv-ss-strip-ic svg { width: 18px; height: 18px; }
.pv-ss-strip-main { display: flex; flex-direction: column; min-width: 0; margin-right: 4px; }
.pv-ss-strip-main b { color: var(--on-bg); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.pv-ss-strip-main span { color: var(--c-8b90a0); font-size: 11px; white-space: nowrap; }
.pv-ss-next { flex: none; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pv-ss-next:hover { filter: brightness(1.1); }
.pv-ss-step { display: inline-flex; align-items: center; gap: 2px; }
.pv-ss-step i { font-style: normal; color: var(--c-9aa0b0); font-size: 11.5px; min-width: 38px; text-align: center; }
@media (max-width: 640px) { .pv-ss-strip-main span { display: none; } .pv-ss-next span { display: none; } }
/* icons in the Screenshots panel's chips and Save to… box (owner, 2026-11-16: icons everywhere) */
.pv-ss-chip-new svg { flex: none; }
.pv-ss-saveto-head { display: flex; align-items: center; gap: 8px; }
.pv-ss-saveto-head svg { color: var(--c-9aa0b0); }
.pv-ss-saveto-ic { display: grid; place-items: center; color: var(--c-8b90a0); font-style: normal; }
.pv-ss-saveto-new { display: flex; align-items: center; gap: 8px; }

/* ---- Prop firm challenges in the New session form (backtest/firmPicker.ts) ---- */
.pv-bt-kind { margin-bottom: 12px; }
.pv-bt-kind button svg { flex: none; }
.pv-firms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.pv-firm { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--c-2c3243); border-radius: 10px;
  background: var(--c-171b26); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.pv-firm:hover { border-color: var(--c-3d4560); background: var(--c-1c2130); }
.pv-firm.on { border-color: var(--acc, var(--accent)); background: color-mix(in srgb, var(--acc, var(--accent)) 12%, var(--c-171b26)); color: var(--on-bg); }
.pv-firm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-firm-tag { position: absolute; top: -7px; right: 8px; padding: 0 6px; border-radius: 6px; background: var(--c-3a3f52); color: var(--c-e0e3eb);
  font-style: normal; font-size: 10px; font-weight: 600; line-height: 15px; }
.pv-firm-badge { flex: none; display: grid; place-items: center; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--veil-008); }
.pv-firm-badge img { width: 78%; height: 78%; object-fit: contain; }
.pv-firm-initials { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.pv-firm-progs, .pv-firm-sizes { margin-bottom: 10px; }
.pv-firm-progs button { display: inline-flex; align-items: center; gap: 6px; }
.pv-firm-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.pv-firm-phase { padding: 10px 12px; border-radius: 10px; background: var(--c-171b26); border: 1px solid var(--c-262b38); }
.pv-firm-phase.funded { background: linear-gradient(160deg, var(--c-13261f), var(--c-171b26) 70%); border-color: var(--c-234536); }
.pv-firm-phase-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pv-firm-phase-head b { color: var(--on-bg); font-size: 13px; }
.pv-firm-step { color: var(--c-6b7185); display: grid; }
.pv-firm-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pv-firm-chips span { padding: 2px 7px; border-radius: 6px; background: var(--c-232838); color: var(--c-c9ccd6); font-size: 11.5px; }
.pv-firm-money { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.pv-firm-money .up { color: #26a69a; }
.pv-firm-money .down { color: #ef5350; }
.pv-firm-daily, .pv-firm-note { margin: 4px 0 0; color: var(--c-8b90a0); font-size: 11.5px; line-height: 1.45; }
.pv-firm-note { color: var(--c-b3a37a); }
.pv-firm-source p { display: flex; gap: 7px; align-items: flex-start; margin: 4px 0; color: var(--c-8b90a0); font-size: 11.5px; line-height: 1.5; }
.pv-firm-source svg { flex: none; margin-top: 2px; }
.pv-firm-source a { color: var(--c-8fb1ff); }
.pv-firm-confirm { color: #d9a441 !important; }

/* ---- a prop firm challenge in the session bar (backtest/session.ts) ---- */
.pv-sess.has-challenge { flex-wrap: wrap; row-gap: 8px; }
.pv-sess-ch { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 4px 2px 6px; border-top: 1px solid var(--c-2c3243); }
.pv-sess-ch-name { display: flex; flex-direction: column; min-width: 0; max-width: 300px; }
.pv-sess-ch-name b { color: var(--c-eef0f5); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-sess-ch-name small { color: var(--c-8b90a0); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-sess-ch.failed .pv-sess-ch-name small { color: #ef5350; }
.pv-sess-ch.passed .pv-sess-ch-name small { color: #26a69a; }
.pv-sess-ch-meters { display: flex; gap: 12px; margin-left: auto; }
.pv-ch-meter { display: grid; grid-template-columns: auto; gap: 3px; min-width: 96px; }
.pv-ch-meter span { color: var(--c-8b90a0); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.pv-ch-meter i { display: block; height: 5px; border-radius: 3px; background: var(--c-262b38); overflow: hidden; }
.pv-ch-meter u { display: block; height: 100%; background: #26a69a; border-radius: 3px; text-decoration: none; transition: width 0.3s; }
.pv-ch-meter em { font-style: normal; color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-ch-meter:not(:first-child) u { background: var(--c-5c6378); }
.pv-ch-meter.near u { background: #f0a30a; }
.pv-ch-meter.hit u { background: #ef5350; }
.pv-ch-meter.near em { color: var(--c-f0b54a); }
.pv-ch-meter.hit em { color: #ef5350; }
.pv-sess.mini .pv-sess-ch { display: none; }
.pv-sess.mini.has-challenge { flex-wrap: nowrap; }
@media (max-width: 900px) { .pv-sess-ch-meters { gap: 8px; } .pv-ch-meter { min-width: 72px; } }

/* ---- the Prop firms manager (backtest/firmManager.ts) ---- */
.pv-dialog.pv-fm { width: min(1040px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); }
.pv-fm-title { display: inline-flex; align-items: center; gap: 8px; }
.pv-fm-title svg { color: var(--c-8fb1ff); }
.pv-fm-nav { width: 220px; overflow-y: auto; }
.pv-fm-firm { position: relative; }
.pv-fm-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-fm-firm .pv-firm-tag { position: static; margin-left: auto; }
.pv-fm-add, .pv-fm-mini, .pv-fm-act, .pv-fm-addphase, .pv-firm-edit { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font: inherit; cursor: pointer; }
.pv-fm-add { margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--c-3a4052); background: none; color: var(--c-9aa0b0); font-size: 13px; }
.pv-fm-add:hover { background: var(--c-1f2330); color: var(--on-bg); }
.pv-fm-firmhead { display: flex; align-items: center; gap: 14px; }
.pv-fm-fields { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-fm-fields label, .pv-fm-prog label { display: flex; flex-direction: column; gap: 4px; color: var(--c-9aa0b0); font-size: 11.5px; }
.pv-fm-fields input:disabled { opacity: 0.7; }
.pv-fm-colors { display: flex; gap: 5px; flex-wrap: wrap; width: 96px; }
.pv-fm-colors button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.pv-fm-colors button.on { border-color: #fff; }
.pv-fm-source { display: flex; gap: 8px; margin: 0; color: var(--c-8b90a0); font-size: 12px; line-height: 1.5; }
.pv-fm-source svg { flex: none; margin-top: 2px; }
.pv-fm-progs { margin-bottom: 4px; }
.pv-fm-progs button { display: inline-flex; align-items: center; gap: 6px; }
.pv-fm-addprog { border-style: dashed !important; color: var(--c-9aa0b0) !important; }
.pv-fm-prog { display: grid; grid-template-columns: 1.2fr 1.4fr 0.6fr 1.8fr auto; gap: 10px; align-items: end; }
.pv-fm-reset { display: flex; gap: 6px; }
.pv-fm-reset select:first-child { width: 78px; }
.pv-fm-progbtns { display: flex; gap: 6px; }
.pv-fm-mini { padding: 6px 9px; border: 1px solid var(--c-343a4d); background: none; color: var(--c-c9ccd6); font-size: 12px; }
.pv-fm-mini:hover:not(:disabled) { background: var(--c-262b39); color: var(--on-bg); }
.pv-fm-mini.danger:hover:not(:disabled) { color: #f7525f; border-color: var(--c-6a3036); }
.pv-fm-mini:disabled { opacity: 0.4; cursor: default; }
.pv-fm-sizes { margin: -4px 0 0; color: var(--c-8b90a0); font-size: 11.5px; }
.pv-fm-table-wrap { overflow-x: auto; border: 1px solid var(--c-2c3243); border-radius: 10px; }
.pv-fm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pv-fm-table th { position: sticky; top: 0; padding: 9px 8px; background: var(--c-1c2130); color: var(--on-bg); text-align: left; font-weight: 600; white-space: nowrap; }
.pv-fm-table th:first-child { width: 210px; }
.pv-fm-table td { padding: 5px 8px; border-top: 1px solid var(--c-262b38); vertical-align: middle; }
.pv-fm-table td:first-child { color: var(--text); font-size: 12px; }
.pv-fm-table td:first-child small { display: block; color: var(--c-6f7588); font-size: 10.5px; line-height: 1.35; margin-top: 1px; }
.pv-fm-table input.pv-field, .pv-fm-table select { width: 100%; min-width: 110px; height: 28px; font-size: 12.5px; }
.pv-fm-table input.pv-fm-num { max-width: 120px; }
.pv-fm-table input.bad { border-color: #ef5350; }
.pv-fm-delphase { margin-left: 6px; padding: 0 5px; border: 0; border-radius: 5px; background: none; color: var(--c-8b90a0); font-size: 14px; cursor: pointer; }
.pv-fm-delphase:hover { background: var(--c-3a2328); color: #f7525f; }
.pv-fm-addcol { width: 1%; }
.pv-fm-addphase { padding: 5px 9px; border: 1px dashed var(--c-3a4052); background: none; color: var(--c-9aa0b0); font-size: 12px; white-space: nowrap; }
.pv-fm-addphase:hover { color: var(--on-bg); background: var(--c-262b39); }
.pv-fm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-fm-act { padding: 7px 11px; border: 1px solid var(--c-343a4d); background: none; color: var(--c-c9ccd6); font-size: 12.5px; }
.pv-fm-act:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-fm-act.danger:hover { color: #f7525f; border-color: var(--c-6a3036); }
.pv-fm-error { color: #ef5350; font-size: 12px; margin-right: 8px; max-width: 360px; }
.pv-firm-add { border-style: dashed; color: var(--c-9aa0b0); font-weight: 500; }
.pv-firm-plus { width: 34px; height: 34px; background: var(--c-232838); color: var(--c-c9ccd6); }
.pv-firm-edit { padding: 0 10px; height: 30px; border: 1px solid var(--c-343a4d); background: none; color: var(--c-c9ccd6); font-size: 12.5px; margin-left: auto; }
.pv-firm-edit:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-bt-firms { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 1px solid var(--c-343a4d); border-radius: 9px;
  background: none; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.pv-bt-firms:hover { background: var(--c-262b39); color: var(--on-bg); }
.pv-bt-firms-ic { display: grid; color: var(--c-8fb1ff); }
@media (max-width: 760px) { .pv-fm-nav { width: 64px; } .pv-fm-fname, .pv-fm-firm .pv-firm-tag { display: none; } .pv-fm-prog { grid-template-columns: 1fr 1fr; } .pv-fm-fields { grid-template-columns: 1fr; } }
.pv-dialog-back.pv-fm-back { z-index: 280; }
/* The favourites and properties bars float above a split screen: over the dividers and the active chart's outline
   (layer 30), so a bar dragged across the line between two charts keeps its own background (owner, 2026-11-16). */
.favbar, .propbar { z-index: 33; }
.pv-side.pv-wl.full { z-index: 36; }   /* (the full-width watchlist covers the charts, the favourites bar too) */

/* Change interval: a digit typed on the chart (ui/intervalBox.ts) */
.pv-ivl { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 40; width: 220px; padding: 14px 16px 12px;
  background: var(--panel); border: 1px solid var(--c-2f3546); border-radius: 10px; box-shadow: 0 14px 36px var(--shadow-05);
  display: flex; flex-direction: column; align-items: center; gap: 8px; animation: pv-fade 0.14s ease-out; }
.pv-ivl.pv-closing { animation: pv-out 0.14s ease-in forwards; }
.pv-ivl-head { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 15px; font-weight: 600; }
.pv-ivl-info { position: relative; display: grid; color: var(--c-868b9a); cursor: help; outline: none; }
.pv-ivl-tip { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 250px;
  padding: 8px 10px; background: var(--border); color: var(--text); border-radius: 6px; font-size: 12px; font-weight: 400; line-height: 1.45;
  box-shadow: 0 6px 18px var(--shadow-045); z-index: 1; }
.pv-ivl-info:hover .pv-ivl-tip, .pv-ivl-info:focus .pv-ivl-tip { display: block; }
.pv-ivl-input { width: 100%; box-sizing: border-box; height: 38px; text-align: center; font-size: 17px; font-weight: 600;
  color: var(--c-e6e8ee); background: var(--bg); border: 1px solid var(--accent); border-radius: 7px; outline: none; text-transform: uppercase; }
.pv-ivl-text { min-height: 16px; font-size: 12px; color: var(--c-868b9a); }
.pv-ivl.bad .pv-ivl-input { border-color: #f23645; }
.pv-ivl.bad .pv-ivl-text { color: #f23645; }

/* Theme picker: System / Dark / Light pictures (ui/themePicker.ts), in Settings › General and the app menu */
.pv-th-pick { display: flex; gap: 10px; }
.pv-th-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.pv-th-pic { position: relative; display: block; width: 76px; height: 48px; border-radius: 7px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border); background: #131722; transition: box-shadow 0.12s; }
.pv-th-pic i { position: absolute; display: block; border-radius: 2px; }
.pv-th-bar { left: 6px; right: 6px; top: 6px; height: 6px; background: #2a2e39; }
.pv-th-side { left: 6px; top: 16px; bottom: 6px; width: 10px; background: #2a2e39; }
.pv-th-main { left: 20px; right: 6px; top: 16px; bottom: 6px; background: #1e222d; }
.pv-th-light .pv-th-pic { background: #ffffff; }
.pv-th-light .pv-th-bar, .pv-th-light .pv-th-side { background: #e0e3eb; }
.pv-th-light .pv-th-main { background: #f0f3fa; }
.pv-th-system .pv-th-pic { --h: 38px; background: linear-gradient(90deg, #131722 var(--h), #ffffff 0); }
.pv-th-system .pv-th-bar { background: linear-gradient(90deg, #2a2e39 calc(var(--h) - 6px), #e0e3eb 0); }
.pv-th-system .pv-th-side { background: #2a2e39; }
.pv-th-system .pv-th-main { background: linear-gradient(90deg, #1e222d calc(var(--h) - 20px), #f0f3fa 0); }
.pv-th-opt:hover .pv-th-pic { box-shadow: inset 0 0 0 1px var(--muted); }
.pv-th-opt.on .pv-th-pic { box-shadow: 0 0 0 2px var(--accent); }
.pv-th-opt.on { color: var(--on-bg); font-weight: 600; }

/* Settings' PlotVibe tabs: General, Alerts, Service, About */
.pv-dialog-navsep { height: 1px; margin: 8px 10px; background: var(--border); }
.pv-app-label { display: flex; flex-direction: column; gap: 2px; }
.pv-app-size { color: var(--muted); font-size: 12px; }
.pv-app-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-app-btn:disabled { opacity: 0.5; cursor: default; }
.pv-app-vol { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.pv-app-vol input { width: 160px; }
.pv-app-vol b { min-width: 38px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.pv-app-about { display: flex; align-items: center; gap: 14px; padding: 4px 0 6px; }
.pv-app-about img { width: 56px; height: auto; }
.pv-app-about b { display: block; color: var(--on-bg); font-size: 18px; }
.pv-app-about span { color: var(--muted); font-size: 12.5px; }
.pv-app-status { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: var(--c-1f2330); color: var(--text); font-size: 12.5px; }
.pv-app-status svg { flex: none; color: var(--accent); }

/* The app menu: the "…" (ui/appMenu.ts) in the desktop window's tab row or a browser page's top bar */
.pv-appmenu-btn { display: grid; place-items: center; border: 0; background: none; color: var(--c-b2b5be); cursor: pointer; }
.pv-tabbar-menu { flex: none; width: 40px; align-self: stretch; }
.pv-tabbar-menu:hover, .pv-tabbar-menu.open { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-appmenu { position: fixed; z-index: 400; width: 260px; padding: 6px; background: var(--panel); border: 1px solid var(--c-2f3546);
  border-radius: 10px; box-shadow: 0 14px 36px var(--shadow-05); animation: pv-fade 0.12s ease-out; }
.pv-appmenu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.pv-appmenu-head img { width: 34px; height: auto; }
.pv-appmenu-head b { display: block; color: var(--on-bg); font-size: 14px; }
.pv-appmenu-head span { color: var(--muted); font-size: 11.5px; }
.pv-appmenu-item, .pv-appmenu-zoom { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 8px;
  border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 13px; text-align: left; }
.pv-appmenu-item { cursor: pointer; }
.pv-appmenu-item svg, .pv-appmenu-zoom > svg { flex: none; color: var(--muted); }
.pv-appmenu-item:hover:not(:disabled) { background: var(--c-2a2f3f); }
.pv-appmenu-item:disabled { opacity: 0.45; cursor: default; }
.pv-appmenu-text { flex: 1; }
.pv-appmenu-key { color: var(--muted); font-size: 11.5px; }
.pv-appmenu-zoom button { width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--text); font-size: 16px; cursor: pointer; }
.pv-appmenu-zoom button:hover { background: var(--c-2a2f3f); }
.pv-appmenu-zoom b { min-width: 44px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.pv-appmenu-sep { height: 1px; margin: 5px 4px; background: var(--border); }
.pv-appmenu .pv-th-pick { justify-content: space-between; padding: 6px 6px 4px; }
.pv-appmenu .pv-th-pic { width: 70px; height: 44px; --h: 35px; }
.pv-zoom-toast { position: fixed; left: 50%; top: 52px; z-index: 450; transform: translateX(-50%); padding: 6px 12px; border-radius: 6px;
  background: rgba(42, 46, 57, 0.95); color: #fff; font-size: 12.5px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.pv-zoom-toast.show { opacity: 1; }

/* The desktop app's splash while it starts (index.html; main.ts fades it out): the owner's chart picture
   (brand/splash.png, 2026-11-16) filling the card, drifting slowly closer, with PlotVibe's name over a violet shade */
.pv-splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: #131722; transition: opacity 0.35s ease; }
.pv-splash.gone { opacity: 0; pointer-events: none; }
.pv-splash-card { position: relative; width: min(680px, calc(100vw - 48px)); aspect-ratio: 1090 / 494; border-radius: 16px; overflow: hidden;
  background: #131722; color: #fff; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06); animation: pv-in 0.35s ease-out; }
.pv-splash-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 70% 40%;
  animation: pv-splash-drift 9s ease-out forwards; }
@keyframes pv-splash-drift { from { transform: scale(1.0); } to { transform: scale(1.08); } }
.pv-splash-shade { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 10, 40, 0.94) 0%, rgba(30, 12, 80, 0.78) 34%, rgba(19, 23, 34, 0.15) 70%, rgba(19, 23, 34, 0) 100%),
    linear-gradient(0deg, rgba(19, 23, 34, 0.85) 0%, rgba(19, 23, 34, 0) 38%); }
.pv-splash-brand { position: absolute; left: 30px; top: 50%; transform: translateY(-58%); display: flex; align-items: center; gap: 14px; }
.pv-splash-brand > img { width: 78px; height: auto; filter: drop-shadow(0 6px 16px rgba(138, 18, 253, 0.45)); }
.pv-splash-name { font-family: 'Exo 2', var(--pv-font, sans-serif); font-style: italic; font-size: 38px; font-weight: 700; line-height: 1;
  letter-spacing: 0.01em; background: linear-gradient(180deg, #ffffff 35%, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 3px; }
.pv-splash-ver { margin-top: 7px; min-height: 15px; font-size: 12px; color: rgba(255, 255, 255, 0.75); letter-spacing: 0.02em; }
.pv-splash-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pv-splash-bar i { position: absolute; top: 0; bottom: 0; width: 34%; background: linear-gradient(90deg, transparent, #a727fd, #5a0ee0, transparent);
  animation: pv-splash-load 1.4s ease-in-out infinite; }
@keyframes pv-splash-load { from { left: -34%; } to { left: 100%; } }
:root[data-theme="light"] .pv-appmenu-head img, :root[data-theme="light"] .pv-app-about img { content: url(/static/brand/pv-mark-light.svg); }

/* A light chart (light theme or a white template): PlotVibe's logo in its light-background colours */
[data-chartbg="light"] .pv-brand img { content: url(/static/brand/pv-mark-light.svg); }
[data-chartbg="light"] .pv-brand span { background: linear-gradient(180deg, #2a1b6e 30%, #6a3fd9); -webkit-background-clip: text; background-clip: text; }

/* ---- interactive videos (video/): Record, the camera bubble, the recording bar, the player, the Videos page ---- */
.pv-rec-btn.on { color: #fff; background: #f23645; }
.pv-rec-btn.on:hover { background: #d9303e; }
.pv-rec-btn.on svg { animation: pv-rec-blink 1.2s ease-in-out infinite; }
@keyframes pv-rec-blink { 50% { opacity: 0.45; } }
.pv-rec-menu { width: 250px; }

.pv-cam { position: absolute; z-index: 60; border-radius: 50%; background: #0c0f16; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.85); cursor: var(--pv-grab); touch-action: none; user-select: none; }
.pv-cam.square { border-radius: 14px; }
.pv-cam.dragging { cursor: var(--pv-grabbing); }
.pv-cam.hidden { display: none; }
.pv-cam video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; pointer-events: none; }
.pv-cam-off { position: absolute; inset: 0; display: none; place-items: center; color: #9aa1b2; border-radius: inherit; background: #1b1f2b; }
.pv-cam.cam-off video { visibility: hidden; }
.pv-cam.cam-off .pv-cam-off { display: grid; }
.pv-cam-bar { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px; opacity: 0; transition: opacity 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.pv-cam:hover .pv-cam-bar, .pv-cam.dragging .pv-cam-bar { opacity: 1; }
.pv-cam-btn { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none;
  color: var(--text); cursor: pointer; }
.pv-cam-btn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-cam-h { position: absolute; z-index: 1; }
.pv-cam-h-n, .pv-cam-h-s { left: 12px; right: 12px; height: 10px; cursor: ns-resize; }
.pv-cam-h-e, .pv-cam-h-w { top: 12px; bottom: 12px; width: 10px; cursor: ew-resize; }
.pv-cam-h-n { top: -5px; }
.pv-cam-h-s { bottom: -5px; }
.pv-cam-h-e { right: -5px; }
.pv-cam-h-w { left: -5px; }
.pv-cam-h-ne, .pv-cam-h-nw, .pv-cam-h-se, .pv-cam-h-sw { width: 16px; height: 16px; }
.pv-cam-h-ne { top: -6px; right: -6px; cursor: nesw-resize; }
.pv-cam-h-sw { bottom: -6px; left: -6px; cursor: nesw-resize; }
.pv-cam-h-nw { top: -6px; left: -6px; cursor: nwse-resize; }
.pv-cam-h-se { bottom: -6px; right: -6px; cursor: nwse-resize; }
.pv-cam.still { cursor: default; pointer-events: none; }

.pv-rec-bar { position: absolute; z-index: 70; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center;
  gap: 4px; height: 40px; padding: 0 6px 0 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.pv-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #f23645; animation: pv-rec-blink 1.2s ease-in-out infinite; }
.pv-rec-dot.paused { animation: none; background: var(--muted); }
.pv-rec-time { min-width: 46px; margin: 0 6px 0 4px; color: var(--on-bg); font-variant-numeric: tabular-nums; font-size: 13px; }
.pv-rec-ctl { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 16px; background: none;
  color: var(--text); cursor: pointer; position: relative; }
.pv-rec-ctl:hover:not(:disabled) { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-rec-ctl:disabled { opacity: 0.4; cursor: default; }
.pv-rec-ctl.stop { color: #f23645; }
.pv-rec-ctl.level::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 4px; height: 2px; border-radius: 1px;
  background: #22ab94; transform-origin: left; transform: scaleX(var(--level, 0)); }
.pv-rec-saving { padding: 0 10px 0 2px; color: var(--text); font-size: 13px; }
.pv-rec-count { position: absolute; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: rgba(10, 12, 18, 0.35); color: #fff; pointer-events: none; }
.pv-rec-count b { font-size: 96px; line-height: 1; font-weight: 700; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5); }
.pv-rec-count.tick b { animation: pv-rec-tick 1s ease-out; }
.pv-rec-count span { font-size: 13px; opacity: 0.85; }
@keyframes pv-rec-tick { from { transform: scale(1.35); opacity: 0; } 25% { opacity: 1; } to { transform: scale(1); } }

.pv-vplayer { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; background: var(--bg); }
.pv-vp-head { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.pv-vp-head b { color: var(--on-bg); font-size: 14px; }
.pv-vp-sub { flex: 1; font-size: 12px; }
.pv-vp-stage { position: relative; flex: 1; min-height: 0; }
.pv-vp-shield { position: absolute; inset: 0; z-index: 50; cursor: pointer; }
.pv-vp-ptr { position: absolute; left: 0; top: 0; z-index: 55; display: none; width: 18px; height: 18px; margin: -2px 0 0 -2px;
  pointer-events: none; background: no-repeat center/contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-6.5 1 3.8 7.2-2.6 1.3-3.8-7.3L4 20z' fill='%23fff' stroke='%23131722' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.pv-vp-foot { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-top: 1px solid var(--border); color: var(--text); }
.pv-vp-play { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 18px; background: var(--accent);
  color: #fff; cursor: pointer; }
.pv-vp-time, .pv-vp-dur { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 44px; }
.pv-vp-seek { flex: 1; }

.pv-va-preview { position: relative; width: 240px; height: 240px; margin: 4px 0 12px; border-radius: 50%; overflow: hidden;
  background: #0c0f16; border: 1px solid var(--border); }
.pv-va-preview.square { border-radius: 16px; width: 320px; height: 180px; }
.pv-va-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-va-msg { position: absolute; inset: 0; display: none; place-items: center; padding: 22px; text-align: center; color: #9aa1b2; font-size: 12px; line-height: 1.45; }
.pv-va-preview.waiting .pv-va-msg { display: grid; }
.pv-va-shapes { display: flex; gap: 6px; }
.pv-va-shape { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px;
  background: none; color: var(--text); cursor: pointer; }
.pv-va-shape.on { border-color: var(--accent); color: var(--on-bg); }
.pv-va-level { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pv-va-bar { width: 160px; height: 6px; border-radius: 3px; background: var(--c-2a2f3f); overflow: hidden; }
.pv-va-bar span { display: block; width: 0; height: 100%; background: #22ab94; transition: width 0.06s linear; }
.pv-va-level.off { opacity: 0.45; }
/* paper trades in an interactive video: shown only */
.pt-layer.readonly .pt-btn, .pt-layer.readonly .pt-add { display: none; }

/* the player, step 2: header buttons, the viewer's tools and the paused bar, moments, the seek bar's ticks */
.pv-vp-hbtn { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-vp-hbtn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vplayer.side .pv-vp-mbtn { color: var(--accent); }
.pv-vp-body { position: relative; flex: 1; min-height: 0; display: flex; }
.pv-vp-body .pv-vp-stage { flex: 1; min-width: 0; }
.pv-vplayer:not(.playing) .pv-vp-shield { display: none; }
.pv-vp-tools { position: absolute; left: 10px; top: 50%; z-index: 60; display: none; flex-direction: column; gap: 2px; padding: 4px;
  transform: translateY(-50%); border: 1px solid var(--border); border-radius: 10px; background: var(--panel, var(--c-171b26));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35); }
.pv-vp-tools.on { display: flex; }
.pv-vp-tool { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text); cursor: pointer; }
.pv-vp-tool:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vp-tool.on { background: rgba(var(--accent-rgb), 0.18); color: var(--accent); }
.pv-vp-tsep { height: 1px; margin: 3px 4px; background: var(--border); }
.pv-vp-paused { position: absolute; left: 50%; top: 12px; z-index: 60; display: none; align-items: center; gap: 8px; padding: 6px 6px 6px 14px;
  transform: translateX(-50%); border: 1px solid var(--border); border-radius: 12px; background: var(--panel, var(--c-171b26));
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35); white-space: nowrap; }
.pv-vp-paused.on { display: flex; }
.pv-vp-pmsg { display: flex; flex-direction: column; margin-right: 6px; color: var(--on-bg); font-weight: 600; font-size: 13px; }
.pv-vp-pmsg small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.pv-vp-pbtn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pv-vp-pbtn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vp-pbtn.go { border-color: var(--accent); background: var(--accent); color: #fff; }
.pv-vp-pbtn.go:hover { filter: brightness(1.1); background: var(--accent); color: #fff; }
.pv-vp-resume { position: absolute; left: 50%; bottom: 14px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px;
  transform: translateX(-50%); border-radius: 10px; background: rgba(0, 0, 0, 0.78); color: #fff; font-size: 12.5px; }
.pv-vp-resume button { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 7px;
  background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; cursor: pointer; }
.pv-vp-next { position: absolute; left: 50%; top: 50%; z-index: 70; width: 320px; padding: 18px; transform: translate(-50%, -50%);
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel, var(--c-171b26)); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: 4px; }
.pv-vp-next small { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.pv-vp-next b { color: var(--on-bg); font-size: 15px; }
.pv-vp-ncount { color: var(--muted); font-size: 12px; }
.pv-vp-nbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pv-vp-nbtns .pv-btn { display: inline-flex; align-items: center; gap: 6px; }
.pv-vp-side { display: none; flex: none; width: 300px; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg); min-height: 0; }
.pv-vplayer.side .pv-vp-side { display: flex; }
.pv-vp-side-head { display: flex; align-items: center; height: 40px; padding: 0 6px 0 14px; color: var(--on-bg); }
.pv-vp-side-head .pv-card-x { margin-left: auto; }
.pv-vp-find { margin: 0 10px 8px; width: auto; min-width: 0; }
.pv-vp-moments { flex: 1; overflow-y: auto; padding: 0 6px 10px; }
.pv-vp-mrow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: none;
  color: var(--text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pv-vp-mrow:hover { background: var(--c-2a2f3f); }
.pv-vp-mrow.now { background: rgba(var(--accent-rgb), 0.14); }
.pv-vp-mrow .t { flex: none; min-width: 38px; color: var(--accent); font-variant-numeric: tabular-nums; }
.pv-vp-mrow .x { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-vp-mrow.chapter .x { color: var(--on-bg); font-weight: 600; }
.pv-vp-mrow svg { flex: none; color: var(--muted); }
.pv-vp-mrow.trade svg { color: #22ab94; }
.pv-vp-mrow.chapter svg { color: #f7a600; }
.pv-vp-mnone { padding: 20px 8px; color: var(--muted); text-align: center; }
.pv-vp-track { position: relative; flex: 1; display: flex; align-items: center; }
.pv-vp-track .pv-vp-seek { width: 100%; }
.pv-vp-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; pointer-events: none; }
.pv-vp-tick { position: absolute; top: -9px; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: var(--muted); opacity: 0.8; }
.pv-vp-tick.chapter { top: -11px; height: 7px; width: 3px; background: #f7a600; opacity: 1; }
.pv-vp-tick.trade { background: #22ab94; }
.pv-vp-tick.draw { background: var(--accent); }
.pv-vp-fbtn { min-width: 34px; height: 30px; display: grid; place-items: center; padding: 0 6px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.pv-vp-fbtn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }

/* Edit video */
.pv-vedit { width: 520px; max-width: calc(100vw - 32px); }
.pv-vedit .pv-card-head { display: flex; align-items: center; gap: 8px; }
.pv-vedit .pv-card-head .pv-card-x { margin-left: auto; }
.pv-vedit .pv-card-body { display: flex; flex-direction: column; max-height: min(70vh, 640px); overflow-y: auto; }
.pv-vedit-lab { margin: 10px 0 5px; color: var(--muted); font-size: 12px; }
.pv-vedit-lab:first-child { margin-top: 0; }
.pv-vedit textarea { resize: vertical; min-height: 60px; font: inherit; }
.pv-vedit-chapters { display: flex; flex-direction: column; gap: 6px; }
.pv-vedit-ch { display: flex; gap: 6px; align-items: center; }
.pv-vedit-ch .t { width: 76px; flex: none; font-variant-numeric: tabular-nums; }
.pv-vedit-ch .n { flex: 1; min-width: 0; }
.pv-vedit-ch .t.bad { border-color: var(--down, #f23645); }
.pv-vedit-del { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; }
.pv-vedit-del:hover { background: var(--c-363c4e); color: var(--on-bg); }
.pv-vedit-add { align-self: flex-start; display: flex; align-items: center; gap: 6px; height: 30px; margin-top: 8px; padding: 0 10px;
  border: 1px dashed var(--border); border-radius: 7px; background: none; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-vedit-add:hover { border-color: var(--accent); color: var(--on-bg); }

/* the Videos page */
.pv-videos { position: fixed; inset: 0; z-index: 290; display: flex; flex-direction: column; background: var(--bg); }
.pv-vv-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--border); color: var(--muted); }
.pv-vv-head b { color: var(--on-bg); font-size: 16px; margin-right: 12px; }
.pv-vv-find { width: 320px; max-width: 40vw; }
.pv-vv-rec { display: flex; align-items: center; gap: 6px; height: 32px; margin-left: auto; padding: 0 12px; border: 1px solid var(--border);
  border-radius: 8px; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.pv-vv-rec svg { color: #f23645; }
.pv-vv-rec:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vv-body { flex: 1; min-height: 0; display: flex; }
.pv-vv-nav { flex: none; width: 230px; padding: 12px 8px; border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pv-vv-navh { margin: 14px 10px 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.pv-vv-navi { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.pv-vv-navi span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-vv-navi small { color: var(--muted); font-variant-numeric: tabular-nums; }
.pv-vv-navi:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vv-navi.on { background: rgba(var(--accent-rgb), 0.14); color: var(--on-bg); }
.pv-vv-navi.on svg { color: var(--accent); }
.pv-vv-navi.add { color: var(--muted); }
.pv-vv-main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 30px; }
.pv-vv-plhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.pv-vv-plhead h2 { margin: 0 0 4px; color: var(--on-bg); font-size: 20px; }
.pv-vv-plhead p { margin: 0; color: var(--muted); font-size: 13px; }
.pv-vv-plact { display: flex; gap: 6px; }
.pv-vv-btn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pv-vv-btn:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vv-btn.go { border-color: var(--accent); background: var(--accent); color: #fff; }
.pv-vv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.pv-vv-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 6px; border-radius: 12px; cursor: pointer; }
.pv-vv-card:hover { background: var(--c-1e222d, rgba(127, 127, 127, 0.08)); }
.pv-vv-card.dragging { opacity: 0.4; }
.pv-vv-card.over { outline: 2px dashed var(--accent); outline-offset: 2px; }
.pv-vv-cover { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; background: #0c0f16 center/cover no-repeat; border: 1px solid var(--border); overflow: hidden; }
.pv-vv-len { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.78);
  color: #fff; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pv-vv-badge { position: absolute; left: 6px; top: 6px; display: flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 4px;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; }
.pv-vv-playic { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; display: grid; place-items: center; margin: -26px 0 0 -26px;
  border-radius: 26px; background: rgba(0, 0, 0, 0.6); color: #fff; opacity: 0; transition: opacity 0.15s; }
.pv-vv-card:hover .pv-vv-playic { opacity: 1; }
.pv-vv-text { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; padding-right: 4px; }
.pv-vv-text b { color: var(--on-bg); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-vv-text small { color: var(--muted); font-size: 11.5px; }
.pv-vv-act { position: absolute; right: 12px; top: 12px; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(0, 0, 0, 0.7);
  opacity: 0; transition: opacity 0.15s; }
.pv-vv-card:hover .pv-vv-act { opacity: 1; }
.pv-vv-ibtn { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: #e6e8ee; cursor: pointer; }
.pv-vv-ibtn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.pv-vv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 20px; color: var(--muted); text-align: center; }
.pv-vv-empty b { color: var(--on-bg); font-size: 15px; }
.pv-appmenu-item.on svg { color: var(--accent); }
@media (max-width: 700px) {
  .pv-vv-nav { display: none; }
  .pv-vv-find { width: auto; flex: 1; }
  .pv-vp-side { position: absolute; right: 0; top: 0; bottom: 0; z-index: 80; width: min(300px, 90vw); }
  .pv-vp-hbtn span { display: none; }
}

/* Save as MP4: the player out of sight, at the MP4's size (video/export.ts) */
.pv-vplayer.exporting { position: fixed; z-index: 280; pointer-events: none; }
.pv-vplayer.exporting .pv-vp-head, .pv-vplayer.exporting .pv-vp-foot, .pv-vplayer.exporting .pv-vp-tools,
.pv-vplayer.exporting .pv-vp-paused, .pv-vplayer.exporting .pv-vp-side, .pv-vplayer.exporting .pv-vp-shield,
.pv-vplayer.exporting .pv-vp-next, .pv-vplayer.exporting .pv-vp-resume { display: none !important; }
.pv-vplayer.no-ptr .pv-vp-ptr { display: none !important; }
.pv-vplayer.no-cam .pv-cam { visibility: hidden; }
/* Save as MP4: the card, the progress card over everything, Interactive / Video apart, the plain player */
.pv-mp4 { width: 460px; max-width: calc(100vw - 32px); }
.pv-mp4 .pv-card-head, .pv-mp4-runcard .pv-card-head { display: flex; align-items: center; gap: 8px; }
.pv-mp4 .pv-card-head .pv-card-x { margin-left: auto; }
.pv-mp4 .pv-card-body { display: flex; flex-direction: column; }
.pv-mp4-name { margin: 0 0 4px; color: var(--on-bg); font-weight: 600; }
.pv-mp4-lab { margin: 12px 0 6px; color: var(--muted); font-size: 12px; }
.pv-mp4-chips, .pv-vv-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-vv-kinds { margin-bottom: 14px; }
.pv-mp4-chip { height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 15px; background: none; color: var(--text);
  font: inherit; font-size: 12.5px; cursor: pointer; }
.pv-mp4-chip:hover { color: var(--on-bg); background: var(--c-2a2f3f); }
.pv-mp4-chip.on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.16); color: var(--on-bg); }
.pv-mp4-check { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--text); font-size: 13px; cursor: pointer; }
.pv-mp4-range { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.pv-mp4-range input { width: 76px; font-variant-numeric: tabular-nums; }
.pv-mp4-range select { width: auto; flex: 1; min-width: 150px; }
.pv-mp4-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pv-mp4-run { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: var(--bg); }
.pv-mp4-runcard { width: 560px; max-width: calc(100vw - 32px); }
.pv-mp4-preview canvas { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); background: #0c0f16; }
.pv-mp4-bar { height: 6px; margin: 14px 0 8px; border-radius: 3px; background: var(--c-2a2f3f); overflow: hidden; }
.pv-mp4-bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width 0.2s linear; }
.pv-mp4-status { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pv-mp4-runcard .pv-card-foot .pv-btn { display: inline-flex; align-items: center; gap: 6px; }
.pv-vv-badge.reg { background: #089981; }
.pv-vp-head .pv-vv-badge { position: static; }
.pv-vplain-stage { flex: 1; min-width: 0; display: grid; place-items: center; background: #000; }
.pv-vplain-stage video { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }

/* quizzes in the player (video/quizUi.ts) */
.pv-vp-quiz { position: absolute; right: 14px; top: 12px; z-index: 65; width: 340px; max-width: calc(100% - 28px); max-height: calc(100% - 24px);
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel, var(--c-171b26)); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); color: var(--text); font-size: 13px; }
.pv-vq-head { display: flex; align-items: center; gap: 8px; color: #f7a600; }
.pv-vq-head b { color: var(--on-bg); }
.pv-vq-head small { color: var(--muted); }
.pv-vq-gap { flex: 1; }
.pv-vq-skip { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.pv-vq-skip:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-vq-q { margin: 0; color: var(--on-bg); font-size: 15px; font-weight: 600; line-height: 1.35; }
.pv-vq-body { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-vq-hint { width: 100%; color: var(--muted); font-size: 12.5px; }
.pv-vq-hint.set { color: var(--on-bg); }
.pv-vq-choice { flex: 1 1 45%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: none;
  color: var(--on-bg); font: inherit; font-weight: 600; cursor: pointer; }
.pv-vq-choice:hover { border-color: var(--accent); }
.pv-vq-choice.right { border-color: #089981; background: rgba(8, 153, 129, 0.18); }
.pv-vq-choice.wrong { border-color: #f23645; background: rgba(242, 54, 69, 0.14); }
.pv-vq-tool { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--text); font: inherit; cursor: pointer; }
.pv-vq-tool.on, .pv-vq-tool:hover { border-color: var(--accent); color: var(--on-bg); }
.pv-vq-result:empty { display: none; }
.pv-vq-result { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 8px; background: var(--c-2a2f3f); }
.pv-vq-result b { display: flex; align-items: center; gap: 6px; }
.pv-vq-result b.ok { color: #22ab94; }
.pv-vq-result b.no { color: #f7525f; }
.pv-vq-result p { margin: 4px 0 0; color: var(--on-bg); }
.pv-vq-btns { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.pv-vq-kinds { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-vq-ans { display: flex; flex-direction: column; gap: 6px; }
.pv-vq-ans > .pv-vq-tool { align-self: flex-start; }
.pv-vq-crow { display: flex; align-items: center; gap: 6px; }
.pv-vq-crow .pv-field { flex: 1; }
.pv-vq-note { color: var(--muted); font-size: 11.5px; }
.pv-vq-tol { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.pv-vq-tol input { width: 80px; }
.pv-vq-tol em { font-style: normal; }
.pv-vq-exp { resize: vertical; font: inherit; }
.pv-vp-tick.quiz { top: -11px; height: 7px; width: 3px; background: #a855f7; opacity: 1; }
.pv-vp-mrow.quiz svg { color: #a855f7; }
.pv-vp-mrow.quiz.ok .x::after { content: "  ✓"; color: #22ab94; }
.pv-vp-mrow.quiz.no .x::after { content: "  ✗"; color: #f7525f; }
.pv-vedit-qz { padding: 4px 0; }
.pv-vedit-qz svg { color: #a855f7; flex: none; }
.pv-vedit-qz .t { min-width: 40px; color: var(--accent); font-variant-numeric: tabular-nums; }
.pv-vedit-qz .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-vedit-lab small, .pv-vedit-none { color: var(--muted); font-size: 11.5px; }
.pv-vplayer.exporting .pv-vp-quiz { display: none !important; }
/* a choice (radio) in PlotVibe's checkbox look: round */
.pv-check.round span { border-radius: 50%; }
.pv-check.round input:checked + span { background: transparent; border-color: var(--accent); }
.pv-check.round input:checked + span::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--accent); transform: none; }
.pv-mp4-range .pv-select { flex: 1; min-width: 150px; }
/* the presenter's camera in the player: the viewer moves it out of the way */
.pv-cam.viewer .pv-cam-reset { display: none; }
.pv-cam.viewer.moved .pv-cam-reset { display: grid; }
.pv-vp-fbtn.off { color: var(--muted); }

/* video mode (video/videoPage.ts): the chart page plays an interactive video; the player's bar under the charts */
.pv-vplayer.hosted { position: relative; inset: auto; z-index: 20; flex: none; display: flex; flex-direction: column; background: var(--bg);
  border-top: 1px solid var(--border); }
.pv-vplayer.hosted .pv-vp-head { height: 36px; border-bottom: 0; }
.pv-vplayer.hosted .pv-vp-foot { height: 44px; border-top: 0; }
.pv-vscope:not(.playing) .pv-vp-shield { display: none; }
.pv-vhost .pv-vp-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 75; width: 300px; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.3); }
.pv-vhost.side .pv-vp-side { display: flex; }
.pv-vplayer.hosted.side .pv-vp-mbtn { color: var(--accent); }
.pv-vhost .pv-vp-paused { top: 10px; }
/* (the top bar as the presenter's: every button shows, so the video's pointer lands on the same one; the ones that
   would act on the viewer's own account, layout or recording are not pressable) */
.pv-videomode .replay-btn:not(.pv-alert-btn):not(.pv-ind-btn):not(.pv-replay-main), .pv-videomode .pv-rec-btn, .pv-videomode .pv-layout-btn { pointer-events: none; }
/* (Bar Replay: the presenter's while the video plays; the viewer's to use while it is paused) */
.pv-videomode.pv-vplaying .pv-replay-main { pointer-events: none; }
/* (the presenter's alerts: read-only; the viewer's own + by the price scale does not show, the recorded one does) */
.pv-videomode .pv-alert-tag { pointer-events: none; }
.pv-videomode .pv-chart > .pv-al-plus { display: none !important; }
.pv-vhost .pv-vp-quiz { right: 72px; }   /* (clear of the page chart's price scale) */
/* video mode: the presenter's pointer over the rest of the page, and their clicks */
.pv-vp-ptr.pv-vp-pageptr { position: fixed; z-index: 500; }
.pv-vp-tap { position: fixed; z-index: 499; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; pointer-events: none;
  border: 2px solid var(--accent); background: rgba(var(--accent-rgb), 0.18); animation: pv-vp-tap 0.6s ease-out forwards; }
@keyframes pv-vp-tap { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
/* video mode: the presenter's account and watchlist are shown only (no orders, no list changes) */
.pv-videomode #paper .pp-bar button, .pv-videomode #paper .pp-body button, .pv-videomode #paper .pp-title,
.pv-videomode .pv-wl .pv-wl-head button { pointer-events: none; }
/* video mode: the presenter's menus and dialogs, as copies (to look at) */
.pv-vp-overlays { position: fixed; inset: 0; z-index: 450; pointer-events: none; }
.pv-vp-overlays, .pv-vp-overlays * { pointer-events: none !important; }
/* (the copies never replay an opening or closing: no animations, no transitions) */
.pv-vp-overlays *, .pv-vp-overlays { animation: none !important; transition: none !important; }

/* video mode: the bars over the charts as the presenter had them (properties bar, replay bar), in the charts' area */
.pv-vp-overlays.pv-vp-ovarea { position: absolute; inset: 0; z-index: 62; }
/* video mode, while it plays: the presenter's favourites bar and chart buttons (copies) in place of the viewer's */
.pv-videomode.pv-vplaying #chart > .favbar, .pv-videomode.pv-vplaying #chart .pv-chart .navbar { visibility: hidden !important; }
/* a screen recording: the screen as the presenter saw it, over the page while the video plays */
.pv-vp-screen { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 440; object-fit: cover; background: #000; cursor: pointer; }
/* (a screen video playing: the player's bar over it, fading while the mouse rests) */
body.pv-vscreen .pv-vplayer.hosted { z-index: 450; background: rgba(19, 23, 34, 0.9); transition: opacity 0.3s; }
body.pv-vscreen .pv-vplayer.hosted.pv-vp-idle { opacity: 0; }
body.pv-vscreen-idle .pv-vp-screen { cursor: none; }
.pv-vp-stage > .pv-vp-screen { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 58; }
/* the recording bar in the desktop window's tab row (a recording across tabs: video/shellRec.ts) */
.pv-tabrec { display: flex; align-items: center; flex: none; }
.pv-tabrec:empty { display: none; }
.pv-tabrec .pv-rec-bar { position: static; transform: none; margin: 0 8px; }
/* ---- the Record panel (video/recordPanel.ts): what to record, camera preview, Start / Stop, latest videos ---- */
.pv-side.pv-recside.open { width: 320px; flex-direction: column; }
.pv-recside-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.pv-recside-head > svg { color: #f23645; }
.pv-recside-head b { flex: 1; font-size: 15px; }
.pv-recside-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--c-9aa0b0); cursor: pointer; }
.pv-recside-icon:hover { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-recside-body { flex: 1; overflow-y: auto; padding: 0 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pv-recside-label { margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-8b90a0); }
.pv-recside-vh { display: flex; align-items: center; justify-content: space-between; }
.pv-recside-all { border: 0; background: none; color: var(--accent); font-size: 12px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.pv-recside-modes { display: flex; flex-direction: column; gap: 6px; }
.pv-recside-mode { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: none; color: var(--on-bg); cursor: pointer; }
.pv-recside-mode > svg { flex: none; margin-top: 1px; color: var(--c-9aa0b0); }
.pv-recside-mode span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-recside-mode b { font-size: 13px; }
.pv-recside-mode small { font-size: 12px; color: var(--c-9aa0b0); line-height: 1.35; }
.pv-recside-mode i { font-style: normal; font-size: 11px; color: var(--c-8b90a0); }
.pv-recside-mode:hover:not(:disabled) { background: var(--c-232838); }
.pv-recside-mode.on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
.pv-recside-mode.on > svg { color: var(--accent); }
.pv-recside-mode:disabled { cursor: default; opacity: 0.6; }
.pv-recside-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #0c0f16; }
.pv-recside-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-recside-preview.mirror video { transform: scaleX(-1); }
.pv-recside-preview.waiting video { visibility: hidden; }
.pv-recside-msg { position: absolute; inset: 0; display: grid; place-content: center; padding: 10px; text-align: center; font-size: 12px; color: var(--c-9aa0b0); pointer-events: none; }
.pv-recside-meter { height: 4px; border-radius: 2px; background: var(--c-232838); overflow: hidden; }
.pv-recside-meter span { display: block; height: 100%; width: 0; background: #22ab94; transition: width 0.08s linear; }
.pv-recside-devs { display: flex; gap: 6px; }
.pv-recside-dev { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--border);
  border-radius: 6px; background: none; color: var(--c-9aa0b0); font-size: 12px; cursor: pointer; }
.pv-recside-dev.on { color: var(--on-bg); }
.pv-recside-dev:hover:not(:disabled) { background: var(--c-232838); }
.pv-recside-dev:disabled { cursor: default; opacity: 0.6; }
.pv-recside-go { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 0; border-radius: 8px;
  background: #f23645; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.pv-recside-go:hover { background: #d9303e; }
.pv-recside-go.stop { background: var(--c-2a2f3f); color: var(--on-bg); }
.pv-recside-go.stop svg { color: #f23645; }
.pv-recside-limit { font-size: 11.5px; color: var(--c-8b90a0); text-align: center; }
.pv-recside-list { display: flex; flex-direction: column; gap: 4px; }
.pv-recside-empty { font-size: 12px; color: var(--c-8b90a0); padding: 6px 0; }
.pv-recside-item { display: flex; gap: 10px; align-items: center; padding: 5px; border: 0; border-radius: 6px; background: none; color: var(--on-bg); text-align: left; cursor: pointer; }
.pv-recside-item:hover { background: var(--c-232838); }
.pv-recside-cover { position: relative; flex: none; width: 88px; aspect-ratio: 16 / 9; border-radius: 5px; background: #0c0f16 center / cover no-repeat; }
.pv-recside-cover i { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 3px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 10.5px; font-style: normal; }
.pv-recside-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-recside-text b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-recside-text small { font-size: 11px; color: var(--c-8b90a0); }
/* recording: a red dot on the right-hand bar's Record button */
.pv-recside-btn { position: relative; }
.pv-recside-btn.rec { color: #f23645; }
.pv-recside-btn.rec::after { content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #f23645;
  animation: pv-rec-blink 1.2s ease-in-out infinite; }
.pv-recside-body > * { flex: none; }
/* the recording bar, dragged anywhere (video/session.ts): it floats over the page where it is put */
.pv-rec-bar .pv-rec-grip { display: grid; place-items: center; margin: 0 -2px 0 -4px; color: var(--c-8b90a0); cursor: var(--pv-grab); }
.pv-rec-bar { cursor: var(--pv-grab); }
.pv-rec-bar.dragging, .pv-rec-bar.dragging .pv-rec-grip { cursor: var(--pv-grabbing); }
.pv-rec-bar.floating, .pv-tabrec .pv-rec-bar.floating { position: fixed; transform: none; margin: 0; z-index: 900; }
/* the video from the keyboard (video/keys.ts): what a key did, briefly in the middle; the list of keys */
.pv-vp-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 460; padding: 10px 18px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 18px; font-weight: 600; pointer-events: none; opacity: 0; }
.pv-vp-flash.show { animation: pv-vp-flash 0.7s ease-out forwards; }
@keyframes pv-vp-flash { 0% { opacity: 1; } 60% { opacity: 1; } 100% { opacity: 0; } }
body.pv-vscreen .pv-vhost > .pv-vp-flash { position: fixed; }
.pv-vp-keyhelp { position: fixed; right: 16px; bottom: 110px; z-index: 470; width: 300px; padding: 10px 12px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.pv-vp-keyhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pv-vp-keyhead b { flex: 1; font-size: 13px; }
.pv-vp-keylist { display: grid; gap: 5px; }
.pv-vp-keyrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--c-9aa0b0); }
.pv-vp-keyrow kbd { flex: none; padding: 2px 6px; border-radius: 4px; background: var(--c-232838); border: 1px solid var(--border); color: var(--on-bg);
  font: 600 11px/1.4 inherit; font-family: inherit; }
/* ---- the seek bar in chapters, as on YouTube (video/chapters.ts) ---- */
.pv-vp-track .pv-vp-seek { position: relative; z-index: 1; }
.pv-vp-chaps { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; pointer-events: none; }
.pv-vp-sec { position: absolute; top: 0; height: 4px; transform: translateY(-50%); border-radius: 2px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 18%, transparent); transition: height 0.12s ease; }
.pv-vp-sec i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.pv-vp-sec.hover { height: 9px; }
.pv-vp-track.chaptered .pv-range::-webkit-slider-runnable-track { background: transparent; }
.pv-vp-track.chaptered .pv-range::-moz-range-track { background: transparent; }
.pv-vp-tip { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; display: none; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 9px; border-radius: 6px; background: rgba(0, 0, 0, 0.82); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none; }
.pv-vp-tip.show { display: flex; }
.pv-vp-tip b { font-size: 12.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pv-vp-tip span { color: #cfd3dc; font-variant-numeric: tabular-nums; }
.pv-vp-chap { flex: 0 1 auto; min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 8px;
  border: 0; border-radius: 6px; background: none; color: var(--on-bg); font-size: 12.5px; cursor: pointer; }
.pv-vp-chap::before { content: "· "; color: var(--c-8b90a0); }
.pv-vp-chap::after { content: " ›"; color: var(--c-8b90a0); }
.pv-vp-chap:hover { background: var(--c-2a2f3f); }
.pv-vp-chap[hidden] { display: none; }
/* the recording bar's Chapter button: marks made */
.pv-rec-ctl.marks { color: #f7a600; }
.pv-vedit-chbtns { display: flex; gap: 8px; flex-wrap: wrap; }
/* All videos: at the top of the Record panel (owner, 2026-11-17) */
.pv-recside-head .pv-recside-all { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--on-bg); font-size: 12px; }
.pv-recside-head .pv-recside-all:hover { background: var(--c-2a2f3f); }
.pv-recside-head .pv-recside-all svg { color: var(--c-9aa0b0); }
/* Settings › Claude (claude/settingsPanel.ts) */
.pv-claude-steps { margin: 6px 0 2px; padding-left: 20px; display: grid; gap: 5px; font-size: 12.5px; color: var(--text); }
.pv-claude-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pv-claude-status { flex-wrap: wrap; }
.pv-claude-status > span { flex: 1; min-width: 200px; }
/* ---- Claude's questions on the chart (claude/questions.ts) ---- */
.pv-claude-qs { position: absolute; top: 10px; right: 70px; z-index: 75; display: none; flex-direction: column; gap: 8px; width: 320px;
  max-height: calc(100% - 20px); overflow-y: auto; }
.pv-claude-qs.has { display: flex; }
.pv-claude-q { padding: 10px 12px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); display: flex; flex-direction: column; gap: 8px; }
.pv-claude-qhead { display: flex; align-items: center; gap: 7px; }
.pv-claude-qhead > svg { color: #d97757; }
.pv-claude-qhead b { flex: 1; font-size: 13px; }
.pv-claude-qtext { font-size: 13px; line-height: 1.45; color: var(--on-bg); white-space: pre-wrap; }
.pv-claude-qwhere { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--c-9aa0b0); }
.pv-claude-qshow { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: none; color: var(--on-bg); font-size: 12px; cursor: pointer; white-space: nowrap; }
.pv-claude-qshow:hover { background: var(--c-2a2f3f); }
.pv-claude-qchoices { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-claude-qchoice { padding: 5px 10px; border: 1px solid var(--border); border-radius: 14px; background: none; color: var(--on-bg);
  font-size: 12.5px; cursor: pointer; }
.pv-claude-qchoice:hover { background: var(--c-232838); }
.pv-claude-qchoice.on { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.15); color: var(--on-bg); }
.pv-claude-qnote { width: 100%; resize: vertical; min-height: 44px; font-size: 12.5px; box-sizing: border-box; }
.pv-claude-qfoot { display: flex; justify-content: flex-end; }
.pv-claude-qsend { display: inline-flex; align-items: center; gap: 6px; }
/* ---- the Claude panel (claude/review.ts): the Review list of Claude's questions; Claude's marks shown or hidden ---- */
.pv-side.pv-claude-side.open { width: 330px; flex-direction: column; }
.pv-claude-shead { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.pv-claude-shead > svg { color: #d97757; }
.pv-claude-shead b { flex: 1; font-size: 15px; }
.pv-claude-eye.off { color: var(--c-8b90a0); }
.pv-claude-chips { display: flex; gap: 6px; padding: 0 12px 8px; }
.pv-claude-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.pv-claude-empty { padding: 14px 8px; font-size: 12.5px; color: var(--c-8b90a0); line-height: 1.45; }
.pv-claude-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 0; border-radius: 8px; background: none;
  color: var(--on-bg); text-align: left; cursor: pointer; }
.pv-claude-row:hover { background: var(--c-232838); }
.pv-claude-row.on { background: rgba(217, 119, 87, 0.14); }
.pv-claude-dot { flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #d97757; }
.pv-claude-row.answered .pv-claude-dot { background: #22ab94; }
.pv-claude-row.dismissed .pv-claude-dot { background: var(--c-8b90a0); }
.pv-claude-rtext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv-claude-rtext b { font-size: 12.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-claude-rtext small { font-size: 11px; color: var(--c-8b90a0); }
.pv-claude-rtext em { font-style: normal; font-size: 11.5px; color: #22ab94; }
.pv-claude-row.dismissed .pv-claude-rtext em { color: var(--c-8b90a0); }
.pv-claude-btn.pv-has { color: #d97757; }
/* ---- "Claude is working" (claude/strip.ts): what Claude does, Pause / Stop, speed, its notes ---- */
.pv-claude-strip { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 76; display: none; flex-direction: column;
  align-items: center; gap: 6px; max-width: min(680px, calc(100% - 140px)); pointer-events: none; }
.pv-claude-strip.on { display: flex; }
.pv-claude-strip > * { pointer-events: auto; }
.pv-claude-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 10px; border-radius: 18px; background: var(--panel);
  border: 1px solid rgba(217, 119, 87, 0.55); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); max-width: 100%; }
.pv-claude-me { display: flex; align-items: center; gap: 5px; color: #d97757; flex: none; }
.pv-claude-me b { color: var(--on-bg); font-size: 12.5px; }
.pv-claude-me svg { animation: pv-claude-glow 1.6s ease-in-out infinite; }
.pv-claude-strip.paused .pv-claude-me svg { animation: none; opacity: 0.6; }
@keyframes pv-claude-glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.pv-claude-doing { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--c-9aa0b0); padding: 0 4px; }
.pv-claude-strip.paused .pv-claude-doing { color: #f7a600; }
.pv-claude-strip.stopped .pv-claude-doing { color: #f23645; }
.pv-claude-ctl { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 28px; height: 28px; padding: 0 6px;
  border: 0; border-radius: 14px; background: none; color: var(--on-bg); font-size: 12px; cursor: pointer; }
.pv-claude-ctl:hover { background: var(--c-2a2f3f); }
.pv-claude-pause { background: rgba(217, 119, 87, 0.16); }
.pv-claude-stop { color: #f23645; }
.pv-claude-notesbtn i { font-style: normal; font-size: 11px; color: var(--c-8b90a0); }
.pv-claude-msg { display: none; width: 420px; max-width: 100%; }
.pv-claude-strip.paused .pv-claude-msg { display: block; }
.pv-claude-msg input { width: 100%; box-sizing: border-box; font-size: 12.5px; }
.pv-claude-note { display: none; max-width: 520px; padding: 7px 12px; border-radius: 10px; background: rgba(217, 119, 87, 0.92); color: #fff;
  font-size: 12.5px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.pv-claude-note.on { display: block; animation: pv-claude-note-in 0.25s ease-out; }
@keyframes pv-claude-note-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pv-claude-notes { display: none; width: 440px; max-width: 100%; max-height: 260px; overflow-y: auto; padding: 6px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.pv-claude-strip.list .pv-claude-notes { display: block; }
.pv-claude-strip.list .pv-claude-note { display: none; }
.pv-claude-nrow { display: flex; gap: 8px; padding: 5px 6px; font-size: 12.5px; line-height: 1.4; color: var(--on-bg); }
.pv-claude-nrow small { flex: none; color: var(--c-8b90a0); font-variant-numeric: tabular-nums; }
.pv-claude-lfx { display: flex; gap: 6px; align-items: center; margin: 4px 0 8px; }
.pv-claude-lfx input { flex: 1; min-width: 0; font-size: 12.5px; }

/* A training round's navigator (claude/round.ts): at the foot of Claude's desk chart */
.pv-claude-round { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 76; display: none; align-items: center;
  gap: 4px; height: 36px; padding: 0 6px 0 10px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(217, 119, 87, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); max-width: calc(100% - 140px); font-size: 12.5px; }
.pv-claude-round.on { display: flex; }
.pv-claude-rme { display: flex; align-items: center; gap: 5px; color: #d97757; flex: none; margin-right: 4px; }
.pv-claude-rme b { color: var(--on-bg); }
.pv-claude-rat { flex: none; font-weight: 600; color: var(--on-bg); min-width: 92px; text-align: center; }
.pv-claude-rname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c-9aa0b0); padding: 0 6px; }
.pv-claude-round .pv-claude-ctl:disabled { opacity: 0.35; cursor: default; background: none; }
.pv-claude-rread.on { background: rgba(217, 119, 87, 0.22); color: #d97757; }
.pv-claude-qsay { margin-left: auto; }
.pv-claude-general:empty { display: none; }
.pv-claude-general { padding: 8px 10px 0; }
.pv-claude-general .pv-claude-qs { position: static; width: auto; max-height: none; }
/* the Claude panel scrolls as a whole (its general question cards and the Review list), its header stays */
.pv-side.pv-claude-side.open { overflow-y: auto; }
.pv-claude-side .pv-claude-shead { position: sticky; top: 0; z-index: 1; background: var(--panel); }
.pv-claude-side .pv-claude-list { flex: none; overflow: visible; }
.pv-claude-general, .pv-claude-chips { flex: none; }
.pv-claude-qsay.on, .pv-claude-rread.on { color: #d97757; }
/* (above the chart's zoom / scroll / reset buttons, which show at the foot of the chart: owner, 2026-11-18) */
.pv-claude-round { bottom: 92px; }
.pv-claude-rsend { gap: 5px; padding: 0 10px; margin-left: 2px; background: var(--accent); color: #fff; font-weight: 600; }
.pv-claude-rsend:hover { background: var(--accent); filter: brightness(1.1); }
.pv-claude-rsend.sent { background: rgba(8, 153, 129, 0.2); color: #22ab94; }
/* the round's bar (0.1.92): its own row, a row above it for Claude's recorded round; dragged where the trader likes */
.pv-claude-round { flex-direction: column; align-items: center; gap: 6px; height: auto; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; pointer-events: none; }
.pv-claude-round > * { pointer-events: auto; }
.pv-claude-round.floating { transform: none; bottom: auto; }
.pv-claude-rbar { display: flex; align-items: center; gap: 4px; height: 36px; padding: 0 6px 0 4px; border-radius: 18px; background: var(--panel);
  border: 1px solid rgba(217, 119, 87, 0.55); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); max-width: 100%; cursor: var(--pv-grab); }
.pv-claude-round.dragging .pv-claude-rbar { cursor: var(--pv-grabbing); }
.pv-claude-rgrip { display: flex; color: var(--c-8b90a0); padding: 0 2px; }
.pv-claude-rvideo { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 16px; background: var(--panel);
  border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); font-size: 12px; color: var(--c-9aa0b0); }
.pv-claude-rvideo[hidden] { display: none; }
.pv-claude-rvideo > span { display: flex; align-items: center; gap: 6px; }
.pv-claude-rvideo > span svg { color: #d97757; }
.pv-claude-rkeep, .pv-claude-rrec { gap: 5px; padding: 0 9px; }
.pv-claude-rrec.rec { color: #f23645; background: rgba(242, 54, 69, 0.14); }
.pv-claude-rrec[hidden] { display: none; }
/* a card's setup and collapsing it to its head */
.pv-claude-qsetup { flex: none; padding: 1px 7px; border-radius: 9px; background: rgba(var(--accent-rgb), 0.18); color: var(--accent-text); font-size: 11.5px; font-weight: 600; }
.pv-claude-qhead { cursor: pointer; }
.pv-claude-qhead b { flex: none; }
.pv-claude-qpeek { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--c-9aa0b0); visibility: hidden; }
.pv-claude-q.folded .pv-claude-qpeek { visibility: visible; }
.pv-claude-q.folded > :not(.pv-claude-qhead) { display: none; }
.pv-claude-q.folded { padding-bottom: 10px; }
.pv-claude-round [hidden] { display: none !important; }

/* Indicators' rows in the status line (indicators/chartIndicators.ts): "SMA 9 close 1.42865", under the symbol's */
.pv-ind-legend { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.pv-ind-legend:empty { display: none; }
.pv-ind-row { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 22px; padding: 0 4px;
  border: 1px solid transparent; border-radius: 5px; font-size: 12.5px; color: var(--on-bg); white-space: nowrap; pointer-events: auto; }
.pv-ind-row .pv-ind-name { color: var(--c-b2b5be); }
.pv-ind-row .pv-ind-vals { display: flex; gap: 6px; font-variant-numeric: tabular-nums; }
.pv-ind-row.off .pv-ind-name { opacity: 0.5; }

/* The Indicators dialog (indicators/dialog.ts; TradingView's "Indicators, metrics, and strategies") */
.pv-id { width: min(860px, calc(100vw - 24px)); }
.pv-id-top { display: flex; align-items: center; padding: 14px 14px 4px 18px; }
.pv-id-top b { flex: 1; font-size: 17px; }
.pv-id .pv-ss-head { margin: 6px 14px 0; border: 1px solid var(--c-2f3546); border-radius: 8px; padding: 6px 10px; }
.pv-id-body { flex: 1; min-height: 0; display: flex; }
.pv-id-nav { flex: none; width: 190px; padding: 10px 8px; overflow-y: auto; border-right: 1px solid var(--border); }
.pv-id-head { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--c-6a6d78); }
.pv-id-sec { width: 100%; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px;
  background: none; color: var(--c-c9ccd6); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.pv-id-sec svg { flex: none; color: var(--c-9aa0b0); }
.pv-id-sec:hover { background: var(--c-2a2f3f); }
.pv-id-sec.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-id-sec.soon { color: var(--c-8b90a0); }
.pv-id-list { flex: 1; min-width: 0; overflow-y: auto; padding: 8px 8px 12px; }
.pv-id-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--c-6a6d78); }
.pv-id-row { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px; border-radius: 6px; cursor: pointer;
  font-size: 13.5px; color: var(--c-c9ccd6); }
.pv-id-row.on { background: rgba(var(--accent-rgb), 0.14); color: var(--on-bg); }
.pv-id-row.soon { cursor: default; color: var(--c-8b90a0); }
.pv-id-name .hit { color: var(--accent); }
.pv-id-star { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none;
  color: var(--c-50535e); cursor: pointer; }
.pv-id-star:hover { color: var(--c-9aa0b0); }
.pv-id-star.fav { color: #f7c948; }
.pv-id-soon { margin-left: auto; padding: 1px 8px; border-radius: 9px; background: var(--c-262b39); color: var(--c-9aa0b0); font-size: 11px; }
.pv-id-empty { padding: 28px 14px; color: var(--c-8b90a0); font-size: 13px; line-height: 1.5; }
@media (max-width: 640px) { .pv-id-nav { width: 132px; } }
/* An indicator's settings card (indicators/settings.ts) */
.pv-ind-settings .pv-ind-num { width: 110px; }
.pv-ind-settings .pv-ind-select { width: 170px; }
.pv-ind-settings .pv-ind-num:disabled, .pv-ind-settings .pv-ind-select:disabled { opacity: 0.45; }
/* a setting's (?) (owner's recording 2026-11-23 14:59: TradingView's filled circle), in a column every row keeps so
   the fields line up */
.pv-ind-tip { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 50%; margin-left: 8px;
  background: var(--c-6a6d78); color: var(--panel); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; }
.pv-ind-tip:hover { background: var(--c-9aa0b0); }
.pv-ind-tip.pv-ind-tip-none { background: none; cursor: default; }
.pv-ind-row { cursor: default; }
/* hovered: only as wide as its content, the panel's colour with a border (light and dark themes), as TradingView's */
.pv-ind-row:hover { background: var(--panel); border-color: var(--border); }
.pv-ind-settings { width: 420px; }
.pv-ind-settings .pv-check { white-space: nowrap; }
.pv-ind-settings .pv-set-wide { flex: 1; min-width: 0; }
.pv-ind-settings .pv-select { width: 190px; }
.pv-ind-settings .pv-select:disabled { opacity: 0.45; cursor: default; }
/* An indicator's row: its buttons show on hover (indicators/chartIndicators.ts), as TradingView's */
.pv-ind-acts { display: none; align-items: center; gap: 1px; margin-left: -4px; }
.pv-ind-row:hover .pv-ind-acts { display: inline-flex; }
.pv-ind-row .pv-ind-btn { width: 24px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 4px; background: none;
  color: var(--c-b2b5be); cursor: pointer; padding: 0; }
.pv-ind-row .pv-ind-btn:hover { background: var(--border); color: var(--on-bg); }
.pv-ind-row.off .pv-ind-btn:first-child { color: var(--c-6a6d78); }
.pv-pop-menu .pv-menu-item.disabled .pv-ctx-key { font-size: 11px; color: var(--c-6a6d78); }
.pv-pop-menu { max-height: none; overflow: visible; }

/* PlotVibe's number field (ui/controls.ts numberField): its own up / down arrows; the browser's are hidden everywhere */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pv-num { position: relative; display: inline-flex; align-items: center; }
.pv-num .pv-num-input { width: 100%; padding-right: 24px; }
.pv-num-arrows { position: absolute; right: 4px; top: 3px; bottom: 3px; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transition: opacity 0.12s; }
.pv-num:hover .pv-num-arrows, .pv-num:focus-within .pv-num-arrows { opacity: 1; }
.pv-num-arrows button { width: 18px; height: 13px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 3px;
  background: none; color: var(--c-9aa0b0); cursor: pointer; }
.pv-num-arrows button:hover { background: var(--border); color: var(--on-bg); }
.pv-num.disabled { opacity: 0.45; }
.pv-num.disabled .pv-num-arrows { display: none; }
/* the indicator card: its fields and dropdowns all one width */
.pv-ind-settings .pv-num, .pv-ind-settings .pv-select { width: 170px; flex: none; }
.pv-ind-settings .pv-ind-num { width: 100%; }
.pv-ind-settings .pv-card-head .pv-card-gap { flex: 1; }
.pv-ind-settings .pv-card-head b { flex: none; }
/* docked to the right of the chart (as the order ticket) */
.pv-ind-settings.docked { position: static; width: auto; max-width: none; height: 100%; display: flex; flex-direction: column;
  border: 0; border-radius: 0; box-shadow: none; animation: none; background: var(--panel); }
.pv-ind-settings.docked .pv-card-head { cursor: default; }
.pv-ind-settings.docked .pv-settings-body { flex: 1; max-height: none; }
/* An indicator's source code (indicators/source.ts), read-only */
.pv-ind-source { width: min(760px, calc(100vw - 24px)); }
.pv-src-note { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; padding: 7px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(247, 166, 0, 0.12); color: #f7a600; }
.pv-src-tabs { display: flex; gap: 4px; padding: 0 16px; }
.pv-src-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px 7px 0 0; background: none; color: var(--c-9aa0b0); font: inherit;
  font-size: 12px; cursor: pointer; }
.pv-src-tab.on { background: rgba(var(--accent-rgb), 0.2); color: var(--on-bg); }
.pv-src-code { margin: 0 16px 16px; max-height: min(62vh, 560px); overflow: auto; background: var(--c-171b26); border-radius: 0 8px 8px 8px;
  padding: 8px 0; font: 12px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; }
.pv-src-line { display: flex; white-space: pre; }
.pv-src-no { flex: none; width: 44px; padding-right: 12px; text-align: right; color: var(--c-6a6d78); user-select: none; }
.pv-src-text { padding-right: 16px; color: var(--c-c9ccd6); }
.pv-src-text .c { color: #6a9955; } .pv-src-text .s { color: #ce9178; } .pv-src-text .n { color: #b5cea8; } .pv-src-text .k { color: #569cd6; }
/* an alert on an indicator's line: the line chosen in place of a price */
.pv-al-onind .al-target + .pv-select, .pv-al-onind .pv-select.al-target { min-width: 0; }
/* A card from the right of the chart, docked or not (ui/dockCard.ts): Source code, About this script */
.pv-dock-card .pv-card-head .pv-card-gap { flex: 1; }
.pv-dock-card .pv-card-head b { flex: none; }
.pv-dock-card.pv-dc-in { animation: pv-dc-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pv-dc-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.pv-dock-card.docked { position: static; width: auto; max-width: none; height: 100%; display: flex; flex-direction: column;
  border: 0; border-radius: 0; box-shadow: none; animation: none; background: var(--panel); }
.pv-dock-card.docked .pv-card-head { cursor: default; }
.pv-dock-card.docked .pv-src-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pv-dock-card.docked .pv-src-code { flex: 1; max-height: none; }
.pv-ind-about { width: 360px; }
.pv-about-body { padding: 0 16px 16px; font-size: 13px; line-height: 1.55; color: var(--text); }
.pv-about-body p { margin: 0 0 10px; }
/* checkboxes keep their size in a narrow row; tabs show the hand (owner's recording 2026-11-22) */
.pv-check span { flex: none; }
.pv-tabs .pv-tab { cursor: pointer; }
/* the loading mark on a light background (the light theme, or a chart whose background the trader set light: its
   [data-chartbg] is worked out from the colour, chart/view.ts): the P dark, as the light logo */
:root[data-theme="light"] .pv-loader-mark, [data-chartbg="light"] .pv-loader-mark { content: url(/static/brand/pv-loader-light.svg); }
:root[data-theme="light"] [data-chartbg="dark"] .pv-loader-mark { content: url(/static/brand/pv-loader.svg); }
/* an indicator moved to a pane of its own: its row at the pane's top left (indicators/chartIndicators.ts) */
.pv-ind-panelegend { position: absolute; padding: 2px 6px; }
.pv-ind-panelegend .pv-ind-legend { margin-top: 0; }
/* a selected indicator (its line clicked): its row marked with its buttons showing, as TradingView's */
.pv-ind-row.selected { background: var(--panel); border-color: var(--accent); }
.pv-ind-row.selected .pv-ind-acts { display: inline-flex; }
/* a pane's buttons at its top right, on mouse over (move up / down, delete, collapse, maximize) */
.pv-pane-btns { position: absolute; z-index: 6; display: flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.pv-pane-btns.on, .pv-pane-btns:hover { opacity: 1; pointer-events: auto; }
.pv-pane-btn { width: 26px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 5px;
  background: var(--panel); color: var(--text); cursor: pointer; }
.pv-pane-btn:hover { color: var(--on-bg); border-color: var(--c-4a5168); }
.pv-pane-btn:disabled { opacity: 0.35; cursor: default; }
/* another pane maximized: the chart pane's own things hidden; the chart pane collapsed: its title line only */
.pv-main-hidden > .lastprice, .pv-main-hidden > .pv-brand, .pv-main-hidden > .pv-legend:not(.pv-ind-panelegend),
.pv-main-hidden > .pv-scalebtns, .pv-main-hidden > .pv-al-plus, .pv-main-hidden > .pt-layer, .pv-main-hidden > .drawings-canvas,
.pv-main-strip > .lastprice, .pv-main-strip > .pv-brand, .pv-main-strip > .pv-scalebtns, .pv-main-strip > .pv-al-plus,
.pv-main-strip > .pt-layer { display: none !important; }
.pv-main-strip > .pv-legend:not(.pv-ind-panelegend) { max-height: 20px; overflow: hidden; padding-top: 0; padding-bottom: 0; top: 2px; }
/* the hand on anything clickable (owner, 2026-11-23); zero weight, so a part's own cursor still wins */
:where(button:not(:disabled), select:not(:disabled), summary, a[href], [role="button"], label.pv-check,
  input[type="checkbox"], input[type="radio"], .pv-menu-item:not(.disabled), .pv-tab, .pv-src-tab) { cursor: pointer; }
/* Table view (indicators/tableView.ts): the candles and the indicators' values as a table over the charts' area */
.pv-table-view { position: fixed; z-index: 40; display: flex; flex-direction: column; background: var(--bg); color: var(--text); outline: none; }
.pv-tv-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; font-size: 15px; }
.pv-tv-head .pv-card-gap { flex: 1; }
.pv-tv-sub { color: var(--c-9aa0b0); }
.pv-tv-tools { padding: 4px 12px 10px; border-bottom: 1px solid var(--border); }
.pv-tv-dl { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; font-size: 13px; }
.pv-tv-dl:hover { background: var(--panel); }
.pv-tv-scroll { flex: 1; overflow: auto; }
.pv-tv-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.pv-tv-table th { position: sticky; background: var(--bg); color: var(--c-9aa0b0); font-weight: 500; text-align: right; padding: 8px 12px;
  border-bottom: 1px solid var(--border); white-space: nowrap; }
.pv-tv-table thead tr:first-child th { top: 0; z-index: 1; }
.pv-tv-table thead tr:last-child th { top: 33px; z-index: 1; }
.pv-tv-table th.pv-tv-group { text-align: center; color: var(--text); }
.pv-tv-table th.pv-tv-ind { border-left: 1px solid var(--border); }
.pv-tv-table th.pv-tv-date, .pv-tv-table td.pv-tv-date { text-align: left; border-right: 1px solid var(--border); }
.pv-tv-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; }
.pv-tv-table tbody tr:hover { background: var(--panel); }
.pv-tv-table tbody td:hover { background: var(--border); }
.pv-tv-table td.up { color: var(--up, #089981); } .pv-tv-table td.down { color: var(--down, #f23645); }
/* a level's row in an indicator's Style tab: its line chip, then its value (RSI's 70) */
.pv-ind-settings .pv-ind-level { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pv-ind-settings .pv-ind-level .pv-num { width: 90px; }
/* an indicator's Style rows: the label takes the room left by its chip (and a level's value), not the drawing
   card's fixed 96 px (long names: "Overbought Gradient Fill") */
.pv-ind-settings .pv-card-row .pv-check.pv-set-wide { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.pv-ind-settings .pv-card-row .pv-linechip, .pv-ind-settings .pv-card-row .pv-ind-level { flex: none; margin-left: auto; }
/* a docked card (source code, about, an indicator's settings) sat over its panel's left edge, so the edge could not
   be dragged (owner's recording 2026-11-23): the edge on top */
.pv-dc-panel > .pv-side-grip, .pv-ind-dock > .pv-side-grip { z-index: 50; }
/* (a docked card is a flex item of its panel: its floating card's z-index lifted it over the panel's edge) */
.pv-dock-card.docked, .pv-ind-settings.docked { z-index: auto; }
/* narrow docked cards (owner's recording 2026-11-23 10:09): the title shortens with … so Undock and × stay in
   reach; the settings card's labels, fields, tabs and buttons stay on one line, the fields narrowing first */
.pv-dock-card .pv-card-head b, .pv-ind-settings .pv-card-head b { flex: 0 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.pv-dock-card .pv-card-head .pv-card-x, .pv-ind-settings .pv-card-head .pv-card-x { flex: none; }
.pv-ind-settings .pv-set-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pv-ind-settings .pv-card-row .pv-num, .pv-ind-settings .pv-card-row .pv-select { flex: 0 1 170px; min-width: 96px; }
.pv-ind-settings .pv-card-row .pv-ind-level .pv-num { flex: 0 1 90px; min-width: 64px; }
.pv-ind-settings .pv-tab { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ind-settings .pv-card-foot { flex-wrap: nowrap; }
.pv-ind-settings .pv-card-foot .pv-btn { padding: 0 12px; white-space: nowrap; flex: none; }
.pv-ind-settings .pv-card-foot .pv-tpl-wrap { min-width: 0; }
.pv-ind-settings .pv-card-row .pv-set-label { flex: 1 1 auto; min-width: 84px; }
/* a plot's colours beneath it (MACD's histogram: Color 0…3) */
.pv-ind-settings .pv-card-row.pv-ind-sub .pv-set-label { padding-left: 26px; }
.pv-ind-settings .pv-card-row.pv-ind-sub .pv-linechip { margin-left: auto; }
/* an alert's line can be dragged from anywhere on it (owner, 2026-11-23): the drag hand over it, a closed hand while
   dragging (owner's correction 2026-11-23 11:23: TradingView's up / down arrows, over the line, its tag and while
   dragging; over everything on the chart, whose own cursors would win otherwise) */
.pv-al-hover canvas, .pv-al-hover .drawings-host { cursor: ns-resize !important; }
.pv-al-dragging, .pv-al-dragging *, .pv-al-dragging canvas { cursor: ns-resize !important; }
/* About this script as an article (indicators/source.ts): contents, sections, pictures */
.pv-ind-about.pv-about-article { width: 480px; }
.pv-about-article .pv-about-body { max-height: min(72vh, 640px); overflow: auto; }
.pv-dock-card.docked .pv-about-body { flex: 1; min-height: 0; max-height: none; overflow: auto; }
.pv-about-toc { margin: 4px 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--c-171b26); }
.pv-about-toc ol { margin: 6px 0 0; padding-left: 20px; }
.pv-about-toc a { color: var(--accent); text-decoration: none; }
.pv-about-toc a:hover { text-decoration: underline; }
.pv-about-sec h3 { margin: 16px 0 6px; font-size: 14px; color: var(--on-bg); }
.pv-about-sec figure { margin: 8px 0 12px; }
.pv-about-sec img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.pv-about-sec figcaption { margin-top: 4px; font-size: 11.5px; color: var(--c-9aa0b0); }
/* the article's scroll bar, clearly visible (owner's correction 2026-11-23): a track, a firmer thumb, room beside it */
.pv-about-article .pv-about-body { scrollbar-gutter: stable; }
.pv-about-article .pv-about-body::-webkit-scrollbar { width: 12px; }
.pv-about-article .pv-about-body::-webkit-scrollbar-track { background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.pv-about-article .pv-about-body::-webkit-scrollbar-thumb { background-color: color-mix(in srgb, var(--text) 38%, transparent);
  border-width: 3px; min-height: 40px; }
.pv-about-article .pv-about-body::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text) 55%, transparent); }
.pv-about-article .pv-about-body::-webkit-scrollbar-thumb:active { background-color: var(--sb-thumb-active); }
@supports not selector(::-webkit-scrollbar) { .pv-about-article .pv-about-body { scrollbar-width: auto;
  scrollbar-color: color-mix(in srgb, var(--text) 38%, transparent) color-mix(in srgb, var(--text) 7%, transparent); } }
/* the contents bar: stays at the top of the article once the contents list has scrolled away (takes no room) */
.pv-about-bar { position: sticky; top: 0; height: 0; z-index: 3; margin: 0 -16px; }
.pv-about-bar-in { display: flex; align-items: center; gap: 4px; padding: 6px 12px; background: var(--panel);
  border-bottom: 1px solid var(--border); box-shadow: 0 4px 10px var(--shadow-03); position: relative;
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.pv-about-bar.shown .pv-about-bar-in { opacity: 1; transform: none; pointer-events: auto; }
.pv-about-jump { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px;
  border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.pv-about-jump svg:first-child { flex: none; color: var(--accent); }
.pv-about-jump svg:last-child { flex: none; color: var(--c-8b90a0); transition: transform 0.15s; }
.pv-about-bar.open .pv-about-jump svg:last-child { transform: rotate(180deg); }
.pv-about-cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pv-about-top { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: none; color: var(--c-8b90a0); cursor: pointer; }
.pv-about-jump:hover, .pv-about-top:hover, .pv-about-bar.open .pv-about-jump { background: var(--c-2a2f3f); color: var(--text); }
.pv-about-menu { display: none; position: absolute; left: 10px; right: 10px; top: calc(100% + 4px); padding: 5px;
  background: var(--c-1e222d-098); border: 1px solid var(--c-2f3546); border-radius: 10px;
  box-shadow: 0 12px 32px var(--shadow-05), 0 2px 6px var(--shadow-03); max-height: 60vh; overflow-y: auto; }
.pv-about-bar.open .pv-about-menu { display: block; animation: pv-pop 0.12s ease-out; }
.pv-about-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px 7px 8px; border: 0;
  border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.pv-about-item svg { flex: none; color: var(--c-6a6d78); }
.pv-about-item:hover { background: var(--c-2a2f3f); }
.pv-about-item.on { color: var(--accent); }
.pv-about-item.on svg { color: var(--accent); }
/* a section reached from the contents lands below the bar */
.pv-about-article .pv-about-sec { scroll-margin-top: 48px; }
/* docked, the article takes its panel's width (its floating 480px pushed it, and its scroll bar, under the right toolbar) */
.pv-dock-card.docked.pv-ind-about, .pv-dock-card.docked.pv-ind-source { width: auto; min-width: 0; }
/* the right sidebar's buttons dragged into the trader's order (ui/rightbarOrder.ts) */
.pv-rightbar.pv-rb-sorting, .pv-rightbar.pv-rb-sorting * { cursor: var(--pv-grabbing) !important; }
/* the dragged button follows the pointer over the others (owner, 2026-11-23: "I love it"); the bar is the buttons'
   offset parent, so the button's place is measured within it */
.pv-rightbar { position: relative; }
.pv-rightbar-btn.pv-rb-drag { position: relative; z-index: 2; background: var(--c-2a2f3f); color: var(--on-bg);
  box-shadow: 0 4px 12px var(--shadow-03); transition: none; }
.pv-rightbar.pv-rb-sorting .pv-rightbar-btn:not(.pv-rb-drag) { transition: none; }
/* the left scale's gear (indicators pinned to a new left scale), in the corner under it, as TradingView's */
.pv-lscale-gear { position: absolute; z-index: 6; width: 26px; height: 24px; display: grid; place-items: center; border: 0;
  border-radius: 6px; background: none; color: var(--c-8b90a0); cursor: pointer; }
.pv-lscale-gear:hover { background: var(--c-363c4e); color: var(--on-bg); }
.pv-lscale-gear[hidden], .pv-scalebtns[hidden] { display: none; }
/* a download's progress (Settings › Claude › Voice to text: the speech model; owner, 2026-11-23) */
.pv-dl-bar { height: 6px; margin: 6px 0 10px; border-radius: 3px; background: var(--c-2a2f3f); overflow: hidden; }
.pv-dl-bar > span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width 0.4s ease-out; }
.pv-dl-bar.pv-dl-unknown > span { width: 30% !important; animation: pv-dl-slide 1.2s ease-in-out infinite; }
@keyframes pv-dl-slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.pv-dl-bar[hidden] { display: none; }
/* (a hidden settings button stays hidden: Download the model now while the model downloads) */
.pv-app-btn[hidden] { display: none; }
/* nothing on the chart is selected as text (owner's recording 2026-11-23 22:17: dragging a drawing up over the symbol's
   title and prices selected them, blue boxes that stayed after a click elsewhere; TradingView's chart selects none) */
.pv-grid, .pv-chart, .pv-legend, .pv-legend * { -webkit-user-select: none; user-select: none; }
.pv-chart input, .pv-chart textarea, .pv-chart [contenteditable="true"] { -webkit-user-select: text; user-select: text; }

/* the emoji and icon picker, as TradingView's (owner's recordings 2026-11-23 22:17 and 23:46) */
.pv-iconpick { width: 330px; display: flex; flex-direction: column; gap: 8px; }
.pv-iconfly { padding: 10px; }
.pv-iconpick-cats { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.pv-iconpick-cat { flex: none; min-width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: inherit;
  cursor: pointer; font-size: 18px; border-bottom: 2px solid transparent; }
.pv-iconpick-cats:not(.text) .pv-iconpick-cat { flex: 1 1 0; min-width: 0; padding: 0; font-size: 17px; }
.pv-iconpick-cats:not(.text) { overflow: hidden; }
.pv-iconpick-cats.text { overflow: visible; display: block; }
.pv-iconpick-select { width: 100%; }
.pv-iconpick-cat:hover { background: var(--hover, rgba(127,127,127,.15)); }
.pv-iconpick-cat.on { border-bottom-color: var(--accent); color: var(--accent); border-radius: 6px 6px 0 0; }
.pv-iconpick-search { width: 100%; box-sizing: border-box; height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border, #363a45);
  background: var(--input-bg, transparent); color: inherit; font: inherit; }
.pv-iconpick-body { height: 330px; overflow-y: auto; padding-right: 2px; }
.pv-iconpick-head { font-size: 11px; font-weight: 600; opacity: .65; margin: 4px 2px 6px; text-transform: uppercase; letter-spacing: .04em; }
.pv-iconpick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.pv-iconpick-btn { display: grid; place-items: center; height: 36px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.pv-iconpick-btn.emoji { font-size: 24px; line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.pv-iconpick-btn:hover { background: var(--hover, rgba(127,127,127,.15)); }
.pv-iconpick-btn.on { background: var(--accent-soft); color: var(--accent); }
.pv-iconpick-note { padding: 14px 4px; opacity: .7; font-size: 12px; }
.pv-iconpick-credit { font-size: 10px; opacity: .45; margin: 8px 2px 2px; }
.pv-iconpick-tabs { display: flex; justify-content: center; gap: 4px; border-top: 1px solid var(--border, #363a45); padding-top: 6px; }
.pv-iconpick-tab { border: 0; background: transparent; color: inherit; font: inherit; padding: 6px 14px; cursor: pointer; opacity: .75;
  border-bottom: 2px solid transparent; }
.pv-iconpick-tab.on { opacity: 1; color: var(--accent); border-bottom-color: var(--accent); }

/* a watchlist's icon (owner's recording 2026-11-23 22:17: TradingView's lists each show one) */
.pv-wl-icon { flex: none; vertical-align: -3px; margin-right: 6px; opacity: .9; }
.pv-wl-iconpick { margin-top: 12px; }
.pv-wl-icongrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-top: 6px; }
.pv-wl-iconbtn { display: grid; place-items: center; height: 32px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.pv-wl-iconbtn span { font-size: 10px; opacity: .7; }
.pv-wl-iconbtn:hover { background: var(--hover, rgba(127,127,127,.15)); }
.pv-wl-iconbtn.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pv-set-unit { color: var(--muted); font-size: 12px; margin-left: 6px; white-space: nowrap; }

/* grab and grabbing hands that show on any chart (owner's recording 2026-11-24 00:22: the system's white hand
   vanished on the white theme while dragging): a dark hand on a white edge (Tabler's hands, MIT) */
:root { --pv-grab: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5M14 5.5a1.5 1.5 0 0 1 3 0v6.5M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47%22 stroke=%22%23fff%22 stroke-width=%224.5%22/%3E%3Cpath d=%22M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5M14 5.5a1.5 1.5 0 0 1 3 0v6.5M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47%22 stroke=%22%23131722%22 stroke-width=%221.8%22/%3E%3C/svg%3E") 12 12, grab; --pv-grabbing: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 11v-3.5a1.5 1.5 0 0 1 3 0v2.5M11 9.5v-3a1.5 1.5 0 0 1 3 0v3.5M14 7.5a1.5 1.5 0 0 1 3 0v2.5M17 9.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7l-.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47%22 stroke=%22%23fff%22 stroke-width=%224.5%22/%3E%3Cpath d=%22M8 11v-3.5a1.5 1.5 0 0 1 3 0v2.5M11 9.5v-3a1.5 1.5 0 0 1 3 0v3.5M14 7.5a1.5 1.5 0 0 1 3 0v2.5M17 9.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7l-.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47%22 stroke=%22%23131722%22 stroke-width=%221.8%22/%3E%3C/svg%3E") 12 12, grabbing; }
.pv-no-plus .pv-al-plus { display: none !important; } /* the price scale's gear menu: Plus button off */

/* Connections (ui/connections.ts): cTrader accounts and MetaTrader 5, where the charts' prices come from. */
.pv-conn-card { z-index: 140; width: 420px; }
.pv-conn-card .pv-card-body { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 190px); overflow-y: auto; }
.pv-conn-lede { margin: 0 0 4px; color: var(--muted); }
.pv-conn-section { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.pv-conn-ic { display: grid; place-items: center; color: var(--c-9aa0b0); }
.pv-conn-tag { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: var(--accent-text); }
.pv-conn-tag:empty { display: none; }
.pv-conn-note { margin: 0; color: var(--muted); line-height: 1.5; }
.pv-conn-list { display: flex; flex-direction: column; gap: 4px; }
.pv-conn-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--c-2f3546); border-radius: 9px; }
.pv-conn-row.on { border-color: var(--accent); }
.pv-conn-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-conn-card .pv-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pv-conn-card .pv-btn span:empty { display: none; }
.pv-conn-x { padding: 4px 6px; }
.pv-conn-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pv-conn-connect, .pv-conn-use-mt5 { align-self: flex-start; }
/* Connect MT5 (ui/connections.ts): the investor-password form under the MT5 accounts. */
.pv-conn-mt5form { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--c-2f3546); border-radius: 10px; }
.pv-conn-mt5form[hidden] { display: none; }
.pv-conn-mt5form .pa-label { margin-top: 4px; }
.pv-mt5-term-wrap { display: flex; flex-direction: column; gap: 6px; }
.pv-mt5-term-wrap[hidden] { display: none; }
.pv-mt5-wait:empty { display: none; }
.pv-conn-mt5-open { align-self: flex-start; }
/* The first screen after download, "Connect your broker" (ui/welcome.ts): three choices over a dimmed app. */
.pv-welcome-back { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 10, 16, 0.72); backdrop-filter: blur(3px); animation: pv-pop 0.16s ease-out; overflow-y: auto; }
.pv-welcome { position: relative; width: min(880px, 100%); background: var(--c-1e222d-099); border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 18px; padding: 0 28px 26px; box-shadow: 0 24px 64px var(--shadow-06), 0 0 80px rgba(var(--accent-rgb), 0.18);
  color: var(--text); overflow: hidden; }
.pv-welcome-x { position: absolute; top: 12px; right: 12px; }
.pv-welcome-head { max-width: 620px; }
.pv-welcome-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pv-welcome h2 { margin: 6px 0 8px; font-size: 26px; line-height: 1.2; }
.pv-welcome-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.pv-welcome-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.pv-welcome-choice { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--c-2f3546);
  border-radius: 14px; font-size: 13px; }
.pv-welcome-choice b { font-size: 16px; }
.pv-welcome-choice p { margin: 0; color: var(--muted); line-height: 1.5; flex: 1; }
.pv-wc-ctrader { border-color: var(--accent); }
.pv-welcome-badge { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 600; color: #fff; background: var(--accent);
  padding: 3px 8px; border-radius: 999px; }
.pv-welcome-ic { color: var(--c-9aa0b0); }
.pv-welcome-choice .pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.pv-welcome-note { font-size: 12px; color: var(--muted); }
.pv-welcome-note:empty { display: none; }
@media (max-width: 720px) {
  .pv-welcome { padding: 22px 18px 18px; }
  .pv-welcome h2 { font-size: 22px; }
  .pv-welcome-choices { grid-template-columns: minmax(0, 1fr); }
}
/* (owner, 2026-11-25) the Connections card's sections: their note, list and buttons spaced apart. */
.pv-conn-ctrader, .pv-conn-mt5 { display: flex; flex-direction: column; gap: 10px; }
.pv-conn-ctrader .pv-conn-more, .pv-conn-mt5 .pv-conn-more { margin-top: 0; }
.pv-mt5-server[hidden] { display: none; }
/* (owner, 2026-11-25) the welcome's art: PlotVibe's violet sky and ribbon above the title, the brand colour throughout. */
.pv-welcome-hero { position: relative; height: 200px; margin: 0 -28px 22px; overflow: hidden;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.3); }
.pv-welcome-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-welcome-brand { position: absolute; left: 28px; bottom: 22px; display: flex; align-items: center; gap: 12px;
  color: #fff; font-size: 30px; font-weight: 700; letter-spacing: .01em; text-shadow: 0 2px 18px rgba(var(--accent-rgb), 0.6); }
.pv-welcome-brand img { width: 64px; height: 64px; filter: drop-shadow(0 6px 22px rgba(var(--accent-rgb), 0.75)); }
.pv-welcome-x { z-index: 2; color: #fff; }
.pv-welcome-eyebrow { color: var(--accent-text); }
.pv-wc-ctrader { border-color: rgba(var(--accent-rgb), 0.7); background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), transparent 70%); }
.pv-welcome-badge { background: var(--accent-grad); }
.pv-welcome-ic { color: var(--accent-text); }
.pvw-ribbon { animation: pvw-drift 9s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes pvw-drift { from { transform: translateY(0) scaleY(1); } to { transform: translateY(-6px) scaleY(1.04); } }
@media (prefers-reduced-motion: reduce) { .pvw-ribbon { animation: none; } }
@media (max-width: 720px) {
  .pv-welcome { padding: 0 18px 18px; }
  .pv-welcome-hero { height: 150px; margin: 0 -18px 18px; }
  .pv-welcome-brand { left: 18px; bottom: 16px; font-size: 24px; }
  .pv-welcome-brand img { width: 48px; height: 48px; }
}

/* (owner, 2026-11-25) the welcome's wordmark as the chart's (.pv-brand): Exo 2 bold italic, white into the P's
   lavender, letters as tall as the mark (34.5 : 28 of the mark's height, gap and nudge scaled the same). */
.pv-welcome-brand { gap: 6px; text-shadow: none; filter: drop-shadow(0 2px 16px rgba(var(--accent-rgb), 0.55)); }
.pv-welcome-brand img { width: auto; height: 52px; filter: drop-shadow(0 6px 22px rgba(var(--accent-rgb), 0.75)); }
.pv-welcome-brand span { font-family: 'Exo 2', var(--pv-font, sans-serif); font-style: italic; font-weight: 700; font-size: 64px;
  line-height: 1; letter-spacing: 0.01em; transform: translateY(-3px); padding-right: 4px; color: transparent;
  background: linear-gradient(180deg, #ffffff 30%, #c9b8ff); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 720px) {
  .pv-welcome-brand { gap: 4px; }
  .pv-welcome-brand img { height: 40px; }
  .pv-welcome-brand span { font-size: 49px; transform: translateY(-2px); }
}
/* Accounts (ui/account.ts; owner, 2026-11-26): the sign-in card and the profile, over a dimmed app, in the welcome's
   violet. A signed-in avatar shows the person's initials on the brand gradient. */
.pv-avatar.signed { background: var(--accent-grad); color: #fff; }
.pv-avatar-initials { font-weight: 700; font-size: 12px; letter-spacing: .02em; line-height: 1; }
.pv-avatar.big .pv-avatar-initials { font-size: 15px; }
.pv-avatar.huge { width: 72px; height: 72px; flex: none; background: var(--accent-grad); color: #fff; border: 3px solid var(--c-1e222d-099);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.45); }
.pv-avatar.huge .pv-avatar-initials { font-size: 26px; }
.pv-acct-back { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 16px; overflow-y: auto;
  background: rgba(8, 10, 16, 0.72); backdrop-filter: blur(3px); animation: pv-pop 0.16s ease-out; }
.pv-acct { position: relative; width: min(440px, 100%); background: var(--c-1e222d-099); color: var(--text);
  border: 1px solid rgba(var(--accent-rgb), 0.35); border-radius: 18px; padding: 0 28px 24px; overflow: hidden;
  box-shadow: 0 24px 64px var(--shadow-06), 0 0 80px rgba(var(--accent-rgb), 0.18); font-size: 13px; }
.pv-acct-hero { position: relative; height: 120px; margin: 0 -28px 18px; overflow: hidden; border-bottom: 1px solid rgba(var(--accent-rgb), 0.3); }
.pv-acct-hero.short { height: 84px; margin-bottom: 0; }
.pv-acct-brand { position: absolute; left: 28px; bottom: 16px; display: flex; align-items: center; gap: 10px; color: #fff;
  font-family: "Exo 2", var(--font, system-ui), sans-serif; font-style: italic; font-weight: 700; font-size: 28px;
  text-shadow: 0 2px 18px rgba(var(--accent-rgb), 0.6); }
.pv-acct-brand span { background: linear-gradient(180deg, #fff 30%, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-acct-brand img { width: 44px; height: 44px; filter: drop-shadow(0 6px 22px rgba(var(--accent-rgb), 0.75)); }
.pv-acct-x { position: absolute; top: 10px; right: 10px; z-index: 2; color: #fff; }
.pv-acct-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--c-171b26); margin-bottom: 16px; }
.pv-acct-tabs[hidden] { display: none; }
.pv-acct-tabs button { height: 32px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.pv-acct-tabs button:hover { color: var(--on-bg); }
.pv-acct-tabs button.on { background: var(--accent-grad); color: #fff; }
.pv-acct-title { margin: 0 0 4px; font-size: 20px; line-height: 1.25; text-wrap: balance; }
.pv-acct-lede { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.pv-acct-lede[hidden] { display: none; }
.pv-acct-form { display: flex; flex-direction: column; gap: 6px; }
.pv-acct-form[hidden] { display: none; }
.pv-acct-form .pa-label { margin-top: 6px; }
.pv-acct-form .pv-field { width: 100%; box-sizing: border-box; height: 36px; }
.pv-acct-form .pv-field.bad { border-color: var(--c-ff8a95); box-shadow: 0 0 0 3px rgba(255, 138, 149, 0.15); }
.pv-acct-select { cursor: pointer; }
.pv-acct-hint { color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.pv-acct-pass { position: relative; }
.pv-acct-pass .pv-field { padding-right: 38px; }
.pv-acct-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 30px; height: 28px;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pv-acct-eye:hover, .pv-acct-eye.on { color: var(--accent-text); }
.pv-acct-link { align-self: flex-start; padding: 2px 0; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; }
.pv-acct-link:hover { text-decoration: underline; }
.pv-acct .pv-acct-go { margin-top: 12px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pv-acct .pv-acct-go[hidden] { display: none; }
.pv-acct-error { margin: 10px 0 0; }
.pv-acct-error:empty { display: none; }
/* the profile */
.pv-acct-profile { width: min(480px, 100%); }
.pv-pf-head { display: flex; align-items: flex-end; gap: 14px; margin: -30px 0 14px; position: relative; }
.pv-pf-head > div { min-width: 0; padding-bottom: 4px; }
.pv-pf-name { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.pv-pf-sub { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pv-pf-at { display: flex; align-items: center; gap: 6px; }
.pv-pf-at span { color: var(--muted); font-weight: 600; }
.pv-pf-url { color: var(--on-bg); font-weight: 600; }
.pv-pf-row { display: flex; align-items: center; gap: 12px; }
.pv-pf-saved { margin-top: 12px; color: var(--accent-text); font-weight: 600; }
.pv-pf-more { margin-top: 16px; border-top: 1px solid var(--c-2a2f3f); padding-top: 12px; }
.pv-pf-more summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; list-style: none; }
.pv-pf-more summary::-webkit-details-marker { display: none; }
.pv-pf-more summary:hover { color: var(--accent-text); }
.pv-pf-more .pv-acct-form { margin-top: 8px; }
.pv-pf-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 18px; border-top: 1px solid var(--c-2a2f3f); padding-top: 14px; }
.pv-pf-foot .pv-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
@media (max-width: 480px) {
  .pv-acct { padding: 0 18px 18px; }
  .pv-acct-hero { margin: 0 -18px 16px; }
  .pv-acct-brand { left: 18px; }
}
