.article-content-layout {
  width: min(calc(100% - 40px), 1120px);
  display: grid;
  grid-template-columns: 178px minmax(0, 780px);
  align-items: start;
  gap: 42px;
}

.article-content-layout > .article-body {
  width: 100%;
  max-width: none;
  margin: 0;
}

.course-rail {
  position: sticky;
  top: 104px;
  align-self: start;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 16px 12px 12px;
  border: 1px solid rgb(255 196 0 / 34%);
  border-radius: 18px;
  background: #151515;
  color: #fff;
  scrollbar-width: thin;
}

.course-rail h2 {
  margin: 0 0 13px;
  color: #ffc400;
  font-size: .9rem;
  line-height: 1.15;
  letter-spacing: .02em;
}

.course-rail-list {
  display: grid;
  gap: 8px;
}

.course-rail-list a {
  min-height: 67px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 12px;
  background: rgb(255 255 255 / 4%);
  color: #f7f4ec;
  font-size: .69rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.course-rail-list a:hover,
.course-rail-list a:focus-visible {
  transform: translateX(2px);
  border-color: #ffc400;
  background: rgb(255 196 0 / 9%);
}

.course-rail-list img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 9px;
}

.course-promo {
  margin: 42px 0 56px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid #d6c58c;
  border-radius: 22px;
  background: linear-gradient(130deg, #fffdf7, #eee7d7);
  box-shadow: 0 18px 44px rgb(56 44 18 / 8%);
}

.course-promo .eyebrow {
  margin: 0 0 10px;
  color: #725900;
}

.course-promo h2 {
  margin: 0;
  color: #171512;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.course-promo > p:not(.eyebrow, .course-promo-hint) {
  margin: 9px 0 0;
  color: #565047;
  font-size: .91rem;
  line-height: 1.5;
}

.course-promo-hint { display: none; }

.course-card-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.course-card-row a {
  min-width: 0;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 6px;
  border: 1px solid #e2dac8;
  border-radius: 15px;
  background: #fff;
  color: #211f1b;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.course-card-row a:hover,
.course-card-row a:focus-visible {
  transform: translateY(-4px);
  border-color: #d7a900;
  box-shadow: 0 10px 22px rgb(61 46 10 / 12%);
}

.course-card-row img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 12px;
}

.course-promo-bottom {
  margin-top: 68px;
  border-color: #242321;
  background: #171716;
  color: #fff;
}

.course-promo-bottom .eyebrow { color: #ffd84a; }
.course-promo-bottom h2 { color: #fff; }
.course-promo-bottom > p:not(.eyebrow, .course-promo-hint) { color: #c9c5bb; }
.course-promo-bottom .course-card-row a { background: #242321; border-color: #454239; color: #fff; }
.course-promo-bottom .course-card-row a:hover,
.course-promo-bottom .course-card-row a:focus-visible { border-color: #ffc400; }

@media (max-width: 1120px) {
  .article-content-layout {
    width: min(calc(100% - 40px), 920px);
    display: block;
  }

  .course-rail { display: none; }
}

@media (max-width: 720px) {
  .article-content-layout { width: min(calc(100% - 28px), 780px); }
  .course-promo { margin-block: 34px 42px; padding: 20px 16px; border-radius: 18px; }
  .course-promo-hint { display: block; margin: 16px 0 -12px; color: #716a5d; font-size: .72rem; }
  .course-card-row {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 3px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-color: #b99a32 #e9e3d5;
    scrollbar-width: thin;
  }
  .course-card-row a { flex: 0 0 112px; min-height: 120px; scroll-snap-align: start; }
  .course-card-row img { width: 58px; height: 58px; }
  .course-promo-bottom { margin-top: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .course-rail-list a,
  .course-card-row a { transition: none; }
}
