:root {
    --pi-surface: #ffffff;
    --pi-surface-soft: #f1f6f8;
    --pi-surface-warm: #f7f9fc;
    --pi-line-soft: #d7e2e8;
    --pi-shadow-soft: 0 16px 44px rgba(7, 32, 51, .08);
}

.customer-shell .auth-page-shell {
    background: linear-gradient(180deg, #f1f6f8 0%, #f7f9fc 100%);
}

.customer-shell .auth-modal-dialog,
.customer-shell .auth-completion-card,
.customer-shell .auth-page-shell .landing-card {
    border-color: var(--pi-line-soft) !important;
    background: rgba(255, 255, 255, .98) !important;
    box-shadow: var(--pi-shadow-soft) !important;
}

.customer-shell .auth-primary-action {
    width: 100%;
}

/* Customer surfaces use the PropertyIQ cool palette. These scoped rules
   neutralize retained warm acquisition-era styles without changing Admin. */
.customer-shell .analysis-page,
.customer-shell .analysis-detail-page,
.customer-shell .shared-recipient-page {
    background: transparent;
}

.customer-shell .analysis-input,
.customer-shell .form-control,
.customer-shell .form-select {
    border-color: var(--pi-line-soft);
    background: #fff;
    color: var(--pi-navy);
}

.customer-shell .analysis-input:focus,
.customer-shell .form-control:focus,
.customer-shell .form-select:focus {
    border-color: var(--pi-teal-dark);
    box-shadow: 0 0 0 .2rem rgba(8, 124, 104, .14);
}

.customer-shell .analysis-btn:not(.analysis-btn-primary):not(.analysis-btn-save),
.customer-shell a.analysis-btn:not(.analysis-btn-primary):not(.analysis-btn-save),
.customer-shell button.analysis-btn:not(.analysis-btn-primary):not(.analysis-btn-save) {
    border-color: var(--pi-line-soft);
    background: #fff;
    color: var(--pi-navy);
}

.customer-shell .analysis-btn:not(.analysis-btn-primary):not(.analysis-btn-save):hover,
.customer-shell .analysis-btn:not(.analysis-btn-primary):not(.analysis-btn-save):focus {
    border-color: var(--pi-teal-dark);
    background: var(--pi-surface-soft);
    color: var(--pi-navy);
}

.customer-shell .analysis-summary-scenario-hint,
.customer-shell .analysis-meta-sep {
    color: var(--pi-teal-dark);
}

.customer-shell .search-results-map-shell,
.customer-shell .search-results-map,
.customer-shell .search-results-map-empty {
    border-color: var(--pi-line-soft);
    background: #eaf1f5;
}

.customer-shell .search-results-map-status {
    background: rgba(245, 248, 251, .94);
    color: var(--pi-muted);
}

.customer-shell .search-map-preview-card,
.customer-shell .search-map-info-card {
    border-color: var(--pi-line-soft);
    background: rgba(255, 255, 255, .97);
    color: var(--pi-navy);
}

.customer-shell .search-map-price-marker:not(.is-aggregate) { background: var(--pi-teal-dark); }
.customer-shell .search-map-price-marker:not(.is-aggregate).is-selected {
    border-color: #fff;
    background: var(--pi-navy);
    box-shadow: 0 0 0 4px rgba(17, 184, 148, .2), 0 12px 26px rgba(7, 24, 47, .28);
}

.customer-shell .search-map-price-marker.is-aggregate,
.customer-shell .search-map-price-marker.is-aggregate:hover,
.customer-shell .search-map-price-marker.is-aggregate:focus-visible,
.customer-shell .search-map-price-marker.is-aggregate.is-selected {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.customer-shell .search-map-price-marker.is-aggregate:hover .search-map-aggregate-count,
.customer-shell .search-map-price-marker.is-aggregate:focus-visible .search-map-aggregate-count,
.customer-shell .search-map-price-marker.is-aggregate.is-selected .search-map-aggregate-count {
    box-shadow: 0 0 0 4px rgba(17, 184, 148, .24), 0 7px 14px rgba(7, 24, 47, .28);
}

/* Retired warm acquisition-era component treatments. Customer workflows use
   white, navy, cool grey, and teal; amber remains reserved for real warnings. */
.customer-shell .analysis-kpi-card,
.customer-shell .purchase-score-primary,
.customer-shell .purchase-score-stat,
.customer-shell .purchase-score-details,
.customer-shell .analysis-assumptions-columns .analysis-assumption-group,
.customer-shell .analysis-assumptions-followup .analysis-assumption-group,
.customer-shell .analysis-assumption-panel > .analysis-assumption-group,
.customer-shell .analysis-provider-rate-item,
.customer-shell .analysis-property-insight,
.customer-shell .analysis-property-fact,
.customer-shell .analysis-mobility-item,
.customer-shell .analysis-hazard-item,
.customer-shell .analysis-school-item,
.customer-shell .analysis-str-hero,
.customer-shell .analysis-str-metric,
.customer-shell .analysis-provenance-group,
.customer-shell .investment-profile-section,
.customer-shell .profile-property-chip,
.customer-shell .analysis-checkbox,
.customer-shell .trust-gate-point,
.customer-shell .break-even-chart-root {
    border-color: var(--pi-line-soft);
    background: var(--pi-surface-soft);
}

.customer-shell .purchase-score-details,
.customer-shell .analysis-provider-rate-item,
.customer-shell .analysis-provenance-group,
.customer-shell .investment-profile-section,
.customer-shell .profile-property-chip,
.customer-shell .analysis-checkbox,
.customer-shell .break-even-chart-root {
    background: #fff;
}

.customer-shell .purchase-score-factor,
.customer-shell .analysis-assumptions-actions,
.customer-shell .analysis-provider-rate-panel,
.customer-shell .analysis-provider-rate-meta,
.customer-shell .analysis-livability-panel,
.customer-shell .analysis-livability-section + .analysis-livability-section,
.customer-shell .analysis-stat-row,
.customer-shell .analysis-source-row,
.customer-shell .analysis-retrieved-at,
.customer-shell .profile-section + .profile-section {
    border-color: var(--pi-line-soft);
}

.customer-shell .analysis-property-fact span,
.customer-shell .analysis-property-insight span,
.customer-shell .analysis-livability-section h3,
.customer-shell .analysis-str-hero span,
.customer-shell .analysis-str-metric span,
.customer-shell .analysis-provider-rate-meta span,
.customer-shell .analysis-provider-rate-product,
.customer-shell .analysis-rent-comps-tooltip-title {
    color: #687487;
}

.customer-shell .analysis-provider-rate-item-active {
    border-color: var(--pi-teal-dark);
    box-shadow: 0 0 0 2px rgba(8, 124, 104, .12);
}

.customer-shell .analysis-thumbnail { border-color: var(--pi-line-soft); }
.customer-shell .analysis-thumbnail.is-active { border-color: var(--pi-teal-dark); }

.customer-shell .analysis-mobility-icon,
.customer-shell .analysis-hazard-badge,
.customer-shell .analysis-school-rating {
    background: linear-gradient(180deg, var(--pi-teal) 0%, var(--pi-teal-dark) 100%);
    box-shadow: 0 10px 24px rgba(8, 124, 104, .16);
}

.customer-shell .analysis-mobility-label {
    text-decoration-color: var(--pi-teal);
}

.customer-shell .analysis-mobility-score-value,
.customer-shell .analysis-stat-row .term-help-trigger {
    color: var(--pi-teal-dark);
}

.customer-shell .term-help-trigger {
    border-color: rgba(8, 124, 104, .34);
    background: #edf9f6;
    color: var(--pi-teal-dark);
}

.customer-shell .term-help-trigger:focus-visible {
    outline-color: rgba(8, 124, 104, .34);
}

.customer-shell .analysis-str-card {
    border-color: var(--pi-line-soft);
    background: #fff;
}

.customer-shell .analysis-map-wrap,
.customer-shell .analysis-map-fallback {
    border-color: var(--pi-line-soft);
}

.customer-shell .analysis-map-fallback {
    background: var(--pi-surface-soft);
}

.customer-shell .analysis-status-dark {
    border-color: var(--pi-line-soft);
    background: var(--pi-surface-soft);
    color: var(--pi-muted);
}

.customer-shell .profile-property-chip:hover,
.customer-shell .profile-property-chip:focus-within {
    border-color: var(--pi-teal-dark);
    background: var(--pi-surface-soft);
}

.customer-shell .trust-disclaimer {
    border-color: var(--pi-line-soft);
    background: var(--pi-surface-soft);
    color: var(--pi-navy);
}

.customer-shell .trust-disclaimer-heading {
    color: var(--pi-teal-dark);
}

.customer-shell .break-even-legend-target {
    background: var(--pi-navy);
}

.customer-shell .break-even-hero {
    background:
        radial-gradient(circle at 8% 10%, rgba(17, 184, 148, .10), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, var(--pi-surface-soft) 100%);
}

.customer-shell .break-even-hero-meta-card {
    border-color: var(--pi-line-soft);
    background: #ffffff;
}

.customer-shell .break-even-hero-meta-card span,
.customer-shell .break-even-hero-meta-card small {
    color: var(--pi-muted);
}

.customer-shell .pi-page,
.customer-shell .analysis-page,
.customer-shell .analysis-detail-page,
.customer-shell .shared-recipient-page { max-width: 1380px; }

.customer-shell .app-page-header { margin-bottom: 1.25rem; }
.customer-shell .app-page-title,
.customer-shell .analysis-page-intro h1 { letter-spacing: 0; font-weight: 750; }
.customer-shell .property-search-primary-row-modern { margin-bottom: .85rem; }

.customer-shell .property-search-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto 54px;
    gap: .55rem;
    align-items: center;
    padding: .55rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--pi-shadow-soft);
}

.customer-shell .property-search-location-icon {
    position: static;
    left: auto;
    width: 24px;
    height: 24px;
}

.customer-shell .property-search-primary-input {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    padding: 0 .25rem;
}

.customer-shell .property-search-filter-trigger { grid-column: 3; }
.customer-shell .property-search-submit { grid-column: 4; }

.customer-shell .property-search-filter-trigger,
.customer-shell .property-search-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 48px;
    height: 48px;
    border: 1px solid var(--pi-line-soft);
    border-radius: 10px;
}

.customer-shell .property-search-filter-trigger { color: var(--pi-navy); background: var(--pi-surface-warm); }
.customer-shell .property-search-filter-trigger svg,
.customer-shell .property-search-submit svg { width: 22px; height: 22px; }
.customer-shell .property-search-filter-label {
    color: var(--pi-navy);
    font-size: .86rem;
    font-weight: 800;
}
.customer-shell .property-search-submit span { display: none; }

.customer-shell .property-search-filter-count {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    background: var(--pi-teal-dark);
    font-size: .72rem;
    font-weight: 800;
}

.customer-shell .search-recent-affordance {
    display: grid;
    gap: .45rem;
    margin: -.25rem 0 .85rem;
    min-height: 2.25rem;
}

.customer-shell .search-recent-affordance[hidden] {
    display: none !important;
}

.customer-shell .search-recent-affordance-label {
    color: #667285;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-shell .search-recent-affordance-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.customer-shell .search-recent-affordance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.customer-shell .search-recent-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: .4rem .55rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--pi-teal-dark);
    font-size: .78rem;
    font-weight: 800;
}

.customer-shell .search-recent-clear svg { width: 15px; height: 15px; fill: currentColor; }

.customer-shell .search-recent-clear:hover,
.customer-shell .search-recent-clear:focus-visible {
    background: var(--pi-surface-soft);
    outline: 2px solid var(--pi-teal-dark);
    outline-offset: 2px;
}

.customer-shell .search-recent-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: .35rem .65rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--pi-navy);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.customer-shell .search-recent-chip:hover,
.customer-shell .search-recent-chip:focus {
    border-color: var(--pi-teal-dark);
    background: var(--pi-surface-soft);
    color: var(--pi-navy);
}

.customer-shell .search-filters-modern[hidden] { display: none !important; }
.customer-shell .search-filters-modern:not([hidden]) .search-filters-card { display: block; }
.customer-shell .search-filters-modern { margin: 0 0 1.25rem; }
.customer-shell .search-filters-modern .search-filters-card {
    overflow: hidden;
    border: 1px solid var(--pi-line-soft) !important;
    border-radius: 14px;
    background: var(--pi-surface-warm);
    box-shadow: var(--pi-shadow-soft);
}

.customer-shell .search-filters-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.customer-shell .search-filters-modern-header > strong,
.customer-shell .search-filters-modern .form-label {
    color: #526075;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.customer-shell .search-filters-modern-actions { display: flex; gap: .5rem; }
.customer-shell .search-filters-modern .property-search-filter-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .85rem;
}
.customer-shell .search-filters-modern .property-search-filter-field { grid-column: span 1; }
.customer-shell .search-filters-modern .property-search-filter-field-wide { grid-column: 1 / -1; }
.customer-shell .search-filters-modern .analysis-input { min-height: 46px; border-radius: 9px; }

.customer-shell .search-choice-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .55rem;
}
.customer-shell .search-choice-grid-property { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.customer-shell .search-choice-pill { position: relative; margin: 0; }
.customer-shell .search-choice-pill input { position: absolute; opacity: 0; pointer-events: none; }
.customer-shell .search-choice-pill span {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: .55rem .7rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 9px;
    color: #465266;
    background: #fff;
    font-size: .83rem;
    font-weight: 700;
    text-align: center;
}
.customer-shell .search-choice-pill input:checked + span {
    border-color: var(--pi-teal);
    color: #fff;
    background: var(--pi-navy);
    box-shadow: inset 0 0 0 1px var(--pi-teal);
}
.customer-shell .search-choice-pill input:focus-visible + span { outline: 3px solid rgba(12, 150, 123, .25); outline-offset: 2px; }

@media (max-width: 991.98px) {
    .customer-shell .search-filters-modern .property-search-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-shell .search-filters-modern .property-search-filter-field { grid-column: span 1; }
    .customer-shell .search-filters-modern .property-search-filter-field-wide { grid-column: 1 / -1; }
    .customer-shell .search-choice-grid,
    .customer-shell .search-choice-grid-property { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .customer-shell .property-search-bar { grid-template-columns: auto minmax(0, 1fr); }
    .customer-shell .property-search-filter-trigger,
    .customer-shell .property-search-submit {
        grid-column: span 1;
        width: 100%;
    }
    .customer-shell .property-search-submit span { display: inline; }
    .customer-shell .search-recent-affordance-header { align-items: flex-start; }
    .customer-shell .search-recent-clear { max-width: 12rem; text-align: left; }
    .customer-shell .search-filters-modern-header { align-items: flex-start; flex-direction: column; }
    .customer-shell .search-filters-modern-actions { width: 100%; justify-content: flex-end; }
    .customer-shell .search-choice-grid,
    .customer-shell .search-choice-grid-property { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Deal analysis workspace */
.customer-shell .analysis-page-intro-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1.25rem;
    padding: 0;
}

.customer-shell .analysis-page-intro-modern h1 {
    margin: 0;
    color: var(--pi-navy);
    font-size: clamp(1.9rem, 3vw, 2.55rem);
}

.customer-shell .analysis-back-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #506176;
    font-size: .86rem;
    font-weight: 750;
    text-decoration: none;
}

.customer-shell .analysis-back-link:hover { color: var(--pi-teal-dark); }
.customer-shell .analysis-shell { display: grid; gap: 1rem; }
.customer-shell .analysis-summary-card,
.customer-shell .analysis-card,
.customer-shell .analysis-kpi-card {
    border: 1px solid var(--pi-line-soft);
    border-radius: 12px;
    background: var(--pi-surface);
    box-shadow: var(--pi-shadow-soft);
}

.customer-shell .analysis-summary-card { padding: 1rem; }
.customer-shell .analysis-summary-form { display: flex; flex-direction: column; gap: 1rem; }
.customer-shell .analysis-summary-heading {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.customer-shell .analysis-summary-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: .75rem;
}

.customer-shell .analysis-address {
    margin: 0 0 .35rem;
    color: var(--pi-navy);
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 750;
}

.customer-shell .analysis-meta { color: #687487; font-size: .88rem; }
.customer-shell .analysis-summary-scenario-shell { max-width: 560px; margin-top: 1.2rem; }
.customer-shell .analysis-summary-scenario-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .45rem;
    margin-bottom: .35rem;
    color: #687487;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.customer-shell .analysis-summary-scenario-input {
    min-height: 46px;
    border-color: var(--pi-line-soft);
    border-radius: 9px;
    background: var(--pi-surface-soft);
    font-weight: 700;
}

.customer-shell .analysis-summary-media .analysis-hero-wrap,
.customer-shell .analysis-summary-media .analysis-hero-image {
    height: 100%;
    min-height: 280px;
    border-radius: 10px;
}

.customer-shell .analysis-summary-actions {
    order: 2;
    position: static;
    width: 100%;
    padding: 0;
    border-top: 1px solid var(--pi-line-soft);
    background: transparent;
}

.customer-shell .analysis-summary-action-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    gap: .55rem;
    padding-top: 1rem;
    width: 100%;
    max-width: none;
}

.customer-shell .analysis-summary-action-grid .analysis-btn {
    min-height: 40px;
    min-width: 0;
    padding: .6rem .85rem;
    border-radius: 8px;
    font-size: .78rem;
    width: 100%;
    white-space: normal;
}

.customer-shell .analysis-kpi-grid-primary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
}

.customer-shell .analysis-kpi-card {
    min-height: 126px;
    padding: 1rem;
    box-shadow: none;
}

.customer-shell .analysis-kpi-label { color: #687487; font-size: .68rem; letter-spacing: .04em; }
.customer-shell .analysis-kpi-value { margin-top: .35rem; font-size: clamp(1.35rem, 2vw, 1.85rem); }
.customer-shell .analysis-kpi-subtitle { color: #7a8595; font-size: .76rem; }

.customer-shell .analysis-workspace-tabs {
    position: sticky;
    top: .5rem;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .25rem;
    width: 100%;
    padding: .3rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 10px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(7,32,51,.07);
}

.customer-shell .analysis-workspace-tabs a,
.customer-shell .analysis-workspace-tabs button,
.customer-shell .analysis-workspace-tabs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .55rem .85rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667285;
    font-size: .78rem;
    font-weight: 750;
    text-decoration: none;
    white-space: normal;
}

.customer-shell .analysis-workspace-tabs a.is-active,
.customer-shell .analysis-workspace-tabs button.is-active,
.customer-shell .analysis-workspace-tabs a:hover,
.customer-shell .analysis-workspace-tabs button:hover { color: #fff; background: var(--pi-navy); }

.customer-shell .analysis-assumptions-card-modern { padding: 1.1rem; }
.customer-shell .analysis-assumptions-card-modern .analysis-card-header { margin-bottom: .85rem; }
.customer-shell .analysis-assumptions-card-modern .analysis-card-header h2 { margin: 0; font-size: 1.25rem; }
.customer-shell .analysis-assumption-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .35rem;
    padding: .3rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 10px;
    background: var(--pi-surface-soft);
}

.customer-shell .analysis-assumption-tab {
    min-height: 42px;
    border: 0;
    border-radius: 7px;
    color: #667285;
    background: transparent;
    font-size: .82rem;
    font-weight: 750;
}
.customer-shell .analysis-assumption-tab.is-active { color: #fff; background: var(--pi-navy); }
.customer-shell .analysis-assumption-panel { padding-top: 1rem; }
.customer-shell .analysis-assumption-group {
    padding: 1rem;
    border: 1px solid var(--pi-line-soft);
    border-radius: 10px;
    background: var(--pi-surface-warm);
}
.customer-shell .analysis-group-label { color: #687487; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.customer-shell .analysis-field-label { color: #58667a; font-size: .78rem; }
.customer-shell .analysis-assumptions-actions { display: flex; justify-content: flex-end; padding-top: 1rem; }
.customer-shell .analysis-assumptions-actions .analysis-btn { min-width: 190px; border-radius: 8px; }
.customer-shell .analysis-recalc-explainer {
    border-color: var(--pi-line-soft);
    border-radius: 10px;
    background: var(--pi-surface-soft);
}
.customer-shell .analysis-recalc-explainer-item {
    border-color: var(--pi-line-soft);
    border-radius: 8px;
}
.customer-shell .analysis-recalc-explainer-item span { color: #667285; }

.customer-shell .analysis-detail-page {
    display: grid;
    gap: 1rem;
}

.customer-shell .analysis-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
    gap: 1rem;
    align-items: center;
}

.customer-shell .analysis-secondary-hero .analysis-group-label { display: none; }
.customer-shell .analysis-detail-context {
    display: grid;
    gap: .25rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    background: var(--pi-surface-soft);
}
.customer-shell .analysis-detail-context > span { color: #687487; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.customer-shell .analysis-detail-context > strong { color: var(--pi-navy); }
.customer-shell .analysis-card-header h2 { margin: 0; color: var(--pi-navy); font-size: 1.2rem; }
.customer-shell .analysis-share-grid,
.customer-shell .collaboration-workspace-grid { align-items: start; }

.customer-shell .collaboration-mailbox {
    max-width: 980px;
}

.customer-shell .collaboration-command-strip {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: .75rem;
    padding: 1rem;
}

.customer-shell .collaboration-command-copy { min-width: 0; }

.customer-shell .collaboration-command-copy h1,
.customer-shell .collaboration-command-copy p {
    margin: 0;
}

.customer-shell .collaboration-command-copy h1 {
    color: var(--pi-navy);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.05;
}

.customer-shell .collaboration-command-copy p {
    color: var(--pi-muted);
    margin-top: .25rem;
}

.customer-shell .collaboration-command-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.customer-shell .collaboration-mailbox .analysis-segmented-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: .75rem;
}

.customer-shell .collaboration-mailbox .analysis-segmented-tabs a {
    align-items: center;
    display: flex;
    justify-content: center;
    gap: .45rem;
}

.customer-shell .collaboration-count {
    align-items: center;
    background: var(--pi-teal);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .72rem;
    justify-content: center;
    min-height: 1.35rem;
    min-width: 1.35rem;
    padding: 0 .35rem;
}

.customer-shell .collaboration-message {
    align-items: flex-start;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: .85rem;
    padding: .85rem 1rem;
}

.customer-shell .collaboration-avatar {
    align-items: center;
    background: var(--pi-teal);
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-weight: 800;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.customer-shell .collaboration-message-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.customer-shell .collaboration-message-heading time,
.customer-shell .collaboration-message-body > p {
    color: var(--pi-muted);
}

.customer-shell .collaboration-message-body h3,
.customer-shell .collaboration-message-body p {
    margin: .2rem 0;
}

.customer-shell .collaboration-comment {
    border-left: 3px solid var(--pi-teal);
    margin-top: .75rem !important;
    padding: .5rem .75rem;
}

.customer-shell .collaboration-toolbar {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(10rem, auto) auto auto;
    gap: .65rem;
    align-items: center;
    margin: .85rem 0 1rem;
}

.customer-shell .collaboration-toolbar input,
.customer-shell .collaboration-toolbar select {
    min-height: 2.75rem;
    border: 1px solid #cbd5e1;
    border-radius: .65rem;
    background: #fff;
    padding: .55rem .75rem;
    color: #172033;
}

.customer-shell .collaboration-message.needs-attention {
    border-left: 4px solid #246b5b;
    background: #f4fbf8;
}

.customer-shell .collaboration-message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .75rem;
    margin: .25rem 0;
    color: #5b6472;
    font-size: .82rem;
}

.customer-shell .collaboration-attention {
    border-radius: 999px;
    background: #d9f3e9;
    color: #145344;
    padding: .08rem .5rem;
    font-weight: 700;
}

.customer-shell .collaboration-diffs { margin: .65rem 0; }
.customer-shell .collaboration-diffs summary { cursor: pointer; color: #245b50; font-weight: 700; }

@media (max-width: 640px) {
    .customer-shell .collaboration-toolbar { grid-template-columns: 1fr; }
    .customer-shell .collaboration-command-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-shell .collaboration-command-actions,
    .customer-shell .collaboration-command-actions .analysis-btn {
        width: 100%;
    }

    .customer-shell .collaboration-message {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        gap: .7rem;
    }

    .customer-shell .collaboration-avatar {
        height: 2.5rem;
        width: 2.5rem;
    }
}

@media (max-width: 1199.98px) {
    .customer-shell .analysis-kpi-grid-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .customer-shell .analysis-page-intro-modern { align-items: flex-start; }
    .customer-shell .analysis-summary-heading { grid-template-columns: 1fr; }
    .customer-shell .analysis-summary-media { order: -1; }
    .customer-shell .analysis-summary-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    .customer-shell .analysis-kpi-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-shell .analysis-workspace-tabs { width: 100%; overflow-x: auto; }
    .customer-shell .analysis-assumption-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .customer-shell .analysis-assumption-tab {
        min-width: 0;
        padding-inline: .25rem;
        font-size: .72rem;
    }
    .customer-shell .analysis-detail-hero { grid-template-columns: 1fr; }
}
