.theme-menu {position:relative;margin-left:auto}
.theme-menu summary {display:flex;align-items:center;justify-content:center;gap:7px;min-width:40px;min-height:40px;padding:8px;border:1px solid var(--color-edge-gray);border-radius:4px;list-style:none;font-size:14px;font-weight:500}
.theme-menu summary::-webkit-details-marker{display:none}
.theme-menu fieldset {position:absolute;right:0;top:calc(100% + 8px);width:274px;margin:0;padding:16px;background:var(--color-paper);border:1px solid var(--color-edge-gray);border-radius:6px;box-shadow:0 8px 24px #0002}
.theme-menu legend {float:left;font-weight:600;width:100%;margin:0 0 8px;padding:0}
.theme-menu label {display:flex;align-items:center;gap:8px;padding:8px 0;cursor:pointer;clear:both;font-size:14px}
.theme-menu input {accent-color:var(--action);width:18px;height:18px;margin:0}
.theme-note {margin:0;padding:7px 16px;text-align:center;color:var(--muted);background:var(--tint);font-size:12px;border-bottom:1px solid var(--rule)}
html[data-theme="dark"] {
  color-scheme:dark;
  --select-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4e4fa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --color-paper:#0c1423;--color-ink:#e8eff9;--color-graphite:#bac8dd;--color-steel:#a4b5cc;
  --color-rule-gray:#2d3c52;--color-edge-gray:#4e6380;
  --primary:#b9d2f5;--action:#2862d9;--tint:#14243b;
  --color-forest-ledger:#080f1b;--color-plum-ledger:#1b3556;
}
[data-theme="dark"] header,[data-theme="dark"] .dropdown div,[data-theme="dark"] #mobilemenu {background:#0f1b2c}
[data-theme="dark"] .architecture-hero {background-color:#0c1728;background-image:linear-gradient(90deg,#101c30 0%,#101c30e8 32%,#11243b15 73%),linear-gradient(#5079a922 1px,transparent 1px),linear-gradient(90deg,#5079a922 1px,transparent 1px)}
[data-theme="dark"] .architecture-hero .pitch em {color:#80b1ff}
[data-theme="dark"] .architecture-hero .lead {color:#bac8dd}
[data-theme="dark"] .architecture-hero+.wrap>.assistant {background:#14243b}
[data-theme="dark"] .selectwrap select {background:#0c1728;color:#e8eff9}
[data-theme="dark"] .helpicon,[data-theme="dark"] .menubtn {background:#182a43;color:#d4e4fa}
[data-theme="dark"] .architecture-hero .figurehead,[data-theme="dark"] .architecture-hero figcaption {color:#a8c2e5}
[data-theme="dark"] .diagram-link .callout {stroke:#789dcd;fill:#152a45}
[data-theme="dark"] .callout text {fill:#b9d2f5}
[data-theme="dark"] .diagram-link:is(:hover,:focus-visible,:active) .callout text {fill:white}
[data-theme="dark"] .storage-drawing .plate-top {fill:#203c5e}
[data-theme="dark"] .storage-drawing .plate-front {fill:#2d5784}
[data-theme="dark"] .storage-drawing .plate-side {fill:#27496e}
[data-theme="dark"] .storage-drawing .floating-cloud .cloud-face {fill:#8fbaf1}
[data-theme="dark"] .diagram-link:is(:hover,:focus-visible,:active) .cloud-face {fill:#c6e0ff}
[data-theme="dark"] .diagram-link:is(:hover,:focus-visible,:active) .plate-top {fill:#376699}
[data-theme="dark"] .diagram-link:is(:hover,:focus-visible,:active) .plate-front {fill:#4788c9}
[data-theme="dark"] .diagram-link:is(:hover,:focus-visible,:active) .plate-side {fill:#396a9f}
[data-theme="dark"] .btn:focus-visible,[data-theme="dark"] a:focus-visible {outline-color:#a9caff}
@media(max-width:1030px){.head{gap:12px}.desktopnav{gap:10px}.theme-menu summary span{display:none}.theme-menu{margin-left:0}}
@media(max-width:880px){.theme-menu{margin-left:auto}.head .headerbtn{margin-left:0}}
@media(max-width:600px){.head{gap:8px}.head .brand{font-size:18px;gap:6px}.head .brand svg{width:30px}.head .menubtn{padding:8px}.theme-menu summary{min-width:36px;min-height:38px;padding:8px}}
@media(max-width:380px){.head .brand{font-size:16px}.head .brand svg{width:26px}}

[data-theme="dark"] .cmp select,[data-theme="dark"] .cmp button {background-color:#14243b;color:var(--ink)}
[data-theme="dark"] .cmp button[aria-pressed="true"] {background:var(--action);color:white}
[data-theme="dark"] .cmp-table,[data-theme="dark"] #cmp-pair {background:var(--color-paper)}
[data-theme="dark"] .cmp .cmp-link {background:transparent}
[data-theme="dark"] .cmp-toggle input {accent-color:#80b1ff}
[data-theme="dark"] .expert-initials {background:#264d7e;color:white}
[data-theme="dark"] .skip {background:var(--color-paper);color:var(--ink)}
[data-theme="dark"] .palette-bar {background:#132135}
[data-theme="dark"] .palette-choices a:is(:hover,[aria-current]) {background:#213953;border-color:#83a7d4}
[data-theme="dark"] .cloud-option img {background-color:#14243b;background-image:linear-gradient(#33547855 1px,transparent 1px),linear-gradient(90deg,#33547855 1px,transparent 1px)}
[data-theme="dark"] .cloud-option span {color:#94bdff}
