/* How it works page only. Linked after main.css in /how-it-works/index.html. */

/* ---- Hero ---- */
.hiw-hero {
  padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem);
}
.hiw-hero__title {
  max-width: 22ch;
}
.hiw-hero .lead {
  font-size: var(--fs-lg);
}
@media (max-width: 860px) {
  .hiw-hero .page-hero__scrim {
    background: rgb(11 31 58 / 0.88);
  }
}

.hiw-h2-sm {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
}

/* ---- Phase timeline, drawn to scale (26 weeks) ---- */
.hiw-timeline {
  display: flex;
  gap: 2px;
  border-radius: var(--radius);
  overflow: hidden;
}
.hiw-timeline__seg {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  background: var(--c-navy-900);
  color: var(--c-white);
  font: 600 var(--fs-xs) / 1.2 var(--font-body);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hiw-timeline__seg--4 {
  flex: 4 1 0;
}
.hiw-timeline__seg--14 {
  flex: 14 1 0;
}
.hiw-timeline__seg--track {
  background: var(--c-navy-800);
}
.hiw-timeline__seg--capstone {
  background: var(--c-red-600);
}
.hiw-timeline__seg--career {
  background: var(--c-orange-600);
}

/* ---- Phase columns ---- */
.hiw-phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--c-white);
  overflow: hidden;
}
.hiw-phases > li {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-6);
  border-right: 1px solid var(--color-border);
  border-top: 4px solid var(--c-navy-900);
}
.hiw-phases > li:nth-child(2) {
  border-top-color: var(--c-navy-800);
}
.hiw-phases > li:nth-child(3) {
  border-top-color: var(--c-red-600);
}
.hiw-phases > li:nth-child(4) {
  border-top-color: var(--c-orange-600);
}
.hiw-phases > li:last-child {
  border-right: 0;
}
.hiw-phases p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
@media (max-width: 1024px) {
  .hiw-phases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hiw-phases > li:nth-child(2) {
    border-right: 0;
  }
}
@media (max-width: 560px) {
  .hiw-phases {
    grid-template-columns: minmax(0, 1fr);
  }
  .hiw-phases > li {
    border-right: 0;
  }
  .hiw-timeline__seg {
    padding-inline: 6px;
  }
  .hiw-timeline__wk {
    display: none;
  }
}

/* ---- Week planner ---- */
.hiw-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--c-white);
  overflow: hidden;
}
.hiw-week > li {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-height: 170px;
  padding: var(--s-4) var(--s-3);
  border-right: 1px solid var(--color-border);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-muted);
}
.hiw-week > li:last-child {
  border-right: 0;
}
.hiw-week__clinic {
  background: var(--c-mist);
}
.hiw-week__day {
  font: 700 0.875rem/1.2 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-navy-900);
}
.hiw-slot {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--c-navy-900);
  color: var(--c-white);
  font: 600 0.6875rem/1.3 var(--font-body);
}
.hiw-slot--lab {
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
}
.hiw-slot--due {
  margin-top: auto;
  background: var(--color-accent);
}
@media (max-width: 860px) {
  .hiw-week {
    grid-template-columns: minmax(0, 1fr);
  }
  .hiw-week > li {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: start;
    gap: var(--s-2) var(--s-3);
    min-height: 0;
    padding: var(--s-4);
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
  }
  .hiw-week > li:last-child {
    border-bottom: 0;
  }
  .hiw-week > li > :not(.hiw-week__day) {
    grid-column: 2;
  }
  .hiw-week__day {
    grid-row: 1 / span 3;
    padding-top: 2px;
  }
  .hiw-slot,
  .hiw-slot--lab,
  .hiw-slot--due {
    margin-top: 0;
    justify-self: start;
  }
}

/* ---- Lab models and fact tiles ---- */
.hiw-facts {
  margin: 0;
}
.hiw-facts dd {
  margin: 0;
}
.hiw-model {
  padding: var(--s-5);
}
.hiw-model p {
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ---- Grading table ---- */
.data-table td.hiw-grading__weight {
  font: 700 1.75rem/1 var(--font-display);
  color: var(--c-navy-900);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 560px) {
  /* Stack the three grading rows instead of scrolling the table sideways */
  .hiw-grading {
    min-width: 0;
  }
  .hiw-grading thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .hiw-grading tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: var(--s-2) var(--s-4);
    padding: var(--s-4);
    border-bottom: 1px solid var(--color-border);
  }
  .hiw-grading tbody tr:last-child {
    border-bottom: 0;
  }
  .hiw-grading tbody :is(td, th) {
    display: block;
    padding: 0;
    border: 0;
  }
  .hiw-grading tbody td:last-child {
    grid-column: 1 / -1;
    color: var(--color-muted);
    font-size: 0.875rem;
  }
}

.hiw-certs {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hiw-certs > li {
  border-top: 3px solid var(--c-navy-900);
}
.hiw-certs > li.hiw-certs__final {
  border-top-color: var(--c-red-600);
}
.hiw-certs .strong,
.hiw-tools .strong {
  color: var(--c-navy-900);
}

/* ---- Career / tools ---- */
.hiw-showcase {
  border-top: 3px solid var(--color-accent);
}
.hiw-tools {
  margin: 0;
  padding: 0;
  list-style: none;
}
.hiw-tools__lab {
  background: var(--c-navy-900);
  border-color: var(--c-navy-900);
}
.hiw-tools .hiw-tools__lab .strong {
  color: var(--c-white);
}
.hiw-tools__lab .muted {
  color: rgb(255 255 255 / 0.8);
}
