:root {
  --portal-sidebar-width: 254px;
  --portal-sidebar-compact-width: 78px;
  --portal-sidebar-accent: #2dd4bf;
  --portal-sidebar-text: #d7e2e8;
  --portal-sidebar-muted: #8da1aa;
}

.with-sidebar {
  padding-left: calc(var(--portal-sidebar-width) + 16px);
  transition: padding-left 180ms ease;
}

.with-sidebar.portal-sidebar-compact,
.portal-sidebar-compact .with-sidebar {
  padding-left: calc(var(--portal-sidebar-compact-width) + 16px);
}

.portal-sidebar,
.portal-sidebar * {
  box-sizing: border-box;
}

.portal-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--portal-sidebar-width);
  padding: 0.9rem 0.72rem 1.1rem;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(5, 14, 17, 0.99), rgba(10, 20, 23, 0.99));
  color: var(--portal-sidebar-text);
  z-index: 80;
  transition: width 180ms ease, padding 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.46) transparent;
}

.portal-sidebar.is-compact {
  width: var(--portal-sidebar-compact-width);
  padding-inline: 0.65rem;
}

.sidebar-brand {
  margin-bottom: 0.8rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.sidebar-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.sidebar-logo {
  display: block;
  width: 100%;
  min-width: 0;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-view-toggle,
.theme-toggle,
.sidebar-section-toggle,
.sidebar-menu-toggle {
  font: inherit;
}

.sidebar-view-toggle {
  display: inline-flex;
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 7px;
  background: rgba(15, 30, 34, 0.88);
  color: #dce8ec;
  cursor: pointer;
}

.sidebar-view-toggle:hover,
.sidebar-view-toggle:focus-visible {
  border-color: rgba(45, 212, 191, 0.86);
  background: rgba(45, 212, 191, 0.13);
  color: #ffffff;
}

.sidebar-view-toggle:focus-visible,
.theme-toggle:focus-visible,
.sidebar-section-toggle:focus-visible,
.sidebar-link:focus-visible,
.sidebar-menu-toggle:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
}

.sidebar-view-icon,
.sidebar-view-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
}

.sidebar-view-icon-expand,
.sidebar-view-label {
  display: none;
}

.sidebar-mobile-row {
  display: contents;
}

.sidebar-role {
  margin: 0.55rem 0 0;
  overflow: hidden;
  color: #a9bbc2;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-menu-toggle {
  display: none;
}

.theme-toggle {
  display: inline-grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  width: 100%;
  min-height: 2.25rem;
  margin-top: 0.55rem;
  padding: 0.42rem 0.58rem;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 7px;
  background: rgba(15, 30, 34, 0.72);
  color: #cbd9de;
  cursor: pointer;
  text-align: left;
}

.theme-toggle:hover {
  border-color: rgba(45, 212, 191, 0.58);
  color: #ffffff;
}

.theme-toggle-icon,
.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.sidebar-section {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.sidebar-section-toggle {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) 0.9rem;
  width: 100%;
  min-height: 2rem;
  padding: 0.34rem 0.42rem;
  gap: 0.45rem;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--portal-sidebar-muted);
  cursor: pointer;
  text-align: left;
}

.sidebar-section-toggle:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #c8d7dc;
}

.sidebar-section.is-active .sidebar-section-toggle {
  color: #bff9f1;
}

.sidebar-section-icon,
.sidebar-section-toggle svg:first-child {
  width: 1rem;
  height: 1rem;
}

.sidebar-section-label {
  min-width: 0;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-section-chevron,
.sidebar-section-toggle svg:last-child {
  width: 0.86rem;
  height: 0.86rem;
  transition: transform 160ms ease;
}

.sidebar-section.is-collapsed .sidebar-section-chevron,
.sidebar-section.is-collapsed .sidebar-section-toggle svg:last-child {
  transform: rotate(-90deg);
}

.sidebar-section-links {
  display: grid;
  gap: 0.25rem;
}

.sidebar-section.is-collapsed .sidebar-section-links {
  display: none;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  width: 100%;
  min-height: 2.5rem;
  padding: 0.54rem 0.58rem;
  gap: 0.56rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--portal-sidebar-text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.25;
}

.sidebar-link:hover {
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(45, 212, 191, 0.07);
  color: #ffffff;
}

.sidebar-link.is-active {
  border-color: rgba(45, 212, 191, 0.76);
  background: rgba(45, 212, 191, 0.16);
  color: #effffc;
}

.sidebar-link.is-braillia {
  border-color: rgba(240, 180, 91, 0.52);
  background: rgba(240, 180, 91, 0.1);
}

.sidebar-link-icon,
.sidebar-link > svg {
  width: 1.12rem;
  height: 1.12rem;
  color: #9eb0b7;
  flex: 0 0 1.12rem;
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link:hover > svg,
.sidebar-link.is-active .sidebar-link-icon,
.sidebar-link.is-active > svg {
  color: #5eead4;
}

.sidebar-link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-sidebar.is-compact .sidebar-brand-row {
  display: flex;
  flex-direction: column;
}

.portal-sidebar.is-compact .sidebar-logo {
  width: 48px;
  height: 40px;
  object-position: center;
}

.portal-sidebar.is-compact .sidebar-view-icon-collapse,
.portal-sidebar.is-compact .sidebar-role,
.portal-sidebar.is-compact .theme-toggle-label,
.portal-sidebar.is-compact .sidebar-link-label,
.portal-sidebar.is-compact .sidebar-section-toggle {
  display: none;
}

.portal-sidebar.is-compact .sidebar-view-icon-expand {
  display: block;
}

.portal-sidebar.is-compact .theme-toggle {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  margin-inline: auto;
  padding: 0;
  justify-content: center;
}

.portal-sidebar.is-compact .sidebar-nav {
  gap: 0.34rem;
}

.portal-sidebar.is-compact .sidebar-section {
  padding-top: 0.34rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.portal-sidebar.is-compact .sidebar-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.portal-sidebar.is-compact .sidebar-section-links,
.portal-sidebar.is-compact .sidebar-section.is-collapsed .sidebar-section-links {
  display: grid;
}

.portal-sidebar.is-compact .sidebar-link {
  display: flex;
  width: 2.8rem;
  height: 2.8rem;
  min-height: 2.8rem;
  margin-inline: auto;
  padding: 0;
  justify-content: center;
}

.portal-sidebar.is-compact .sidebar-link > svg {
  width: 1.22rem;
  height: 1.22rem;
}

.with-sidebar main.shell > header.top .brand-logo,
.with-sidebar .eyebrow,
.with-sidebar .section-kicker {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .with-sidebar,
  .portal-sidebar,
  .sidebar-section-chevron,
  .sidebar-section-toggle svg:last-child {
    transition: none;
  }
}

@media (max-width: 980px) {
  .with-sidebar,
  .with-sidebar.portal-sidebar-compact,
  .portal-sidebar-compact .with-sidebar {
    padding-left: 0;
  }

  .portal-sidebar,
  .portal-sidebar.is-compact {
    position: static;
    width: auto;
    padding: 0.72rem;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }

  .sidebar-brand,
  .portal-sidebar.is-compact .sidebar-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .sidebar-brand-row,
  .portal-sidebar.is-compact .sidebar-brand-row {
    display: block;
  }

  .sidebar-logo,
  .portal-sidebar.is-compact .sidebar-logo {
    width: 126px;
    height: auto;
    max-height: 48px;
    object-position: left center;
  }

  .sidebar-view-toggle {
    display: none;
  }

  .sidebar-mobile-row {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .sidebar-role,
  .portal-sidebar.is-compact .sidebar-role {
    display: block;
    margin: 0;
  }

  .sidebar-menu-toggle {
    display: inline-flex;
    min-height: 2.55rem;
    padding: 0.5rem 0.72rem;
    gap: 0.42rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(45, 212, 191, 0.58);
    border-radius: 7px;
    background: rgba(45, 212, 191, 0.12);
    color: #e9fffc;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
  }

  .sidebar-menu-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .theme-toggle,
  .portal-sidebar.is-compact .theme-toggle {
    display: flex;
    width: 2.55rem;
    height: 2.55rem;
    min-height: 2.55rem;
    margin: 0;
    padding: 0;
    justify-content: center;
  }

  .theme-toggle-label,
  .portal-sidebar.is-compact .theme-toggle-label {
    display: none;
  }

  .sidebar-nav,
  .portal-sidebar.is-compact .sidebar-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .portal-sidebar.is-menu-open .sidebar-nav,
  .portal-sidebar.is-compact.is-menu-open .sidebar-nav {
    display: grid;
  }

  .portal-sidebar.is-compact .sidebar-section {
    padding-top: 0;
    border-top: 0;
  }

  .sidebar-section-toggle,
  .portal-sidebar.is-compact .sidebar-section-toggle {
    display: grid;
  }

  .sidebar-section.is-collapsed .sidebar-section-links,
  .portal-sidebar.is-compact .sidebar-section.is-collapsed .sidebar-section-links {
    display: none;
  }

  .sidebar-link,
  .portal-sidebar.is-compact .sidebar-link {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    width: 100%;
    height: auto;
    min-height: 2.5rem;
    margin: 0;
    padding: 0.54rem 0.58rem;
    justify-content: initial;
  }

  .sidebar-link-label,
  .portal-sidebar.is-compact .sidebar-link-label {
    display: block;
  }
}

@media (max-width: 640px) {
  .sidebar-brand,
  .portal-sidebar.is-compact .sidebar-brand {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sidebar-mobile-row {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .sidebar-nav,
  .portal-sidebar.is-compact .sidebar-nav {
    grid-template-columns: 1fr;
  }
}
