:root {
    --surface-page: #f3f6fb;
    --surface-panel: rgba(255, 255, 255, 0.88);
    --surface-panel-muted: rgba(247, 250, 253, 0.92);
    --surface-strong: #ffffff;
    --line-soft: #d8e0ea;
    --line-muted: #e8edf3;
    --text-strong: #17324f;
    --text-muted: #60758c;
    --shadow-soft: 0 14px 34px rgba(28, 52, 84, 0.08);
    --shadow-hover: 0 18px 42px rgba(28, 52, 84, 0.12);
    --focus-ring: 0 0 0 0.2rem rgba(112, 164, 213, 0.2);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --riskpremium-bg: #f4eafb;
    --riskpremium-fg: #7a29b6;
    --return-bg: #e7f1fb;
    --return-fg: #176ca5;
    --correlation-bg: #dbfaf2;
    --correlation-fg: #0b8a74;
    --weights-bg: #e9efff;
    --weights-fg: #4059c7;
    --risk-bg: #fbe9e8;
    --risk-fg: #b23d36;
    --diversification-bg: #eaf8ef;
    --diversification-fg: #19794a;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(115, 165, 213, 0.18), transparent 26rem),
        linear-gradient(180deg, #f7f9fc 0%, var(--surface-page) 100%) !important;
}

body {
    font-family: "Lexend Deca", Times, serif !important;
    color: var(--text-strong);
}

.container-fluid {
    width: min(97%, 2000px) !important;
    max-width: 2000px;
}

.showcase-page {
    width: 100% !important;
    max-width: none;
    padding-inline: 1rem;
    padding-bottom: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Lexend Deca", Times, serif;
    font-weight: 600 !important;
    color: var(--text-strong);
}

h1:focus {
    outline: none;
}

a {
    color: #1b6ea8;
}

a:hover {
    color: #154f78;
}

small,
.small,
.text-muted {
    color: var(--text-muted) !important;
}

.percent-sign {
    color: #000000 !important;
}

@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 200;
    src: url("/fonts/lexend-deca-v22-latin-200.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 300;
    src: url("/fonts/lexend-deca-v22-latin-300.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 400;
    src: url("/fonts/lexend-deca-v22-latin-regular.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 500;
    src: url("/fonts/lexend-deca-v22-latin-500.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 600;
    src: url("/fonts/lexend-deca-v22-latin-600.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Gochi Hand";
    font-style: normal;
    font-weight: 400;
    src: url("/fonts/gochi-hand-v24-latin-regular.woff2") format("woff2");
}

.bg-riskpremium {
    background: var(--riskpremium-bg) !important;
    border-color: color-mix(in srgb, var(--riskpremium-fg) 35%, white) !important;
}

.fg-riskpremium {
    color: var(--riskpremium-fg) !important;
}

.bg-return {
    background: var(--return-bg) !important;
    border-color: color-mix(in srgb, var(--return-fg) 30%, white) !important;
}

.fg-return {
    color: var(--return-fg) !important;
}

.bg-correlation {
    background: var(--correlation-bg) !important;
    border-color: color-mix(in srgb, var(--correlation-fg) 30%, white) !important;
}

.fg-correlation {
    color: var(--correlation-fg) !important;
}

.bg-weights {
    background: var(--weights-bg) !important;
    border-color: color-mix(in srgb, var(--weights-fg) 30%, white) !important;
}

.fg-weights {
    color: var(--weights-fg) !important;
}

.bg-risk {
    background: var(--risk-bg) !important;
    border-color: color-mix(in srgb, var(--risk-fg) 28%, white) !important;
}

.fg-risk {
    color: var(--risk-fg) !important;
}

.bg-diversification {
    background: var(--diversification-bg) !important;
    border-color: color-mix(in srgb, var(--diversification-fg) 30%, white) !important;
}

.fg-diversification {
    color: var(--diversification-fg) !important;
}

.bg-paritas-darker {
    background: #001133;
}

.bg-paritas-dark {
    background: #224466;
}

.bg-paritas-light {
    background: #abc7e3 !important;
}

.bg-paritas-lighter {
    background: #f1f6fa !important;
}

.paritas-darker {
    color: #001133;
}

.paritas-dark {
    color: #224466 !important;
}

.paritas-light {
    color: #abc7e3 !important;
}

.gradient-text {
    display: inline-block;
    font-weight: 700;
    background: linear-gradient(90deg, #bf534f, #ff6d68, #ffc843, #0071ce, #5e96dc, #009638);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    transform: rotate(-5deg);
    font-family: "Gochi Hand";
}

.ex-ante-title {
    margin: 0;
    font-size: 1.38em !important;
    font-weight: 700;
    letter-spacing: 0.035em;
    color: #f7fbff;
    text-shadow: 0 1px 14px rgba(12, 28, 45, 0.24);
}

.playground-title {
    position: relative;
    left: 12px;
    top: 0;
    font-size: 2em;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.helper-text-block {
    max-width: 1000px !important;
    line-height: 1.7;
    color: var(--text-muted);
}

.btn {
    border-radius: 999px;
    font-weight: 500;
    box-shadow: none !important;
}

.btn-dark {
    border-color: rgba(36, 75, 112, 0.22) !important;
    background: rgba(36, 75, 112, 0.1) !important;
    color: #244b70 !important;
}

.btn-dark:hover,
.btn-dark:focus {
    border-color: rgba(36, 75, 112, 0.32) !important;
    background: rgba(36, 75, 112, 0.16) !important;
    color: #1f3f5e !important;
}

.btn-light {
    border: 1px solid rgba(36, 75, 112, 0.12);
    background: rgba(255, 255, 255, 0.78);
}

.icon-button {
    min-width: 2.25rem;
}

.form-control,
select.form-control {
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.92);
}

.form-control:focus,
select.form-control:focus {
    border-color: #9cbddd;
    box-shadow: var(--focus-ring);
}

.bulk-allocation,
.portfolio-select-row {
    gap: 0.5rem;
}

.bulk-allocation select,
.portfolio-select-row select {
    min-width: 16rem;
}

.mylabel {
    padding: 0 5px;
    font-weight: 700;
    font-size: 0.85rem;
}

.remove-button {
    display: none !important;
    padding: 0 5px !important;
    margin-right: 5px;
}

tr:hover .remove-button {
    display: block !important;
}

.table {
    margin-bottom: 0;
    color: var(--text-strong);
}

.table td {
    padding: 4px 6px !important;
    min-width: 0 !important;
    height: 38px !important;
    border: 1px solid var(--line-muted);
    vertical-align: middle !important;
    background: rgba(255, 255, 255, 0.52);
}

.table th {
    padding: 6px 8px !important;
    border-bottom: none;
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 500;
    background: transparent;
}

.table thead th {
    white-space: nowrap;
}

.table.no-inputs td {
    padding: 6px 8px !important;
}

.matrix-table td,
.holdings-table td {
    height: 36px !important;
}

.matrix-table td .myinput,
.holdings-table td .myinput {
    padding: 2px 5px;
}

.table-header th {
    padding-top: 12px !important;
    font-size: 0.76em;
    font-weight: 600;
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    vertical-align: middle !important;
}

.table-row-header {
    color: var(--text-muted) !important;
    font-size: 0.9em;
    font-weight: 600 !important;
    letter-spacing: 0.05em;
    /*text-transform: uppercase !important;*/
}

.matrix-table,
.summary-table,
.holdings-table {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.matrix-table thead th,
.holdings-table thead th,
.summary-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.matrix-correlation-header {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
}

.matrix-correlation-header small {
    color: inherit !important;
    font-size: 0.72em;
    line-height: 1;
}

.summary-table th:first-child,
.summary-table td:first-child,
.holdings-table th:first-child,
.holdings-table td:first-child {
    border-left-width: 0;
}

.portfolio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.portfolio-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(36, 75, 112, 0.16);
}

.portfolio-dot-lg {
    width: 0.9rem;
    height: 0.9rem;
}

.portfolio-name-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.portfolio-name-group .portfolio-name-input {
    flex: 1 1 auto;
}

.nullrow td {
    color: #aab6c3 !important;
}

.strong-border-end {
    border-inline-end: 2px solid #224466 !important;
}

.theader th {
    border-bottom: 2px solid #224466 !important;
}

td.selectable {
    transition: background-color 0.18s ease;
}

td.selectable:hover {
    background: rgba(36, 75, 112, 0.07) !important;
}

.td-sm {
    width: 90px;
}

.td-md {
    width: 150px;
}

.td-lg {
    width: 350px;
}

.td-fill {
    width: auto;
}

.tr-asset-type td {
    background: #00000007 !important;
    border-bottom: 2px solid rgba(23, 50, 79, 0.35) !important;
}

.tr-hoverable td {
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.tr-hoverable:hover td {
    background: rgba(255, 255, 255, 0.9) !important;
}

.tr-hoverable td:first-child {
    border-left: 3px solid #e3e8ef;
}

.tr-hoverable:hover td:first-child {
    border-left: 3px solid #244b70;
}

.myinput {
    border-radius: 9px;
    border: 1px solid transparent;
    padding: 4px 6px;
    display: block;
    width: 100%;
    background: transparent;
    color: var(--text-strong);
    outline: 0 !important;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.myinput:hover {
    border-color: rgba(36, 75, 112, 0.25);
    background: rgba(241, 246, 250, 0.95);
}

input.myinput-visible,
.portfolio-name-input {
    border: 1px solid #c9d7e6;
    background: rgba(255, 255, 255, 0.95) !important;
}

.myinput:active,
.myinput:focus {
    box-shadow: var(--focus-ring) !important;
    border-color: #9cbddd !important;
    background: #ffffff !important;
}

.myinput:disabled {
    color: #7c8ea1;
    background-color: transparent;
    border-color: transparent;
}

.myinput::placeholder {
    color: #0d6dfd;
    opacity: 1;
    font-style: italic;
}

.input-danger {
    border-radius: 5px !important;
    border: 1px solid #dc3545;
    border-right-width: 2px;
}

.sigmadiff-cold {
    font-weight: 700 !important;
    color: #0d6efd !important;
    background: #0d6efd22 !important;
}

.sigmadiff-warm {
    font-weight: 700 !important;
    color: #dc3545 !important;
    background: #dc354522 !important;
}

.holding-api {
    border-left: 3px solid #0daefd;
    border-radius: 10px;
    margin: 20px 0 20px 5px;
    padding: 8px 0 8px 8px;
}

.api-connection {
    border-bottom: 1px solid #cccccc;
    margin: 0 0 20px;
    padding: 0 0 30px;
}

.card,
.page-card {
    position: relative;
    padding: 22px 20px;
    border: 1px solid rgba(216, 224, 234, 0.9) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface-panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    margin-bottom: 22px;
}

.page-card:hover,
.portfolio-card:hover,
.help-card:hover {
    box-shadow: var(--shadow-hover);
}

.page-card-muted {
    background: var(--surface-panel-muted);
}

.page-card h5,
.page-card h6 {
    margin-bottom: 0.5rem;
}

.riskfree-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.32rem 0.62rem;
    border: 1px solid rgba(40, 95, 128, 0.16);
    border-radius: 999px;
    background: rgba(40, 95, 128, 0.06);
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.riskfree-badge strong {
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 700;
}

.portfolio-card {
    overflow: hidden;
}

.portfolio-toolbar {
    gap: 0.75rem;
}

.portfolio-actions {
    align-items: center;
}

.portfolio-name-input {
    height: 34px;
}

.portfolio-bubble-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    align-items: center;
    justify-content: center;
}

.portfolio-bubble-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0;
}

.portfolio-bubble-legend-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.2;
}

.metric-card-grid {
    row-gap: 0.9rem !important;
}

.card .loading {
    display: flex !important;
    inset: 16px;
    width: auto !important;
    height: auto !important;
    border-radius: calc(var(--radius-lg) - 6px);
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(6px);
}

.small-card {
    min-height: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: var(--radius-md);
    background: rgba(250, 252, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.small-card .title {
    display: inline-block;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    font-size: 0.78em;
    letter-spacing: 0.04em;
    line-height: 1.8;
    font-weight: 600;
}

.small-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.small-card-header .title {
    margin-bottom: 0;
}

.simulation-button {
    min-width: 4.4rem;
    border-color: rgba(36, 75, 112, 0.14);
    background: rgba(36, 75, 112, 0.06);
    color: var(--text-main);
}

.simulation-button:hover {
    background: rgba(36, 75, 112, 0.12);
}

.simulation-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
    background: rgba(18, 27, 43, 0.42);
    backdrop-filter: blur(8px);
}

.simulation-modal-card {
    width: min(1120px, 100%);
    max-height: min(88vh, 980px);
    overflow: auto;
    padding: 0.95rem 1rem 0.85rem;
    border: 1px solid rgba(216, 224, 234, 0.96);
    border-radius: calc(var(--radius-lg) + 2px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 70px rgba(17, 32, 54, 0.22);
}

.simulation-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.simulation-close-button {
    flex: 0 0 auto;
}

.simulation-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.simulation-metric-sections {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.simulation-metric-top-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    align-items: start;
}

.simulation-metric-section {
    display: grid;
    gap: 0.25rem;
}

.simulation-metric-section-title {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.simulation-summary-metrics-grid {
    margin-bottom: 0;
}

.simulation-metric-card {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(243, 247, 252, 0.95));
}

.simulation-metric-card-flat {
    padding: 0.3rem 0.35rem 0.25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.simulation-summary-metrics-grid .simulation-metric-card strong,
.simulation-example-metrics-grid .simulation-metric-card strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.2;
    white-space: nowrap;
}

.simulation-metric-card-compact {
    padding: 0.26rem 0.3rem 0.22rem;
}

.simulation-metric-label {
    display: block;
    margin-bottom: 0.12rem;
    color: var(--text-muted);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.simulation-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.55rem;
}

.simulation-example-card {
    padding: 0.6rem;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: var(--radius-md);
    background: rgba(247, 250, 254, 0.94);
}

.simulation-summary-card {
    padding-bottom: 0.45rem;
}

.simulation-example-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.simulation-example-card-title {
    color: var(--text-strong);
    font-size: 0.9rem;
}

.simulation-summary-card .simulation-example-card-header {
    margin-bottom: 0.28rem;
}

.simulation-example-card-meta {
    color: var(--text-muted);
    font-size: 0.74rem;
    white-space: nowrap;
}

.simulation-example-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
}

.simulation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.simulation-toolbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.simulation-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.simulation-toolbar-group-select {
    margin-left: 0;
}

.simulation-toolbar-toggle-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.2rem;
    border: 1px solid rgba(36, 75, 112, 0.12);
    border-radius: 999px;
    background: rgba(36, 75, 112, 0.03);
}

.simulation-toolbar-group-chip {
    display: inline-flex;
    align-items: center;
    padding: 0 0.35rem 0 0.2rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.simulation-toolbar-label {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.simulation-frequency-select {
    width: auto;
    min-width: 7.5rem;
}

.simulation-toolbar-button {
    border-color: rgba(36, 75, 112, 0.14);
    background: rgba(36, 75, 112, 0.06);
    color: var(--text-main);
}

.simulation-toolbar-button-compact {
    min-width: 2rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.simulation-toolbar-button:hover {
    background: rgba(36, 75, 112, 0.12);
}

.simulation-button-icon {
    opacity: 0.68;
}

.simulation-toolbar-button-active,
.simulation-toolbar-button-active:hover {
    border-color: rgba(36, 75, 112, 0.2);
    background: rgba(36, 75, 112, 0.18);
}

.simulation-mode-note {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.79rem;
}

.simulation-chart-frame {
    padding: 0.45rem 0.25rem 0;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: var(--radius-md);
    background: rgba(250, 252, 255, 0.92);
}

.simulation-chart-stage {
    position: relative;
    height: 390px;
    overflow: hidden;
}

.simulation-chart-placeholder {
    height: 100%;
    border-radius: calc(var(--radius-md) - 2px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(
            180deg,
            rgba(216, 224, 234, 0.12) 0,
            rgba(216, 224, 234, 0.12) 1px,
            transparent 1px,
            transparent 78px);
}

.simulation-chart-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 252, 255, 0.76);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.simulation-chart-loading-card {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(216, 224, 234, 0.96);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(17, 32, 54, 0.08);
}

.simulation-footnote,
.simulation-empty-state {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.79rem;
}

.card-toggle {
    padding: 0.15rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.4;
}

.help-grid > div {
    display: flex;
    flex-direction: column;
}

.help-card {
    height: 100%;
}

.help-card p:last-child {
    margin-bottom: 0;
}

.summary-risk-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 30px;
}

.summary-risk-select {
    min-width: 13.5rem;
    max-width: 15.5rem;
    /*max-width: 100%;*/
    height: 30px;
    font-size: 0.82rem;
}

.assumption-card-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.assumption-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: 7px;
    background: rgba(247, 250, 254, 0.88);
    cursor: pointer;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.assumption-radio-card:hover {
    border-color: rgba(36, 75, 112, 0.24);
    background: rgba(244, 248, 253, 0.96);
}

.assumption-radio-card-selected {
    border-color: rgba(36, 75, 112, 0.36);
    background: rgba(238, 245, 252, 0.98);
    box-shadow: inset 0 0 0 1px rgba(36, 75, 112, 0.08);
}

.assumption-radio-input {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.assumption-radio-content {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.assumption-radio-title {
    color: var(--text-strong);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.assumption-radio-description {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.42;
}

.stress-info-box {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(36, 75, 112, 0.16);
    border-radius: 7px;
    background: rgba(247, 250, 254, 0.9);
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.42;
}

.stress-info-box strong {
    color: var(--text-strong);
    font-size: 0.78rem;
    line-height: 1.35;
}

.stress-info-box-disabled {
    border-color: rgba(96, 117, 140, 0.14);
    background: rgba(247, 250, 253, 0.62);
}

.showcase-decision-matrix-grid,
.showcase-summary-chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.showcase-decision-matrix-grid > .page-card,
.showcase-summary-chart-grid > .page-card {
    min-width: 0;
    margin-bottom: 0;
}

.showcase-assumption-table-card,
.showcase-summary-card {
    overflow: auto;
}

.portfolio-decision-card {
    overflow: hidden;
}

.portfolio-decision-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portfolio-decision-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 1rem;
    align-items: stretch;
}

.portfolio-decision-scroll {
    overflow: auto;
    border: 1px solid rgba(216, 224, 234, 0.76);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.54);
}

.portfolio-decision-board {
    position: relative;
    isolation: isolate;
    width: 1070px;
    height: 784px;
    min-width: 1070px;
    margin-inline: auto;
}

.portfolio-decision-stage {
    position: relative;
    width: 1120px;
    height: 820px;
    transform: scale(0.9553571429);
    transform-origin: top left;
}

.portfolio-decision-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.portfolio-decision-edge {
    stroke: #283f57;
    stroke-width: 2;
    transition: opacity 0.18s ease, stroke 0.18s ease;
}

.portfolio-decision-lines #decision-arrow-default path {
    fill: #283f57;
}

.portfolio-decision-lines #decision-arrow-selected path {
    fill: #176ca5;
}

.portfolio-decision-lines #decision-arrow-muted path {
    fill: rgba(96, 117, 140, 0.26);
}

.portfolio-decision-edge-selected {
    stroke: #176ca5;
    stroke-width: 3;
}

.portfolio-decision-edge-potential {
    opacity: 0.58;
    stroke: #283f57;
}

.portfolio-decision-edge-disabled {
    opacity: 1;
    stroke: rgba(96, 117, 140, 0.26);
    stroke-dasharray: 6 6;
}

.portfolio-decision-node {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -50%);
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    padding: 0.55rem 0.7rem;
    border: 2px solid rgba(83, 96, 107, 0.78);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 4px 4px 0 rgba(26, 40, 55, 0.18);
    color: #101820;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    transition: opacity 0.18s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

button.portfolio-decision-node {
    font-family: inherit;
    cursor: pointer;
}

button.portfolio-decision-node:hover,
button.portfolio-decision-node:focus-visible {
    border-color: #176ca5;
    box-shadow: 0 0 0 4px rgba(23, 108, 165, 0.12), 4px 4px 0 rgba(26, 40, 55, 0.16);
}

.portfolio-decision-node-question {
    background: #ffffff;
}

.portfolio-decision-node-theme-riskpremium {
    border-color: color-mix(in srgb, var(--riskpremium-fg) 52%, white);
    background: color-mix(in srgb, var(--riskpremium-bg) 72%, white);
}

.portfolio-decision-node-theme-volatility {
    border-color: color-mix(in srgb, var(--risk-fg) 48%, white);
    background: color-mix(in srgb, var(--risk-bg) 74%, white);
}

.portfolio-decision-node-theme-correlation {
    border-color: color-mix(in srgb, var(--correlation-fg) 48%, white);
    background: color-mix(in srgb, var(--correlation-bg) 74%, white);
}

.portfolio-decision-node-portfolio {
    border-color: #7dae55;
    background: #e5f0dc;
    box-shadow: 4px 4px 0 rgba(125, 174, 85, 0.2);
}

.portfolio-decision-leaf-label {
    display: block;
    max-width: 100%;
    color: rgba(23, 50, 79, 0.82);
    font-size: 0.67rem;
    font-weight: 500;
    line-height: 1.2;
}

.portfolio-decision-node-oval {
    border-color: rgba(91, 132, 197, 0.88);
    border-radius: 50%;
    background: #eef5ff;
    box-shadow: none;
}

.portfolio-decision-node-current {
    border-color: #176ca5;
    box-shadow: 0 0 0 4px rgba(23, 108, 165, 0.12), 4px 4px 0 rgba(26, 40, 55, 0.16);
}

.portfolio-decision-node-path:not(.portfolio-decision-node-portfolio) {
    background: #f6fbff;
}

.portfolio-decision-node-path.portfolio-decision-node-theme-riskpremium {
    background: color-mix(in srgb, var(--riskpremium-bg) 86%, white);
}

.portfolio-decision-node-path.portfolio-decision-node-theme-volatility {
    background: color-mix(in srgb, var(--risk-bg) 86%, white);
}

.portfolio-decision-node-path.portfolio-decision-node-theme-correlation {
    background: color-mix(in srgb, var(--correlation-bg) 86%, white);
}

.portfolio-decision-node-disabled {
    opacity: 0.32;
    filter: grayscale(1);
}

.portfolio-decision-node-pending {
    opacity: 0.68;
}

.portfolio-decision-edge-label {
    position: absolute;
    z-index: 3;
    transform: translate(-50%, -50%);
    min-width: 2.4rem;
    max-width: 13rem;
    padding: 0.16rem 0.46rem;
    border: 1px solid rgba(36, 75, 112, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: #17324f;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(28, 52, 84, 0.08);
}

.portfolio-decision-edge-label:hover:not(:disabled),
.portfolio-decision-edge-label:focus-visible:not(:disabled) {
    border-color: rgba(23, 108, 165, 0.45);
    background: #eef7ff;
}

.portfolio-decision-edge-label-selected {
    border-color: rgba(23, 108, 165, 0.55);
    background: #e7f1fb;
    color: #176ca5;
}

.portfolio-decision-edge-label-disabled {
    opacity: 0.34;
    filter: grayscale(1);
}

.portfolio-decision-edge-label-switch:not(.portfolio-decision-edge-label-selected) {
    border-color: rgba(36, 75, 112, 0.3);
    background: rgba(255, 255, 255, 0.98);
    color: #244b70;
}

.portfolio-decision-edge-label-wide {
    width: 13rem;
}

.portfolio-decision-leaf-badges {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    margin-top: 0.2rem;
}

.portfolio-decision-leaf-badges-primary {
    gap: 0.34rem;
    margin-top: 0;
    margin-bottom: 0.22rem;
}

.portfolio-decision-leaf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(36, 75, 112, 0.16);
    background: #ffffff;
    color: var(--text-strong);
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1;
}

.portfolio-decision-leaf-badges-primary .portfolio-decision-leaf-badge {
    width: 1.32rem;
    height: 1.32rem;
    font-size: 0.78rem;
}

.portfolio-decision-leaf-badge-riskpremium {
    border-color: color-mix(in srgb, var(--riskpremium-fg) 28%, white);
    background: var(--riskpremium-bg);
    color: var(--riskpremium-fg);
}

.portfolio-decision-leaf-badge-volatility {
    border-color: color-mix(in srgb, var(--risk-fg) 28%, white);
    background: var(--risk-bg);
    color: var(--risk-fg);
}

.portfolio-decision-leaf-badge-correlation {
    border-color: color-mix(in srgb, var(--correlation-fg) 28%, white);
    background: var(--correlation-bg);
    color: var(--correlation-fg);
}

.portfolio-decision-leaf-badge-weights {
    border-color: color-mix(in srgb, var(--riskpremium-fg) 28%, white);
    background: var(--riskpremium-bg);
    color: var(--riskpremium-fg);
}

.portfolio-decision-viable {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.85rem;
    border: 1px solid rgba(125, 174, 85, 0.34);
    border-radius: var(--radius-md);
    background: rgba(239, 248, 233, 0.74);
}

.portfolio-decision-viable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
    color: #19794a;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.portfolio-decision-viable-header strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: rgba(25, 121, 74, 0.12);
}

.portfolio-decision-viable-header-section {
    justify-content: flex-start;
    margin-top: 0.2rem;
    margin-bottom: 0.15rem;
}

.portfolio-decision-portfolio-list {
    display: grid;
    gap: 0.5rem;
    overflow: auto;
}

.portfolio-decision-portfolio-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.52rem 0.65rem;
    border: 1px solid rgba(125, 174, 85, 0.55);
    border-radius: 8px;
    background: #e5f0dc;
    color: #17324f;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.16;
    text-align: center;
}

.portfolio-decision-portfolio-pill-label {
    color: rgba(23, 50, 79, 0.82);
    font-size: 0.69rem;
    font-weight: 500;
    line-height: 1.2;
}

.portfolio-decision-assumptions {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(125, 174, 85, 0.26);
}


.portfolio-decision-assumption-card {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.58rem 0.68rem;
    border: 1px solid rgba(36, 75, 112, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.32;
}

.portfolio-decision-assumption-card span {
    color: #19794a;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.portfolio-decision-assumption-card strong {
    color: var(--text-strong);
    font-size: 0.82rem;
    line-height: 1.24;
}

.portfolio-decision-assumption-card small {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.34;
}

.portfolio-decision-assumption-card-derived {
    border-color: rgba(36, 75, 112, 0.14);
    background: rgba(255, 255, 255, 0.72);
}

.portfolio-decision-assumption-card-riskpremium {
    border-color: color-mix(in srgb, var(--riskpremium-fg) 22%, white);
    background: color-mix(in srgb, var(--riskpremium-bg) 88%, white);
}

.portfolio-decision-assumption-card-riskpremium span,
.portfolio-decision-assumption-card-riskpremium strong {
    color: var(--riskpremium-fg);
}

.portfolio-decision-assumption-card-volatility {
    border-color: color-mix(in srgb, var(--risk-fg) 22%, white);
    background: color-mix(in srgb, var(--risk-bg) 88%, white);
}

.portfolio-decision-assumption-card-volatility span,
.portfolio-decision-assumption-card-volatility strong {
    color: var(--risk-fg);
}

.portfolio-decision-assumption-card-correlation {
    border-color: color-mix(in srgb, var(--correlation-fg) 22%, white);
    background: color-mix(in srgb, var(--correlation-bg) 88%, white);
}

.portfolio-decision-assumption-card-correlation span,
.portfolio-decision-assumption-card-correlation strong {
    color: var(--correlation-fg);
}

.portfolio-decision-warning-card {
    border-color: rgba(185, 126, 25, 0.32);
    background: #fff8e8;
}

.portfolio-decision-warning-card span {
    color: #9a6512;
}

.portfolio-decision-warning-card strong {
    color: #583a0d;
}

.showcase-riskfree-section {
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(216, 224, 234, 0.92);
    border-radius: 8px;
    background: rgba(247, 250, 254, 0.88);
}

.showcase-riskfree-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.showcase-riskfree-header strong {
    color: var(--text-strong);
    font-size: 0.92rem;
    line-height: 1.2;
    white-space: nowrap;
}

.showcase-riskfree-controls {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.showcase-riskfree-controls .myinput {
    width: 5.75rem;
}

.showcase-mobile-page {
    max-width: 820px;
    padding-inline: 0.35rem;
}

.showcase-mobile-page .page-card {
    margin-bottom: 18px;
}

.mobile-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.mobile-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.mobile-details summary::-webkit-details-marker {
    display: none;
}

.mobile-details summary::after {
    content: "Visa";
    flex: 0 0 auto;
    padding: 0.16rem 0.62rem;
    border: 1px solid rgba(36, 75, 112, 0.14);
    border-radius: 999px;
    background: rgba(36, 75, 112, 0.06);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mobile-details[open] summary::after {
    content: "Dölj";
}

.mobile-portfolio-editor {
    border-top: 1px solid rgba(216, 224, 234, 0.9);
    padding-top: 0.9rem;
}

.mobile-portfolio-editor summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
}

.mobile-portfolio-editor summary::-webkit-details-marker {
    display: none;
}

.mobile-portfolio-editor summary::after {
    content: "Dölj";
    flex: 0 0 auto;
    padding: 0.16rem 0.62rem;
    border: 1px solid rgba(36, 75, 112, 0.14);
    border-radius: 999px;
    background: rgba(36, 75, 112, 0.06);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mobile-portfolio-editor:not([open]) summary::after {
    content: "Visa";
}

.mobile-scroll {
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.mobile-settings-table,
.mobile-correlation-table,
.mobile-holdings-table {
    min-width: 100%;
}

.mobile-correlation-table {
    min-width: 760px;
}

.mobile-risk-mode-row {
    display: grid;
    gap: 0.45rem;
}

.mobile-performance-list {
    display: grid;
    gap: 0.9rem;
}

.mobile-performance-card {
    border: 1px solid rgba(216, 224, 234, 0.9);
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(247, 250, 253, 0.94) 100%);
    padding: 14px;
}

.mobile-performance-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.mobile-performance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mobile-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(36, 75, 112, 0.08);
    color: #244b70;
    font-size: 0.74rem;
    font-weight: 600;
}

.mobile-performance-score {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.mobile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.mobile-stat-grid .small-card {
    padding: 0.5rem 0.8rem;
}

.mobile-stat-grid .small-card b {
    display: inline-block;
    margin-top: 0.08rem;
}

.mobile-portfolio-card .portfolio-toolbar {
    align-items: flex-start !important;
}

.mobile-portfolio-card .portfolio-actions {
    justify-content: flex-end;
}

.mobile-metric-card-grid > div {
    flex: 0 0 100%;
    max-width: 100%;
}

.mobile-help-grid .help-card {
    height: auto;
}

.navbar-brand span {
    color: #555555;
    font-weight: 400;
    padding-right: 10px;
}

.nav-link,
.dropdown-item {
    font-weight: 300 !important;
}

.save-widget {
    border: 2px solid #cccccc;
    border-radius: 5px;
    padding: 4px 6px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Laddar");
}

code {
    color: #c02d76;
}

@media (min-width: 1900px) {
    .showcase-page {
        padding-inline: 1.25rem;
    }

    .showcase-decision-matrix-grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .showcase-summary-chart-grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    }

    .showcase-decision-matrix-grid .portfolio-decision-card,
    .showcase-assumption-table-card,
    .showcase-summary-card,
    .showcase-bubble-card {
        height: 100%;
    }
}

@media (max-width: 991.98px) {
    .container-fluid {
        width: 98% !important;
    }

    .bulk-allocation {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 0.75rem;
        margin-left: 0.25rem;
    }

    .bulk-allocation select,
    .portfolio-select-row select {
        min-width: 12rem;
    }

    .portfolio-toolbar {
        flex-wrap: wrap;
    }

    .summary-risk-header {
        flex-direction: column;
        gap: 0.4rem;
    }

    .summary-risk-select {
        min-width: 12rem;
        width: 100%;
    }

    .assumption-card-group {
        grid-template-columns: 1fr;
    }

    .portfolio-decision-header,
    .portfolio-decision-body {
        grid-template-columns: 1fr;
    }

    .portfolio-decision-header {
        flex-direction: column;
    }

    .portfolio-decision-header .btn {
        width: 100%;
    }

    .portfolio-decision-scroll {
        margin-inline: -0.25rem;
        border-radius: 12px;
    }

    .portfolio-decision-viable {
        max-height: none;
    }

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

    .card,
    .page-card {
        padding: 18px 16px;
        border-radius: 18px !important;
    }

    .mobile-card-heading,
    .mobile-performance-header {
        flex-direction: column;
    }

    .simulation-modal-card {
        width: min(100vw - 0.4rem, 1120px);
        max-height: min(94vh, 980px);
        padding: 0.8rem 0.7rem 0.7rem;
    }

    .simulation-modal-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-bottom: 0.65rem;
    }

    .simulation-close-button {
        width: 100%;
    }

    .simulation-modal-backdrop {
        padding: 0.2rem;
    }

    .simulation-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    }

    .simulation-metric-top-row {
        grid-template-columns: 1fr;
    }

    .simulation-summary-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .simulation-example-grid {
        grid-template-columns: 1fr;
    }

    .simulation-example-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-portfolio-card .portfolio-actions {
        justify-content: flex-start;
    }
}
