.page-loader { display: none; }
.js .page-loader { display: block; position: fixed; inset: 0 0 auto; height: 4px; z-index: 11000; background: hsl(215 60% 12%); opacity: 1; transition: opacity .25s; pointer-events: none; }
.js .page-loader.is-idle { opacity: 0; }
.page-loader::after { content: ''; display: block; width: 35%; height: 100%; background: hsl(165 77% 74%); box-shadow: 0 0 12px hsl(165 77% 74%); animation: page-progress 1.4s ease-in-out infinite; }
@keyframes page-progress { from { transform: translateX(-100%); } to { transform: translateX(390%); } }
.js .page-loader.is-idle::after { animation-play-state: paused; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nav-menu-toggle { display: none; background: transparent; border: 0; cursor: pointer; color: inherit; }
#navbar :is(a, button) { min-width: 44px; min-height: 44px; }
#navbar .nav-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
#navbar .nl { display: inline-flex; align-items: center; padding-inline: 9px; }
#navbar .nav-actions { flex-shrink: 0; }
#navbar .dm-toggle { width: 44px; height: 44px; border-radius: 50%; background: transparent; }
#navbar .dm-toggle::before { content: '☀'; font-size: 23px; color: currentColor; }
#navbar .dm-toggle::after { display: none; }
html.dark #navbar .dm-toggle::before { content: '☾'; }
html.dark #navbar :is(a, button) { color: hsl(210 25% 92%) !important; }
body:has(dialog[open]) { overflow: hidden; }
dialog.lb-overlay { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; }
dialog.lb-overlay[open] { display: flex; opacity: 1; }
.lb-overlay::backdrop { background: hsl(0 0% 0% / .92); }
.lb-controls .lb-btn { width: 48px; height: 48px; }
.lb-controls .lb-btn:focus-visible { outline: 3px solid hsl(165 77% 74%); outline-offset: 4px; }
#toastContainer { max-width: calc(100vw - 32px); z-index: 10001; bottom: 80px; }
#toastContainer .toast { background: hsl(190 85% 23%); overflow-wrap: anywhere; }
#toastContainer .t-er { background: hsl(0 70% 35%); }
.ta-item { min-height: 52px; cursor: pointer; }
.ta-item[aria-selected='true'] { background: hsl(198 90% 95%); outline: 2px solid hsl(190 85% 28%); outline-offset: -2px; }
.ta-item-sub, .ta-empty { color: hsl(210 18% 38%); }
html.dark .ta-dropdown { background: hsl(213 48% 14%); border-color: hsl(210 25% 45%); }
html.dark .ta-item-label { color: hsl(210 25% 95%); }
html.dark .ta-item-sub, html.dark .ta-empty { color: hsl(210 20% 75%); }
html.dark .ta-item:hover, html.dark .ta-item[aria-selected='true'] { background: hsl(210 40% 24%); }
#cmsEditorPanel, #cmsHistoryPanel { width: min(380px, 100vw); height: 100dvh; visibility: hidden; color: hsl(215 60% 12%); }
#cmsEditorPanel.open, #cmsHistoryPanel.open { visibility: visible; }
.cms-editor-panel :is(button, summary), .cms-edit-bar :is(button, a) { min-height: 44px; min-width: 44px; }
.cms-editor-panel .cms-panel-footer { flex-wrap: wrap; padding: 12px; }
.cms-edit-bar .cms-toggle { width: 44px; height: 44px; }
.cms-toggle .cms-toggle-slider { inset: 12px 4px; }
.cms-toggle:focus-within { outline: 3px solid hsl(165 77% 74%); outline-offset: 3px; }
.cms-edit-bar .cms-bar-close { color: hsl(210 20% 75%); }
body.cms-has-bar { padding-bottom: 70px !important; }
.cms-editable-label { display: none; }
.cms-editor-panel .cms-history-meta, .cms-editor-panel .cms-history-empty, .cms-editor-panel .cms-rt-toggle:not(.active) { color: hsl(210 18% 38%); }
#cmsEditorPanel :focus-visible, #cmsHistoryPanel :focus-visible { outline: 3px solid hsl(190 85% 23%); outline-offset: 3px; }
html:not(.js) { scroll-behavior: auto; }
html:not(.js) .rv, html:not(.js) .stagger > * { opacity: 1; transform: none; }
.cms-edit-mode .cms-editable:focus-visible { outline: 3px solid hsl(165 77% 74%); }
.cms-editor-panel input, .cms-editor-panel textarea { color-scheme: light; }
/* WCAG 2.5.5 — enforce consistent touch targets on interactive controls (44x44 mobile, 36px desktop) */
.fc { min-height: 36px; padding-block: 8px; }
.pag-wrap :is(a, button, span) { min-height: 40px; display: inline-flex; align-items: center; }
main nav[aria-label="Pagination"] :is(a, button, span) { min-height: 40px; display: inline-flex; align-items: center; }
.bn > a { min-height: 48px; }
/* Definition-list metadata rows: normalize dt/dd inside .mr flex container */
dl.mdx { margin: 0; }
dl.mdx .mr > dt.ml { display: block; }
dl.mdx .mr > dd.mv { margin: 0; display: block; }
@media (max-width: 639px) {
    .fc { min-height: 44px; }
    .bp, .bs, .bg-btn { min-height: 44px; }
    main nav[aria-label="Pagination"] :is(a, button, span) { min-height: 44px; padding-inline: 12px; }
}
@media (max-width: 1279px) {
    .js #navbar #primaryLinks { display: none !important; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px; background: hsl(215 60% 12%); border: 1px solid hsl(210 25% 42%); border-radius: 12px; max-height: calc(100dvh - 110px); overflow-y: auto; }
    .js #navbar #primaryLinks.is-open { display: flex !important; }
    .js #navbar #primaryLinks a { color: hsl(210 25% 95%) !important; }
    .js #navbar .nav-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    html:not(.js) #navbar { position: relative; }
    html:not(.js) #navbar > div > div { height: auto; flex-wrap: wrap; }
    html:not(.js) #navbar #primaryLinks { display: flex !important; flex-wrap: wrap; order: 3; }
}
@media (max-width: 480px) { .cms-edit-bar { flex-wrap: wrap; gap: 6px; } .cms-edit-bar .cms-bar-center { order: 3; width: 100%; } body.cms-has-bar { padding-bottom: 112px !important; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .rv, .stagger > * { opacity: 1 !important; transform: none !important; }
    .page-loader::after { width: 100%; transform: none; }
}
