html {
  scrollbar-gutter: stable;
}

:root {
  --codepath-blue: #4F5DFF;
  --codepath-navy: #1B1C57;
  --codepath-green: #00C385;
  --codepath-pink: #FFEEFF;
}

@font-face {
  font-family: "Poppins";
  src: url(/assets/Poppins-Regular-be07515bfe286cae1f4fe8fdbf541184a3fa226ddf4c13a08856161e0c6907d2.woff) format('woff');
  font-weight: 400;
}
@font-face {
  font-family: "Poppins";
  src: url(/assets/Poppins-Light-4ce037c9246e2b381ddef69f59e4b33a75dc325d70fde111f085798e282df4c6.ttf) format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: "Poppins";
  src: url(/assets/Poppins-SemiBold-a27799af8da2e1b65bc12769eb5f8da47b0689e24f5cf655a4fb58db80bd90b7.ttf) format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Poppins";
  src: url(/assets/Poppins-Bold-542ca15de37ab3bcf41f3ee5fdb9a8a4ba3346a27998196101a9a01a0f4ce0d8.ttf) format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Neue-Machina";
  src: url(/assets/PPNeueMachina-Regular-84a061d8c9a788c137008c5970fcc2ce04f994301067ca79281aa992ddcc799d.woff) format('woff');
}
@font-face {
  font-family: "Neue-Machina-Bold";
  src: url(/assets/PPNeueMachina-Ultrabold-982913c01a41ff5f78e9b80c748d84f4fa2f1427d758cc0ee08dc2135c1bc3eb.woff) format('woff');
}
@font-face {
  font-family: "Space-Mono";
  src: url(/assets/SpaceMono-Regular-c33561374d0b52ee92dab692e647faca9398234e7488b9c53219a0996e5bc286.woff) format('woff');
}
@font-face {
  font-family: "Space-Mono-Bold";
  src: url(/assets/SpaceMono-Bold-94567bc34ba70958f3df701e1a6c172261cbc848fbae7238282ea930fbd02577.woff) format('woff');
}
@font-face {
  font-family: "Libre-Caslon-Display";
  src: url(/assets/LibreCaslonDisplay-Regular-d6d7b59f14dffebf4eb947a714da93f08705fb6c8a5a4a901a88657b60eba181.ttf) format('truetype');
}

body {
  font-family: Poppins !important;
}

a {
  color: var(--codepath-blue);
  text-decoration: underline;
}

.font-lcd {
  font-family: Libre-Caslon-Display, serif;
}

.h1, .h2, .h3 {
  font-family: Neue-Machina, Space-Mono;
  color: var(--codepath-navy);
}

h1, h2, h3, h4, h5 {
  font-family: Poppins, sans-serif;
  font-weight: bold;
  color: var(--codepath-navy);
}

.bg-cp-blue {
  background-color: var(--codepath-blue);
}

.text-cp-blue {
  color: var(--codepath-blue);
}

.border-cp-blue {
  border: 1px solid var(--codepath-blue);
}

/* My Courses (/courses) card rows. A shared grid so code/title/term/progress
   /action line up column-to-column across cards. Stacks on small screens. */
.course-card {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.5rem;
}

@media (min-width: 1024px) {
  /* One shared template for current and concluded rows so every column —
     code, name, semester, progress/badge, actions — lines up across both
     sections. Fixed widths (not auto) keep the badge in place whether or not
     a row has action buttons. */
  .course-card {
    align-items: center;
    column-gap: 1.5rem;
    grid-template-columns: 0.8fr minmax(0, 2.8fr) 1.3fr 6.5rem minmax(18rem, 2fr);
  }
}

.text-cp-green {
  color: var(--codepath-green);
}

.bg-cp-green {
  background-color: var(--codepath-green);
}

.bg-navy {
  background-color: var(--codepath-navy);
}

.text-navy {
  color: var(--codepath-navy);
}

.hover-bg-navy:hover {
  background-color: var(--codepath-navy);
}

.text-navy {
  color: var(--codepath-navy);
}

.bg-cp-pink {
  background-color: var(--codepath-pink);
}

.lead {
  font-family: Poppins, sans-serif;
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 2rem;
  font-style: normal;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.font-bold {
  font-family: Poppins;
  font-weight: 600;
}


.relative {
  position: relative; /* Allows the .sunrise-bleed to use this as a reference for absolute positioning */
}

/* #87458c, #af486d */
.sunrise-bleed {
  background: linear-gradient(to right, #696FA2 10%, #C44069 50%, #F7B89E 60%);
  z-index: -1;
}

.bg-mint {
  background-color: #CBFEE8;
}

/* App background gradient (formerly per-level CRL gradient) */
.bg-app-gradient {
  background: linear-gradient(to right bottom, #68B682, #8F46EA);
}

.bg-lab-complete {
  background-color: #F2FEF2;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Coach question transition: dims the entire card while the answer is being submitted */
.card:has(.submitting) {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

/* Coach question entrance: fade-in + slide-up when a new question appears */
@keyframes coach-question-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coach-question-enter {
  animation: coach-question-enter 350ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .coach-question-enter {
    animation: none;
  }
}

codepath-header {
  display: block;
  width: 100%;
  min-height: 48px;
}

.hub-container {
  --spacing: 0.25rem;
  padding-inline: calc(var(--spacing) * 4);
  max-width: 1170px;
}
@media (min-width: 640px) {
  .hub-container {
    padding-inline: calc(var(--spacing) * 6);
  }
}
@media (min-width: 1024px) {
  .hub-container {
    padding-inline: calc(var(--spacing) * 8);
  }
}


/* Recommendations grid (home page only): "more" card spans remaining columns and hides when the row is full.
   The coach journey page uses a 2-col grid without this hide/span behavior. */

/* Mobile (1 col): always show the ghost card */

/* Tablet (2 cols): hide when card would start a new row (positions 3, 5, 7...) */
@media (min-width: 768px) {
  .recommendations-grid--home > :last-child:nth-child(2n+3) {
    display: none;
  }
}

/* Desktop (3 cols): re-show, then hide when card would start a new row (positions 4, 7, 10...) */
/* Span 2 columns when 2 slots remain in the row (positions 2, 5, 8...) */
@media (min-width: 1024px) {
  .recommendations-grid--home > :last-child:nth-child(2n+3) {
    display: flex;
  }
  .recommendations-grid--home > :last-child:nth-child(3n+4) {
    display: none;
  }
  .recommendations-grid--home > :last-child:nth-child(3n+2) {
    grid-column: span 2;
  }
}
