/* The home page owns one scrollbar at the browser's right edge. */
html:has(.app-shell-student #student-home.student-home-inline-projects) {
  overflow-y: hidden !important;
  scrollbar-gutter: auto !important;
}

html body #root .app-shell-student:has(#student-home.student-home-inline-projects)
  > .s1-workspace-leading-layout-student {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
  margin-inline: 0 !important;
}

html body #root .app-shell-student:has(#student-home.student-home-inline-projects)
  > .s1-workspace-leading-layout-student > .workspace-panel {
  grid-column: 1 / -1;
}

html body #root .app-shell-student:has(#student-home.student-home-inline-projects)
  > .s1-workspace-leading-layout-student > .s1-workspace-back-row {
  left: max(24px, calc((100% - 1888px) / 2));
}

#student-home.student-home-inline-projects {
  scrollbar-gutter: stable;
}

/* The ongoing-project panel now shares the centered home content column. */
#student-home.student-home-inline-projects .student-home-layout-noside {
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(1760px, calc(100% - 176px));
  margin-inline: auto;
}

#student-home.student-home-inline-projects .student-home-main-column {
  grid-template-rows: none !important;
  grid-auto-rows: max-content;
}

#student-home.student-home-inline-projects .student-home-studio-hero .student-hero-main {
  grid-template-areas: "title metrics" "actions metrics";
}

#student-home.student-home-inline-projects .student-home-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-self: center !important;
}

#student-home.student-home-inline-projects .student-home-summary-grid > div {
  align-content: center !important;
}

#student-home.student-home-inline-projects .student-process-card {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-height: 68px !important;
  padding: 0.75rem 1rem !important;
}

#student-home.student-home-inline-projects .student-process-card .student-flow-number {
  flex-shrink: 0;
}

#student-home.student-home-inline-projects .student-process-card h4 {
  align-self: center !important;
  margin: 0 !important;
}

#student-home.student-home-inline-projects .student-home-support-strip {
  min-height: 0 !important;
  padding-block: 1rem !important;
}

#student-home.student-home-inline-projects .student-home-right-rail,
#student-home.student-home-inline-projects .student-home-continue-panel,
#student-home.student-home-inline-projects .student-ongoing-list {
  position: static !important;
  width: 100%;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  scrollbar-gutter: auto !important;
}

#student-home.student-home-inline-projects .student-ongoing-list {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  gap: 1rem !important;
  padding-right: 0 !important;
}

#student-home.student-home-inline-projects .student-ongoing-item {
  grid-template-rows: 1fr auto !important;
  align-content: stretch !important;
  gap: 0.5rem !important;
  padding: 0.65rem 0.875rem !important;
}

#student-home.student-home-inline-projects .student-ongoing-meta {
  margin-top: 0.5rem !important;
}

#student-home.student-home-inline-projects .student-ongoing-meta > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.125rem 0.5rem;
}

#student-home.student-home-inline-projects .student-ongoing-meta dd {
  margin: 0;
}

#student-home.student-home-inline-projects .student-ongoing-progress {
  padding-top: 0.5rem !important;
  align-items: center !important;
}

#student-home.student-home-inline-projects .student-ongoing-progress-summary {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

#student-home.student-home-inline-projects .student-ongoing-progress-summary > strong {
  grid-column: 2;
  grid-row: 1;
}

#student-home.student-home-inline-projects .student-ongoing-progress-track {
  grid-column: 1 !important;
  grid-row: 1;
}

#student-home.student-home-inline-projects .student-ongoing-groups {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

#student-home.student-home-inline-projects .student-ongoing-group {
  min-width: 0;
}

#student-home.student-home-inline-projects .student-ongoing-group + .student-ongoing-group {
  padding-top: 1.25rem;
  border-top: 1px solid var(--student-overview-border, #d9e5f8);
}

#student-home.student-home-inline-projects .student-ongoing-group-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

#student-home.student-home-inline-projects .student-ongoing-group-heading h4 {
  margin: 0;
  color: var(--s1-color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.4;
}

#student-home.student-home-inline-projects .student-ongoing-item h5 {
  margin: 0;
  color: #111827;
  font-size: clamp(14px, 0.9vw, 16px);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

#student-home.student-home-inline-projects .student-ongoing-group-empty {
  margin: 0;
  color: var(--s1-color-text-muted);
  font-size: 0.875rem;
}

/* Keep cards readable when the desktop browser window is narrower. */
@media (max-width: 1320px) {
  #student-home.student-home-inline-projects .student-home-studio-hero .student-hero-main {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "title" "actions" "metrics";
  }

  #student-home.student-home-inline-projects .student-ongoing-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
