/* R05: compact theme control and an accessible return to the page top. */
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
.header-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;min-height:42px;padding:10px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--muted);font-size:11px;font-weight:650;line-height:1.4;white-space:nowrap;transition:color .2s,border-color .2s,background .2s}
.theme-toggle:hover{color:var(--blue);border-color:#8caec9;background:#00529b06}
.theme-toggle>svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.theme-toggle .theme-icon-sun{display:none}
html[data-theme="dark"] .theme-toggle .theme-icon-moon{display:none}
html[data-theme="dark"] .theme-toggle .theme-icon-sun{display:block}
.theme-toggle[hidden],.back-to-top[hidden]{display:none}
.hero h1[tabindex="-1"]:focus{outline:none}
.footer-top>div{padding-right:42px;flex-wrap:wrap}
.back-to-top{--top-progress:0;position:fixed;right:calc(24px + env(safe-area-inset-right,0px));bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:45;width:54px;height:54px;display:grid;place-items:center;padding:0;border:1px solid #477aaa;border-radius:50%;background:#00529b;color:#fff;box-shadow:0 7px 25px #00213e24;transition:background .2s,color .2s,box-shadow .2s;touch-action:manipulation}
.back-to-top>.back-to-top-arrow{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.back-to-top-progress{position:absolute;inset:3px;width:46px;height:46px;transform:rotate(-90deg);fill:none;stroke-width:1.4;pointer-events:none}
.back-to-top-progress .progress-track{stroke:#fff3}
.back-to-top-progress .progress-value{stroke:#ff9b69;stroke-dasharray:1;stroke-dashoffset:calc(1 - var(--top-progress));stroke-linecap:round}
.back-to-top-label{position:absolute;right:64px;top:50%;transform:translate(5px,-50%);background:#17344d;color:#fff;border:1px solid #36526c;border-radius:5px;padding:5px 10px;font-size:10px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.back-to-top:hover,.back-to-top:focus-visible{background:#ff671f;color:#00213e;border-color:#ff8d59;box-shadow:0 8px 25px #ff671f26}
.back-to-top:hover>.back-to-top-arrow{transform:translateY(-2px)}
.back-to-top:hover .progress-value,.back-to-top:focus-visible .progress-value{stroke:#00213e}
.back-to-top:hover>.back-to-top-label,.back-to-top:focus-visible>.back-to-top-label{opacity:1;transform:translate(0,-50%)}
html[data-theme="dark"] .back-to-top{background:#1a2a40;border-color:#425875;color:#f1f7ff;box-shadow:0 7px 25px #0005}
html[data-theme="dark"] .back-to-top:hover,html[data-theme="dark"] .back-to-top:focus-visible{background:#ff671f;color:#00213e;border-color:#ff8d59}
.motion-active .back-to-top:not([hidden]){animation:wm-top-in .22s ease-out both}
@keyframes wm-top-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1190px){.header-actions{gap:10px}}
@media(max-width:760px){.header-actions{margin-left:auto;gap:10px}.header-actions .header-cta{display:none}.theme-toggle{width:42px;height:42px;min-width:42px}.header-actions .menu-toggle{margin-right:-9px}.back-to-top{width:50px;height:50px;right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px))}.back-to-top-progress{inset:3px;width:42px;height:42px}.back-to-top-label{display:none}.site-footer{padding-bottom:80px}}
@media(max-width:400px){.header-actions{gap:7px}}
@media(prefers-reduced-motion:reduce){.back-to-top,.back-to-top-arrow,.back-to-top-label,.theme-toggle{animation:none!important;transition:none!important}}
@media print{.theme-toggle,.back-to-top{display:none!important}}
