/* Wiring exception: fit the approved seven entries and expose every group on touch screens. */
[hidden]{display:none!important}
[data-nav-toggle]{display:none}
body[data-v3-template="research-paper.html"]{--nav:#2a2523;--navfg:#f3ead9}

body[data-v3-template="research-paper.html"] [data-direct-nav]{background:var(--nav);color:var(--navfg)}
[data-direct-nav] .menu .box{color:var(--ink);background:var(--card)}
[data-direct-nav] .menu .box a:hover{background:var(--paper-2,var(--soft))}
body[data-v3-template="research-paper.html"] footer{max-width:1120px;margin:0 auto;padding:0 clamp(20px,5vw,72px) 48px;color:var(--muted);font-size:.9rem;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
body[data-v3-template="research-paper.html"] footer a{color:inherit;text-decoration:none;border-bottom:1px solid transparent}
body[data-v3-template="research-paper.html"] footer a:hover{border-color:currentColor}
[data-direct-nav] .direct-group-open .menu{display:block}
[data-direct-nav]{flex-wrap:nowrap;justify-content:normal}
[data-direct-nav]>.it,[data-direct-nav]>.home{padding:0}
[data-direct-nav] a{color:inherit;text-decoration:none}
[data-direct-nav] .login{color:var(--nav,#2a2523)}
[data-direct-nav] .lang a{padding:0;font-size:inherit}
[data-direct-nav] .menu{margin:0;width:auto;border:0;border-radius:0;box-shadow:none;overflow:visible;grid-template-columns:none;background:transparent}
[data-direct-nav] .menu{max-height:calc(100dvh - 90px);overflow-y:auto}
@media(max-width:900px){
 [data-direct-nav]{flex-wrap:wrap;width:calc(100% - 24px);justify-content:space-between}
 [data-direct-nav] [data-nav-toggle]{display:block;margin-left:auto}
 [data-direct-nav]>.it,[data-direct-nav]>.lang{display:none}
 [data-direct-nav].direct-open>.it{display:block;flex-basis:100%}
 [data-direct-nav].direct-open>.lang{display:block}
 [data-direct-nav] .menu{position:static;padding-top:0;min-width:0;display:none!important;max-height:none}
 [data-direct-nav] .direct-group-open .menu{display:block!important}
 /* #38: the open drawer is a rounded panel, not the 999px pill; it scrolls inside the viewport and keeps language and Login inside. */
 [data-direct-nav].direct-open{border-radius:24px;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto;overscroll-behavior:contain;padding-bottom:12px}
 [data-direct-nav].direct-open>.it>a,[data-direct-nav].direct-open>.lang{opacity:1}
 [data-direct-nav].direct-open>.lang{flex-basis:100%;padding:9px 15px}
 [data-direct-nav].direct-open>a.login{margin:4px 0 0 8px}
}
@media(max-width:900px) and (prefers-reduced-motion:reduce){[data-direct-nav].direct-open,[data-direct-nav].direct-open *{transition:none!important;animation:none!important}}
/* #35: copy-button cards (.prompt, .cite) keep one button width and position; the label swap cannot resize them. Phones stack the button under the text. */
.prompt .pill,.cite .pill{width:8rem;flex:none;justify-content:center}
@media(max-width:640px){.prompt,.cite{flex-direction:column;align-items:flex-start}.prompt code,.cite code{width:100%;overflow-wrap:anywhere}}
