/*
 * The TotalRx look, applied to every Filament panel.
 *
 * Plain CSS on purpose: Filament ships its own compiled stylesheet and this
 * repository has no JavaScript build, so this file is registered as a Filament
 * asset and loaded after that stylesheet. It restyles Filament's own `fi-`
 * hook classes rather than publishing any Blade view, so panels keep working
 * across upgrades. Colours that Filament resolves in PHP (buttons, badges,
 * links) come from the palettes in `App\Filament\Theme\TotalRxTheme`; this
 * file dresses the chrome those components sit in.
 *
 * The tokens below are the same ones the reporting dashboards use. The navy
 * and butter pair is the brand: navy carries the sidebar, butter is the only
 * accent. Everything else is a neutral, a state colour or a measurement. The
 * dashboard is light only, so there is no dark half to keep in step.
 */

:root {
    --trx-navy: #17293b;
    --trx-navy-2: #213a54;
    --trx-butter: #f3c64b;
    --trx-butter-ink: #17293b;

    --trx-plane: #f7f7f5;
    --trx-surface: #ffffff;
    --trx-surface-2: #f3f3ef;
    --trx-surface-3: #ebebe6;
    --trx-border: #e6e5df;
    --trx-border-strong: #d3d2ca;
    --trx-ink: #0b0b0b;
    --trx-ink-2: #52514e;
    --trx-ink-3: #898781;
    --trx-link: #2a5fb8;

    --trx-series: #2a78d6;
    --trx-series-soft: rgb(42 120 214 / 0.12);
    --trx-good: #0f7b3e;
    --trx-good-bg: #e6f5ec;
    --trx-bad: #b42318;
    --trx-bad-bg: #fdecea;
    --trx-warn: #7a4d00;
    --trx-warn-bg: #fff6db;

    --trx-sidebar-ink: #c4cfdb;
    --trx-sidebar-ink-strong: #ffffff;
    --trx-sidebar-muted: #7f90a3;
    --trx-sidebar-group: rgb(255 255 255 / 0.45);
    --trx-sidebar-hover: rgb(255 255 255 / 0.06);
    --trx-sidebar-active: rgb(255 255 255 / 0.08);
    --trx-sidebar-border: rgb(255 255 255 / 0.08);

    --trx-shadow-card: 0 1px 2px rgb(16 24 40 / 0.04), 0 1px 3px rgb(16 24 40 / 0.03);
    --trx-shadow-pop: 0 8px 24px rgb(16 24 40 / 0.14), 0 2px 6px rgb(16 24 40 / 0.06);

    --trx-radius: 10px;
    --trx-radius-sm: 7px;
    --trx-topbar-h: 60px;
    --trx-content-max: 1440px;
    --trx-gutter: 24px;
}

/* ---------------------------------------------------------------------------
 * The page
 * ------------------------------------------------------------------------ */

.fi-body {
    background-color: var(--trx-plane);
    color: var(--trx-ink);
    font-feature-settings: 'cv11', 'ss01';
}

.fi-main {
    max-width: var(--trx-content-max);
    padding-inline: var(--trx-gutter);
    padding-block: 20px 56px;
}

/* ---------------------------------------------------------------------------
 * Sidebar — navy, with one butter bar marking the current page
 *
 * The nav itself carries no side padding: the items are inset instead, so the
 * active bar can sit at the sidebar's edge without the scroll container
 * clipping it.
 * ------------------------------------------------------------------------ */

.fi-sidebar {
    background-color: var(--trx-navy);
    border-inline-end: 0;
    box-shadow: none;
    color: var(--trx-sidebar-ink);
}

.fi-sidebar-header {
    background-color: var(--trx-navy);
    border-bottom: 1px solid var(--trx-sidebar-border);
    box-shadow: none;
    height: var(--trx-topbar-h);
    min-height: var(--trx-topbar-h);
    padding-inline: 16px;
}

.fi-sidebar-nav {
    gap: 0;
    padding: 12px 0;
    scrollbar-color: var(--trx-navy-2) transparent;
}

.fi-sidebar-nav-groups {
    gap: 0;
}

.fi-sidebar-group + .fi-sidebar-group {
    margin-top: 14px;
}

.fi-sidebar-group-btn {
    margin-bottom: 6px;
    min-height: 0;
    padding: 0 22px;
}

.fi-sidebar-group-label {
    color: var(--trx-sidebar-group);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.fi-sidebar-group-items,
.fi-sidebar-nav > .fi-sidebar-nav-groups {
    gap: 2px;
}

.fi-sidebar-item {
    margin-inline: 12px;
    position: relative;
}

.fi-sidebar-item-btn {
    border-radius: 7px;
    color: var(--trx-sidebar-ink);
    gap: 10px;
    min-height: 34px;
    padding: 0 10px;
}

.fi-sidebar-item-btn:hover {
    background-color: var(--trx-sidebar-hover);
    color: var(--trx-sidebar-ink-strong);
}

.fi-sidebar-item-btn .fi-icon {
    color: var(--trx-sidebar-muted);
    height: 18px;
    width: 18px;
}

/* Filament colours the label itself, so the item's own colour never reaches
 * it: the label carries the sidebar ink, and white when it is the page. */
.fi-sidebar-item-label {
    color: var(--trx-sidebar-ink);
    font-size: 13.5px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-sidebar-item-btn:hover .fi-sidebar-item-label {
    color: var(--trx-sidebar-ink-strong);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn,
.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    background-color: var(--trx-sidebar-active);
    color: var(--trx-sidebar-ink-strong);
}

.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    background-color: transparent;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-btn .fi-icon {
    color: var(--trx-butter);
}

.fi-sidebar-item.fi-active::before {
    background-color: var(--trx-butter);
    border-radius: 0 3px 3px 0;
    content: '';
    inset-block: 7px;
    inset-inline-start: -12px;
    position: absolute;
    width: 3px;
}

/* ---------------------------------------------------------------------------
 * Topbar
 * ------------------------------------------------------------------------ */

.fi-topbar > nav,
.fi-topbar {
    background-color: color-mix(in srgb, var(--trx-plane) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--trx-border);
    box-shadow: none;
    min-height: var(--trx-topbar-h);
}

.fi-topbar .fi-logo {
    color: var(--trx-ink);
    font-size: 15px;
    font-weight: 600;
}


/* The brand block in the sidebar header. */
.fi-trx-brand {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    min-width: 0;
}

.fi-trx-brand-mark {
    align-items: center;
    background: var(--trx-butter);
    border-radius: var(--trx-radius-sm);
    color: var(--trx-butter-ink);
    display: inline-flex;
    flex: none;
    font-size: 14px;
    font-weight: 700;
    height: 26px;
    justify-content: center;
    width: 26px;
}

.fi-trx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.fi-trx-brand-name {
    color: var(--trx-sidebar-ink-strong);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.fi-trx-brand-sub {
    color: var(--trx-sidebar-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* The user menu sits in the sidebar footer, above a hairline. */
.fi-sidebar-footer {
    border-top: 1px solid var(--trx-sidebar-border);
    padding: 10px 12px;
}

.fi-sidebar-footer .fi-user-menu-trigger {
    border-radius: var(--trx-radius-sm);
    color: var(--trx-sidebar-ink);
    font-size: 12px;
    gap: 8px;
    padding: 6px 8px;
    width: 100%;
}

.fi-sidebar-footer .fi-user-menu-trigger:hover {
    background-color: var(--trx-sidebar-hover);
    color: var(--trx-sidebar-ink-strong);
}

.fi-sidebar-footer .fi-avatar {
    border-radius: 999px;
    height: 26px;
    width: 26px;
}

.fi-sidebar-footer .fi-user-menu-trigger-label {
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
 * Page header
 * ------------------------------------------------------------------------ */

/* A report's title and its controls share one line, as on the dashboards. */
.fi-trx-report-header {
    align-items: flex-start;
    column-gap: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 12px;
}

.fi-trx-report-header-text {
    flex: 1 1 320px;
    min-width: 0;
}

.fi-trx-report-header .fi-rpt-controls-shell {
    flex: 0 1 auto;
    margin: 0;
}

.fi-trx-report-header .fi-rpt-global-controls {
    justify-content: flex-end;
}

.fi-header-heading {
    color: var(--trx-ink);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.fi-header-subheading {
    color: var(--trx-ink-2);
    font-size: 13px;
    max-width: 76ch;
}

/* ---------------------------------------------------------------------------
 * Surfaces: sections, widgets, tables, modals, dropdowns
 * ------------------------------------------------------------------------ */

.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn > .fi-sc-component-ctn {
    background-color: var(--trx-surface);
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius);
    box-shadow: var(--trx-shadow-card);
}

.fi-section-header-heading {
    color: var(--trx-ink);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.fi-section-header-description {
    color: var(--trx-ink-2);
    font-size: 12px;
}

.fi-ta-header-cell {
    background-color: var(--trx-surface);
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fi-ta-cell,
.fi-ta-text {
    font-size: 13px;
}

.fi-ta-row:hover {
    background-color: var(--trx-surface-2);
}

.fi-dropdown-panel,
.fi-modal-window {
    background-color: var(--trx-surface);
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius);
    box-shadow: var(--trx-shadow-pop);
}

/* ---------------------------------------------------------------------------
 * Controls
 * ------------------------------------------------------------------------ */

.fi-btn {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* Filament picks a shade of the primary palette for its buttons; the brand
 * button is the butter itself, with navy ink, as on the dashboards. */
.fi-btn.fi-color-primary {
    background-color: var(--trx-butter);
    color: var(--trx-butter-ink);
}

.fi-btn.fi-color-primary:hover {
    background-color: #f6d068;
    color: var(--trx-butter-ink);
}

.fi-input,
.fi-select-input,
.fi-input-wrp {
    border-radius: 8px;
    font-size: 12.5px;
}

.fi-badge {
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}

.fi-link {
    color: var(--trx-link);
}

/* Numbers line up in columns wherever Filament prints them. */
.fi-ta-text-item-label,
.fi-wi-stats-overview-stat-value,
.fi-in-text-item-label {
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------
 * The reporting dashboards
 *
 * The blocks a report page is built from — section headings, stat tiles and
 * strips, charts, tables and the filter bar — in the measurements the
 * dashboards were designed at. They were written inline in a Blade partial;
 * they live here so a report and the panel around it share one set of tokens.
 * ------------------------------------------------------------------------ */

.fi-rpt {
    color: var(--trx-ink);
    min-width: 0;
}

.fi-rpt-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius);
    background: var(--trx-surface);
    box-shadow: var(--trx-shadow-card);
}

.fi-rpt-block {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.fi-rpt-block-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.fi-rpt-block-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.fi-rpt-section-heading {
    margin: 2px 0 10px;
}

.fi-rpt-block-title {
    color: var(--trx-ink);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.3;
}

/* A section heading is a rule across the page, not a card title. */
.fi-rpt-section-title {
    align-items: center;
    color: var(--trx-ink-3);
    display: flex;
    font-size: 12px;
    font-weight: 600;
    gap: 12px;
    letter-spacing: 0.07em;
    line-height: 1;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.fi-rpt-section-title::after {
    content: '';
    height: 1px;
    flex: 1 1 auto;
    background: var(--trx-border);
}

.fi-rpt-block-description,
.fi-rpt-section-description {
    margin-top: 2px;
    color: var(--trx-ink-3);
    font-size: 12px;
    line-height: 1.45;
}

.fi-rpt-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
}

.fi-rpt-funnel-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.fi-rpt-funnel {
    display: grid;
    grid-template-columns: repeat(var(--trx-funnel-steps, 12), minmax(92px, 1fr));
    /* stage, step name, band, count, conversion: one set of rows for every
       column, so a two-line name cannot push its own band out of line. */
    grid-template-rows: auto auto 190px auto auto;
    min-width: calc(var(--trx-funnel-steps, 12) * 92px);
}

.fi-rpt-funnel [data-stage] { --trx-funnel-color: var(--trx-series); }
.fi-rpt-funnel [data-stage="quiz"] { --trx-funnel-color: #4a3aa7; }
.fi-rpt-funnel [data-stage="lead"] { --trx-funnel-color: #1baf7a; }
.fi-rpt-funnel [data-stage="plan"] { --trx-funnel-color: #eda100; }
.fi-rpt-funnel [data-stage="payment"] { --trx-funnel-color: #eb6834; }
.fi-rpt-funnel [data-stage="sale"] { --trx-funnel-color: #0f7b3e; }

.fi-rpt-funnel-stage {
    border-right: 2px solid var(--trx-surface);
    border-radius: 7px 7px 0 0;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--trx-funnel-color) 16%, var(--trx-surface));
    color: color-mix(in srgb, var(--trx-funnel-color) 80%, var(--trx-ink));
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fi-rpt-funnel-step {
    display: grid;
    grid-row: 2 / span 4;
    grid-template-rows: subgrid;
    min-width: 0;
    padding: 10px 0;
    background: color-mix(in srgb, var(--trx-funnel-color) 6%, var(--trx-surface));
}

.fi-rpt-funnel-stage {
    grid-row: 1;
}

.fi-rpt-funnel-step:hover {
    background: color-mix(in srgb, var(--trx-funnel-color) 12%, var(--trx-surface));
}

.fi-rpt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.fi-rpt-funnel-name {
    padding: 0 10px 10px;
}

.fi-rpt-funnel-label {
    color: var(--trx-ink);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
}

.fi-rpt-funnel-track {
    height: 190px;
}

.fi-rpt-funnel-band {
    width: 100%;
    height: 100%;
    background: var(--trx-funnel-color);
    opacity: 0.88;
}

.fi-rpt-funnel-step:hover .fi-rpt-funnel-band {
    opacity: 1;
}

.fi-rpt-funnel-value {
    display: grid;
    align-content: start;
    gap: 1px;
    padding: 10px 10px 8px;
    font-variant-numeric: tabular-nums;
}

.fi-rpt-funnel-value strong {
    color: var(--trx-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.15;
}

.fi-rpt-funnel-value span,
.fi-rpt-funnel-note {
    color: var(--trx-ink-3);
    font-size: 11px;
    line-height: 1.3;
}

.fi-rpt-funnel-kept {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 4px;
    padding: 0 10px;
}

.fi-rpt-funnel-pill {
    border-radius: 999px;
    padding: 2px 8px;
    background: var(--trx-surface-3);
    color: var(--trx-ink-2);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fi-rpt-funnel-pill.is-worst {
    background: var(--trx-bad-bg);
    color: var(--trx-bad);
}

.fi-rpt-funnel-pill.is-grew {
    background: var(--trx-good-bg);
    color: var(--trx-good);
}

.fi-rpt-funnel-step.is-worst .fi-rpt-funnel-note {
    color: var(--trx-bad);
    font-weight: 600;
}

.fi-rpt-series {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
}

.fi-rpt-series-label,
.fi-rpt-series-count {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fi-rpt-series-label {
    margin-right: 4px;
}

.fi-rpt-series-count {
    margin-left: 6px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.fi-rpt-series-chip {
    display: inline-flex;
    height: 28px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--trx-border);
    border-radius: 999px;
    padding: 0 11px 0 9px;
    background: var(--trx-surface);
    color: var(--trx-ink-3);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.fi-rpt-series-chip:hover:not(:disabled) {
    border-color: var(--trx-ink-3);
    color: var(--trx-ink);
}

.fi-rpt-series-chip.is-active {
    border-color: color-mix(in srgb, var(--trx-series-chip) 45%, var(--trx-border));
    background: color-mix(in srgb, var(--trx-series-chip) 9%, var(--trx-surface));
    color: var(--trx-ink);
}

.fi-rpt-series-chip:disabled {
    cursor: default;
}

.fi-rpt-series-chip:disabled:not(.is-active) {
    opacity: 0.45;
}

.fi-rpt-series-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border: 1.5px solid var(--trx-ink-3);
    border-radius: 999px;
}

.fi-rpt-series-chip.is-active .fi-rpt-series-dot {
    border-color: var(--trx-series-chip);
    background: var(--trx-series-chip);
}

.fi-rpt-layers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    border: 1px solid var(--trx-border);
    border-radius: 10px;
    padding: 8px 10px;
    background: var(--trx-surface-2);
}

.fi-rpt-layers-label {
    margin-right: 4px;
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fi-rpt-layers-then {
    color: var(--trx-ink-3);
    font-size: 15px;
    line-height: 1;
}

.fi-rpt-layer {
    display: inline-flex;
    height: 34px;
    align-items: center;
    border: 1px solid var(--trx-border);
    border-radius: 8px;
    padding-left: 8px;
    background: var(--trx-surface);
    box-shadow: 0 1px 1px rgb(0 0 0 / 0.03);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fi-rpt-layer:hover {
    border-color: var(--trx-ink-3);
}

.fi-rpt-layer:focus-within {
    border-color: var(--trx-series);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--trx-series) 18%, transparent);
}

.fi-rpt-layer select {
    height: 32px;
    border: 0;
    border-radius: 8px;
    padding: 0 30px 0 8px;
    background-color: transparent;
    box-shadow: none;
    color: var(--trx-ink);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.fi-rpt-layer select:focus {
    outline: none;
    box-shadow: none;
}

.fi-rpt-layer-position {
    display: inline-grid;
    width: 18px;
    height: 18px;
    flex: none;
    place-items: center;
    border-radius: 999px;
    background: var(--trx-series);
    color: var(--trx-surface);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
}

.fi-rpt-layer.is-empty {
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.fi-rpt-layer.is-empty select {
    color: var(--trx-ink-3);
    font-weight: 500;
}

.fi-rpt-layer.is-empty .fi-rpt-layer-position {
    background: var(--trx-surface-3);
    color: var(--trx-ink-3);
}

.fi-rpt-action {
    display: inline-flex;
    height: 28px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 8px;
    background: transparent;
    color: var(--trx-ink-3);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 120ms ease;
}

.fi-rpt-action:hover,
.fi-rpt-action:focus-visible {
    border-color: var(--trx-border);
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    outline: none;
}

.fi-rpt-action svg {
    width: 14px;
    height: 14px;
}

.fi-rpt-error,
.fi-rpt-empty,
.fi-rpt-notice {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--trx-ink-3);
    font-size: 13px;
    text-align: center;
}

/*
 * A widget waiting for its turn on the page: its heading and a shimmer where
 * the numbers will be.
 */
.fi-rpt-waiting {
    min-height: 88px;
}

.fi-rpt-skeleton {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.fi-rpt-skeleton span {
    display: block;
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--trx-surface-3) 25%, var(--trx-surface-2) 50%, var(--trx-surface-3) 75%);
    background-size: 200% 100%;
    animation: trx-shimmer 1.4s linear infinite;
}

.fi-rpt-skeleton span:nth-child(2) {
    width: 72%;
}

.fi-rpt-skeleton span:nth-child(3) {
    width: 48%;
}

@keyframes trx-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.fi-rpt-error {
    color: var(--trx-bad);
}

.fi-rpt-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
    gap: 12px;
}

.fi-rpt-stat-tile {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 14px 16px;
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius);
    background: var(--trx-surface);
    box-shadow: var(--trx-shadow-card);
}

.fi-rpt-stat-label,
.fi-rpt-stat-cell-label {
    overflow: hidden;
    color: var(--trx-ink-2);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-rpt-stat-row,
.fi-rpt-stat-cell-row {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin-top: 6px;
}

.fi-rpt-stat-value {
    color: var(--trx-ink);
    font-size: 28px;
    font-weight: 600;
    font-variant-numeric: proportional-nums;
    letter-spacing: -0.022em;
    line-height: 1.1;
    white-space: nowrap;
}

.fi-rpt-delta {
    display: inline-flex;
    height: 20px;
    align-items: center;
    gap: 3px;
    border-radius: 999px;
    padding: 0 6px;
    background: var(--trx-surface-2);
    color: var(--trx-ink-2);
    font-size: 11.5px;
    font-weight: 600;
    transform: translateY(-2px);
    white-space: nowrap;
}

.fi-rpt-delta--success {
    background: var(--trx-good-bg);
    color: var(--trx-good);
}

.fi-rpt-delta--danger {
    background: var(--trx-bad-bg);
    color: var(--trx-bad);
}

.fi-rpt-sparkline {
    display: block;
    height: 36px;
    overflow: visible;
    width: 100%;
}

.fi-rpt-sparkline-area {
    fill: var(--trx-series-soft);
    stroke: none;
}

.fi-rpt-spark {
    margin-top: 8px;
    position: relative;
    width: 100%;
}

.fi-rpt-spark-dot {
    background: var(--trx-series);
    border-radius: 50%;
    height: 5px;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, -50%);
    width: 5px;
}

.fi-rpt-sparkline polyline {
    fill: none;
    stroke: var(--trx-series);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.fi-rpt-stat-caption,
.fi-rpt-compare {
    margin-top: 8px;
    color: var(--trx-ink-3);
    font-size: 11.5px;
    line-height: 1.35;
}

.fi-rpt-stat-strip {
    display: grid;
    overflow: hidden;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 1px;
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius);
    background: var(--trx-surface);
}

.fi-rpt-stat-cell {
    min-width: 0;
    min-height: 70px;
    padding: 12px 16px 13px;
    background: var(--trx-surface);
    /* The dividers are the grid gap showing through each cell's own hairline,
     * so a half-filled last row leaves no stray rules behind it. */
    box-shadow: 1px 1px 0 0 var(--trx-border);
    transition: background 120ms ease;
}

.fi-rpt-stat-cell:hover {
    background: var(--trx-surface-2);
}

.fi-rpt-stat-cell-value {
    color: var(--trx-ink);
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
}

.fi-rpt-chart-frame {
    position: relative;
    height: 260px;
    width: 100%;
}

.fi-rpt-chart-frame > div {
    height: 100%;
}

.fi-rpt .fi-wi-chart-bg-color {
    color: #ffffff;
}

.fi-rpt .fi-wi-chart-border-color {
    color: #2a78d6;
}

.fi-rpt .fi-wi-chart-grid-color {
    color: #e6e5df;
}

.fi-rpt .fi-wi-chart-text-color {
    color: #52514e;
}

.fi-rpt .fi-wi-chart-tooltip-bg-color {
    color: #ffffff;
}

.fi-rpt .fi-wi-chart-tooltip-text-color {
    color: #0b0b0b;
}

.fi-rpt .fi-wi-chart-tooltip-border-color {
    color: #d3d2ca;
}

.fi-rpt-table-scroll {
    max-height: 640px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.fi-rpt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--trx-ink);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.fi-rpt-table th,
.fi-rpt-table td {
    height: 36px;
    border-bottom: 1px solid var(--trx-border);
    padding: 0 10px;
    text-align: left;
    white-space: nowrap;
}

.fi-rpt-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    height: 32px;
    background: var(--trx-surface-2);
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.fi-rpt-table th.is-numeric,
.fi-rpt-table td.is-numeric {
    text-align: right;
}

.fi-rpt-table td.is-text {
    max-width: 280px;
    overflow: hidden;
    color: var(--trx-ink-2);
    text-overflow: ellipsis;
}

.fi-rpt-table td.is-currency,
.fi-rpt-table td:first-child {
    color: var(--trx-ink);
    font-weight: 550;
}

/* A ratio resting on too few sales to be read as a number: there, but quiet. */
.fi-rpt-table td.is-low-data,
.fi-rpt-table td.is-currency.is-low-data {
    color: var(--trx-ink-3);
    font-style: italic;
    font-weight: 400;
}

.fi-rpt-table td.is-mono {
    color: var(--trx-ink-3);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.fi-rpt-table tbody tr:hover td {
    background: var(--trx-surface-2);
}

.fi-rpt-table tfoot td {
    position: sticky;
    z-index: 2;
    bottom: 0;
    border-top: 2px solid var(--trx-border);
    border-bottom: 0;
    background: var(--trx-surface);
    color: var(--trx-ink);
    font-weight: 600;
}

/*
 * The cells come from an Alpine <template>, which is itself the row's first
 * child, so the lead columns are marked by class rather than by position.
 */
.fi-rpt-table.is-sticky th.is-lead,
.fi-rpt-table.is-sticky td.is-lead {
    position: sticky;
    z-index: 3;
    left: 0;
    background: var(--trx-surface);
}

.fi-rpt-table.is-sticky th.is-lead {
    z-index: 4;
    background: var(--trx-surface-2);
}

.fi-rpt-table.is-sticky th.is-lead-second,
.fi-rpt-table.is-sticky td.is-lead-second {
    left: var(--trx-first-column-width, 0px);
}

/*
 * Pinned columns: a wide table keeps its leading columns — the dimensions and
 * the few numbers the rest are read against — in view while the others scroll
 * under them. Pinned columns are always the first ones; the view measures
 * them and hands each its offset as --trx-pin-<index>.
 */
.fi-rpt-table.has-pinned th.is-pinned,
.fi-rpt-table.has-pinned td.is-pinned {
    position: sticky;
    z-index: 3;
    background: var(--trx-surface);
}

.fi-rpt-table.has-pinned th.is-pinned {
    z-index: 4;
    background: var(--trx-surface-2);
}

.fi-rpt-table.has-pinned tbody tr:hover td.is-pinned {
    background: var(--trx-surface-2);
}

.fi-rpt-table.has-pinned .is-pinned-last {
    box-shadow: 1px 0 0 var(--trx-border), 6px 0 8px -6px rgb(15 23 42 / 0.18);
}

/*
 * The Columns chooser: which columns show, in what order, which are pinned.
 * A list the viewer ticks and drags, in a popover under the block's actions.
 */
.fi-rpt-columns {
    position: relative;
}

.fi-rpt-action.is-active {
    border-color: var(--trx-border-strong);
    background: var(--trx-surface-2);
    color: var(--trx-ink);
}

.fi-rpt-columns-count {
    margin-left: 2px;
    border-radius: 999px;
    padding: 1px 6px;
    background: var(--trx-series);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
}

.fi-rpt-columns-popover {
    width: min(320px, calc(100vw - 32px));
    padding: 12px;
}

.fi-rpt-columns-help {
    margin: 0 0 10px;
    color: var(--trx-ink-3);
    font-size: 12px;
    line-height: 1.4;
}

.fi-rpt-columns-list {
    display: flex;
    max-height: min(420px, 55vh);
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.fi-rpt-columns-item {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    padding: 2px 4px 2px 2px;
    color: var(--trx-ink-2);
    font-size: 13px;
    cursor: grab;
}

.fi-rpt-columns-item:hover {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
}

.fi-rpt-columns-item.is-dragging {
    opacity: 0.45;
}

.fi-rpt-columns-item.is-hidden .fi-rpt-columns-check span {
    color: var(--trx-ink-3);
    text-decoration: line-through;
}

.fi-rpt-columns-item.is-pinned {
    background: color-mix(in srgb, var(--trx-series) 7%, transparent);
}

.fi-rpt-columns-grip {
    flex: none;
    width: 14px;
    color: var(--trx-ink-3);
    font-size: 11px;
    letter-spacing: -3px;
    text-align: center;
    user-select: none;
}

.fi-rpt-columns-check {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fi-rpt-columns-check input {
    flex: none;
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--trx-series);
}

.fi-rpt-columns-check span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-rpt-columns-pin {
    display: inline-flex;
    flex: none;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--trx-ink-3);
    cursor: pointer;
}

.fi-rpt-columns-pin svg {
    width: 15px;
    height: 15px;
}

.fi-rpt-columns-pin:hover {
    background: var(--trx-surface-3);
    color: var(--trx-ink);
}

.fi-rpt-columns-pin.is-active {
    color: var(--trx-series);
}

.fi-rpt-columns-end {
    min-height: 10px;
}

.fi-rpt-columns-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
}

.fi-rpt-panel-button:disabled {
    opacity: 0.45;
    cursor: default;
}

/*
 * Column resizing: a handle on each header's right edge. A width the viewer
 * drags to is set on every cell of the column and kept in the browser per
 * table; a sized cell clips its text so the width holds. Double-clicking the
 * handle lets the column fit itself again.
 */
.fi-rpt-resize {
    position: absolute;
    top: 0;
    right: -4px;
    z-index: 1;
    width: 9px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}

.fi-rpt-resize::after {
    content: "";
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 4px;
    width: 1px;
    background: var(--trx-border);
    transition: background 120ms ease, width 120ms ease;
}

.fi-rpt-table th:hover .fi-rpt-resize::after,
.fi-rpt-table th.is-resizing .fi-rpt-resize::after {
    width: 2px;
    background: var(--trx-series);
}

.fi-rpt-table th.is-resizing,
.fi-rpt-table th.is-resizing .fi-rpt-sort {
    cursor: col-resize;
    user-select: none;
}

.fi-rpt-table th.is-sized,
.fi-rpt-table td.is-sized {
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-rpt-table th.is-sized .fi-rpt-sort {
    min-width: 0;
    overflow: hidden;
}

.fi-rpt-sort {
    display: inline-flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-transform: inherit;
}

.is-numeric .fi-rpt-sort {
    justify-content: flex-end;
}

.fi-rpt-sort:hover,
.fi-rpt-sort:focus-visible,
.fi-rpt-sort.is-active {
    color: var(--trx-ink);
    outline: none;
}

.fi-rpt-sort-icon {
    opacity: 0;
    transition: opacity 120ms ease;
}

.fi-rpt-sort:hover .fi-rpt-sort-icon,
.fi-rpt-sort.is-active .fi-rpt-sort-icon {
    opacity: 1;
}

.fi-rpt-cell-bar {
    display: inline-grid;
    width: 100%;
    min-width: 128px;
    grid-template-columns: minmax(44px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.fi-rpt-cell-bar-track {
    min-width: 44px;
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: var(--trx-surface-3);
}

.fi-rpt-cell-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--trx-series);
    opacity: 0.68;
}

.fi-rpt-cell-bar-text {
    min-width: 58px;
    color: var(--trx-ink);
    text-align: right;
}

.fi-rpt-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    color: var(--trx-ink-3);
    font-size: 12px;
}

.fi-rpt-pager-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fi-rpt-pager button {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--trx-border);
    border-radius: 6px;
    background: var(--trx-surface);
    color: var(--trx-ink-2);
    cursor: pointer;
}

.fi-rpt-pager button:hover:not(:disabled) {
    border-color: var(--trx-border-strong);
    color: var(--trx-ink);
}

.fi-rpt-pager button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.fi-rpt-hint {
    position: relative;
    cursor: help;
    text-decoration: underline dotted;
    text-decoration-color: var(--trx-border-strong);
    text-underline-offset: 3px;
}

.fi-rpt-hint:hover,
.fi-rpt-hint:focus-visible {
    text-decoration-color: currentColor;
    outline: none;
}

.fi-rpt-hint-tip {
    position: fixed;
    z-index: 9999;
    display: block;
    width: max-content;
    max-width: min(280px, calc(100vw - 16px));
    isolation: isolate;
    border: 1px solid #d3d2ca;
    border-radius: 7px;
    padding: 8px 10px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgb(16 24 40 / 0.16);
    color: #0b0b0b;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.45;
    pointer-events: none;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

.fi-rpt-hint-source {
    display: block;
    margin-top: 4px;
    color: #6b6a66;
    font-size: 11.5px;
}

@media (max-width: 719px) {
    .fi-rpt-stat-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
    }

    .fi-rpt-stat-grid > * {
        grid-column: span 3;
    }

    .fi-rpt-stat-grid > :only-child {
        grid-column: span 6;
    }

    .fi-rpt-stat-grid:has(> :nth-child(3):last-child) > *,
    .fi-rpt-stat-grid:has(> :nth-child(5):last-child) > :nth-child(-n + 3) {
        grid-column: span 2;
    }

    .fi-rpt-stat-value {
        font-size: 24px;
    }

    .fi-rpt-stat-tile {
        min-height: 148px;
    }

    .fi-rpt-stat-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fi-rpt-block {
        padding: 14px;
    }

    .fi-rpt-table.is-sticky th.is-lead-second,
    .fi-rpt-table.is-sticky td.is-lead-second {
        position: static;
    }

    .fi-rpt-table.has-pinned th.is-pinned:not(:first-child),
    .fi-rpt-table.has-pinned td.is-pinned:not(:first-child) {
        /* Over the inline offset; the header and totals keep their own stickiness. */
        left: auto !important;
        box-shadow: none;
    }
}

/* ---------------------------------------------------------------------------
 * The report filter bar: date presets, the comparison switch, the timezone
 * and the dimension drawer.
 * ------------------------------------------------------------------------ */

.fi-rpt-controls-shell {
    position: relative;
    min-width: 0;
}

.fi-page-content:has(.fi-rpt-controls-shell) {
    gap: 1rem;
}

.fi-page-content:has(.fi-rpt-controls-shell) .fi-sc-grid {
    gap: 1rem;
}

.fi-rpt-global-controls {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.fi-rpt-filter-trigger {
    position: relative;
    width: 36px;
    padding: 0;
}

.fi-rpt-filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--trx-surface);
    border-radius: 999px;
    padding: 0 4px;
    background: #eda100;
    color: #111827;
    font-size: 10px;
    font-weight: 700;
}

.fi-rpt-segmented {
    display: inline-flex;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--trx-border);
    border-radius: 7px;
    background: var(--trx-surface);
    scrollbar-width: none;
}

.fi-rpt-segmented::-webkit-scrollbar {
    display: none;
}

.fi-rpt-segmented button {
    height: 34px;
    flex: none;
    border: 0;
    border-right: 1px solid var(--trx-border);
    padding: 0 10px;
    background: transparent;
    color: var(--trx-ink-3);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color 120ms ease, background 120ms ease;
}

.fi-rpt-segmented button:last-child {
    border-right: 0;
}

.fi-rpt-segmented button:hover,
.fi-rpt-segmented button:focus-visible {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    outline: none;
}

.fi-rpt-segmented button.is-active {
    background: var(--trx-surface-3);
    color: var(--trx-ink);
    box-shadow: inset 0 -2px 0 var(--trx-series);
}

.fi-rpt-compare {
    display: inline-flex;
    height: 34px;
    flex: none;
    align-items: center;
    gap: 7px;
    border: 0;
    padding: 0 5px;
    background: transparent;
    color: var(--trx-ink-2);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.fi-rpt-switch-track {
    position: relative;
    width: 30px;
    height: 17px;
    border-radius: 999px;
    background: var(--trx-border-strong);
    transition: background 140ms ease;
}

.fi-rpt-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
    transition: transform 140ms ease;
}

.fi-rpt-compare[aria-checked='true'] .fi-rpt-switch-track {
    background: #eda100;
}

.fi-rpt-compare[aria-checked='true'] .fi-rpt-switch-track::after {
    transform: translateX(13px);
}

.fi-rpt-timezone {
    height: 34px;
    flex: none;
    border: 1px solid var(--trx-border);
    border-radius: 7px;
    padding: 0 28px 0 10px;
    background-color: var(--trx-surface);
    color: var(--trx-ink-2);
    font-size: 11.5px;
    font-weight: 600;
}

.fi-rpt-custom-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    border: 1px solid var(--trx-border-strong);
    border-radius: 9px;
    padding: 14px;
    background: var(--trx-surface);
    box-shadow: 0 16px 40px rgb(0 0 0 / 0.22);
}

.fi-rpt-custom-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fi-rpt-custom-field,
.fi-rpt-dimension-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fi-rpt-custom-field > span,
.fi-rpt-dimension-label {
    color: var(--trx-ink-2);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fi-rpt-custom-field input,
.fi-rpt-dimension-select {
    width: 100%;
    height: 36px;
    border: 1px solid var(--trx-border);
    border-radius: 7px;
    padding: 0 10px;
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    font-size: 13px;
}

.fi-rpt-custom-hint {
    margin-top: 9px;
    color: var(--trx-ink-3);
    font-size: 11.5px;
}

.fi-rpt-custom-actions,
.fi-rpt-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 12px;
}

.fi-rpt-panel-root {
    position: fixed;
    z-index: 60;
    inset: 0;
}

.fi-rpt-panel-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(0 0 0 / 0.42);
    cursor: default;
}

.fi-rpt-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(360px, 100vw);
    height: 100%;
    flex-direction: column;
    border-left: 1px solid var(--trx-border);
    background: var(--trx-surface);
    box-shadow: -12px 0 36px rgb(0 0 0 / 0.2);
}

.fi-rpt-panel-header,
.fi-rpt-panel-footer {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--trx-border);
    padding: 14px 16px;
}

.fi-rpt-panel-footer {
    border-top: 1px solid var(--trx-border);
    border-bottom: 0;
}

.fi-rpt-panel-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--trx-ink);
    font-size: 15px;
    font-weight: 700;
}

.fi-rpt-panel-count {
    color: var(--trx-ink-3);
    font-size: 11.5px;
    font-weight: 500;
}

.fi-rpt-panel-body {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    padding: 16px;
}

.fi-rpt-option-list {
    display: flex;
    max-height: 250px;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.fi-rpt-option {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 9px;
    border-radius: 6px;
    padding: 5px 7px;
    color: var(--trx-ink-2);
    font-size: 13px;
    cursor: pointer;
}

.fi-rpt-option:hover {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
}

.fi-rpt-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--trx-series);
}

.fi-rpt-no-options {
    color: var(--trx-ink-3);
    font-size: 12.5px;
}

.fi-rpt-panel-button {
    display: inline-flex;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--trx-border);
    border-radius: 7px;
    padding: 0 10px;
    background: var(--trx-surface);
    color: var(--trx-ink-2);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.fi-rpt-panel-button:hover,
.fi-rpt-panel-button:focus-visible {
    border-color: var(--trx-border-strong);
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    outline: none;
}

.fi-rpt-panel-button.is-primary {
    border-color: #eda100;
    background: #eda100;
    color: #111827;
}

.fi-rpt-panel-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

[x-cloak] {
    display: none !important;
}

@media (max-width: 900px) {
    .fi-rpt-global-controls {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .fi-rpt-global-controls::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 640px) {
    .fi-rpt-segmented button {
        padding-inline: 8px;
    }

    .fi-rpt-compare > span:last-child {
        display: none;
    }

    .fi-rpt-custom-dates {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------------
 * Signing in — the dashboards' split page: the brand and the quote on navy,
 * the form on a white column beside it.
 * ------------------------------------------------------------------------ */

.fi-simple-layout {
    align-items: stretch;
    background: var(--trx-surface);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-items: stretch;
    min-height: 100vh;
    padding: 0;
}

.fi-trx-sign-in-panel {
    align-items: center;
    background: var(--trx-navy);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(32px, 4.5vw, 64px);
    position: relative;
}

.fi-trx-sign-in-panel > * {
    max-width: 680px;
    width: 100%;
}

/* The butter glow the dashboards carry in the corner. */
.fi-trx-sign-in-panel::after {
    background: radial-gradient(circle at center, rgb(243 198 75 / 0.18), transparent 65%);
    border-radius: 50%;
    bottom: -160px;
    content: '';
    height: 420px;
    pointer-events: none;
    position: absolute;
    right: -160px;
    width: 420px;
}

.fi-trx-sign-in-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.fi-trx-sign-in-brand .fi-trx-brand-mark {
    border-radius: 9px;
    font-size: 16px;
    height: 32px;
    width: 32px;
}

.fi-trx-sign-in-brand .fi-trx-brand-name {
    font-size: 18px;
}

.fi-trx-sign-in-brand .fi-trx-brand-sub {
    font-size: 12px;
}

.fi-trx-sign-in-pitch {
    margin: 0;
}

.fi-trx-sign-in-quote {
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.28;
    margin-bottom: 20px;
    text-wrap: balance;
}

.fi-trx-sign-in-cite {
    color: var(--trx-sidebar-ink);
    font-size: 14px;
    line-height: 1.5;
}

.fi-trx-sign-in-cite cite {
    font-style: italic;
}

.fi-trx-sign-in-foot {
    color: var(--trx-sidebar-muted);
    font-size: 12px;
}

.fi-simple-main-ctn {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 40px 24px;
}

.fi-simple-main {
    background: transparent;
    border: 0;
    box-shadow: none;
    max-width: 400px;
    padding: 0;
    width: 100%;
}

.fi-simple-header {
    align-items: flex-start;
    text-align: start;
}

.fi-simple-header-heading {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-align: start;
}

/* The brand is on the navy half; the form does not repeat it. */
.fi-simple-layout .fi-logo,
.fi-simple-header .fi-logo {
    display: none;
}

@media (max-width: 860px) {
    .fi-simple-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fi-trx-sign-in-panel {
        gap: 20px;
        padding: 28px 24px;
    }

    .fi-trx-sign-in-quote {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .fi-trx-sign-in-foot {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
 * The reports column
 *
 * A second layer of navigation that opens out of the sidebar's Reports entry
 * on hover and closes when a report is chosen. It lies over the page rather
 * than taking a column from it, so the report keeps its full width.
 * ------------------------------------------------------------------------ */

.fi-trx-reports-column {
    background: var(--trx-surface);
    border-inline-end: 1px solid var(--trx-border);
    box-shadow: var(--trx-shadow-pop);
    inset-block: 0;
    inset-inline-start: var(--sidebar-width);
    overflow-y: auto;
    padding: 16px 12px;
    position: fixed;
    width: 208px;
    z-index: 40;
}

.fi-trx-reports-column-enter {
    animation: fi-trx-reports-column-in 140ms ease;
}

@keyframes fi-trx-reports-column-in {
    from {
        opacity: 0;
        transform: translateX(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fi-trx-reports-column-enter {
        animation: none;
    }
}

[x-cloak] {
    display: none !important;
}

.fi-trx-reports-column-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.fi-trx-reports-column-title {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding-inline: 10px;
    text-transform: uppercase;
}

.fi-trx-reports-column-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--trx-radius-sm);
    color: var(--trx-ink-2);
    cursor: pointer;
    display: none;
    font-size: 22px;
    height: 32px;
    justify-content: center;
    line-height: 1;
    width: 32px;
}

.fi-trx-reports-column-close:hover,
.fi-trx-reports-column-close:focus-visible {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    outline: none;
}

.fi-trx-reports-column-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
}

.fi-trx-reports-column-item {
    align-items: center;
    border-radius: var(--trx-radius-sm);
    color: var(--trx-ink-2);
    display: flex;
    font-size: 13.5px;
    font-weight: 500;
    min-height: 34px;
    padding: 0 10px;
    position: relative;
    text-decoration: none;
}

.fi-trx-reports-column-item:hover {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
}

.fi-trx-reports-column-item.fi-active {
    background: var(--trx-surface-2);
    color: var(--trx-ink);
    font-weight: 600;
}

.fi-trx-reports-column-item.fi-active::before {
    background: var(--trx-butter);
    border-radius: 0 3px 3px 0;
    content: '';
    inset-block: 7px;
    inset-inline-start: -12px;
    position: absolute;
    width: 3px;
}

/* On touch and compact screens, the first tap opens this column over the
 * sidebar. Choosing a report or using the close button dismisses it. */
@media (max-width: 1023px) {
    .fi-trx-reports-column {
        inset-inline-start: 0;
        width: min(20rem, 100vw);
    }

    .fi-trx-reports-column-close {
        display: inline-flex;
    }
}

/* ---------------------------------------------------------------------------
 * The dictionary
 * ------------------------------------------------------------------------ */

.fi-trx-definitions {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 90ch;
}

.fi-trx-definitions-list {
    display: flex;
    flex-direction: column;
    padding: 4px 18px;
}

.fi-trx-definition {
    display: grid;
    gap: 2px 24px;
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 12px 0;
}

.fi-trx-definition + .fi-trx-definition {
    border-top: 1px solid var(--trx-border);
}

.fi-trx-definition-term {
    color: var(--trx-ink);
    font-size: 13px;
    font-weight: 600;
}

.fi-trx-definition-text {
    color: var(--trx-ink-2);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 719px) {
    .fi-trx-definition {
        grid-template-columns: minmax(0, 1fr);
    }
}

/*
 * The Quiz report's step waterfall: one row per screen, named as the patient
 * reads it, its bar as long as the share of quiz starts who reached it and
 * split into continued, screened out and abandoned.
 */
.fi-rpt-wf-view button {
    height: 30px;
}

.fi-rpt-wf-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 20px;
    border-bottom: 1px solid var(--trx-border);
    margin: 4px 0 16px;
}

.fi-rpt-wf-tabs {
    display: flex;
    gap: 22px;
}

.fi-rpt-wf-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 0 10px;
    background: transparent;
    color: var(--trx-ink-3);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color 120ms ease, border-color 120ms ease;
}

.fi-rpt-wf-tab:hover,
.fi-rpt-wf-tab:focus-visible {
    color: var(--trx-ink);
    outline: none;
}

.fi-rpt-wf-tab.is-active {
    border-bottom-color: var(--trx-navy);
    color: var(--trx-ink);
}

.fi-rpt-wf-tab-count {
    color: var(--trx-ink-3);
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.fi-rpt-wf-include {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    padding-bottom: 9px;
    color: var(--trx-ink-2);
    font-size: 12.5px;
}

.fi-rpt-wf-include-label {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fi-rpt-wf-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.fi-rpt-wf-check input {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    accent-color: var(--trx-navy);
    cursor: pointer;
}

.fi-rpt-wf-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 36px;
    margin: 0 0 16px;
}

.fi-rpt-wf-summary > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fi-rpt-wf-summary-value {
    color: var(--trx-ink);
    font-size: 20px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.fi-rpt-wf-summary-value.is-denied {
    color: var(--trx-warn);
}

.fi-rpt-wf-summary-value.is-abandoned {
    color: var(--trx-bad);
}

.fi-rpt-wf-summary-label {
    color: var(--trx-ink-2);
    font-size: 12.5px;
}

.fi-rpt-wf-ribbon-scroll {
    overflow-x: auto;
    margin-bottom: 22px;
    padding-bottom: 4px;
}

.fi-rpt-wf-ribbon {
    display: grid;
    grid-template-columns: repeat(var(--trx-wf-stages, 6), minmax(132px, 1fr));
    grid-template-rows: auto 120px auto auto;
    min-width: calc(var(--trx-wf-stages, 6) * 132px);
}

.fi-rpt-wf-stage { --trx-wf-tone: var(--trx-series); }
.fi-rpt-wf-stage[data-tone="1"] { --trx-wf-tone: #4a3aa7; }
.fi-rpt-wf-stage[data-tone="2"] { --trx-wf-tone: #1baf7a; }
.fi-rpt-wf-stage[data-tone="3"] { --trx-wf-tone: #eda100; }
.fi-rpt-wf-stage[data-tone="4"] { --trx-wf-tone: #eb6834; }
.fi-rpt-wf-stage[data-tone="5"] { --trx-wf-tone: #7a5ad6; }
.fi-rpt-wf-stage.is-end { --trx-wf-tone: #0f7b3e; }

.fi-rpt-wf-stage {
    display: grid;
    grid-row: 1 / span 4;
    grid-template-rows: subgrid;
    min-width: 0;
    border: 0;
    border-right: 2px solid var(--trx-surface);
    padding: 0 0 12px;
    background: color-mix(in srgb, var(--trx-wf-tone) 6%, var(--trx-surface));
    text-align: left;
    cursor: pointer;
    transition: background 120ms ease;
}

.fi-rpt-wf-stage:hover,
.fi-rpt-wf-stage:focus-visible,
.fi-rpt-wf-stage.is-active {
    background: color-mix(in srgb, var(--trx-wf-tone) 13%, var(--trx-surface));
    outline: none;
}

.fi-rpt-wf-stage.is-active {
    box-shadow: inset 0 -3px 0 var(--trx-wf-tone);
}

.fi-rpt-wf-stage.is-end {
    cursor: default;
}

.fi-rpt-wf-stage-name {
    border-radius: 7px 7px 0 0;
    padding: 7px 12px;
    background: color-mix(in srgb, var(--trx-wf-tone) 16%, var(--trx-surface));
    color: color-mix(in srgb, var(--trx-wf-tone) 80%, var(--trx-ink));
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-rpt-wf-stage-track {
    display: block;
    height: 120px;
}

.fi-rpt-wf-stage-band {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--trx-wf-tone);
    opacity: 0.88;
}

.fi-rpt-wf-stage-value {
    display: grid;
    gap: 1px;
    padding: 10px 12px 8px;
    font-variant-numeric: tabular-nums;
}

.fi-rpt-wf-stage-value strong {
    color: var(--trx-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
}

.fi-rpt-wf-stage-value span {
    color: var(--trx-ink-3);
    font-size: 11px;
}

.fi-rpt-wf-stage-kept {
    display: grid;
    justify-items: start;
    align-content: start;
    gap: 4px;
    padding: 0 12px;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.fi-rpt-wf-stage-pill {
    border-radius: 999px;
    padding: 2px 8px;
    background: var(--trx-surface-3);
    color: var(--trx-ink-2);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.fi-rpt-wf-stage-kept .is-abandoned {
    color: var(--trx-bad);
    font-weight: 600;
}

.fi-rpt-wf-stage-kept .is-denied {
    color: var(--trx-warn);
}

.fi-rpt-wf-stage-worst {
    border-radius: 999px;
    padding: 2px 8px;
    background: var(--trx-bad-bg);
    color: var(--trx-bad);
    font-size: 10.5px;
    font-weight: 700;
}

.fi-rpt-wf-rows-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.fi-rpt-wf-rows-heading h3 {
    margin: 0;
    color: var(--trx-ink);
    font-size: 13.5px;
    font-weight: 650;
}

.fi-rpt-wf-rows-heading button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--trx-link);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.fi-rpt-wf-chart {
    overflow: hidden;
    border: 1px solid var(--trx-border);
    border-radius: var(--trx-radius-sm);
}

.fi-rpt-wf-row {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) 92px 92px 100px 92px;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--trx-border);
    padding: 8px 16px;
}

.fi-rpt-wf-row:hover {
    background: var(--trx-surface-2);
}

.fi-rpt-wf-head,
.fi-rpt-wf-head:hover {
    border-top: 0;
    padding-block: 9px;
    background: var(--trx-surface-2);
    color: var(--trx-ink-3);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.fi-rpt-wf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--trx-ink-2);
}

.fi-rpt-wf-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fi-rpt-wf-swatch {
    width: 10px;
    height: 10px;
    flex: none;
    border-radius: 3px;
}

.fi-rpt-wf-swatch.is-carried,
.fi-rpt-wf-seg.is-carried {
    background: var(--trx-navy-2);
}

.fi-rpt-wf-swatch.is-denied,
.fi-rpt-wf-seg.is-denied {
    background: var(--trx-butter);
}

.fi-rpt-wf-swatch.is-abandoned,
.fi-rpt-wf-seg.is-abandoned {
    background: #e2574c;
}

.fi-rpt-wf-band {
    border-top: 1px solid var(--trx-border);
    padding: 14px 16px 6px;
    color: var(--trx-ink);
    font-size: 12px;
    font-weight: 650;
}

.fi-rpt-wf-band + .fi-rpt-wf-row {
    border-top: 0;
}

.fi-rpt-wf-row.is-leak {
    box-shadow: inset 3px 0 0 #e2574c;
    background: color-mix(in srgb, var(--trx-bad-bg) 55%, transparent);
}

.fi-rpt-wf-label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
}

.fi-rpt-wf-row.is-conditional .fi-rpt-wf-label {
    border-left: 2px solid var(--trx-border-strong);
    margin-left: 4px;
    padding-left: 12px;
}

.fi-rpt-wf-title {
    overflow: hidden;
    color: var(--trx-ink);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-rpt-wf-row.is-conditional .fi-rpt-wf-title {
    color: var(--trx-ink-2);
    font-weight: 500;
}

.fi-rpt-wf-meta {
    overflow: hidden;
    color: var(--trx-ink-3);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-rpt-wf-meta .is-denied {
    color: var(--trx-warn);
}

.fi-rpt-wf-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

.fi-rpt-wf-track {
    display: flex;
    height: 18px;
    align-items: stretch;
    gap: 2px;
    border-radius: 5px;
    background: var(--trx-surface-3);
    overflow: hidden;
}

.fi-rpt-wf-track.is-untracked .fi-rpt-wf-seg {
    opacity: 0.5;
}

.fi-rpt-wf-seg {
    min-width: 2px;
}

.fi-rpt-wf-number {
    color: var(--trx-ink);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.fi-rpt-wf-head .fi-rpt-wf-number {
    color: var(--trx-ink-3);
    font-size: 10.5px;
}

.fi-rpt-wf-head .fi-rpt-wf-number .fi-rpt-wf-swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
}

.fi-rpt-wf-head-hint {
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

.fi-rpt-wf-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
    font-weight: 600;
}

.fi-rpt-wf-cell small {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 500;
}

.fi-rpt-wf-cell.is-zero {
    color: var(--trx-border-strong);
    font-weight: 500;
}

.fi-rpt-wf-cell.is-denied,
.fi-rpt-wf-cell.is-denied small {
    color: var(--trx-warn);
}

.fi-rpt-wf-cell.is-bad,
.fi-rpt-wf-cell.is-bad small {
    color: var(--trx-bad);
}

.fi-rpt-wf-note {
    margin: 14px 0 0;
    color: var(--trx-ink-3);
    font-size: 12px;
    line-height: 1.55;
}

.fi-rpt-wf-note strong {
    color: var(--trx-ink-2);
    font-weight: 600;
}

@media (max-width: 860px) {
    .fi-rpt-wf-row {
        grid-template-columns: minmax(0, 1fr) 70px 70px 78px 70px;
        gap: 6px 10px;
    }

    .fi-rpt-wf-label {
        grid-column: 1 / -1;
    }

    .fi-rpt-wf-head > div:first-child,
    .fi-rpt-wf-legend > span:first-child {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
 * The Models page: the cohort model's headline tiles, split bars, cash curve
 * and month grid, in the report blocks' measurements.
 * ------------------------------------------------------------------------ */

.fi-trx-model {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.fi-trx-model-section {
    min-width: 0;
}

.fi-trx-model-loaded {
    color: var(--trx-ink-2);
    font-size: 13px;
    margin: -6px 0 0;
}

.fi-trx-model-muted {
    color: var(--trx-ink-3);
    font-size: 12px;
}

.fi-trx-model-tiles {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.fi-trx-model-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
}

.fi-trx-model-tile-label {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fi-trx-model-tile-value {
    color: var(--trx-ink);
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.fi-trx-model-tile-note {
    color: var(--trx-ink-3);
    font-size: 12px;
}

.fi-trx-model-tile-hero {
    background: var(--trx-navy);
    border-color: var(--trx-navy);
}

.fi-trx-model-tile-hero .fi-trx-model-tile-value {
    color: var(--trx-butter);
}

.fi-trx-model-tile-hero .fi-trx-model-tile-label,
.fi-trx-model-tile-hero .fi-trx-model-tile-note {
    color: rgb(255 255 255 / 0.75);
}

.fi-trx-model-table-wrap {
    padding: 6px 16px 12px;
}

.fi-trx-model-scroll {
    overflow-x: auto;
}

.fi-trx-model-table {
    border-collapse: collapse;
    font-size: 13px;
    width: 100%;
}

.fi-trx-model-table th,
.fi-trx-model-table td {
    border-bottom: 1px solid var(--trx-border);
    font-variant-numeric: tabular-nums;
    padding: 7px 8px;
    text-align: right;
    white-space: nowrap;
}

.fi-trx-model-table th:first-child,
.fi-trx-model-table td:first-child {
    text-align: left;
}

.fi-trx-model-table thead th {
    color: var(--trx-ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fi-trx-model-table tbody th {
    color: var(--trx-ink-2);
    font-weight: 500;
    position: sticky;
    left: 0;
    background: var(--trx-surface);
    text-align: left;
}

.fi-trx-model-strong td,
.fi-trx-model-strong th {
    font-weight: 600;
}

.fi-trx-model-dim td {
    color: var(--trx-ink-3);
}

.fi-trx-model-neg {
    color: var(--trx-bad);
}

.fi-trx-model-pos {
    color: var(--trx-ink);
}

.fi-trx-model-split-cell {
    min-width: 140px;
}

.fi-trx-model-split {
    display: flex;
    gap: 2px;
    height: 12px;
    width: 100%;
}

.fi-trx-model-split span,
.fi-trx-model-swatch {
    border-radius: 2px;
    display: inline-block;
    height: 12px;
}

.fi-trx-model-swatch {
    margin: 0 4px 0 8px;
    vertical-align: -1px;
    width: 12px;
}

.fi-trx-model-split-fee {
    background: var(--trx-navy-2);
}

.fi-trx-model-split-margin {
    background: var(--trx-butter);
}

.fi-trx-model-split-loss {
    background: var(--trx-bad);
}

.fi-trx-model-legend {
    color: var(--trx-ink-2);
    font-size: 12px;
    margin: 10px 0 0;
}

.fi-trx-model-two {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.fi-trx-model-chart {
    padding: 14px 16px 12px;
}

.fi-trx-model-chart svg {
    display: block;
    height: auto;
    width: 100%;
}

.fi-trx-model-chart text {
    fill: var(--trx-ink-3);
    font-size: 11px;
}

.fi-trx-model-grid {
    stroke: var(--trx-border);
    stroke-width: 1;
}

.fi-trx-model-area {
    fill: var(--trx-butter);
    opacity: 0.25;
}

.fi-trx-model-line {
    fill: none;
    stroke: var(--trx-navy);
    stroke-width: 2.5;
}

.fi-trx-model-hit {
    fill: transparent;
}

.fi-trx-model-end {
    fill: var(--trx-navy);
    stroke: var(--trx-surface);
    stroke-width: 2;
}

.fi-trx-model-end-label {
    fill: var(--trx-ink);
    font-weight: 600;
}

.fi-trx-model-notes {
    color: var(--trx-ink-2);
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 8px;
    line-height: 1.5;
    padding: 14px 16px;
}
