.otc-data-grid { min-width: 0; font-variant-numeric: tabular-nums; }
.otc-data-grid .otc-grid-heading { display: flex; align-items: center; gap: 4px; width: 100%; }
.otc-data-grid .otc-positions-grid-caption { margin-inline-start: auto; font-size: 11px; color: var(--otc-muted); }
.otc-data-grid.otc-data-grid-fullscreen { position: fixed; inset: 0; width: 100vw; height: 100dvh !important; z-index: 999; background: var(--otc-surface); }
.otc-positions-group-header {
    display: table;
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    line-height: 1.2;
}

.otc-data-grid .otc-positions-group-header { line-height: var(--rz-grid-cell-line-height, 1rem); }

:is(.otc-data-grid, .otc-positions-grid) .rz-group-row > td:not(.rz-col-icon):has(.otc-positions-group-header) {
    padding: 0;
}

:is(.otc-data-grid, .otc-positions-grid) .rz-group-row .rz-cell-data:has(> .otc-positions-group-header) {
    display: block;
    width: 100%;
}

.otc-positions-group-cell {
    position: relative;
    display: table-cell;
    padding: var(--rz-grid-cell-padding);
    overflow: visible;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.otc-positions-group-cell-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    min-width: 0;
    min-height: var(--rz-grid-cell-line-height, 1rem);
}

.otc-positions-group-title {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: var(--rz-grid-cell-padding-inline, 0.3125rem);
    z-index: 1;
    color: var(--otc-text);
    font-weight: 600;
    transform: translateY(-50%);
}

.otc-grid-group-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: start;
    color: var(--otc-text);
    font-weight: 600;
}

.otc-positions-group-cell strong {
    display: block;
    color: var(--otc-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.otc-positions-group-cell-content > strong {
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otc-data-grid tfoot strong { font-weight: 600; }
.otc-report-info { display: inline-flex; align-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; vertical-align: middle; }
.otc-report-info img { width: 15px; height: 15px; }
.otc-report-info:focus-visible { outline: 2px solid var(--otc-primary); outline-offset: 2px; }

.otc-data-grid {
    border-radius: 0;
    border-inline: 0;
    border-bottom: 0;
    --rz-grid-header-background-color: var(--otc-surface-subtle);
    --rz-grid-header-color: var(--otc-text);
    --rz-grid-header-cell-padding: 0;
    --rz-grid-header-line-height: 28px;
    --rz-grid-header-font-size: 11px;
    --rz-grid-header-title-padding-inline: 7px;
}

.otc-data-grid .rz-group-header {
    justify-content: flex-start;
    min-height: 25px;
    gap: 7px;
    padding: 0 8px;
    border-bottom: 1px solid var(--otc-border);
    background: var(--otc-surface-subtle);
    color: var(--otc-muted);
    font-size: 11px;
}

.otc-data-grid .rz-group-header-items {
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.otc-data-grid .rz-group-header-drop {
    margin: 0;
    color: var(--otc-muted);
    font-size: 11px;
    line-height: 24px;
    text-align: start;
}

.otc-data-grid .rz-group-header > :has(.otc-positions-grid-caption) {
    order: 2;
    margin-inline-start: auto;
}

.otc-data-grid .otc-positions-grid-caption {
    margin-inline-start: auto;
    color: var(--otc-muted);
    font-size: 11px;
    line-height: 24px;
    white-space: nowrap;
}

.otc-data-grid .rz-column-title-content {
    text-transform: none;
    font-weight: 500;
}

.otc-data-grid .rz-grid-table tbody td:not(.rz-frozen-cell) {
    border-inline-end-color: transparent;
}

.otc-grid-group-select { border: 0; padding: 0; border-radius: 0; background: transparent; font: inherit; line-height: var(--rz-grid-cell-line-height, 1rem); color: inherit; cursor: pointer; }
.otc-grid-group-select:focus-visible { outline: 2px solid var(--otc-primary); outline-offset: -2px; }
.otc-data-grid .rz-group-row:has(.otc-grid-group-selected) > td { background: var(--otc-primary-soft); }
.otc-grid-group-select:hover { background: var(--otc-primary-wash); }

.otc-column-short-title { display: none; }
.otc-grid-with-column-bands th[data-otc-grid-band] .otc-column-full-title { display: none; }
.otc-grid-with-column-bands th[data-otc-grid-band] .otc-column-short-title { display: inline; }
.otc-grid-with-column-bands { --otc-column-band-height: 22px; }
.otc-grid-with-column-bands > .rz-data-grid-data > .rz-grid-table > thead,
.otc-grid-with-column-bands > .rz-data-grid-data > .rz-grid-table > thead th {
    top: var(--otc-column-band-height);
}
.otc-grid-column-bands {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 3;
    height: var(--otc-column-band-height);
    min-height: var(--otc-column-band-height);
    overflow: clip;
    isolation: isolate;
    pointer-events: none;
    background: var(--otc-surface-subtle);
}
.otc-grid-column-band {
    box-sizing: border-box;
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0 6px;
    border-inline-end: 1px solid var(--otc-border);
    border-bottom: 1px solid var(--otc-border);
    background: var(--otc-surface-subtle);
    color: var(--otc-text);
    font-size: 11px;
    font-weight: 600;
    line-height: var(--otc-column-band-height);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-otc-grid-band-tone="blue"] { --otc-grid-band-accent: #3489dc; }
[data-otc-grid-band-tone="teal"] { --otc-grid-band-accent: #21a69c; }
[data-otc-grid-band-tone="violet"] { --otc-grid-band-accent: #986ad4; }
[data-otc-grid-band-tone="sand"] { --otc-grid-band-accent: #c09a4b; }
.otc-data-grid th[data-otc-grid-band-tone]:not([data-otc-grid-band-tone="neutral"]),
.otc-grid-column-band[data-otc-grid-band-tone]:not([data-otc-grid-band-tone="neutral"]) {
    background: color-mix(in srgb, var(--otc-grid-band-accent) 17%, var(--otc-surface-subtle));
    color: var(--otc-text);
}

