/* Home · Stacking on phones (≤ 600 px), layered on stacking/css/stacking.css (the new minimal section).
   Option C "Swipe the steps" of the 2026-11-13 proposals (picked as the definite one): the three steps side by side
   as cards you swipe, one timeline for the row right under the subtitle, centred (1 — 2 — 3, built by
   mobile/js/stacking-mobile.js; tap a number to jump), the next card peeking in. The Merge card's race sits under
   its photo, out of the glass. About 1.2 screens tall instead of 3.5.
   Gone on phones: the step names above the titles, the vertical rail and its nodes, the RAW group pills, the
   Alignment precision selector and anchor-frame strip, the run card's test line. Linear / Standard is a small
   switch on the photo (2026-11-17, user: more minimal, more air). The Merge card's race is three columns (like the hero's three facts) so the card is as tall as the others.
   Phone rules only, so the desktop section is untouched. */

.stx-steps { display: none; }

@media (max-width: 600px) {
  /* ---------- Opener ---------- */
  .stx-word { font-size: 17.6vw; }     /* one size for all four section titles (Retouching sets it) */
  .stx-lede { margin-top: 12px; font-size: 16px; }
  .stk.stx .stx-open { margin-bottom: var(--m-open-gap); }   /* site.css: the same gap under every section's subtitle */

  /* ---------- The timeline: one for the row, centred, right under the subtitle (as Edit's selector) ---------- */
  .stk.stx .stx-steps { display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
  .stk.stx .finale > .stx-run__side { grid-column: 1; grid-row: 3; margin-top: 20px; }
  .stx-steps button {
    width: 30px; height: 30px; padding: 0;
    border-radius: 50%; border: 1px solid #ffffff2e;
    background: #121413; color: var(--muted);
    font: 600 13px var(--font); font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background .3s, color .3s, box-shadow .3s;
  }
  .stx-steps button.is-on { background: #f1f4f2; color: #0b0c0c; border-color: transparent; box-shadow: 0 0 16px #ffffff38; }
  .stx-steps i { position: relative; width: 56px; height: 2px; background: #ffffff17; }
  .stx-steps i::after { content: ""; position: absolute; inset: 0; background: #f1f4f2; transform: scaleX(var(--f, 0)); transform-origin: left; }
  /* Autoplay (mobile/js/stacking-mobile.js): the line after the current number fills over the card's dwell, so the
     timeline shows when the row will move on; passed lines stay full. Under the scroll's own fill (::after). */
  .stx-steps i::before { content: ""; position: absolute; inset: 0; background: #f1f4f2; transform: scaleX(0); transform-origin: left; }
  .stx-steps i.is-full::before { transform: none; }
  .stx-steps i.is-timing::before { animation: stx-step-wait var(--dwell, 6s) linear forwards; }
  @keyframes stx-step-wait { to { transform: none; } }

  /* ---------- The steps: a row of cards, edge to edge, snapping ---------- */
  .stk.stx .tl__rail,
  .stk.stx .tl .node { display: none; }
  .stk.stx .tl {
    display: flex; align-items: flex-start; gap: 12px;
    margin-inline: calc(var(--gutter) * -2);
    padding: 0 calc(var(--gutter) * 2) 12px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: calc(var(--gutter) * 2);
    scrollbar-width: none;
  }
  .stk.stx .tl::-webkit-scrollbar { display: none; }
  .stk.stx .tl > .tl-chapter,
  .stk.stx .tl > .finale,
  .stk.stx .tl-chapter + .tl-chapter,
  .stk.stx .tl-chapter + .finale { flex: 0 0 min(300px, 82vw); margin: 0; scroll-snap-align: start; }

  .stk.stx .tl-chapter,
  .stk.stx .tl-chapter--flip { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "visual" "ctrl"; }
  .stk.stx .finale { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .stk.stx .finale__head { grid-column: 1; grid-row: 1; margin-top: 0; }
  .stk.stx .stx-run { grid-column: 1; grid-row: 2; }
  .stk.stx .tl-chapter__head { margin-top: 0; }

  /* Each card: title, one line, the photo, one control. The small step names above the titles (RAW Input
     Development, Alignment, Stacking Options) are gone on phones (user, 2026-11-16): the 1 — 2 — 3 bar numbers them. */
  .stk.stx .step-label { display: none; }
  .stk .tl-chapter h3.stx-title,
  .stk .finale h3.stx-title { margin-top: 0; font-size: clamp(24px, 6.93vw, 28px); }   /* 1.5× smaller (2026-11-17, was 10.4vw / 42px); 20 px under the timeline */
  .stk .tl-chapter__head p.stx-line,
  .stk .finale__head p.stx-line { margin-top: 6px; font-size: 15px; }
  .stk.stx .tl-chapter__visual { margin-top: 20px; }

  /* Linear / Standard: a small switch on the photo, bottom right (the tag names the mode top left). Alignment's
     precision selector is gone: its card just plays the bracket at Balanced. */
  .stk.stx .tl-chapter__ctrl {
    grid-area: visual; align-self: end; justify-self: end;
    position: relative; z-index: 2;
    margin: 0 16px 16px 0;              /* the glass frame's 6 px + the chips' 10 px */
  }
  .stk.stx .tl-chapter--flip .tl-chapter__ctrl { display: none; }
  .stk.stx .tl-chapter__ctrl .segments {
    width: 148px; padding: 3px;
    border-color: #ffffff26; background: #0b0c0c8c;
    -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: inset 0 1px 0 #ffffff14;
  }
  .stk.stx .tl-chapter__ctrl .segments__thumb { top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); }
  .stk.stx .tl-chapter__ctrl .segments button { min-height: 28px; font-size: 12px; }
  .stk.stx .stx-pills,
  .stk.stx .anchor { display: none; }

  /* ---------- Merge card: the photo, then the race as three columns ---------- */
  .stk.stx .stx-run { margin-top: 20px; }
  .stk.stx .stx-run__foot { display: none; }
  .stx-run__side { padding: 0 2px; }
  .stx-race { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .stx-race__row { padding: 0 10px; }
  .stx-race__row + .stx-race__row { border-left: 1px solid #ffffff1a; }
  .stx-race__top { flex-direction: column-reverse; align-items: flex-start; gap: 3px; }
  .stx-race__name { font-size: 11.5px; white-space: nowrap; }
  .stx-race__time { font-size: 20px; }
  .stx-race__track { height: 4px; margin-top: 8px; }

  .stk.stx .stk__foot { margin-top: 28px; }
}
