/* Global stylesheet: load after shared styles. All rules are page-scoped.
   Matrix styles below preserve the supplied matrix appearance. */
.ff-sensitivity-analysis {
    --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;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    min-height: 60vh;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
    container: ff-sensitivity-analysis / inline-size;
}
.ff-sensitivity-analysis > .ff-sa-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
    align-items: stretch;
    min-width: 0;
}
.ff-sa-layout > .ff-sa-settings {
    background: #fafbfc;
    border: 0;
    border-radius: 12px;
    padding: 25px 23px;
    min-width: 0;
    box-sizing: border-box;
}
.ff-sa-settings .ff-sa-eyebrow {
    color: #607579;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .13em;
    line-height: 1.6;
    margin: 0 0 24px;
}
.ff-sa-settings > .ff-sa-settings-group + .ff-sa-settings-group { margin-top: 30px; }
.ff-sa-settings .rz-form-field { width: 100%; min-width: 0; max-width: 100%; }
.ff-sa-settings .rz-dropdown { width: 100%; min-width: 0; max-width: 100%; }
.ff-sa-settings .ff-sa-hint {
    display: block;
    font-size: 11px;
    line-height: 1.7;
    color: #607579;
    margin-top: 10px;
}
.ff-sa-settings > .ff-sa-units { padding-top: 23px; border-top: 1px solid #dce6df; }
.ff-sa-units > .ff-sa-eyebrow { margin-bottom: 10px; }
.ff-sa-units > .ff-sa-hint { margin-top: 0; }
.ff-sa-layout > .ff-sa-results { min-width: 0; padding: 1px 0 10px; }
.ff-sa-results > .ff-sa-notices { display: grid; gap: 10px; margin-bottom: 25px; }
.ff-sa-notices > .rz-alert { margin: 0; }
.ff-sa-results > .ff-sa-matrix-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 17px;
}
.ff-sa-matrix-heading > h3 { font-size: 17px; line-height: 1.55; font-weight: 600; color: #203c40; margin: 0; }
.ff-sa-matrix-heading > .ff-sa-tested-key { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: #607579; font-size: 10px; padding-top: 7px; }
.ff-sa-tested-key > i { display: block; width: 13px; height: 13px; border: 2px solid #0F172A; border-radius: 4px; box-sizing: border-box; }
.ff-sa-results > .ff-sa-matrix-help { font-size: 11px; color: #607579; line-height: 1.7; margin: 8px 8px 0; }
.ff-sa-results > .ff-sa-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 29px; }
.ff-sensitivity-analysis .sensitivity-table-wrapper:focus-visible { outline: 2px solid #236f70; outline-offset: 4px; }

/* Original matrix: no new frame, separators, numeric typography, or colour mapping. */
.ff-sensitivity-analysis .sensitivity-table-wrapper { border-radius: 16px; padding: 0; overflow-x: auto; }
.ff-sensitivity-analysis .sensitivity-table { width: 100%; border-collapse: separate; border-spacing: 6px; }
.ff-sensitivity-analysis .sensitivity-table th,
.ff-sensitivity-analysis .sensitivity-table td {
    padding: 0;
    height: 40px;
    min-width: 100px;
    text-align: center;
    vertical-align: middle;
    position: relative;
    border-radius: 10px;
    transition: transform .18s cubic-bezier(.4, 0, .2, 1), box-shadow .18s cubic-bezier(.4, 0, .2, 1);
}
.ff-sensitivity-analysis .sensitivity-table th { background-color: #fff; color: #64748B; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; box-shadow: inset 0 0 0 1px #EDF0F3; }
.ff-sensitivity-analysis .sensitivity-table td:hover { transform: scale(1.04); box-shadow: 0 6px 16px rgba(15, 23, 42, .14); z-index: 10; }
.ff-sensitivity-analysis .target-cell { box-shadow: inset 0 0 0 2px #0F172A, 0 0 0 3px rgba(15, 23, 42, .08); }
.ff-sensitivity-analysis .target-cell:hover { box-shadow: inset 0 0 0 2px #0F172A, 0 6px 16px rgba(15, 23, 42, .18); }
.ff-sensitivity-analysis .matrix-corner { background-color: transparent !important; box-shadow: none !important; text-align: right; padding-right: 10px; padding-bottom: 5px; }
.ff-sensitivity-analysis .matrix-corner__top { font-size: .75rem; color: #94A3B8; font-weight: 600; line-height: 1.4; }
.ff-sensitivity-analysis .matrix-corner__side { color: #64748B; }
.ff-sensitivity-analysis .matrix-input { width: 100%; height: 100%; display: block; border-radius: 10px; }
.ff-sensitivity-analysis .matrix-input .rz-spinner,
.ff-sensitivity-analysis .matrix-input input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 10px !important;
    text-align: center;
    width: 100%;
    height: 100%;
    font-family: 'Inter', -apple-system, sans-serif;
    font-variant-numeric: tabular-nums;
}
.ff-sensitivity-analysis .matrix-input:not(.rz-state-disabled):hover { background: rgba(99, 102, 241, .05) !important; }
@container ff-sensitivity-analysis (min-width: 1050px) {
    .ff-sensitivity-analysis > .ff-sa-layout { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 650px) {
    .ff-sensitivity-analysis { padding: 18px 12px; }
    .ff-sa-layout > .ff-sa-settings { padding: 23px 19px; }
    .ff-sa-results > .ff-sa-matrix-heading { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .ff-sensitivity-analysis .sensitivity-table th,
    .ff-sensitivity-analysis .sensitivity-table td { transition: none; }
    .ff-sensitivity-analysis .sensitivity-table td:hover { transform: none; }
}
