/* Foundation workspace layout — Organisation Foundation, Accounts, Contacts, and other FoundationWorkspaceLayout consumers. */

/*
 * WorkspaceLayout keeps overflow-hidden on the column for bounded flex layout.
 * Organisation Foundation uses organisation-foundation-scroll-host as the single vertical scroll container
 * for overview. When a FoundationWorkspaceLayout is present (--list-full or --split), the scroll host
 * becomes a flex column and the list card fills the workspace height with internal scroll.
 */
.organisation-foundation-scroll-host:not(:has(.foundation-workspace-root--split)):not(:has(.foundation-workspace-root--list-full)) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split),
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    overflow-anchor: none;
}

/* Page content grows inside the scroll host; do not clip or create a nested scroll trap (overview only). */
.organisation-foundation-scroll-host:not(:has(.foundation-workspace-root--split)):not(:has(.foundation-workspace-root--list-full)) .app-content-shell.page-section.organisation-page-shell {
    display: block;
    flex: none;
    min-height: auto;
    height: auto;
    overflow: visible;
}

/* Workspace layout: flex height chain from scroll host down to list scroll regions. */
.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .app-content-shell.page-section.organisation-page-shell,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .app-content-shell.page-section.organisation-page-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .organisation-page-shell__body,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .organisation-page-shell__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .organisation-foundation-page,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .organisation-foundation-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .organisation-foundation-workspace-body,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .organisation-foundation-workspace-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .organisation-foundation-workspace-body > *,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .organisation-foundation-workspace-body > * {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.organisation-foundation-scroll-host:has(.foundation-workspace-root--split) .foundation-workspace-root--split,
.organisation-foundation-scroll-host:has(.foundation-workspace-root--list-full) .foundation-workspace-root--list-full {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/*
 * Module index pages (Accounts, Contacts, etc.) — ModuleIndexPageLayout scroll-inner is normally
 * the page scroll container; when split is active, bound height and delegate scroll to list/detail columns.
 */
.app-content-shell.page-section:has(.foundation-workspace-root--split):not(.organisation-page-shell),
.app-content-shell.page-section:has(.foundation-workspace-root--list-full):not(.organisation-page-shell) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.module-index-root:has(.foundation-workspace-root--split),
.module-index-root:has(.foundation-workspace-root--list-full) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none;
    height: 100%;
    overflow: hidden;
}

.module-index-root:has(.foundation-workspace-root--split) .module-index-content-scroll,
.module-index-root:has(.foundation-workspace-root--list-full) .module-index-content-scroll {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split),
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden !important;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split) .module-index-main,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .module-index-main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split) .module-index-grid-area,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .module-index-grid-area {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split) .module-index-grid-area > .mb-4,
.module-index-scroll-inner:has(.foundation-workspace-root--split) .module-index-grid-area > .flex-shrink-0,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .module-index-grid-area > .mb-4,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .module-index-grid-area > .flex-shrink-0 {
    flex-shrink: 0;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split) .module-index-bottom-spacer,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .module-index-bottom-spacer {
    display: none;
}

.module-index-root:has(.foundation-workspace-root--split) .module-index-header-sticky,
.module-index-root:has(.foundation-workspace-root--list-full) .module-index-header-sticky {
    flex-shrink: 0;
    position: static;
}

.module-index-scroll-inner:has(.foundation-workspace-root--split) .foundation-workspace-root--split,
.module-index-scroll-inner:has(.foundation-workspace-root--list-full) .foundation-workspace-root--list-full {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.organisation-foundation-page {
    --foundation-surface-radius: var(--nucleus-surface-radius, 6px);
    min-width: 0;
    min-height: 0;
    overflow: visible;
}

.organisation-foundation-workspace-body {
    min-width: 0;
    min-height: 0;
    overflow: visible;
}

/* Organisation Foundation detail cards — page scroll, not internal clip. */
.organisation-foundation-page .foundation-cap-group-card,
.organisation-foundation-page .org-person-card,
.organisation-foundation-page .org-team-card,
.organisation-foundation-page .org-location-card,
.organisation-foundation-page .org-asset-card--full-detail,
.organisation-foundation-page .foundation-detail,
.organisation-foundation-page .organisation-governance-tab,
.organisation-foundation-page .organisation-admin-landing {
    overflow: visible;
    max-height: none;
}

.organisation-foundation-page .foundation-cap-embedded-entity,
.organisation-foundation-page .foundation-cap-group-card--embedded-entity {
    overflow: visible;
    max-height: none;
}

.foundation-capabilities-overview,
.foundation-workspace,
.foundation-workspace__master,
.foundation-workspace__detail {
    min-width: 0;
    min-height: 0;
    overflow: visible;
    max-height: none;
}


.foundation-overview-card,
.foundation-card,
.foundation-panel,
.workspace-card,
.linked-item-card,
.foundation-structure-row {
    border-radius: var(--foundation-surface-radius, 6px);
}

.organisation-foundation-page .mud-paper-outlined {
    border-radius: var(--foundation-surface-radius, 6px);
    border-color: var(--nucleus-surface-border, var(--mud-palette-lines-default));
    box-shadow: var(--nucleus-surface-shadow, 0 1px 2px color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent));
}

/* Capability model + other Foundation list/detail shells — clip row fills to 6px corners */
.organisation-foundation-page .foundation-capabilities-overview__list-wrap,
.organisation-foundation-page .foundation-cap-group-card.nucleus-surface-card,
.organisation-foundation-page .foundation-cap-group-card.mud-paper-outlined,
.organisation-foundation-page .foundation-list-wrap,
.organisation-foundation-page .foundation-flat-list,
.organisation-foundation-page .foundation-cap-group-card__cap-list,
.organisation-foundation-page .linked-item-card {
    border-color: var(--nucleus-surface-border, var(--mud-palette-lines-default));
}

.organisation-foundation-page .foundation-capabilities-overview__list-wrap,
.organisation-foundation-page .foundation-cap-group-card__cap-list,
.organisation-foundation-page .foundation-list-wrap,
.organisation-foundation-page .foundation-flat-list {
    overflow: hidden;
}

.organisation-foundation-page .foundation-capabilities-overview__list-wrap.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .foundation-cap-group-card.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .foundation-list-wrap.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .foundation-flat-list.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .foundation-dept-table-wrap.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .dept-flows-list-card.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .capability-group__list.mud-paper-outlined,
.organisation-foundation-page .organisation-governance-panel.mud-paper-outlined.nucleus-surface-card,
.organisation-foundation-page .governance-embedded-register-panel.mud-paper-outlined {
    border-radius: var(--foundation-surface-radius, 6px) !important;
    border-color: var(--nucleus-surface-border, var(--mud-palette-lines-default)) !important;
    box-shadow: var(--nucleus-surface-shadow, 0 1px 2px color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent));
}

/* Named Organisation Foundation card shells (tabs + drill-ins) */
.organisation-foundation-page .foundation-detail,
.organisation-foundation-page .foundation-overview-banner,
.organisation-foundation-page .foundation-list-wrap,
.organisation-foundation-page .foundation-flat-list,
.organisation-foundation-page .foundation-assets-spine-card,
.organisation-foundation-page .foundation-dept-summary-card,
.organisation-foundation-page .foundation-dept-table-wrap,
.organisation-foundation-page .foundation-cap-group-card,
.organisation-foundation-page .foundation-cap-detail-card,
.organisation-foundation-page .foundation-capabilities-overview__list-wrap,
.organisation-foundation-page .dept-flows-list-card,
.organisation-foundation-page .organisation-section-card,
.organisation-foundation-page .organisation-governance-outer,
.organisation-foundation-page .organisation-admin-landing,
.organisation-foundation-page .org-person-card,
.organisation-foundation-page .org-team-card,
.organisation-foundation-page .org-location-card,
.organisation-foundation-page .business-flow-foundation-overview-panel,
.organisation-foundation-page .org-asset-card,
.organisation-foundation-page .foundation-story-card,
.organisation-foundation-page .organisation-governance-panel,
.organisation-foundation-page .organisation-admin-panel,
.organisation-foundation-page .governance-risk-detail-panel,
.organisation-foundation-page .governance-control-detail-panel,
.organisation-foundation-page .governance-policy-detail-panel,
.organisation-foundation-page .governance-standard-detail-panel,
.organisation-foundation-page .governance-embedded-detail-panel,
.organisation-foundation-page .governance-risk-detail-panel {
    border-radius: var(--foundation-surface-radius, 6px);
}

body.theme-dark .organisation-foundation-page .mud-paper-outlined {
    box-shadow: 0 1px 3px color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent);
}

.foundation-workspace-section-intro__title {
    font-size: 0.9375rem;
    font-weight: 650;
    line-height: 1.3;
    color: var(--mud-palette-text-primary);
}

.foundation-workspace-section-intro__desc {
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-top: 4px;
}

.foundation-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.foundation-section-header__title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--mud-palette-text-primary);
}

.foundation-section-header__description {
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 4px 0 0;
    color: var(--mud-palette-text-secondary);
}

.foundation-section-header__hint {
    font-size: 0.8125rem;
    line-height: 1.4;
    margin: 6px 0 0;
    color: var(--mud-palette-text-secondary);
}

.foundation-section-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Full-width list by default; 25/75 when an item is selected. */
.foundation-workspace {
    display: block;
    width: 100%;
}

.foundation-workspace--split {
    display: grid;
    grid-template-columns: minmax(280px, 25%) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 959.98px) {
    .foundation-workspace--split {
        grid-template-columns: 1fr;
    }

    .foundation-workspace--split.foundation-workspace--hide-list-on-mobile .foundation-workspace__master {
        display: none;
    }
}

.foundation-workspace__master,
.foundation-workspace__detail {
    min-width: 0;
    overflow: visible;
    max-height: none;
}

.foundation-workspace__detail {
    animation: foundation-workspace-detail-in 0.24s ease-out;
}

.foundation-workspace-toolbar {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.organisation-foundation-workspace-body {
    min-width: 0;
}

@keyframes foundation-workspace-detail-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .foundation-workspace__detail {
        animation: none;
    }
}

.foundation-list-wrap {
    overflow: visible;
    max-height: none;
}

.foundation-list {
    height: auto;
    max-height: none;
    overflow: visible;
}

/* Shared list row — full and compact modes use the same component. */
.foundation-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--mud-palette-divider);
    padding: 12px 16px;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background-color 120ms ease;
}

.foundation-workspace--split .foundation-list-row {
    padding: 10px 12px;
}

.foundation-list-row:last-child {
    border-bottom: 0;
}

.foundation-list-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.foundation-list-row--selected,
.foundation-list-row--selected:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    box-shadow: none;
}

.foundation-list-row__main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.foundation-list-row__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--mud-palette-text-primary);
}

.foundation-list-row__title--link {
    text-decoration: none !important;
    font-weight: 600;
}

.foundation-list-row__title--link:hover {
    text-decoration: underline !important;
}

.foundation-list-row__sub {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

.foundation-list-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.foundation-list-row__meta-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* Hide noisy meta in compact (split) mode */
.foundation-workspace--split .foundation-list-row__meta--full-only {
    display: none;
}

.foundation-workspace--split .foundation-list-row__sub--full-only {
    display: none;
}

@media (max-width: 959.98px) {
    .foundation-workspace--split .foundation-list-row__meta--full-only,
    .foundation-workspace--split .foundation-list-row__sub--full-only {
        display: flex;
    }

    .foundation-workspace--split .foundation-list-row__sub--full-only {
        display: block;
    }
}

/* Legacy workspace card aliases (Business Flows, Assets, Governance) */
.foundation-workspace-card {
    display: block;
    width: 100%;
}

.foundation-workspace-card.foundation-split {
    display: grid;
    grid-template-columns: minmax(280px, 25%) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 959.98px) {
    .foundation-workspace-card.foundation-split {
        grid-template-columns: 1fr;
    }
}

.foundation-left-spine,
.foundation-right-panel {
    min-width: 0;
    overflow: visible;
    max-height: none;
}

.foundation-workspace-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
}

.foundation-workspace-header__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
}

.foundation-workspace-header__subtitle {
    font-size: 0.875rem;
    color: var(--mud-palette-text-secondary);
}

.foundation-workspace-header__hint {
    font-size: 0.8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Story rows (Business Flows / Assets) — align selection with foundation-list-row */
.foundation-story-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--foundation-surface-radius, 6px);
    padding: 12px 14px;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.foundation-story-row + .foundation-story-row {
    margin-top: 8px;
}

.foundation-story-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.foundation-story-row.is-selected,
.foundation-story-row.is-selected:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    border-color: var(--mud-palette-divider);
    box-shadow: none;
}

.foundation-workspace-card.foundation-split .foundation-story-row {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: transparent;
    padding: 10px 12px;
}

.foundation-workspace-card.foundation-split .foundation-story-row + .foundation-story-row {
    margin-top: 0;
}

.foundation-workspace-card.foundation-split .foundation-story-row.is-selected {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
}

.foundation-workspace-card.foundation-split .foundation-story-list {
    padding: 0 !important;
}

.foundation-workspace-card.foundation-split .foundation-flow-row__description,
.foundation-workspace-card.foundation-split .foundation-pill--full-only {
    display: none;
}

/* CRM master-detail alignment with Foundation tabs */
@media (min-width: 960px) {
    .crm-master-detail-section.is-detail-open {
        grid-template-columns: minmax(280px, 25%) minmax(0, 1fr);
        gap: 1rem;
    }
}

.master-detail-spine-list .sidebar-compact-row.is-selected,
.master-detail-spine-list .sidebar-compact-row.is-selected:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    box-shadow: none;
}

.flat-table tbody tr.selected-row,
.flat-table tbody tr.selected-row:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface)) !important;
    box-shadow: none !important;
}

/* FoundationWorkspaceLayout — independent list + detail column scroll (global; child components lack scoped CSS). */
@media (min-width: 960px) {
    .foundation-workspace-root--split > .foundation-workspace-master-detail.is-detail-open,
    .foundation-workspace-root--split > .nucleus-master-detail-section.foundation-workspace-master-detail.is-detail-open,
    .foundation-workspace-root--split > .crm-master-detail-section.foundation-workspace-master-detail.is-detail-open {
        flex: 1 1 0%;
        min-height: 0;
        max-height: 100%;
        grid-template-rows: minmax(0, 1fr);
        align-items: stretch !important;
        align-self: stretch;
        overflow: hidden;
    }

    .foundation-workspace-root--split .crm-master-detail-section__detail,
    .foundation-workspace-root--split .nucleus-master-detail-section__detail {
        animation: none !important;
        transform: none !important;
    }

    .foundation-workspace-root--split .foundation-workspace-master-detail.is-detail-open .crm-master-detail-section__list,
    .foundation-workspace-root--split .foundation-workspace-master-detail.is-detail-open .nucleus-master-detail-section__list,
    .foundation-workspace-root--split .foundation-workspace-master-detail.is-detail-open .crm-master-detail-section__detail,
    .foundation-workspace-root--split .foundation-workspace-master-detail.is-detail-open .nucleus-master-detail-section__detail,
    .foundation-workspace-root--split .foundation-workspace-master-detail__list,
    .foundation-workspace-root--split .foundation-workspace-master-detail__detail {
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .foundation-workspace-root--split .foundation-workspace__master-list,
    .foundation-workspace-root--split .nucleus-master-list.foundation-workspace__master-list {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--split .foundation-workspace__list-column.is-spine-mode {
        flex: 1 1 auto;
        align-self: stretch;
        min-height: 0;
        max-height: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--split .foundation-workspace-master-detail__list,
    .foundation-workspace-root--split .nucleus-master-detail-section__list.foundation-workspace-master-detail__list,
    .foundation-workspace-root--split .crm-master-detail-section__list.foundation-workspace-master-detail__list {
        align-self: stretch;
        height: 100%;
    }

    .foundation-workspace-root--split .foundation-workspace__list-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        overflow-anchor: none;
        -webkit-overflow-scrolling: touch;
    }

    .foundation-workspace-root--split .foundation-workspace__detail-panel,
    .foundation-workspace-root--split .nucleus-selected-detail-panel.foundation-workspace__detail-panel {
        flex: 1 1 auto;
        min-height: 0;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--split .foundation-workspace__detail-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        overflow-anchor: none;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 959.98px) {
    .foundation-workspace-root--hide-list-on-mobile .foundation-workspace-master-detail.is-detail-open .crm-master-detail-section__list,
    .foundation-workspace-root--hide-list-on-mobile .foundation-workspace-master-detail.is-detail-open .nucleus-master-detail-section__list {
        display: none;
    }

    .foundation-workspace-root--split .foundation-workspace__detail-scroll {
        overflow-y: visible;
    }
}

/* Workspace list chrome — bordered full-height list card (grid-only + split spine), borderless detail column. */
@media (min-width: 960px) {
    .foundation-workspace-root--list-full > .foundation-workspace-master-detail,
    .foundation-workspace-root--list-full > .nucleus-master-detail-section.foundation-workspace-master-detail,
    .foundation-workspace-root--list-full > .crm-master-detail-section.foundation-workspace-master-detail {
        flex: 1 1 0%;
        min-height: 0;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--list-full .foundation-workspace-master-detail__list,
    .foundation-workspace-root--list-full .nucleus-master-detail-section__list.foundation-workspace-master-detail__list,
    .foundation-workspace-root--list-full .crm-master-detail-section__list.foundation-workspace-master-detail__list {
        flex: 1 1 auto;
        align-self: stretch;
        min-height: 0;
        max-height: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--list-full .foundation-workspace__master-list,
    .foundation-workspace-root--list-full .nucleus-master-list.foundation-workspace__master-list {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--list-full .foundation-workspace__list-column {
        flex: 1 1 auto;
        align-self: stretch;
        min-height: 0;
        max-height: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .foundation-workspace-root--list-full .foundation-workspace__list-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        overflow-anchor: none;
        -webkit-overflow-scrolling: touch;
    }

    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface {
        flex: 1 1 auto;
        align-self: stretch;
        min-height: 0;
        height: 100%;
        max-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--mud-palette-surface);
        border: 1px solid var(--mud-palette-lines-default);
        border-radius: var(--nucleus-surface-radius, 6px);
        box-shadow: var(--nucleus-surface-shadow, 0 1px 2px color-mix(in srgb, var(--mud-palette-text-primary) 4%, transparent));
    }

    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-chrome {
        flex-shrink: 0;
        border-bottom: 1px solid var(--mud-palette-lines-default);
    }

    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .foundation-workspace__list-scroll,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll {
        flex: 1 1 auto;
        min-height: 0;
    }

    /* Inner list hosts fill the surface; outer border comes from list-full/spine surface only. */
    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .foundation-workspace__list-scroll > .organisation-section-card,
    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .foundation-workspace__list-scroll > .mud-paper.mud-paper-outlined,
    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .foundation-workspace__list-scroll > .nucleus-surface-card.mud-paper-outlined,
    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .foundation-workspace__list-scroll > .foundation-list-wrap,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .organisation-section-card,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .mud-paper.mud-paper-outlined,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .nucleus-surface-card.mud-paper-outlined,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .foundation-list-wrap,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .capability-explorer-workspace__tree-panel,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .foundation-workspace__list-scroll > .assets-explorer-types-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .foundation-workspace-root--list-full .foundation-workspace__list-full-surface .organisation-section-card__body,
    .foundation-workspace-root--split .foundation-workspace__list-spine-surface .organisation-section-card__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .foundation-workspace-root--split .foundation-workspace__detail-panel,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless {
        background: transparent;
    }

    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .mud-paper.mud-paper-outlined,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .org-person-card,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .foundation-cap-group-card,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .org-location-card,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .org-asset-card--full-detail,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .business-flow-foundation-overview-panel,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .department-detail-page,
    .foundation-workspace-root--split .foundation-workspace__detail-scroll--chromeless > .capability-explorer-workspace__detail-panel {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}
