/* GLOBAL stylesheet. Only valuation settings, summary and surrounding layout.
   No grid, cell, numeric-input or generic .ff-refined overrides. */
.ff-multiple-valuation {
    width: 100%; min-width: 0; min-height: 540px;
    padding: 26px; box-sizing: border-box;
    background: #fff; border: 1px solid #dfe8e5; border-radius: 10px;
    container: ff-multiple-valuation / inline-size;
    /* Leave inherited grid typography and colors at application defaults. */
}
.ff-multiple-valuation > .ff-mv-context {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px 20px; margin-bottom: 17px;
    color: #607579; font-size: 12px; line-height: 1.7;
}
.ff-mv-context strong { color: #29494b; font-weight: 600; }
.ff-multiple-valuation > .ff-mv-notices {
    --notice-text: #465264; --notice-title: #253241;
    --notice-info: #116471; --notice-info-bg: #f5f8f9;
    --notice-warning: #905411; --notice-warning-bg: #fff7eb;
    --notice-danger: #a93650; --notice-danger-bg: #fff1f4;
    --notice-success: #276d47; --notice-success-bg: #eff7f2;
    --notice-focus: #116471;
    margin-bottom: 23px;
}
.ff-multiple-valuation > .ff-mv-layout {
    display: grid; grid-template-columns: minmax(0, 1fr);
    align-items: stretch; gap: 26px; min-width: 0;
}
.ff-mv-layout > .ff-mv-settings {
    box-sizing: border-box; min-width: 0; width: 100%;
    padding: 22px; border: 1px solid #dfe8e5; border-radius: 8px;
    background: #fafbfc;
    /* No font/color resets inherited by numeric fields. */
}
.ff-mv-settings > .ff-mv-section + .ff-mv-section { border-top: 1px solid #d9e4df; padding-top: 21px; margin-top: 21px; }
.ff-mv-section > .ff-mv-section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; }
.ff-mv-section-heading > .ff-mv-section-number {
    box-sizing: border-box; display: grid; place-items: center; flex: 0 0 auto;
    width: 23px; height: 23px; border: 1px solid #ccdfd2; border-radius: 4px;
    font-size: 10px; color: #557566;
}
.ff-mv-section-heading > h3 { font-size: 14px; font-weight: 600; line-height: 1.6; color: #203c40; margin: 0; }
.ff-mv-section > .ff-mv-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
.ff-mv-switches > .ff-mv-switch-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ff-mv-switch-line > .rz-switch { flex-shrink: 0; }
.ff-mv-switch-line > .rz-label { font-size: 12px; line-height: 1.6; color: #203c40; }
.ff-mv-section > .ff-mv-field { min-width: 0; margin-top: 16px; }
.ff-mv-field > .ff-mv-label { display: block; font-size: 12px; color: #607579; line-height: 1.6; margin-bottom: 7px; }
.ff-mv-field > .ff-mv-year-controls { display: grid; grid-template-columns: 100px minmax(0, 1fr) 100px; gap: 6px 0; }
.ff-mv-year-controls > .ff-mv-year-start { grid-column: 1; grid-row: 1; min-width: 0; }
.ff-mv-year-controls > .ff-mv-year-end { grid-column: 3; grid-row: 1; min-width: 0; }
.ff-mv-year-controls .ff-mv-year-label { display: block; margin-bottom: 6px; color: #607579; font-size: 10px; line-height: 1.6; }
.ff-mv-year-controls > .ff-mv-slider-host {
    grid-column: 1 / -1; grid-row: 2;
    display: flex; align-items: center; min-width: 0; min-height: 36px;
    padding-inline: 8px; box-sizing: border-box;
}
/* Control width only; no typography, border, padding or disabled overrides. */
.ff-mv-field > .rz-dropdown,
.ff-mv-field > .rz-numeric { width: 100%; max-width: 100%; min-width: 0; }
.ff-mv-layout > .ff-mv-results {
    min-width: 0; width: 100%;
    container: ff-mv-results / inline-size;
}
.ff-mv-results > .ff-mv-result-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; flex-wrap: wrap; margin-bottom: 14px; }
.ff-mv-result-heading > h3 { font-size: 15px; line-height: 1.6; font-weight: 600; color: #203c40; margin: 0; }
.ff-mv-result-heading > span { font-size: 11px; line-height: 1.6; color: #607579; }
.ff-mv-results > .ff-mv-summary-cards { display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: 30px; border: 1px solid #dfe8e5; border-radius: 8px; overflow: hidden; }
.ff-mv-summary-cards > .ff-mv-summary-card { padding: 21px 18px; min-width: 0; background: #fff; }
.ff-mv-summary-cards > .ff-mv-summary-card + .ff-mv-summary-card { border-top: 1px solid #dfe8e5; }
.ff-mv-summary-cards > .ff-mv-summary-card--average { background: #fafbfc; }
.ff-mv-summary-card > .ff-mv-summary-label { margin: 0; font-size: 12px; color: #607579; line-height: 1.6; }
.ff-mv-summary-card > .ff-mv-summary-value { margin: 12px 0 6px; font-size: 25px; line-height: 1.4; font-weight: 600; letter-spacing: -.5px; color: #235c61; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ff-mv-summary-card > .ff-mv-summary-caption { margin: 0; font-size: 10px; line-height: 1.7; color: #607579; }
.ff-mv-results > .ff-mv-grid-slot { min-width: 0; }
.ff-mv-grid-slot > .ff-mv-grid-heading { font-size: 14px; font-weight: 600; line-height: 1.6; color: #203c40; margin: 0 0 15px; }
/* No grid frames or row separators. The native grid manages its own overflow. */
@container ff-multiple-valuation (min-width: 1050px) {
    .ff-multiple-valuation > .ff-mv-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
@container ff-mv-results (min-width: 650px) {
    .ff-mv-results > .ff-mv-summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ff-mv-summary-cards > .ff-mv-summary-card + .ff-mv-summary-card { border-top: 0; border-left: 1px solid #dfe8e5; }
}
@media (max-width: 650px) {
    .ff-multiple-valuation { padding: 15px 12px; }
    .ff-mv-layout > .ff-mv-settings { padding: 18px; }
    .ff-mv-results > .ff-mv-result-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
}

/* Open result summaries — DCF-style typography, no card borders. */
.ff-mv-results > .ff-mv-summary-cards {
    gap: 22px;
    margin-bottom: 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

    .ff-mv-results > .ff-mv-summary-cards > .ff-mv-summary-card {
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

        /* Also overrides the separators inside the existing container query. */
        .ff-mv-results > .ff-mv-summary-cards >
        .ff-mv-summary-card + .ff-mv-summary-card {
            border: 0;
        }

.ff-mv-summary-card > .ff-mv-summary-label {
    margin: 0 0 10px;
    color: #607579;
    font-size: 13px;
    line-height: 1.6;
}

.ff-mv-summary-card > .ff-mv-summary-value {
    margin: 0;
    color: #203c40;
    font-size: clamp(28px, 3vw, 43px);
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    /* Keep financial values intact, rather than wrapping digits. */
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    max-width: 100%;
    overflow-x: auto;
}

.ff-mv-summary-card--average > .ff-mv-summary-value {
    color: #236f70;
}

.ff-mv-summary-card > .ff-mv-summary-caption {
    margin: 10px 0 0;
    color: #607579;
    font-size: 11px;
    line-height: 1.6;
}

.ff-mv-results > .ff-mv-summary-cards {
    padding-bottom: 25px;
    border-bottom: 1px solid #dfe8e5;
}

@container ff-mv-results (min-width: 650px) {
    .ff-mv-results > .ff-mv-summary-cards >
    .ff-mv-summary-card + .ff-mv-summary-card {
        padding-left: 24px;
        border-left: 1px solid #dfe8e5;
    }
}