/* Custom stylesheet for imednet documentation */

/* Keyboard focus visibility, sticky-header scroll offsets (WCAG 2.4.11 C43) & reduced motion */
html {
    scroll-padding-top: 3.5rem;
}

@media (max-width: 63em) {
    html {
        scroll-padding-top: 6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html,
    .sidebar-scroll,
    .toc-scroll {
        scroll-behavior: auto;
    }
}

#furo-main-content:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

article h1:focus-visible,
article h2:focus-visible,
article h3:focus-visible,
article h4:focus-visible,
article h5:focus-visible,
article h6:focus-visible,
article dt:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Typography & readability enhancements */
body {
    letter-spacing: -0.01em;
}

article {
    line-height: 1.65;
}

article h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 1.5rem;
    margin-bottom: 1.25rem;
}

article h2 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--color-background-border);
}

article h3 {
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

article p {
    margin-bottom: 1.15rem;
}

/* Sidebar branding adjustments */
.sidebar-brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-logo {
    max-height: 64px;
    width: auto;
    object-fit: contain;
}

/* Code blocks margins & padding */
div.highlight {
    margin: 1.25rem 0;
    border-radius: 6px;
}

div.highlight pre:focus-visible,
pre:focus-visible,
.table-wrapper:focus-visible,
.explorer-table-wrapper:focus-visible,
a.headerlink:focus-visible,
.viewcode-source-link:focus-visible,
a.viewcode-back:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

a.reference:has(> .viewcode-link):focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

/* Keyboard-reachable permalinks (WCAG 2.1.1 G202, 2.4.7 C15), 24x24px targets (2.5.8 C42), & [source] badges (G195) */
a.headerlink,
.code-block-caption > .headerlink,
dl dt > .headerlink,
figcaption p > .headerlink,
h1 > .headerlink,
h2 > .headerlink,
h3 > .headerlink,
h4 > .headerlink,
h5 > .headerlink,
h6 > .headerlink,
p.caption > .headerlink,
table > caption > .headerlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    text-indent: 0;
    visibility: visible;
    opacity: 0;
    border-radius: 2px;
}

a.headerlink:hover,
a.headerlink:focus,
a.headerlink:focus-visible,
.code-block-caption:hover > .headerlink,
.code-block-caption:focus-within > .headerlink,
dl dt:hover > .headerlink,
dl dt:focus-within > .headerlink,
figcaption p:hover > .headerlink,
figcaption p:focus-within > .headerlink,
figure:hover > figcaption > p > .headerlink,
figure:focus-within > figcaption > p > .headerlink,
h1:hover > .headerlink,
h1:focus-within > .headerlink,
h2:hover > .headerlink,
h2:focus-within > .headerlink,
h3:hover > .headerlink,
h3:focus-within > .headerlink,
h4:hover > .headerlink,
h4:focus-within > .headerlink,
h5:hover > .headerlink,
h5:focus-within > .headerlink,
h6:hover > .headerlink,
h6:focus-within > .headerlink,
p.caption:hover > .headerlink,
p.caption:focus-within > .headerlink,
table:hover > caption > .headerlink,
table > caption:hover > .headerlink,
table > caption:focus-within > .headerlink {
    visibility: visible;
    opacity: 1;
}

div.math .headerlink,
div.math:focus .headerlink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    text-indent: 0;
    visibility: visible;
    opacity: 0;
    border-radius: 2px;
}

div.math:hover .headerlink,
div.math:focus-within .headerlink {
    display: inline-flex;
    visibility: visible;
    opacity: 1;
}

.viewcode-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    float: right;
    margin-left: 0.5rem;
    text-align: right;
    text-indent: 0;
    font-weight: 400;
    border-radius: 2px;
}

a.reference:has(> .viewcode-link) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    float: right;
    margin-left: 0.5rem;
    text-align: right;
    text-indent: 0;
    font-weight: 400;
    border-radius: 2px;
}

.viewcode-source-link > .viewcode-link,
.sig:not(.sig-inline) a.reference.viewcode-source-link .viewcode-link {
    float: none;
    width: auto;
}

a.reference:has(> .viewcode-link) > .viewcode-link,
.sig:not(.sig-inline) a.reference:has(> .viewcode-link) .viewcode-link {
    float: none;
    width: auto;
}

a.viewcode-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    text-indent: 0;
    border-radius: 2px;
}

/* Keyboard-accessible Furo sidebar submenu switches & responsive drawer guards */
.sidebar-tree .toctree-checkbox,
input.toctree-checkbox {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: var(--sidebar-expander-width, 32px);
    height: var(--sidebar-item-height, 32px);
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1;
}

.sidebar-tree .toctree-checkbox:hover ~ label {
    background: var(--color-sidebar-item-expander-background--hover);
}

button.nav-overlay-icon,
button.toc-overlay-icon,
button.toc-header-icon,
button.toc-content-icon {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    line-height: inherit;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem 0.5rem 1rem;
    border-bottom: 1px solid var(--color-sidebar-background-border, var(--color-background-border));
    flex-shrink: 0;
}

.drawer-header[hidden],
button.drawer-close-btn[hidden] {
    display: none !important;
}

.drawer-header-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-foreground-secondary);
    -webkit-user-select: none;
    user-select: none;
}

button.drawer-close-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--color-foreground-secondary);
    font-family: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

button.drawer-close-btn:hover {
    background-color: var(--color-background-hover);
    color: var(--color-foreground-primary);
}

@media (max-width: 82em) {
    .toc-drawer {
        transition: right 0.25s ease-in-out, visibility 0s linear 0s;
    }

    .toc-drawer .toc-title-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding-right: 0.5rem;
    }

    #__toc:not(:checked) ~ .page .toc-drawer {
        visibility: hidden;
        transition: right 0.25s ease-in-out, visibility 0s linear 0.25s;
    }

    #__toc:checked ~ .page .toc-drawer {
        visibility: visible;
    }
}

@media (max-width: 63em) {
    .mobile-header .header-left button.nav-overlay-icon,
    .mobile-header .header-right button.toc-header-icon {
        height: 100%;
        width: 100%;
        -webkit-user-select: none;
        user-select: none;
    }

    .sidebar-drawer {
        transition: left 0.25s ease-in-out, visibility 0s linear 0s;
    }

    #__navigation:not(:checked) ~ .page .sidebar-drawer {
        visibility: hidden;
        transition: left 0.25s ease-in-out, visibility 0s linear 0.25s;
    }

    #__navigation:checked ~ .page .sidebar-drawer {
        visibility: visible;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-drawer,
    .toc-drawer,
    #__navigation:not(:checked) ~ .page .sidebar-drawer,
    #__toc:not(:checked) ~ .page .toc-drawer,
    .role-card,
    .role-card:hover,
    .role-card-launch-btn,
    .showcase-persona-tab,
    .mode-pill-btn,
    .explorer-run-btn,
    .explorer-run-btn:hover,
    .explorer-snippet-copy-btn,
    .explorer-output-tab,
    .explorer-copy-btn,
    .thebelab-button,
    .thebe-launch-button {
        transition: none !important;
        transform: none !important;
    }
}

table.domainindex-table td:first-child {
    width: 28px;
    min-width: 28px;
    white-space: nowrap;
}

img.toggler {
    display: inline-block;
    box-sizing: content-box;
    width: 11px;
    height: 11px;
    min-width: 11px;
    min-height: 11px;
    max-width: none;
    padding: 7px;
    border-radius: 4px;
    vertical-align: middle;
    cursor: pointer;
}

body[data-theme="dark"] img.toggler {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) img.toggler {
        filter: invert(1);
    }
}

/* Admonition margins */
.admonition {
    margin: 1.5rem 0;
    border-radius: 6px;
}

/* Content spacing */
.content-icon-container {
    margin-bottom: 0.5rem;
}

/* Role-based landing portal grid and pathway cards */
.role-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem 0;
}

.role-card {
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    position: relative;
}

.role-card:hover {
    border-color: var(--color-brand-primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

body[data-theme="dark"] .role-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--color-background-border);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .role-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--color-background-border);
    }
}

body[data-theme="dark"] .role-card:hover {
    border-color: var(--color-brand-primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--color-brand-primary);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .role-card:hover {
        border-color: var(--color-brand-primary);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--color-brand-primary);
    }
}

.role-card .role-card-title,
.role-card p.rubric {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-brand-primary);
    margin-top: 0;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.role-card p {
    font-size: 0.95rem;
    color: var(--color-foreground-secondary);
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.role-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background-color: var(--color-brand-primary);
    color: var(--color-background-primary, #ffffff);
    margin-bottom: 0.75rem;
    width: fit-content;
}

.role-card-action {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.role-card-launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-brand-primary);
    background-color: var(--color-background-primary);
    border: 1px solid var(--color-brand-primary);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.role-card-launch-btn:hover,
.role-card-launch-btn:focus-visible {
    background-color: var(--color-brand-primary);
    color: var(--color-brand-btn-text, var(--color-brand-button-text, #ffffff));
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.role-card ul {
    margin-top: auto;
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.role-card ul li {
    margin-bottom: 0.4rem;
    font-size: 0.925rem;
}

.role-card ul li a {
    font-weight: 500;
    text-decoration: none;
}

.role-card ul li a:hover {
    text-decoration: underline;
}

/* Interactive Pyodide Cells & Output Styles */
.thebelab-button {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--color-background-border, #d0d7de);
    background-color: var(--color-background-primary, #ffffff);
    color: var(--color-foreground-primary, #24292f);
}

.thebelab-button:focus-visible {
    outline: 2px solid var(--color-brand-primary, #005fb8);
    outline-offset: 2px;
}

.thebe-launch-button,
.thebelab-button.thebe-launch-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-brand-btn-text, #ffffff);
    background-color: var(--color-brand-primary, #005fb8);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    margin: 1rem 0;
}

.thebe-launch-button span.launch_msg,
.thebe-launch-button span.status {
    color: inherit;
}

.thebe-launch-button:hover:not(:disabled),
.thebelab-button.thebe-launch-button:hover:not(:disabled) {
    background-color: var(--color-brand-primary-hover, #004c94);
    color: var(--color-brand-btn-text, #ffffff);
}

.thebe-launch-button:focus-visible,
.thebelab-button.thebe-launch-button:focus-visible {
    outline: 2px solid var(--color-brand-primary, #005fb8);
    outline-offset: 2px;
}

.thebe-launch-button.thebe-status-ready,
.thebelab-button.thebe-launch-button.thebe-status-ready,
.thebe-launch-button.thebe-status-ready:hover:not(:disabled),
.thebelab-button.thebe-launch-button.thebe-status-ready:hover:not(:disabled) {
    background-color: var(--color-status-success, #065f46);
    color: var(--color-brand-btn-text, #ffffff);
}

.thebe-launch-button.thebe-status-failed,
.thebelab-button.thebe-launch-button.thebe-status-failed,
.thebe-launch-button.thebe-status-failed:hover:not(:disabled),
.thebelab-button.thebe-launch-button.thebe-status-failed:hover:not(:disabled) {
    background-color: var(--color-status-danger, #b91c1c);
    color: var(--color-brand-btn-text, #ffffff);
}

.thebelab-cell,
div.thebelab-cell,
div[class^="highlight-"].thebelab-cell,
div[class*=" highlight-"].thebelab-cell {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-background-border, #e1e4e8);
    border-radius: 8px;
    background-color: var(--color-background-secondary, #f6f8fa);
    padding: 0.75rem;
    margin: 1.25rem 0;
}

.thebelab-cell > .highlight {
    display: none;
}

.thebelab-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.thebe-editor {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-stack--monospace, ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace);
    font-size: 0.875rem;
    line-height: 1.45;
    background-color: var(--color-code-background, #ffffff);
    color: var(--color-code-foreground, #24292f);
    border: 1px solid var(--color-background-border, #d0d7de);
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
    resize: vertical;
}

.thebe-editor:focus {
    border-color: var(--color-brand-primary, #005fb8);
    box-shadow: 0 0 0 2px rgba(0, 95, 184, 0.2);
}

.thebe-editor:focus-visible {
    outline: 2px solid var(--color-brand-primary, #005fb8);
    outline-offset: 2px;
}

.thebelab-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.thebelab-run-button,
.thebelab-button.thebelab-run-button {
    background-color: var(--color-brand-primary, #005fb8);
    color: var(--color-brand-btn-text, #ffffff);
    border-color: transparent;
}

.thebelab-run-button:hover:not(:disabled),
.thebelab-button.thebelab-run-button:hover:not(:disabled) {
    background-color: var(--color-brand-primary-hover, #004c94);
    color: var(--color-brand-btn-text, #ffffff);
}

.thebelab-run-button:disabled,
.thebelab-button.thebelab-run-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.thebelab-run-button[data-runtime-status="loading"]:disabled,
.thebelab-button.thebelab-run-button[data-runtime-status="loading"]:disabled {
    cursor: wait;
}

.thebelab-clear-button:hover,
.thebelab-button.thebelab-clear-button:hover:not(:disabled),
.thebelab-reset-button:hover,
.thebelab-button.thebelab-reset-button:hover:not(:disabled),
.thebelab-copy-button:hover,
.thebelab-button.thebelab-copy-button:hover:not(:disabled) {
    background-color: var(--color-background-hover, var(--color-background-secondary, #f6f8fa));
    color: var(--color-foreground-primary, #24292f);
}

.thebelab-cell-status {
    margin-left: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    color: var(--color-foreground-muted, #57606a);
    font-style: italic;
}

.thebelab-output {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.75rem;
    border-top: 1px solid var(--color-background-border, #e1e4e8);
    padding-top: 0.5rem;
}

.thebelab-output:has(.thebe-output-area:empty) {
    display: none;
}

.thebe-output-area pre {
    margin: 0.35rem 0;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.thebe-log {
    background-color: var(--color-code-background, #f6f8fa);
    color: var(--color-foreground-secondary, #57606a);
    border-left: 3px solid var(--color-foreground-muted, #64748b);
}

.thebe-stdout {
    background-color: var(--color-code-background, #f6f8fa);
    color: var(--color-code-foreground, #24292f);
    border-left: 3px solid var(--color-status-success, #2da44e);
}

.thebe-stderr {
    background-color: rgba(207, 34, 46, 0.08);
    color: var(--color-status-danger, #b91c1c);
    border-left: 3px solid var(--color-status-danger, #b91c1c);
}

.thebe-result {
    background-color: var(--color-code-background, #f6f8fa);
    color: var(--color-brand-primary, #005fb8);
    font-weight: 500;
    border-left: 3px solid var(--color-brand-primary, #005fb8);
}

.thebe-no-output {
    font-size: 0.8125rem;
    color: var(--color-foreground-muted, #57606a);
    font-style: italic;
    padding: 0.25rem 0.5rem;
}

/* =========================================================================
   Interactive Showcase & Embedded Live Explorer Styles
   ========================================================================= */

.interactive-showcase-container {
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    margin: 2.25rem 0 2.5rem 0;
    overflow: hidden;
}

.showcase-header {
    background-color: var(--color-background-primary);
    border-bottom: 1px solid var(--color-background-border);
    padding: 1.25rem 1.5rem 0 1.5rem;
}

.showcase-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.showcase-header-text h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-foreground-primary);
}

.showcase-header-text p {
    margin: 0;
    font-size: 0.925rem;
    color: var(--color-foreground-secondary);
}

.showcase-client-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.775rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--color-status-success, var(--color-badge-success, #065f46));
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Persona switcher tabs */
.showcase-persona-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: none;
    margin-bottom: -1px;
}

.showcase-persona-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 1.15rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
    cursor: pointer;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.showcase-persona-tab:hover {
    color: var(--color-brand-primary);
    background-color: var(--color-background-secondary);
}

.showcase-persona-tab.active,
.showcase-persona-tab[aria-selected="true"] {
    color: var(--color-brand-primary);
    background-color: var(--color-background-secondary);
    border-color: var(--color-background-border) var(--color-background-border) transparent var(--color-background-border);
    border-bottom: 2px solid var(--color-brand-primary);
}

.showcase-persona-tab:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: -2px;
}

/* Tab Panels */
.showcase-panel {
    display: none;
    padding: 1.5rem;
}

.showcase-panel.active,
.showcase-panel:not([hidden]) {
    display: block;
}

/* Toolbar controls */
.explorer-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-background-border);
}

.explorer-controls-left,
.explorer-controls-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.explorer-control-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.explorer-control-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
}

.explorer-select {
    appearance: none;
    background-color: var(--color-background-primary);
    color: var(--color-foreground-primary);
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2328' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 1em;
}

body[data-theme="dark"] .explorer-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6edf3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .explorer-select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6edf3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }
}

.explorer-select:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

/* Mode pill switch */
.mode-segmented-toggle {
    display: inline-flex;
    background-color: var(--color-background-primary);
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    padding: 2px;
}

.mode-pill-btn {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0.35rem 0.75rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-pill-btn.active,
.mode-pill-btn[aria-pressed="true"] {
    background-color: var(--color-brand-primary);
    color: var(--color-brand-btn-text, var(--color-brand-button-text, #ffffff));
}

.mode-pill-btn:focus-visible {
    outline: 2px solid var(--color-brand-primary);
}

/* Action button */
.explorer-run-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--color-brand-primary);
    color: var(--color-brand-btn-text, var(--color-brand-button-text, #ffffff));
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.5rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.explorer-run-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.explorer-run-btn:active {
    transform: translateY(0);
}

.explorer-run-btn:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

/* Read-only code viewer */
.explorer-editor-box {
    margin-bottom: 1.25rem;
}

.explorer-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--color-background-primary);
    border: 1px solid var(--color-background-border);
    border-bottom: none;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
}

.explorer-snippet-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 7.5rem;
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 4px;
    padding: 0.25rem 0.65rem;
    font-size: 0.775rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    color: var(--color-foreground-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.explorer-snippet-copy-btn:hover {
    color: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

.explorer-snippet-copy-btn:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.explorer-code-pre {
    margin: 0;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: var(--color-background-primary);
    color: var(--color-foreground-primary);
    border: 1px solid var(--color-background-border);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.explorer-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.85rem 1rem;
    background-color: var(--color-background-primary);
    color: var(--color-foreground-primary);
    border: 1px solid var(--color-background-border);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    resize: vertical;
    min-height: 110px;
}

.explorer-textarea:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

/* Execution metric bar */
.explorer-metric-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.explorer-metric-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-status-success, var(--color-badge-success, #065f46));
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 4px;
    padding: 0.25rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.explorer-metric-badge.explorer-metric-badge--danger {
    color: var(--color-status-danger, var(--color-badge-danger, #b91c1c));
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}

body[data-theme="dark"] .explorer-metric-badge.explorer-metric-badge--danger {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.4);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .explorer-metric-badge.explorer-metric-badge--danger {
        background-color: rgba(239, 68, 68, 0.12);
        border-color: rgba(248, 113, 113, 0.4);
    }
}

/* Output view tabs */
.explorer-output-tabs {
    display: flex;
    gap: 0.35rem;
    background-color: var(--color-background-primary);
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    padding: 2px;
}

.explorer-output-tab {
    appearance: none;
    background: transparent;
    border: none;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.explorer-output-tab.active,
.explorer-output-tab[aria-selected="true"] {
    background-color: var(--color-brand-primary);
    color: var(--color-brand-btn-text, var(--color-brand-button-text, #ffffff));
}

.explorer-output-tab:focus-visible {
    outline: 2px solid var(--color-brand-primary);
}

/* DataFrame Table view */
.explorer-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    background-color: var(--color-background-primary);
    margin-bottom: 1.25rem;
}

.explorer-dataframe-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.explorer-dataframe-table caption {
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-foreground-secondary);
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--color-background-border);
    background-color: var(--color-background-secondary);
}

.explorer-dataframe-table th,
.explorer-dataframe-table td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--color-background-border);
    vertical-align: middle;
}

.explorer-dataframe-table th {
    background-color: var(--color-background-secondary);
    color: var(--color-foreground-primary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
}

.explorer-dataframe-table th.index-col,
.explorer-dataframe-table td.index-col,
.explorer-dataframe-table th.index-cell,
.explorer-dataframe-table td.index-cell {
    width: 48px;
    text-align: center;
    color: var(--color-foreground-secondary);
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

.explorer-dataframe-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

body[data-theme="dark"] .explorer-dataframe-table th.index-col,
body[data-theme="dark"] .explorer-dataframe-table td.index-col,
body[data-theme="dark"] .explorer-dataframe-table th.index-cell,
body[data-theme="dark"] .explorer-dataframe-table td.index-cell {
    background-color: rgba(255, 255, 255, 0.04);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .explorer-dataframe-table th.index-col,
    body:not([data-theme="light"]) .explorer-dataframe-table td.index-col,
    body:not([data-theme="light"]) .explorer-dataframe-table th.index-cell,
    body:not([data-theme="light"]) .explorer-dataframe-table td.index-cell {
        background-color: rgba(255, 255, 255, 0.04);
    }
}

body[data-theme="dark"] .explorer-dataframe-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .explorer-dataframe-table tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.06);
    }
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-status-success, var(--color-badge-success, #065f46));
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-status-warning, var(--color-badge-warning, #92400e));
}

.badge-neutral {
    background-color: rgba(107, 114, 128, 0.15);
    color: var(--color-foreground-secondary);
}

/* Raw JSON Viewer */
.explorer-json-wrapper {
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    background-color: var(--color-background-primary);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.explorer-json-wrapper[hidden] {
    display: none;
}

.explorer-json-wrapper:not([hidden]) {
    display: flex;
    flex-direction: column;
}

.explorer-copy-btn {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 7.5rem;
    margin: 0.5rem 0.6rem;
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 4px;
    padding: 0.25rem 0.65rem;
    font-size: 0.775rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    color: var(--color-foreground-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.explorer-copy-btn:hover {
    color: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
}

.explorer-copy-btn:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.explorer-json-pre {
    margin: 0;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid var(--color-background-border);
    max-height: 320px;
    overflow-x: auto;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.825rem;
    line-height: 1.45;
    color: var(--color-foreground-primary);
}

/* CRF Schema Viewer */
.crf-view-container {
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    background-color: var(--color-background-primary);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.crf-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-background-border);
}

.crf-header h4 {
    margin: 0 0 0.35rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-foreground-primary);
}

.crf-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background-color: var(--color-brand-primary);
    color: var(--color-brand-btn-text, var(--color-brand-button-text, #ffffff));
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.4rem;
}

.crf-oid {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-foreground-secondary);
}

.crf-desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-foreground-secondary);
}

.crf-fields-grid,
.form-variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.crf-field-card,
.form-variable-card {
    background-color: var(--color-background-secondary);
    border: 1px solid var(--color-background-border);
    border-radius: 6px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.crf-field-header,
.form-variable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crf-field-id,
.form-variable-id {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-brand-primary);
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.crf-badge-required {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-status-danger, var(--color-badge-danger, var(--color-badge-required, #b91c1c)));
    text-transform: uppercase;
}

.crf-badge-optional {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background-color: rgba(107, 114, 128, 0.15);
    color: var(--color-foreground-secondary);
    text-transform: uppercase;
}

.crf-field-label,
.form-variable-label {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--color-foreground-primary);
}

.crf-field-meta,
.form-variable-meta {
    font-size: 0.775rem;
    color: var(--color-foreground-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--color-background-border);
}

.crf-field-meta code,
.form-variable-meta code {
    font-size: 0.75rem;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background-color: var(--color-background-primary);
}

.crf-rules-section {
    margin-top: 1.15rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-background-border);
}

.crf-rules-heading {
    margin: 0 0 0.65rem 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-foreground-secondary);
}

/* Quick Start tutorial callout link */
.quick-start-callout {
    background-color: var(--color-background-primary);
    border: 1px solid var(--color-brand-primary);
    border-left: 4px solid var(--color-brand-primary);
    border-radius: 6px;
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-start-callout-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.15rem;
}

.quick-start-callout p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-foreground-primary);
}

.quick-start-callout a {
    font-weight: 600;
    color: var(--color-brand-primary);
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.quick-start-callout a:hover {
    color: var(--color-brand-content, var(--color-brand-primary));
}

.quick-start-callout a:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Empty state */
.explorer-empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--color-foreground-secondary);
    font-size: 0.9rem;
}

/* =========================================================================
   Mobile Viewport Responsive Adjustments (< 768px)
   ========================================================================= */

@media (max-width: 768px) {
    .role-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .showcase-header {
        padding: 1rem 1rem 0 1rem;
    }

    .showcase-persona-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
        margin-bottom: 0;
        padding-bottom: 0.75rem;
        gap: 0.45rem;
    }

    .showcase-persona-tab {
        flex: 1 1 100%;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        min-height: 44px;
        border-radius: 6px;
        border: 1px solid var(--color-background-border);
    }

    .showcase-persona-tab.active,
    .showcase-persona-tab[aria-selected="true"] {
        border-color: var(--color-brand-primary);
        border-bottom: 2px solid var(--color-brand-primary);
    }

    .showcase-panel {
        padding: 1rem;
    }

    .explorer-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .explorer-controls-left,
    .explorer-controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .explorer-control-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .explorer-select {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .explorer-run-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .mode-segmented-toggle {
        width: 100%;
        display: flex;
    }

    .mode-pill-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .explorer-output-tabs {
        width: 100%;
        flex-wrap: wrap;
        box-sizing: border-box;
    }

    .explorer-output-tab {
        flex: 1 1 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        min-height: 44px;
        box-sizing: border-box;
    }

    .explorer-copy-btn,
    .explorer-snippet-copy-btn {
        min-height: 44px;
        padding: 0.45rem 0.85rem;
    }

    .quick-start-callout {
        flex-direction: column;
        align-items: flex-start;
    }

    .crf-fields-grid,
    .form-variables-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Mermaid Diagram Scroll Regions, Scaling Floors & Furo Token Overrides
   ========================================================================= */

.mermaid {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.5rem;
    margin: 1.25rem 0;
    border-radius: 6px;
    background-color: var(--color-background-primary);
}

.toctree-checkbox:focus-visible,
.sidebar-search:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: -2px;
}

.nav-overlay-icon:focus-visible,
.toc-overlay-icon:focus-visible,
.toc-header-icon:focus-visible,
.toc-content-icon:focus-visible,
.drawer-close-btn:focus-visible,
img.toggler:focus-visible,
.theme-toggle:focus-visible,
.skip-to-content:focus-visible,
.sidebar-tree .reference:focus-visible,
.toc-tree a:focus-visible,
.mermaid:focus-visible {
    outline: 2px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.mermaid svg {
    display: block;
    max-width: none !important;
    height: auto;
}

/* Width floor fallback if an SVG ever renders with percentage width */
.mermaid svg[width="100%"] {
    min-width: 720px;
}

.mermaid svg .node rect,
.mermaid svg .node circle,
.mermaid svg .node ellipse,
.mermaid svg .node polygon,
.mermaid svg .node path {
    fill: var(--color-diagram-node-bg, var(--color-background-secondary)) !important;
    stroke: var(--color-diagram-node-border, var(--color-brand-primary)) !important;
}

.mermaid svg .cluster rect {
    fill: var(--color-diagram-cluster-bg, var(--color-background-secondary)) !important;
    stroke: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
}

.mermaid svg .node .label,
.mermaid svg .nodeLabel,
.mermaid svg .cluster-label .nodeLabel,
.mermaid svg .label text,
.mermaid svg .label span,
.mermaid svg .cluster-label span {
    color: var(--color-foreground-primary) !important;
    fill: var(--color-foreground-primary) !important;
}

.mermaid svg .edgePath .path,
.mermaid svg .flowchart-link {
    stroke: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
}

.mermaid svg .marker,
.mermaid svg marker path {
    fill: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
    stroke: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
}

.mermaid svg .edgeLabel,
.mermaid svg .edgeLabel span,
.mermaid svg .edgeLabel p {
    background-color: var(--color-diagram-label-bg, var(--color-background-primary)) !important;
    color: var(--color-foreground-primary) !important;
}

.mermaid svg .edgeLabel rect {
    fill: var(--color-diagram-label-bg, var(--color-background-primary)) !important;
    opacity: 1 !important;
}

.mermaid svg rect.actor,
.mermaid svg .actor-man line,
.mermaid svg .actor-man circle {
    fill: var(--color-diagram-node-bg, var(--color-background-secondary)) !important;
    stroke: var(--color-diagram-node-border, var(--color-brand-primary)) !important;
}

.mermaid svg text.actor,
.mermaid svg text.actor > tspan {
    fill: var(--color-foreground-primary) !important;
}

.mermaid svg line[id^="actor"],
.mermaid svg .actor-line,
.mermaid svg .messageLine0,
.mermaid svg .messageLine1,
.mermaid svg .loopLine {
    stroke: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
}

.mermaid svg .messageText,
.mermaid svg .loopText,
.mermaid svg .loopText > tspan,
.mermaid svg .labelText,
.mermaid svg .labelText > tspan {
    fill: var(--color-foreground-primary) !important;
}

.mermaid svg .labelBox {
    fill: var(--color-diagram-node-bg, var(--color-background-secondary)) !important;
    stroke: var(--color-diagram-line, var(--color-foreground-secondary)) !important;
}

.mermaid svg rect.note {
    fill: var(--color-diagram-note-bg, #fff8c5) !important;
    stroke: var(--color-diagram-note-border, #92400e) !important;
}

.mermaid svg text.noteText,
.mermaid svg text.noteText > tspan {
    fill: var(--color-diagram-note-text, #1f2328) !important;
}

.mermaid svg .activation0,
.mermaid svg .activation1,
.mermaid svg .activation2 {
    fill: var(--color-diagram-cluster-bg, var(--color-background-secondary)) !important;
    stroke: var(--color-diagram-node-border, var(--color-brand-primary)) !important;
}

/* =========================================================================
   High Contrast (@media (prefers-contrast: more)) — >= 7:1 Contrast
   ========================================================================= */

@media (prefers-contrast: more) {
    html body,
    html body[data-theme="light"] {
        --color-background-primary: #ffffff;
        --color-background-secondary: #f4f6f8;
        --color-background-hover: #eef2f6;
        --color-background-border: #1f2328;
        --color-foreground-primary: #000000;
        --color-foreground-secondary: #1f2328;
        --color-foreground-muted: #24292f;
        --color-foreground-border: #1f2328;
        --color-code-background: #ffffff;
        --color-code-foreground: #000000;
        --color-inline-code-background: #f4f6f8;
        --color-brand-primary: #004385;
        --color-brand-primary-hover: #003366;
        --color-brand-content: #004385;
        --color-brand-visited: #432371;
        --color-brand-btn-text: #ffffff;
        --color-brand-button-text: #ffffff;
        --color-status-success: #04543c;
        --color-status-warning: #78350f;
        --color-status-danger: #991b1b;
        --color-badge-success: #04543c;
        --color-badge-warning: #78350f;
        --color-badge-danger: #991b1b;
        --color-badge-required: #991b1b;
        --color-diagram-node-bg: #ffffff;
        --color-diagram-node-border: #004385;
        --color-diagram-cluster-bg: #f4f6f8;
        --color-diagram-line: #1f2328;
        --color-diagram-label-bg: #ffffff;
        --color-diagram-note-bg: #fffbeb;
        --color-diagram-note-text: #000000;
        --color-diagram-note-border: #78350f;
        --color-sidebar-background: #f4f6f8;
        --color-sidebar-brand-text: #000000;
        --color-sidebar-link-text: #1f2328;
        --color-sidebar-link-text--top-level: #000000;
        --color-api-name: #004385;
        --color-api-pre-name: #004385;
    }

    html body .explorer-select,
    html body[data-theme="light"] .explorer-select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }

    html body div.highlight,
    html body .highlight,
    html body div.highlight pre,
    html body[data-theme="light"] div.highlight,
    html body[data-theme="light"] .highlight,
    html body[data-theme="light"] div.highlight pre {
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #1f2328;
    }

    html body div.highlight pre,
    html body[data-theme="light"] div.highlight pre {
        border: 0;
    }

    html body .highlight .hll,
    html body[data-theme="light"] .highlight .hll {
        background-color: #f4f6f8 !important;
    }

    html body .highlight .c,
    html body .highlight .ch,
    html body .highlight .cm,
    html body .highlight .cpf,
    html body .highlight .c1,
    html body .highlight .cs,
    html body[data-theme="light"] .highlight .c,
    html body[data-theme="light"] .highlight .ch,
    html body[data-theme="light"] .highlight .cm,
    html body[data-theme="light"] .highlight .cpf,
    html body[data-theme="light"] .highlight .c1,
    html body[data-theme="light"] .highlight .cs {
        color: #32383f !important;
        background-color: transparent !important;
    }

    html body .highlight .k,
    html body .highlight .kc,
    html body .highlight .kd,
    html body .highlight .kn,
    html body .highlight .kp,
    html body .highlight .kr,
    html body .highlight .kt,
    html body .highlight .cp,
    html body .highlight .nb,
    html body .highlight .bp,
    html body .highlight .ne,
    html body .highlight .ow,
    html body .highlight .nt,
    html body[data-theme="light"] .highlight .k,
    html body[data-theme="light"] .highlight .kc,
    html body[data-theme="light"] .highlight .kd,
    html body[data-theme="light"] .highlight .kn,
    html body[data-theme="light"] .highlight .kp,
    html body[data-theme="light"] .highlight .kr,
    html body[data-theme="light"] .highlight .kt,
    html body[data-theme="light"] .highlight .cp,
    html body[data-theme="light"] .highlight .nb,
    html body[data-theme="light"] .highlight .bp,
    html body[data-theme="light"] .highlight .ne,
    html body[data-theme="light"] .highlight .ow,
    html body[data-theme="light"] .highlight .nt {
        color: #004385 !important;
    }

    html body .highlight .nf,
    html body .highlight .fm,
    html body .highlight .nc,
    html body .highlight .nn,
    html body .highlight .nl,
    html body .highlight .nd,
    html body .highlight .gh,
    html body .highlight .gu,
    html body .highlight .gt,
    html body[data-theme="light"] .highlight .nf,
    html body[data-theme="light"] .highlight .fm,
    html body[data-theme="light"] .highlight .nc,
    html body[data-theme="light"] .highlight .nn,
    html body[data-theme="light"] .highlight .nl,
    html body[data-theme="light"] .highlight .nd,
    html body[data-theme="light"] .highlight .gh,
    html body[data-theme="light"] .highlight .gu,
    html body[data-theme="light"] .highlight .gt {
        color: #05286b !important;
    }

    html body .highlight .s,
    html body .highlight .sa,
    html body .highlight .sb,
    html body .highlight .sc,
    html body .highlight .dl,
    html body .highlight .sd,
    html body .highlight .s2,
    html body .highlight .se,
    html body .highlight .sh,
    html body .highlight .si,
    html body .highlight .sx,
    html body .highlight .sr,
    html body .highlight .s1,
    html body .highlight .ss,
    html body .highlight .na,
    html body .highlight .gi,
    html body[data-theme="light"] .highlight .s,
    html body[data-theme="light"] .highlight .sa,
    html body[data-theme="light"] .highlight .sb,
    html body[data-theme="light"] .highlight .sc,
    html body[data-theme="light"] .highlight .dl,
    html body[data-theme="light"] .highlight .sd,
    html body[data-theme="light"] .highlight .s2,
    html body[data-theme="light"] .highlight .se,
    html body[data-theme="light"] .highlight .sh,
    html body[data-theme="light"] .highlight .si,
    html body[data-theme="light"] .highlight .sx,
    html body[data-theme="light"] .highlight .sr,
    html body[data-theme="light"] .highlight .s1,
    html body[data-theme="light"] .highlight .ss,
    html body[data-theme="light"] .highlight .na,
    html body[data-theme="light"] .highlight .gi {
        color: #04543c !important;
    }

    html body .highlight .m,
    html body .highlight .mb,
    html body .highlight .mf,
    html body .highlight .mh,
    html body .highlight .mi,
    html body .highlight .mo,
    html body .highlight .il,
    html body .highlight .no,
    html body .highlight .nv,
    html body .highlight .vc,
    html body .highlight .vg,
    html body .highlight .vi,
    html body .highlight .vm,
    html body .highlight .ni,
    html body[data-theme="light"] .highlight .m,
    html body[data-theme="light"] .highlight .mb,
    html body[data-theme="light"] .highlight .mf,
    html body[data-theme="light"] .highlight .mh,
    html body[data-theme="light"] .highlight .mi,
    html body[data-theme="light"] .highlight .mo,
    html body[data-theme="light"] .highlight .il,
    html body[data-theme="light"] .highlight .no,
    html body[data-theme="light"] .highlight .nv,
    html body[data-theme="light"] .highlight .vc,
    html body[data-theme="light"] .highlight .vg,
    html body[data-theme="light"] .highlight .vi,
    html body[data-theme="light"] .highlight .vm,
    html body[data-theme="light"] .highlight .ni {
        color: #5b168c !important;
    }

    html body .highlight .err,
    html body .highlight .gd,
    html body .highlight .gr,
    html body .highlight .gp,
    html body[data-theme="light"] .highlight .err,
    html body[data-theme="light"] .highlight .gd,
    html body[data-theme="light"] .highlight .gr,
    html body[data-theme="light"] .highlight .gp {
        color: #8c0b18 !important;
        background-color: transparent !important;
    }

    html body .highlight .o,
    html body .highlight .p,
    html body .highlight .n,
    html body .highlight .nx,
    html body .highlight .py,
    html body .highlight .pm,
    html body .highlight .l,
    html body .highlight .ld,
    html body .highlight .g,
    html body .highlight .ge,
    html body .highlight .ges,
    html body .highlight .gs,
    html body .highlight .go,
    html body .highlight .w,
    html body .highlight .x,
    html body .highlight .esc,
    html body[data-theme="light"] .highlight .o,
    html body[data-theme="light"] .highlight .p,
    html body[data-theme="light"] .highlight .n,
    html body[data-theme="light"] .highlight .nx,
    html body[data-theme="light"] .highlight .py,
    html body[data-theme="light"] .highlight .pm,
    html body[data-theme="light"] .highlight .l,
    html body[data-theme="light"] .highlight .ld,
    html body[data-theme="light"] .highlight .g,
    html body[data-theme="light"] .highlight .ge,
    html body[data-theme="light"] .highlight .ges,
    html body[data-theme="light"] .highlight .gs,
    html body[data-theme="light"] .highlight .go,
    html body[data-theme="light"] .highlight .w,
    html body[data-theme="light"] .highlight .x,
    html body[data-theme="light"] .highlight .esc {
        color: #000000 !important;
    }

    html body[data-theme="dark"] {
        --color-background-primary: #0a0c10;
        --color-background-secondary: #11141a;
        --color-background-hover: #161b22;
        --color-background-border: #c9d1d9;
        --color-foreground-primary: #ffffff;
        --color-foreground-secondary: #e6edf3;
        --color-foreground-muted: #c9d1d9;
        --color-foreground-border: #c9d1d9;
        --color-code-background: #0a0c10;
        --color-code-foreground: #ffffff;
        --color-inline-code-background: #11141a;
        --color-brand-primary: #79c0ff;
        --color-brand-primary-hover: #a5d6ff;
        --color-brand-content: #79c0ff;
        --color-brand-visited: #d2a8ff;
        --color-brand-btn-text: #0a0c10;
        --color-brand-button-text: #0a0c10;
        --color-status-success: #6ee7b7;
        --color-status-warning: #fde68a;
        --color-status-danger: #fca5a5;
        --color-badge-success: #6ee7b7;
        --color-badge-warning: #fde68a;
        --color-badge-danger: #fca5a5;
        --color-badge-required: #fca5a5;
        --color-diagram-node-bg: #11141a;
        --color-diagram-node-border: #79c0ff;
        --color-diagram-cluster-bg: #0a0c10;
        --color-diagram-line: #e6edf3;
        --color-diagram-label-bg: #0a0c10;
        --color-diagram-note-bg: #1c1908;
        --color-diagram-note-text: #ffffff;
        --color-diagram-note-border: #fde68a;
        --color-sidebar-background: #11141a;
        --color-sidebar-brand-text: #ffffff;
        --color-sidebar-link-text: #e6edf3;
        --color-sidebar-link-text--top-level: #ffffff;
        --color-api-name: #79c0ff;
        --color-api-pre-name: #79c0ff;
    }

    html body[data-theme="dark"] .explorer-select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }

    html body[data-theme="dark"] div.highlight,
    html body[data-theme="dark"] .highlight,
    html body[data-theme="dark"] div.highlight pre {
        background: #0a0c10 !important;
        background-color: #0a0c10 !important;
        color: #ffffff !important;
        border: 1px solid #c9d1d9;
    }

    html body[data-theme="dark"] div.highlight pre {
        border: 0;
    }

    html body[data-theme="dark"] .highlight .hll {
        background-color: #161b22 !important;
    }

    html body[data-theme="dark"] .highlight .c,
    html body[data-theme="dark"] .highlight .ch,
    html body[data-theme="dark"] .highlight .cm,
    html body[data-theme="dark"] .highlight .cpf,
    html body[data-theme="dark"] .highlight .c1,
    html body[data-theme="dark"] .highlight .cs {
        color: #c9d1d9 !important;
        background-color: transparent !important;
    }

    html body[data-theme="dark"] .highlight .k,
    html body[data-theme="dark"] .highlight .kc,
    html body[data-theme="dark"] .highlight .kd,
    html body[data-theme="dark"] .highlight .kn,
    html body[data-theme="dark"] .highlight .kp,
    html body[data-theme="dark"] .highlight .kr,
    html body[data-theme="dark"] .highlight .kt,
    html body[data-theme="dark"] .highlight .ow,
    html body[data-theme="dark"] .highlight .nt,
    html body[data-theme="dark"] .highlight .gi {
        color: #7ee787 !important;
    }

    html body[data-theme="dark"] .highlight .nf,
    html body[data-theme="dark"] .highlight .fm,
    html body[data-theme="dark"] .highlight .nc,
    html body[data-theme="dark"] .highlight .nn,
    html body[data-theme="dark"] .highlight .nb,
    html body[data-theme="dark"] .highlight .bp,
    html body[data-theme="dark"] .highlight .nl {
        color: #79c0ff !important;
    }

    html body[data-theme="dark"] .highlight .s,
    html body[data-theme="dark"] .highlight .sa,
    html body[data-theme="dark"] .highlight .sb,
    html body[data-theme="dark"] .highlight .sc,
    html body[data-theme="dark"] .highlight .dl,
    html body[data-theme="dark"] .highlight .sd,
    html body[data-theme="dark"] .highlight .s2,
    html body[data-theme="dark"] .highlight .se,
    html body[data-theme="dark"] .highlight .sh,
    html body[data-theme="dark"] .highlight .si,
    html body[data-theme="dark"] .highlight .sx,
    html body[data-theme="dark"] .highlight .sr,
    html body[data-theme="dark"] .highlight .s1,
    html body[data-theme="dark"] .highlight .ss,
    html body[data-theme="dark"] .highlight .nd {
        color: #ffa657 !important;
    }

    html body[data-theme="dark"] .highlight .m,
    html body[data-theme="dark"] .highlight .mb,
    html body[data-theme="dark"] .highlight .mf,
    html body[data-theme="dark"] .highlight .mh,
    html body[data-theme="dark"] .highlight .mi,
    html body[data-theme="dark"] .highlight .mo,
    html body[data-theme="dark"] .highlight .il,
    html body[data-theme="dark"] .highlight .no,
    html body[data-theme="dark"] .highlight .nv,
    html body[data-theme="dark"] .highlight .vc,
    html body[data-theme="dark"] .highlight .vg,
    html body[data-theme="dark"] .highlight .vi,
    html body[data-theme="dark"] .highlight .vm {
        color: #a5d6ff !important;
    }

    html body[data-theme="dark"] .highlight .err,
    html body[data-theme="dark"] .highlight .cp,
    html body[data-theme="dark"] .highlight .gd,
    html body[data-theme="dark"] .highlight .gr,
    html body[data-theme="dark"] .highlight .gt {
        color: #fca5a5 !important;
        background-color: transparent !important;
    }

    html body[data-theme="dark"] .highlight .o,
    html body[data-theme="dark"] .highlight .p,
    html body[data-theme="dark"] .highlight .n,
    html body[data-theme="dark"] .highlight .na,
    html body[data-theme="dark"] .highlight .ne,
    html body[data-theme="dark"] .highlight .ni,
    html body[data-theme="dark"] .highlight .nx,
    html body[data-theme="dark"] .highlight .py,
    html body[data-theme="dark"] .highlight .pm,
    html body[data-theme="dark"] .highlight .l,
    html body[data-theme="dark"] .highlight .ld,
    html body[data-theme="dark"] .highlight .g,
    html body[data-theme="dark"] .highlight .ge,
    html body[data-theme="dark"] .highlight .ges,
    html body[data-theme="dark"] .highlight .gh,
    html body[data-theme="dark"] .highlight .go,
    html body[data-theme="dark"] .highlight .gp,
    html body[data-theme="dark"] .highlight .gs,
    html body[data-theme="dark"] .highlight .gu,
    html body[data-theme="dark"] .highlight .w,
    html body[data-theme="dark"] .highlight .x,
    html body[data-theme="dark"] .highlight .esc {
        color: #ffffff !important;
    }

    .showcase-client-badge,
    .explorer-metric-badge,
    .explorer-metric-badge.explorer-metric-badge--danger,
    .status-badge,
    .badge-success,
    .badge-warning,
    .badge-neutral,
    .crf-badge-required,
    .crf-badge-optional {
        background-color: var(--color-background-primary) !important;
        border: 1px solid currentColor !important;
    }

    .thebe-log,
    .thebe-stdout,
    .thebe-result {
        background-color: var(--color-background-primary) !important;
        border: 1px solid var(--color-background-border) !important;
        border-left: 3px solid var(--color-foreground-secondary) !important;
    }

    .thebe-stdout {
        border-left-color: var(--color-status-success) !important;
    }

    .thebe-result {
        border-left-color: var(--color-brand-primary) !important;
    }

    .thebe-stderr {
        background-color: var(--color-background-primary) !important;
        color: var(--color-status-danger) !important;
        border: 1px solid currentColor !important;
        border-left: 4px solid currentColor !important;
    }

    .thebe-launch-button,
    .thebelab-button,
    .explorer-run-btn,
    .explorer-snippet-copy-btn,
    .explorer-copy-btn,
    .role-card-launch-btn {
        border: 2px solid currentColor;
    }

    .explorer-run-btn:hover {
        opacity: 1;
        background-color: var(--color-brand-primary-hover);
    }

    #furo-main-content:focus-visible,
    article h1:focus-visible,
    article h2:focus-visible,
    article h3:focus-visible,
    article h4:focus-visible,
    article h5:focus-visible,
    article h6:focus-visible,
    article dt:focus-visible,
    .toctree-checkbox:focus-visible,
    .sidebar-search:focus-visible,
    .nav-overlay-icon:focus-visible,
    .toc-overlay-icon:focus-visible,
    .toc-header-icon:focus-visible,
    .toc-content-icon:focus-visible,
    .drawer-close-btn:focus-visible,
    img.toggler:focus-visible,
    .theme-toggle:focus-visible,
    .skip-to-content:focus-visible,
    .sidebar-tree .reference:focus-visible,
    .toc-tree a:focus-visible,
    .table-wrapper:focus-visible,
    .explorer-table-wrapper:focus-visible,
    a.headerlink:focus-visible,
    .viewcode-source-link:focus-visible,
    a.viewcode-back:focus-visible {
        outline: 2px solid var(--color-brand-primary);
    }

    a.reference:has(> .viewcode-link):focus-visible {
        outline: 2px solid var(--color-brand-primary);
    }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
    html body:not([data-theme="light"]) {
        --color-background-primary: #0a0c10;
        --color-background-secondary: #11141a;
        --color-background-hover: #161b22;
        --color-background-border: #c9d1d9;
        --color-foreground-primary: #ffffff;
        --color-foreground-secondary: #e6edf3;
        --color-foreground-muted: #c9d1d9;
        --color-foreground-border: #c9d1d9;
        --color-code-background: #0a0c10;
        --color-code-foreground: #ffffff;
        --color-inline-code-background: #11141a;
        --color-brand-primary: #79c0ff;
        --color-brand-primary-hover: #a5d6ff;
        --color-brand-content: #79c0ff;
        --color-brand-visited: #d2a8ff;
        --color-brand-btn-text: #0a0c10;
        --color-brand-button-text: #0a0c10;
        --color-status-success: #6ee7b7;
        --color-status-warning: #fde68a;
        --color-status-danger: #fca5a5;
        --color-badge-success: #6ee7b7;
        --color-badge-warning: #fde68a;
        --color-badge-danger: #fca5a5;
        --color-badge-required: #fca5a5;
        --color-diagram-node-bg: #11141a;
        --color-diagram-node-border: #79c0ff;
        --color-diagram-cluster-bg: #0a0c10;
        --color-diagram-line: #e6edf3;
        --color-diagram-label-bg: #0a0c10;
        --color-diagram-note-bg: #1c1908;
        --color-diagram-note-text: #ffffff;
        --color-diagram-note-border: #fde68a;
        --color-sidebar-background: #11141a;
        --color-sidebar-brand-text: #ffffff;
        --color-sidebar-link-text: #e6edf3;
        --color-sidebar-link-text--top-level: #ffffff;
        --color-api-name: #79c0ff;
        --color-api-pre-name: #79c0ff;
    }

    html body:not([data-theme="light"]) .explorer-select {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }

    html body:not([data-theme="light"]) div.highlight,
    html body:not([data-theme="light"]) .highlight,
    html body:not([data-theme="light"]) div.highlight pre {
        background: #0a0c10 !important;
        background-color: #0a0c10 !important;
        color: #ffffff !important;
        border: 1px solid #c9d1d9;
    }

    html body:not([data-theme="light"]) div.highlight pre {
        border: 0;
    }

    html body:not([data-theme="light"]) .highlight .hll {
        background-color: #161b22 !important;
    }

    html body:not([data-theme="light"]) .highlight .c,
    html body:not([data-theme="light"]) .highlight .ch,
    html body:not([data-theme="light"]) .highlight .cm,
    html body:not([data-theme="light"]) .highlight .cpf,
    html body:not([data-theme="light"]) .highlight .c1,
    html body:not([data-theme="light"]) .highlight .cs {
        color: #c9d1d9 !important;
        background-color: transparent !important;
    }

    html body:not([data-theme="light"]) .highlight .k,
    html body:not([data-theme="light"]) .highlight .kc,
    html body:not([data-theme="light"]) .highlight .kd,
    html body:not([data-theme="light"]) .highlight .kn,
    html body:not([data-theme="light"]) .highlight .kp,
    html body:not([data-theme="light"]) .highlight .kr,
    html body:not([data-theme="light"]) .highlight .kt,
    html body:not([data-theme="light"]) .highlight .ow,
    html body:not([data-theme="light"]) .highlight .nt,
    html body:not([data-theme="light"]) .highlight .gi {
        color: #7ee787 !important;
    }

    html body:not([data-theme="light"]) .highlight .nf,
    html body:not([data-theme="light"]) .highlight .fm,
    html body:not([data-theme="light"]) .highlight .nc,
    html body:not([data-theme="light"]) .highlight .nn,
    html body:not([data-theme="light"]) .highlight .nb,
    html body:not([data-theme="light"]) .highlight .bp,
    html body:not([data-theme="light"]) .highlight .nl {
        color: #79c0ff !important;
    }

    html body:not([data-theme="light"]) .highlight .s,
    html body:not([data-theme="light"]) .highlight .sa,
    html body:not([data-theme="light"]) .highlight .sb,
    html body:not([data-theme="light"]) .highlight .sc,
    html body:not([data-theme="light"]) .highlight .dl,
    html body:not([data-theme="light"]) .highlight .sd,
    html body:not([data-theme="light"]) .highlight .s2,
    html body:not([data-theme="light"]) .highlight .se,
    html body:not([data-theme="light"]) .highlight .sh,
    html body:not([data-theme="light"]) .highlight .si,
    html body:not([data-theme="light"]) .highlight .sx,
    html body:not([data-theme="light"]) .highlight .sr,
    html body:not([data-theme="light"]) .highlight .s1,
    html body:not([data-theme="light"]) .highlight .ss,
    html body:not([data-theme="light"]) .highlight .nd {
        color: #ffa657 !important;
    }

    html body:not([data-theme="light"]) .highlight .m,
    html body:not([data-theme="light"]) .highlight .mb,
    html body:not([data-theme="light"]) .highlight .mf,
    html body:not([data-theme="light"]) .highlight .mh,
    html body:not([data-theme="light"]) .highlight .mi,
    html body:not([data-theme="light"]) .highlight .mo,
    html body:not([data-theme="light"]) .highlight .il,
    html body:not([data-theme="light"]) .highlight .no,
    html body:not([data-theme="light"]) .highlight .nv,
    html body:not([data-theme="light"]) .highlight .vc,
    html body:not([data-theme="light"]) .highlight .vg,
    html body:not([data-theme="light"]) .highlight .vi,
    html body:not([data-theme="light"]) .highlight .vm {
        color: #a5d6ff !important;
    }

    html body:not([data-theme="light"]) .highlight .err,
    html body:not([data-theme="light"]) .highlight .cp,
    html body:not([data-theme="light"]) .highlight .gd,
    html body:not([data-theme="light"]) .highlight .gr,
    html body:not([data-theme="light"]) .highlight .gt {
        color: #fca5a5 !important;
        background-color: transparent !important;
    }

    html body:not([data-theme="light"]) .highlight .o,
    html body:not([data-theme="light"]) .highlight .p,
    html body:not([data-theme="light"]) .highlight .n,
    html body:not([data-theme="light"]) .highlight .na,
    html body:not([data-theme="light"]) .highlight .ne,
    html body:not([data-theme="light"]) .highlight .ni,
    html body:not([data-theme="light"]) .highlight .nx,
    html body:not([data-theme="light"]) .highlight .py,
    html body:not([data-theme="light"]) .highlight .pm,
    html body:not([data-theme="light"]) .highlight .l,
    html body:not([data-theme="light"]) .highlight .ld,
    html body:not([data-theme="light"]) .highlight .g,
    html body:not([data-theme="light"]) .highlight .ge,
    html body:not([data-theme="light"]) .highlight .ges,
    html body:not([data-theme="light"]) .highlight .gh,
    html body:not([data-theme="light"]) .highlight .go,
    html body:not([data-theme="light"]) .highlight .gp,
    html body:not([data-theme="light"]) .highlight .gs,
    html body:not([data-theme="light"]) .highlight .gu,
    html body:not([data-theme="light"]) .highlight .w,
    html body:not([data-theme="light"]) .highlight .x,
    html body:not([data-theme="light"]) .highlight .esc {
        color: #ffffff !important;
    }
}

/* =========================================================================
   Forced Colors (@media (forced-colors: active)) — System Color Tokens
   ========================================================================= */

@media (forced-colors: active) {
    .thebe-launch-button,
    .thebelab-button,
    .thebelab-button.thebe-launch-button,
    .thebelab-button.thebelab-run-button,
    .explorer-run-btn,
    .explorer-snippet-copy-btn,
    .explorer-copy-btn,
    .role-card-launch-btn,
    .showcase-persona-tab,
    .explorer-output-tab,
    .mode-pill-btn {
        forced-color-adjust: none;
        background-color: ButtonFace !important;
        color: ButtonText !important;
        border: 1px solid ButtonText !important;
        transition: none !important;
    }

    .thebe-launch-button:hover:not(:disabled),
    .thebelab-button:hover:not(:disabled),
    .thebelab-button.thebelab-run-button:hover:not(:disabled),
    .explorer-run-btn:hover:not(:disabled),
    .explorer-snippet-copy-btn:hover:not(:disabled),
    .explorer-copy-btn:hover:not(:disabled),
    .role-card-launch-btn:hover,
    .showcase-persona-tab.active,
    .showcase-persona-tab[aria-selected="true"],
    .explorer-output-tab.active,
    .explorer-output-tab[aria-selected="true"],
    .mode-pill-btn.active,
    .mode-pill-btn[aria-pressed="true"] {
        forced-color-adjust: none;
        background-color: Highlight !important;
        color: HighlightText !important;
        border: 1px solid ButtonText !important;
    }

    .thebelab-button:disabled,
    .thebelab-button.thebelab-run-button:disabled {
        background-color: ButtonFace !important;
        color: GrayText !important;
        border-color: GrayText !important;
        opacity: 1;
    }

    .thebe-editor,
    .thebelab-cell,
    .thebe-log,
    .thebe-stdout,
    .thebe-result,
    .role-card,
    .explorer-code-pre,
    .explorer-json-wrapper,
    .explorer-select,
    .explorer-metric-badge,
    .explorer-metric-badge.explorer-metric-badge--danger,
    .showcase-client-badge,
    .status-badge,
    .crf-tag,
    .crf-badge-required,
    .crf-badge-optional {
        forced-color-adjust: none;
        background-color: Canvas !important;
        color: CanvasText !important;
        border: 1px solid CanvasText !important;
    }

    .thebe-stderr {
        forced-color-adjust: none;
        background-color: Canvas !important;
        color: CanvasText !important;
        border: 2px solid CanvasText !important;
        border-left: 4px solid CanvasText !important;
    }

    .explorer-select {
        forced-color-adjust: auto !important;
        appearance: auto !important;
        -webkit-appearance: auto !important;
        background-image: none !important;
        padding-right: 0.75rem !important;
    }

    .nav-overlay-icon,
    .toc-header-icon:not(.no-toc),
    .toc-content-icon:not(.no-toc),
    button.drawer-close-btn,
    img.toggler {
        forced-color-adjust: none;
        background-color: ButtonFace !important;
        color: ButtonText !important;
        border: 1px solid ButtonText !important;
    }

    button.drawer-close-btn:hover {
        forced-color-adjust: none;
        background-color: Highlight !important;
        color: HighlightText !important;
        border: 1px solid ButtonText !important;
    }

    .nav-overlay-icon .icon,
    .toc-overlay-icon .icon,
    .sidebar-tree label .icon,
    .theme-toggle svg {
        color: ButtonText !important;
    }

    body[data-theme="dark"] img.toggler,
    img.toggler {
        filter: none !important;
    }

    @media (prefers-color-scheme: dark) {
        body[data-theme="dark"] img.toggler,
        img.toggler {
            filter: invert(1) !important;
        }
    }

    .toctree-checkbox:focus-visible,
    .sidebar-search:focus-visible {
        forced-color-adjust: none;
        outline: 2px solid Highlight !important;
        outline-offset: -2px !important;
    }

    #furo-main-content:focus-visible,
    article h1:focus-visible,
    article h2:focus-visible,
    article h3:focus-visible,
    article h4:focus-visible,
    article h5:focus-visible,
    article h6:focus-visible,
    article dt:focus-visible,
    .thebe-editor:focus-visible,
    .thebe-launch-button:focus-visible,
    .thebelab-button:focus-visible,
    .explorer-run-btn:focus-visible,
    .explorer-snippet-copy-btn:focus-visible,
    .explorer-copy-btn:focus-visible,
    .role-card-launch-btn:focus-visible,
    .showcase-persona-tab:focus-visible,
    .explorer-output-tab:focus-visible,
    .mode-pill-btn:focus-visible,
    .explorer-select:focus-visible,
    .quick-start-callout a:focus-visible,
    .nav-overlay-icon:focus-visible,
    .toc-overlay-icon:focus-visible,
    .toc-header-icon:focus-visible,
    .toc-content-icon:focus-visible,
    .drawer-close-btn:focus-visible,
    img.toggler:focus-visible,
    .theme-toggle:focus-visible,
    .skip-to-content:focus-visible,
    .sidebar-tree .reference:focus-visible,
    .toc-tree a:focus-visible,
    .mermaid:focus-visible,
    .table-wrapper:focus-visible,
    .explorer-table-wrapper:focus-visible,
    pre:focus-visible,
    a.headerlink:focus-visible,
    .viewcode-source-link:focus-visible,
    a.viewcode-back:focus-visible {
        outline: 2px solid Highlight !important;
        outline-offset: 2px !important;
    }

    a.reference:has(> .viewcode-link):focus-visible {
        outline: 2px solid Highlight !important;
        outline-offset: 2px !important;
    }

    .mermaid {
        forced-color-adjust: none;
        background-color: Canvas !important;
        border: 1px solid CanvasText !important;
    }

    .mermaid svg .node rect,
    .mermaid svg .node circle,
    .mermaid svg .node ellipse,
    .mermaid svg .node polygon,
    .mermaid svg .node path,
    .mermaid svg .cluster rect,
    .mermaid svg rect.actor,
    .mermaid svg .labelBox,
    .mermaid svg rect.note,
    .mermaid svg .edgeLabel rect {
        fill: Canvas !important;
        stroke: CanvasText !important;
    }

    .mermaid svg .edgeLabel,
    .mermaid svg .edgeLabel span,
    .mermaid svg .edgeLabel p,
    .mermaid svg .node .label,
    .mermaid svg .nodeLabel,
    .mermaid svg text,
    .mermaid svg tspan {
        background-color: Canvas !important;
        color: CanvasText !important;
        fill: CanvasText !important;
    }

    .mermaid svg .edgePath .path,
    .mermaid svg .flowchart-link,
    .mermaid svg line[id^="actor"],
    .mermaid svg .actor-line,
    .mermaid svg .messageLine0,
    .mermaid svg .messageLine1,
    .mermaid svg .loopLine,
    .mermaid svg .marker,
    .mermaid svg marker path {
        stroke: CanvasText !important;
        fill: CanvasText !important;
    }
}
