/* Scoped to the HX root; shared shell, imagery and article geometry stay intact. */
.hx-root-ux{--hx-shell-offset:var(--header-height,80px);--hx-link:var(--theme-link)}
.hx-root-ux .hx-early-actions{display:flex;flex-wrap:wrap;gap:.4rem 1rem;margin:1rem 0}
.hx-root-ux .hx-early-actions a{display:inline-flex;align-items:center;min-height:44px;padding:.25rem .65rem;border:1px solid var(--theme-border);border-radius:var(--r-btn);color:var(--hx-link);background:var(--surface);font-weight:600;text-underline-offset:.2em;box-sizing:border-box}
.hx-root-ux .hx-local-navigation{position:sticky;top:var(--hx-shell-offset);z-index:30;margin-block:.5rem 1rem;background:var(--surface,#fff);border-block:1px solid var(--hx-line)}
.hx-root-ux .hx-local-menu>summary{display:flex;align-items:center;gap:.7rem;min-height:48px;padding:.25rem .7rem;box-sizing:border-box;cursor:pointer;color:var(--hx-link);font-weight:600}
.hx-root-ux .hx-local-menu>summary::before{content:'▾';flex:none}
.hx-root-ux .hx-local-menu[open]>summary::before{content:'▴'}
.hx-root-ux [data-hx-current]{margin-left:auto;font-size:.85rem;font-weight:400;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;min-width:0}
.hx-root-ux .hx-local-menu .hx-reference-toc{position:absolute;top:100%;left:0;right:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 .7rem;margin:0;padding:.6rem .7rem;background:var(--surface,#fff);border:1px solid var(--hx-line);box-shadow:0 5px 10px #162d391c;max-height:calc(100dvh - var(--hx-shell-offset) - 140px);overflow:auto}
.hx-root-ux .hx-reference-toc a{padding:.3rem;min-height:44px;text-decoration:none}
.hx-root-ux .hx-reference-toc a[aria-current=location]{font-weight:700;color:var(--theme-link-hover);background:var(--theme-soft-bg)}
/* The shared translucent focus ring is a halo; use the existing solid theme link for the outline. */
.hx-root-ux :is(a,button,input,summary):focus-visible{outline:3px solid var(--theme-link);outline-offset:3px}
.hx-root-ux :is(.hx-overview-group,.hx-reference-section,.hx-subtopic,.hx-comparison,.hx-tools,#contents,#hx-topic-query){scroll-margin-top:calc(var(--hx-shell-offset) + 68px)}
.hx-root-ux .hx-index-columns{columns:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem 1.2rem}
.hx-root-ux .hx-index-columns>div{margin:0;min-width:0}
.hx-root-ux [data-hx-group-toggle],.hx-root-ux [data-hx-expand-all]{font:inherit;text-align:left;color:var(--hx-link);background:var(--surface);border:1px solid var(--theme-border);border-radius:var(--r-btn);min-height:44px;padding:.5rem .65rem;cursor:pointer;box-sizing:border-box}
.hx-root-ux :is(.hx-early-actions a,[data-hx-group-toggle]:enabled,[data-hx-expand-all]:enabled):hover{background:var(--btn-ghost-bg-hover);color:var(--theme-link-hover)}
.hx-root-ux :is(.hx-early-actions a,[data-hx-group-toggle]:enabled,[data-hx-expand-all]:enabled):active{background:var(--btn-ghost-bg-active);color:var(--theme-link-hover)}
.hx-root-ux :is([data-hx-group-toggle],[data-hx-expand-all]):disabled{color:var(--muted);background:var(--surface);border-color:var(--line);cursor:default}
.hx-root-ux [data-hx-group-toggle]{width:100%}
.hx-root-ux [data-hx-group-toggle]::after{content:' +';float:right}
.hx-root-ux [data-hx-group-toggle][aria-expanded=true]::after{content:' −'}
.hx-root-ux [data-hx-group-toggle] .hx-group-name{display:inline;line-height:1.5}
.hx-root-ux [data-hx-group-toggle] .hx-group-icon{vertical-align:middle;margin-right:.3rem}
.hx-root-ux .hx-index-columns a{display:flex;align-items:center;min-height:44px;padding:.3rem .6rem;box-sizing:border-box}
.hx-root-ux .hx-tools{border-block:1px solid var(--hx-line);padding:1rem 0;margin:1.2rem 0 1.5rem}
.hx-root-ux .hx-tools h2{font-size:1.25rem;margin:0 0 .5rem}
.hx-root-ux .hx-tools>p{font-size:1rem;line-height:1.55;max-width:75ch;margin:0 0 .6rem}
.hx-root-ux .hx-tools ul{margin:0;padding:0;list-style:none}
.hx-root-ux .hx-tools li{padding:.55rem 0;font-size:1rem;line-height:1.5}
.hx-root-ux .hx-tools li p{margin:.15rem 0 0;font-size:.95rem;line-height:1.5;max-width:75ch;color:var(--hx-muted)}
.hx-root-ux .hx-tools a{display:inline-flex;align-items:center;min-height:44px;color:var(--hx-link);font-weight:600;text-underline-offset:.2em}
@media(max-width:600px){.hx-root-ux .hx-local-menu .hx-reference-toc,.hx-root-ux .hx-index-columns{grid-template-columns:minmax(0,1fr)}.hx-root-ux .hx-early-actions{gap:.4rem}.hx-root-ux .hx-early-actions a{font-size:.9rem;padding:.25rem .45rem}.hx-root-ux .hx-local-menu>summary{gap:.4rem;padding-inline:.5rem}.hx-root-ux [data-hx-current]{max-width:58%}}
@media(prefers-reduced-motion:reduce){.hx-root-ux{scroll-behavior:auto}}
