/* ===== Report Print-Ready Shell ===== */
.report-print-shell {
    position: fixed;
    left: -200vw;
    top: 0;
    width: 650px;
    padding: 20px 0;
    margin: 0;
    background: #ffffff;
    color: #212121;
    box-sizing: border-box;
    font-family: "Roboto", Arial, sans-serif;
    line-height: 1.55;
    font-size: 11px;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.report-print-shell *,
.report-print-shell *::before,
.report-print-shell *::after {
    box-sizing: border-box;
}

.report-print-shell p.small,
.report-print-shell span.small {
    font-size: inherit;
}

/* ===== Sections ===== */
.report-print-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 48px;
    width: 100%;
    box-sizing: border-box;
}

/* ===== Typography ===== */
.report-print-shell h1,
.report-print-shell h2,
.report-print-shell h3 {
    margin: 0;
    color: #212121;
}

.report-print-shell h1 {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.report-print-shell h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #212121;
}

.report-print-shell h3 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.report-print-shell p {
    margin: 0 0 8px;
}

/* ===== Header ===== */
.report-print-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 8px;
}

.report-print-header-logo {
    width: 180px;
    height: auto;
}

.report-print-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0ecff;
    color: #4a3de2;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

.report-print-badge-riskprofile {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 8px;
}

.report-print-badge-riskprofile-1 { background: #FBDE3E; }
.report-print-badge-riskprofile-2 { background: #DCCEAA; }
.report-print-badge-riskprofile-3 { background: #CFA7CE; }
.report-print-badge-riskprofile-4 { background: #4CCFF7; }
.report-print-badge-riskprofile-5 { background: #A9A2F7; }
.report-print-badge-riskprofile-6 { background: #CFA7CE; }
.report-print-badge-riskprofile-7 { background: #FBDE3E; }

.report-print-meta {
    color: #8E8E8E;
    margin-bottom: 6px;
    font-size: 12px;
}

.report-print-powered-by {
    color: #596271;
    font-size: 10px;
    margin-bottom: 8px;
}

/* ===== Profile Row ===== */
.report-print-profiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.report-print-profile {
    text-align: left;
}

.report-print-profile-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.report-print-profile-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 4px;
}

.report-print-profile-value .unit {
    font-size: 10px;
    font-weight: 400;
    color: #8E8E8E;
}

.report-print-profile-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #8E8E8E;
    margin-top: 4px;
}

/* ===== Segment Bars (Risk / Diversification) ===== */
.report-print-segments {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 8px;
}

.report-print-seg {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: #f2f2f2;
}

.report-print-seg.active {
    background: rgb(76, 207, 247);
}

.report-print-seg.active-risk {
    background: rgb(207, 167, 206);
}

/* ===== Grid Layouts ===== */
.report-print-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin-top: 12px;
}

.report-print-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin-top: 12px;
}

.report-print-kv {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #f2f2f2;
    padding-bottom: 6px;
}

.report-print-kv span {
    color: #8E8E8E;
}

.report-print-kv strong {
    color: #212121;
    text-align: right;
}

/* ===== Tables ===== */
.report-print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.report-print-table thead {
    display: none;
}

.report-print-table th,
.report-print-table td {
    border: none;
    border-bottom: 1px solid #f2f2f2;
    text-align: left;
    padding: 6px 0;
    vertical-align: top;
}

.report-print-table .report-print-table-num {
    text-align: right;
    white-space: nowrap;
}

.report-print-table .report-print-table-secondary {
    font-size: 11px;
    color: #8E8E8E;
}

.report-print-table .report-print-table-total td {
    font-weight: 700;
    color: #212121;
    border-top: none;
    border-bottom: none;
    padding-top: 10px;
    text-align: right;
}

.report-print-table tr:last-child td {
    border-bottom: none;
}

/* ===== Bar Chart Rows (Allocations) ===== */
.report-print-bar-list {
    margin-top: 10px;
}

.report-print-bar-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f2f2f2;
}

.report-print-bar-row:last-child {
    border-bottom: none;
}

.report-print-bar-label {
    flex: 0 0 280px;
    font-size: 11px;
    color: #212121;
    overflow: hidden;
}

.report-print-bar-sublabel {
    display: block;
    font-size: 9px;
    color: #8E8E8E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-print-bar-track {
    flex: 1;
    height: 8px;
    background: #f2f2f2;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.report-print-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: #4CCFF7;
    min-width: 2px;
}

.report-print-bar-fill-alt {
    background: #A9A2F7;
}

.report-print-bar-fill-c1 { background: #4CCFF7; }
.report-print-bar-fill-c2 { background: #A9A2F7; }
.report-print-bar-fill-c3 { background: #CFA7CE; }
.report-print-bar-fill-c4 { background: #DCCEAA; }
.report-print-bar-fill-c5 { background: #FBDE3E; }
.report-print-bar-fill-c6 { background: #4CCFF7; }
.report-print-bar-fill-c7 { background: #A9A2F7; }
.report-print-bar-fill-c8 { background: #CFA7CE; }
.report-print-bar-fill-c9 { background: #DCCEAA; }
.report-print-bar-fill-c10 { background: #FBDE3E; }
.report-print-bar-fill-c11 { background: #4CCFF7; }
.report-print-bar-fill-c12 { background: #A9A2F7; }
.report-print-bar-fill-c13 { background: #CFA7CE; }
.report-print-bar-fill-c14 { background: #DCCEAA; }
.report-print-bar-fill-c15 { background: #FBDE3E; }
.report-print-bar-fill-c16 { background: #4CCFF7; }
.report-print-bar-fill-c17 { background: #A9A2F7; }
.report-print-bar-fill-c18 { background: #CFA7CE; }
.report-print-bar-fill-c19 { background: #DCCEAA; }
.report-print-bar-fill-c20 { background: #FBDE3E; }

.report-print-bar-value {
    flex: 0 0 40px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    color: #212121;
}

/* ===== Two Column Layout ===== */
.report-print-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ===== Subtext & Metadata ===== */
.report-print-subtext {
    margin: 8px 0 16px 0;
    color: #212121;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

/* ===== AI Text Paragraphs ===== */
.report-print-paragraph {
    margin-top: 16px;
    color: #212121;
    padding: 12px 0px;
    background: none;
}

.report-print-paragraph:empty {
    display: none;
}

.report-print-paragraph p {
    margin-bottom: 6px;
}

.report-print-paragraph p:last-child {
    margin-bottom: 0;
}

/* ===== Lists ===== */
.report-print-list {
    margin: 6px 0 0;
    padding-left: 18px;
}

.report-print-list li {
    margin-bottom: 4px;
}

/* ===== Warnings ===== */
.report-print-warning {
    color: #946100;
    background: #fff8e6;
    border-left: 3px solid #e5b93f;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
}

/* ===== Chart Frames ===== */
.report-print-chart-frame {
    width: 100%;
    margin-top: 12px;
    background: #ffffff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-print-chart-image {
    max-width: 100%;
    max-height: 250px;
    height: auto;
    width: auto;
    display: block;
}

/* ===== Action Items ===== */
.report-print-action-item {
    border: 1px solid #f2f2f2;
    background: none;
    padding: 10px 10px 10px 36px;
    margin-bottom: 10px;
    border-radius: 4px;
    position: relative;
}

.report-print-action-item::before {
    content: url('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 22C11.45 22 10.9792 21.8042 10.5875 21.4125C10.1958 21.0208 10 20.55 10 20H14C14 20.55 13.8042 21.0208 13.4125 21.4125C13.0208 21.8042 12.55 22 12 22ZM8 19V17H16V19H8ZM8.25 16C7.1 15.3167 6.1875 14.4 5.5125 13.25C4.8375 12.1 4.5 10.85 4.5 9.5C4.5 7.41667 5.22917 5.64583 6.6875 4.1875C8.14583 2.72917 9.91667 2 12 2C14.0833 2 15.8542 2.72917 17.3125 4.1875C18.7708 5.64583 19.5 7.41667 19.5 9.5C19.5 10.85 19.1625 12.1 18.4875 13.25C17.8125 14.4 16.9 15.3167 15.75 16H8.25ZM8.85 14H15.15C15.9 13.4667 16.4792 12.8083 16.8875 12.025C17.2958 11.2417 17.5 10.4 17.5 9.5C17.5 7.96667 16.9667 6.66667 15.9 5.6C14.8333 4.53333 13.5333 4 12 4C10.4667 4 9.16667 4.53333 8.1 5.6C7.03333 6.66667 6.5 7.96667 6.5 9.5C6.5 10.4 6.70417 11.2417 7.1125 12.025C7.52083 12.8083 8.1 13.4667 8.85 14Z" fill="%238E8E8E"/></svg>');
    position: absolute;
    top: 10px;
    left: 10px;
}

.report-print-action-item:last-child {
    margin-bottom: 0;
}

.report-print-action-item p:last-child {
    margin-bottom: 0;
}

/* ===== Factor Cards ===== */
.report-print-factor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.report-print-factor-card {
    border: 1px solid #f2f2f2;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

.report-print-factor-name {
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 4px;
}

.report-print-factor-desc {
    font-size: 10px;
    color: #8E8E8E;
    margin-bottom: 6px;
}

.report-print-factor-level {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    margin-top: auto;
}

.report-print-factor-bar-split {
    display: flex;
    gap: 4px;
    height: 5px;
    margin-bottom: 4px;
}

.rp-bar-half {
    flex: 1;
    background: #f2f2f2;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.rp-bar-fill-left {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    border-radius: 3px;
    --bar-value: 50;
    width: max(calc((50 - var(--bar-value)) / 50 * 100%), 0%);
}

.rp-bar-fill-right {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    --bar-value: 50;
    width: max(calc((var(--bar-value) - 50) / 50 * 100%), 0%);
}

.report-print-factor-fill-c1 { background: #4CCFF7; }
.report-print-factor-fill-c2 { background: #A9A2F7; }
.report-print-factor-fill-c3 { background: #CFA7CE; }
.report-print-factor-fill-c4 { background: #DCCEAA; }
.report-print-factor-fill-c5 { background: #FBDE3E; }
.report-print-factor-fill-c6 { background: #4CCFF7; }

.report-print-factor-coverage {
    font-size: 10px;
    color: #8E8E8E;
}

/* ===== Correlation Groups ===== */
.report-print-correlation-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
}

.report-print-correlation-group:last-child {
    border-bottom: none;
}

.report-print-correlation-assets {
    flex: 1;
    font-size: 11px;
}

.report-print-correlation-badge {
    display: inline-flex;
    padding: 3px 8px;
    background: #fff3cd;
    color: #946100;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Disclaimer Footer ===== */
.report-print-disclaimer {
    color: #8E8E8E;
}

.report-print-disclaimer > div {
    padding: 12px 14px;
    border-left: 3px solid #f2f2f2;
    margin-top: 8px;
}

/* ===== No Data ===== */
.report-print-no-data {
    color: #8E8E8E;
    font-style: italic;
    padding: 8px 0;
}
