/* =========================================================
   Compass Projects Experience
   Personalized recommendations, project library, and details
========================================================= */

#projects-view {
  width: 100%;
  max-width: 1180px;
}

.projects-page.projects-redesign {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 84px;
}

.projects-redesign * {
  min-width: 0;
}

.projects-redesign .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */

.projects-hero.projects-hero-redesign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 48px;
  align-items: end;
  width: 100%;
  max-width: none;
  margin: 38px 0 52px;
}

.projects-hero-copy {
  max-width: 760px;
}

.projects-hero-copy .page-kicker {
  margin-bottom: 20px;
}

.projects-hero-redesign h1 {
  max-width: 760px;
  margin: 0;
  color: #121a2d;
  font-family: var(--compass-heading-font);
  font-size: clamp(48px, 6vw, 74px);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.projects-hero-redesign > .projects-hero-copy > p {
  max-width: 700px;
  margin: 22px 0 0;
  color: #667085;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.58;
}

.projects-profile-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(118, 132, 255, 0.34), transparent 34%),
    radial-gradient(circle at 10% 100%, rgba(214, 172, 90, 0.18), transparent 38%),
    linear-gradient(150deg, #101d38 0%, #07172c 56%, #0a213a 100%);
  color: #ffffff;
  box-shadow:
    0 28px 70px rgba(7, 18, 37, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.projects-profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 38px 38px;
}

.projects-profile-topline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.projects-profile-avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.34), transparent 44%),
    linear-gradient(145deg, rgba(96, 107, 255, 0.95), rgba(47, 49, 146, 0.96));
  color: #ffffff;
  font-family: var(--compass-heading-font);
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.projects-profile-topline div {
  display: grid;
  gap: 3px;
}

.projects-profile-topline div > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.projects-profile-topline strong {
  color: #ffffff;
  font-family: var(--compass-heading-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.projects-profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.projects-profile-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 750;
}

.projects-profile-interests {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.projects-profile-interests > span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 700;
}

.projects-profile-interests img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.projects-profile-interests .projects-profile-more {
  justify-content: center;
  min-height: 30px;
  color: rgba(245, 211, 138, 0.88);
}

.projects-profile-edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.projects-profile-edit:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

/* Shared section headings */

.projects-section-heading,
.projects-library-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.projects-section-heading > div:first-child,
.projects-library-intro > div:first-child {
  max-width: 720px;
}

.projects-section-kicker {
  display: block;
  margin-bottom: 10px;
  color: #3f43ba;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.projects-section-heading h2,
.projects-library-intro h2 {
  margin: 0;
  color: #121a2d;
  font-family: var(--compass-heading-font);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.055em;
}

.projects-section-heading > div > p,
.projects-library-intro > div > p {
  max-width: 680px;
  margin: 14px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.58;
}

.projects-fit-note {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 290px;
  padding: 13px 15px;
  border: 1px solid rgba(47, 49, 146, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.projects-fit-note > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 11px;
  background: #eef0ff;
  color: #3f43ba;
  font-size: 15px;
  font-weight: 900;
}

.projects-fit-note p {
  margin: 0;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

/* Recommendation cards */

.projects-recommendations-section {
  margin-top: 8px;
}

.project-recommendation-grid > .empty-panel,
.project-library-grid > .empty-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.project-recommendation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.project-recommendation-card {
  position: relative;
  display: grid;
  grid-template-rows: 176px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, 0.085);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 18px 48px rgba(16, 24, 40, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-recommendation-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 49, 146, 0.18);
  box-shadow:
    0 28px 70px rgba(16, 24, 40, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.project-recommendation-featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(270px, 0.78fr) minmax(0, 1.5fr);
  grid-template-rows: auto;
  min-height: 478px;
}

.project-recommendation-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 176px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(145deg, var(--project-color, #3f43ba), #111b37 82%);
}

.project-recommendation-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.24;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
}

.project-recommendation-featured .project-recommendation-visual {
  min-height: 100%;
}

.project-recommendation-visual img {
  position: relative;
  z-index: 2;
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.22));
  transform: translateY(-4px);
}

.project-recommendation-featured .project-recommendation-visual img {
  width: 154px;
  height: 154px;
}

.project-visual-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.project-visual-orbit-one {
  width: 240px;
  height: 240px;
}

.project-visual-orbit-two {
  width: 340px;
  height: 340px;
  opacity: 0.58;
}

.project-recommendation-featured .project-visual-orbit-one {
  width: 300px;
  height: 300px;
}

.project-recommendation-featured .project-visual-orbit-two {
  width: 460px;
  height: 460px;
}

.project-visual-number {
  position: absolute;
  left: 18px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.36);
  font-family: var(--compass-heading-font);
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.project-recommendation-featured .project-visual-number {
  left: 26px;
  bottom: 22px;
  font-size: 76px;
}

.project-recommendation-content {
  display: flex;
  flex-direction: column;
  padding: 25px;
}

.project-recommendation-featured .project-recommendation-content {
  justify-content: center;
  padding: 38px 42px;
}

.project-recommendation-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-recommendation-role,
.project-recommendation-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-recommendation-role {
  background: #eef0ff;
  color: #3f43ba;
}

.project-recommendation-category {
  max-width: 190px;
  overflow: hidden;
  background: #f4f5f8;
  color: #667085;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-recommendation-headline {
  margin: 18px 0 6px;
  color: #3f43ba;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.project-recommendation-content h3 {
  margin: 0;
  color: #121a2d;
  font-family: var(--compass-heading-font);
  font-size: 27px;
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.project-recommendation-featured .project-recommendation-content h3 {
  max-width: 650px;
  font-size: clamp(36px, 4vw, 50px);
  line-height: 0.98;
}

.project-recommendation-description {
  margin: 13px 0 0;
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.54;
}

.project-recommendation-featured .project-recommendation-description {
  max-width: 700px;
  font-size: 16px;
}

.project-fit-explanation {
  margin-top: 19px;
  padding: 15px 16px;
  border: 1px solid rgba(47, 49, 146, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 89, 214, 0.1), transparent 44%),
    #f8f8fc;
}

.project-fit-explanation > span,
.project-outcome-card > span {
  display: block;
  margin-bottom: 5px;
  color: #3f43ba;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-fit-explanation p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.48;
}

.project-outcome-card {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(16, 24, 40, 0.075);
  border-radius: 18px;
  background: #ffffff;
}

.project-outcome-card strong {
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.project-commitment-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.project-commitment-row > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f5f8;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
}

.project-commitment-row strong {
  color: #344054;
  font-weight: 850;
}

.project-recommendation-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
}

.project-secondary-action,
.project-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 850;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.project-secondary-action {
  padding: 0 16px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  background: #ffffff;
  color: #344054;
}

.project-primary-action {
  gap: 8px;
  padding: 0 18px;
  border: 0;
  background: linear-gradient(180deg, #5759ee 0%, #33369e 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(47, 49, 146, 0.22);
}

.project-primary-action > span {
  font-size: 15px;
}

.project-primary-locked {
  background: linear-gradient(180deg, #172541 0%, #0a1930 100%);
}

.project-secondary-action:hover,
.project-primary-action:hover {
  transform: translateY(-1px);
}

.project-primary-action:hover {
  box-shadow: 0 18px 36px rgba(47, 49, 146, 0.28);
}

/* Library */

.projects-library-section {
  margin-top: 68px;
  padding-top: 44px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
}

.projects-library-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 186px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(47, 49, 146, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: #2f3192;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.055);
  transition: background 160ms ease, transform 160ms ease;
}

.projects-library-toggle:hover,
.projects-library-toggle.active {
  background: #eef0ff;
  transform: translateY(-1px);
}

.projects-library-toggle > span:last-child {
  font-size: 15px;
}

.projects-library-panel {
  scroll-margin-top: 92px;
  margin-top: 26px;
  padding: 24px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 89, 214, 0.07), transparent 32%),
    rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 54px rgba(16, 24, 40, 0.065);
}

.projects-library-panel[hidden] {
  display: none !important;
}

.projects-library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 170px;
  gap: 12px;
}

.projects-search-field,
.projects-filter-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.035);
}

.projects-search-field > span[aria-hidden="true"] {
  position: absolute;
  left: 16px;
  color: #98a2b3;
  font-size: 20px;
  pointer-events: none;
}

.projects-search-field input {
  width: 100%;
  min-height: 50px;
  border: 0;
  outline: 0;
  padding: 0 16px 0 46px;
  border-radius: inherit;
  background: transparent;
  color: #172033;
  font-size: 13px;
  font-weight: 650;
}

.projects-search-field input::placeholder {
  color: #98a2b3;
  font-weight: 550;
}

.projects-filter-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding-left: 14px;
}

.projects-filter-field > span {
  color: #98a2b3;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.projects-filter-field select {
  width: 100%;
  height: 50px;
  border: 0;
  outline: 0;
  padding: 0 30px 0 0;
  background: transparent;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.projects-library-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0 16px;
  padding: 0 2px;
}

.projects-library-count-row strong {
  color: #172033;
  font-family: var(--compass-heading-font);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.projects-library-count-row > span {
  max-width: 620px;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
  text-align: right;
}

.project-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.project-library-card,
.projects-library-unlock-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 20px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.045);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.project-library-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 49, 146, 0.17);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.08);
}

.project-library-card-topline {
  display: flex;
  align-items: center;
  gap: 9px;
}

.project-library-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  background: #f4f5f8;
}

.project-library-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.project-library-card-topline > span {
  flex: 1;
  overflow: hidden;
  color: #667085;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-library-card-topline > em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: #a15c06;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-library-card h3 {
  margin: 18px 0 0;
  color: #172033;
  font-family: var(--compass-heading-font);
  font-size: 21px;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.project-library-card > p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.48;
}

.project-library-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.project-library-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f5f8;
  color: #667085;
  font-size: 9px;
  font-weight: 750;
}

.project-library-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 43px;
  margin-top: auto;
  padding: 0 13px;
  border: 1px solid rgba(47, 49, 146, 0.12);
  border-radius: 14px;
  background: #f8f8fc;
  color: #2f3192;
  font-size: 11px;
  font-weight: 850;
}

.project-library-open:hover {
  background: #eef0ff;
}

.projects-library-unlock-card {
  justify-content: center;
  background:
    radial-gradient(circle at 90% 10%, rgba(92, 102, 255, 0.34), transparent 34%),
    linear-gradient(145deg, #101d38, #07172c);
  color: #ffffff;
}

.projects-library-unlock-card .projects-section-kicker {
  color: #f5d38a;
}

.projects-library-unlock-card h3 {
  margin: 0;
  color: #ffffff;
  font-family: var(--compass-heading-font);
  font-size: 25px;
  font-weight: 750;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.projects-library-unlock-card p {
  margin: 12px 0 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.5;
}

.projects-library-unlock-card .compass-primary-btn {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  background: #ffffff;
  color: #172033;
  box-shadow: none;
}

.projects-library-empty,
.projects-empty-state {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  min-height: 280px;
  padding: 40px;
  border: 1px dashed rgba(47, 49, 146, 0.2);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.projects-library-empty > span,
.projects-empty-state > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: #eef0ff;
  color: #3f43ba;
  font-size: 24px;
}

.projects-library-empty h3,
.projects-empty-state h3 {
  margin: 14px 0 0;
  color: #172033;
  font-family: var(--compass-heading-font);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.projects-library-empty p,
.projects-empty-state p {
  max-width: 520px;
  margin: 9px auto 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.projects-library-empty button,
.projects-empty-state button {
  min-height: 43px;
  margin-top: 18px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #2f3192;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

/* Project detail modal */

.project-detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 26px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.project-detail-drawer.active {
  opacity: 1;
  visibility: visible;
}

.project-detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 82, 205, 0.22), transparent 36%),
    rgba(8, 16, 31, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.project-detail-panel.project-detail-redesign {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: calc(100vh - 52px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 36px;
  background: #f9fafc;
  box-shadow:
    0 42px 120px rgba(6, 15, 31, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(18px) scale(0.985);
  transition: transform 200ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 49, 146, 0.24) transparent;
}

.project-detail-drawer.active .project-detail-panel {
  transform: translateY(0) scale(1);
}

.project-detail-panel::-webkit-scrollbar {
  width: 9px;
}

.project-detail-panel::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px 0;
}

.project-detail-panel::-webkit-scrollbar-thumb {
  border: 3px solid #f9fafc;
  border-radius: 999px;
  background: rgba(47, 49, 146, 0.28);
}

.project-detail-utility {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 16px 10px 26px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.07);
  background: rgba(249, 250, 252, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.project-detail-utility > span {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-detail-close {
  position: static;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #667085;
  font-size: 24px;
  font-weight: 500;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.055);
}

.project-detail-close:hover {
  color: #172033;
  transform: translateY(-1px);
}

.project-detail-hero-redesign {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 34px 42px 46px;
}

.project-detail-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.36), transparent 28%),
    linear-gradient(145deg, var(--project-color, #3f43ba), #111b37 84%);
  box-shadow: 0 24px 58px rgba(16, 24, 40, 0.18);
}

.project-detail-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}

.project-detail-visual img {
  position: relative;
  z-index: 2;
  width: 164px;
  height: 164px;
  object-fit: contain;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.24));
}

.project-detail-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.project-detail-orbit-one {
  width: 280px;
  height: 280px;
}

.project-detail-orbit-two {
  width: 410px;
  height: 410px;
  opacity: 0.55;
}

.project-detail-hero-copy {
  max-width: 600px;
}

.project-detail-fit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eef0ff;
  color: #3f43ba;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.project-detail-hero-copy h2 {
  max-width: 620px;
  margin: 16px 0 0;
  color: #121a2d;
  font-family: var(--compass-heading-font);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 780;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.project-detail-hero-copy > p {
  max-width: 600px;
  margin: 17px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.58;
}

.project-detail-fit-card {
  margin-top: 22px;
  padding: 17px 18px;
  border: 1px solid rgba(47, 49, 146, 0.11);
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 89, 214, 0.1), transparent 42%),
    #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.045);
}

.project-detail-fit-card > span {
  display: block;
  margin-bottom: 6px;
  color: #3f43ba;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-detail-fit-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.project-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.project-detail-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef0f4;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
}

.project-detail-facts strong {
  color: #344054;
  font-weight: 850;
}

.project-detail-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 42px;
}

.project-detail-value-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.045);
}

.project-detail-outcome-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 89, 214, 0.1), transparent 42%),
    #ffffff;
}

.project-detail-section-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: #eef0ff;
  color: #3f43ba;
  font-family: var(--compass-heading-font);
  font-size: 13px;
  font-weight: 800;
}

.project-detail-value-card h3 {
  margin: 0;
  color: #172033;
  font-family: var(--compass-heading-font);
  font-size: 22px;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.project-detail-value-card p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.project-detail-plan-section,
.project-detail-application-section {
  margin: 38px 42px 0;
  padding: 30px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.045);
}

.project-detail-application-section {
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 172, 90, 0.1), transparent 34%),
    #ffffff;
}

.project-detail-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.project-detail-section-heading > div {
  max-width: 720px;
}

.project-detail-section-heading h3 {
  margin: 0;
  color: #172033;
  font-family: var(--compass-heading-font);
  font-size: 31px;
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.project-detail-section-heading p {
  margin: 11px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.54;
}

.project-detail-section-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: #eef0ff;
  color: #3f43ba;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.project-detail-milestones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.project-detail-milestones li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid rgba(16, 24, 40, 0.07);
  border-radius: 18px;
  background: #f8f9fb;
}

.project-detail-milestones li > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #ffffff;
  color: #3f43ba;
  font-family: var(--compass-heading-font);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.055);
}

.project-detail-milestones strong {
  display: block;
  color: #172033;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
}

.project-detail-milestones p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 11px;
  line-height: 1.44;
}

.project-application-uses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.project-application-uses article {
  min-height: 166px;
  padding: 17px;
  border: 1px solid rgba(16, 24, 40, 0.075);
  border-radius: 18px;
  background: rgba(249, 250, 252, 0.88);
}

.project-application-uses article > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #fff5df;
  color: #9a6700;
  font-family: var(--compass-heading-font);
  font-size: 10px;
  font-weight: 800;
}

.project-application-uses strong {
  display: block;
  color: #172033;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.project-application-uses p {
  margin: 7px 0 0;
  color: #667085;
  font-size: 10.5px;
  line-height: 1.45;
}

.project-detail-more {
  margin: 18px 42px 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 22px;
  background: #ffffff;
  overflow: hidden;
}

.project-detail-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
}

.project-detail-more summary::-webkit-details-marker {
  display: none;
}

.project-detail-more summary > span:first-child {
  display: grid;
  gap: 4px;
}

.project-detail-more summary strong {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.project-detail-more summary em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
}

.project-detail-more summary > span:last-child {
  color: #667085;
  font-size: 18px;
  transition: transform 160ms ease;
}

.project-detail-more[open] summary > span:last-child {
  transform: rotate(180deg);
}

.project-detail-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 20px;
}

.project-detail-more-grid article {
  padding: 16px;
  border-radius: 17px;
  background: #f8f9fb;
}

.project-detail-more-grid h4 {
  margin: 0 0 10px;
  color: #344054;
  font-size: 11px;
  font-weight: 850;
}

.project-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-chip-row span,
.project-chip-row .detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  font-size: 9px;
  font-weight: 750;
}

.project-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 30px;
  padding: 18px 24px 18px 42px;
  border-top: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(249, 250, 252, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.project-detail-footer > div:first-child > span {
  display: block;
  color: #3f43ba;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-detail-footer > div:first-child > p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 11px;
}

.project-detail-footer-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.project-detail-not-yet,
.project-detail-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 850;
}

.project-detail-not-yet {
  padding: 0 15px;
  border: 1px solid rgba(16, 24, 40, 0.09);
  background: #ffffff;
  color: #667085;
}

.project-detail-start {
  gap: 8px;
  min-width: 176px;
  padding: 0 18px;
  border: 0;
  background: linear-gradient(180deg, #5759ee 0%, #33369e 100%);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(47, 49, 146, 0.24);
}

.project-detail-start:hover,
.project-detail-not-yet:hover {
  transform: translateY(-1px);
}

/* Responsive */

@media (max-width: 980px) {
  .projects-hero.projects-hero-redesign {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 30px;
  }

  .project-recommendation-featured {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .project-recommendation-featured .project-recommendation-content {
    padding: 32px;
  }

  .projects-library-toolbar {
    grid-template-columns: minmax(230px, 1fr) repeat(2, 180px);
  }

  .project-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-detail-hero-redesign {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 30px;
    padding: 30px;
  }

  .project-detail-visual {
    min-height: 330px;
  }

  .project-detail-value-grid {
    padding: 0 30px;
  }

  .project-detail-plan-section,
  .project-detail-application-section,
  .project-detail-more {
    margin-left: 30px;
    margin-right: 30px;
  }

  .project-application-uses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .projects-page.projects-redesign {
    padding-bottom: 118px;
  }

  .projects-hero.projects-hero-redesign {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 24px 0 38px;
  }

  .projects-hero-redesign h1 {
    font-size: clamp(42px, 13vw, 58px);
    line-height: 0.95;
    letter-spacing: -0.065em;
  }

  .projects-hero-redesign > .projects-hero-copy > p {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.54;
  }

  .projects-profile-card {
    padding: 20px;
    border-radius: 26px;
  }

  .projects-profile-interests {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-profile-interests > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .projects-profile-interests .projects-profile-more {
    grid-column: 1 / -1;
  }

  .projects-section-heading,
  .projects-library-intro {
    display: grid;
    gap: 18px;
    align-items: start;
  }

  .projects-section-heading h2,
  .projects-library-intro h2 {
    font-size: clamp(31px, 10vw, 40px);
  }

  .projects-fit-note {
    max-width: none;
  }

  .project-recommendation-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 22px;
  }

  .project-recommendation-card,
  .project-recommendation-featured {
    grid-column: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 190px auto;
    min-height: 0;
    border-radius: 28px;
  }

  .project-recommendation-visual,
  .project-recommendation-featured .project-recommendation-visual {
    min-height: 190px;
  }

  .project-recommendation-featured .project-recommendation-visual img,
  .project-recommendation-visual img {
    width: 122px;
    height: 122px;
  }

  .project-recommendation-featured .project-visual-number,
  .project-visual-number {
    left: 18px;
    bottom: 14px;
    font-size: 56px;
  }

  .project-recommendation-content,
  .project-recommendation-featured .project-recommendation-content {
    padding: 23px 20px 20px;
  }

  .project-recommendation-featured .project-recommendation-content h3,
  .project-recommendation-content h3 {
    font-size: clamp(29px, 9vw, 38px);
    line-height: 1;
  }

  .project-recommendation-featured .project-recommendation-description,
  .project-recommendation-description {
    font-size: 14px;
  }

  .project-recommendation-actions {
    grid-template-columns: 1fr;
  }

  .project-secondary-action,
  .project-primary-action {
    width: 100%;
    min-height: 50px;
  }

  .projects-library-section {
    margin-top: 52px;
    padding-top: 36px;
  }

  .projects-library-toggle {
    width: 100%;
  }

  .projects-library-panel {
    margin-left: -4px;
    margin-right: -4px;
    padding: 16px;
    border-radius: 26px;
  }

  .projects-library-toolbar {
    grid-template-columns: 1fr;
  }

  .projects-search-field,
  .projects-filter-field {
    min-height: 54px;
  }

  .projects-library-count-row {
    display: grid;
    gap: 7px;
    margin: 20px 0 14px;
  }

  .projects-library-count-row > span {
    text-align: left;
  }

  .project-library-grid {
    grid-template-columns: 1fr;
  }

  .project-library-card,
  .projects-library-unlock-card {
    min-height: 286px;
    border-radius: 22px;
  }

  .project-detail-drawer {
    place-items: end center;
    padding: 0;
  }

  .project-detail-panel.project-detail-redesign {
    width: 100%;
    max-height: calc(100dvh - 18px);
    border-radius: 30px 30px 0 0;
    transform: translateY(28px);
  }

  .project-detail-utility {
    min-height: 62px;
    padding: 8px 12px 8px 18px;
  }

  .project-detail-close {
    width: 42px;
    height: 42px;
  }

  .project-detail-hero-redesign {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 18px 18px 28px;
  }

  .project-detail-visual {
    min-height: 220px;
    border-radius: 25px;
  }

  .project-detail-visual img {
    width: 126px;
    height: 126px;
  }

  .project-detail-orbit-one {
    width: 230px;
    height: 230px;
  }

  .project-detail-orbit-two {
    width: 340px;
    height: 340px;
  }

  .project-detail-hero-copy h2 {
    font-size: clamp(38px, 12vw, 50px);
  }

  .project-detail-hero-copy > p {
    font-size: 14px;
  }

  .project-detail-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-detail-facts span {
    justify-content: center;
    min-height: 34px;
  }

  .project-detail-value-grid {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }

  .project-detail-value-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 13px;
    padding: 19px;
    border-radius: 22px;
  }

  .project-detail-section-number {
    width: 38px;
    height: 38px;
  }

  .project-detail-plan-section,
  .project-detail-application-section {
    margin: 24px 18px 0;
    padding: 20px;
    border-radius: 24px;
  }

  .project-detail-section-heading {
    display: grid;
    gap: 13px;
    align-items: start;
  }

  .project-detail-section-heading h3 {
    font-size: 28px;
  }

  .project-detail-section-heading > span {
    width: fit-content;
  }

  .project-detail-milestones {
    grid-template-columns: 1fr;
  }

  .project-detail-milestones li {
    min-height: 0;
  }

  .project-application-uses {
    grid-template-columns: 1fr;
  }

  .project-application-uses article {
    min-height: 0;
  }

  .project-detail-more {
    margin: 14px 18px 0;
    border-radius: 20px;
  }

  .project-detail-more summary {
    min-height: 74px;
    padding: 14px 16px;
  }

  .project-detail-more-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
  }

  .project-detail-footer {
    display: grid;
    gap: 14px;
    padding: 15px 18px calc(15px + env(safe-area-inset-bottom));
  }

  .project-detail-footer-actions {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
  }

  .project-detail-not-yet,
  .project-detail-start {
    width: 100%;
    min-width: 0;
    min-height: 50px;
  }
}

@media (max-width: 430px) {
  .projects-profile-interests {
    grid-template-columns: 1fr;
  }

  .projects-profile-interests .projects-profile-more {
    grid-column: auto;
  }

  .project-recommendation-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-recommendation-category {
    max-width: 100%;
  }

  .project-commitment-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-commitment-row > span {
    justify-content: center;
  }

  .project-detail-footer-actions {
    grid-template-columns: 1fr;
  }

  .project-detail-not-yet {
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-recommendation-card,
  .project-primary-action,
  .project-secondary-action,
  .project-library-card,
  .projects-library-toggle,
  .project-detail-drawer,
  .project-detail-panel {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Recommendation foundation v2 */

.projects-profile-interests > span.primary {
  border-color: rgba(47, 49, 146, 0.26);
  background: #f5f6ff;
  color: #2f3192;
  box-shadow: inset 0 0 0 1px rgba(47, 49, 146, 0.08);
}

.projects-profile-interests > span.primary::after {
  content: "Primary";
  margin-left: 4px;
  color: #2f3192;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-fit-reason-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.project-fit-reason-list li {
  position: relative;
  padding-left: 20px;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.project-fit-reason-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #087443;
  font-size: 12px;
  font-weight: 900;
}

.project-detail-fit-reasons {
  margin-top: 12px;
}

.project-detail-fit-reasons li {
  color: #344054;
}

@media (max-width: 760px) {
  .projects-profile-interests > span.primary::after {
    display: none;
  }

  .project-fit-reason-list li {
    font-size: 12.5px;
  }
}

/* =========================================================
   Rounded white project icon treatment
   Matches the Dashboard icon presentation
========================================================= */

.project-recommendation-visual img,
.project-detail-visual img {
  display: block;
  box-sizing: border-box;
  object-fit: contain;
  padding: 9px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 30px;
  background: #ffffff;
  box-shadow:
    0 22px 48px rgba(7, 18, 37, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

/* Large Best Starting Point card */
.project-recommendation-featured .project-recommendation-visual img {
  width: 170px;
  height: 170px;
  padding: 10px;
  border-radius: 34px;
}

/* Smaller recommendation cards */
.project-recommendation-visual img {
  width: 132px;
  height: 132px;
  padding: 8px;
  border-radius: 27px;
}

/* See Why It Fits project popup */
.project-detail-visual img {
  width: 180px;
  height: 180px;
  padding: 10px;
  border-radius: 36px;
}

/* Small project library icons */
.project-library-icon img {
  border-radius: 11px;
}

/* Mobile sizing */
@media (max-width: 760px) {
  .project-recommendation-featured .project-recommendation-visual img,
  .project-recommendation-visual img {
    width: 132px;
    height: 132px;
    padding: 8px;
    border-radius: 27px;
  }

  .project-detail-visual img {
    width: 138px;
    height: 138px;
    padding: 8px;
    border-radius: 29px;
  }
}

.project-recommendation-parent-pick {
  border-color: rgba(78, 70, 229, 0.24);
  box-shadow:
    0 22px 58px rgba(48, 46, 160, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.project-recommendation-parent-pick .project-recommendation-role {
  color: #3730a3;
  background: rgba(79, 70, 229, 0.1);
}

/* Unified Projects + Project Library */
.projects-library-unified { border-top: 1px solid var(--border, rgba(15,23,42,.10)); padding-top: clamp(28px,4vw,52px); }
.projects-library-unified .family-project-library-host { min-height: 420px; }


/* =========================================================
   Projects mode architecture: personalized first, library on demand
========================================================= */
.projects-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 8px;
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(16, 24, 40, 0.075);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 38px rgba(16, 24, 40, 0.045);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.projects-mode-bar > div:first-child { display: grid; gap: 2px; }
.projects-mode-eyebrow {
  color: #5960c7;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.projects-mode-bar strong {
  color: #273247;
  font-size: 13px;
  font-weight: 780;
}
.projects-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(16, 24, 40, 0.07);
  border-radius: 15px;
  background: rgba(243, 245, 250, 0.9);
}
.projects-mode-switch button {
  min-height: 38px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  color: #687386;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.projects-mode-switch button.active {
  color: #18223a;
  background: #fff;
  box-shadow: 0 5px 15px rgba(16, 24, 40, 0.08);
}
.projects-recommended-mode[hidden],
.projects-library-unified[hidden] { display: none !important; }
.projects-browse-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}
.projects-browse-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid rgba(47, 49, 146, 0.12);
  border-radius: 999px;
  color: #3437a7;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.055);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.projects-browse-cta:hover { transform: translateY(-1px); box-shadow: 0 17px 38px rgba(16,24,40,.08); }
.projects-library-unified {
  margin-top: 34px !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}
.projects-library-compact-hero {
  max-width: 760px;
  margin: 42px 0 22px;
}
.projects-library-compact-hero h2 {
  margin: 0;
  color: #121a2d;
  font-family: var(--compass-heading-font);
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: .98;
}
.projects-library-compact-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: #667085;
  font-size: 16px;
  line-height: 1.55;
}
@media (max-width: 760px) {
  .projects-mode-bar { align-items: stretch; flex-direction: column; margin-top: 18px; padding: 14px; }
  .projects-mode-switch { width: 100%; }
  .projects-mode-switch button { width: 100%; }
}

/* =========================================================
   Projects: first-class Saved view
========================================================= */
.projects-mode-switch {
  grid-template-columns: repeat(3, auto);
}
.projects-mode-switch button[data-projects-mode-button="saved"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.projects-saved-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #5a60c7;
  background: rgba(88, 93, 214, 0.09);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.projects-mode-switch button.active .projects-saved-count {
  color: #fff;
  background: #5a60c7;
}
.projects-library-unified[data-saved-view="true"] .projects-library-compact-hero {
  max-width: 700px;
}
.family-project-library-host .pl-app.pl-saved-view .pl-curated {
  display: none;
}
.family-project-library-host .pl-app.pl-saved-view .pl-query-suggestions {
  display: none;
}
.family-project-library-host .pl-app.pl-saved-view .pl-search-section {
  margin-bottom: 18px;
}
.family-project-library-host .pl-app.pl-saved-view [data-pl-saved-toggle] {
  display: none !important;
}
.family-project-library-host .pl-saved-empty {
  min-height: 300px;
}
.family-project-library-host .pl-saved-empty > span svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 760px) {
  .projects-mode-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .projects-mode-switch button {
    padding: 0 9px;
    font-size: 11px;
  }
  .projects-saved-count {
    min-width: 18px;
    height: 18px;
    font-size: 9px;
  }
}


/* =========================================================
   Projects: persistent mode navigation
   Keep For you / Saved / Browse all available while a student
   moves through recommendations or the full Project Library.
========================================================= */
.projects-mode-bar {
  position: sticky;
  top: 12px;
  z-index: 58;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 251, 255, 0.90));
  border-color: rgba(48, 52, 128, 0.10);
  box-shadow:
    0 16px 44px rgba(16, 24, 40, 0.07),
    0 2px 8px rgba(16, 24, 40, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.projects-mode-bar::before {
  content: "";
  position: absolute;
  inset: -8px -10px;
  z-index: -1;
  border-radius: 30px;
  background: rgba(247, 248, 252, 0.56);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.projects-mode-bar:hover::before,
.projects-mode-bar:focus-within::before {
  opacity: 1;
}

@media (max-width: 760px) {
  .projects-mode-bar {
    top: 72px;
    z-index: 52;
    border-radius: 20px;
    box-shadow:
      0 14px 34px rgba(16, 24, 40, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }
}
