/* Shared semantic colors for the iridescent theme. */
[data-theme="iridescent"] {
    color-scheme: light;
    --prism-paper: #fdfdfe;
    --prism-surface: #fff;
    --prism-ink: #1d2338;
    --prism-muted: #434e66;
    --prism-blue-ink: #355775;
    --prism-aqua-ink: #3c6465;
    --prism-rose-ink: #75566b;
    --prism-lilac-ink: #604e83;
    --prism-accent: var(--prism-blue-ink);
    --prism-line: #dfe3ec;
    --prism-hover: #f0f3f8;
    --prism-selected: #e9eef6;
    --prism-focus: #405d8e;
    --prism-blue: #e9eff8;
    --prism-aqua: #e9f1f1;
    --prism-rose: #f3edf2;
    --prism-lilac: #eeebf7;
    --prism-brand: linear-gradient(116deg, #487b81 8%, #5075ad 36%, #675591 71%, #886079 94%);
    --prism-primary: #293a5b;
    --prism-edge: linear-gradient(116deg, #dce7ee, #cbd6ec 35%, #d6cce8 67%, #e7dbe5);
    --prism-wash: radial-gradient(ellipse at 10% 76%, #e7eef6, transparent 55%), radial-gradient(ellipse at 87% 10%, #ebe8f5, transparent 58%), var(--prism-paper);
    --prism-shadow: 0 14px 40px rgb(43 55 88 / 0.065);
}

[data-theme="iridescent"] .brand-mark {
    --mark-gradient: var(--prism-brand);
}
[data-theme="iridescent"] :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--prism-focus);
    outline-offset: 3px;
}

[data-theme="iridescent"] .site-nav a {
    padding-inline: 8px;
    border-radius: 8px;
    color: var(--prism-ink);
}
[data-theme="iridescent"] .site-nav a:hover {
    background: var(--prism-hover);
}
[data-theme="iridescent"] .site-nav a[aria-current="page"] {
    background: var(--prism-selected);
    color: var(--prism-ink);
}
[data-theme="iridescent"] :is(.topbar, .catalog-header) .topbar-register {
    background: var(--prism-selected);
    color: var(--prism-ink);
}
[data-theme="iridescent"] :is(.topbar, .catalog-header) .topbar-register:hover {
    background: #dfe7f3;
}
[data-theme="iridescent"] :is(.topbar, .catalog-header) .topbar-login:hover {
    background: var(--prism-hover);
    color: var(--prism-accent);
}

/* The home page carries the same surfaces through the full scroll. */
[data-theme="iridescent"][data-atlas] {
    --header-bg: var(--prism-paper);
    --ink: var(--prism-ink);
    --text: var(--prism-ink);
    --muted: var(--prism-muted);
    --hairline: var(--prism-line);
    --accent: var(--prism-accent);
}
[data-theme="iridescent"][data-atlas] .topbar,
[data-theme="iridescent"][data-atlas] body[data-reading] .topbar {
    background: var(--prism-paper);
    border-color: var(--prism-line);
}
[data-theme="iridescent"] .cover-copy h1 {
    color: var(--prism-ink);
}
[data-theme="iridescent"] .cover-copy h1 span + span {
    color: #554493;
}
@supports (background-clip: text) {
    @media (forced-colors: none) {
        [data-theme="iridescent"] .cover-copy h1 span + span {
            color: transparent;
            background-image: linear-gradient(111deg, #335b8d 3%, #4c4797 32%, #79447b 61%, #45568f 94%);
            background-size: 148% 100%;
            background-position: 24% center;
            background-clip: text;
        }
        @media (prefers-reduced-motion: no-preference) {
            [data-theme="iridescent"] .cover-copy h1 span + span {
                animation:
                    cover-arrival 760ms 150ms cubic-bezier(0.19, 0.8, 0.26, 1) both,
                    cover-prism 16s ease-in-out infinite alternate;
            }
        }
    }
}
@keyframes cover-prism {
    from {
        background-position: 0% center;
    }
    to {
        background-position: 86% center;
    }
}
[data-theme="iridescent"] .graph-inspector {
    border: 1px solid transparent;
    background:
        linear-gradient(118deg, #fff 24%, #f5f7fc 70%, #f7f5fb) padding-box,
        var(--prism-edge) border-box;
    box-shadow: var(--prism-shadow);
}
[data-theme="iridescent"] :is(.graph-related button, .constellation-star) {
    border-color: var(--prism-line);
    color: var(--prism-ink);
}
[data-theme="iridescent"] :is(.cover-action, .chapter-action-primary, .catalog-button) {
    background: var(--prism-primary);
    color: white;
}
[data-theme="iridescent"] :is(.cover-action, .chapter-action-primary, .catalog-button):hover {
    background: #36496c;
    box-shadow: 0 6px 16px #293a5b28;
}
[data-theme="iridescent"] .cover-action,
[data-theme="iridescent"] .cover-action:hover {
    background: linear-gradient(114deg, #314c86, #55428a 62%, #744275);
}
[data-theme="iridescent"] :is(.chapter-action:not(.chapter-action-primary), .graph-topic a, .gateway-modes a, .api-step a, .api-visual-links a) {
    background: var(--prism-hover);
    border-color: transparent;
    color: var(--prism-ink);
}
[data-theme="iridescent"] :is(.chapter-action:not(.chapter-action-primary), .graph-topic a, .gateway-modes a, .api-step a, .api-visual-links a):hover {
    background: var(--role-tint, var(--prism-selected));
    color: var(--role-ink, var(--prism-accent));
}
[data-theme="iridescent"] :is([data-tone="wanxiang"], .gateway-modes li:first-child, .api-step:nth-child(3), .workspace-capabilities > div:nth-child(2)) {
    --role-ink: var(--prism-blue-ink);
    --role-tint: var(--prism-blue);
}
[data-theme="iridescent"] :is([data-tone="workspace"], .gateway-modes li:nth-child(2), .api-step:nth-child(2), .workspace-capabilities > div:first-child) {
    --role-ink: var(--prism-aqua-ink);
    --role-tint: var(--prism-aqua);
}
[data-theme="iridescent"] :is([data-tone="ecosystem"], .api-visual-links a:first-child, .workspace-capabilities > div:nth-child(3)) {
    --role-ink: var(--prism-lilac-ink);
    --role-tint: var(--prism-lilac);
}
[data-theme="iridescent"] :is([data-tone="project"], .gateway-modes li:nth-child(3), .api-step:first-child, .api-visual-links a:nth-child(2), .workspace-capabilities > div:nth-child(4)) {
    --role-ink: var(--prism-rose-ink);
    --role-tint: var(--prism-rose);
}
[data-theme="iridescent"] .chapter-nav a:is(:hover, [aria-current], [data-emitting]) {
    background: var(--role-tint, var(--prism-hover));
    color: var(--role-ink, var(--prism-accent));
}
[data-theme="iridescent"] .chapter-nav a[data-emitting]::after {
    background: var(--role-ink);
    box-shadow: 0 0 10px 3px var(--role-tint);
}
[data-theme="iridescent"] .graph-controls button {
    border-color: color-mix(in srgb, var(--role-ink) calc(13% + var(--node-emphasis) * 0.25), white);
    color: color-mix(in srgb, var(--role-ink) var(--node-emphasis), var(--prism-ink));
    background: color-mix(in srgb, var(--role-tint) var(--node-emphasis), #fffefe);
    box-shadow:
        0 2px 7px #25365314,
        0 0 0 calc(var(--node-light, 0) * 4px) color-mix(in srgb, var(--role-ink) 12%, transparent);
}
[data-theme="iridescent"] .graph-controls button[data-hub] {
    border-color: color-mix(in srgb, var(--role-ink) calc(24% + var(--node-emphasis) * 0.22), white);
    background: color-mix(in srgb, var(--role-tint) calc(36% + var(--node-emphasis) * 0.64), #fffefe);
}
[data-theme="iridescent"] .graph-related button {
    background: #ffffffda;
}
[data-theme="iridescent"] .graph-related button:hover,
[data-theme="iridescent"] .constellation-center {
    background: var(--role-tint);
    color: var(--role-ink);
}
[data-theme="iridescent"] .constellation-center {
    border-color: color-mix(in srgb, var(--role-ink) 29%, white);
    box-shadow:
        0 0 0 4px var(--role-tint),
        0 0 16px var(--role-tint);
}
[data-theme="iridescent"] .chapter-constellation::before {
    background: radial-gradient(ellipse at 46% 52%, var(--role-tint), transparent 64%);
}
[data-theme="iridescent"] .chapter-constellation i {
    background: linear-gradient(90deg, color-mix(in srgb, var(--role-ink) 44%, transparent), var(--role-tint));
}
[data-theme="iridescent"] .chapter-constellation i::after {
    box-shadow: 0 0 7px 2px var(--role-ink);
}
[data-theme="iridescent"] .gateway {
    border: 1px solid transparent;
    background:
        var(--prism-wash) padding-box,
        var(--prism-edge) border-box;
    box-shadow: var(--prism-shadow);
}
[data-theme="iridescent"] .gateway-modes li {
    background: #fffffff2;
    border-color: var(--prism-line);
}
[data-theme="iridescent"] :is(.gateway-branch h3, .api-step-category, .workspace-capabilities dt) {
    color: var(--role-ink);
}
[data-theme="iridescent"] .gateway-core {
    border-color: #cbd2f0;
    background: radial-gradient(ellipse at 30% 10%, var(--prism-blue), transparent 65%), #fff;
    box-shadow:
        0 0 0 8px #a9b0eb36,
        0 0 0 16px #d8bde529;
}
[data-theme="iridescent"] .api-journey {
    background: var(--prism-paper);
}
[data-theme="iridescent"] .api-step {
    background: #fff;
}
[data-theme="iridescent"] .api-step::before {
    background: linear-gradient(90deg, transparent, var(--role-ink), transparent);
}
[data-theme="iridescent"] .api-visual-route {
    background: linear-gradient(95deg, transparent 40%, #eef3ffb5, transparent);
}
[data-theme="iridescent"] .chapter-kicker {
    color: var(--role-ink, var(--prism-blue-ink));
}
[data-theme="iridescent"] .workspace-section {
    background: radial-gradient(ellipse at 88% 56%, #eff2f88c, transparent 63%);
}
[data-theme="iridescent"] .workspace-art {
    border: 1px solid transparent;
    border-radius: 15px;
    background:
        linear-gradient(120deg, #fff, #f8f3fc) padding-box,
        var(--prism-edge) border-box;
    box-shadow: var(--prism-shadow);
}
[data-theme="iridescent"] .workspace-art img {
    aspect-ratio: 16 / 10;
    object-position: center;
}
[data-theme="iridescent"] .workspace-art::after {
    bottom: 39px;
}
[data-theme="iridescent"] .workspace-capabilities > div {
    border-top-color: var(--prism-line);
    padding-inline: 12px;
}
[data-theme="iridescent"] :is(.ecosystem-index, .asset-shelf > div, .scenario, .rule-sheet, .brief-sheet, .workflow-sheet) {
    border-color: var(--prism-line);
    background: #ffffffef;
}
[data-theme="iridescent"] .ecosystem-index strong {
    color: var(--prism-ink);
}
[data-theme="iridescent"] .ecosystem-index span {
    color: var(--prism-muted);
}
[data-theme="iridescent"] .ecosystem-index a:hover {
    background: var(--prism-hover);
}
[data-theme="iridescent"] .method-row:nth-child(n) {
    border-color: var(--prism-line);
    background: linear-gradient(153deg, #fff 55%, #f4f6fa);
}
[data-theme="iridescent"] .canvas-board {
    border-color: var(--prism-line);
    background:
        radial-gradient(#a5afe062 1px, transparent 1px) 0 0 / 14px 14px,
        linear-gradient(120deg, #f7f9fc, #eef2f9);
}
[data-theme="iridescent"] :is(.canvas-board a, .scenario a, .asset-shelf span) {
    border-color: var(--prism-line);
}
[data-theme="iridescent"] :is(.canvas-board a, .scenario a):hover {
    background: var(--prism-selected);
    border-color: #bfb3de;
}
[data-theme="iridescent"] .study-footer {
    border-top: 1px solid var(--prism-line);
    background: var(--prism-wash);
    color: var(--prism-muted);
}

/* Companion pages use the same brand and status colors. */
[data-theme="iridescent"] :is(.catalog-page, .catalog-header),
[data-theme="iridescent"].catalog-community {
    --site-paper: var(--prism-paper);
    --site-ink: var(--prism-ink);
    --site-muted: var(--prism-muted);
    --site-purple: var(--prism-accent);
    --site-wash: var(--prism-hover);
    --site-line: var(--prism-line);
}
[data-theme="iridescent"] .catalog-header {
    background: var(--prism-paper);
    border-color: var(--prism-line);
}
[data-theme="iridescent"] .catalog-header-inner {
    width: min(83.8vw, 1500px);
    min-height: 63px;
}
[data-theme="iridescent"] .catalog-header .catalog-brand {
    font-size: 17px;
}
[data-theme="iridescent"] .catalog-brand .brand-mark {
    --mark-size: 24px;
}
.catalog-header .topbar-account {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 8px;
}
.catalog-header .topbar-account a {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 650;
    white-space: nowrap;
}
[data-theme="iridescent"] .catalog-page {
    background: var(--prism-wash);
}
[data-theme="iridescent"] .download-feature {
    border: 1px solid transparent;
    background:
        linear-gradient(133deg, #fff 22%, #f1f5fb 69%, #f5f1f8) padding-box,
        var(--prism-edge) border-box;
    box-shadow: var(--prism-shadow);
}
[data-theme="iridescent"] .download-feature img {
    box-shadow: 0 8px 30px #455b891d;
}
[data-theme="iridescent"] .download-status {
    border-color: var(--prism-line);
}
[data-theme="iridescent"].catalog-community {
    --bg: var(--prism-paper);
    --nav: #f5f7fb;
    --canvas: #fdfdfe;
    --soft: var(--prism-hover);
    --ink: var(--prism-ink);
    --sub: var(--prism-muted);
    --line: var(--prism-line);
    --accent: var(--prism-accent);
    --tint: var(--prism-selected);
    --paper: var(--prism-surface);
}
[data-theme="iridescent"].catalog-community .discovery-head {
    background: var(--prism-wash);
}
[data-theme="iridescent"].catalog-community :is(.preview, .card-art):is(.workflow, .agent) {
    background: color-mix(in srgb, var(--prism-lilac), white 54%);
    color: var(--prism-lilac-ink);
}
[data-theme="iridescent"].catalog-community :is(.preview, .card-art):is(.template, .tutorial) {
    background: color-mix(in srgb, var(--prism-rose), white 54%);
    color: var(--prism-rose-ink);
}
[data-theme="iridescent"].catalog-community :is(.preview, .card-art):is(.panel, .knowledge) {
    background: color-mix(in srgb, var(--prism-aqua), white 54%);
    color: var(--prism-aqua-ink);
}
[data-theme="iridescent"].catalog-community :is(.preview, .card-art):is(.skill, .data) {
    background: color-mix(in srgb, var(--prism-blue), white 54%);
    color: var(--prism-blue-ink);
}

@media (max-width: 660px) {
    [data-theme="iridescent"] .catalog-header-inner {
        width: calc(100% - 24px);
        min-height: 54px;
        gap: 4px;
    }
    .catalog-header .topbar-account {
        gap: 3px;
    }
    .catalog-header .topbar-account a {
        padding: 7px;
        font-size: 12px;
    }
}
