.student-source-hidden {
  display: none !important;
}

.student-portal {
  min-height: 100vh;
  background: #f5f8ff;
  color: #17223b;
}

.student-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 28px;
  background: #ffffff;
  border-bottom: 1px solid #dfe7f5;
  box-shadow: 0 8px 24px rgba(31, 64, 122, 0.06);
}

.student-brand,
.student-topbar-actions,
.student-identity,
.student-flow,
.student-section-heading {
  display: flex;
  align-items: center;
}

.student-brand {
  gap: 12px;
}

.student-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #2457d6;
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
}

.student-brand-name,
.student-brand-subtitle,
.student-kicker {
  margin: 0;
}

.student-brand-name {
  font-size: 20px;
  font-weight: 800;
}

.student-brand-subtitle {
  margin-top: 2px;
  color: #6c7892;
  font-size: 12px;
  font-weight: 700;
}

.student-topbar-actions {
  gap: 10px;
}

.student-identity {
  flex-direction: column;
  align-items: flex-end;
  margin-right: 6px;
}

.student-classroom-name {
  color: #6c7892;
  font-size: 12px;
}

.student-secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbd7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #294266;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.student-secondary-button:hover {
  background: #f3f6fb;
}

.student-main {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.student-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
  padding: 30px 34px;
  border-radius: 24px;
  background: linear-gradient(135deg, #1847bd, #4678ee);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(31, 79, 187, 0.18);
}

.student-kicker {
  color: #7f94bf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.student-hero .student-kicker {
  color: #dbe6ff;
}

.student-hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.student-hero p:last-child {
  margin: 0;
  color: #e9efff;
}

.student-flow {
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.student-flow b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 4px;
  border-radius: 50%;
  background: #ffffff;
  color: #2457d6;
}

.student-workspace-card,
.student-profile-card {
  padding: 28px;
  border: 1px solid #dfe7f5;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(51, 77, 125, 0.08);
}

.student-profile-card {
  margin-top: 24px;
}

.student-section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.student-section-heading h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.student-group-summary {
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3157a5;
  font-size: 13px;
  font-weight: 700;
}

.student-phase2-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.student-phase2-workspace > .subpanel,
.student-phase2-workspace > .phase2-list-section {
  margin: 0;
  border-radius: 18px;
}

.student-phase2-workspace > .subpanel {
  align-self: start;
  border: 1px solid #dce6f8;
  background: #f8faff;
}

.student-phase2-workspace > .phase2-list-section {
  min-width: 0;
}

.student-preview-panel {
  margin-top: 24px;
  border: 1px solid #dfe7f5;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(51, 77, 125, 0.08);
}

.student-portal .phase2-app-card {
  border-color: #dfe7f5;
  border-radius: 14px;
}

.student-portal .button:not(.button-quiet) {
  background: #2457d6;
}

.student-profile-card .display-name-card {
  margin: 0;
  border: 1px solid #dce6f8;
  border-radius: 18px;
  background: #f8faff;
}

@media (max-width: 820px) {
  .student-topbar {
    align-items: flex-start;
    padding: 14px 18px;
  }

  .student-topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .student-identity {
    width: 100%;
  }

  .student-main {
    width: min(100% - 24px, 1100px);
    padding-top: 20px;
  }

  .student-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .student-flow {
    flex-wrap: wrap;
    white-space: normal;
  }

  .student-phase2-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .student-topbar {
    flex-direction: column;
  }

  .student-topbar-actions,
  .student-identity {
    width: 100%;
    align-items: stretch;
  }

  .student-topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .student-identity {
    grid-column: 1 / -1;
  }

  .student-workspace-card,
  .student-profile-card {
    padding: 18px;
  }

  .student-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
