.app-shell > .sidebar {
  --glass-edge: rgba(211, 246, 232, .14);
  --glass-accent: #a0f5c4;
  --glass-muted: #a3b9ad;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: calc(var(--sidebar) - 20px);
  padding: 12px 11px 9px;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: radial-gradient(ellipse at 16% 0%, rgba(103, 212, 170, .18), transparent 42%),
    linear-gradient(160deg, rgba(19, 34, 27, .92), rgba(8, 15, 12, .90) 52%, rgba(5, 10, 8, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 14px 46px rgba(0, 0, 0, .36);
  backdrop-filter: blur(22px) saturate(125%);
}

.sidebar .sidebar-top { padding: 4px 5px 12px; }
.sidebar .sidebar-user {
  min-height: 56px;
  margin: 0 0 8px;
  padding: 9px 10px;
  border-color: var(--glass-edge);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(213, 255, 235, .095), rgba(197, 250, 223, .025));
}

.sidebar .grouped-nav { padding: 3px 3px 12px 0 !important; scrollbar-gutter: stable; }
.sidebar .grouped-nav .nav-group { gap: 3px; margin: 0 0 13px; }
.sidebar .grouped-nav .nav-group + .nav-group { padding-top: 7px; border-top: 1px solid rgba(222, 255, 238, .075); }
.sidebar .grouped-nav .nav-group-head {
  height: auto;
  min-height: 24px;
  padding-inline: 9px;
  color: var(--glass-muted);
  font-size: .62rem;
  letter-spacing: .085em;
}

.sidebar .nav-group > :is(button, a) {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d7e9df;
  font-size: .76rem;
  font-weight: 620;
  line-height: 1.28;
  scroll-margin-block: 6px;
  transition: background-color .15s, border-color .15s, color .15s;
}

.sidebar .nav-group > :is(button, a) > svg { flex-shrink: 0; margin-right: 2px; color: #9fbeb0; }
.sidebar .nav-group > :is(button, a):hover {
  border-color: rgba(211, 246, 232, .10);
  background-color: rgba(203, 246, 227, .075);
  color: #fff;
}

.sidebar .nav-group > :is(button, a).active {
  border-color: rgba(148, 238, 187, .28);
  background: linear-gradient(108deg, rgba(114, 231, 167, .19), rgba(142, 207, 175, .055));
  box-shadow: inset 2px 0 0 #79e7a9, inset 0 1px 0 rgba(218, 255, 235, .06);
  color: #f5fff9;
}

.sidebar .nav-group > :is(button, a).active > svg { color: var(--glass-accent); }
.sidebar .nav-group > :is(button, a).locked-nav:not(.active) { color: #a2b2a8; }
.sidebar .nav-group .nav-lock-clean { color: #adbbaf; }
.sidebar :is(button, a):focus-visible { outline: 2px solid var(--glass-accent); outline-offset: -2px; }
.sidebar .nav-group:has(> [data-esz-go="/risk-calculator"]) > button[data-risk-nav] { display: none; }
.sidebar .sidebar-foot { gap: 3px; padding-top: 8px; border-color: var(--glass-edge); }
.sidebar .sidebar-foot > :is(a, button) { min-height: 32px; border-radius: 9px; }

.thumb > .archive-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
  .app-shell > .sidebar {
    z-index: 95;
    top: max(10px, env(safe-area-inset-top));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(300px, calc(100vw - 22px));
  }

  .sidebar .nav-group > :is(button, a) { min-height: 44px; font-size: .82rem; }
  .sidebar .sidebar-foot > :is(a, button) { min-height: 41px; }
  .app-shell > .scrim { z-index: 94; background: rgba(1, 8, 5, .64); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar .nav-group > :is(button, a) { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .app-shell > .sidebar { background: linear-gradient(156deg, #213c31, #102019 52%, #0b1711); backdrop-filter: none; }
}

.app-shell > .sidebar .esz-sidebar-progression {
  display: grid;
  flex: none;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin: 0 0 8px;
  padding: 10px 11px 9px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: radial-gradient(ellipse at 12% 0%, #a0f5c41e, transparent 62%),
    linear-gradient(150deg, #d6ffed0d, #90e4b507);
  box-shadow: inset 0 1px 0 #effff111;
  color: #edf9f1;
  text-decoration: none;
  transition: border-color .15s, background-color .15s;
}

.app-shell > .sidebar .esz-sidebar-progression:hover {
  border-color: #a0f5c466;
  background-color: #a0f5c411;
  transform: none;
}

.app-shell > .sidebar .esz-sidebar-progression::before { content: none; }

.app-shell > .sidebar .esz-sidebar-xp-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.app-shell > .sidebar .esz-sidebar-xp-top i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #a0f5c419;
  color: var(--glass-accent);
}

.app-shell > .sidebar .esz-sidebar-xp-top em {
  color: #d7e9df;
  font-size: .65rem;
  letter-spacing: .055em;
  font-style: normal;
  font-weight: 700;
}

.app-shell > .sidebar .esz-sidebar-xp-top b {
  padding: 3px 6px;
  border: 1px solid #a0f5c432;
  border-radius: 7px;
  background: #a0f5c411;
  color: var(--glass-accent);
  font-size: .66rem;
  white-space: nowrap;
}

.app-shell > .sidebar .esz-sidebar-progression > strong {
  margin: 0;
  color: var(--glass-muted);
  font-size: .76rem;
  line-height: 1.15;
  font-weight: 670;
}

.app-shell > .sidebar .esz-sidebar-xp-track {
  display: block;
  height: 5px;
  margin: 0;
  overflow: hidden;
  border-radius: 99px;
  background: #cfefdc24;
}

.app-shell > .sidebar .esz-sidebar-xp-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54c899, var(--glass-accent));
  box-shadow: none;
}

.app-shell > .sidebar :is(.esz-sidebar-xp-meta, .esz-sidebar-xp-route) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.app-shell > .sidebar .esz-sidebar-xp-meta em { color: var(--glass-muted); font-style: normal; }
.app-shell > .sidebar .esz-sidebar-xp-meta :is(b, em) { font-size: inherit; }
.app-shell > .sidebar .esz-sidebar-xp-route {
  padding-top: 6px;
  border-top: 1px solid var(--glass-edge);
  color: var(--glass-accent);
  font-weight: 650;
}

@media (max-width: 900px), (max-height: 590px) {
  .app-shell > .sidebar {
    overflow: hidden auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #98cca560 transparent;
    scroll-padding-block: 9px;
  }

  .app-shell > .sidebar > :is(.sidebar-top, .sidebar-user, .grouped-nav, .sidebar-foot) { flex: none; }
  .app-shell > .sidebar .grouped-nav { overflow: visible; scrollbar-gutter: auto; }
}

@media (max-width: 900px) {
  .app-shell > .sidebar .sidebar-top { gap: 10px; }
  .app-shell > .sidebar .mobile-close { min-width: 44px; min-height: 44px; flex-shrink: 0; }
  .app-shell .menu-button { min-width: 44px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell > .sidebar .esz-sidebar-progression { transition: none; }
}
