.table-grid,
.tabulator-shell {
    min-width: 0;
}

.table-grid .tabulator,
.tabulator-shell .tabulator,
.table-grid .tabulator-host.is-enhanced,
.tabulator-shell .tabulator-host.is-enhanced {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.table-grid .tabulator,
.tabulator-shell .tabulator {
    color: var(--ui-text-heading);
    box-shadow: 0 8px 20px var(--ui-shadow-1);
    display: flex;
    flex-direction: column;
    background: var(--ui-surface);
}

.table-grid .tabulator .tabulator-footer,
.tabulator-shell .tabulator .tabulator-footer {
    order: -1;
    border-top: 0;
    border-bottom: 1px solid var(--ui-border-soft);
}

.table-grid .tabulator .tabulator-tableholder,
.tabulator-shell .tabulator .tabulator-tableholder {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.table-grid .tabulator .tabulator-header .tabulator-col,
.tabulator-shell .tabulator .tabulator-header .tabulator-col {
    min-height: 38px;
    color: var(--ui-text-muted);
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--ui-table-head-bg);
}

.table-grid .tabulator .tabulator-header .tabulator-col:hover,
.table-grid .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover,
.tabulator-shell .tabulator .tabulator-header .tabulator-col:hover,
.tabulator-shell .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
    background: var(--ui-selected-bg);
}

.table-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-content,
.tabulator-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
    padding: 8px 10px;
}

.table-grid .tabulator .tabulator-header .tabulator-col .tabulator-col-title,
.tabulator-shell .tabulator .tabulator-header .tabulator-col .tabulator-col-title {
    white-space: nowrap;
}

.table-grid .tabulator .tabulator-tableholder,
.tabulator-shell .tabulator .tabulator-tableholder {
    overflow: auto;
    background: var(--ui-surface);
}

.table-grid .tabulator .tabulator-header-contents,
.tabulator-shell .tabulator .tabulator-header-contents {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.table-grid .tabulator.horizontal-scroll-affordance,
.tabulator-shell .tabulator.horizontal-scroll-affordance,
.table-grid .tabulator.table-scroll-cues-host,
.tabulator-shell .tabulator.table-scroll-cues-host {
    position: relative;
    isolation: isolate;
}

.table-grid .tabulator.horizontal-scroll-affordance::before,
.tabulator-shell .tabulator.horizontal-scroll-affordance::before,
.table-grid .tabulator.horizontal-scroll-affordance::after,
.tabulator-shell .tabulator.horizontal-scroll-affordance::after,
.table-grid .tabulator.table-scroll-cues-host::before,
.tabulator-shell .tabulator.table-scroll-cues-host::before,
.table-grid .tabulator.table-scroll-cues-host::after,
.tabulator-shell .tabulator.table-scroll-cues-host::after {
    content: "";
    position: absolute;
    top: var(--horizontal-scroll-top, 0);
    bottom: var(--horizontal-scroll-bottom, 0);
    width: 38px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 5;
}

.table-grid .tabulator.horizontal-scroll-affordance::before,
.tabulator-shell .tabulator.horizontal-scroll-affordance::before,
.table-grid .tabulator.table-scroll-cues-host::before,
.tabulator-shell .tabulator.table-scroll-cues-host::before {
    left: 0;
    background: linear-gradient(90deg, rgba(191, 219, 254, 0.38) 0%, rgba(191, 219, 254, 0.18) 42%, rgba(191, 219, 254, 0));
    box-shadow: inset 12px 0 16px -12px rgba(15, 23, 42, 0.28);
}

.table-grid .tabulator.horizontal-scroll-affordance::after,
.tabulator-shell .tabulator.horizontal-scroll-affordance::after,
.table-grid .tabulator.table-scroll-cues-host::after,
.tabulator-shell .tabulator.table-scroll-cues-host::after {
    right: 0;
    background: linear-gradient(270deg, rgba(191, 219, 254, 0.38) 0%, rgba(191, 219, 254, 0.18) 42%, rgba(191, 219, 254, 0));
    box-shadow: inset -12px 0 16px -12px rgba(15, 23, 42, 0.28);
}

.table-grid .tabulator.horizontal-scroll-affordance.has-horizontal-overflow.is-scrolled-left::before,
.tabulator-shell .tabulator.horizontal-scroll-affordance.has-horizontal-overflow.is-scrolled-left::before,
.table-grid .tabulator.horizontal-scroll-affordance.has-horizontal-overflow.is-scrolled-right::after,
.tabulator-shell .tabulator.horizontal-scroll-affordance.has-horizontal-overflow.is-scrolled-right::after,
.table-grid .tabulator.table-scroll-cues-host.has-horizontal-overflow.is-scrolled-left::before,
.tabulator-shell .tabulator.table-scroll-cues-host.has-horizontal-overflow.is-scrolled-left::before,
.table-grid .tabulator.table-scroll-cues-host.has-horizontal-overflow.is-scrolled-right::after,
.tabulator-shell .tabulator.table-scroll-cues-host.has-horizontal-overflow.is-scrolled-right::after {
    opacity: 1;
}

.table-grid .tabulator .table-scroll-cues,
.tabulator-shell .tabulator .table-scroll-cues {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}

.table-grid .tabulator .table-scroll-cue,
.tabulator-shell .tabulator .table-scroll-cue {
    align-items: center;
    appearance: none;
    background: var(--ui-surface-elevated);
    border: 1px solid var(--ui-border-soft);
    border-radius: 999px;
    box-shadow: 0 8px 20px var(--ui-shadow-3);
    color: var(--ui-text-accent-strong);
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    line-height: 1;
    min-height: 40px;
    min-width: 40px;
    pointer-events: auto;
    position: absolute;
    transform: var(--table-scroll-cue-transform, translate(0, 0)) scale(1);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    user-select: none;
    width: 40px;
    opacity: 0.92;
}

.table-grid .tabulator .table-scroll-cue__icon,
.tabulator-shell .tabulator .table-scroll-cue__icon {
    display: block;
    height: 22px;
    width: 22px;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 2.4;
}

.table-grid .tabulator .table-scroll-cue__icon--right,
.tabulator-shell .tabulator .table-scroll-cue__icon--right {
    transform: rotate(180deg);
}

.table-grid .tabulator .table-scroll-cue__icon--up,
.tabulator-shell .tabulator .table-scroll-cue__icon--up {
    transform: rotate(90deg);
}

.table-grid .tabulator .table-scroll-cue__icon--down,
.tabulator-shell .tabulator .table-scroll-cue__icon--down {
    transform: rotate(-90deg);
}

.table-grid .tabulator .table-scroll-cue:hover,
.tabulator-shell .tabulator .table-scroll-cue:hover {
    background: var(--ui-surface);
    border-color: var(--ui-border);
    box-shadow: 0 12px 24px var(--ui-shadow-3);
    color: var(--ui-text-accent);
    opacity: 1;
}

.table-grid .tabulator .table-scroll-cue:focus,
.tabulator-shell .tabulator .table-scroll-cue:focus,
.table-grid .tabulator .table-scroll-cue:focus-visible,
.tabulator-shell .tabulator .table-scroll-cue:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
    opacity: 1;
}

.table-grid .tabulator .table-scroll-cue:active,
.tabulator-shell .tabulator .table-scroll-cue:active {
    transform: var(--table-scroll-cue-transform, translate(0, 0)) scale(0.98);
}

.table-grid .tabulator .table-scroll-cue[hidden],
.tabulator-shell .tabulator .table-scroll-cue[hidden] {
    display: none;
}

.table-grid .tabulator .table-scroll-cue--left,
.tabulator-shell .tabulator .table-scroll-cue--left {
    left: calc(var(--table-scroll-cue-left-offset, 0px) + 8px);
    top: 50%;
    --table-scroll-cue-transform: translateY(-50%);
}

.table-grid .tabulator .table-scroll-cue--right,
.tabulator-shell .tabulator .table-scroll-cue--right {
    right: 8px;
    top: 50%;
    --table-scroll-cue-transform: translateY(-50%);
}

.table-grid .tabulator .table-scroll-cue--up,
.tabulator-shell .tabulator .table-scroll-cue--up {
    left: 50%;
    top: 8px;
    --table-scroll-cue-transform: translateX(-50%);
}

.table-grid .tabulator .table-scroll-cue--down,
.tabulator-shell .tabulator .table-scroll-cue--down {
    left: 50%;
    bottom: 8px;
    --table-scroll-cue-transform: translateX(-50%);
}

.company-search-grid .tabulator-shell .tabulator-alert {
    align-items: center;
    background: transparent;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.company-search-grid .tabulator-shell .tabulator-alert.tabulator-loading,
.company-search-grid .tabulator-shell .tabulator-alert.tabulator-loading-state,
.company-search-grid .tabulator-shell .tabulator-alert.tabulator-processing,
.company-search-grid .tabulator-shell .tabulator-placeholder,
.company-search-grid .tabulator-shell .tabulator-loader,
.company-search-grid .tabulator-shell .tabulator-tableholder,
.company-search-grid .tabulator-shell .tabulator-tableholder .tabulator-table {
    background: transparent;
}

.company-search-grid .tabulator-shell .tabulator-alert .tabulator-alert-msg {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    display: inline-flex;
    font-size: 0.93rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.company-search-grid .tabulator-shell .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-msg,
.company-search-grid .tabulator-shell .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-error {
    border: 0;
    color: inherit;
}

.company-search-loader {
    align-items: center;
    border: 1px solid var(--ui-border-soft);
    border-radius: 999px;
    box-shadow: var(--ui-shadow-3);
    display: inline-flex;
    gap: 8px;
    padding: 10px 14px;
}

.company-search-loader--loading {
    background: var(--ui-surface-elevated);
    color: var(--ui-text);
}

.company-search-loader--error {
    background: var(--ui-error-bg);
    border-color: var(--ui-error-border);
    color: var(--ui-error-text);
}

.company-search-loader__spinner {
    animation: company-search-loader-spin 0.85s linear infinite;
    border: 2px solid var(--ui-border);
    border-top-color: var(--ui-text-accent);
    border-radius: 999px;
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.company-search-loader--error .company-search-loader__spinner {
    animation: none;
    background: var(--ui-error-text);
    border: 0;
    height: 10px;
    width: 10px;
}

.company-search-loader__text {
    line-height: 1.2;
    white-space: nowrap;
}

@keyframes company-search-loader-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.table-grid .tabulator .tabulator-row,
.tabulator-shell .tabulator .tabulator-row {
    min-height: 40px;
    border-bottom: 1px solid var(--ui-border-subtle);
    background: var(--ui-table-row-bg);
}

.table-grid .tabulator .tabulator-row.tabulator-row-even,
.tabulator-shell .tabulator .tabulator-row.tabulator-row-even {
    background: var(--ui-surface);
}

.table-grid .tabulator .tabulator-row.tabulator-row-odd,
.tabulator-shell .tabulator .tabulator-row.tabulator-row-odd {
    background: var(--ui-table-row-bg);
}

.table-grid .tabulator .tabulator-row:hover,
.tabulator-shell .tabulator .tabulator-row:hover {
    background: var(--ui-table-row-hover-bg);
}

.table-grid .tabulator .tabulator-cell,
.tabulator-shell .tabulator .tabulator-cell {
    padding: 9px 10px;
    line-height: 1.35;
    white-space: nowrap;
    background: var(--ui-table-row-bg);
    color: var(--ui-text-heading);
}

.table-grid .tabulator .tabulator-row:hover .tabulator-cell,
.tabulator-shell .tabulator .tabulator-row:hover .tabulator-cell {
    background: var(--ui-table-row-hover-bg);
}

.table-grid .tabulator .active-metric-cell.is-active,
.table-grid .tabulator .industry-metric-cell.is-active,
.table-grid .tabulator .ranking-metric-cell.is-active,
.tabulator-shell .tabulator .active-metric-cell.is-active,
.tabulator-shell .tabulator .industry-metric-cell.is-active,
.tabulator-shell .tabulator .ranking-metric-cell.is-active {
    background: var(--color-surface-warm);
    color: var(--color-accent);
    font-weight: 700;
}

.table-grid .tabulator .tabulator-row:hover .active-metric-cell.is-active,
.table-grid .tabulator .tabulator-row:hover .industry-metric-cell.is-active,
.table-grid .tabulator .tabulator-row:hover .ranking-metric-cell.is-active,
.tabulator-shell .tabulator .tabulator-row:hover .active-metric-cell.is-active,
.tabulator-shell .tabulator .tabulator-row:hover .industry-metric-cell.is-active,
.tabulator-shell .tabulator .tabulator-row:hover .ranking-metric-cell.is-active {
    background: var(--color-surface-warm);
}

.table-grid .tabulator .tabulator-col.is-active,
.tabulator-shell .tabulator .tabulator-col.is-active {
    background: var(--color-surface-warm);
    color: var(--color-accent);
}

.table-grid .tabulator .tabulator-row.tabulator-selected,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected,
.table-grid .tabulator .tabulator-row.tabulator-selected .tabulator-cell,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected .tabulator-cell {
    background: var(--ui-selected-bg);
}

.table-grid .tabulator .tabulator-row.tabulator-selected:hover,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected:hover,
.table-grid .tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell {
    background: var(--ui-selected-bg);
}

.table-grid .tabulator .tabulator-row.ranking-row-active,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active,
.table-grid .tabulator .tabulator-row.ranking-row-active .tabulator-cell,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active .tabulator-cell {
    background: var(--ui-selected-bg);
}

.table-grid .tabulator .tabulator-row.ranking-row-active:hover,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active:hover,
.table-grid .tabulator .tabulator-row.ranking-row-active:hover .tabulator-cell,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active:hover .tabulator-cell {
    background: var(--ui-selected-bg);
}

.table-grid .tabulator .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-cell.tabulator-frozen {
    position: sticky;
    z-index: 3;
    background: var(--ui-table-row-bg);
    background-clip: padding-box;
    box-shadow: inset -1px 0 0 var(--ui-border-subtle);
}

.table-grid .tabulator .tabulator-col.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-col.tabulator-frozen {
    position: sticky;
    z-index: 4;
    background: var(--ui-table-head-bg);
    background-clip: padding-box;
    box-shadow: inset -1px 0 0 var(--ui-border-subtle);
}

.table-grid .tabulator .tabulator-row:hover .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row:hover .tabulator-cell.tabulator-frozen {
    background: var(--ui-surface-overlay-muted);
}

.table-grid .tabulator .tabulator-row.tabulator-selected .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected .tabulator-cell.tabulator-frozen,
.table-grid .tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row.tabulator-selected:hover .tabulator-cell.tabulator-frozen {
    background: var(--ui-surface-overlay);
    box-shadow:
        inset -1px 0 0 var(--ui-border-subtle),
        inset 0 0 0 1px var(--ui-selected-border);
}

.table-grid .tabulator .tabulator-row.ranking-row-active .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active .tabulator-cell.tabulator-frozen,
.table-grid .tabulator .tabulator-row.ranking-row-active:hover .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row.ranking-row-active:hover .tabulator-cell.tabulator-frozen {
    background: var(--ui-surface-overlay);
    box-shadow:
        inset -1px 0 0 var(--ui-border-subtle),
        inset 0 0 0 1px var(--ui-selected-border);
}

.table-grid .tabulator .tabulator-row:focus-within .tabulator-cell.tabulator-frozen,
.tabulator-shell .tabulator .tabulator-row:focus-within .tabulator-cell.tabulator-frozen,
.table-grid .tabulator .tabulator-cell.tabulator-frozen:focus-within,
.tabulator-shell .tabulator .tabulator-cell.tabulator-frozen:focus-within {
    background: var(--ui-surface-overlay);
    box-shadow:
        inset -1px 0 0 var(--ui-border-subtle),
        inset 0 0 0 2px var(--ui-focus-ring);
}

.table-grid .tabulator .trend-sparkline,
.tabulator-shell .tabulator .trend-sparkline {
    padding-inline: 6px;
    text-align: center;
    color: var(--color-accent);
}

.table-grid .tabulator .trend-sparkline,
.tabulator-shell .tabulator .trend-sparkline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.table-grid .tabulator .trend-sparkline__svg,
.tabulator-shell .tabulator .trend-sparkline__svg {
    display: block;
}

.table-grid .tabulator .trend-sparkline__empty,
.tabulator-shell .tabulator .trend-sparkline__empty {
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
}

.table-grid .tabulator .trend-column-title,
.tabulator-shell .tabulator .trend-column-title {
    display: block;
    align-items: center;
    gap: 1px;
    width: 100%;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.05;
}

.table-grid.financial-grid .tabulator .tabulator-cell,
.tabulator-shell.financial-grid .tabulator .tabulator-cell {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.table-grid.financial-grid .tabulator,
.tabulator-shell.financial-grid .tabulator {
    --annual-snapshot-header-bg: var(--ui-table-head-bg);
}

.table-grid.financial-grid.annual-snapshot-sections,
.tabulator-shell.financial-grid.annual-snapshot-sections {
    display: grid;
    gap: 14px;
}

.annual-snapshot-section {
    min-width: 0;
}

.annual-snapshot-section + .annual-snapshot-section {
    padding-top: 12px;
    border-top: 1px solid var(--ui-border-subtle);
}

.annual-snapshot-section-title {
    margin: 0;
    color: var(--ui-text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}

.annual-snapshot-table {
    min-width: 0;
}

.table-grid .tabulator .tabulator-footer .tabulator-paginator,
.tabulator-shell .tabulator .tabulator-footer .tabulator-paginator {
    padding: 6px 8px;
    color: var(--ui-text-muted);
    font-size: 0.85rem;
}

.table-grid .tabulator .tabulator-footer .tabulator-page,
.table-grid .tabulator .tabulator-footer .tabulator-page-size,
.tabulator-shell .tabulator .tabulator-footer .tabulator-page,
.tabulator-shell .tabulator .tabulator-footer .tabulator-page-size {
    border: 1px solid var(--ui-border);
    border-radius: 8px;
    background: var(--ui-surface);
    color: var(--ui-text);
    min-height: 30px;
}

.table-grid .tabulator .tabulator-footer .tabulator-page.active,
.tabulator-shell .tabulator .tabulator-footer .tabulator-page.active {
    border-color: var(--ui-text-accent);
    background: var(--ui-surface-warm);
    color: var(--ui-text-accent);
}

.table-grid .tabulator .semantic-frozen-label,
.tabulator-shell .tabulator .semantic-frozen-label {
    min-width: 0;
    max-width: 100%;
}

.table-grid .tabulator .semantic-frozen-label--single-line,
.tabulator-shell .tabulator .semantic-frozen-label--single-line {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-grid .tabulator .semantic-frozen-label--wrap,
.tabulator-shell .tabulator .semantic-frozen-label--wrap {
    display: block;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
}

.table-grid .tabulator .semantic-frozen-label--two-line,
.tabulator-shell .tabulator .semantic-frozen-label--two-line {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
    white-space: normal;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.table-grid .tabulator .semantic-frozen-label__secondary,
.tabulator-shell .tabulator .semantic-frozen-label__secondary {
    display: block;
    margin-top: 2px;
    color: var(--ui-text-muted);
    font-size: 0.76rem;
    line-height: 1.15;
    white-space: nowrap;
}

.table-grid .tabulator .compare-financial-table__metric-header,
.tabulator-shell .tabulator .compare-financial-table__metric-header {
    min-width: 0;
    max-width: 100%;
}

@media (prefers-color-scheme: dark) {
    .tabulator-popup-container.tabulator-tooltip {
        background: var(--ui-dialog-surface);
        border-color: var(--ui-border);
        color: var(--ui-control-text);
        opacity: 1;
        filter: none;
        box-shadow: var(--ui-shadow-4);
    }
}

.table-grid .tabulator .table-link,
.tabulator-shell .tabulator .table-link,
.table-grid .tabulator .tabulator-link,
.tabulator-shell .tabulator .tabulator-link {
    color: var(--ui-text-link, var(--ui-text-accent-strong));
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
    text-decoration-color: currentColor;
    transition: color 0.15s ease, text-decoration-thickness 0.15s ease, text-decoration-color 0.15s ease, opacity 0.15s ease;
}

.table-grid .tabulator .table-link:visited,
.tabulator-shell .tabulator .table-link:visited,
.table-grid .tabulator .tabulator-link:visited,
.tabulator-shell .tabulator .tabulator-link:visited {
    color: var(--ui-text-link-visited, var(--ui-text-accent));
}

.table-grid .tabulator .table-link:hover,
.tabulator-shell .tabulator .table-link:hover,
.table-grid .tabulator .tabulator-link:hover,
.tabulator-shell .tabulator .tabulator-link:hover {
    color: var(--ui-text-link-hover, var(--ui-text-accent));
    text-decoration-thickness: 2px;
}

.table-grid .tabulator .table-link:focus,
.tabulator-shell .tabulator .table-link:focus,
.table-grid .tabulator .tabulator-link:focus,
.tabulator-shell .tabulator .tabulator-link:focus,
.table-grid .tabulator .table-link:focus-visible,
.tabulator-shell .tabulator .table-link:focus-visible,
.table-grid .tabulator .tabulator-link:focus-visible,
.tabulator-shell .tabulator .tabulator-link:focus-visible {
    outline: 2px solid var(--ui-focus-ring);
    outline-offset: 2px;
    border-radius: 3px;
}

.table-grid .tabulator-money-cell,
.tabulator-shell .tabulator-money-cell {
    display: block;
    width: 100%;
    text-align: right;
}

.table-grid.financial-grid .tabulator .annual-metric-header-cell,
.tabulator-shell.financial-grid .tabulator .annual-metric-header-cell {
    background: var(--annual-snapshot-header-bg);
    border-right: 1px solid var(--ui-border-soft);
    color: var(--ui-text-heading);
    font-weight: 700;
}

.table-grid.financial-grid .tabulator .annual-metric-header-cell .annual-metric-title,
.tabulator-shell.financial-grid .tabulator .annual-metric-header-cell .annual-metric-title {
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.table-grid.financial-grid .tabulator .annual-metric-header-cell .tabulator-cell,
.table-grid.financial-grid .tabulator .annual-metric-header-cell .tabulator-col-title,
.tabulator-shell.financial-grid .tabulator .annual-metric-header-cell .tabulator-cell,
.tabulator-shell.financial-grid .tabulator .annual-metric-header-cell .tabulator-col-title {
    white-space: nowrap;
}

.table-grid.financial-grid .tabulator .tabulator-header .tabulator-col,
.tabulator-shell.financial-grid .tabulator .tabulator-header .tabulator-col {
    background: var(--annual-snapshot-header-bg);
}

.table-grid.financial-grid .tabulator .tabulator-row .tabulator-cell.annual-metric-header-cell,
.tabulator-shell.financial-grid .tabulator .tabulator-row .tabulator-cell.annual-metric-header-cell {
    background: var(--annual-snapshot-header-bg);
}

.table-grid.financial-grid .tabulator .annual-metadata-row .annual-metric-header-cell,
.tabulator-shell.financial-grid .tabulator .annual-metadata-row .annual-metric-header-cell {
    background: var(--annual-snapshot-header-bg);
    color: var(--ui-text);
}

.table-grid.financial-grid .tabulator .annual-metadata-row .tabulator-cell,
.tabulator-shell.financial-grid .tabulator .annual-metadata-row .tabulator-cell {
    background: var(--ui-table-row-hover-bg);
}

.table-grid.financial-grid .tabulator .annual-year-cell,
.tabulator-shell.financial-grid .tabulator .annual-year-cell {
    white-space: nowrap;
}

.compare-table-grid .tabulator-cell.compare-financial-table__row-label.tabulator-frozen,
.compare-table-grid .tabulator-col.compare-financial-table__row-label.tabulator-frozen {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--ui-surface);
}

.compare-table-grid .tabulator-col.compare-financial-table__row-label.tabulator-frozen {
    z-index: 4;
}

.compare-table-grid .tabulator .compare-financial-table__value.is-best-value {
    background: var(--ui-highlight-bg);
    color: var(--ui-text-negative);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--ui-border-accent-soft);
}

.compare-table-grid .tabulator .compare-financial-table__group-row .tabulator-cell {
    background: var(--ui-info-bg);
    color: var(--ui-info-text);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compare-table-grid .tabulator .compare-financial-table__group-row .tabulator-cell:not(:first-child) {
    display: none;
}

.compare-table-grid .tabulator .compare-financial-table__group-row .tabulator-cell:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
}

.compare-table-grid .tabulator .compare-financial-table__no-data .tabulator-cell {
    color: var(--ui-text-muted);
    text-align: center;
}

@media (max-width: 640px) {
    .table-grid .tabulator,
    .tabulator-shell .tabulator {
        font-size: 0.88rem;
    }

    .table-grid .tabulator .tabulator-cell,
    .tabulator-shell .tabulator .tabulator-cell {
        padding: 8px 9px;
    }
}
