.investi-financial-wrapper {
    --fs-sticky-col-width: clamp(280px, 34vw, 400px);
    --fs-year-col-width: 104px;
    --fs-visible-year-count: 1;
    --fs-table-height: 520px;
    --fs-sticky-surface: #ffffff;
    --fs-mini-chart-width: 50px;
    font-family: var(--investi-font-family);
    color: var(--text-color);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 40px;
    container-type: inline-size;
    container-name: financials;
}

/* Year-count layout modes keep the table readable without giving every period
 * the same amount of space. The wrapper class is set by the financials renderer. */
.investi-financial-wrapper.fs-year-layout--one {
    --fs-year-col-width: 1fr;
}

.investi-financial-wrapper.fs-year-layout--two {
    --fs-year-col-width: 78px;
    --fs-change-col-width: clamp(104px, 15vw, 150px);
}

.investi-financial-wrapper.fs-year-layout--three-to-five {
    --fs-year-col-width: clamp(104px, 12vw, 132px);
}

.investi-financial-wrapper.fs-year-layout--six-to-nine {
    --fs-year-col-width: 88px;
}

.investi-financial-wrapper.fs-year-layout--historical {
    --fs-year-col-width: 88px;
}

[data-mode="dark"] .investi-financial-wrapper {
    --fs-sticky-surface: rgba(12, 18, 30, 1);
}

.investi-error-msg {
    padding: 20px;
    text-align: center;
    background: var(--glass-bg);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-family: var(--investi-font-family);
}

.investi-financial-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 16px;
    gap: 12px;
    text-align: left;
}

.investi-financial-header__title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.investi-financial-header__tabs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 44px;
}

.investi-financial-wrapper > [id^="fsContent_"] {
    padding: 18px;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    background: var(--glass-bg);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.investi-financial-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--investi-font-family);
}

.investi-financial-tab-heading {
    margin: 4px 0 10px;
    padding: 0 2px;
}

.investi-financial-tab-heading h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.investi-financial-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.investi-tabs-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 6px;
    width: 100%;
    flex: 1 1 640px;
    min-width: 0;
    scrollbar-width: none;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-padding-inline: 2px;
    --investi-tab-btn-bg: color-mix(in srgb, var(--accent-color) 10%, var(--glass-bg));
    --investi-tab-btn-border-width: 1px;
    --investi-tab-btn-border-color: color-mix(in srgb, var(--accent-color) 20%, var(--glass-border));
    --investi-tab-btn-hover-bg: color-mix(in srgb, var(--accent-color) 16%, var(--glass-bg));
    --investi-tab-btn-hover-border-color: color-mix(in srgb, var(--accent-color) 32%, var(--glass-border));
    --investi-tab-btn-opacity: 1;
    --investi-tab-btn-active-bg: var(--brand-gradient);
    --investi-tab-btn-active-color: #fff;
    --investi-tab-btn-active-border-color: transparent;
    --investi-tab-btn-active-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.investi-tabs-container::-webkit-scrollbar {
    display: none;
}

.investi-tabs-container .investi-tab-btn {
    flex: 0 0 auto;
    font-family: var(--investi-font-family);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.investi-tabs-container .investi-tab-btn--financials-break {
    margin-left: 10px;
}

.investi-compare-btn {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: var(--brand-gradient);
    cursor: pointer;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    font-family: var(--investi-font-family);
}

.investi-compare-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.fs-overview-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 16px;
}

.fs-overview-actions__toggle {
    min-width: 160px;
}

.fs-overview-full-data {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.fs-overview-full-data__section {
    display: grid;
    gap: 12px;
}

.fs-overview-full-data__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fs-overview-full-data__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.investi-compare-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.investi-compare-btn__icon {
    font-size: 14px;
    line-height: 1;
}

.investi-table-viewport {
    width: 100%;
    max-height: var(--fs-table-height);
    overflow-x: auto;
    overflow-y: auto;
    margin: 0 auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-x pan-y pinch-zoom;
}

.investi-financial-wrapper.fs-year-layout--one .investi-table-viewport,
.investi-financial-wrapper.fs-year-layout--two .investi-table-viewport,
.investi-financial-wrapper.fs-year-layout--three-to-five .investi-table-viewport,
.investi-financial-wrapper.fs-year-layout--six-to-nine .investi-table-viewport {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.investi-table-viewport.is-dragging {
    cursor: grabbing;
}

.investi-fs-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    font-family: var(--investi-font-family);
}

.investi-fs-table th,
.investi-fs-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
    color: var(--text-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.investi-fs-table th {
    background-color: var(--fs-sticky-surface);
    color: var(--text-color);
    font-weight: 700;
    text-align: right;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-image: none;
    background-clip: border-box;
}

.investi-fs-table td {
    text-align: right;
    background: transparent;
    transition: background-color 0.1s;
}

.investi-fs-table th:first-child,
.investi-fs-table td:first-child {
    position: sticky;
    left: 0;
    text-align: left;
    border-right: 2px solid color-mix(in srgb, var(--accent-color) 20%, var(--glass-border));
    z-index: 20;
    background: var(--fs-sticky-surface);
    width: var(--fs-sticky-col-width);
    min-width: var(--fs-sticky-col-width);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-image: none;
    background-clip: border-box;
    opacity: 1;
}

.investi-fs-table th:not(:first-child),
.investi-fs-table td:not(:first-child) {
    width: auto;
    min-width: 0;
}

.investi-fs-table .fs-change-column {
    width: auto;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--kpi {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table.investi-fs-table--kpi th:first-child,
.investi-fs-table.investi-fs-table--kpi td:first-child {
    width: 58%;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--kpi th:not(:first-child),
.investi-fs-table.investi-fs-table--kpi td:not(:first-child) {
    width: 42%;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--kpi td:not(:first-child) {
    font-size: 1.05rem;
    font-weight: 750;
}

.investi-fs-table.investi-fs-table--kpi .mini-chart-svg {
    display: none;
}

.fs-period-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 750;
}

.investi-table-viewport--compact {
    overflow-x: hidden;
}

.investi-fs-table--compact {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table--compact th,
.investi-fs-table--compact td {
    padding: 8px 4px;
    font-size: 12px;
}

.investi-fs-table--compact th:first-child,
.investi-fs-table--compact td:first-child {
    width: clamp(190px, 30vw, 240px);
    min-width: clamp(190px, 30vw, 240px);
}

.investi-fs-table--compact th:not(:first-child),
.investi-fs-table--compact td:not(:first-child) {
    min-width: 0;
    width: auto;
}

.investi-fs-table--compact .label-wrapper {
    gap: 8px;
}

.investi-fs-table--compact .label-text {
    gap: 4px;
}

.investi-fs-table--compact .mini-chart-svg {
    width: 42px;
    height: 14px;
}

.investi-fs-table--compact .trend-header {
    font-size: 9px;
}

.investi-fs-table--compact.investi-fs-table--overview th,
.investi-fs-table--compact.investi-fs-table--overview td {
    padding: 8px 3px;
    font-size: 11px;
}

.investi-fs-table--compact.investi-fs-table--overview th:first-child,
.investi-fs-table--compact.investi-fs-table--overview td:first-child {
    width: clamp(236px, 40vw, 320px);
    min-width: clamp(236px, 40vw, 320px);
}

.investi-fs-table--compact.investi-fs-table--overview th:not(:first-child),
.investi-fs-table--compact.investi-fs-table--overview td:not(:first-child) {
    width: auto;
}

.investi-fs-table--compact.investi-fs-table--overview .label-wrapper {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: start;
}

.investi-fs-table--compact.investi-fs-table--overview .label-text {
    gap: 3px;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    align-items: flex-start;
}

.investi-fs-table--compact.investi-fs-table--overview .mini-chart-svg {
    width: 40px;
    margin-top: 1px;
}

/* The compact summary has its own legacy five-column defaults. Override those
 * defaults for the year-count layouts so the rules remain consistent there. */
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-2 {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-2 th:not(:first-child):not(.fs-change-column),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-2 td:not(:first-child):not(.fs-change-column) {
    width: auto;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-2 .fs-change-column {
    width: auto;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-3,
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-4,
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-5 {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-3 th:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-3 td:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-4 th:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-4 td:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-5 th:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--years-5 td:not(:first-child) {
    width: auto;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi th:first-child,
.investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi td:first-child {
    width: 58%;
    min-width: 0;
}

.investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi th:not(:first-child),
.investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi td:not(:first-child) {
    width: 42%;
    min-width: 0;
}

.investi-table-viewport--zero {
    width: 100%;
    overflow-x: auto;
}

.investi-fs-table--zero {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.investi-fs-table--zero th:first-child,
.investi-fs-table--zero td:first-child {
    width: 220px;
    min-width: 220px;
}

.investi-fs-table--zero th:not(:first-child),
.investi-fs-table--zero td:not(:first-child) {
    width: auto;
    min-width: 0;
}

.investi-fs-table--zero .label-wrapper {
    gap: 8px;
}

.investi-fs-table--zero .label-text {
    min-width: 0;
    gap: 6px;
}

.investi-fs-table--zero .mini-chart-svg {
    flex: 0 0 42px;
    width: 42px;
    height: 14px;
}

.investi-fs-table th:first-child {
    z-index: 30;
}

.investi-fs-table tr:hover td {
    background-color: var(--glass-hover);
}

.investi-fs-table tr:hover td:first-child {
    background-color: var(--fs-sticky-surface);
}

.investi-fs-table th:first-child .label-wrapper,
.investi-fs-table td:first-child .label-wrapper {
    background: var(--fs-sticky-surface);
}

.group-header-row td:first-child {
    background-color: color-mix(in srgb, var(--accent-color) 6%, var(--fs-sticky-surface));
}

.group-total td:first-child {
    background-color: color-mix(in srgb, var(--accent-color) 10%, var(--fs-sticky-surface));
}

.group-header-row td:first-child .label-wrapper,
.group-total td:first-child .label-wrapper {
    background: transparent;
}

.group-header-row {
    cursor: pointer;
    background-color: color-mix(in srgb, var(--accent-color) 6%, transparent);
}

.group-total {
    font-weight: bold;
    background-color: color-mix(in srgb, var(--accent-color) 10%, transparent);
}

.label-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--fs-mini-chart-width);
    align-items: center;
    width: 100%;
    gap: 12px;
    min-width: 0;
}

.label-text {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
}

.label-text::-webkit-scrollbar {
    display: none;
}

.fs-unit {
    display: inline-block;
    margin-left: 1px;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: baseline;
    color: color-mix(in srgb, var(--text-color) 68%, transparent);
}

.label-text--with-compare {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

.fs-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    border: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}

.fs-group-toggle__label {
    min-width: 0;
    padding-right: 8px;
}

.fs-group-toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent-color) 60%, transparent);
    outline-offset: 2px;
    border-radius: 6px;
}

.fs-inline-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0 auto;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--accent-color) 24%, var(--glass-border));
    background: color-mix(in srgb, var(--accent-color) 8%, var(--glass-bg));
    color: var(--text-secondary);
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.fs-inline-compare-btn:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent-color) 48%, var(--glass-border));
    color: var(--text-color);
}

.fs-inline-compare-btn .investi-compare-btn__icon {
    font-size: 11px;
}

.mkt-help-icon--financials {
    width: 18px;
    height: 18px;
    margin: 0 4px 0 0;
    flex: 0 0 auto;
    font-size: 10px;
}

.collapse-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
    font-size: 10px;
    opacity: 0.85;
    margin-left: auto;
    color: var(--accent-text-color);
    flex: 0 0 auto;
    justify-self: end;
}

.collapse-arrow::before,
.fs-overview-section__arrow::before {
    content: none;
}

tr.collapsed .collapse-arrow {
    transform: rotate(-90deg);
}

.mini-chart-svg {
    width: var(--fs-mini-chart-width);
    height: 16px;
    opacity: 0.8;
    cursor: zoom-in;
    flex-shrink: 0;
    display: block;
    justify-self: end;
}

/* The sparkline's visible right margin is the label cell's padding, so the
 * breathing room is doubled there rather than on the svg, whose fixed grid
 * track would otherwise push the overflow into the title's side. */
.investi-fs-table th:first-child,
.investi-fs-table td:first-child {
    padding-right: 24px;
}

.trend-header {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 600;
    float: right;
    margin-right: 4px;
    color: var(--text-secondary);
}

.investi-dashboard .dashboard-title-group {
    width: 100%;
    margin: 0 auto 10px;
}

.fs-overview-sections {
    display: grid;
    gap: 12px;
}

.fs-overview-section {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    overflow: hidden;
}

.fs-overview-section__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-color);
    user-select: none;
}

.fs-overview-section__summary::-webkit-details-marker {
    display: none;
}

.fs-overview-section__arrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.fs-overview-section[open] .fs-overview-section__arrow {
    transform: rotate(180deg);
}

.fs-overview-section__body {
    padding: 0 12px 12px;
}

.fs-overview-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 24px;
    align-items: start;
}

.fs-overview-carousel {
    display: grid;
    gap: 16px;
}

.fs-overview-carousel__controls {
    display: none;
}

.fs-overview-chart-card {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 14px 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    display: grid;
    gap: 12px;
    min-width: 0;
}

.fs-overview-chart {
    position: relative;
}

.fs-overview-chart__frame {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.fs-overview-chart__frame.has-secondary-axis {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
}

.fs-overview-chart__axis-shell {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 88px;
}

.fs-overview-chart__axis {
    position: relative;
    border-right: 1px solid color-mix(in srgb, var(--text-secondary) 32%, transparent);
    padding-right: 8px;
    overflow: visible;
}

.fs-overview-chart__axis-shell--secondary {
    grid-column: 3;
}

.fs-overview-chart__axis--secondary {
    border-right: 0;
    border-left: 1px solid color-mix(in srgb, var(--text-secondary) 32%, transparent);
    padding-right: 0;
    padding-left: 8px;
}

.fs-overview-chart__axis-spacer {
    min-height: 20px;
}

.fs-overview-chart__axis-tick {
    position: absolute;
    right: 0;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-secondary);
    white-space: nowrap;
}

.fs-overview-chart__axis-tick--secondary {
    right: auto;
    left: 0;
}

.fs-overview-chart__axis-tick--top {
    transform: translateY(50%);
}

.fs-overview-chart__axis-tick--mid {
    transform: translateY(50%);
}

.fs-overview-chart__axis-tick--bottom {
    transform: translateY(0);
}

.fs-overview-chart__stage {
    display: grid;
    gap: 6px;
    grid-column: 2;
}

.fs-overview-chart__plot {
    position: relative;
    min-height: var(--plot-height);
    max-height: var(--plot-height);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    justify-items: center;
}

.fs-overview-chart__zero-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed color-mix(in srgb, var(--text-secondary) 35%, transparent);
    pointer-events: none;
}

.fs-overview-chart__group {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.fs-overview-chart__bar-track {
    position: relative;
    height: var(--plot-height);
    width: 100%;
    max-width: 48px;
}

.fs-overview-chart__bar {
    --bar-width: 8px;
    --bar-step: 11px;
    width: var(--bar-width);
    max-width: 100%;
    border-radius: 4px 4px 0 0;
    background: var(--bar-color);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--bar-color) 22%, transparent);
    position: absolute;
    bottom: var(--zero-offset);
    height: var(--bar-height);
    left: calc(
        50% - (var(--bar-width) / 2) +
        ((var(--bar-index) - ((var(--series-count) - 1) / 2)) * var(--bar-step))
    );
    cursor: default;
    outline: none;
}

.fs-overview-chart__bar::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    padding: 5px 7px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    z-index: 3;
}

.fs-overview-chart__bar:hover::after,
.fs-overview-chart__bar:focus-visible::after {
    opacity: 1;
}

.fs-overview-chart__bar.is-negative {
    border-radius: 0 0 4px 4px;
    bottom: calc(var(--zero-offset) - var(--bar-height));
}

.fs-overview-chart__labels {
    display: grid;
    gap: 8px;
    align-items: start;
    justify-items: center;
}

.fs-overview-chart__label {
    text-align: center;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--text-secondary);
    width: 100%;
    line-height: 1;
}

.fs-overview-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    justify-content: center;
}

.fs-overview-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: color-mix(in srgb, var(--glass-bg) 80%, transparent);
    color: var(--text-color);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.fs-overview-chart__legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.investi-dashboard .dashboard-title-group h2 {
    color: var(--accent-text-color);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    text-align: left;
    font-family: var(--investi-font-family);
}

.investi-fs-table .gain {
    color: var(--accent-text-color);
    font-weight: 700;
}

.investi-fs-table .loss {
    color: var(--danger-color);
    font-weight: 700;
}

.fs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.84);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.fs-modal-panel {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: min(95vw, 1280px);
    max-height: min(88vh, 960px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    color: var(--text-color);
    font-family: var(--investi-font-family);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.fs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.fs-modal-header h3 {
    margin: 0;
    font-family: var(--investi-font-family);
}

.fs-modal-close {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: inherit;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--investi-font-family);
}

.fs-compare-subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-family: var(--investi-font-family);
}

.fs-drilldown-modal {
    max-width: 1040px;
}

.fs-compare-picker {
    max-width: 640px;
}

.fs-compare-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.fs-compare-field {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--text-color);
    font-family: var(--investi-font-family);
}

.fs-compare-field select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color);
    font: inherit;
    font-family: var(--investi-font-family);
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.fs-compare-feedback {
    margin: 0;
    color: color-mix(in srgb, var(--danger-color) 70%, var(--text-color));
    background: color-mix(in srgb, var(--danger-color) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger-color) 22%, transparent);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    font-family: var(--investi-font-family);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fs-compare-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fs-compare-chart {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    border-radius: 12px;
    min-width: 0;
}

.fs-compare-chart--builder {
    min-height: 360px;
}

.fs-chart-key {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.fs-chart-key__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fs-chart-key__swatch {
    display: inline-block;
    width: 24px;
    height: 3px;
    border-radius: 999px;
}

.fs-chart-key__swatch--bars {
    background: #3b82f6;
}

.fs-chart-key__swatch--ma {
    background: #facc15;
}

.fs-compare-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.9fr);
    gap: 22px;
    align-items: start;
}

.fs-compare-builder__main,
.fs-compare-builder__side {
    display: grid;
    gap: 16px;
}

.fs-compare-builder__main {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px 18px 14px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.fs-compare-builder__toolbar {
    display: flex;
    justify-content: center;
    width: 100%;
}

.fs-compare-metric-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: min(100%, 560px);
}

.fs-compare-metric-select::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid color-mix(in srgb, var(--text-secondary) 80%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--text-secondary) 80%, transparent);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.fs-compare-metric-select select {
    min-width: min(100%, 360px);
    max-width: 560px;
    width: 100%;
    padding: 10px 40px 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color);
    font: inherit;
    font-family: var(--investi-font-family);
    text-align: left;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.fs-compare-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fs-compare-legend--builder {
    justify-content: center;
}

.fs-compare-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    background: color-mix(in srgb, var(--glass-bg) 70%, transparent);
    font-size: 0.88rem;
}

.fs-compare-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.fs-compare-builder__side {
    align-content: start;
}

.fs-compare-side-panel {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
}

.fs-compare-side-panel__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.fs-compare-side-panel h4 {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    text-align: center;
    font-family: var(--investi-font-family);
}

.fs-compare-side-list,
.fs-compare-recommendations {
    display: grid;
    gap: 12px;
}

.fs-compare-inline-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 12px;
}

.fs-compare-field--inline {
    min-width: 0;
}

.fs-compare-select-wrap {
    position: relative;
}

.fs-compare-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid color-mix(in srgb, var(--text-secondary) 80%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--text-secondary) 80%, transparent);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.fs-compare-side-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    padding: 12px 14px;
    background: var(--card-bg);
}

.fs-compare-side-item--base {
    justify-content: flex-start;
}

.fs-compare-side-item__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fs-compare-side-item__meta strong {
    display: block;
    color: var(--text-color);
    font-family: var(--investi-font-family);
}

.fs-compare-side-item__meta span:last-child {
    display: block;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.fs-compare-side-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.fs-compare-side-item__remove {
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-color);
    border-radius: 999px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-family: var(--investi-font-family);
}

.fs-compare-recommendation {
    width: 100%;
    text-align: center;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--investi-font-family);
    transition: transform 0.2s, border-color 0.2s;
}

.fs-compare-recommendation:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent-color) 50%, var(--glass-border));
}

.fs-compare-recommendation span {
    color: var(--text-secondary);
}

.fs-compare-empty-copy {
    margin: 0;
    color: var(--text-secondary);
    text-align: center;
    font-family: var(--investi-font-family);
}

[data-mode="dark"] .fs-modal-panel,
[data-mode="dark"] .fs-modal-panel h3,
[data-mode="dark"] .fs-modal-panel h4,
[data-mode="dark"] .fs-modal-panel strong,
[data-mode="dark"] .fs-modal-panel div,
[data-mode="dark"] .fs-modal-panel span,
[data-mode="dark"] .fs-modal-panel p,
[data-mode="dark"] .fs-modal-panel label,
[data-mode="dark"] .fs-modal-panel button,
[data-mode="dark"] .fs-modal-panel select {
    color: #ffffff;
}

[data-mode="dark"] .fs-modal-panel,
[data-mode="dark"] .fs-compare-builder__main,
[data-mode="dark"] .fs-compare-side-panel {
    background: color-mix(in srgb, var(--card-bg) 78%, rgba(0, 0, 0, 0.38));
}

[data-mode="dark"] .fs-compare-subtitle,
[data-mode="dark"] .fs-compare-empty-copy,
[data-mode="dark"] .fs-compare-side-item__meta span:last-child,
[data-mode="dark"] .fs-compare-recommendation span {
    color: rgba(255, 255, 255, 0.72);
}

[data-mode="dark"] .fs-compare-field select,
[data-mode="dark"] .fs-compare-metric-select select,
[data-mode="dark"] .fs-compare-side-item,
[data-mode="dark"] .fs-compare-recommendation {
    background: rgba(8, 12, 18, 0.85);
    color: #ffffff;
}

[data-mode="dark"] .fs-compare-field select option,
[data-mode="dark"] .fs-compare-metric-select select option {
    background: #0b1016;
    color: #ffffff;
}

html:not([data-mode="dark"]) .fs-compare-field select option,
html:not([data-mode="dark"]) .fs-compare-metric-select select option {
    background: #ffffff;
    color: #111827;
}

@media (max-width: 991px) {
    [data-component="financials"].investi-async-module,
    [data-component="financials"].investi-async-module .investi-module-content {
        overflow-x: visible;
    }

    .investi-financial-wrapper {
        --fs-sticky-col-width: 240px;
        --fs-year-col-width: 80px;
        --fs-table-height: 460px;
    }

    .investi-financial-wrapper.fs-year-layout--one {
        --fs-year-col-width: 1fr;
    }

    .investi-tabs-container {
        justify-content: flex-start;
        flex: 1 1 auto;
    }

    .investi-table-viewport--compact {
        overflow-x: auto;
    }

    .investi-fs-table--compact {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
    }

    .investi-fs-table--compact th,
    .investi-fs-table--compact td {
        padding: 8px 4px;
    }

    .investi-fs-table--compact th:first-child,
    .investi-fs-table--compact td:first-child {
        width: var(--fs-sticky-col-width);
        min-width: var(--fs-sticky-col-width);
    }

    .investi-fs-table--compact th:not(:first-child),
    .investi-fs-table--compact td:not(:first-child) {
        min-width: 0;
        width: auto;
    }

    .fs-overview-carousel {
        gap: 14px;
    }

    .fs-overview-chart-grid {
        display: flex;
        gap: 16px;
        margin-bottom: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 2px;
    }

    .fs-overview-chart-grid::-webkit-scrollbar {
        display: none;
    }

    .fs-overview-carousel__slide {
        flex: 0 0 360px;
        min-width: 360px;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }

    .fs-overview-carousel__controls {
        display: flex;
        margin-top: 0;
    }

    .fs-overview-carousel__controls[hidden] {
        display: none;
    }

    .fs-compare-builder {
        grid-template-columns: 1fr;
    }

    .fs-compare-chart--builder {
        min-height: 320px;
    }

    .fs-compare-builder__side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* A financials module can be narrow inside a multi-column page even when the
 * browser viewport is wide. Use the module's actual inline size so those
 * layouts receive the same readable horizontal scroll treatment as tablets.
 */
@media (min-width: 768px) {
    @container financials (max-width: 980px) {
    .investi-financial-wrapper > [id^="fsContent_"] {
        overflow-x: auto;
    }

    .investi-financial-wrapper .investi-table-viewport--compact {
        overflow-x: auto;
    }

    .investi-financial-wrapper .investi-fs-table--compact:is(
        .investi-fs-table--years-2,
        .investi-fs-table--years-3,
        .investi-fs-table--years-4,
        .investi-fs-table--years-5,
        .investi-fs-table--years-6
    ) {
        --fs-sticky-col-width: 240px;
        width: max-content;
        min-width: calc(var(--fs-sticky-col-width) + (var(--fs-visible-year-count) * var(--fs-year-col-width)));
        table-layout: fixed;
    }

    .investi-financial-wrapper .investi-fs-table--compact:is(
        .investi-fs-table--years-2,
        .investi-fs-table--years-3,
        .investi-fs-table--years-4,
        .investi-fs-table--years-5,
        .investi-fs-table--years-6
    ) th:not(:first-child),
    .investi-financial-wrapper .investi-fs-table--compact:is(
        .investi-fs-table--years-2,
        .investi-fs-table--years-3,
        .investi-fs-table--years-4,
        .investi-fs-table--years-5,
        .investi-fs-table--years-6
    ) td:not(:first-child) {
        width: var(--fs-year-col-width);
        min-width: var(--fs-year-col-width);
    }

    /* Older companies can exceed the overview history limit, which means
     * this renderer uses the overview class without the compact class. */
    .investi-financial-wrapper .investi-fs-table--overview {
        --fs-sticky-col-width: 240px;
        width: max-content;
        min-width: calc(var(--fs-sticky-col-width) + (var(--fs-visible-year-count) * var(--fs-year-col-width)));
        table-layout: fixed;
    }

    .investi-financial-wrapper .investi-fs-table--overview th:not(:first-child),
    .investi-financial-wrapper .investi-fs-table--overview td:not(:first-child) {
        width: var(--fs-year-col-width);
        min-width: var(--fs-year-col-width);
    }
    }
}

@media (max-width: 640px) {
    .fs-overview-chart-grid {
        padding-inline: 16px;
        scroll-padding-inline: 16px;
    }

    .fs-overview-chart-card {
        padding: 12px;
    }

    .fs-overview-carousel__slide {
        flex: 0 0 calc(100% - 32px);
        min-width: calc(100% - 32px);
        max-width: calc(100% - 32px);
        box-sizing: border-box;
    }
}

@media (max-width: 767px) {
    .investi-financial-wrapper {
        --fs-sticky-col-width: 180px;
        --fs-year-col-width: 72px;
        --fs-table-height: 420px;
    }

    .investi-financial-wrapper.fs-year-layout--two {
        --fs-year-col-width: 72px;
        --fs-change-col-width: 104px;
    }

    .investi-table-viewport {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .investi-fs-table th:first-child,
    .investi-fs-table td:first-child {
        position: static;
        left: auto;
        z-index: auto;
    }

    .investi-financial-actions,
    .fs-compare-toolbar {
        width: 100%;
    }

    .investi-financial-header__tabs-row {
        justify-content: center;
        min-height: 0;
    }

    .investi-fs-table th,
    .investi-fs-table td,
    .investi-fs-table--compact th,
    .investi-fs-table--compact td {
        padding: 8px 4px;
    }

    .investi-fs-table,
    .investi-fs-table--compact,
    .investi-fs-table--zero {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    .investi-fs-table th:not(:first-child),
    .investi-fs-table td:not(:first-child),
    .investi-fs-table--compact th:not(:first-child),
    .investi-fs-table--compact td:not(:first-child),
    .investi-fs-table--zero th:not(:first-child),
    .investi-fs-table--zero td:not(:first-child) {
        min-width: 88px;
    }

    .investi-fs-table.investi-fs-table--compact.investi-fs-table--years-2,
    .investi-fs-table.investi-fs-table--compact.investi-fs-table--years-3,
    .investi-fs-table.investi-fs-table--compact.investi-fs-table--years-4,
    .investi-fs-table.investi-fs-table--compact.investi-fs-table--years-5,
    .investi-fs-table.investi-fs-table--compact.investi-fs-table--kpi {
        width: max-content;
        min-width: 100%;
        table-layout: auto;
    }

    .investi-fs-table.investi-fs-table--compact.investi-fs-table--overview th:not(:first-child),
    .investi-fs-table.investi-fs-table--compact.investi-fs-table--overview td:not(:first-child) {
        min-width: 96px;
    }

    .investi-fs-table.investi-fs-table--compact .fs-change-column {
        min-width: 112px;
    }

    .investi-financial-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .investi-compare-btn,
    .fs-compare-toolbar .investi-compare-btn,
    .fs-compare-inline-picker .investi-compare-btn {
        width: 100%;
    }

    .fs-compare-toolbar {
        grid-template-columns: 1fr;
    }

    .fs-compare-inline-picker {
        grid-template-columns: 1fr;
    }

    .fs-modal-panel {
        width: min(96vw, 1140px);
        padding: 20px 16px 16px;
    }

    .fs-modal-header {
        position: relative;
        align-items: flex-start;
        flex-wrap: nowrap;
        padding-right: 48px;
    }

    .fs-modal-close {
        position: absolute;
        top: 0;
        right: 0;
        align-self: auto;
        margin: 0;
    }

    .fs-compare-metric-select select {
        min-width: 0;
        width: 100%;
    }

    .fs-compare-builder__main,
    .fs-compare-side-panel {
        padding: 16px;
    }

    .fs-compare-builder__toolbar {
        justify-content: stretch;
    }

    .fs-compare-metric-select {
        width: 100%;
    }

    .fs-compare-chart {
        height: 240px;
    }

    .fs-compare-chart--builder {
        min-height: 240px;
    }

    .fs-compare-legend {
        gap: 8px;
    }

    .fs-compare-legend__item {
        width: 100%;
        justify-content: flex-start;
    }

    .fs-compare-builder__side {
        grid-template-columns: 1fr;
    }

    .fs-compare-side-panel__header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .fs-compare-side-panel h4 {
        text-align: left;
    }

    .fs-compare-side-item {
        align-items: flex-start;
    }

    .fs-compare-side-item__meta {
        flex: 1 1 auto;
    }

    .fs-compare-side-item__meta strong,
    .fs-compare-side-item__meta span:last-child {
        overflow-wrap: anywhere;
    }

    .fs-overview-chart__plot {
        min-height: 88px;
        max-height: 88px;
        gap: 8px;
    }

    .fs-overview-chart__frame,
    .fs-overview-chart__axis-shell {
        min-height: 88px;
    }

    .fs-overview-chart__bar-track {
        max-width: 48px;
    }

    .fs-overview-chart__bar {
        --bar-width: 8px;
        --bar-step: 11px;
    }
    .fs-overview-carousel__controls .investi-carousel-arrow {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
}
