.header-row {
  padding: 1rem 0;
}

.header-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: baseline;
  font-size: .85rem;
}

.header-row [aria-current="page"] {
  color: var(--blue);
  text-decoration: none;
}

.intro .lead {
  margin-bottom: 0;
}

.path-heading, .catalog summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .85rem;
}

.path-heading h2 {
  margin: 0;
}

.section-count {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 400;
}

.path-note, .storage-note, .source-note {
  margin: .65rem 0;
  color: var(--muted);
  font-size: .88rem;
}

.storage-note {
  border-left: 2px solid var(--blue);
  padding-left: .75rem;
}

.course-list {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
}

.primary-list {
  counter-reset: course;
}

.primary-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  counter-increment: course;
}

.primary-list > li::before {
  content: counter(course, decimal-leading-zero) / "";
  padding: 1rem .65rem 0 0;
  color: var(--blue);
  font: 600 .86rem/1.65 ui-monospace, monospace;
}

.course {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .55rem 1.25rem;
  padding: .9rem 0;
  border-top: 1px solid var(--line);
}

.course-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .65rem;
}

.primary-list .course > div {
  position: relative;
  padding-left: 2.5rem;
}

.topic-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.95rem;
  height: 1.95rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topic-planning { color: var(--accent); }
.topic-communication { color: #e0bbd7; }
.topic-robotics { color: #a0d4b9; }
.topic-architecture { color: #c8bdf1; }
.topic-ml { color: #e4cb8f; }

.course h3, .course p {
  margin: 0;
}

.course h3 {
  overflow-wrap: anywhere;
}

.course h3 a {
  color: var(--ink);
  text-decoration-color: var(--muted);
}

.course h3 a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.course .course-meta {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .84rem;
}

.course .course-reason {
  margin-top: .35rem;
  font-size: .93rem;
}

.next-badge {
  border: 1px solid var(--accent);
  border-radius: 1rem;
  padding: 0 .55rem;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 650;
}

.course-status {
  display: grid;
  color: var(--muted);
  font-size: .82rem;
}

.course-status select {
  min-width: 8rem;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .35rem .55rem;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.course-status[data-state="in-progress"] select {
  border-color: var(--accent);
}

.course-status[data-state="completed"] select {
  border-color: var(--blue);
}

.catalog {
  margin-top: .85rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

.catalog summary {
  align-items: center;
  padding: .75rem 1rem;
  cursor: pointer;
  font-weight: 700;
}

.catalog summary::before {
  content: "";
  width: .42rem;
  height: .42rem;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

.catalog[open] summary::before {
  transform: rotate(45deg);
}

.catalog summary::-webkit-details-marker {
  display: none;
}

.catalog .course-list {
  margin: 0 1rem;
}

.source-note {
  margin-top: 1.25rem;
}

@media (max-width: 600px) {
  .course {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-status {
    justify-self: start;
    display: flex;
    gap: .55rem;
    align-items: center;
  }
}
