/* Mirror navigation and control tokens, scoped away from research figures. */
:root { --mirror-control-radius: 999px; --mirror-control-height: 44px; }
html.dark {
 color-scheme: dark;
 --mirror-bg: #0a0c12; --mirror-surface: #121826; --mirror-surface-2: #1a2030; --mirror-surface-3: #222a3d;
 --mirror-ink: #f5f7ff; --mirror-muted: #b3bbce; --mirror-faint: #949db3;
 --mirror-line: #2d3448; --mirror-line-strong: #4b536d;
 --mirror-blue: #8bb4ff; --mirror-blue-bright: #a8c7ff; --mirror-blue-soft: #1e2945;
 --mirror-success: #8fe2b5; --mirror-success-soft: #103424;
 --mirror-warning: #ffcf94; --mirror-warning-soft: #3f2a08;
 --mirror-danger: #ffb6b6; --mirror-danger-soft: #450a0a;
 --ink-2: var(--mirror-muted); --accent-dark: var(--mirror-blue); --blue-dark: var(--mirror-blue);
 --blue-bright: var(--mirror-blue-bright); --green: var(--mirror-success); --green-soft: var(--mirror-success-soft);
 --amber: var(--mirror-warning); --amber-soft: var(--mirror-warning-soft); --red: var(--mirror-danger); --red-soft: var(--mirror-danger-soft);
}
html.dark body.agent-research-page {
 --ink: var(--mirror-ink); --muted: var(--mirror-muted); --faint: var(--mirror-faint);
 --canvas: var(--mirror-bg); --surface: var(--mirror-surface); --surface-2: var(--mirror-surface-2);
 --line: var(--mirror-line); --line-strong: var(--mirror-line-strong);
 --red: var(--mirror-danger); --red-soft: var(--mirror-danger-soft); --amber: var(--mirror-warning);
}
.mirror-theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 10px; border: 1px solid var(--mirror-line); border-radius: 7px; background: var(--mirror-surface); color: var(--mirror-ink); cursor: pointer; }
.mirror-theme-toggle svg { width: 20px; height: 20px; }
.mirror-theme-toggle:hover { background: var(--mirror-blue-soft); }
html.dark body:has(.mirror-site-header) :is(.button-primary,.button.primary,.primary-link,.hero-cta) { background: #003ec7; border-color: #003ec7; color: #fff; }
html.dark .qualification-table tbody td:last-child { color: var(--mirror-success); }
.mirror-site-header, .mirror-site-footer { font-family: var(--mirror-sans); color: var(--mirror-ink); box-sizing: border-box; }
.mirror-site-header *, .mirror-site-footer * { box-sizing: border-box; }
.mirror-site-header { position: sticky; top: 0; z-index: 99; width: 100%; background: var(--mirror-bg); border-bottom: 1px solid var(--mirror-line); }
.mirror-header-inner { display: flex; align-items: center; gap: 24px; max-width: 1280px; min-height: 68px; padding: 10px 24px; margin: 0 auto; }
.mirror-identity { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.mirror-home { display: inline-flex; align-items: center; text-decoration: none; }
.mirror-home img { display: block; width: 148px; height: 41px; object-fit: contain; }
.mirror-research-home { display: inline-flex; align-items: center; min-height: 44px; padding-left: 18px; border-left: 1px solid var(--mirror-line); color: var(--mirror-muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.mirror-navigation { margin: 0; padding: 0; border: 0; flex: 1; }
.mirror-navigation-links { display: flex; align-items: center; justify-content: center; gap: 4px; }
.mirror-menu-toggle { display: none; }
.mirror-nav-group { position: relative; padding: 0; margin: 0; border: 0; }
.mirror-nav-group > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 12px; list-style: none; cursor: pointer; color: var(--mirror-muted); border-radius: 7px; font: 600 13px/1.4 var(--mirror-sans); white-space: nowrap; }
.mirror-nav-group > summary::-webkit-details-marker, .mirror-menu-toggle::-webkit-details-marker { display: none; }
.mirror-nav-group summary svg { width: 12px; height: 12px; transition: transform 160ms ease; }
.mirror-nav-group[open] > summary svg { transform: rotate(180deg); }
.mirror-nav-group summary:hover, .mirror-nav-group[open] > summary { color: var(--mirror-blue); background: var(--mirror-blue-soft); }
.mirror-nav-group > summary.is-current { color: var(--mirror-blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 10px; }
.mirror-nav-panel { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 280px; padding: 10px; border: 1px solid var(--mirror-line); border-radius: 12px; background: var(--mirror-surface); box-shadow: 0 16px 36px rgb(19 27 46 / 12%); }
.mirror-nav-panel a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--mirror-ink); text-decoration: none; }
.mirror-nav-panel a:hover, .mirror-nav-panel a[aria-current] { color: var(--mirror-blue); background: var(--mirror-blue-soft); }
.mirror-book-demo { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-height: 44px; padding: 12px 20px; border: 1px solid #3454ae; border-radius: var(--mirror-control-radius); background: linear-gradient(115deg,#0e214e,#25123b); color: #fff; box-shadow: 0 5px 14px -7px #4648d4; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: background 160ms ease, transform 160ms ease; }
.mirror-book-demo:hover { color: #fff; background: #003ec7; transform: translateY(-1px); }
.mirror-book-demo svg, .mirror-footer-signature svg { width: 16px; height: 16px; flex-shrink: 0; }
.mirror-local-nav { display: flex; justify-content: center; gap: 24px; padding: 0 24px; border-top: 1px solid var(--mirror-line); overflow-x: auto; }
.mirror-local-nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--mirror-muted); font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.mirror-local-nav a:hover { color: var(--mirror-blue); }
body:has(.mirror-local-nav) [id] { scroll-margin-top: 128px; }
body:has(.mirror-local-nav) .reading-layout aside { top: 132px; }
/* The footer has its own grid; it never inherits an article's footer layout. */
body footer.mirror-site-footer { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border-top: 1px solid var(--mirror-line); background: var(--mirror-surface); color: var(--mirror-muted); text-align: left; text-transform: none; letter-spacing: normal; }
.mirror-footer-inner { max-width: 1280px; margin: 0 auto; padding: 64px 24px 28px; }
.mirror-footer-grid { display: grid; grid-template-columns: 1.1fr 3fr; gap: 64px; }
.mirror-footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.mirror-footer-brand p { display: block; text-align: left; max-width: 30ch; margin: 16px 0; color: var(--mirror-muted); font-size: 13px; line-height: 1.7; }
.mirror-footer-brand .mirror-footer-title { color: var(--mirror-ink); font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
body footer.mirror-site-footer a { color: var(--mirror-muted); text-decoration: none; font-size: 13px; line-height: 1.6; }
body footer.mirror-site-footer a:hover { color: var(--mirror-blue); text-decoration: underline; text-underline-offset: 4px; }
.mirror-footer-columns { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px; }
.mirror-footer-columns h2 { margin: 0 0 16px; padding: 0; border: 0; color: var(--mirror-ink); font: 600 13px/1.5 var(--mirror-sans); letter-spacing: 0; text-transform: none; }
.mirror-footer-columns ul { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.mirror-footer-columns li { margin: 0; padding: 0; font-size: 13px; }
.mirror-social-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.mirror-footer-bottom { display: flex; align-items: center; gap: 28px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--mirror-line); font-size: 12px; line-height: 1.6; }
.mirror-footer-bottom > div { display: flex; gap: 20px; }
.mirror-footer-bottom a { font-size: 12px; }
.mirror-footer-signature { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
/* Keep evidence and state controls distinct. Only shared direct actions inherit pills. */
body:has(.mirror-site-header) :is(.button, .primary-link, .hero-cta, .run-button) { min-height: var(--mirror-control-height); border-radius: var(--mirror-control-radius); font-family: var(--mirror-sans); font-weight: 600; font-size: 13px; line-height: 1.4; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
body:has(.mirror-site-header) :is(.button-primary, .button.primary, .primary-link, .hero-cta) { background: var(--mirror-blue); border-color: var(--mirror-blue); color: #fff; box-shadow: none; }
body:has(.mirror-site-header) :is(.button-primary, .button.primary, .primary-link, .hero-cta):hover:not(:disabled) { background: #002c91; border-color: #002c91; color: #fff; }
body:has(.mirror-site-header) :is(button,select):disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
body:has(.mirror-site-header) :is(a,button,summary,select,input):focus-visible { outline: 3px solid #5d76ff; outline-offset: 4px; }
.mirror-site-header a:hover, body footer.mirror-site-footer a:hover { text-underline-offset: 4px; }
@media (min-width:1120px) { .mirror-navigation:not([open]) > .mirror-navigation-links { display: flex; } }
@media (max-width:1119px) {
 .mirror-header-inner { gap: 16px; }
 .mirror-navigation { order: 3; flex: 0 0 auto; margin-left: 0; }
 .mirror-book-demo { margin-left: auto; }
 .mirror-menu-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; list-style: none; border: 1px solid var(--mirror-line); border-radius: 7px; color: var(--mirror-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
 .mirror-menu-toggle svg { width: 18px; height: 18px; }
 .mirror-navigation-links { justify-content: stretch; position: absolute; top: 68px; right: 24px; display: grid; gap: 0; width: min(380px,calc(100vw - 48px)); max-height: calc(100dvh - 90px); overflow-y: auto; padding: 12px; border: 1px solid var(--mirror-line); border-radius: 12px; background: var(--mirror-surface); box-shadow: 0 16px 36px rgb(19 27 46 / 12%); }
 .mirror-navigation:not([open]) > .mirror-navigation-links { display: none; }
 .mirror-nav-group > summary { min-height: 48px; justify-content: space-between; }
 .mirror-nav-group > summary.is-current { text-decoration: none; }
 .mirror-nav-panel { position: static; transform: none; width: 100%; margin: 0; padding: 0 8px 8px; border: 0; border-radius: 0; box-shadow: none; }
 .mirror-nav-panel a { padding-left: 16px; }
 .mirror-footer-grid { grid-template-columns: 1fr; gap: 40px; }
 .mirror-footer-brand { display: flex; flex-direction: column; align-items: flex-start; }
.mirror-footer-brand p { display: block; text-align: left; max-width: 45ch; }
 .mirror-footer-bottom { flex-wrap: wrap; gap: 16px 24px; }
}
@media (max-width:600px) {
 .mirror-header-inner { padding-inline: 20px; gap: 8px; }
 .mirror-theme-toggle { width: 40px; height: 44px; }
 .mirror-identity { gap: 10px; }
 .mirror-home img { width: 112px; height: 32px; }
 .mirror-research-home { border: 0; padding: 0; font-size: 11px; }
 .mirror-identity { flex-direction: column; align-items: flex-start; gap: 0; }
 .mirror-research-home { min-height: 22px; }
 .mirror-book-demo { padding: 10px 14px; font-size: 12px; min-height: 40px; }
 .mirror-book-demo svg { display: none; }
 .mirror-menu-toggle { padding: 10px; }
 .mirror-menu-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .mirror-navigation-links { right: 20px; width: calc(100vw - 40px); top: 76px; }
 .mirror-local-nav { justify-content: flex-start; padding-inline: 20px; gap: 20px; }
 .mirror-footer-inner { padding: 40px 20px 24px; }
 .mirror-footer-columns { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 20px; }
 .mirror-footer-bottom { display: grid; gap: 18px; margin-top: 32px; }
 .mirror-footer-signature { margin-left: 0; }
}
@media (max-width:380px) { .mirror-header-inner { padding-inline: 12px; gap: 6px; } .mirror-book-demo { padding-inline: 8px; font-size: 11px; } .mirror-home img { width: 98px; } }
@media (prefers-reduced-motion:reduce) { .mirror-site-header *, body:has(.mirror-site-header) :is(.button,.primary-link,.hero-cta,.run-button) { transition: none; scroll-behavior: auto; } }

/* Theme variants for earlier editorial figures with fixed light surfaces. */
html.dark body[data-mirror-page="encrypted-inference"] .site-header { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .hero-node,
html.dark body[data-mirror-page="encrypted-inference"] .hero-runtime { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .runtime-loop b { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .decode-cycle-stage { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .decoder-graph button { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .decoder-block-label { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .token-runtime { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .runtime-cells b { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .continuity-equation code { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .cycle-model-steps b { background: var(--mirror-surface); }
html.dark body[data-mirror-page="encrypted-inference"] .cycle-kv-loop { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .site-header { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .hero-party { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .enclave-assets div { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .hero-compare-label,
html.dark body[data-mirror-page="double-blind-evaluation"] .hero-compare-node,
html.dark body[data-mirror-page="double-blind-evaluation"] .hero-compare-rule { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .runtime-payload { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .scale-shards > div { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .scale-state,
html.dark body[data-mirror-page="double-blind-evaluation"] .scale-fhe-lane { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .scale-eval-plane { background: var(--mirror-surface); }
html.dark body[data-mirror-page="double-blind-evaluation"] .fhe-scale-formula code { background: var(--mirror-surface); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .tldr p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] blockquote { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .reading-column p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .inline-source { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .plain-language-note { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .role-lens-intro { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .term-explanation small { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .classification-example dt { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .classification-example dd { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .shared-boundary p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .implementation-note { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .worked-example-rule { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .section-transition { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .astra-summary { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .control-stages p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .monitoring-rule { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .reward-summary span { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .recurring-mechanism > p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .article-prose p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .route-map-outcome p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .route-map-outcome > strong { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .case-narrative .case-mirror-rule h4 { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .dataflow-note { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .architecture-detail pre { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .control-detail strong { color: var(--mirror-muted); }
html.dark body[data-mirror-page="goal-driven-agent-security"] .coverage-grid li { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] .hero-definition { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] article p { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] td { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] .formal { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] .mechanism-evidence dd { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] .protocol-steps li > code { color: var(--mirror-muted); }
html.dark body[data-mirror-page="agent-security-scenarios"] .properties dd { color: var(--mirror-muted); }

html.dark :is(.cycle-exact,.path-rail > div.avoidable) { background: var(--mirror-warning-soft); }
html.dark :is(.cycle-exact > span,.cycle-exact > code,.cycle-arrow-cross span) { color: var(--mirror-warning); }
html.dark .path-rail > div.fused-step { background: var(--mirror-success-soft); }
html.dark body[data-mirror-page="double-blind-evaluation"] :is(.boundary-section,.scale-section,.integrity-note) { background: var(--mirror-surface-2); }
html.dark body[data-mirror-page="double-blind-evaluation"] :is(.runtime-contract,.scale-plane-head) { background: #0c1834; color: #fff; }
html.dark body[data-mirror-page="double-blind-evaluation"] :is(.boundary-tabs button.is-active,.scale-tabs button.is-active,.enclave-label b,.runtime-head b,.protocol-stack > article.is-active > span,.scale-runtime-head b) { background: #003ec7; }
html.dark body[data-mirror-page="agent-security-scenarios"] { --mirror-faint: #949db3; --faint: #949db3; }
html.dark body[data-mirror-page="agent-security-scenarios"] :is(th,.formal) { background: var(--mirror-surface-2); }
html.dark body[data-mirror-page="agent-security-scenarios"] .lab-cta { background: #003ec7; }
html.dark .authority-route-stage { background: var(--mirror-surface); }
html.dark .boundary-journey:not(.is-live) { background: var(--mirror-surface); }
html.dark .flow-origin { background: #0c1020; border-color: var(--mirror-line); color: #eef0ff; }
@media(max-width:600px) { .boundary-journey { top: 76px; } }
@media(max-width:380px) { .boundary-journey { grid-template-columns: repeat(5,minmax(0,1fr)); padding-inline: 4px; } .boundary-journey a { min-width: 0; padding-inline: 3px; grid-template-columns: 12px minmax(0,1fr); gap: 2px; } }
html.dark body[data-mirror-page="double-blind-evaluation"] .scale-plane-head span { background: #003ec7; }
html.dark body[data-mirror-page="double-blind-evaluation"] .mirror-flow i b { background: var(--mirror-bg); color: var(--mirror-blue); }
html.dark :is(.reflection-contract > i,.lane-flow > i) { color: var(--mirror-faint); }
