/* Sidebar refinement; preserve navigation, ordering and functionality. */
html:not([data-h5]) .workspace-shell .tool-sidebar {
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink-soft) 24%, var(--surface)) transparent;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups { gap: 20px; }
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-group h2 {
  min-height: 32px;
  margin-bottom: 8px;
  padding: 0 6px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-group h2 small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid { gap: 6px; }
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a {
  min-height: 50px;
  padding: 6px;
  gap: 5px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  box-shadow: none;
  outline: 1px solid color-mix(in srgb, var(--line) 50%, var(--surface));
  outline-offset: -1px;
  transition: background-color .14s ease-out, color .14s ease-out, outline-color .14s ease-out;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a > img,
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a.replica-icon-entry > img {
  width: 22px;
  height: 22px;
  margin-inline: 0;
  object-fit: contain;
  object-position: center;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a > span {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a:hover {
  background: color-mix(in srgb, var(--primary) 5%, var(--surface));
  color: var(--primary-dark);
  outline-color: color-mix(in srgb, var(--primary) 24%, var(--surface));
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a.active,
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a.active:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  outline-color: color-mix(in srgb, var(--primary) 55%, var(--surface));
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a.active > span { font-weight: 700; }
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .replica-entry-title { font-size: 12px; font-weight: 650; color: inherit; }
html:not([data-h5]) .workspace-shell .tool-sidebar .replica-icon-entry:hover .replica-entry-arrow { transform: none; }
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-grid .tool-entry-badge {
  border-radius: 4px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
}
@media (min-width: 1800px) {
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-group h2 { min-height: 34px; font-size: 15px; padding-inline: 8px; }
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-group h2 small { font-size: 11px; }
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid { gap: 8px; }
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a { min-height: 64px; padding: 8px; gap: 8px; }
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a > img,
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a.replica-icon-entry > img { width: 32px; height: 32px; }
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a > span,
  html:not([data-h5]) .workspace-shell .tool-sidebar .replica-entry-title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-groups .tool-sidebar-group .tool-sidebar-grid a { transition: none; }
}

html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-grid a > .replica-entry-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  text-align: start;
}
html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-grid .replica-entry-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 0 -3px;
  padding: 1px 3px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface), var(--primary) 11%);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
@media (min-width: 1800px) {
  html:not([data-h5]) .workspace-shell .tool-sidebar .tool-sidebar-grid .replica-entry-count { font-size: 12px; }
}
html:not([data-h5]) .tool-sidebar .tool-entry-selected { position: absolute; right: 6px; bottom: 5px; color: var(--primary-dark); }
html:not([data-h5]) .tool-sidebar .commerce-entry-copy { display: flex; align-items: baseline; gap: 3px; min-width: 0; }
html:not([data-h5]) .tool-sidebar .commerce-entry-copy small { color: var(--ink-soft); font-size: 10px; }
