/* Insights book-health board. Type and color come from Positions allocation cards. */

#tab-artemis-modern .artemis-hero-modern,
#tab-artemis-modern.insights-view-endorsed .artemis-features-grid-modern,
#tab-artemis-modern.insights-view-endorsed .artemis-recommendations-section,
#tab-artemis-modern:not(.insights-view-advanced) .artemis-features-grid-modern,
#tab-artemis-modern:not(.insights-view-advanced) .artemis-recommendations-section {
    display: none !important;
}

#tab-artemis-modern.insights-view-advanced .artemis-features-grid-modern {
    display: grid !important;
}

#tab-artemis-modern.insights-view-advanced .artemis-recommendations-section {
    display: block !important;
}

.insights-board.is-endorsed .insights-board-mid,
.insights-board.is-endorsed .insights-board-table-wrap {
    display: none !important;
}

.insights-board.is-endorsed .insights-board-bottom:not(:has(.insights-board-donut)) {
    display: none !important;
}

.insights-board.is-endorsed .insights-board-donut {
    display: grid;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .insights-board.is-endorsed .insights-board-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .insights-board.is-endorsed .insights-board-featured > .insights-board-donut {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        min-height: 0;
        height: 100%;
        align-self: stretch;
        overflow: hidden;
        box-sizing: border-box;
    }

    .insights-board.is-endorsed .insights-board-featured > .insights-featured-card--swap {
        grid-column: 1 / -1;
    }
}

#artemis-empty.insights-empty-state-modern .empty-state-icon-modern {
    color: var(--primary);
}

#artemis-empty.insights-empty-state-modern .empty-state-icon-modern i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
    color: inherit;
}

.insights-tax-year {
    display: block;
    margin: 20px 0 10px;
    padding: 0;
    font-synthesis: none;
    -webkit-text-stroke: 0;
}

.insights-tax-year[hidden] {
    display: none !important;
}

.insights-tax-year .section-title-modern,
.insights-tax-year .metric-label-modern,
.insights-tax-year .metric-value-modern,
.insights-tax-year .symbol-company-modern {
    font-synthesis: none;
    -webkit-text-stroke: 0;
}

.insights-tax-year-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.insights-tax-year-face,
.insights-tax-year-rows {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    margin-left: 0;
}

.insights-tax-year .allocation-metric-info-trigger {
    cursor: help;
}

.insights-tax-year-face .metric-item-modern,
.insights-tax-year-rows .metric-item-modern {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 84px;
    height: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    container-type: normal;
    white-space: normal;
    text-align: center;
}

.insights-tax-year-face .metric-item-modern .metric-label-modern,
.insights-tax-year-face .metric-item-modern .metric-value-modern {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    font-size: 11px;
}

.insights-tax-year-face .metric-item-modern .metric-value-modern {
    font-size: 16px;
}

#insights-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    overflow: visible;
    padding: 6px 6px 0 0;
    box-sizing: content-box;
}

#insights-header-actions .insights-tax-year-face {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-end;
    width: max-content;
    max-width: none;
    min-width: 0;
    gap: 8px;
    margin: 0;
}

#insights-header-actions .insights-tax-year-face[hidden] {
    display: none !important;
}

#insights-header-actions .insights-tax-year-face .metric-item-modern {
    flex: 0 0 auto;
    width: auto;
    min-width: 7rem;
    min-height: var(--iris-icon-btn-size, 45px);
    height: var(--iris-icon-btn-size, 45px);
    padding: 2px 8px;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--glass-panel-radius, 10px);
}

#insights-header-actions .insights-header-ytd-more[hidden] {
    display: none !important;
}

#insights-header-actions .insights-tax-year-face .metric-item-modern .metric-label-modern {
    font-size: 12px;
    line-height: 1;
    margin: 0 0 2px;
    color: var(--text-secondary);
}

#insights-header-actions .insights-tax-year-face .metric-item-modern .metric-value-modern {
    font-size: 13px;
    line-height: 1.15;
}

#insights-header-actions .insights-tax-year-more,
#insights-header-actions .insights-advanced-toggle.tab-refresh-btn,
.insights-tax-year-face .insights-tax-year-more,
.insights-tax-year-face .insights-advanced-toggle.tab-refresh-btn {
    grid-column: auto;
    position: relative;
    margin-top: 0;
    margin-left: 10px;
    flex: 0 0 var(--iris-icon-btn-size, 45px);
    align-self: center;
    width: var(--iris-icon-btn-size, 45px);
    height: var(--iris-icon-btn-size, 45px);
    min-width: var(--iris-icon-btn-size, 45px);
    min-height: var(--iris-icon-btn-size, 45px);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--glass-panel-radius, 10px);
    color: var(--text-secondary);
    cursor: pointer;
    overflow: visible;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

#insights-header-actions .insights-tax-year-more.is-ready,
#insights-header-actions .insights-advanced-toggle.is-ready {
    animation: insights-header-action-in 0.35s ease;
}

@keyframes insights-header-action-in {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

#insights-header-actions .insights-tax-year-more,
#insights-header-actions .insights-advanced-toggle.tab-refresh-btn {
    margin-left: 0;
}

.insights-tax-year-face .insights-advanced-toggle.tab-refresh-btn {
    margin-left: 0;
}

#insights-header-actions .insights-advanced-toggle.tab-refresh-btn i,
.insights-tax-year-face .insights-advanced-toggle.tab-refresh-btn i {
    font-size: 16px;
    margin: 0;
}

#insights-header-actions .insights-advanced-toggle[aria-pressed='true'],
.insights-tax-year-face .insights-advanced-toggle[aria-pressed='true'] {
    border-color: var(--primary);
    color: var(--primary);
}

#insights-header-actions .insights-tax-year-more[hidden],
#insights-header-actions .insights-advanced-toggle[hidden] {
    display: none !important;
}

#insights-header-actions .insights-tax-year-more:hover,
.insights-tax-year-face .insights-tax-year-more:hover,
#insights-header-actions .insights-advanced-toggle.tab-refresh-btn:not([aria-disabled='true']):hover {
    background: var(--bg-glass);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#insights-header-actions .insights-advanced-toggle[aria-disabled='true'] {
    opacity: 0.42;
    cursor: default;
    pointer-events: none;
}

#insights-header-actions .insights-advanced-toggle.is-refreshing,
#insights-header-actions .insights-advanced-toggle.is-refreshing[aria-disabled='true'] {
    opacity: 1;
    cursor: wait;
    pointer-events: none;
}

#insights-header-actions .insights-advanced-toggle.is-refreshing i {
    color: var(--primary);
}

#tab-artemis-modern .artemis-position-header,
#tab-artemis-modern .artemis-header-actions {
    overflow: visible;
}

#insights-header-actions .insights-advanced-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    z-index: 3;
    box-sizing: border-box;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

[data-theme="dark"] #insights-header-actions .insights-advanced-badge {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

#insights-header-actions .insights-advanced-badge[hidden] {
    display: none !important;
}

.insights-tax-year-fold[hidden] {
    display: none !important;
}

.insights-tax-year-fold {
    margin-top: 10px;
}

.insights-tax-year-copy {
    min-width: 0;
    flex: 1 1 0;
}

.insights-tax-year-after {
    display: block;
    margin: 20px 0 0;
    padding-top: 20px;
}

.insights-tax-year-copy .section-title-modern {
    display: block;
    margin: 0 0 4px;
    font-size: 20px;
    white-space: normal;
    overflow: visible;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

.insights-tax-year-copy .symbol-company-modern {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal !important;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.insights-tax-year-net {
    text-align: right;
    flex: 0 0 auto;
}

.insights-tax-year-net .metric-label-modern {
    margin-bottom: 2px;
}

.insights-tax-year-rows {
    margin: 20px 0;
}

.insights-tax-year-rows .insights-tax-year-zero[hidden] {
    display: none !important;
}

.insights-tax-year-after .insights-tax-year-rows {
    margin: 20px 0;
}

.insights-tax-year-change {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.insights-tax-year-change.positive {
    color: var(--success, #47d18c);
}

.insights-tax-year-change.negative {
    color: var(--danger, #f87171);
}

.insights-tax-year-trio {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.insights-tax-year-trio-eq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.insights-tax-year-trio-op {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-secondary);
}

.insights-tax-year-trio-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 14px 12px;
    box-sizing: border-box;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--glass-panel-radius, 10px);
}

.insights-tax-year-trio-tile .metric-label-modern {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.insights-tax-year-trio-tile .metric-value-modern {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
}

.insights-tax-year-trio-copy {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .insights-tax-year-trio-eq {
        grid-template-columns: minmax(0, 1fr);
    }
}

.insights-tax-year-impact {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.insights-tax-year-impact-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insights-tax-year-impact-row {
    display: grid;
    grid-template-columns: minmax(7rem, 0.7fr) repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    align-items: stretch;
}

.insights-tax-year-impact-spacer {
    min-width: 0;
}

.insights-tax-year-impact-head {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0 4px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.insights-tax-year-impact-name {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.insights-tax-year-impact-val {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 12px 8px;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--glass-panel-radius, 10px);
}

.insights-tax-year-impact-row.is-net .insights-tax-year-impact-val {
    min-height: 80px;
    font-size: 22px;
}

@media (max-width: 640px) {
    .insights-tax-year-impact-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .insights-tax-year-impact-spacer {
        display: none;
    }

    .insights-tax-year-impact-name {
        grid-column: 1 / -1;
        min-height: 1.25rem;
    }

    .insights-tax-year-impact-val {
        min-height: 56px;
        font-size: 15px;
        padding: 10px 6px;
    }

    .insights-tax-year-impact-row.is-net .insights-tax-year-impact-val {
        min-height: 64px;
        font-size: 18px;
    }
}

.insights-tax-year > .symbol-company-modern {
    grid-column: 1 / -1;
}

.insights-why-bullets {
    margin: 8px 0 0;
    padding-left: 1.2em;
}

.insights-board {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 8px;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    box-sizing: border-box;
    font-family: var(--font-sans);
    font-synthesis: none;
    -webkit-text-stroke: 0;
    color: var(--text-primary);
}

.insights-board button,
.insights-board table,
.insights-board th,
.insights-board td {
    font-family: inherit;
    font-synthesis: none;
    -webkit-text-stroke: 0;
}

.insights-board[hidden] {
    display: none !important;
}

.insights-board-endorsed-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: start;
    column-gap: 20px;
    row-gap: 12px;
    margin-top: 0;
}

.insights-board-endorsed-head > .insights-board-donut {
    min-width: 0;
    min-height: 0;
    height: auto;
    align-self: start;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .insights-board-endorsed-head:has(.insights-board-donut) {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .insights-board-endorsed-head > .insights-board-donut {
        align-self: stretch;
        height: 100%;
    }
}

.insights-board-endorsed-copy {
    min-width: 0;
    flex: 1 1 240px;
    text-align: left;
    margin-top: 20px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
}

.insights-board-endorsed-copy .section-title-modern {
    display: block;
    justify-content: flex-start;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: var(--portfolio-font-display);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: var(--track-title);
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
}

.insights-board-endorsed-copy .insights-copy {
    font-family: var(--font-sans);
    font-size: var(--type-md);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    white-space: normal;
}

.insights-endorsed-quiet-facts {
    display: grid;
    gap: 18px;
    margin: 28px 0 8px;
    padding: 0;
}

.insights-endorsed-quiet-facts[hidden] {
    display: none;
}

.insights-endorsed-quiet-facts > div {
    display: grid;
    gap: 6px;
}

.insights-endorsed-quiet-facts dt {
    margin: 0;
}

.insights-endorsed-quiet-facts dd {
    margin: 0;
    max-width: 42rem;
    color: var(--text-primary);
    font-size: var(--type-md);
    font-weight: 500;
    line-height: 1.5;
}

#insights-board > .insights-advanced-toggle.tab-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: 10px 0 0 auto;
    padding: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
}

#insights-board > .insights-advanced-toggle.tab-refresh-btn i {
    font-size: 16px;
    margin: 0;
}

#insights-board > .insights-advanced-toggle[aria-pressed='true'] {
    border-color: var(--primary);
    color: var(--primary);
}

#insights-board > .insights-advanced-toggle[hidden] {
    display: none !important;
}

.insights-champion-status {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border-color) 80%, transparent);
    background: color-mix(in srgb, var(--surface-elevated, var(--card-bg)) 92%, transparent);
}

.insights-champion-status.is-no-trade {
    border-left: 4px solid var(--success);
}

.insights-champion-status.is-blocked {
    border-left: 4px solid var(--warning);
}

.insights-champion-status.is-advanced {
    border-left: 4px solid var(--secondary);
}

.insights-champion-status .insights-why-bullets {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.insights-champion-status .insights-why-bullets > li {
    margin: 0;
    line-height: 1.45;
}

.insights-featured-funding {
    color: var(--warning);
    font-weight: 600;
}

.insights-board-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 24px;
    margin-top: 20px;
    min-width: 0;
}

.insights-board-featured:empty {
    display: none;
}

.insights-featured-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-left: 4px solid var(--primary);
    border-top: 4px solid var(--primary);
    border-radius: var(--glass-panel-radius, 10px);
    cursor: pointer;
    animation: insights-header-action-in 0.4s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.insights-featured-card.glass-card {
    border-right: none;
    border-bottom: none;
}

.insights-featured-card.insights-kind-buy {
    border-left-color: var(--success);
    border-top-color: var(--success);
}

.insights-featured-card.insights-kind-add {
    border-left-color: #14b8a6;
    border-top-color: #14b8a6;
}

.insights-featured-card.insights-kind-reduce {
    border-left-color: #f97316;
    border-top-color: #f97316;
}

.insights-featured-card.insights-kind-sell {
    border-left-color: var(--danger);
    border-top-color: var(--danger);
}

.insights-featured-card.insights-kind-swap {
    border-left-color: var(--secondary);
    border-top-color: var(--secondary);
}

.insights-featured-card.insights-kind-hold {
    border-left-color: var(--warning);
    border-top-color: var(--warning);
}

.insights-featured-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.insights-board-featured > .insights-featured-card--swap {
    grid-column: 1 / -1;
}

.insights-kind-buy {
    border-left-color: var(--success);
    border-top-color: var(--success);
}

.insights-kind-add {
    border-left-color: #14b8a6;
    border-top-color: #14b8a6;
}

.insights-kind-reduce {
    border-left-color: #f97316;
    border-top-color: #f97316;
}

.insights-kind-sell {
    border-left-color: var(--danger);
    border-top-color: var(--danger);
}

.insights-kind-swap {
    border-left-color: var(--secondary);
    border-top-color: var(--secondary);
}

.insights-kind-hold {
    border-left-color: var(--warning);
    border-top-color: var(--warning);
}

.insights-lane-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px;
    min-width: 0;
    max-width: 100%;
}

.insights-lane-filter.is-active {
    color: var(--text-primary);
    border-color: currentColor;
}

.insights-lane-filter.insights-kind-buy.is-active {
    color: var(--success);
}

.insights-lane-filter.insights-kind-add.is-active {
    color: #14b8a6;
}

.insights-lane-filter.insights-kind-reduce.is-active {
    color: #f97316;
}

.insights-lane-filter.insights-kind-sell.is-active {
    color: var(--danger);
}

.insights-lane-filter.insights-kind-swap.is-active {
    color: var(--secondary);
}

.insights-lane-filter.insights-kind-hold.is-active {
    color: var(--warning);
}

.insights-lane-pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.insights-lane-pager button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.insights-rail-tabs {
    display: inline-flex;
    gap: 4px;
}

.insights-rail-tab.is-active {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--text-primary);
}

.insights-featured-spark-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    flex: 0 1 auto;
    margin-bottom: 10px;
}

.insights-featured-swap-legs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 10px;
}

.insights-featured-swap-leg {
    min-width: 0;
}

.insights-why-group {
    margin-top: 8px;
}

.insights-why-group .metric-label-modern {
    margin: 0 0 4px;
}

.insights-why-swap-together {
    margin-top: 4px;
}

.insights-featured-swap-ticker {
    margin: 0 0 6px;
}

.insights-featured-spark-row > .review-allocation-sparkline-wrap {
    min-width: 0;
    width: 100%;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.insights-featured-spark-row > .review-allocation-sparkline-wrap .review-allocation-sparkline-inner,
.insights-featured-spark-row > .review-allocation-sparkline-wrap .review-allocation-sparkline-canvas {
    flex: 0 0 229px;
    height: 229px;
    min-height: 229px;
    max-height: 229px;
}

.insights-board .insights-cta-buy {
    background: var(--success);
    border-color: var(--success);
    color: #064e3b;
}

.insights-board .analysis-signal-badge-modern.signal-bullish,
.insights-board .signal-badge-modern.signal-bullish {
    color: #064e3b;
}

.insights-board .insights-cta-add {
    background: #14b8a6;
    border-color: #14b8a6;
    color: #115e59;
}

.insights-board .insights-cta-reduce {
    background: #f97316;
    border-color: #f97316;
    color: var(--symbol-text-on-saturated, #fff);
}

.insights-board .insights-cta-sell,
.insights-board .insights-cta-protect {
    background: var(--bg-secondary);
    border: 1px solid rgba(239, 71, 111, 0.35);
    color: var(--danger, #ef476f);
}

.insights-board .insights-cta-swap {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--symbol-text-on-saturated, #fff);
}

.insights-board .insights-cta-hold {
    background: var(--warning);
    border-color: var(--warning);
    color: #111827;
}

.insights-featured-now {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-content: start;
}

.insights-featured-now .metric-item-modern {
    padding: 4px 6px;
    min-width: 0;
    container-type: normal;
    text-align: center;
}

.insights-featured-now .metric-item-modern.is-confidence-high {
    grid-column: auto;
}

.insights-featured-now .metric-item-modern.is-confidence-high .insights-confidence-badge {
    font-size: 1.15em;
    padding: 6px 10px;
}

.insights-featured-card.is-high-confidence {
    gap: 10px;
}

.insights-featured-impact {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--success);
    font-weight: 700;
}

.insights-featured-card .insights-why-bullets {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.insights-featured-card .insights-why-bullets > li.insights-copy,
.insights-featured-card > p.insights-copy {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    white-space: normal;
    overflow: visible;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    text-align: left;
}

.insights-featured-card .insights-why-bullets > li.insights-copy:nth-child(1) {
    font-size: 15px;
    font-weight: 600;
    color: var(--success);
    padding-left: 0;
}

.insights-featured-card .insights-why-bullets > li.insights-copy:nth-child(2) {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-left: 0.75rem;
}

.insights-featured-card .insights-why-bullets > li.insights-copy:nth-child(3) {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

.insights-featured-card .insights-why-bullets > li.insights-copy:nth-child(n + 4) {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    padding-left: 2.25rem;
}

.insights-featured-card:not(.insights-featured-card--swap) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: start;
}

.insights-featured-card:not(.insights-featured-card--swap) .insights-featured-top {
    grid-column: 1 / -1;
    grid-row: 1;
}

.insights-featured-card:not(.insights-featured-card--swap) .insights-featured-spark-row {
    display: contents;
}

.insights-featured-card:not(.insights-featured-card--swap)
    .insights-featured-spark-row
    > .review-allocation-sparkline-wrap {
    grid-column: 1;
    grid-row: 2 / 4;
    align-self: start;
    min-height: 0;
    height: 229px;
    max-height: 229px;
}

.insights-featured-card:not(.insights-featured-card--swap)
    .insights-featured-spark-row
    > .review-allocation-sparkline-wrap
    .review-allocation-sparkline-inner,
.insights-featured-card:not(.insights-featured-card--swap)
    .insights-featured-spark-row
    > .review-allocation-sparkline-wrap
    .review-allocation-sparkline-canvas {
    flex: 0 0 229px;
    height: 229px;
    min-height: 0;
    max-height: 229px;
}

.insights-featured-card:not(.insights-featured-card--swap)
    .insights-featured-spark-row
    > .insights-featured-now {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
}

.insights-featured-card:not(.insights-featured-card--swap) > .insights-why-bullets,
.insights-featured-card:not(.insights-featured-card--swap) > p.insights-copy {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    min-width: 0;
    height: auto;
    max-height: none;
    justify-content: flex-start;
    align-self: start;
}

.insights-featured-card:not(.insights-featured-card--swap) > .insights-featured-funding,
.insights-featured-card:not(.insights-featured-card--swap) > .metric-value-modern {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .insights-board-featured > .insights-featured-card:not(.insights-featured-card--swap):only-of-type {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto 229px;
    }

    .insights-board-featured
        > .insights-featured-card:not(.insights-featured-card--swap):only-of-type
        .insights-featured-spark-row
        > .review-allocation-sparkline-wrap {
        grid-column: 1;
        grid-row: 2;
    }

    .insights-board-featured
        > .insights-featured-card:not(.insights-featured-card--swap):only-of-type
        .insights-featured-spark-row
        > .insights-featured-now {
        grid-column: 2;
        grid-row: 2;
        height: 229px;
    }

    .insights-board-featured
        > .insights-featured-card:not(.insights-featured-card--swap):only-of-type
        > .insights-why-bullets,
    .insights-board-featured
        > .insights-featured-card:not(.insights-featured-card--swap):only-of-type
        > p.insights-copy {
        grid-column: 3;
        grid-row: 2;
        height: 229px;
        max-height: 229px;
        overflow-y: auto;
        justify-content: flex-end;
        align-self: end;
    }
}

.insights-featured-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
}

.insights-featured-top .symbol-name-modern {
    min-width: max-content;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    overflow: visible;
    white-space: nowrap;
    font-size: 32px;
}

.insights-featured-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
}

.insights-featured-actions .action-btn-modern,
.insights-board-table .action-btn-modern {
    white-space: nowrap;
    flex-shrink: 0;
}

.insights-featured-actions .insights-cta-veto.tab-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.insights-featured-actions .insights-cta-veto.tab-refresh-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.insights-featured-actions .insights-cta-veto.tab-refresh-btn i {
    font-size: 16px;
    margin: 0;
}

.insights-board-mid,
.insights-board-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.9fr);
    gap: 12px;
}

.insights-board-chart,
.insights-board-rail,
.insights-board-table-wrap,
.insights-board-donut {
    padding: 14px;
}

.insights-board-donut {
    padding: 20px 20px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    column-gap: 16px;
    row-gap: 4px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#insights-donut-title {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0 0 14px;
    overflow: hidden;
    overflow-wrap: break-word;
    white-space: normal;
}

.insights-board-chart-plot {
    min-height: 248px;
    width: 100%;
}

.insights-board-chart-head .symbol-company-modern {
    max-width: 100%;
    margin: 4px 0 8px;
    line-height: 1.45;
}

.insights-board .insights-copy {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    cursor: pointer;
}

.insights-board .insights-copy.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.insights-board-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.insights-board-rail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow: auto;
}

.insights-rail-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    padding: 8px 4px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text-secondary) 18%, transparent);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.insights-rail-row.is-selected {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.insights-board-table-wrap {
    min-width: 0;
    max-width: 100%;
}

.insights-board-table-scroll {
    overflow-x: auto;
    min-width: 0;
    max-width: 100%;
}

.insights-board-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.insights-board-table th:first-child,
.insights-board-table td:first-child {
    width: 32%;
    min-width: 0;
    overflow: hidden;
}

.insights-board-table th,
.insights-board-table td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid color-mix(in srgb, var(--text-secondary) 16%, transparent);
    vertical-align: middle;
}

.insights-board-table tr.is-selected {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.insights-donut-plot {
    grid-column: 1;
    grid-row: 2;
    container-type: size;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 8rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.insights-donut-visual {
    width: min(100%, 12rem);
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    max-height: 100%;
    border-radius: 50%;
}

@supports (width: 1cqmin) {
    .insights-donut-visual {
        width: min(100cqmin, 12rem);
        height: min(100cqmin, 12rem);
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: 1 / 1;
    }
}

.insights-donut-legend {
    grid-column: 2;
    grid-row: 2;
    list-style: none;
    margin: 0;
    padding: 2px 0;
    display: grid;
    grid-template-rows: repeat(4, auto);
    align-content: center;
    min-width: 0;
    min-height: 0;
    height: 100%;
    gap: 10px;
}

.insights-donut-legend li {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0;
}

.insights-donut-stage-btn {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}

.insights-donut-legend .stage-badge-modern {
    flex: 0 0 auto;
    max-width: 100%;
    border-radius: 10px;
}

.insights-donut-legend .stage-badge-modern.stage-1 {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.35);
}

.insights-donut-legend .stage-badge-modern.stage-3 {
    background: rgba(234, 88, 12, 0.2);
    color: #ea580c;
    border: 1px solid rgba(234, 88, 12, 0.35);
}

.insights-donut-legend .stage-badge-modern.stage-4 {
    background: rgba(225, 29, 72, 0.2);
    color: #e11d48;
    border: 1px solid rgba(225, 29, 72, 0.35);
}

.insights-donut-legend-figures {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    line-height: 1.2;
}

.insights-donut-legend-amt,
.insights-donut-legend-pct {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insights-donut-legend-amt {
    font-weight: 700;
    color: var(--text-primary);
}

.insights-donut-legend-pct {
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 0;
}

.insights-donut-stage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.insights-donut-stage-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: baseline;
}

.insights-donut-stage-list .symbol-name-modern {
    grid-column: 1;
}

.insights-donut-stage-list .symbol-company-modern {
    grid-column: 1;
    grid-row: 2;
}

.insights-donut-stage-list .metric-value-modern {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
}

.insights-board .apexcharts-text,
.insights-board .apexcharts-legend-text {
    font-family: var(--font-sans) !important;
    font-synthesis: none;
    -webkit-text-stroke: 0;
    fill: var(--text-secondary) !important;
}

@keyframes insights-pane-spinner {
    to {
        transform: rotate(360deg);
    }
}

.insights-board--loading .insights-board-featured,
.insights-board--loading .insights-board-chart-plot,
.insights-board--loading .insights-board-rail-list,
.insights-board--loading .insights-board-table-scroll,
.insights-board--loading .insights-donut-visual {
    position: relative;
    min-height: 140px;
}

.insights-board--loading .insights-board-featured::after,
.insights-board--loading .insights-board-chart-plot::after,
.insights-board--loading .insights-board-rail-list:not([hidden])::after,
.insights-board--loading .insights-board-table-scroll::after,
.insights-board--loading .insights-donut-visual::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid color-mix(in srgb, var(--primary-color, #60a5fa) 22%, transparent);
    border-top-color: var(--primary-color, #60a5fa);
    border-radius: 50%;
    animation: insights-pane-spinner 0.8s linear infinite;
    pointer-events: none;
}

.insights-board .trinity-weekly-tts-delta {
    margin-left: 8px;
    font-synthesis: none;
    -webkit-text-stroke: 0;
}

@media (max-width: 639px) {
    .insights-tax-year,
    .insights-board-featured,
    .insights-board-mid,
    .insights-board-bottom {
        grid-template-columns: 1fr;
    }

    .insights-featured-now {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    #tab-artemis-modern,
    #tab-artemis-modern .artemis-section-modern,
    #tab-artemis-modern #artemis-content,
    #tab-artemis-modern #artemis-general-assessment {
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    #portfolio-container-modern #tab-artemis-modern .tab-header-kpi-filters .alert-summary-card-modern {
        width: auto;
        max-width: min(42vw, 104px);
        padding: 0 8px;
    }

    #portfolio-container-modern #tab-artemis-modern .tab-header-kpi-filters .alert-summary-count {
        font-size: 11px;
        line-height: 1.1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .insights-board-featured,
    .insights-board-mid,
    .insights-board-bottom {
        grid-template-columns: 1fr;
    }

    .insights-board-donut {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }

    .insights-donut-plot {
        grid-column: 1;
        grid-row: 2;
        min-height: 10rem;
        height: 12rem;
    }

    .insights-donut-legend {
        grid-column: 1;
        grid-row: 3;
        height: auto;
    }

    .insights-board.is-endorsed .insights-board-featured {
        grid-template-columns: minmax(0, 1fr);
    }

    .insights-board.is-endorsed .insights-board-featured > .insights-featured-card:first-of-type,
    .insights-board.is-endorsed .insights-board-featured > .insights-featured-card:only-of-type,
    .insights-board.is-endorsed .insights-board-featured > .insights-board-donut,
    .insights-board.is-endorsed .insights-board-featured > .insights-featured-card:nth-of-type(n + 2) {
        grid-column: 1;
        grid-row: auto;
    }

    .insights-featured-spark-row {
        grid-template-columns: 1fr;
    }

    .insights-featured-card:not(.insights-featured-card--swap) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
    }

    .insights-featured-card:not(.insights-featured-card--swap)
        .insights-featured-spark-row
        > .review-allocation-sparkline-wrap {
        grid-column: 1;
        grid-row: 2;
    }

    .insights-featured-card:not(.insights-featured-card--swap) > .insights-why-bullets,
    .insights-featured-card:not(.insights-featured-card--swap) > p.insights-copy {
        grid-column: 1;
        grid-row: 3;
        height: auto;
        max-height: none;
        justify-content: flex-start;
    }

    .insights-featured-card:not(.insights-featured-card--swap)
        .insights-featured-spark-row
        > .insights-featured-now {
        grid-column: 1;
        grid-row: 4;
        height: auto;
    }

    .insights-featured-swap-legs {
        grid-template-columns: 1fr;
    }

    .insights-tax-year-rows {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 1fr;
    }

    .insights-featured-now {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .insights-featured-spark-row > .review-allocation-sparkline-wrap .review-allocation-sparkline-inner,
    .insights-featured-spark-row > .review-allocation-sparkline-wrap .review-allocation-sparkline-canvas {
        min-height: 140px;
    }

    .insights-tax-year {
        margin: 28px 0 0;
    }

    .insights-tax-year-head {
        display: block;
        width: 100%;
    }

    .insights-tax-year-copy .section-title-modern {
        display: block;
        margin: 0 0 8px;
        font-size: 18px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        letter-spacing: -0.02em;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .insights-board-endorsed-copy .section-title-modern {
        display: block;
        margin: 0 0 8px;
        font-size: 32px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        letter-spacing: -0.02em;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .insights-tax-year-copy .symbol-company-modern,
    .insights-board-endorsed-copy .insights-copy {
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
        white-space: normal !important;
        word-break: normal;
        overflow-wrap: break-word;
        letter-spacing: 0.01em;
    }

    .insights-tax-year-face .metric-item-modern .metric-label-modern,
    .insights-tax-year-rows .metric-item-modern .metric-label-modern,
    .insights-featured-now .metric-item-modern .metric-label-modern {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
        font-size: 10px;
        letter-spacing: 0.04em;
        line-height: 1.25;
        margin-bottom: 4px;
    }

    .insights-tax-year-face {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        justify-content: stretch;
        gap: 8px;
    }

    .insights-tax-year-face .metric-item-modern,
    .insights-tax-year-rows .metric-item-modern {
        flex: none;
        width: auto;
        min-width: 0;
        min-height: 84px;
        height: 100%;
        white-space: normal;
        text-align: center;
    }

    .insights-featured-top {
        flex-wrap: wrap;
    }

    .insights-featured-actions {
        order: 2;
        margin-left: auto;
    }

    .insights-featured-impact {
        order: 3;
        flex: 1 1 100%;
        min-width: 0;
    }

    .insights-featured-actions .action-btn-modern {
        max-width: none;
        white-space: nowrap;
        text-align: center;
    }

    .insights-featured-card .stage-badge-modern,
    .insights-featured-card .analysis-signal-badge-modern,
    .insights-featured-card .strength-badge-modern,
    .insights-featured-card .metric-value-modern {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .insights-board-chart,
    .insights-board-rail,
    .insights-board-table-wrap,
    .insights-board-donut,
    .insights-board-chart-plot {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .insights-board-chart-plot {
        min-height: 180px;
        overflow: hidden;
    }

    .insights-board-chart-plot .apexcharts-canvas {
        max-width: 100% !important;
    }

    .insights-lane-filters,
    .insights-lane-pager,
    .insights-rail-tabs {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .insights-board-table {
        min-width: 0;
        width: 100%;
    }
}
