/* process.css — how-its-made.html (Phase 3; round-2 rework 25 Oct 2026): the production film as the hero, its slate,
   shot list and timeline, the stations as a storyboard along a sticky process line, the station table.
   Linked after tokens.css + inner.css; their tokens only.
   Ember keeps its four jobs: buttons, scene-code numbers, link underlines, the current station. */

.sref, .ip span.sref { display: inline; margin: 0; font-family: var(--f-m); font-size: 12px; line-height: inherit; letter-spacing: .04em; color: var(--mute); white-space: nowrap; }
.sref a, .prose .sref a, .checks .sref a { color: var(--text); border-bottom: 1px solid var(--ember); }

/* ---------- hero: h1, the slate of checkable facts, the film beside the answer ---------- */
.hm-hero { padding-top: clamp(28px, 4vw, 64px); }
.ip-h1.hm-h1 { max-width: 24ch; font-size: clamp(40px, 4.8vw, 82px); }
.hm-slate { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: clamp(22px, 2.4vw, 34px) 0 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line-2); font-family: var(--f-m); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.hm-slate li { display: inline-flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.hm-slate li + li::before { content: '·'; margin: 0 14px; color: var(--mute); }
.hm-slate b { font-weight: 500; color: var(--text); }
.hm-stage { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 56px); align-items: start; margin-top: clamp(26px, 3vw, 44px); }
.hm-film { margin: 0; }
.hm-film .frame-in { aspect-ratio: 16 / 9; border: 1px solid var(--line-2); cursor: pointer; }
.hm-film .frame-in > img { object-fit: cover; }
.hm-film .frame-in > video { opacity: 0; transition: opacity .4s; }
.hm-film.is-playing .frame-in > video { opacity: 1; }
.hm-film figcaption { margin-top: 12px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); line-height: 1.5; }
.hm-play { position: absolute; z-index: 3; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 14px; padding: 0 22px 0 8px; height: 64px; transform: translate(-50%, -50%); border: 1px solid rgba(236, 231, 222, .6); background: rgba(7, 8, 10, .7); color: var(--text); cursor: pointer; font-family: var(--f-m); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; transition: opacity .4s, border-color .3s, background .3s; }
.hm-play svg { width: 48px; height: 48px; padding: 12px 10px 12px 14px; fill: var(--text); border-right: 1px solid rgba(236, 231, 222, .35); }
.hm-film:hover .hm-play { border-color: var(--warm); background: rgba(7, 8, 10, .82); }
.hm-film.is-playing .hm-play { opacity: 0; }
.hm-play:focus-visible { opacity: 1; outline: 2px solid var(--ember); outline-offset: 4px; }
.hm-ans .ip-answer.big { font-size: clamp(18px, 1.45vw, 22px); }

/* ---------- body: the process line on the left, the stations on the right ---------- */
.hm-body { --ip-pad: clamp(56px, 6vw, 100px); display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); column-gap: clamp(32px, 4vw, 72px); align-items: start; }
.hm-line { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; margin-top: var(--ip-pad); }
.hm-line > p { margin: 0 0 14px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.hm-line ol { position: relative; list-style: none; margin: 0; padding: 0; }
.hm-line ol::before { content: ''; position: absolute; left: 13px; top: 14px; bottom: 14px; border-left: 1px solid var(--rule); }
.hm-line a { position: relative; display: grid; grid-template-columns: 28px 22px minmax(0, 1fr); align-items: center; column-gap: 8px; padding: 7px 0; font-size: 14.5px; line-height: 1.3; color: var(--mute); transition: color .3s; }
/* bare icons on the line (the background masks the rule); the box is drawn only round the current station */
.hm-line a .ic { width: 28px; height: 28px; padding: 4px; background: var(--bg); border: 1px solid transparent; color: var(--warm); transition: border-color .3s; }
.hm-line a i { font-style: normal; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .1em; }
.hm-line a:hover { color: var(--text); }
.hm-line a.on { color: var(--text); }
.hm-line a.on .ic { border-color: var(--ember); }
.hm-line a.on i { color: var(--ember); }
.hm-st { min-width: 0; padding-bottom: 8px; }

.st-h { display: grid; gap: 14px; margin-bottom: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
.st-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.st-code b { font-weight: 500; color: var(--ember); padding-right: 16px; border-right: 1px solid var(--line-2); }
.st-code b.sym { color: var(--mute); }
.st-code span { display: inline-flex; align-items: center; gap: 10px; }
.st-code .st-tc { white-space: nowrap; }
.st-code .ic { width: 20px; height: 20px; }
.st-h h2 { max-width: 22ch; }

.hm-intro, .stn, .hm-not, .hm-src { padding-top: var(--ip-pad); }

/* SC.00: the shot list starts level with the heading; dated facts under the prose; the timeline across the column */
.hm-intro-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); gap: clamp(32px, 4vw, 72px); align-items: start; }
.hm-intro-l .prose { margin-bottom: 30px; }
.hm-led dd a { color: var(--text); border-bottom: 1px solid var(--ember); }
.hm-edl { border: 1px solid var(--rule); background: var(--panel); }
.hm-edl-k, .hm-edl-end { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 16px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.hm-edl-k { border-bottom: 1px solid var(--rule); background: var(--panel-2); color: var(--text); }
.hm-edl-end { border-top: 1px solid var(--rule); }
.hm-edl-end i { font-style: normal; color: var(--text); }
.hm-edl ol { list-style: none; margin: 0; padding: 0; }
.hm-edl li + li { border-top: 1px solid var(--line-2); }
.hm-edl a { display: grid; grid-template-columns: 106px minmax(0, 1fr) 24px; gap: 12px; align-items: baseline; padding: 8px 16px; font-size: 14.5px; line-height: 1.4; color: var(--body); transition: background .3s, color .3s; }
.hm-edl a:hover { background: var(--panel-2); color: var(--text); }
.hm-edl a i { font-style: normal; font-family: var(--f-m); font-size: 12px; letter-spacing: .04em; color: var(--mute); }
.hm-edl a b { font-family: var(--f-m); font-size: 12px; font-weight: 500; color: var(--mute); text-align: right; }

.hm-tl { margin: clamp(40px, 4vw, 64px) 0 0; }
.tl-bar { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tl-bar > li { flex: var(--d) 1 0; min-width: 8.5rem; }
.tl-bar a { display: block; color: var(--body); }
.tl-ticks { display: flex; gap: 2px; height: 46px; padding: 4px; border: 1px solid var(--rule); background: var(--panel); transition: border-color .3s; }
.tl-ticks i { flex: var(--d) 1 0; min-width: 0; display: flex; align-items: flex-end; padding: 0 0 4px 6px; background: var(--panel-2); border-left: 1px solid var(--line-2); font-style: normal; font-family: var(--f-m); font-size: 12px; letter-spacing: .04em; color: var(--mute); overflow: hidden; }
.tl-l { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; margin-top: 12px; }
.tl-l .ic { grid-row: 1 / span 3; width: 22px; height: 22px; color: var(--warm); }
.tl-l b { font-size: 15px; font-weight: 560; line-height: 1.25; color: var(--text); }
.tl-l em { display: block; white-space: nowrap; font-style: normal; font-family: var(--f-m); font-size: 12px; letter-spacing: .06em; color: var(--mute); }
.tl-bar a:hover .tl-ticks { border-color: var(--warm); }
.hm-tl figcaption { margin-top: 18px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; color: var(--mute); }

/* a station: the footage beside the slate and the prose; alternating sides; the footage travels with the text */
.st-g { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 56px); align-items: start; }
.stn.rev .st-media { order: 2; }
.stn.st-tall .st-g { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); }
.st-media { display: grid; gap: 14px; min-width: 0; }
.st-main, .st-sm { margin: 0; }
.st-main .frame-in, .st-sm .frame-in { aspect-ratio: 16 / 9; border: 1px solid var(--line-2); }
.st-main.tall .frame-in { aspect-ratio: 4 / 5; }
.st-main .frame-in > img, .st-sm .frame-in > img { width: 100%; height: 100%; object-fit: cover; }
.st-main figcaption, .st-sm figcaption { margin-top: 10px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; color: var(--mute); }
.st-media > .st-sm { width: 62%; }
.stn.rev .st-media > .st-sm { justify-self: end; }
.st-text { min-width: 0; }
.st-slate { margin-bottom: 26px; padding: 14px 18px 16px; border: 1px solid var(--rule); border-left: 2px solid var(--warm); background: var(--bg-2); }
.st-k { margin: 0 0 6px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.st-film { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text); }

/* SC.04 breaks the pattern: one full-width 21:9 frame, the slate and the general stages in the gutter beside the prose */
.st-main.st-21 .frame-in { aspect-ratio: 21 / 9; }
.st-wide-g { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 56px); align-items: start; margin-top: 34px; }
.hm-gen-k { margin: 0 0 10px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.hm-gen .ic { color: var(--warm); }

/* SC.05: the bag print, set as the bag sets it */
.hm-label { position: relative; padding: 22px 24px 24px; background: var(--paper); color: var(--ink); }
.hm-label::before { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(21, 19, 15, .45); pointer-events: none; }
.hm-label-k { position: relative; margin: 0 0 12px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.hm-label-t { position: relative; display: grid; gap: 4px; margin: 0; font-family: var(--f-m); font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; letter-spacing: .08em; line-height: 1.25; color: var(--ink); }

/* SC.06: the station table, and the one sentence on what is still to come */
.hm-not .tbl { margin-top: 30px; }
.hm-tbl tbody th { font-size: 17px; font-weight: 560; line-height: 1.35; letter-spacing: 0; font-variation-settings: normal; white-space: normal; min-width: 11rem; }
.hm-tbl tbody th a { color: var(--text); border-bottom: 1px solid var(--ember); }
.hm-tbl td a { color: var(--text); border-bottom: 1px solid var(--ember); }
.hm-gap { margin-top: 30px; }
.hm-chip { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px dashed rgba(216, 202, 179, .6); font-family: var(--f-m); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--warm); white-space: nowrap; }

/* sources and the related pages */
.hm-srcl { list-style: none; margin: 0; padding: 0; max-width: 52rem; border-top: 1px solid var(--rule); counter-reset: src; }
.hm-srcl li { counter-increment: src; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); font-size: 15.5px; line-height: 1.5; }
.hm-srcl li::before { content: counter(src, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--f-m); font-size: 13px; color: var(--mute); padding-top: 2px; }
.hm-srcl a { justify-self: start; color: var(--text); border-bottom: 1px solid var(--ember); }
.hm-srcl span { margin-top: 3px; font-size: 14.5px; color: var(--body); }
.hm-rel { margin-top: clamp(44px, 4.4vw, 68px); }
.hm-rel-k { margin: 0 0 14px; font-family: var(--f-m); font-size: var(--fs-lab); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.hm-rel ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.hm-rel a { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; height: 100%; padding: 16px 16px 18px; border: 1px solid var(--rule); background: var(--panel); transition: border-color .3s; }
.hm-rel a:hover { border-color: var(--warm); }
.hm-rel .ic { width: 24px; height: 24px; color: var(--warm); }
.hm-rel b { display: block; font-size: 15.5px; font-weight: 560; line-height: 1.3; color: var(--text); }
.hm-rel em { display: block; margin-top: 4px; font-style: normal; font-size: 14px; line-height: 1.4; color: var(--body); }
.hm-src { padding-bottom: clamp(64px, 7vw, 120px); }

@media (prefers-reduced-motion: reduce) {
  .hm-film .frame-in > video { display: block; }
}
@media (min-width: 1400px) {
  .st-g > .st-media { position: sticky; top: calc(var(--nav-h) + 32px); }
}
@media (max-width: 1399px) {
  .st-g, .stn.st-tall .st-g, .hm-intro-g, .st-wide-g { grid-template-columns: minmax(0, 1fr); }
  .stn.rev .st-media { order: 0; }
  .st-media > .st-sm { width: 100%; max-width: 40rem; }
  .stn.st-tall .st-media { max-width: 30rem; }
  .st-media { grid-template-columns: minmax(0, 1fr); }
  .st-text .prose { max-width: var(--measure); }
  .hm-intro-g .hm-edl { max-width: var(--measure); }
  .hm-rel ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .hm-stage { grid-template-columns: minmax(0, 1fr); }
  .hm-body { grid-template-columns: minmax(0, 1fr); }
  .hm-line { display: none; }
}
@media (max-width: 760px) {
  .hm-slate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; font-size: 12px; }
  .hm-slate li + li::before { content: none; }
  .hm-slate li:nth-child(odd):last-child { grid-column: 1 / -1; }
  .hm-play { left: 12px; top: auto; bottom: 12px; transform: none; height: 44px; gap: 10px; padding-right: 12px; font-size: 12px; }
  .hm-play svg { width: 36px; height: 36px; padding: 8px 7px 8px 10px; }
  .hm-film .tc-tag { left: 12px; top: 12px; }
  .hm-edl a { grid-template-columns: 96px minmax(0, 1fr); }
  .hm-edl a b { display: none; }
  .st-code b { border-right: 0; padding-right: 0; }
  .st-main.st-21 .frame-in { aspect-ratio: 16 / 9; }
  /* the timeline turns into rows: one bar per station, as long as its share of the longest station */
  .tl-bar { flex-direction: column; gap: 14px; }
  .tl-bar > li { flex: none; min-width: 0; }
  .tl-bar a { display: grid; gap: 8px; }
  .tl-ticks { order: 2; height: 34px; width: calc(var(--d) * 100% / 9.6); min-width: 64px; }
  .tl-l { order: 1; margin-top: 0; }
  .hm-tbl tbody th { min-width: 0; }
  .hm-rel ul { grid-template-columns: minmax(0, 1fr); }
}
