.shared-root {
  background: #ddd9cf;
}

.shared-shell {
  width: min(1340px, calc(100% - 48px));
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  overflow: clip;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(34, 31, 24, 0.12);
  animation: portal-settle 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.platform-bar {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 32px;
  background: #f2f1ec;
}

.platform-brand,
.platform-profile {
  display: flex;
  align-items: center;
}

.platform-brand {
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.platform-brand__mark,
.platform-profile__avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.platform-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 14px 14px 14px 5px;
  background: var(--lime);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.platform-profile {
  gap: 10px;
  color: #4d514e;
  font-size: 0.78rem;
  font-weight: 650;
}

.platform-profile__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: #4f5260;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.shared-main {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 52px clamp(32px, 5vw, 72px) 72px;
}

.shared-intro {
  margin-bottom: 30px;
}

.shared-intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.learning-section,
.upcoming-section,
.archive-section,
.updates-section {
  min-width: 0;
}

.upcoming-section,
.archive-section,
.updates-section {
  margin-top: 48px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.34rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.course-gallery {
  display: grid;
  gap: 18px;
}

.course-poster {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  min-height: 440px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--lime-soft);
}

.course-poster__main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 36px 40px 38px;
}

.course-poster__access,
.upcoming-poster__date {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px 999px 999px 7px;
  background: rgba(255, 255, 255, 0.72);
  color: #4e584f;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.course-poster__access svg,
.course-poster__action svg,
.root-state__icon svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.course-poster__title {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 46px;
}

.course-poster__code {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 19px 19px 19px 7px;
  background: var(--lime);
  color: #29340b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.course-poster h2,
.course-poster p,
.upcoming-poster h3,
.upcoming-poster p,
.archive-course h3,
.update-item h3,
.update-item p,
.root-state h1,
.root-state h2,
.root-state p {
  margin: 0;
}

.course-poster h2 {
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.course-poster__title p {
  max-width: 58ch;
  margin-top: 14px;
  color: #4f5949;
  font-size: 0.9rem;
  line-height: 1.55;
}

.course-poster__next {
  display: grid;
  gap: 3px;
  max-width: 54ch;
  margin-top: auto;
  padding-top: 34px;
}

.course-poster__next span {
  color: #5d6855;
  font-size: 0.72rem;
}

.course-poster__next strong {
  font-size: 0.92rem;
  line-height: 1.35;
}

.course-poster__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.course-poster__action,
.course-poster__open {
  margin-top: 0 !important;
}

.course-poster__open {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.course-poster__open:hover {
  background: #fff;
  transform: translateY(-2px);
}

.course-poster__progress {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  background: var(--turquoise);
}

.course-poster__progress-copy {
  display: grid;
  gap: 3px;
}

.course-poster__progress-copy strong {
  max-width: 12ch;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.35;
}

.course-poster__progress .progress-track {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 16px;
}

.upcoming-poster {
  display: grid;
  min-height: 230px;
  overflow: hidden;
  padding: 30px;
  border-radius: 24px;
  background: var(--focus);
  color: #fff;
}

.upcoming-poster__copy {
  align-self: end;
  max-width: 36ch;
}

.upcoming-poster__date {
  background: rgba(23, 25, 24, 0.24);
  color: #fff;
}

.upcoming-poster h3 {
  max-width: 18ch;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.upcoming-poster p {
  max-width: 46ch;
  margin-top: 10px;
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.5;
}

.archive-list,
.updates-feed {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface-muted);
}

.archive-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
}

.archive-course + .archive-course,
.update-item + .update-item {
  border-top: 1px solid rgba(23, 25, 24, 0.08);
}

.archive-course h3 {
  margin-top: 8px;
  font-size: 0.98rem;
}

.archive-course__progress {
  display: grid;
  justify-items: end;
  font-variant-numeric: tabular-nums;
}

.archive-course__progress strong {
  font-size: 1.15rem;
}

.archive-course__progress span {
  color: var(--muted);
  font-size: 0.7rem;
}

.status-chip--root-expired {
  background: #dfdfda;
  color: #555b55;
}

.update-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 24px;
}

.update-item time {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.update-item h3 {
  font-size: 0.92rem;
  line-height: 1.35;
}

.update-item p {
  max-width: 70ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.root-state {
  display: grid;
  max-width: 780px;
  min-height: 430px;
  align-content: center;
  justify-items: start;
  gap: 22px;
  padding: 48px;
  border-radius: 24px;
  background: var(--lime-soft);
}

.root-state--empty {
  min-height: 320px;
  background: var(--lilac);
}

.root-state--error {
  background: var(--danger-bg);
}

.root-state__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.72);
}

.root-state__icon svg {
  width: 26px;
  height: 26px;
}

.root-state h1,
.root-state h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.root-state p {
  max-width: 55ch;
  margin-top: 8px;
  color: #566056;
}

.root-state--error p {
  color: var(--danger);
}

.root-state .primary-action,
.course-poster .primary-action {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .shared-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .shared-main {
    padding: 42px 24px 60px;
  }

  .course-poster {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .course-poster__main {
    padding: 30px;
  }

  .course-poster__title {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
  }

  .course-poster__code {
    width: 46px;
    height: 46px;
    border-radius: 15px 15px 15px 5px;
  }

  .course-poster__progress {
    padding: 26px;
  }

  .upcoming-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  .platform-bar {
    padding: 14px 18px;
  }

  .platform-profile > span:first-child,
  .platform-brand__name {
    display: none;
  }

  .shared-main {
    padding: 32px 16px 48px;
  }

  .course-poster {
    grid-template-columns: 1fr;
  }

  .course-poster__progress {
    min-height: 180px;
  }

  .course-poster__title {
    margin-top: 34px;
  }

  .course-poster__actions,
  .course-poster__action,
  .course-poster__open {
    width: 100%;
  }

  .archive-course,
  .update-item {
    grid-template-columns: 1fr;
  }

  .archive-course {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-course__progress {
    justify-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shared-shell {
    animation: none;
  }
}

.catalog-poster__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.catalog-poster__actions .secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: .93rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out;
}

.catalog-poster__actions .secondary-action:hover {
  background: var(--lilac);
}

.catalog-poster__actions .primary-action {
  margin-top: 0;
}
