/* Course pages (/courses/<course>/). Linked after main.css on all 15 course pages. */

/* Anchored sections clear the sticky header and the in-page tab strip. */
html {
  scroll-padding-top: calc(var(--header-h) + 64px);
}

.h2-sm {
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem);
}

/* ---- Hero ---- */
.course-hero {
  --split-align: start;
}
.course-hero__copy {
  --stack-gap: var(--s-5);
}
.course-hero__copy .breadcrumb {
  margin-bottom: 0;
}
.course-hero__tags {
  list-style: none;
  margin: 0;
  padding: 0;
  --cluster-gap: 10px;
}
.course-hero .lead {
  font-size: var(--fs-lg);
}

/* Key figures under the hero lead (also used on the catalogue) */
.course-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-7);
  margin: 0;
  padding-top: var(--s-4);
  border-top: 1px solid rgb(255 255 255 / 0.2);
}
.course-stats > div {
  display: flex;
  flex-direction: column-reverse;
}
.course-stats dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
}
.course-stats dd {
  margin: 0;
  font: 700 1.875rem/1.1 var(--font-display);
  color: var(--c-white);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .course-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Enrol card in the hero */
.enrol-card {
  box-shadow: var(--shadow-panel);
}
.enrol-card .pricing__amount {
  font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3rem);
  line-height: 1;
  color: var(--c-navy-900);
}
.enrol-card .btn {
  width: 100%;
}
.enrol-card .checklist {
  color: var(--color-text);
}

/* ---- Outcomes + why ---- */
.course-facts {
  margin: 0;
}
.course-fact {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
}
.course-fact dd {
  margin: 0;
}

/* ---- Syllabus ---- */
.session-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: 0;
  padding: var(--s-4) 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--color-muted);
}
.session-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.session-legend svg {
  color: var(--c-navy-900);
}
.syllabus summary {
  flex-wrap: wrap;
  row-gap: var(--s-2);
}
.syllabus summary .tag {
  flex: none;
  align-self: center;
}
.session__name {
  flex: 1 1 12rem;
}
.syllabus summary::after {
  order: 3;
}
.syllabus summary .tag--accent {
  order: 2;
}

/* ---- Graded practical: HMI mimic ---- */
.practical-panel {
  box-shadow: var(--shadow-panel);
}
.practical-panel .hmi__bar {
  flex-wrap: wrap;
}
.mimic {
  width: 100%;
  height: auto;
}
.mimic__screen {
  fill: var(--c-hmi-950);
  stroke: var(--c-hmi-line);
}
.mimic__vessel {
  fill: none;
  stroke: var(--c-slate-300);
  stroke-width: 2;
}
.mimic__liquid {
  fill: rgb(200 97 26 / 0.55);
}
.mimic__pipe {
  fill: none;
  stroke: var(--c-slate-300);
  stroke-width: 2;
}
.mimic__flow {
  fill: none;
  stroke: var(--c-ok);
  stroke-width: 2;
}
.mimic__valve {
  fill: var(--c-hmi-900);
  stroke: var(--c-orange-600);
  stroke-width: 2;
}
.mimic__sp {
  fill: none;
  stroke: rgb(255 255 255 / 0.25);
  stroke-dasharray: 4 4;
}
.mimic__trend {
  fill: none;
  stroke-width: 2;
}
.mimic__trend--amber {
  stroke: var(--c-warn);
}
.mimic__trend--green {
  stroke: var(--c-ok);
}
.mimic__trend--blue {
  stroke: var(--color-focus);
}
.mimic__text {
  fill: var(--c-white);
  font-size: 10px;
}
.mimic__label,
.mimic__label text {
  fill: var(--c-slate-400);
  font-size: 9px;
}
.practical-panel__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.practical-panel__ok {
  color: var(--c-ok);
}
@media (max-width: 480px) {
  .practical-panel .hmi__value {
    font-size: 1rem;
  }
}

/* ---- How the practical runs ---- */
.practical-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.practical-steps .card-title {
  font-size: var(--fs-md);
}
@media (max-width: 1024px) {
  .practical-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .practical-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .practical-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Instructor ---- */
.instructor {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.instructor__media {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}
.instructor__body {
  justify-content: center;
  padding: clamp(var(--s-6), 3vw, var(--s-9));
}
.instructor__title {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
}
.instructor__meta {
  color: var(--color-accent);
  font-weight: 600;
}
@media (max-width: 860px) {
  .instructor {
    grid-template-columns: minmax(0, 1fr);
  }
  .instructor__media {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

/* ---- Track table ---- */
/* Contain the visually hidden link text so it scrolls with the table instead of widening the page. */
#track .table-wrap {
  position: relative;
}
.track-table tbody > tr > * {
  padding: 14px;
  vertical-align: middle;
}
.track-table .is-current > * {
  background: var(--c-mist);
}
.track-table .is-current th {
  font-weight: 700;
}
.track-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.track-upgrade {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-5);
}
.track-upgrade p {
  flex: 1 1 320px;
  color: var(--color-text);
  font-size: var(--fs-base);
}

/* ---- Course enrol band ---- */
.course-cta {
  padding-block: var(--s-9);
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
}
.course-cta__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-6);
}
.course-cta__copy {
  flex: 1 1 320px;
}
.course-cta h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}
.course-cta p {
  margin-top: 6px;
  color: rgb(255 255 255 / 0.84);
}
