/* ANANFX Academy — Collapsed / Expanded Persistent Sidebar System v1.0
   Behavior scope only. Active visual intentionally preserves Sidebar Highlight v1.1: transparent/white + filled black icon + black label. */
html[data-sidebar-state="collapsed"]{--yt-ref-rail-w:72px;--rail-item-w:72px}
html[data-sidebar-state="expanded"]{--yt-ref-rail-w:176px;--rail-item-w:176px}
html[data-sidebar-state] body .app-rail.shared-sidebar{position:fixed;left:0;top:var(--yt-ref-header-h);bottom:0;width:var(--yt-ref-rail-w);z-index:900;display:flex;flex-direction:column;align-items:stretch;padding:0;overflow-y:auto;overflow-x:visible;background:var(--brand-white);border-right:1px solid var(--color-border);transition:width .16s ease}
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link{position:relative;inset:auto;flex:0 0 var(--rail-item-h);height:var(--rail-item-h);min-height:var(--rail-item-h);margin:0;color:#0F0F0F;text-decoration:none;font-weight:500;box-sizing:border-box;transition:background-color .12s ease}
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link img{display:block;flex:0 0 24px;width:24px;height:24px;object-fit:contain;filter:none;transform:none}
html[data-sidebar-state="collapsed"] body .app-rail.shared-sidebar>.shared-sidebar-link{width:72px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;border-radius:10px;font-size:10px;line-height:14px;white-space:nowrap}
html[data-sidebar-state="collapsed"] body .app-rail.shared-sidebar>.shared-sidebar-link .shared-sidebar-label{display:block;max-width:68px;overflow:hidden;text-overflow:clip;white-space:nowrap;text-align:center}
html[data-sidebar-state="expanded"] body .app-rail.shared-sidebar>.shared-sidebar-link{width:176px;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:0 16px;border-radius:0;font-size:14px;line-height:20px;white-space:nowrap}
/* Sidebar Highlight v1.1 — no yellow active rail/tile; black filled icon is supplied by active asset. */
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link[aria-current="page"],
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link.is-active{background:transparent;color:#0F0F0F;border-color:transparent}
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link[aria-current="page"]::before,
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link.is-active::before{content:none}
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link:hover,
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link:focus-visible,
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link[aria-current="page"]:hover,
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link[aria-current="page"]:focus-visible{background:#F2F2F2;color:#0F0F0F}
html[data-sidebar-state] body .app-rail.shared-sidebar>.shared-sidebar-link:focus-visible{outline:2px solid #0F0F0F;outline-offset:-3px}
/* Before the shared controller renders, hide secondary entries in the existing 9-item DOM to reduce collapsed-state flash. */
html[data-sidebar-state="collapsed"] body .app-rail:not(.shared-sidebar)>a:nth-child(n+5):nth-child(-n+8){display:none}
/* Accessible tooltip is rendered outside the rail so it cannot be clipped by sidebar scrolling. */
.shared-sidebar-tooltip{position:fixed;z-index:1400;padding:6px 8px;border-radius:6px;background:#0F0F0F;color:#FFF;font-size:12px;line-height:16px;font-weight:400;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.16);pointer-events:none}
.shared-sidebar-tooltip[hidden]{display:none}
/* Main content shares horizontal space with persistent sidebar. Header geometry remains untouched. */
html[data-sidebar-state] body .app-main,
html[data-sidebar-state] body .learning-main.app-main,
html[data-sidebar-state] body .watch-main.app-main{margin-left:var(--yt-ref-rail-w);transition:margin-left .16s ease}
html[data-sidebar-state] body .category-bar{left:var(--yt-ref-rail-w);transition:left .16s ease}
/* Old desktop overlay drawers are retired; shared persistent sidebar is the only navigation landmark. */
html[data-sidebar-system="ready"] body .nav-drawer[hidden],
html[data-sidebar-system="ready"] body .courses-drawer[hidden],
html[data-sidebar-system="ready"] body .library-drawer[hidden],
html[data-sidebar-system="ready"] body .documents-drawer[hidden],
html[data-sidebar-system="ready"] body .activity-drawer[hidden],
html[data-sidebar-system="ready"] body .profile-drawer[hidden],
html[data-sidebar-system="ready"] body .course-drawer[hidden],
html[data-sidebar-system="ready"] body .lw-drawer[hidden]{display:none}
@media (prefers-reduced-motion:reduce){html[data-sidebar-state] body .app-rail.shared-sidebar,html[data-sidebar-state] body .app-main,html[data-sidebar-state] body .category-bar{transition:none}}
