:root {
    --ink: #182029;
    --nav: #182029;
    --nav-active: #263442;
    --nav-text: #aab4bf;
    --canvas: #f2f4f6;
    --paper: #fff;
    --line: #d6dce2;
    --muted: #687687;
    --blue: #1261c9;
    --blue-soft: #edf4ff;
    --green: #11774c;
    --amber: #9a6500;
    --red: #b42318;
    --formula: #f6f7f8;
    --shadow: 0 1px 2px rgba(15, 25, 35, .05)
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-size: 13px
}

button,
input,
select {
    font: inherit
}

button {
    cursor: pointer
}

.app-shell {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 228px;
    flex: 0 0 228px;
    background: var(--nav);
    color: white;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.brand {
    height: 48px;
    border-bottom: 1px solid #34414d;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 16px;
    font-size: 16px
}

.brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800
}

.sidebar-label {
    color: var(--nav-text);
    font-size: 10px;
    font-weight: 700;
    margin: 8px 8px 6px
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.side-nav-item {
    height: 40px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--nav-text);
    text-align: left;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px
}

.side-nav-item:hover,
.side-nav-item.active {
    background: var(--nav-active);
    color: #fff
}

.nav-glyph {
    width: 14px;
    text-align: center;
    color: inherit;
    font-size: 15px
}

.sidebar-footer {
    margin-top: auto;
    color: #71808e;
    font-size: 10px;
    line-height: 1.6;
    padding: 12px 8px
}

.sidebar-footer span {
    color: #53616d
}

.main-canvas {
    flex: 1;
    min-width: 0;
    background: var(--canvas)
}

.topbar {
    height: 48px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    color: var(--muted);
    font-size: 12px
}

.crumbs {
    display: flex;
    gap: 10px;
    align-items: center
}

.crumbs b {
    color: #b5bec7
}

.crumbs strong {
    color: var(--ink);
    font-weight: 600
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.connection-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a0aab3
}

.quiet-button,
.primary-button {
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
    border-radius: 3px;
    padding: 8px 13px;
    font-size: 12px
}

.quiet-button:hover {
    border-color: #9ba9b7
}

.primary-button {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    font-weight: 600
}

.primary-button:hover {
    background: #0b52ad
}

.workspace-heading {
    padding: 22px 28px 16px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px
}

.eyebrow {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: .08em;
    margin: 0 0 7px;
    font-weight: 700
}

.workspace-heading h1 {
    font-size: 22px;
    line-height: 1.1;
    margin: 0 0 7px;
    font-weight: 600;
    letter-spacing: -.02em
}

.subtitle,
.section-intro p {
    color: var(--muted);
    margin: 0;
    font-size: 12px
}

.status-badge,
.api-pill,
.data-status,
.check-pill,
.source-status {
    display: inline-flex;
    align-items: center;
    border-radius: 2px;
    padding: 3px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em
}

.status-badge {
    margin-left: 8px;
    background: #fff3d8;
    color: var(--amber);
    vertical-align: 2px
}

.heading-actions {
    display: flex;
    gap: 8px
}

.model-tabs {
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow: auto;
    padding: 0 20px
}

.model-tab {
    height: 42px;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: #5d6b79;
    font-size: 11px;
    white-space: nowrap;
    border-bottom: 2px solid transparent
}

.model-tab:hover {
    color: var(--ink)
}

.model-tab.active {
    color: var(--ink);
    font-weight: 700;
    border-bottom-color: var(--blue)
}

#alert-region {
    padding: 0 28px
}

.alert {
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #e7b9b4;
    background: #fff4f3;
    color: var(--red);
    font-size: 12px
}

.section-view {
    display: none;
    padding: 24px 28px 0;
    max-width: 1480px
}

.section-view.active {
    display: block
}

.section-intro {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 20px;
    margin-bottom: 16px
}

.section-intro h2 {
    font-size: 20px;
    margin: 0 0 6px;
    font-weight: 600
}

.as-of {
    text-align: right;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55
}

.as-of strong {
    color: var(--ink)
}

.as-of span {
    color: #8b97a4
}

.legend {
    display: flex;
    gap: 10px;
    align-items: center
}

.legend-item {
    font-size: 10px;
    color: var(--muted);
    padding-left: 14px;
    position: relative
}

.legend-item:before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #ddd
}

.legend-item.editable:before {
    background: #dcecff;
    border: 1px solid #75a9eb
}

.legend-item.linked:before {
    background: #edf0f2;
    border: 1px solid #bdc7d0
}

.legend-item.formula:before {
    background: #f6f7f8;
    border: 1px solid #d4dbe1
}

.panel,
.table-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow)
}

.panel-heading {
    min-height: 58px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px
}

.panel-heading h3 {
    font-size: 13px;
    margin: 0 0 4px;
    font-weight: 700
}

.panel-heading p,
.unit-note {
    font-size: 11px;
    color: var(--muted);
    margin: 0
}

.api-pill,
.data-status.linked {
    background: #edf6f1;
    color: var(--green)
}

.data-status.formula {
    background: #eef3fb;
    color: #456b9a
}

.check-pill {
    background: #f0f2f4;
    color: #687687
}

.metric-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px
}

.metric-card {
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 16px;
    min-height: 111px;
    box-shadow: var(--shadow)
}

.metric-card.key {
    border-top: 3px solid var(--blue)
}

.metric-card span,
.output-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700
}

.metric-card strong {
    display: block;
    font-size: 22px;
    margin: 16px 0 4px;
    font-weight: 600
}

.metric-card small {
    color: #8b97a4;
    font-size: 10px
}

.two-column {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 14px
}

.scenario-summary {
    padding: 12px 16px
}

.scenario-line {
    display: grid;
    grid-template-columns: 1fr 110px 75px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f2
}

.scenario-line:last-child {
    border-bottom: 0
}

.scenario-line strong {
    text-align: right;
    font-size: 14px
}

.scenario-line span {
    text-align: right;
    color: var(--muted);
    font-size: 11px
}

.empty-state {
    padding: 18px;
    color: #8b97a4;
    font-size: 12px
}

.check-list {
    padding: 7px 16px
}

.check-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f2
}

.check-row:last-child {
    border-bottom: 0
}

.check-status {
    font-size: 10px;
    font-weight: 800
}

.check-status.pass {
    color: var(--green)
}

.check-status.warning {
    color: var(--amber)
}

.check-status.error {
    color: var(--red)
}

.check-message {
    font-size: 11px;
    color: #42505e
}

.check-message small {
    display: block;
    color: #8b97a4;
    margin-top: 3px
}

.assumption-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px 16px
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #33414e;
    font-size: 11px;
    font-weight: 600
}

.input-field input {
    border: 1px solid #80abe0;
    background: var(--blue-soft);
    color: #0e4f9e;
    padding: 9px 10px;
    border-radius: 2px;
    outline: none;
    font-weight: 600
}

.input-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px #d9e8fb
}

.input-field small {
    color: #87939f;
    font-weight: 400
}

.select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600
}

.select-wrap select,
.sensitivity-controls input {
    border: 1px solid var(--line);
    background: white;
    padding: 8px 10px;
    border-radius: 2px;
    color: var(--ink)
}

.inline-note {
    border-top: 1px solid var(--line);
    background: #fafbfc;
    padding: 10px 16px;
    color: var(--muted);
    font-size: 11px
}

.loading-strip {
    border: 1px solid var(--line);
    background: #f8fafb;
    color: #73808d;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 11px
}

.loading-strip span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #91a0ad;
    border-radius: 50%;
    margin-right: 8px
}

.table-panel {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px
}

th,
td {
    height: 40px;
    border-bottom: 1px solid var(--line);
    padding: 0 10px;
    text-align: right;
    font-size: 11px;
    white-space: nowrap
}

thead th {
    height: 34px;
    background: #f7f8f9;
    color: #667484;
    font-size: 9px;
    letter-spacing: .04em;
    font-weight: 800
}

th:first-child,
td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: inherit
}

tbody th {
    font-weight: 500;
    color: #34414e
}

tbody tr.major th {
    font-weight: 800;
    color: #1a2733;
    background: #fafbfc
}

tbody tr.major td {
    background: #fafbfc
}

.table-panel td[data-api-cell],
td[data-output] {
    color: #6d7a87
}

.valuation-layout {
    display: grid;
    grid-template-columns: 1.5fr .8fr;
    gap: 14px
}

.bridge-list {
    padding: 4px 16px
}

.bridge-list>div {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid #edf0f2;
    font-size: 12px
}

.bridge-list strong {
    font-weight: 600
}

.bridge-list .total {
    border-top: 2px solid var(--ink);
    border-bottom: 0;
    font-weight: 800
}

.output-panel {
    background: #fff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px
}

.output-panel>strong {
    font-size: 30px;
    color: var(--blue);
    margin: 13px 0 4px
}

.output-panel small {
    color: var(--muted);
    font-size: 10px
}

.output-panel .positive {
    color: var(--green);
    font-size: 22px
}

.output-divider {
    height: 1px;
    background: var(--line);
    margin: 22px 0
}

.sensitivity-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px
}

.sensitivity-controls label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700
}

.sensitivity-controls input {
    min-width: 220px
}

.sensitivity-panel td {
    text-align: center
}

.source-status {
    background: #f1f3f5;
    color: #768391
}

.footer-note {
    padding: 28px;
    color: #8b97a4;
    font-size: 10px;
    text-align: left
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(24, 32, 41, .74);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 10
}

.modal.hidden {
    display: none
}

.modal-card {
    width: min(770px, 100%);
    background: #fff;
    border: 1px solid #cbd3db;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .2)
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--line)
}

.modal-header h2 {
    font-size: 16px;
    margin: 0
}

.modal-footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    justify-content: flex-end;
    gap: 8px
}

.modal-footer span {
    margin-right: auto;
    color: var(--muted);
    font-size: 10px
}

.icon-button {
    background: none;
    border: 0;
    font-size: 20px;
    color: var(--muted)
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px 16px;
    min-height: 380px
}

.modal-body>strong {
    font-size: 11px;
    margin-top: 4px
}

.export-option {
    height: 30px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 11px
}

.export-option.selected {
    border-color: #4e8ee7;
    background: #f1f6ff;
    color: #1458b0;
    font-weight: 700
}

.export-checks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
    margin-top: 8px
}

.export-checks label {
    font-size: 11px
}

.export-checks input {
    accent-color: var(--blue)
}

@media(max-width:900px) {
    .sidebar {
        width: 190px;
        flex-basis: 190px
    }

    .workspace-heading {
        align-items: start;
        flex-direction: column
    }

    .metric-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .two-column,
    .valuation-layout {
        grid-template-columns: 1fr
    }

    .assumption-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:620px) {
    .sidebar {
        display: none
    }

    .topbar {
        padding: 0 16px
    }

    .workspace-heading,
    .section-view {
        padding-left: 16px;
        padding-right: 16px
    }

    .metric-grid,
    .assumption-grid {
        grid-template-columns: 1fr
    }

    .model-tabs {
        padding: 0 8px
    }

    .section-intro {
        flex-direction: column
    }

    .as-of {
        text-align: left
    }

    .export-checks {
        grid-template-columns: repeat(2, 1fr)
    }
}

[hidden], .hidden {
    display: none !important;
}

#data-review {
    margin: 16px 28px;
}

#data-review .table-panel {
    max-height: 360px;
    overflow: auto;
}

.annual-assumption-editor,
#annual-assumption-editor {
    overflow-x: auto;
    margin: 12px 0;
}

#annual-assumption-editor th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 180px;
    background: var(--paper);
}

#annual-assumption-editor input {
    width: 88px;
    min-height: 34px;
    border: 1px solid #86afe8;
    background: var(--blue-soft);
    padding: 6px 8px;
}

#nav-assumption-editor input {
    width: 100%;
    min-height: 25px;
    border: 0;
    border-bottom: 1px solid #d8c978;
    border-radius: 0;
    background: var(--input-bg);
    padding: 3px 7px;
    color: var(--input-ink);
    text-align: right;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 650;
}

#nav-bridge-inputs,
.gordon-inputs {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    border-bottom: 1px solid var(--line);
}

#nav-bridge-inputs input,
.gordon-inputs input {
    min-height: 27px;
    border-radius: 0;
    background: var(--input-bg);
    color: var(--input-ink);
    text-align: right;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 650;
}

.assumption-shortcuts {
    justify-content: flex-start;
    margin: 10px 0 16px;
}

/* Institutional workstation presentation */
:root {
    --ink: #14202b;
    --nav: #101923;
    --nav-active: #233447;
    --nav-text: #aeb9c5;
    --canvas: #e9edf2;
    --paper: #ffffff;
    --line: #cbd3dc;
    --line-dark: #aeb9c5;
    --muted: #5d6b79;
    --blue: #0b57a4;
    --blue-soft: #eaf2fc;
    --input-bg: #fffbe8;
    --input-ink: #075bb5;
    --calc-bg: #f7f9fb;
    --historical-bg: #eef1f4;
    --green: #0d6b45;
    --amber: #875d00;
    --red: #a61b16;
    --shadow: none;
}

html,
body {
    background: var(--canvas);
    font-size: 12px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums lining-nums;
}

.sidebar {
    width: 204px;
    flex-basis: 204px;
    padding: 12px 10px;
    border-right: 1px solid #263545;
}

.brand {
    height: 42px;
    padding: 0 7px 11px;
    letter-spacing: .08em;
    font-size: 13px;
}

.brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 1px;
    font-size: 9px;
}

.sidebar-label {
    margin: 12px 8px 5px;
    font-size: 9px;
    letter-spacing: .12em;
}

.side-nav {
    gap: 1px;
}

.side-nav-item {
    height: 33px;
    border-radius: 1px;
    padding: 0 9px;
    font-size: 11px;
    text-decoration: none;
}

.side-nav-item.active {
    box-shadow: inset 3px 0 #5ea2eb;
}

.sidebar-footer {
    border-top: 1px solid #263545;
    padding-top: 12px;
    font-size: 9px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 40px;
    padding: 0 22px;
    box-shadow: 0 1px 0 rgba(16, 25, 35, .04);
}

.topbar > div:last-child {
    display: flex;
    align-items: center;
    gap: 7px;
}

.workspace-heading {
    padding: 16px 22px 13px;
    border-bottom: 1px solid var(--line);
    align-items: center;
    background: #f4f6f8;
}

.workspace-heading h1 {
    font-size: 19px;
    margin-bottom: 4px;
    letter-spacing: -.015em;
}

.eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
    letter-spacing: .12em;
}

.heading-actions,
.quick-actions,
.actions,
.gordon-actions {
    gap: 6px !important;
}

.quiet-button,
.primary-button {
    min-height: 30px;
    border-radius: 1px;
    padding: 6px 11px;
    font-size: 10px;
    letter-spacing: .015em;
    text-decoration: none;
}

.primary-button {
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .2);
}

.model-tabs {
    position: sticky;
    top: 40px;
    z-index: 15;
    padding: 0 14px;
    border-bottom-color: var(--line-dark);
    box-shadow: 0 1px 2px rgba(18, 32, 43, .05);
}

.model-tab {
    height: 35px;
    padding: 0 10px;
    font-size: 10px;
}

.section-view,
body .section-view {
    width: 100%;
    max-width: none;
    padding: 16px 22px 0;
}

.section-intro {
    margin-bottom: 10px;
}

.section-intro h2 {
    font-size: 16px;
    margin-bottom: 3px;
}

.panel,
.table-panel,
.metric-card,
.result-card,
body .phase-card,
.launch-card,
.result-card {
    border-radius: 0 !important;
    border-color: var(--line) !important;
    box-shadow: none !important;
}

.panel {
    margin-bottom: 12px;
}

.panel-heading {
    min-height: 43px;
    padding: 9px 12px;
    background: #f8fafb;
}

.panel-heading h3 {
    margin-bottom: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.panel-heading label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.panel-heading select,
.input-grid input,
.input-grid select,
.panel > label input,
.panel > label select,
.search-row input,
.library-controls input,
.library-controls select {
    min-height: 30px !important;
    border: 1px solid var(--line-dark) !important;
    border-radius: 1px !important;
    background: #fff !important;
    padding: 5px 8px !important;
    color: var(--ink);
    outline: none;
}

.panel-heading select:focus,
.input-grid input:focus,
.panel > label input:focus,
#annual-assumption-editor input:focus {
    border-color: var(--blue) !important;
    box-shadow: inset 0 0 0 1px var(--blue);
}

.metric-grid,
body .result-grid,
body .phase-grid {
    gap: 7px;
    margin-bottom: 11px;
}

body .nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 11px;
}

body .nav-card {
    min-height: 82px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-top: 2px solid #8796a5;
    background: #fff;
}

body .nav-card:nth-child(3) {
    border-top-color: var(--blue);
}

body .nav-card span {
    display: block;
    color: #536477;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body .nav-card strong {
    display: block;
    margin-top: 9px;
    font-size: 18px;
}

.metric-card,
body .result-card,
body .phase-card {
    min-height: 82px;
    padding: 10px 12px;
    background: var(--paper);
    border-top: 2px solid #8796a5 !important;
}

.metric-card.key,
body .result-card.key,
body .phase-card:last-child {
    border-top-color: var(--blue) !important;
}

.metric-card strong,
body .result-card strong,
body .phase-card strong {
    margin: 9px 0 2px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -.02em;
}

.metric-card span,
body .result-card span,
body .phase-card span {
    color: #536477;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.two-column,
.valuation-layout {
    gap: 10px;
}

.table-panel,
.table-wrap,
#stage1,
#stage2,
#valuation,
#sensitivity,
#properties,
#bridge,
#scenarios {
    overflow: auto;
}

body table {
    min-width: 680px;
    background: #fff;
    font-variant-numeric: tabular-nums lining-nums;
}

body th,
body td {
    height: 31px;
    padding: 0 8px;
    border-right: 1px solid #e5e9ee;
    border-bottom: 1px solid #dce2e8;
    text-align: right;
    font-size: 10px;
}

body thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 29px;
    background: #e6ebf0;
    color: #405063;
    border-bottom: 1px solid #9eabb8;
    text-transform: uppercase;
    letter-spacing: .045em;
}

body th:first-child,
body td:first-child,
#annual-assumption-editor th:first-child {
    left: 0;
    z-index: 4;
    min-width: 180px;
    background: #f7f9fb;
    box-shadow: 1px 0 0 var(--line);
}

body tbody th {
    color: #263647;
    font-weight: 600;
}

body tbody tr:hover td,
body tbody tr:hover th {
    background-color: #f3f7fb;
}

body td,
.numeric-cell {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

td[data-api-cell],
.historical-cell {
    background: var(--historical-bg) !important;
    color: #38495a !important;
}

td[data-output],
.formula-cell {
    background: var(--calc-bg);
    color: #172536 !important;
}

#annual-assumption-editor {
    margin: 0;
    max-height: min(62vh, 610px);
    border-bottom: 1px solid var(--line);
}

#annual-assumption-editor table {
    min-width: max-content;
}

#annual-assumption-editor td {
    padding: 3px 5px;
    background: var(--input-bg);
}

#annual-assumption-editor input {
    width: 92px;
    min-height: 26px;
    border: 1px solid transparent;
    border-bottom-color: #d8c978;
    border-radius: 0;
    background: transparent;
    padding: 3px 6px;
    color: var(--input-ink);
    text-align: right;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 650;
}

.assumption-grid,
.input-grid {
    gap: 8px !important;
    padding: 11px 12px !important;
}

.input-field input {
    padding: 6px 8px;
    border-radius: 1px;
    background: var(--input-bg);
    color: var(--input-ink);
    font-family: "SFMono-Regular", Consolas, monospace;
}

.panel > label {
    display: inline-grid;
    gap: 4px;
    min-width: 150px;
    margin: 9px 0 10px 12px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.input-grid label {
    gap: 4px !important;
    color: var(--muted) !important;
    font-size: 9px !important;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.actions,
body .gordon-actions {
    margin: 0 !important;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}

body .multi-actions,
body .reit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfd;
}

.status,
.loading-strip,
.inline-note {
    border-radius: 0 !important;
    border-left: 3px solid var(--green);
    padding: 7px 10px !important;
    font-size: 10px;
}

.status.error {
    border-left-color: var(--red);
}

.scenario-ledger,
.property-ledger {
    display: grid;
    padding: 4px 12px;
}

.scenario-ledger > div,
.property-ledger > div {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) repeat(2, minmax(90px, auto)) minmax(130px, auto);
    align-items: center;
    gap: 14px;
    min-height: 34px;
    border-bottom: 1px solid #e3e8ed;
}

.scenario-ledger > div > span,
.property-ledger > div > span {
    color: var(--muted);
    text-align: right;
}

.scenario-ledger > div > b,
.property-ledger > div > b {
    text-align: right;
}

.scenario-ledger .scenario-total {
    border-top: 2px solid var(--ink);
    border-bottom: 0;
}

.bridge-list > div,
#bridge > div {
    padding: 7px 12px;
    border-bottom: 1px solid #e3e8ed;
}

.valid-cell {
    background: #edf7f1 !important;
    color: #075f3c;
    font-weight: 700;
}

.invalid-cell {
    background: #fff0ef !important;
    color: var(--red);
    font-weight: 700;
}

#data-review {
    margin: 11px 22px;
}

#data-review .table-panel {
    max-height: 410px;
}

#data-review-rows td:first-child {
    font-family: inherit;
    font-weight: 650;
}

.review-action,
.review-override {
    min-height: 25px;
    border: 1px solid var(--line-dark);
    background: #fff;
    font-size: 10px;
}

.result-grid,
.library-table {
    margin: 0 22px 14px;
}

.result-card header {
    align-items: baseline;
}

.result-card .meta {
    border-top: 1px solid #e4e8ec;
    border-bottom: 1px solid #e4e8ec;
    padding: 7px 0;
}

.security-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-identity small {
    color: var(--muted);
}

.security-ticker {
    display: inline-grid;
    place-items: center;
    min-width: 62px;
    min-height: 34px;
    padding: 0 8px;
    background: #1e3348;
    color: #fff;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.security-row .meta span {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
}

.security-row .meta b,
.model-links > span {
    color: #768493;
    font-size: 8px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.model-links {
    align-items: center;
}

.review-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 9px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
}

.review-legend span {
    padding: 1px 4px;
    background: #e4eaf0;
    color: #34475a;
    font-weight: 800;
    letter-spacing: .05em;
}

.model-links a {
    border-radius: 1px !important;
    background: #f6f8fa;
    color: #174c82 !important;
    font-size: 10px;
    font-weight: 700;
}

.library-table table {
    border: 1px solid var(--line);
}

.footer-note {
    padding: 15px 22px;
    border-top: 1px solid var(--line);
}

.launch-grid {
    gap: 8px !important;
}

body .launch-card {
    position: relative;
    min-height: 98px;
    padding: 13px 14px !important;
    border-left: 3px solid #74869a !important;
    background: #fff;
}

body .launch-card:hover {
    border-left-color: var(--blue) !important;
    background: #f8fbff;
}

body .launch-card h3 {
    font-size: 13px;
}

body .launch-card p {
    font-size: 10px;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 22px 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.dashboard-strip > div {
    padding: 9px 12px;
    border-right: 1px solid var(--line);
}

.dashboard-strip > div:last-child {
    border-right: 0;
}

.dashboard-strip span {
    display: block;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.dashboard-strip strong {
    display: block;
    margin-top: 3px;
    font-size: 12px;
}

@media(max-width:900px) {
    .sidebar {
        width: 180px;
        flex-basis: 180px;
    }
    .metric-grid,
    body .phase-grid,
    body .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body .nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Compact editable assumption matrices for single-period models. */
#nav-bridge-inputs,
.gordon-inputs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

#nav-bridge-inputs label,
.gordon-inputs label {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px !important;
    min-width: 0;
}

#nav-bridge-inputs input,
.gordon-inputs input {
    width: 100%;
    min-width: 0;
    background: var(--input-bg) !important;
}

@media(max-width:1100px) {
    #nav-bridge-inputs,
    .gordon-inputs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
