.coach-page {
  display: grid;
  gap: var(--space-3);
  max-width: 48rem;
  margin: 0 auto;
}

/* The class clock (class_clock_controller.js): Start class, then the
   running clock, the part under way and End class. Sticky, so it stays in
   view down the warmup. */
.class-clock {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 40svh;
  padding: var(--space-2) var(--space-3);
  border: var(--line-width) solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.class-clock-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

/* Start at's panel: the time to start the clock, Save and Clear. */
.class-clock-start-at {
  width: 14rem;
  padding: var(--space-2) var(--space-3);
}

/* The copy of the warmup phase under way: whatever the clock bar leaves of
   the 40%, scrolling when the phase is longer. */
.class-clock-phase {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-top: var(--space-2);
  border-top: var(--line-width) solid var(--line);
}

.class-clock-time {
  font-size: var(--text-xl);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.class-clock-now {
  flex: 1 1 0;
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* A warmup phase as one block: tapped, or reached by the class clock, it
   takes aria-current="step" and a tint all round. */
.coach-phase-block {
  padding: var(--space-1) var(--space-2);
  margin: 0 calc(-1 * var(--space-2));
  border-radius: var(--radius-md);
  cursor: pointer;
}

.coach-phase-block:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.coach-phase-block[aria-current="step"] {
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}

.coach-cues {
  padding-left: var(--space-4);
  font-size: var(--text-sm);
}

.coach-cue {
  list-style: disc;
}

.coach-phase {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
}

/* The clock a phase starts at, ahead of its name: a fixed width, so the
   names after it line up down the warmup. */
.coach-phase-clock {
  min-width: 3.5rem;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.coach-warmup-cue {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.coach-warmup-dose {
  display: block;
  width: 7rem;
  font-size: var(--text-sm);
  color: var(--ink);
}

.coach-warmup-drill {
  flex: 1 1 0;
  min-width: 0;
}

.coach-warmup-drill-cue {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* A drill's editor, and a phase's Add a movement, folded under it
   (Components::WarmupSection with drill_day:). */
.coach-warmup-edit {
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}
