/* Law reader navigation: identity and tools remain outside the scrolling index. */
.mley-law-sidebar [hidden] { display: none !important; }
.mley-law-sidebar__identity { padding: 0 .85rem .5rem; flex-shrink: 0; }
.mley-law-sidebar__identity a { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-color); font-size: .85rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.mley-law-sidebar__identity span { display: block; font-size: .7rem; color: var(--text-muted); margin-top: .25rem; overflow-wrap: anywhere; }
.mley-law-sidebar__search { display: flex; margin: 0 .75rem .55rem; border: 1px solid var(--border-color); border-radius: .45rem; flex-shrink: 0; background: var(--bg-surface-2); }
.mley-law-sidebar__search input { width: 0; min-width: 0; flex: 1; border: 0; background: transparent; color: var(--text-color); padding: .55rem; font: inherit; font-size: .8rem; }
.mley-law-sidebar__search button { border: 0; border-radius: .4rem; min-width: 40px; background: transparent; color: var(--accent-color); cursor: pointer; }
.mley-law-sidebar__index { padding: 0 .5rem .6rem; }
.mley-law-sidebar .sidebar-content > .mley-law-sidebar__index { overflow-y: auto; }
.mley-law-sidebar__locate { display: block; margin: .2rem .25rem .4rem; padding: .45rem; color: var(--accent-color); background: transparent; border: 0; font: inherit; font-size: .75rem; text-align: left; cursor: pointer; }
.mley-law-sidebar__status { font-size: .75rem; padding: .4rem; color: var(--text-muted); }
.mley-law-sidebar .mley-law-tree ul { margin: 0 0 .15rem .5rem; padding-left: .4rem; border-left: 1px solid var(--border-color); }
.mley-law-tree li { min-width: 0; }
.mley-law-tree a, .mley-law-tree button { display: block; width: 100%; box-sizing: border-box; min-height: 36px; padding: .5rem .55rem; color: var(--text-color); border: 0; border-radius: .3rem; background: transparent; font: inherit; font-size: .78rem; line-height: 1.35; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.mley-law-tree button { position: relative; padding-right: 1.2rem; font-weight: 600; }
.mley-law-tree button::after { content: ''; position: absolute; top: .85rem; right: .4rem; width: 6px; height: 6px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(-45deg); }
.mley-law-tree button[aria-expanded=true]::after { transform: rotate(45deg); }
.mley-law-tree small { display: block; font-size: .68rem; font-weight: 400; color: var(--text-muted); margin-top: .15rem; }
.mley-law-tree a:hover, .mley-law-tree button:hover { background: var(--bg-surface-2); }
.mley-law-tree a[aria-current] { color: var(--accent-color); background: var(--accent-color-soft); font-weight: 700; box-shadow: inset 3px 0 var(--accent-color); }
.mley-law-sidebar :is(a,button,input,summary):focus-visible { outline: 2px solid var(--accent-color); outline-offset: -2px; }
.mley-law-sidebar__tools summary { font-size: .78rem; font-weight: 600; padding: .65rem .85rem; cursor: pointer; }
.mley-law-sidebar__tools > div { max-height: 35vh; overflow-y: auto; padding: 0 .85rem .5rem; }
.mley-law-sidebar__tools a { display: block; padding: .5rem 0; font-size: .76rem; line-height: 1.4; color: var(--text-color); overflow-wrap: anywhere; }
.mley-law-sidebar__tools .mley-sidebar-official-links { margin: .35rem 0 0; padding: .35rem 0 0; }
.mley-law-sidebar .mley-saved-card { border: 0; border-radius: 0; border-bottom: 1px solid var(--border-color); background: transparent; }
.mley-saved-scope { display: flex; gap: .3rem; margin-bottom: .6rem; }
.mley-saved-scope button { flex: 1; padding: .45rem .4rem; min-height: 36px; background: transparent; border: 1px solid var(--border-color); border-radius: .4rem; color: var(--text-color); font: inherit; font-size: .75rem; cursor: pointer; }
.mley-saved-scope button[aria-pressed=true] { background: var(--accent-color-soft); color: var(--accent-color); border-color: var(--accent-color); }
@media (max-width:1080px) {
 .mley-law-sidebar :is(.mley-law-tree a,.mley-law-tree button,.mley-law-sidebar__search button,.mley-law-sidebar__locate,.mley-saved-tabs button,.mley-saved-remove,.mley-saved-scope button,.mley-sidebar-close) { min-height: 44px; }
 .mley-law-sidebar .mley-saved-remove, .mley-law-sidebar__search button { min-width: 44px; }
 .mley-law-sidebar__search input { font-size: 16px; }
 .mley-law-sidebar__tools summary { min-height: 44px; box-sizing: border-box; }
}



.mley-law-sidebar__locate { position: sticky; top: 0; z-index: 1; width: 100%; margin-inline: 0; background: var(--bg-surface); box-shadow: 0 1px 0 var(--border-color); }
