/* Shared frame for authenticated project pages. */
.project-shell {
  min-width: 0;
  background: var(--bg);
}

.project-sidebar {
  position: relative;
  width: 15rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--surface));
  box-shadow: inset -1px 0 var(--border-soft);
  transition: width 180ms ease;
}

.project-sidebar__inner {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 3.5rem);
}

.project-sidebar .sidebar-header {
  margin: 0 0.65rem;
  padding: 0.35rem 0.6rem 1rem;
}

.project-sidebar .sidebar-project-name {
  padding-right: 1.5rem;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

.project-sidebar__nav {
  padding: 0.65rem;
}

.project-sidebar__nav a,
.project-sidebar__nav button,
.project-sidebar__nav span[aria-disabled="true"] {
  position: relative;
  min-height: 2.25rem;
  border-radius: 0.5rem;
  transition: background-color 140ms ease, color 140ms ease;
}

.project-sidebar__nav a[aria-current="page"]::before {
  position: absolute;
  inset-block: 0.5rem;
  left: 0.25rem;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.project-sidebar__nav svg {
  flex: 0 0 auto;
}

.project-main {
  width: 100%;
  padding: 2rem clamp(1.25rem, 3vw, 3rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 0%, var(--accent-tint-soft), transparent 22rem),
    var(--bg);
}

.project-sidebar button:focus-visible,
.project-sidebar a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 52rem) {
  .project-sidebar {
    width: 3.75rem !important;
  }

  .project-sidebar .sidebar-label,
  .project-sidebar .sidebar-section-header,
  .project-sidebar .sidebar-back-link,
  .project-sidebar .sidebar-project-name,
  .project-sidebar .rail-chevron {
    display: none;
  }

  .project-sidebar .sidebar-header {
    align-items: center;
    margin-inline: 0.35rem;
    padding-inline: 0;
  }

  .project-sidebar #sidebar-toggle {
    position: static;
    align-self: center;
    margin-top: 0.5rem;
    border-radius: 0.4rem;
  }

  .project-sidebar [data-accordion-panel][hidden] {
    display: block;
  }

  .project-sidebar .sidebar-panel {
    margin-left: 0;
    border-left: 0;
  }

  .project-sidebar__nav a,
  .project-sidebar__nav button,
  .project-sidebar__nav span[aria-disabled="true"],
  .project-sidebar .sidebar-child {
    justify-content: center;
    padding-inline: 0;
  }

  .project-sidebar__nav a[aria-current="page"]::before {
    left: 0.1rem;
  }

  .project-main {
    padding: 1.5rem 1rem;
  }
}

@media (max-width: 38rem) {
  .project-main {
    padding-inline: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-sidebar,
  .project-sidebar__nav a,
  .project-sidebar__nav button {
    transition: none;
  }
}
