/* One nav destination (shared/_sidebar_link). Active state keys off aria-current="page" —
   the accessible truth is the styling hook, so they can never disagree. Rows are inset pills;
   the active row carries the accent wash and accent ink and nothing else. The flush accent bar
   is deliberately not used here: it stays the table's selection signal, so the two never blur. */
@layer components {
  .sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-inline: var(--space-3);
    padding: var(--space-2) var(--space-3);
    min-height: 38px;
    border-radius: var(--radius-sm);
    font: var(--type-nav);
    color: var(--text-secondary);
    transition: background-color var(--duration-fast) var(--ease-smooth),
      color var(--duration-fast) var(--ease-smooth);
  }
  .sidebar-link:hover {
    background-color: var(--nav-hover);
    color: var(--text);
  }
  .sidebar-link[aria-current="page"] {
    background-color: var(--accent-tint);
    color: var(--accent);
    font-weight: 700;
  }

  .sidebar-link-label { flex: 1; }

  /* A neutral count keeps green reserved for the selected destination. */
  .nav-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding-inline: var(--space-1);
    border-radius: var(--chip-radius);
    background-color: var(--surface-sunken);
    color: var(--text-secondary);
    font: var(--type-badge);
    font-variant-numeric: tabular-nums;
  }
  @media (pointer: coarse) {
    .sidebar-link { min-height: 44px; }
  }
  @media (forced-colors: active) {
    .sidebar-link[aria-current="page"] {
      outline: 2px solid Highlight;
      outline-offset: -2px;
    }
  }
}
