/* R40 — grouped navigation only. Hero, dock geometry and ball/rings untouched. */
/* Natural-scroll hubs: header owns its top inset; root owns anchor clearance. */
body.r40-hub { padding-top:0; }
body.r40-hub .site-header { height:calc(var(--header-h) + env(safe-area-inset-top,0px)); padding-top:env(safe-area-inset-top,0px); }
html:has(body.r40-hub) { scroll-padding-top:calc(var(--header-h) + env(safe-area-inset-top,0px) + 12px); }
@media(max-width:960px) { html:has(body.r40-hub) { --header-h:62px; } }
.sheet-r40 { --r40-pad-top:max(12px,env(safe-area-inset-top,0px)); --r40-pad-bottom:max(12px,env(safe-area-inset-bottom,0px)); padding:var(--r40-pad-top) 12px var(--r40-pad-bottom); align-items:center; justify-items:center; }
.sheet-r40.is-open { display:grid; }
.sheet-r40 .sheet-panel { position:relative; inset:auto; width:min(100%,720px); max-height:calc(100vh - var(--r40-pad-top) - var(--r40-pad-bottom)); max-height:calc(100dvh - var(--r40-pad-top) - var(--r40-pad-bottom)); display:flex; flex-direction:column; overflow:hidden; padding:0; border:1px solid #334559; border-radius:20px; background:#0b233b; transform:none; opacity:0; transition:opacity .2s ease; box-shadow:0 28px 90px #0008; }
.sheet-r40.is-visible .sheet-panel { transform:none; opacity:1; }
.sheet-r40 .sheet-head { flex:0 0 auto; width:100%; margin:0; padding:20px 24px 16px; border-bottom:1px solid #ffffff16; gap:14px; }
.sheet-r40 .sheet-head strong { font-size:clamp(1.22rem,4vw,1.55rem); font-variation-settings:"wdth" 104; }
.sheet-r40 .sheet-head p { margin:5px 0 0; color:#b8c4cf; font-size:.8rem; line-height:1.5; }
.sheet-r40 .sheet-close { flex:0 0 44px; background:#ffffff14; }
.sheet-r40 .r40-menu-scroll { min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:0 24px; }
.sheet-r40 .sheet-grid { display:block; width:100%; margin:0; }
.sheet-r40 .r40-menu-group { border-bottom:1px solid #ffffff18; }
.sheet-r40 .r40-menu-group:last-child { border-bottom:0; }
.sheet-r40 summary { display:grid; grid-template-columns:minmax(0,1fr) 28px; align-items:center; gap:12px; min-height:78px; padding:14px 0; cursor:pointer; list-style:none; }
.sheet-r40 summary::-webkit-details-marker { display:none; }
.sheet-r40 .r40-menu-title { display:block; font-size:clamp(1.05rem,4vw,1.2rem); font-weight:760; line-height:1.2; }
.sheet-r40 .r40-menu-description { display:block; margin-top:5px; font-size:.78rem; line-height:1.5; color:#b8c4cf; }
.sheet-r40 .r40-menu-plus { display:grid; place-items:center; width:28px; height:28px; border:1px solid #ffffff34; border-radius:50%; color:#e6b479; font-size:1.2rem; line-height:1; }
.sheet-r40 details[open] .r40-menu-plus { color:#0b233b; background:#e6b479; border-color:#e6b479; }
.sheet-r40 details[open] .r40-menu-title, .sheet-r40 .is-current-group .r40-menu-title { color:#efc38e; }
.sheet-r40 .r40-menu-links { list-style:none; display:grid; margin:0 0 12px; padding:0 0 0 15px; border-left:2px solid #d6a36d; }
.sheet-r40 .r40-menu-links a { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:46px; padding:9px 12px; color:#f7f3eb; font-size:.93rem; line-height:1.4; text-decoration:none; border-radius:8px; }
.sheet-r40 .r40-menu-links a:hover, .sheet-r40 .r40-menu-links a[aria-current=page] { background:#ffffff0e; color:#efc38e; }
.sheet-r40 .r40-menu-links a span:last-child { color:#d1a36b; }
.sheet-r40 .r40-menu-foot { flex:0 0 auto; padding:12px 24px; border-top:1px solid #ffffff18; display:flex; flex-wrap:wrap; align-items:center; gap:4px 18px; }
.sheet-r40 .r40-menu-foot a { display:inline-flex; align-items:center; min-height:44px; color:#bdc9d3; font-size:.875rem; text-decoration:none; }
.sheet-r40 .r40-menu-foot a:first-child { margin-right:auto; color:#f7f3eb; font-weight:700; }
.sheet-r40 summary:focus-visible, .sheet-r40 a:focus-visible { outline:3px solid #f4ca88; outline-offset:2px; }
.r40-footer .r40-footer-top { display:grid; grid-template-columns:1fr auto; align-items:start; gap:24px; padding-block:6px 22px; }
.r40-footer .r40-footer-brand p { margin:12px 0 0; max-width:46ch; font-size:.88rem; }
.r40-footer .r40-footer-links { display:grid; gap:0; }
.r40-footer .r40-footer-links a { display:flex; align-items:center; min-height:44px; gap:16px; justify-content:space-between; color:#eef1f4; text-decoration:none; font-size:.88rem; }
.r40-footer .r40-footer-links a span { color:#dfb583; }
.r40-footer .footer-bottom { font-size:.875rem; color:#c4ced8; }
@media(max-width:600px) {
 .sheet-r40 .sheet-head { padding:17px 18px 14px; }
 .sheet-r40 .r40-menu-scroll { padding:0 18px; }
 .sheet-r40 .r40-menu-foot { padding:8px 18px; gap:2px 14px; }
 .r40-footer .r40-footer-top { grid-template-columns:1fr; gap:18px; }
 .r40-footer .r40-footer-links { grid-template-columns:1fr 1fr; gap:0 20px; }
}
@media(max-height:480px) and (orientation:landscape) {
 .sheet-r40 .sheet-head { padding:10px 20px; }
 .sheet-r40 .sheet-head p { display:none; }
 .sheet-r40 .r40-menu-foot { padding:0 20px; }
 .sheet-r40 summary { min-height:60px; padding:10px 0; }
}
@media(prefers-reduced-motion:reduce) { .sheet-r40 .sheet-panel, .sheet-r40 .sheet-backdrop { transition:none; } }
