/* W14: "02 In action" scroll-through.
   Mode A (the PIN query below is the same string as site.js): the box pins a 100svh stage and page scroll walks the six steps.
   Mode B (wider than 1100, short or touch) and mode C (1100 and under) keep W13's column and bar, plus the Skip control and the Up next card. */
.act__scene, .act__view { display: contents; }
.act__live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Skip the walkthrough (all modes). DOM order puts it right after Next; in the column it shows under Next and Back. */
.act__skip { display: none; }
.act__bar.is-rail .act__go .act__skip, .act__skip--bar { align-items: center; gap: 8px; min-height: 44px; border: 0; background: none; color: var(--ink-2); font: 500 14px/1 var(--f-body); cursor: pointer; white-space: nowrap; transition: color .25s, border-color .25s; }
.act__bar.is-rail .act__go .act__skip { display: inline-flex; order: 3; justify-self: start; padding: 0 4px; }
.act__skip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.act__skip:hover { color: var(--brass-2); }
.act__skip:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 8px; }

@media (max-width: 1100px) {
  /* Mode C: Skip sits at the right end of the sticky bar. */
  .act--js .act__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 6px; align-items: center; }
  .act--js .act__bar > * { grid-column: 1; }
  .act--js .act__bar > .steps { grid-row: 1; }
  .act--js .act__bar > .act__skip--bar { display: inline-flex; grid-column: 2; grid-row: 1; gap: 6px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(11,12,14,.6); }
  .act--js .act__bar > .act__skip--bar:hover { border-color: rgba(209,173,106,.6); }
  /* Up next card: each step's own Next, full width. */
  .act--js .step__foot { justify-content: stretch; }
  .act--js .step__foot .btn { display: grid; justify-items: start; align-content: center; gap: 4px; width: 100%; height: auto; min-height: 56px; padding: 12px 18px; border-radius: 16px; text-align: left; white-space: normal; line-height: 1.25; }
  .act--js .step__foot .btn:hover { border-color: rgba(209,173,106,.6); }
  .up__k { font: 500 13px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-2); }
  .up__t { font: 600 17px/1.2 var(--f-body); color: var(--ink); }
  .up__s { font-size: 14px; line-height: 1.3; color: var(--muted); }
  /* Step 1: once the store is live, the Up next card is the only Next. */
  .act--js .bld__done [data-step-next] { display: none; }
}

@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) {
  .act.act--js.is-scrub { display: block; height: calc(var(--act-span, 360vh) + 100vh); height: calc(var(--act-span, 360svh) + 100svh); }
  .act.is-scrub > .act__scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; display: grid; grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 48px; padding: var(--act-nav, 95px) 0 16px; box-sizing: border-box; }
  .act.is-scrub > .act__scene > .act__bar { grid-column: 1; grid-row: 1; position: relative; top: auto !important; align-self: start; transition: none; }
  .act.is-scrub > .act__scene > .act__stage { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .act.is-scrub .act__view { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: clip; min-height: 0; }
  .act.is-scrub .act__view > .step { grid-area: 1 / 1; align-self: start; min-width: 0; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s; }
  .act.is-scrub .act__view > .step.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s; }
  .act.is-scrub.is-instant .act__view > .step { transition: none; }
  .act.act--show.is-scrub .step__copy { position: static; top: auto; }
  .act.is-scrub .act__note { margin-top: 10px; }
}
@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) and (max-height: 860px) {
  .act.is-scrub .act__bar .act__bar-k--stack, .act.is-scrub .act__bar .stack { display: none; }
}
/* Short screens (modes A and B): the column keeps Next, Back and Skip in view. Back and Skip share one row. */
@media (min-width: 1101px) and (max-height: 760px) {
  .act__bar.is-rail .act__bar-k--stack, .act__bar.is-rail .stack { display: none; }
  .act__bar.is-rail { gap: 10px; }
  .act__bar.is-rail .steps { gap: 2px; }
  .act__bar.is-rail .act__go { padding-top: 10px; }
}
/* Column controls (modes A and B, every height): Next on its own row, then Back and Skip share one row. */
@media (min-width: 1101px) {
  .act__bar.is-rail .act__go { grid-template-columns: auto auto; justify-content: space-between; column-gap: 12px; }
  .act__bar.is-rail .act__go .btn { grid-column: 1 / -1; }
  .act__bar.is-rail .act__go .act__skip { justify-self: end; }
  .act__bar.is-rail .act__back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; }
  .act__bar.is-rail .act__back::before { content: ""; width: 7px; height: 7px; margin: 0 2px 0 5px; border: solid currentColor; border-width: 0 0 1.8px 1.8px; rotate: 45deg; }
  .act__bar.is-rail .act__back:hover { color: var(--brass-2); }
  /* Step 1: the dock overlaps only the laptop's frame, never the store text. */
  .act .bld__dock { margin-right: -12px; }
  /* Step 3: the stock tablet gets a real minimum width. */
  .act.act--show [data-step-panel="3"] { grid-template-columns: 300px minmax(0, 1fr); column-gap: 32px; }
  .act.act--js .duo--dev { grid-template-columns: minmax(240px, 250px) minmax(260px, 1fr); }
  .act .dev--tab .inv__t tr > :nth-child(5) { display: none; }
  .act .dev .inv > * { min-width: 0; }
  .act [data-pos-clock] { white-space: nowrap; }
  /* Step 6: the Studio shot fills the reserved tile height. */
  .act--show .md__view { display: grid; }
  /* W15 round 3: the frame takes the photo's own shape (no letterbox band) and sits centered in the tile. */
  .act--show .md__pane[data-md-pane="shot"].is-on { align-self: center; }
  .act--show .md__pane[data-md-pane="shot"] .md__shot img { aspect-ratio: 1400 / 1021; height: auto; object-fit: contain; object-position: 50% 50%; background: #0b0c0e; }
  .act--show .md__tag { text-wrap: balance; max-width: calc(100% - 24px); overflow-wrap: anywhere; }
}
@media (min-width: 1101px) and (max-width: 1365px) {
  .act.act--show [data-step-panel="3"] { grid-template-columns: 270px minmax(0, 1fr); }
}
@media (min-width: 1101px) and (max-width: 1439px) {
  /* Step 6: options as a 2x2 grid above the photo, so the photo gets the full column width. */
  .act--show .md { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .act--show .md__ops { grid-template-columns: 1fr 1fr; }
  .act--show .md__view { min-height: 0; }
}
/* W15 round 3: touch screens 1101 to 1250 wide (iPad Air landscape, #action does not pin): steps 3 and 6 put
   the copy above the devices, so the stock tablet and the photo get the whole stage width. */
@media (pointer: coarse) and (min-width: 1101px) and (max-width: 1250px) {
  .act.act--show [data-step-panel="3"], .act.act--show [data-step-panel="6"] { grid-template-columns: minmax(0, 1fr); }
  .act.act--show [data-step-panel="3"] > .step__copy, .act.act--show [data-step-panel="6"] > .step__copy { grid-column: 1; grid-row: auto; position: static; top: auto; }
  .act.act--show [data-step-panel="3"] > .step__show, .act.act--show [data-step-panel="6"] > .step__show { grid-column: 1; grid-row: auto; }
  .act.act--js .duo--dev > * { min-width: 0; }
  .act .dev--tab { width: min(100%, var(--tab-w, 100%)); }
  .act .dev--tab .inv__t { table-layout: fixed; width: 100%; }
  .act .dev--tab .inv__t th { letter-spacing: .04em; overflow-wrap: anywhere; }
}
@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) {
  /* Fade an edge of the stage only while content is cut there (site.js scrub sets --ft and --fb). */
  .act.is-scrub .act__view { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft, 0px), #000 calc(100% - var(--fb, 0px)), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft, 0px), #000 calc(100% - var(--fb, 0px)), transparent 100%); }
  /* Step 6 ends above the Ask Forged pill. */
  .act.is-scrub [data-step-panel="6"] { padding-bottom: 64px; }
}
@media (max-width: 1100px) {
  /* Pill strip: fade only a side that has more pills past it. */
  .act--js .steps { --fl: 0px; --fr: 0px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
  .act--js .steps[data-fl] { --fl: 24px; }
  .act--js .steps[data-fr] { --fr: 24px; }
}
@media (max-width: 640px) {
  /* Step 1: the laptop shelf keeps to the column left of the phone mockup. */
  .bld__web .pv__shelf:not(.bld__phin *) { grid-template-columns: minmax(0, 1fr); width: 70%; }
}
@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) and (prefers-reduced-motion: reduce) {
  .act.is-scrub .act__view > .step, .act.is-scrub .act__view > .step.is-on { transform: none; transition: none; }
}
/* W19: steps 1 and 6 fit the pinned frame (900 tall) by tighter spacing only; nothing is removed. */
@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) {
  /* Step 1: head, dock rows, look tiles (4 columns of 16:10 pictures), preview height, foot. */
  .act.act--show.is-scrub .bld__head { margin-bottom: 6px; }
  .act.act--show.is-scrub .bld__head .step__k { margin-bottom: 4px; }
  .act.act--show.is-scrub .step--build .step__t { margin-bottom: 4px; line-height: 1; }
  .act.act--show.is-scrub .step--build .step__line { line-height: 1.3; }
  .act.act--show.is-scrub .bld__dock { padding: 3px 6px; gap: 2px; }
  .act.act--show.is-scrub .bld__moves { gap: 2px; }
  .act.act--show.is-scrub .bld__mv { padding: 4px 10px; }
  .act.act--show.is-scrub .bld__k { margin-bottom: 2px; }
  .act.act--show.is-scrub .bld__looks { gap: 4px; }
  .act.act--show.is-scrub .bld__looks button { gap: 2px; padding: 2px; }
  .act.act--show.is-scrub .bld__looks img { aspect-ratio: 16 / 10; object-position: top; }
  .act.act--show.is-scrub .bld__looks span { padding-bottom: 0; }
  .act.act--show.is-scrub .bld__in { min-height: 44px; }
  .act.act--show.is-scrub .bld__prods { gap: 4px; }
  .act.act--show.is-scrub .bld__go { gap: 6px; padding: 2px 0 0; }
  .act.act--show.is-scrub .bld__pub, .act.act--show.is-scrub .bld__done .btn { min-height: 44px; }
  .act.act--show.is-scrub .bld__done { gap: 6px; }
  .act.act--show.is-scrub .bld__done p { gap: 2px; }
  .act.act--show.is-scrub .bld__stage { padding-bottom: 20px; }
  .act.act--show.is-scrub .bld__web .pv__nav { height: 46px; }
  .act.act--show.is-scrub .bld__web .pv__hero { height: 196px; }
  .act.act--show.is-scrub .bld__web .pv__ht { bottom: 22px; }
  .act.act--show.is-scrub .bld__web .pv__shelf { min-height: 0; gap: 12px; padding: 14px 20px 16px; }
  .act.act--show.is-scrub .bld__foot { margin-top: 6px; gap: 4px 30px; }
  .act.act--show.is-scrub .bld__foot .perks--row { gap: 6px 26px; }
  /* Step 6: the closing block moves under the media demo in the right column; tighter option grid and photo. */
  .act.act--show.is-scrub [data-step-panel="6"] { row-gap: 14px; }
  .act.act--show.is-scrub [data-step-panel="6"] > .step__copy { grid-row: 1 / span 2; }
  .act.act--show.is-scrub [data-step-panel="6"] > .step__end { grid-column: 2; grid-row: 2; margin-top: 0; padding-top: 8px; row-gap: 6px; }
  .act.act--show.is-scrub [data-step-panel="6"] .stack__cta--end { margin-bottom: 4px; row-gap: 6px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md { gap: 12px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__ops { gap: 6px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__ops button { padding: 8px 12px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__foot { margin-top: 6px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__view { padding: 10px; }
  /* It still ends above the Ask Forged pill: 36px of room under the closing block. */
  .act.is-scrub [data-step-panel="6"] { padding-bottom: 36px; }
}
@media (min-width: 1101px) and (max-width: 1439px) and (min-height: 600px) and (pointer: fine) {
  /* Step 6 under 1440: the options sit beside a smaller photo (as at 1440), with tighter perks and
     closing block, so the pinned step scrubs less. Nothing is hidden. */
  .act.act--show.is-scrub [data-step-panel="6"] .md { grid-template-columns: 196px minmax(0, 1fr); gap: 10px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__ops { grid-template-columns: 1fr; gap: 5px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__ops button { padding: 6px 10px; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__view { padding: 8px; }
  .act.act--show.is-scrub [data-step-panel="6"] .perks--clip li { padding-top: 7px; padding-bottom: 7px; }
  .act.act--show.is-scrub [data-step-panel="6"] .step__line { margin-bottom: 10px; }
  .act.act--show.is-scrub [data-step-panel="6"] .clin__tg { padding-top: 8px; padding-bottom: 8px; }
}
/* Layout polish. Step 1 look tiles: a one-line label in the pinned dock (site.js .lk__s, full name in the
   button's name and title), and 12px of room under Publish. */
.act .bld__looks .lk__s, .md__demo { display: none; }
@media (min-width: 1101px) and (min-height: 600px) and (pointer: fine) {
  .act.act--show.is-scrub .bld__looks span:has(+ .lk__s) { display: none; }
  .act.act--show.is-scrub .bld__looks .lk__s { display: block; white-space: nowrap; }
  .act.act--show.is-scrub .bld__dock { padding-bottom: 12px; }
}
/* Step 6 at 1440 and wider: the frame takes the photo's height, the options fill that height, and the
   demo note sits under the demo (a visual copy; the stage note keeps its place and its text for readers). */
@media (min-width: 1440px) and (min-height: 600px) and (pointer: fine) {
  .act.act--show.is-scrub [data-step-panel="6"] .md__view { min-height: 0; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__ops { grid-auto-rows: 1fr; align-content: stretch; }
  .act.act--show.is-scrub [data-step-panel="6"] .md__demo { display: block; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
  .act.is-scrub > .act__scene > .act__stage:has([data-step-panel="6"].is-on) > .act__note { opacity: 0; }
}
