/* Lesson 6: the reading order follows the chosen path through the tree. */
.course-ost {
  container-type: inline-size;
  margin: 18px 0 36px;
  color: var(--text);
  line-height: 1.55;
}

.course-ost .ost-goal {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4cqi, 34px);
  border-radius: 16px;
  background: linear-gradient(115deg, #102b42, #174660);
  color: #fff;
}
.reading .course-ost .ost-eyebrow {
  display: block;
  margin: 0 0 7px;
  color: #a8e1f2;
  font-size: 13px;
  font-weight: 600;
}
.reading .course-ost .ost-goal-title {
  max-width: 37ch;
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.8cqi, 25px);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: pretty;
}
.reading .course-ost .ost-goal .ost-eyebrow strong { color: inherit }
.reading .course-ost .ost-metric {
  align-self: center;
  margin: 0;
  color: #acddeb;
  font-size: clamp(27px, 4.3cqi, 42px);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.reading .course-ost .ost-metric strong { color: #fff; font-weight: 650 }
.reading .course-ost .ost-metric strong:last-child { color: #9ce6eb }
.reading .course-ost .ost-goal-note {
  grid-column: 1 / -1;
  margin: 0;
  border-top: 1px solid #ffffff40;
  padding-top: 12px;
  color: #d3e5ee;
  font-size: 13px;
  line-height: 1.55;
}
.course-ost > h5 {
  margin: 24px 0 12px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}
.ost-branches {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}
.course-ost details { min-width: 0; margin: 0; background: var(--panel) }
.course-ost summary {
  position: relative;
  display: grid;
  padding: 15px 36px 15px 16px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
}
.course-ost summary::-webkit-details-marker { display: none }
.course-ost summary:focus-visible { outline: 3px solid var(--acc); outline-offset: -3px; border-radius: 9px }
.course-ost summary:hover .ost-item-title { color: var(--acc) }
.ost-item-title { font-weight: 600; text-wrap: pretty }
.ost-chevron {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  color: var(--muted);
  transform: translateY(-70%) rotate(45deg);
}
details[open] > summary > .ost-chevron { transform: translateY(-25%) rotate(225deg) }
.ost-branch { position: relative; border: 1px solid var(--line2); border-radius: 11px }
.ost-branch summary { gap: 6px }
.ost-branch-id {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.ost-selected-label { color: var(--acc); font-size: 11px }
.course-ost .ost-selected { border-color: var(--acc); background: var(--blue-soft) }
.course-ost .ost-detail-body { padding: 0 16px 14px; font-size: 14px }
.reading .course-ost .ost-detail-body p { margin: 0 0 9px; line-height: 1.55 }
.reading .course-ost .ost-detail-body ul { margin: 0; padding-left: 1.2em }
.reading .course-ost .ost-detail-body li { margin: .5em 0 0; line-height: 1.55 }
.ost-focus {
  margin: 16px 0 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--acc);
  background: var(--blue-soft);
  border-radius: 0 10px 10px 0;
}
.reading .course-ost .ost-focus .ost-eyebrow { color: var(--acc) }
.ost-focus-title { margin: 0 0 8px; color: var(--text); font-size: 19px; line-height: 1.3 }
.reading .course-ost .ost-focus p { margin: 6px 0 0; font-size: 15px; line-height: 1.55 }
.ost-solutions { overflow: hidden; border: 1px solid var(--line2); border-radius: 12px }
.ost-solution + .ost-solution { border-top: 1px solid var(--line) }
.ost-solution summary { min-height: 48px; align-items: center }
.ost-solution[open] .ost-item-title { color: var(--acc) }
.reading .course-ost .ost-takeaway { margin: 16px 0 0; font-size: 15px; line-height: 1.6 }
@container (min-width: 540px) {
  .ost-branches { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .ost-branch summary { min-height: 85px; align-content: start }
  .ost-goal { grid-template-columns: minmax(0, 1fr) auto }
  .course-ost .ost-metric { text-align: right }
}
@container (min-width: 860px) {
  .ost-branches { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 12px }
  .ost-branch summary { min-height: 98px }
  .ost-branch::before {
    content: ''; position: absolute; bottom: calc(100% + 1px); left: 50%;
    height: 10px; border-left: 1px solid var(--line2);
  }
  .ost-branch:not(:last-child)::after {
    content: ''; position: absolute; bottom: calc(100% + 10px); left: 50%;
    width: calc(100% + 14px); border-top: 1px solid var(--line2); pointer-events: none;
  }
}
