:root,
[data-bs-theme="light"] {
    --lw-plane: #ffffff;
    --lw-surface: #ffffff;
    --lw-ink: #131722;
    --lw-secondary: #4a4f5c;
    --lw-muted: #6a6d78;
    --lw-grid: #eef0f5;
    --lw-border: #e0e3eb;
    --lw-up: #089981;
    --lw-down: #f23645;
    --lw-datum: #8a94a6;
    --lw-band: #d19c00;
    --lw-accent: #2962ff;
    --lw-equity: #2962ff;
    --lw-balance: #089981;
    --lw-entry: #d19c00;
    --lw-exit: #8e51d6;
    --lw-long: #2962ff;
    --lw-short: #f23645;
    --lw-benchmark-0: #8e51d6;
    --lw-benchmark-1: #e8710a;
    --lw-benchmark-2: #0891b2;
    --lw-benchmark-3: #d19c00;
    --lw-traded: #6f8fbf;
}

[data-bs-theme="dark"] {
    --lw-plane: #0b0e14;
    --lw-surface: #131722;
    --lw-ink: #ffffff;
    --lw-secondary: #b8c0cc;
    --lw-muted: #7b8798;
    --lw-grid: #1e2431;
    --lw-border: #2a3242;
    --lw-up: #00e07a;
    --lw-down: #ff3b5c;
    --lw-datum: #8a94a6;
    --lw-band: #ffd23d;
    --lw-accent: #3d9bff;
    --lw-equity: #3d9bff;
    --lw-balance: #00e07a;
    --lw-entry: #ffd23d;
    --lw-exit: #c77dff;
    --lw-long: #3d9bff;
    --lw-short: #ff3b5c;
    --lw-traded: #4a7fd4;
    --lw-benchmark-0: #a77bff;
    --lw-benchmark-1: #ff8a3d;
    --lw-benchmark-2: #22d3ee;
    --lw-benchmark-3: #ffd23d;
}

.lightweight {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.lightweight-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.lightweight-chart {
    height: 70vh;
}

.page:has(> .lightweight-fill) {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.lightweight-fill {
    flex: 1 1 auto;
    min-height: 0;
}

.lw-pane {
    display: flex;
    flex-direction: column;
    min-height: 168px;
}

.lw-pane.lw-collapsed {
    min-height: 0;
}



.lw-chart {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

.lw-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.3rem 0.1rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.lw-title {
    font-size: 0.62rem;
    color: var(--lw-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex: 0 0 auto;
}

.lw-chips {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.lw-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--lw-border);
    border-radius: 999px;
    font-size: 0.69rem;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    background: var(--bs-secondary-bg);
    color: var(--lw-secondary);
    white-space: nowrap;
}

.lw-chip:hover {
    border-color: var(--lw-accent);
}

.lw-chip.off {
    opacity: 0.4;
}

.lw-chip b {
    font-weight: 600;
    color: var(--lw-ink);
    font-variant-numeric: tabular-nums;
}

.lw-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 2px;
    flex: 0 0 auto;
}

.lw-glyph {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.69rem;
    color: var(--lw-muted);
    white-space: nowrap;
    cursor: default;
}

.lw-glyph i {
    font-style: normal;
    font-size: 0.75rem;
    line-height: 1;
}

.lw-count {
    font-size: 0.66rem;
    color: var(--lw-muted);
    margin-left: auto;
    white-space: nowrap;
}

.lw-table {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.lw-grid {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    border-top: 1px solid var(--lw-border);
}

.lw-grid table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.lw-grid thead th {
    position: sticky;
    top: 0;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    font-weight: 600;
    text-transform: none;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    text-align: right;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--lw-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    z-index: 1;
}

.lw-grid thead th:first-child,
.lw-grid tbody td:first-child {
    text-align: left;
}

.lw-grid thead th.asc::after {
    content: " ↑";
    color: var(--lw-accent);
}

.lw-grid thead th.desc::after {
    content: " ↓";
    color: var(--lw-accent);
}

.lw-grid tbody td {
    padding: 0.3rem 0.75rem;
    border-bottom: 1px solid var(--lw-grid);
    text-align: right;
    white-space: nowrap;
    color: var(--bs-body-color);
    height: 26px;
}

.lw-grid tbody tr.lw-spacer td {
    padding: 0;
    border: none;
    height: 0;
}

.lw-grid tbody tr:hover td {
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.lw-grid tbody tr.link {
    cursor: pointer;
}

.lw-grid tbody tr.on td {
    background: rgba(var(--bs-primary-rgb), 0.18);
    color: var(--bs-emphasis-color);
    box-shadow: inset 2px 0 0 var(--lw-accent);
}

.lw-grid tbody td.lw-writable {
    cursor: text;
    box-shadow: inset 0 -1px 0 var(--lw-border);
}

.lw-grid tbody td.lw-writable:hover {
    background: rgba(var(--bs-primary-rgb), 0.14);
}

.lw-input {
    width: 100%;
    min-width: 60px;
    padding: 0 0.15rem;
    border: 1px solid var(--lw-accent);
    border-radius: 2px;
    background: var(--lw-surface);
    color: var(--bs-emphasis-color);
    font: inherit;
    text-align: inherit;
    outline: none;
}

.lw-empty {
    padding: 1.25rem;
    font-size: 0.8rem;
    color: var(--lw-muted);
    text-align: center;
}

.network-host {
    touch-action: pan-y;
}

.lw-icon { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: 15px 15px; mask-size: 15px 15px; }

.lw-icon-image { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%201.6v7.2%22%2F%3E%3Cpath%20d%3D%22M5.2%206.2%208%209l2.8-2.8%22%2F%3E%3Cpath%20d%3D%22M2.4%2011.2v2.2h11.2v-2.2%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%201.6v7.2%22%2F%3E%3Cpath%20d%3D%22M5.2%206.2%208%209l2.8-2.8%22%2F%3E%3Cpath%20d%3D%22M2.4%2011.2v2.2h11.2v-2.2%22%2F%3E%3C%2Fsvg%3E"); }

.lw-icon-csv { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%201.6v7.2%22%2F%3E%3Cpath%20d%3D%22M5.2%206.2%208%209l2.8-2.8%22%2F%3E%3Cpath%20d%3D%22M2.4%2011.2v2.2h11.2v-2.2%22%2F%3E%3Cpath%20d%3D%22M4.6%204.1H2.2M4.6%201.9H2.2%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%201.6v7.2%22%2F%3E%3Cpath%20d%3D%22M5.2%206.2%208%209l2.8-2.8%22%2F%3E%3Cpath%20d%3D%22M2.4%2011.2v2.2h11.2v-2.2%22%2F%3E%3Cpath%20d%3D%22M4.6%204.1H2.2M4.6%201.9H2.2%22%2F%3E%3C%2Fsvg%3E"); }

.lw-icon-chevron { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206.5%208%2010.5l4-4%22%2F%3E%3C%2Fsvg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%206.5%208%2010.5l4-4%22%2F%3E%3C%2Fsvg%3E"); transition: transform 120ms ease; }

.lw-save { margin-left: 0.35rem; padding: 0.15rem 0.3rem; cursor: pointer; user-select: none; line-height: 1; color: var(--lw-muted); border: 1px solid transparent; border-radius: 0.25rem; }

.lw-save:hover { color: var(--lw-ink); border-color: var(--lw-border); }

.lw-collapse { margin-right: 0.4rem; padding: 0.1rem 0.2rem; cursor: pointer; user-select: none; line-height: 1; color: var(--lw-muted); border-radius: 0.25rem; }

.lw-collapse:hover { color: var(--lw-ink); }

.lw-pane.lw-collapsed .lw-chart { display: none; }

.lw-pane.lw-collapsed .lw-icon-chevron { transform: rotate(-90deg); }

.lw-save-text { margin-left: 0.28rem; font-size: 0.66rem; letter-spacing: 0.04em; vertical-align: 1px; }

.lw-range { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; padding: 0.1rem 0.2rem 0.5rem; }

.lw-range-edge { font-size: 0.68rem; color: var(--lw-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.lw-range-track { position: relative; flex: 1 1 auto; height: 16px; border-radius: 8px; background: var(--lw-grid); border: 1px solid var(--lw-border); }

.lw-range-window { position: absolute; top: -1px; bottom: -1px; background: color-mix(in srgb, var(--lw-accent) 22%, transparent); border: 1px solid var(--lw-accent); border-radius: 8px; cursor: grab; min-width: 10px; }

.lw-range-window:active { cursor: grabbing; }

.lw-range-grip { position: absolute; top: -3px; bottom: -3px; width: 10px; cursor: ew-resize; }

.lw-range-grip::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: 2px; border-radius: 1px; background: var(--lw-accent); }

.lw-range-grip-left { left: -5px; }

.lw-range-grip-right { right: -5px; }