/*
 * Atlas refinement 02
 * Replaces residual Rhine circles/honeycombs with page-specific archive
 * specimens or organic field-map fragments. Also owns all theme typography.
 */

body.background-all-lives {
    --theme-heading: #172b32;
    --theme-text: #34484d;
    --theme-muted: #6c7c81;
    --theme-faint: #929da0;
    --theme-label: #315ca9;
    --theme-paper: #f7f6f0;
    --theme-rule: rgba(35, 55, 61, .24);
    background:
        radial-gradient(circle, rgba(49,92,169,.16) 0 1px, transparent 1.25px) 0 0 / 12px 12px,
        linear-gradient(104deg, transparent 0 17%, rgba(196,76,66,.11) 17.1% 23%, transparent 23.1%),
        linear-gradient(164deg, #f4f4ef 0 47%, #dfebec 47.2% 73%, #eff0ea 73.2%);
}
body.background-all-lives::before {
    background:
        linear-gradient(77deg, transparent 0 63%, rgba(49,92,169,.17) 63.05% 63.12%, transparent 63.18%),
        linear-gradient(141deg, transparent 0 72%, rgba(49,92,169,.13) 72.05% 72.12%, transparent 72.18%),
        linear-gradient(90deg, transparent 0 8%, rgba(196,76,66,.76) 8% 18%, transparent 18%) 0 88% / 100% 4px no-repeat;
}
body.background-all-lives::after {
    right: -40px;
    bottom: -42px;
    width: 430px;
    height: 330px;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: url("../images/theme-atlas/all-lives-collage-fragments-v2.png") 50% 100% / 118% auto no-repeat;
    opacity: .1;
    transform: rotate(-4deg);
}

body.background-all-lives .sidebar::before {
    left: 12px;
    right: auto;
    bottom: 92px;
    width: 216px;
    height: 170px;
    border: 0;
    border-radius: 0;
    background: url("../images/theme-atlas/all-lives-collage-fragments-v2.png") 0 47% / 210% auto no-repeat;
    opacity: .12;
    transform: rotate(-7deg);
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading) {
    color: var(--theme-heading);
    background:
        linear-gradient(90deg, rgba(248,248,243,.99) 0 51%, rgba(232,241,241,.78) 51.2% 76%, rgba(244,239,228,.88) 76.2%),
        var(--theme-paper);
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading)::before {
    right: 23px;
    bottom: 22px;
    width: 112px;
    height: 78px;
    border: 0;
    background:
        linear-gradient(90deg, var(--atlas-blue) 0 8px, transparent 8px calc(100% - 8px), var(--atlas-blue) calc(100% - 8px)) top / 100% 1px no-repeat,
        linear-gradient(var(--atlas-blue) 0 8px, transparent 8px calc(100% - 8px), var(--atlas-blue) calc(100% - 8px)) left / 1px 100% no-repeat;
    opacity: .48;
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading)::after {
    right: 126px;
    bottom: 59px;
    width: 6px;
    height: 6px;
    border: 1px solid var(--atlas-red);
    border-radius: 0;
    background: var(--theme-paper);
    box-shadow: 106px 0 0 -1px var(--theme-paper),106px 0 0 var(--atlas-red),0 76px 0 -1px var(--theme-paper),0 76px 0 var(--atlas-red),106px 76px 0 -1px var(--theme-paper),106px 76px 0 var(--atlas-red);
}

body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) {
    display: block !important;
    position: absolute;
    z-index: 0;
    top: 0;
    right: 1.5%;
    bottom: 0;
    width: 42%;
    height: auto;
    pointer-events: none;
    background-repeat: no-repeat;
}
body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) > * { display: none !important; }
body:is(.background-all-lives,.background-black-current) :is(.hero-copy,.page-heading.technical-heading > div:first-child,.page-heading.technical-heading > .button,.page-heading.technical-heading > .heading-actions) { position: relative; z-index: 2; }

body.background-all-lives :is(.hero-atmosphere,.heading-visual) {
    background-image: url("../images/theme-atlas/all-lives-collage-fragments-v2.png");
    background-size: 200% 200%;
    opacity: .42;
    mix-blend-mode: multiply;
    filter: saturate(.88) contrast(.96);
}
body.background-all-lives #view-dashboard .hero-atmosphere,
body.background-all-lives #view-schedule .heading-visual { background-position: 0 0; }
body.background-all-lives #view-mice .heading-visual { background-position: 100% 0; }
body.background-all-lives #view-reagents .heading-visual,
body.background-all-lives #view-cells .heading-visual { background-position: 0 100%; }
body.background-all-lives #view-experiments .heading-visual,
body.background-all-lives #view-samples .heading-visual,
body.background-all-lives #view-protocols .heading-visual { background-position: 100% 100%; }

body.background-all-lives :is(.view h1,.view h2,.view h3,.view h4,.view th,.view label,.view .section-title) { color: var(--theme-heading) !important; }
body.background-all-lives :is(.view p,.view td,.view dd,.view .project-row,.view .today-item,.view .activity-item,.view .record-card,.view .protocol-card,.view .cell-culture-card) { color: var(--theme-text); }
body.background-all-lives :is(.view small,.view .field-note,.view .matrix-hint,.view .calendar-time-label,.view .record-detail-code) { color: var(--theme-muted) !important; }
body.background-all-lives :is(.eyebrow,.micro-label,.section-index,.nav-code) { color: var(--theme-label) !important; }
body.background-all-lives .story-quote,
body.background-all-lives .story-quote cite { color: #53676c !important; }
body.background-all-lives #dashboardDaySummary { color: #3b4e52 !important; }
body.background-all-lives #dashboardDaySummary strong { color: var(--atlas-blue) !important; }
body.background-all-lives .hero-progress { color: #68777b; }
body.background-all-lives .hero-progress i { background: #839398; }

body.background-all-lives :is(.facility-chip,.system-status,.sync-control,.language-dock,.workspace-mode-toggle,.global-search) { border-radius: 0 !important; }
body.background-all-lives :is(.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel)::after { border-radius: 0; }

body.dark-theme.background-all-lives {
    --theme-heading: #f1eee4;
    --theme-text: #d2dfdc;
    --theme-muted: #9fb0ad;
    --theme-faint: #758783;
    --theme-label: #8db2f2;
    --theme-paper: #1d2724;
    --theme-rule: rgba(218,229,224,.18);
    color-scheme: dark;
    background:
        radial-gradient(circle, rgba(126,165,224,.12) 0 1px, transparent 1.25px) 0 0 / 12px 12px,
        linear-gradient(106deg, transparent 0 18%, rgba(201,85,69,.12) 18.1% 24%, transparent 24.1%),
        linear-gradient(151deg,#131b19,#1b2927 54%,#24292a);
}
body.dark-theme.background-all-lives::after { opacity: .2; mix-blend-mode: screen; }
body.dark-theme.background-all-lives :is(.hero-atmosphere,.heading-visual) { opacity: .5; mix-blend-mode: screen; filter: saturate(.72) brightness(.95); }
body.dark-theme.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading) { color:var(--theme-heading);background:linear-gradient(90deg,#18221f 0 50%,#203638 50.2% 76%,#302b25 76.2%); }
body.dark-theme.background-all-lives :is(.topbar,.sidebar,.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel,.today-panel,.timeline-panel,.utilization-panel,.record-detail-section,.module-toolbar,.calendar-toolbar) { border-color:var(--theme-rule)!important; }
body.dark-theme.background-all-lives :is(.global-search,.sync-control,.icon-button,.workspace-mode-toggle,.language-dock,.facility-chip,.system-status) { color:var(--theme-text)!important;background:#1b2723!important;border-color:var(--theme-rule)!important; }
body.dark-theme.background-all-lives .story-quote,
body.dark-theme.background-all-lives .story-quote cite { color:#b6c6c2!important; }
body.dark-theme.background-all-lives #dashboardDaySummary { color:#cbd9d5!important; }
body.dark-theme.background-all-lives #dashboardDaySummary strong { color:#9bbcf4!important; }
body.dark-theme.background-all-lives .hero-progress { color:#aebdb9; }

body.background-black-current {
    --theme-heading: #edf7f2;
    --theme-text: #c8dbd3;
    --theme-muted: #8fa89e;
    --theme-faint: #657e74;
    --theme-label: #67d8c0;
    background:
        linear-gradient(121deg, transparent 0 64%, rgba(127,92,163,.13) 64.1% 64.2%, transparent 64.3%),
        radial-gradient(ellipse at 79% 23%,rgba(61,152,131,.18),transparent 31%),
        linear-gradient(147deg,#09140f,#0b1d16 55%,#11151a);
}
body.background-black-current::before {
    background:
        linear-gradient(28deg, transparent 0 36%, rgba(94,211,191,.13) 36.1% 36.2%, transparent 36.3%),
        linear-gradient(153deg, transparent 0 63%, rgba(128,97,163,.16) 63.1% 63.2%, transparent 63.3%),
        repeating-linear-gradient(0deg, transparent 0 43px, rgba(118,198,179,.024) 43px 44px),
        repeating-linear-gradient(90deg, transparent 0 43px, rgba(118,198,179,.018) 43px 44px);
}
body.background-black-current::after {
    right: -36px;
    bottom: -34px;
    width: 520px;
    height: 390px;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: url("../images/theme-atlas/black-current-field-atlas-v1.png") 100% 100% / 200% 200% no-repeat;
    opacity: .2;
    transform: none;
}
body.background-black-current .sidebar::before {
    left: 8px;
    bottom: 90px;
    width: 220px;
    height: 170px;
    border: 0;
    border-radius: 0;
    background: url("../images/theme-atlas/black-current-field-atlas-v1.png") 0 0 / 200% 200% no-repeat;
    opacity: .22;
    transform: rotate(-7deg);
}
body.background-black-current :is(.hero-atmosphere,.heading-visual) {
    background-image: url("../images/theme-atlas/black-current-field-atlas-v1.png");
    background-size: 200% 200%;
    opacity: .5;
    mix-blend-mode: screen;
    filter: saturate(.8) brightness(.72);
}
body.background-black-current #view-dashboard .hero-atmosphere,
body.background-black-current #view-protocols .heading-visual { background-position: 100% 100%; }
body.background-black-current #view-experiments .heading-visual,
body.background-black-current #view-schedule .heading-visual { background-position: 0 0; }
body.background-black-current #view-mice .heading-visual,
body.background-black-current #view-cells .heading-visual { background-position: 100% 0; }
body.background-black-current #view-reagents .heading-visual,
body.background-black-current #view-samples .heading-visual { background-position: 0 100%; }

body.background-black-current :is(.dashboard-hero,.page-heading.technical-heading) {
    color: var(--theme-heading);
    background:
        linear-gradient(28deg,transparent 0 72%,rgba(94,211,191,.12) 72.1% 72.22%,transparent 72.32%),
        linear-gradient(151deg,transparent 0 68%,rgba(128,97,163,.14) 68.1% 68.22%,transparent 68.32%),
        linear-gradient(125deg,#07140f,#0b2119 62%,#17101f);
    border-radius: 18px 3px 24px 4px !important;
}
body.background-black-current :is(.dashboard-hero,.page-heading.technical-heading)::before { right:17%;bottom:34px;width:10px;height:10px;border:1px solid var(--current-cyan);border-radius:0;background:#07120e;box-shadow:-112px -64px 0 -2px #07120e,-112px -64px 0 -1px var(--current-purple),104px -78px 0 -2px #07120e,104px -78px 0 -1px var(--current-cyan);transform:rotate(45deg); }
body.background-black-current :is(.dashboard-hero,.page-heading.technical-heading)::after { right:13%;bottom:72px;width:188px;height:1px;border:0;border-radius:0;background:linear-gradient(90deg,var(--current-purple),var(--current-cyan));transform:rotate(-18deg); }

body.background-black-current :is(.view h1,.view h2,.view h3,.view h4,.view th,.view label,.view .section-title) { color:var(--theme-heading)!important; }
body.background-black-current :is(.view p,.view td,.view dd,.view .project-row,.view .today-item,.view .activity-item,.view .record-card,.view .protocol-card,.view .cell-culture-card) { color:var(--theme-text); }
body.background-black-current :is(.view small,.view .field-note,.view .matrix-hint,.view .calendar-time-label,.view .record-detail-code) { color:var(--theme-muted)!important; }
body.background-black-current :is(.eyebrow,.micro-label,.section-index,.nav-code) { color:var(--theme-label)!important; }
body.background-black-current .story-quote,
body.background-black-current .story-quote cite { color:#a9beb6!important; }
body.background-black-current #dashboardDaySummary { color:#c6d9d1!important; }
body.background-black-current #dashboardDaySummary strong { color:var(--current-cyan)!important; }
body.background-black-current .hero-progress { color:#8eaaa0; }
body.background-black-current .hero-progress i { background:#668c80; }

body.background-black-current :is(.facility-chip,.system-status,.sync-control,.language-dock,.workspace-mode-toggle,.global-search,.button,.icon-button,.filter-tabs button,.calendar-modes button,.calendar-navigation button,.freezer-box-tab,.animal-rack-tab) { border-radius:12px 2px 12px 2px!important; }
body.background-black-current .nav-item { border-radius:14px 2px 14px 2px!important; }
body.background-black-current .nav-item::before { width:8px;height:8px;border-radius:0;transform:translateY(-50%) rotate(45deg); }
body.background-black-current :is(.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel)::before { border-radius:0;transform:rotate(45deg); }
body.background-black-current .project-code { border-radius:3px;clip-path:polygon(18% 0,82% 0,100% 18%,100% 82%,82% 100%,18% 100%,0 82%,0 18%); }
body.background-black-current :is(.status-chip,.run-live-badge) { border-radius:3px; }
body.background-black-current :is(.animal-rack-position,.freezer-cell) { border-radius:10px 2px 10px 2px; }

body.dark-theme.background-black-current {
    --theme-heading:#f4faf7;
    --theme-text:#d7e5df;
    --theme-muted:#96ada4;
    --theme-faint:#6e857c;
    --theme-label:#79e2cc;
    background:
        linear-gradient(121deg,transparent 0 64%,rgba(117,75,153,.17) 64.1% 64.22%,transparent 64.32%),
        radial-gradient(ellipse at 78% 22%,rgba(33,123,103,.14),transparent 29%),
        linear-gradient(147deg,#020705,#06100c 57%,#0c0911);
}
body.dark-theme.background-black-current::after { opacity:.27;filter:brightness(.8) saturate(.9); }
body.dark-theme.background-black-current :is(.hero-atmosphere,.heading-visual) { opacity:.58;filter:saturate(.86) brightness(.68); }
body.dark-theme.background-black-current :is(.topbar,.sidebar) { background-color:rgba(2,9,6,.97); }
body.dark-theme.background-black-current :is(.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel,.today-panel,.timeline-panel,.utilization-panel,.animal-rack-board,.freezer-panel,.record-detail-section,.run-tool-card,.module-toolbar,.calendar-toolbar) { background-color:rgba(4,15,10,.96)!important;border-color:rgba(107,215,188,.17)!important; }
body.dark-theme.background-black-current :is(.global-search,.sync-control,.icon-button,.workspace-mode-toggle,.language-dock,.facility-chip,.system-status,input,select,textarea) { color:var(--theme-text)!important;background-color:#07150f!important;border-color:rgba(107,215,188,.2)!important; }
body.dark-theme.background-black-current .story-quote,
body.dark-theme.background-black-current .story-quote cite { color:#b9cbc4!important; }
body.dark-theme.background-black-current #dashboardDaySummary { color:#d2e1dc!important; }

@media (max-width:900px) {
    body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) { right:0;width:48%;opacity:.28; }
    body.background-all-lives::after,
    body.background-black-current::after { width:360px;height:280px;right:-80px;bottom:-36px; }
}
@media (max-width:700px) {
    body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) { width:58%;opacity:.2; }
    body.background-all-lives .sidebar::before,
    body.background-black-current .sidebar::before { opacity:.08; }
}

/* Typography outside .view: navigation, dialogs, shared workspace and overlays. */
body.background-all-lives :is(.topbar,.sidebar,dialog,.notification-panel,.search-dialog,.sync-dialog,.workspace-scope-banner,.lab-member-directory) { color:var(--theme-text); }
body.background-all-lives :is(.breadcrumb,.nav-item,.nav-label,.global-search input,.sync-control,.workspace-mode-toggle button,.language-dock,.notification-panel p,.search-dialog p,.sync-dialog p,.workspace-scope-banner p) { color:var(--theme-text)!important; }
body.background-all-lives :is(.nav-item b,.system-status small,.notification-panel small,.search-dialog small,.sync-dialog small,.workspace-scope-banner small) { color:var(--theme-muted)!important; }
body.background-all-lives :is(dialog h1,dialog h2,dialog h3,dialog h4,.notification-panel h2,.search-dialog h2,.sync-dialog h2,.workspace-scope-banner h2) { color:var(--theme-heading)!important; }
body.background-all-lives :is(dialog label,dialog input,dialog select,dialog textarea,.notification-panel button,.search-dialog input,.sync-dialog input) { color:var(--theme-text)!important; }

body.background-black-current :is(.topbar,.sidebar,dialog,.notification-panel,.search-dialog,.sync-dialog,.workspace-scope-banner,.lab-member-directory) { color:var(--theme-text); }
body.background-black-current :is(.breadcrumb,.nav-item,.nav-label,.global-search input,.sync-control,.workspace-mode-toggle button,.language-dock,.notification-panel p,.search-dialog p,.sync-dialog p,.workspace-scope-banner p) { color:var(--theme-text)!important; }
body.background-black-current :is(.nav-item b,.system-status small,.notification-panel small,.search-dialog small,.sync-dialog small,.workspace-scope-banner small) { color:var(--theme-muted)!important; }
body.background-black-current :is(dialog h1,dialog h2,dialog h3,dialog h4,.notification-panel h2,.search-dialog h2,.sync-dialog h2,.workspace-scope-banner h2) { color:var(--theme-heading)!important; }
body.background-black-current :is(dialog label,dialog input,dialog select,dialog textarea,.notification-panel button,.search-dialog input,.sync-dialog input) { color:var(--theme-text)!important; }

/* Replace the last circular Rhine-era diagrams in specialized interfaces. */
body.background-all-lives .record-detail-hero::after {
    inset:auto 0 0 auto;
    width:42%;
    height:100%;
    border:0;
    border-radius:0;
    background:url("../images/theme-atlas/all-lives-collage-fragments-v2.png") 100% 55%/185% auto no-repeat;
    opacity:.18;
}
body.background-all-lives .sync-intro { background:linear-gradient(112deg,#e4edef 0 72%,#eee5dc 72.2%); }
body.background-all-lives .sync-orbit { border-radius:0;transform:rotate(45deg);border-color:var(--atlas-blue); }
body.background-all-lives .sync-orbit::before,
body.background-all-lives .sync-orbit::after { border-radius:0; }

body.background-black-current .protocol-flow-map { background:linear-gradient(112deg,rgba(94,211,191,.045),transparent 56%),#071812; }
body.background-black-current .protocol-step-item::before { border-radius:0;transform:translateY(-50%) rotate(45deg); }
body.background-black-current .record-detail-hero {
    background:linear-gradient(112deg,#09231a 0 58%,#151027 100%);
}
body.background-black-current .record-detail-hero::after {
    inset:auto 0 0 auto;
    width:45%;
    height:100%;
    border:0;
    border-radius:0;
    background:url("../images/theme-atlas/black-current-field-atlas-v1.png") 0 100%/200% 200% no-repeat;
    opacity:.26;
}
body.background-black-current .sync-intro { background:linear-gradient(118deg,#0a2119 0 69%,#171026 69.2%);border-radius:14px 2px 14px 2px; }
body.background-black-current .sync-orbit { border-radius:0;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);transform:rotate(30deg); }
body.background-black-current .sync-orbit::before,
body.background-black-current .sync-orbit::after { border-radius:0; }
body.background-black-current .run-step-rail { background:linear-gradient(145deg,rgba(94,211,191,.07),transparent 35%),#071812; }
body.background-black-current .run-current-step { background:linear-gradient(112deg,#071812 0 63%,#171026 100%); }
body.background-black-current .apparatus-grid { background:linear-gradient(rgba(94,211,191,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(94,211,191,.035) 1px,transparent 1px),#06150f;background-size:20px 20px; }

/* Theme assets remain decorative and never reduce readable contrast. */
body:is(.background-all-lives,.background-black-current) :is(.hero-copy,.page-heading.technical-heading > div:first-child) { max-width:min(64%,820px); }
body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) { -webkit-mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.38) 18%,#000 48%);mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.38) 18%,#000 48%); }

body.dark-theme.background-all-lives :is(dialog > article,.entry-dialog form,.record-detail-dialog > article,.protocol-detail-dialog > article,.freezer-scan-dialog > article,.search-dialog,.sync-dialog,.notification-panel) { color:var(--theme-text);background:#19231f;border-color:var(--theme-rule); }
body.dark-theme.background-all-lives .record-detail-hero::after { opacity:.26;mix-blend-mode:screen; }
body.dark-theme.background-black-current .record-detail-hero::after { opacity:.32;filter:brightness(.78); }

@media (max-width:700px) {
    body:is(.background-all-lives,.background-black-current) :is(.hero-copy,.page-heading.technical-heading > div:first-child) { max-width:74%; }
    body:is(.background-all-lives,.background-black-current) :is(.hero-atmosphere,.heading-visual) { -webkit-mask-image:linear-gradient(90deg,transparent,#000 40%);mask-image:linear-gradient(90deg,transparent,#000 40%); }
}

/* Atlas refinement 03 â€” All Lives as fragmented blueprint collage. */
body.background-all-lives {
    --atlas-collage-blue: #2457c6;
    --atlas-collage-cyan: #9ddbe2;
    --atlas-collage-red: #df6658;
    --atlas-collage-ink: #1d2d34;
    background:
        linear-gradient(90deg, rgba(36,87,198,.055) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgba(36,87,198,.055) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(104deg, transparent 0 17%, rgba(223,102,88,.09) 17.1% 22.5%, transparent 22.6%),
        linear-gradient(164deg, #f5f4ee 0 47%, #e2edef 47.2% 73%, #f0efe8 73.2%);
}
body.background-all-lives::before {
    background:
        linear-gradient(90deg, var(--atlas-collage-red) 0 34%, transparent 34%) 8% 88% / 148px 3px no-repeat,
        linear-gradient(var(--atlas-collage-blue),var(--atlas-collage-blue)) 74% 16% / 1px 84px no-repeat,
        linear-gradient(90deg,var(--atlas-collage-blue),var(--atlas-collage-blue)) 74% 16% / 84px 1px no-repeat,
        linear-gradient(90deg,transparent 0 63%,rgba(36,87,198,.13) 63.05% 63.12%,transparent 63.18%);
}
body.background-all-lives::after {
    right: -46px;
    bottom: -10px;
    width: 590px;
    height: 250px;
    opacity: .16;
    transform: rotate(-2deg);
    mix-blend-mode: multiply;
    clip-path: polygon(7% 14%, 38% 14%, 38% 0, 70% 0, 70% 9%, 100% 9%, 100% 100%, 0 100%, 0 28%, 7% 28%);
}
body.background-all-lives .sidebar::before {
    width: 224px;
    height: 238px;
    bottom: 70px;
    opacity: .19;
    mix-blend-mode: multiply;
    clip-path: polygon(0 8%, 71% 8%, 71% 0, 100% 0, 100% 89%, 82% 89%, 82% 100%, 0 100%);
}
body.background-all-lives .nav-item.active {
    border-radius: 0 !important;
    clip-path: polygon(0 0, 88% 0, 94% 16%, 100% 16%, 100% 84%, 94% 84%, 88% 100%, 0 100%);
}
body.background-all-lives .nav-item.active::after {
    content: "";
    position: absolute;
    right: 8px;
    top: 8px;
    width: 8px;
    height: 8px;
    border: 1px solid var(--atlas-collage-blue);
    box-shadow: -5px 5px 0 -2px var(--atlas-collage-cyan), -10px 10px 0 -3px var(--atlas-collage-blue);
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading) {
    overflow: visible;
    border-radius: 0 18px 0 18px !important;
    background:
        linear-gradient(90deg,rgba(248,247,241,.98) 0 51%,rgba(226,239,241,.88) 51.2% 78%,rgba(244,239,229,.94) 78.2%),
        var(--theme-paper);
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading)::before {
    right: 17px;
    bottom: 16px;
    width: 98px;
    height: 72px;
    border: 1px solid rgba(36,87,198,.7);
    background: transparent;
    box-shadow: -12px -11px 0 -10px var(--theme-paper), -12px -11px 0 -9px var(--atlas-collage-blue), 13px 12px 0 -11px var(--theme-paper), 13px 12px 0 -10px var(--atlas-collage-red);
    opacity: .52;
}
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading)::after {
    right: 94px;
    bottom: 83px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--atlas-collage-red);
    background: transparent;
    box-shadow: 18px -8px 0 -5px var(--theme-paper),18px -8px 0 -4px var(--atlas-collage-blue),31px 11px 0 -3px var(--atlas-collage-cyan);
}
body.background-all-lives :is(.hero-atmosphere,.heading-visual) {
    opacity: .56;
    mix-blend-mode: multiply;
    filter: saturate(.92) contrast(1.03);
    -webkit-mask-image: linear-gradient(90deg,transparent 0,rgba(0,0,0,.72) 18%,#000 38%);
    mask-image: linear-gradient(90deg,transparent 0,rgba(0,0,0,.72) 18%,#000 38%);
}
body.background-all-lives #view-dashboard .hero-atmosphere,
body.background-all-lives #view-schedule .heading-visual {
    width: 49%;
    background-size: 112% auto;
    background-position: 50% 1%;
}
body.background-all-lives #view-mice .heading-visual {
    width: 46%;
    background-size: 118% auto;
    background-position: 50% 100%;
}
body.background-all-lives #view-reagents .heading-visual,
body.background-all-lives #view-cells .heading-visual {
    width: 44%;
    background-size: 190% auto;
    background-position: 100% 54%;
}
body.background-all-lives #view-experiments .heading-visual,
body.background-all-lives #view-samples .heading-visual,
body.background-all-lives #view-protocols .heading-visual {
    width: 43%;
    background-size: 190% auto;
    background-position: 0 54%;
}
body.background-all-lives :is(.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel) {
    border-radius: 0 12px 0 12px !important;
}
body.background-all-lives :is(.panel,.record-card,.protocol-card,.cell-culture-card,.table-panel)::after {
    content: "";
    position: absolute;
    z-index: 1;
    right: 10px;
    top: 10px;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(36,87,198,.3);
    background: transparent;
    box-shadow: -6px 6px 0 -4px var(--theme-paper),-6px 6px 0 -3px rgba(36,87,198,.38),5px -5px 0 -4px var(--theme-paper),5px -5px 0 -3px rgba(223,102,88,.32);
    pointer-events: none;
}
body.background-all-lives :is(.project-code,.status-chip,.run-live-badge,.filter-tabs button,.calendar-modes button) { border-radius: 0 !important; }

body.dark-theme.background-all-lives {
    --theme-paper: #171d20;
    background:
        linear-gradient(90deg,rgba(134,170,255,.05) 1px,transparent 1px) 0 0/24px 24px,
        linear-gradient(rgba(134,170,255,.05) 1px,transparent 1px) 0 0/24px 24px,
        linear-gradient(106deg,transparent 0 18%,rgba(223,102,88,.1) 18.1% 23%,transparent 23.1%),
        linear-gradient(151deg,#11171a,#182228 54%,#232329);
}
body.dark-theme.background-all-lives::after,
body.dark-theme.background-all-lives .sidebar::before,
body.dark-theme.background-all-lives :is(.hero-atmosphere,.heading-visual),
body.dark-theme.background-all-lives .record-detail-hero::after {
    mix-blend-mode: screen;
    filter: invert(1) grayscale(1) brightness(1.35) contrast(1.18);
}
body.dark-theme.background-all-lives::after { opacity: .19; }
body.dark-theme.background-all-lives .sidebar::before { opacity: .2; }
body.dark-theme.background-all-lives :is(.hero-atmosphere,.heading-visual) { opacity: .33; }
body.dark-theme.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading) {
    background: linear-gradient(90deg,#171d20 0 51%,#182b31 51.2% 78%,#282321 78.2%);
}

@media (max-width:700px) {
    body.background-all-lives :is(.hero-atmosphere,.heading-visual) { width: 58% !important; opacity: .24; }
    body.background-all-lives::after { width: 390px; height: 180px; right: -110px; }
}

/* Atlas refinement 04 ¡ª one alternate theme, page-specific collage and clear controls. */
body.background-all-lives :is(.dashboard-hero,.page-heading.technical-heading) {
    overflow: hidden;
}

body.background-all-lives :is(.hero-copy,.page-heading.technical-heading > div:first-child) {
    position: relative;
    z-index: 5;
    width: min(52%, 720px);
    max-width: 52%;
}

body.background-all-lives :is(.hero-atmosphere,.heading-visual) {
    inset: 0 0 0 auto;
    z-index: 1;
    width: 46%;
    max-width: 46%;
    background-repeat: no-repeat;
    clip-path: polygon(9% 0,100% 0,100% 100%,0 100%,6% 82%,0 68%,7% 49%,0 29%);
    -webkit-mask-image: linear-gradient(90deg,transparent 0,rgba(0,0,0,.18) 7%,#000 20%);
    mask-image: linear-gradient(90deg,transparent 0,rgba(0,0,0,.18) 7%,#000 20%);
}

body.background-all-lives #view-dashboard .hero-atmosphere {
    width: 47%;
    max-width: 47%;
    background-size: 112% auto;
    background-position: 50% 0;
}
body.background-all-lives #view-experiments .heading-visual {
    width: 43%;
    max-width: 43%;
    background-size: 190% auto;
    background-position: 0 48%;
}
body.background-all-lives #view-mice .heading-visual {
    width: 45%;
    max-width: 45%;
    background-size: 116% auto;
    background-position: 50% 100%;
}
body.background-all-lives #view-reagents .heading-visual {
    width: 43%;
    max-width: 43%;
    background-size: 194% auto;
    background-position: 0 49%;
}
body.background-all-lives #view-cells .heading-visual {
    width: 45%;
    max-width: 45%;
    background-size: 184% auto;
    background-position: 100% 52%;
}
body.background-all-lives #view-samples .heading-visual {
    width: 44%;
    max-width: 44%;
    background-size: 122% auto;
    background-position: 50% 100%;
}
body.background-all-lives #view-protocols .heading-visual {
    width: 42%;
    max-width: 42%;
    background-size: 176% auto;
    background-position: 0 45%;
}
body.background-all-lives #view-schedule .heading-visual {
    width: 46%;
    max-width: 46%;
    background-size: 114% auto;
    background-position: 50% 0;
}

body.background-all-lives .page-heading.technical-heading > .button,
body.background-all-lives .page-heading.technical-heading > .heading-actions {
    position: absolute;
    z-index: 6;
    right: 28px;
    bottom: 24px;
    margin: 0;
}
body.background-all-lives .page-heading.technical-heading > .button,
body.background-all-lives .page-heading.technical-heading > .heading-actions .button {
    color: #f3f6f2;
    background: #1d2d34;
    border-color: #1d2d34;
    box-shadow: 4px 4px 0 rgba(36,87,198,.25);
}
body.background-all-lives .page-heading.technical-heading > .button:hover,
body.background-all-lives .page-heading.technical-heading > .heading-actions .button:hover {
    color: #fff;
    background: #2457c6;
    border-color: #2457c6;
}

body.background-all-lives .global-search {
    overflow: hidden;
    height: 40px;
    padding: 0 11px;
    color: var(--theme-text);
    background: rgba(248,247,241,.93) !important;
    border: 1px solid rgba(29,45,52,.38) !important;
    border-radius: 0 10px 0 10px !important;
    box-shadow: none !important;
}
body.background-all-lives .global-search input,
body.dark-theme.background-all-lives .global-search input {
    min-height: 0 !important;
    height: 100%;
    padding: 0 58px 0 10px;
    color: var(--theme-text) !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    appearance: none;
}
body.background-all-lives .global-search:focus-within {
    border-color: var(--atlas-collage-blue) !important;
    box-shadow: inset 0 -2px var(--atlas-collage-red) !important;
}
body.background-all-lives .global-search kbd {
    right: 9px;
    color: #53656c;
    background: #e6ece9;
    border-color: rgba(29,45,52,.22);
}

body.background-all-lives .topbar .language-dock {
    color: #eef3f1 !important;
    background: #1d2d34 !important;
    border: 1px solid #1d2d34 !important;
    box-shadow: none !important;
}
body.background-all-lives .topbar .language-dock button,
body.dark-theme.background-all-lives .topbar .language-dock button {
    color: #eef3f1 !important;
    background: transparent !important;
    border: 0 !important;
}
body.background-all-lives .topbar .language-dock button span,
body.dark-theme.background-all-lives .topbar .language-dock button span {
    color: #e8eeeb !important;
    background: transparent;
    opacity: .82 !important;
}
body.background-all-lives .topbar .language-dock button span.active,
body.dark-theme.background-all-lives .topbar .language-dock button span.active {
    color: #fff !important;
    background: var(--atlas-collage-blue) !important;
    opacity: 1 !important;
}
body.background-all-lives .topbar .language-dock button i {
    color: #9db0b4 !important;
    opacity: 1 !important;
}

body #backgroundToggle,
body .top-actions #backgroundToggle {
    color: #29434c !important;
    background: #e6efec !important;
    border: 1px solid rgba(41,67,76,.42) !important;
    box-shadow: none !important;
}
body #backgroundToggle .background-toggle-glyph i {
    border-color: currentColor !important;
}
body #backgroundToggle .background-toggle-glyph i:nth-child(3) {
    border-radius: 0;
}
body.dark-theme #backgroundToggle,
body.dark-theme .top-actions #backgroundToggle {
    color: #eef5f1 !important;
    background: #20342f !important;
    border-color: rgba(230,242,236,.58) !important;
}
body #backgroundToggle:hover,
body.dark-theme #backgroundToggle:hover {
    color: #fff !important;
    background: #2457c6 !important;
    border-color: #87a8ff !important;
}

body.dark-theme.background-all-lives .global-search {
    color: #e4eeea;
    background: #17231f !important;
    border-color: rgba(220,235,228,.4) !important;
}
body.dark-theme.background-all-lives .global-search kbd {
    color: #c8d5d0;
    background: #273833;
    border-color: rgba(220,235,228,.2);
}
body.dark-theme.background-all-lives .topbar .language-dock {
    background: #121d1a !important;
    border-color: rgba(220,235,228,.48) !important;
}

@media (max-width:700px) {
    body.background-all-lives :is(.hero-copy,.page-heading.technical-heading > div:first-child) {
        width: 72%;
        max-width: 72%;
    }
    body.background-all-lives .page-heading.technical-heading > .button,
    body.background-all-lives .page-heading.technical-heading > .heading-actions {
        position: absolute;
        right: 18px;
        bottom: 18px;
    }
    body.background-all-lives :is(.hero-atmosphere,.heading-visual) {
        width: 58% !important;
        max-width: 58% !important;
        opacity: .2;
    }
}

/* Atlas refinement 06 ¡ª rich page-specific xerox collage library. */
body.background-all-lives :is(.hero-atmosphere,.heading-visual) {
    background-repeat: no-repeat !important;
    background-color: transparent;
}

body.background-all-lives #view-experiments .page-heading { --page-collage-accent: #df6658; }
body.background-all-lives #view-mice .page-heading { --page-collage-accent: #1d2d34; }
body.background-all-lives #view-reagents .page-heading { --page-collage-accent: #df6658; }
body.background-all-lives #view-cells .page-heading { --page-collage-accent: #2457c6; }
body.background-all-lives #view-samples .page-heading { --page-collage-accent: #75bfc9; }
body.background-all-lives #view-protocols .page-heading { --page-collage-accent: #2457c6; }
body.background-all-lives #view-schedule .page-heading { --page-collage-accent: #df6658; }

body.background-all-lives #view-dashboard .hero-atmosphere {
    --page-collage-accent: #2457c6;
    background-image: url("../images/theme-atlas/all-lives-collage-fragments-v2.png") !important;
    background-size: 112% auto !important;
    background-position: 50% 0 !important;
}
body.background-all-lives #view-experiments .heading-visual {
    --page-collage-accent: #df6658;
    background-image: url("../images/theme-atlas/all-lives-collage-fragments-v2.png") !important;
    background-size: 190% auto !important;
    background-position: 0 48% !important;
}
body.background-all-lives #view-mice .heading-visual {
    --page-collage-accent: #1d2d34;
    background-image: url("../images/theme-atlas/all-lives-collage-fragments-v2.png") !important;
    background-size: 116% auto !important;
    background-position: 50% 100% !important;
}
body.background-all-lives #view-cells .heading-visual {
    --page-collage-accent: #2457c6;
    background-image: url("../images/theme-atlas/all-lives-cells-t25-collage-v2.png") !important;
    background-size: auto 210% !important;
    background-position: 66% 51% !important;
}
body.background-all-lives #view-reagents .heading-visual {
    --page-collage-accent: #df6658;
    background-image: url("../images/theme-atlas/all-lives-cells-collage-v1.png") !important;
    background-size: auto 220% !important;
    background-position: 64% 52% !important;
}
body.background-all-lives #view-samples .heading-visual {
    --page-collage-accent: #75bfc9;
    background-image: url("../images/theme-atlas/all-lives-frozen-collage-v1.png") !important;
    background-size: auto 188% !important;
    background-position: 54% 50% !important;
}
body.background-all-lives #view-protocols .heading-visual {
    --page-collage-accent: #2457c6;
    background-image: url("../images/theme-atlas/all-lives-protocols-collage-v1.png") !important;
    background-size: auto 184% !important;
    background-position: 52% 50% !important;
}
body.background-all-lives #view-schedule .heading-visual {
    --page-collage-accent: #df6658;
    background-image: url("../images/theme-atlas/all-lives-schedule-collage-v1.png") !important;
    background-size: auto 184% !important;
    background-position: 52% 50% !important;
}

body.background-all-lives .page-heading.technical-heading::before {
    border-color: var(--page-collage-accent, var(--atlas-collage-blue));
}
body.background-all-lives .page-heading.technical-heading::after {
    border-color: var(--page-collage-accent, var(--atlas-collage-red));
}

body.dark-theme.background-all-lives :is(.hero-atmosphere,.heading-visual) {
    background-color: transparent;
    mix-blend-mode: screen;
    filter: invert(1) grayscale(1) brightness(1.32) contrast(1.16);
    opacity: .34;
}

@media (max-width:700px) {
    body.background-all-lives #view-cells .heading-visual,
    body.background-all-lives #view-reagents .heading-visual,
    body.background-all-lives #view-samples .heading-visual,
    body.background-all-lives #view-protocols .heading-visual,
    body.background-all-lives #view-schedule .heading-visual {
        background-size: auto 160% !important;
        background-position: 58% 50% !important;
    }
}
