/* Physics SciEd Student Dashboard — One-Line Cards Force Fix v1.1
   This override deliberately switches the quick-tool container from inherited grid
   rules to a non-wrapping flex row on desktop so all four tools stay on one line.
*/

:root {
  --psc-dash-gold: #F7C928;
  --psc-dash-navy: #10233F;

  --psc-card-virtual-bg: #FFF0A6;
  --psc-card-virtual-bd: #D9B72E;

  --psc-card-library-bg: #DCEAFF;
  --psc-card-library-bd: #7EA5E8;

  --psc-card-assessment-bg: #E0F3D8;
  --psc-card-assessment-bd: #87B86E;

  --psc-card-research-bg: #EDE2FF;
  --psc-card-research-bd: #A886DC;
}

/* Research-style gold lower edge on the student header. */
body.psc-student-page .student-navbar {
  border-bottom: 3px solid var(--psc-dash-gold) !important;
}

/* IMPORTANT:
   Defeat inherited grid/auto-fit rules by switching to flex.
   All four feature links remain in one row on normal desktop widths. */
body.psc-student-page
  #studentWorkspace
  .student-welcome-panel
  .student-feature-links {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 0.65rem !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 0.95rem !important;
}

/* Every tool receives exactly one quarter of the available row. */
body.psc-student-page
  #studentWorkspace
  .student-welcome-panel
  .student-feature-links
  > .student-feature-link {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;

  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.58rem !important;

  min-height: 54px !important;
  padding: 0.52rem 0.72rem !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  position: relative !important;
  text-decoration: none !important;
}

/* Stronger but still professional color identity. */
body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(1) {
  background: var(--psc-card-virtual-bg) !important;
  border: 1px solid var(--psc-card-virtual-bd) !important;
}

body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(2) {
  background: var(--psc-card-library-bg) !important;
  border: 1px solid var(--psc-card-library-bd) !important;
}

body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(3) {
  background: var(--psc-card-assessment-bg) !important;
  border: 1px solid var(--psc-card-assessment-bd) !important;
}

body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(4) {
  background: var(--psc-card-research-bg) !important;
  border: 1px solid var(--psc-card-research-bd) !important;
}

/* Small left identity marker. */
body.psc-student-page
  .student-feature-links
  > .student-feature-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
}

body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(1)::before {
  background: #C79B00;
}
body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(2)::before {
  background: #4F7FD2;
}
body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(3)::before {
  background: #5E943E;
}
body.psc-student-page
  .student-feature-links
  > .student-feature-link:nth-child(4)::before {
  background: #7953B6;
}

/* Compact icon and text. */
body.psc-student-page .student-feature-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(16, 35, 63, 0.14) !important;
  color: var(--psc-dash-navy) !important;
}

body.psc-student-page .student-feature-icon i {
  font-size: 0.9rem !important;
}

body.psc-student-page .student-feature-link strong {
  color: var(--psc-dash-navy) !important;
  font-size: 0.79rem !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  white-space: normal !important;
}

body.psc-student-page .student-feature-link small,
body.psc-student-page .student-feature-link > i:last-child {
  display: none !important;
}

body.psc-student-page .student-feature-link:hover,
body.psc-student-page .student-feature-link:focus-visible {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(16, 35, 63, 0.06) !important;
  outline: none !important;
}

/* Keep four cards in one row much farther down than the previous 1180px breakpoint.
   Only compact/tablet widths switch to a 2 x 2 layout. */
@media (max-width: 880px) {
  body.psc-student-page
    #studentWorkspace
    .student-welcome-panel
    .student-feature-links {
    flex-wrap: wrap !important;
  }

  body.psc-student-page
    #studentWorkspace
    .student-welcome-panel
    .student-feature-links
    > .student-feature-link {
    flex: 1 1 calc(50% - 0.4rem) !important;
    width: auto !important;
  }
}

@media (max-width: 560px) {
  body.psc-student-page
    #studentWorkspace
    .student-welcome-panel
    .student-feature-links
    > .student-feature-link {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.psc-student-page .student-feature-link {
    transition: none !important;
  }

  body.psc-student-page .student-feature-link:hover,
  body.psc-student-page .student-feature-link:focus-visible {
    transform: none !important;
  }
}
