/* A top-level row is 36px tall, between the small and medium controls, with 8px sides, as GitHub's rows. */
.wi-sidebar-nav__list{gap:var(--space-1);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.wi-sidebar-nav{--wi-sidebar-nav-padding:var(--space-2)}.wi-sidebar-nav__link,.wi-sidebar-nav__group-label{--wi-sidebar-nav-radius:var(--radius-md);align-items:center;gap:var(--space-2);min-height:calc(var(--size-control-sm) + var(--space-1));padding:0 var(--wi-sidebar-nav-padding);border-radius:var(--wi-sidebar-nav-radius);color:var(--text-secondary);font-family:var(--font-family-sans);font-size:var(--font-size-sm);line-height:var(--font-line-height-sm);font-weight:var(--font-weight-medium);text-decoration:none;display:flex}.wi-sidebar-nav__link:hover,button.wi-sidebar-nav__group-label:hover{background-color:var(--wi-app-canvas-edge,var(--background-sunken));color:var(--text-primary)}.wi-sidebar-nav__link:focus-visible,button.wi-sidebar-nav__group-label:focus-visible{box-shadow:var(--focus-ring);outline:none}.wi-sidebar-nav__link[aria-current=page],.wi-sidebar-nav__link[aria-current=page]:hover{background-color:var(--background-surface);box-shadow:var(--shadow-sm);color:var(--text-primary);font-weight:var(--font-weight-semibold)}.wi-sidebar-nav__icon{width:var(--size-icon-sm);height:var(--size-icon-sm);flex:none;display:inline-flex}.wi-sidebar-nav__icon>svg{width:100%;height:100%}.wi-sidebar-nav__link[aria-current=page] .wi-sidebar-nav__icon{color:var(--brand-secondary-bg)}


/* A group (Organisation) without the current page is a disclosure: a button, with the link's look, whose chevron turns when
   the nav-group controller puts its pages away. With the current page it is a plain label (NavIcon.css gives it the
   open page's icon), semibold here. */
button.wi-sidebar-nav__group-label {
  box-sizing: border-box;
  width: 100%;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  text-align: start;
}
.wi-sidebar-nav__item:has(> .wi-sidebar-nav__list--tree [aria-current="page"]) > .wi-sidebar-nav__group-label {
  color: var(--text-primary);
  font-weight: var(--font-weight-semibold);
}
.wi-sidebar-nav__chevron {
  flex: none;
  width: var(--size-icon-xs);
  height: var(--size-icon-xs);
  margin-left: auto;
  color: var(--text-tertiary);
  transition: transform 150ms ease;
}
.wi-sidebar-nav__group-label[aria-expanded="false"] .wi-sidebar-nav__chevron {
  transform: rotate(-90deg);
}
/* A flex list would keep showing a closed group's list: `hidden` is the controller's way to put it away. */
.wi-sidebar-nav__list[hidden] {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .wi-sidebar-nav__chevron {
    transition: none;
  }
}

/* A tree: the pages of a group, or of an agency, hang from a trunk that starts under their parent's icon (the parent's
   row sets --wi-sidebar-tree-offset, the trunk's distance from the list's edge) and stops at the last page's middle,
   with a node for each. Both are decoration, so the list keeps its semantics; the current page's node is turquoise. */
.wi-sidebar-nav__item--group {
  --wi-sidebar-tree-offset: calc(var(--wi-sidebar-nav-padding) + var(--size-icon-sm) / 2 - var(--border-1));
}
.wi-sidebar-nav__list--tree {
  --wi-sidebar-tree-line: var(--blue-gray-200);
  --wi-sidebar-tree-node-border: var(--blue-gray-300);
  --wi-sidebar-tree-current: var(--brand-secondary-bg);
  gap: 0;
  margin-left: var(--wi-sidebar-tree-offset);
}
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item {
  position: relative;
  padding-left: calc(var(--space-5) + var(--border-2));
}
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-left: var(--border-2) solid var(--wi-sidebar-tree-line);
}
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item:first-child::before {
  top: calc(-1 * var(--space-1));
}
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item:last-child::before {
  bottom: 50%;
}
/* A 6px circle inside its 2px border, centred on the trunk. */
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--border-1);
  box-sizing: border-box;
  width: calc(var(--space-2) + var(--border-2));
  height: calc(var(--space-2) + var(--border-2));
  border: var(--border-2) solid var(--wi-sidebar-tree-node-border);
  border-radius: var(--radius-full);
  background-color: var(--wi-app-canvas, var(--background-surface));
  transform: translate(-50%, -50%);
}
.wi-sidebar-nav__list--tree > .wi-sidebar-nav__item:has(> [aria-current="page"])::after {
  border-color: var(--wi-sidebar-tree-current);
  background-color: var(--wi-sidebar-tree-current);
  box-shadow: 0 0 0 calc(3 * var(--border-1)) var(--background-accent-subtle);
}
.wi-sidebar-nav__list--tree .wi-sidebar-nav__link {
  min-height: var(--size-control-sm);
  padding-left: var(--space-2);
}
@media (forced-colors: active) {
  .wi-sidebar-nav__list--tree {
    --wi-sidebar-tree-line: CanvasText;
    --wi-sidebar-tree-node-border: CanvasText;
    --wi-sidebar-tree-current: Highlight;
  }
}

/* A top-level row's current page has a bar, not only colour: the white pill barely stands out from the canvas. It sits
   outside the pill, 8px to its left, in the sidebar's 12px side padding (`.wi-app-shell__sidebar`, AppShell.css: less,
   and the sidebar's scroll would clip it), 24px tall and centred, as GitHub's; forced colours
   give it and an outline Highlight. A tree's node marks its page instead, and the phone's More sheet uses a check. */
.wi-sidebar-nav__link[aria-current="page"] {
  position: relative;
  outline: var(--border-1) solid transparent;
}
.wi-sidebar-nav__list:not(.wi-sidebar-nav__list--tree) > .wi-sidebar-nav__item > .wi-sidebar-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: calc(50% - var(--space-3));
  left: calc(-1 * var(--space-2));
  height: var(--space-6);
  width: var(--space-1);
  border-radius: var(--radius-full);
  background-color: var(--brand-secondary-bg);
}
/* The focus ring is a shadow, which forced colours drop: a transparent outline becomes the ring there. */
.wi-sidebar-nav__link:focus-visible,
button.wi-sidebar-nav__group-label:focus-visible {
  outline: var(--border-2) solid transparent;
  outline-offset: var(--border-2);
}
@media (forced-colors: active) {
  .wi-sidebar-nav__link[aria-current="page"] {
    outline-color: Highlight;
  }
  .wi-sidebar-nav__list:not(.wi-sidebar-nav__list--tree) > .wi-sidebar-nav__item > .wi-sidebar-nav__link[aria-current="page"]::before {
    background-color: Highlight;
  }
}
