/* The GPU–Kernel Track — the little that is genuinely new here.
   ============================================================

   The page runs in the shell (../assets/style.css) and speaks the course-home
   vocabulary (../assets/course.css): .home, .hero, the progress ring,
   .module/.module-head for a phase, .chapter-card for a step. That is
   deliberate — a phase *is* a module and a step *is* a chapter, so they should
   not be a second design.

   What is left for this file is the one object the courses do not have: the
   deliverable that closes a phase. Plus the two small adjustments a borrowed
   card needs when the thing it points at lives in another course.

   No colours are defined here. Both themes come from the shell's tokens. */

/* ---------- a phase ---------- */

/* The rail and the search results both jump to a phase; the sticky bar on a
   phone would otherwise land on top of the heading they jumped to. Same
   expression the shell uses for chapter headings. */
.phase, .track-omits { scroll-margin-top: calc(var(--sticky-h) + 1rem); }

/* The thesis is argument, not blurb: it earns the reading measure and the
   body size, sitting between the phase heading and its chapters the way a
   chapter's opening paragraph sits under its title. */
.phase-thesis {
  margin: 0 0 1.4rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.phase-count { font-style: normal; font-family: var(--mono); font-size: 0.78em; }

/* ---------- the deliverable ----------

   The one thing on this page that is not a view over something else: it is
   ticked here, by hand, and nothing in the three courses can infer it. It
   takes the shell's raised-panel treatment (as a quiz block does) with the
   accent carried on the left edge — the site's mark for "this is the point". */

.deliverable {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  margin: 1.1rem 0 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--rule-mid);
  border-left: 2px solid var(--accent-dim);
  border-radius: 6px;
  background: var(--bg-raised);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.phase.is-delivered .deliverable {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

/* The tick is the same circle as a chapter card's .card-check, because it
   means the same thing — but it is a control rather than a state readout, so
   it is a real button with a real hit area. */
.deliverable-tick {
  position: relative;
  width: 2rem;
  height: 2rem;
  flex: none;
  margin: -0.2rem 0 0 -0.2rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.deliverable-tick::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 50%;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.deliverable-tick:hover::before { border-color: var(--accent); }

.deliverable-tick[aria-pressed="true"]::before {
  border-color: var(--accent);
  background: var(--accent);
}

/* the checkmark, drawn the way .card-check draws it on a done chapter */
.deliverable-tick[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 8px;
  margin: -6px 0 0 -2px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.deliverable-label {
  margin: 0 0 0.25rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.deliverable-title {
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

.deliverable-detail {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- a step ----------

   Every card on this page leaves for another course, which the card's second
   line names. On a course home that line is the chapter's description, so it
   is set in italic prose; here it is a label, and reads better as one. */
.chapter-grid .card-desc {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The step number is a coordinate (phase.step), not a running count, so it
   needs a little more room than the course home's two digits. */
.chapter-grid .card-num { min-width: 1.9rem; }

/* ---------- what the track leaves out ---------- */

.track-omits { margin-top: 3rem; }
.track-omits .module-index { color: var(--rule-strong); }

@media (max-width: 600px) {
  .deliverable {
    gap: 0.7rem;
    padding: 1rem 1.1rem;
  }
  .deliverable-detail { font-size: 0.88rem; }
}
