/* Text Maker page: the Tutorials course sheet (v195).
   Scoped to body.tm-page; tokens and the .tm-hl-* primitives come from
   css/style.css and css/tm-core.css. Markup: snippets/tutorials.html.

   One hairline band (.tm-course-sheet.tm-hl-band) in three parts:
     .tm-course-facts    the course header: four columns of light numerals
     .tm-course-player   the quick look stage (left) and the lesson rail
                         (right), split by one vertical hairline
     .tm-course-links    the closing link row
   The band's one light rides its top rule; the playing lesson row shows a
   solid 1px bar on its own top rule. No fills, no glow, no pills. */

.tm-page .tm-course .tm-head { margin-bottom: 56px; }

/* ---------- the course header ---------- */
.tm-page .tm-course-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.tm-page .tm-course-fact { position: relative; min-width: 0; padding: 28px 26px 26px; }
.tm-page .tm-course-fact:first-child { padding-left: 0; }
.tm-page .tm-course-fact + .tm-course-fact::after {
  content: "";
  position: absolute;
  left: 0;
  top: 26px;
  bottom: 24px;
  width: 1px;
  background: var(--line);
}
.tm-page .tm-course-fact .tm-hl-num { --tm-num-size: clamp(34px, 3.4vw, 44px); }
/* a word set as a numeral (Free, Included) keeps the same light gradient at a calmer size */
.tm-page .tm-course-fact .tm-course-word { --tm-num-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.02em; padding-top: 0.3em; }
.tm-page .tm-course-fact .tm-hl-num + .tm-hl-label { margin-top: 12px; }
.tm-page .tm-course-fact .tm-hl-note { max-width: 24ch; }

/* ---------- the player ---------- */
.tm-page .tm-course-player {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
}
.tm-page .tm-course-stage { padding: 30px 32px 28px 0; min-width: 0; }
.tm-page .tm-course-frame { border-radius: 16px; }
.tm-page .tm-course-frame > video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the play marker: a large outlined ring over the still stage */
.tm-page .tm-course-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(205, 216, 255, 0.55);
  border-radius: 50%;
  background: rgba(3, 5, 15, 0.55);
  color: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tm-page .tm-course-mark:hover { border-color: var(--tm-ice); background: rgba(3, 5, 15, 0.7); }
.tm-page .tm-course-mark svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.tm-page .tm-course-mark svg circle { display: none; }
.tm-page .tm-course-mark svg path { fill: currentColor; stroke-width: 1; }
/* the corner pause button leaves while a lesson plays with its own controls */
.tm-page .tm-course-sheet.is-lesson .tm-course-pause { display: none; }

/* the stage caption: glyph, tracked label, duration, note, the way back */
.tm-page .tm-course-cap {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
  margin-top: 18px;
}
.tm-page .tm-course-cap .tm-course-glyph { grid-row: 1; grid-column: 1; margin-top: -1px; }
.tm-page .tm-course-cap-label { grid-row: 1; grid-column: 2; }
.tm-page .tm-course-dur { grid-row: 1; grid-column: 3; }
.tm-page .tm-course-cap-note { grid-row: 2; grid-column: 2; margin: 0; max-width: 44ch; }
.tm-page .tm-course-back { grid-row: 2; grid-column: 3; justify-self: end; padding: 0 2px 2px; font-size: 14px; }
.tm-page .tm-course-dur, .tm-page .tm-course-min {
  font: 600 15px/1.4 "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--tm-soft);
  white-space: nowrap;
}
.tm-page .tm-course-dur:empty { display: none; }

/* the outlined play glyph, shared by the caption and every row */
.tm-page .tm-course-glyph {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linejoin: round;
  color: var(--tm-eyebrow);
  transition: color 0.15s ease;
}
.tm-page .tm-course-glyph.is-on { color: #fff; }
.tm-page .tm-course-glyph.is-on path { fill: currentColor; }

/* ---------- the lesson rail ---------- */
.tm-page .tm-course-rail {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  min-width: 0;
}
.tm-page .tm-course-rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 1px;
  background: var(--line);
}
.tm-page .tm-course-rail-head { padding: 28px 0 16px; }
.tm-page .tm-course-rail-head .tm-hl-note { max-width: 32ch; }
.tm-page .tm-course-row { position: relative; border-top: 1px solid var(--tm-rule); }
.tm-page .tm-course-row:last-child { border-bottom: 0; }
/* the playing row: bright text and a solid 1px bar on its top rule */
.tm-page .tm-course-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: rgba(205, 216, 255, 0.6);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.tm-page .tm-course-row.is-playing::before { opacity: 1; }
.tm-page .tm-course-gate { display: none; }
.tm-page .tm-course-btn {
  appearance: none;
  display: grid;
  grid-template-columns: 22px 36px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 13px 0 12px;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.tm-page .tm-course-btn:disabled { cursor: default; }
.tm-page .tm-course-btn:focus-visible { outline-offset: -1px; }
.tm-page .tm-course-btn .tm-course-glyph { grid-row: 1 / 3; grid-column: 1; margin-top: 2px; }
.tm-page .tm-course-btn:disabled .tm-course-glyph { opacity: 0.4; }
.tm-page .tm-course-btn:not(:disabled):hover .tm-course-glyph, .tm-page .tm-course-row.is-playing .tm-course-glyph { color: #fff; }
.tm-page .tm-course-row.is-playing .tm-course-glyph path { fill: currentColor; }
.tm-page .tm-course-num {
  grid-row: 1 / 3;
  grid-column: 2;
  --tm-num-size: 25px;
  margin-top: 0;
  background: var(--tm-num-sm);
  -webkit-background-clip: text;
  background-clip: text;
}
.tm-page .tm-course-text { grid-row: 1 / 3; grid-column: 3; min-width: 0; }
.tm-page .tm-course-name {
  display: block;
  font: 600 16px/1.3 "Inter", sans-serif;
  color: var(--tm-bright);
  transition: color 0.15s ease;
}
.tm-page .tm-course-btn:not(:disabled):hover .tm-course-name, .tm-page .tm-course-row.is-playing .tm-course-name { color: #fff; }
.tm-page .tm-course-note { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--tm-soft); }
.tm-page .tm-course-min { grid-row: 1; grid-column: 4; justify-self: end; }
.tm-page .tm-course-min .tm-hl-num { display: inline; font-size: 15px; letter-spacing: -0.01em; background: var(--tm-num-sm); -webkit-background-clip: text; background-clip: text; }
.tm-page .tm-course-status {
  grid-row: 2;
  grid-column: 4;
  justify-self: end;
  margin-top: 3px;
  font: 600 11px/1.4 "Inter", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(179, 196, 255, 0.62);
  white-space: nowrap;
}
.tm-page .tm-course-row.is-ready .tm-course-status { display: none; }

/* ---------- the closing link row ---------- */
.tm-page .tm-course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 40px;
  padding: 10px 0 8px;
  border-top: 1px solid var(--line);
}
.tm-page .tm-course-links .tm-hl-link { padding-top: 14px; padding-bottom: 14px; }

/* Windows contrast themes: draw the bars in the system text colour */
@media (forced-colors: active) {
  .tm-page .tm-course-row.is-playing::before { forced-color-adjust: none; background: CanvasText; height: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-page .tm-course-mark, .tm-page .tm-course-glyph, .tm-page .tm-course-name, .tm-page .tm-course-row::before, .tm-page .tm-course-btn { transition: none; }
}

/* ---------- narrower desktops and tablets ---------- */
@media (max-width: 1100px) {
  .tm-page .tm-course-player { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .tm-page .tm-course-stage { padding: 28px 26px 26px 0; }
  .tm-page .tm-course-rail { padding-left: 24px; }
  .tm-page .tm-course-fact { padding: 24px 20px 22px; }
  .tm-page .tm-course-fact:first-child { padding-left: 0; }
}

/* ---------- phones: the sheet stacks, dividers turn horizontal ---------- */
@media (max-width: 820px) {
  .tm-page .tm-course .tm-head { margin-bottom: 40px; }
  .tm-page .tm-course-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-page .tm-course-fact { padding: 22px 14px 20px; }
  .tm-page .tm-course-fact:first-child { padding-left: 0; }
  .tm-page .tm-course-fact .tm-hl-num { --tm-num-size: 30px; }
  .tm-page .tm-course-fact .tm-course-word { --tm-num-size: 22px; padding-top: 0.35em; }
  .tm-page .tm-course-fact .tm-hl-num + .tm-hl-label { margin-top: 10px; }
  .tm-page .tm-course-fact .tm-hl-note { display: none; }
  /* the fourth fact takes a full row of its own under a hairline */
  .tm-page .tm-course-fact:nth-child(4) { grid-column: 1 / -1; padding: 16px 0 18px; border-top: 1px solid var(--tm-rule); display: flex; align-items: baseline; gap: 14px; }
  .tm-page .tm-course-fact:nth-child(4)::after { display: none; }
  .tm-page .tm-course-fact:nth-child(4) .tm-course-word { --tm-num-size: 18px; padding-top: 0; }
  .tm-page .tm-course-fact:nth-child(4) .tm-hl-num + .tm-hl-label { margin-top: 0; }
  .tm-page .tm-course-fact:nth-child(4) .tm-hl-note { display: block; margin: 0 0 0 auto; text-align: right; }
  .tm-page .tm-course-player { grid-template-columns: minmax(0, 1fr); }
  .tm-page .tm-course-stage { padding: 24px 0 22px; }
  .tm-page .tm-course-frame { border-radius: 14px; }
  .tm-page .tm-course-cap { column-gap: 12px; }
  .tm-page .tm-course-rail { padding: 0; border-top: 1px solid var(--line); }
  .tm-page .tm-course-rail::before { display: none; }
  .tm-page .tm-course-rail-head { padding: 22px 0 14px; }
  .tm-page .tm-course-btn { grid-template-columns: 20px 32px minmax(0, 1fr) auto; column-gap: 12px; padding: 14px 0 13px; }
  .tm-page .tm-course-glyph { width: 20px; height: 20px; }
  .tm-page .tm-course-num { --tm-num-size: 22px; margin-top: 2px; }
  .tm-page .tm-course-name { font-size: 15px; }
  .tm-page .tm-course-note { font-size: 13px; }
  .tm-page .tm-course-links { gap: 0 28px; }
}
@media (max-width: 480px) {
  .tm-page .tm-course-fact:nth-child(4) { flex-wrap: wrap; }
  .tm-page .tm-course-fact:nth-child(4) .tm-hl-note { flex-basis: 100%; margin: 4px 0 0; text-align: left; }
  /* the status moves under the note, so the note keeps its width */
  .tm-page .tm-course-btn { grid-template-rows: auto auto auto; }
  .tm-page .tm-course-text { grid-row: 1 / 3; }
  .tm-page .tm-course-status { grid-row: 3; grid-column: 3; justify-self: start; margin-top: 4px; }
  .tm-page .tm-course-cap { grid-template-columns: 20px minmax(0, 1fr); }
  .tm-page .tm-course-dur { grid-row: 1; grid-column: 2; justify-self: end; }
  .tm-page .tm-course-cap-label { padding-right: 40px; }
  .tm-page .tm-course-back { grid-row: 3; grid-column: 2; justify-self: start; }
}

/* phone audit (2026-09-16): every course fact reads numeral and label on one
   line with its note under it (the three-column labels broke over two lines) */
@media (max-width: 560px) {
  .tm-page .tm-course-facts { grid-template-columns: minmax(0, 1fr); }
  .tm-page .tm-course-fact { padding: 16px 0 18px; border-top: 1px solid var(--tm-rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
  .tm-page .tm-course-fact:first-child { border-top: 0; padding-top: 6px; }
  .tm-page .tm-course-fact::after { display: none; }
  .tm-page .tm-course-fact .tm-hl-num { --tm-num-size: 22px; }
  .tm-page .tm-course-fact .tm-course-word { --tm-num-size: 18px; padding-top: 0; }
  .tm-page .tm-course-fact .tm-hl-num + .tm-hl-label { margin-top: 0; }
  .tm-page .tm-course-fact .tm-hl-note, .tm-page .tm-course-fact:nth-child(4) .tm-hl-note { display: block; flex-basis: 100%; max-width: 100%; margin: 4px 0 0; text-align: left; }
}
