/* Portal v3 phase 4 (§10.2, USE_NAV_COLLAPSE, class nav-collapse): the sidebar's categories open and close
   (js/portal-v3/shell/nav.js P3Nav). The heading is a button drawn as today's heading (12/16 muted, 8 px in) with a chevron
   at the end: down while open, to the end side while closed (mirrored in Arabic). Open, the category takes exactly today's
   space (12 px above + a 24 px heading = today's 16 + 16 + 4); the list folds in 150 ms, none under reduced motion, and
   a closed list is hidden from Tab and screen readers. The sidebar has no narrow icon mode, so nothing else changes. */
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-btn:not(#p1):not(#p2):not(#p3):not(#p4):not(#p5){display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:24px;margin:12px 0 0;padding:4px 8px;border:0;border-radius:var(--p3-r-field);background:none;box-shadow:none;cursor:pointer;text-align:start;color:var(--p3-muted)}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p3-ngrp:first-child>.p4-ngrp-btn:not(#p1):not(#p2):not(#p3):not(#p4):not(#p5){margin-top:0}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-btn:hover{color:var(--p3-text)}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-btn:focus-visible{outline:2px solid var(--p3-primary);outline-offset:-2px}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-chev{flex:none;width:14px;height:14px;color:var(--p3-faint);transition:transform 150ms var(--p3-ease)}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp.open .p4-ngrp-chev{transform:rotate(90deg)}
html.nav-collapse.shell-v3:not([data-skin])[dir=rtl] .gym.p3 .p4-ngrp-chev{transform:scaleX(-1)}
html.nav-collapse.shell-v3:not([data-skin])[dir=rtl] .gym.p3 .p4-ngrp.open .p4-ngrp-chev{transform:scaleX(-1) rotate(90deg)}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-list{display:grid;grid-template-rows:1fr;transition:grid-template-rows 150ms var(--p3-ease),visibility 0s}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp.shut>.p4-ngrp-list{grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows 150ms var(--p3-ease),visibility 0s linear 150ms}
html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-in{display:flex;flex-direction:column;gap:1px;min-height:0;overflow:hidden}
@media (pointer:coarse){html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 .p4-ngrp-btn:not(#p1):not(#p2):not(#p3):not(#p4):not(#p5){min-height:44px;margin-top:4px}}
@media (prefers-reduced-motion:reduce){html.nav-collapse.shell-v3:not([data-skin]) .gym.p3 :is(.p4-ngrp-list,.p4-ngrp.shut>.p4-ngrp-list,.p4-ngrp-chev){transition:none}}
