/* The tour and the "Built here" gallery, shared by /playbook/site and /examples (examples-fix, 2026-11-13). */
/* The tour (workstreams/tour-player, 2026-11-13; it replaced the scroll-driven sticky screen of site-showcase,
   2026-11-05, which Dougie found too small and unclear). A player, on a dark band: a large screen framed as a
   browser on the artist's own domain, a line of twelve segments that fills as the clips play, Previous, Play or
   Pause, Next and Full screen under it, and the twelve parts beside it (under it on a phone) in two groups, the
   front of the site and the HQ behind the password. The part playing opens to say what it does and what that is
   worth. Each clip plays once and hands on to the next; a click on any part plays it. Only the clip on screen
   loads, and the next one is fetched once it can play. It starts on its own when half of it is on screen, stops
   off screen and in a hidden tab; reduced motion and Save-Data show the posters and a Play button instead.
   Without a script the first poster shows and every part is open. Each "Replaces" figure is written from
   config/stack-prices.json, on /playbook/site only. */
.tr{padding:var(--space-5) 0;background:var(--ground,#0B0B0C);color:#F4EEDC;
  --tr-soft:rgba(244,238,220,.74);--tr-mute:rgba(244,238,220,.56);--tr-line:rgba(244,238,220,.16);--tr-acc:#F94E3E}
.tr-wide{max-width:1400px;margin:0 auto;padding-inline:clamp(1.25rem,5vw,3rem)}
.tr-head{display:grid;gap:.6rem;margin:0 0 var(--space-3)}
.tr-head .sec-label{color:var(--tr-mute)}
.tr-head h2{margin:0;font-size:var(--step-3);color:#F4EEDC}
.tr-lede{margin:0;max-width:60ch;color:var(--tr-soft)}
.tr-player{display:grid;grid-template-columns:1fr;gap:var(--space-3)}
@media (min-width:980px){.tr-player{grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:clamp(1.5rem,2.6vw,2.5rem);align-items:start}}
/* the screen: a browser window on the artist's own address */
.tr-frame{scroll-margin-top:88px;border:1px solid rgba(244,238,220,.28);background:#000}
.tr-bar{display:flex;align-items:center;gap:12px;height:34px;padding:0 12px;border-bottom:1px solid rgba(244,238,220,.18);background:#17161A;
  font-family:var(--mono);font-size:.75rem;letter-spacing:.02em;color:var(--tr-mute)}
.tr-lights{display:flex;gap:6px}.tr-lights i{width:9px;height:9px;border-radius:50%;background:rgba(244,238,220,.22)}
.tr-url{flex:1;min-width:0;max-width:30rem;margin:0 auto;padding:4px 12px;background:rgba(244,238,220,.07);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tr-url b{font-weight:400;color:#F4EEDC}
.tr-lock{display:none;margin-left:6px;color:var(--tr-acc)}.tr-frame.is-private .tr-lock{display:inline}
.tr-screen{position:relative;display:block;aspect-ratio:16 / 10;overflow:hidden;background:#0B0B0C;cursor:pointer}
.tr:not(.is-live) .tr-screen{cursor:default}
.tr-screen img,.tr-screen video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.tr-screen video{opacity:0;transition:opacity .3s cubic-bezier(.16,1,.3,1)}
.tr-screen video.is-on{opacity:1}
.tr-big{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;align-items:center;gap:.8rem;min-height:56px;padding:0 1.4rem 0 1.1rem;
  border:1px solid #F4EEDC;background:rgba(11,11,12,.86);color:#F4EEDC;font:inherit;font-weight:600;font-size:var(--step-0);cursor:pointer}
.tr-big[hidden]{display:none}
.tr-big svg{width:18px;height:18px}
.tr-big i{font-style:normal;font-weight:400;color:var(--tr-mute);font-family:var(--mono);font-size:.75rem;letter-spacing:.06em}
.tr-big:hover,.tr-big:focus-visible{background:#F4EEDC;color:#0B0B0C}.tr-big:hover i,.tr-big:focus-visible i{color:#3A3836}
/* the controls and the twelve segments */
.tr-controls{display:grid;grid-template-columns:auto auto auto 1fr auto auto;align-items:center;gap:.25rem .5rem;margin-top:.75rem}
.tr-controls[hidden]{display:none}
.tr-btn{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid transparent;background:none;color:#F4EEDC;cursor:pointer}
.tr-btn:hover{border-color:var(--tr-line)}
.tr-btn svg{width:16px;height:16px}
.tr-play .i-play{display:none}.tr-play[data-state=paused] .i-play,.tr-play[data-state=ended] .i-play{display:block}.tr-play[data-state=paused] .i-pause,.tr-play[data-state=ended] .i-pause{display:none}
.tr-segs{display:flex;gap:4px;padding:0 .5rem;min-width:0}
.tr-segs button{flex:1;position:relative;height:22px;min-width:0;padding:0;border:0;background:none;cursor:pointer}
.tr-segs button::before{content:"";position:absolute;left:0;right:0;top:9px;height:4px;background:rgba(244,238,220,.2)}
.tr-segs b{position:absolute;left:0;right:0;top:9px;height:4px;background:#F4EEDC;transform:scaleX(0);transform-origin:0 50%}
.tr-segs .is-done b{transform:none}
.tr-segs .is-on b{background:var(--tr-acc)}
.tr-segs button:hover::before{background:rgba(244,238,220,.45)}
.tr-count{font-family:var(--mono);font-size:.75rem;letter-spacing:.1em;color:var(--tr-mute);font-variant-numeric:tabular-nums;padding:0 .25rem}
/* the parts */
.tr-group{margin:0 0 .35rem;font-family:var(--mono);font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--tr-mute)}
.tr-list+.tr-group{margin-top:var(--space-3)}
.tr-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--tr-line)}
.tr-ch{border-bottom:1px solid var(--tr-line)}
.tr-ch-btn{display:grid;grid-template-columns:2rem 1fr auto;align-items:baseline;gap:.5rem;width:100%;min-height:44px;padding:.6rem 0;border:0;background:none;color:var(--tr-soft);
  font:inherit;font-size:var(--step-0);text-align:left;cursor:pointer;position:relative}
.tr:not(.is-live) .tr-ch-btn{cursor:default}
.tr-ch-btn:hover{color:#F4EEDC}
.tr-n,.tr-dur{font-family:var(--mono);font-size:.75rem;letter-spacing:.08em;color:var(--tr-mute);font-variant-numeric:tabular-nums}
.tr-name{font-weight:500}
.tr-ch.is-on .tr-ch-btn{color:#F4EEDC}
.tr-ch.is-on .tr-name{font-weight:650}
.tr-ch.is-on .tr-n{color:var(--tr-acc)}
.tr-ch-btn::after{content:"";position:absolute;left:0;bottom:-1px;height:2px;width:calc(var(--p,0) * 100%);background:var(--tr-acc)}
.tr-ch:not(.is-on) .tr-ch-btn::after{display:none}
.tr-ch-b{padding:0 0 .9rem 2.5rem}
.tr.is-live .tr-ch:not(.is-on) .tr-ch-b{display:none}
.tr-job{margin:0;color:var(--tr-soft);font-size:var(--step--1);line-height:1.5}
.tr-out{margin:.55rem 0 0;font-weight:650;color:#F4EEDC;line-height:1.35}
.tr-rep{margin:.55rem 0 0;font-size:var(--step--1);color:var(--tr-soft);line-height:1.45}
.tr-rep span{margin-right:.4rem;font-family:var(--mono);font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--tr-mute)}
.tr-btn:focus-visible,.tr-ch-btn:focus-visible,.tr-segs button:focus-visible,.tr-big:focus-visible{outline:2px solid #F4EEDC;outline-offset:2px}
/* full screen: the frame fills the screen, the clip letterboxed in it */
.tr-frame:fullscreen{display:flex;flex-direction:column;border:0}
.tr-frame:fullscreen .tr-screen{flex:1;aspect-ratio:auto}
@media (max-width:979px){
  .tr{padding:var(--space-4) 0}
  .tr-player .tr-wide-bleed{margin-inline:calc(-1 * clamp(1.25rem,5vw,3rem))}
  .tr-frame{border-inline:0}
  .tr-bar{height:30px}.tr-lights{display:none}
  .tr-controls{margin-inline:clamp(1.25rem,5vw,3rem)}
  .tr-segs{grid-column:1 / -1;order:-1;padding:0}
}
@media (prefers-reduced-motion:reduce){.tr-screen video{transition:none}}
@media print{.tr{background:none;color:#141312}.tr-controls,.tr-big,.tr-screen video{display:none!important}.tr-ch-b{display:block!important}}
/* What's in it on /playbook/site: each part links to its place in the tour (tour-player, 2026-11-13) */
.so-labels li a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--line-strong,#B4AE9C)}
.so-labels li a:hover{text-decoration-color:currentColor}
/* "Built here" (site-showcase, 2026-11-05): the sites we built, as tall browser frames whose
   page scrolls itself slowly while the gallery is on screen. On hover or focus a frame's bar fills with its
   artist's house colour and the parts the site has show over the foot of the page; on a phone those parts
   are a line under the name, so the frame stays clean. A click opens the live site. Full width, outside the
   text column. The drift runs at one speed set from the pixels each page travels (the script measures), holds
   at each end, has a Pause, stops off screen, and stands still under reduced motion and Save-Data. */
.sc{padding:var(--space-4) 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sc-head{display:grid;gap:.6rem;margin:0 0 var(--space-3)}
.sc-head h2{margin:0;font-size:var(--step-3)}
.sc-lede{margin:0;max-width:52ch;color:var(--ink-soft)}
.sc-pause{justify-self:start;display:inline-flex;align-items:center;gap:.5rem;min-height:44px;padding:0;background:none;border:0;cursor:pointer;
  font-family:var(--mono);font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.sc-pause[hidden]{display:none}
.sc-pause:hover{color:var(--ink)}
.sc-pause svg{width:10px;height:10px}
.sc-pause .i-play{display:none}.sc-pause[aria-pressed=true] .i-play{display:block}.sc-pause[aria-pressed=true] .i-pause{display:none}
/* position:relative so the visually-hidden "opens in a new tab" spans inside each .sc-link resolve against
   this rail. They are position:absolute with no offsets; without a positioned ancestor they take the initial
   containing block, escape the rail's overflow-x clipping at phone widths and stretch the whole document
   sideways (2257px at a 375px viewport). workstreams/full-site-review, 2026-11-10. */
.sc-row{position:relative;list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-3) var(--space-2)}
@media (max-width:999px){.sc-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
.sc-item{margin:0;min-width:0}
.sc-link{display:block;color:var(--ink);text-decoration:none}
.sc-frame{display:block;position:relative;border:1px solid var(--ink);background:var(--ink);transition:border-color .3s cubic-bezier(.16,1,.3,1)}
.sc-bar{display:flex;align-items:center;gap:8px;height:30px;padding:0 10px;background:var(--paper);color:var(--ink);border-bottom:1px solid var(--ink);
  font-family:var(--mono);font-size:.75rem;letter-spacing:.03em;transition:background-color .3s cubic-bezier(.16,1,.3,1),color .3s cubic-bezier(.16,1,.3,1)}
.sc-dot{flex:none;width:7px;height:7px;border:1px solid currentColor}
.sc-host{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sc-view{display:block;position:relative;aspect-ratio:1 / 1.4;overflow:hidden;background:#0B0B0C}
.sc-view img{display:block;width:100%;height:auto}
.sc.is-run .sc-view img.is-drift{animation-play-state:running}
.sc-view img.is-drift{animation:scDrift var(--d,24s) linear infinite alternate;animation-play-state:paused}
@keyframes scDrift{0%,7%{transform:none}93%,100%{transform:translateY(var(--s,0px))}}
.sc-tags{position:absolute;left:0;right:0;bottom:0;padding:34px 10px 10px;background:linear-gradient(rgba(11,11,12,0),rgba(11,11,12,.9) 55%);
  font-family:var(--mono);font-size:.75rem;line-height:1.45;letter-spacing:.05em;text-transform:uppercase;color:var(--paper);
  opacity:0;transform:translateY(6px);transition:opacity .3s cubic-bezier(.16,1,.3,1),transform .3s cubic-bezier(.16,1,.3,1)}
.sc-link:hover .sc-frame,.sc-link:focus-visible .sc-frame{border-color:var(--acc)}
.sc-link:hover .sc-bar,.sc-link:focus-visible .sc-bar{background:var(--acc);color:var(--acc-on);border-bottom-color:var(--acc)}
.sc-link:hover .sc-tags,.sc-link:focus-visible .sc-tags{opacity:1;transform:none}
/* the ring is drawn on .sc-frame below (the link is a block of inline parts, so its own outline would wrap the name too); keep both lines together */
.sc-link:focus-visible{outline:none}
.sc-link:focus-visible .sc-frame{outline:2px solid var(--ink);outline-offset:3px}
.sc-name{display:block;margin:.65rem 0 0;font-weight:600;line-height:1.3}
.sc-link:hover .sc-name{text-decoration:underline;text-underline-offset:3px}
.sc-note,.sc-mods{display:block;font-weight:400;font-size:var(--step--1);color:var(--muted)}
.sc-mods{display:none;margin-top:.2rem;font-family:var(--mono);font-size:.75rem;letter-spacing:.04em;text-transform:uppercase}
.is-demo .sc-note{color:var(--ink-soft)}
.sc-fine{margin:var(--space-3) 0 0;max-width:62ch;font-size:var(--step--1);color:var(--muted)}
@media (hover:none){.sc-tags{display:none}.sc-mods{display:block}}
@media (max-width:640px){
  .sc-row{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:14px;margin-inline:calc(-1 * clamp(1.25rem,5vw,3rem));padding:0 clamp(1.25rem,5vw,3rem) 6px;scroll-padding-inline:clamp(1.25rem,5vw,3rem);scrollbar-width:none}
  .sc-row::-webkit-scrollbar{display:none}
  .sc-item{flex:0 0 70%;scroll-snap-align:start}
}
@media (prefers-reduced-motion:reduce){.sc-view img.is-drift{animation:none}.sc-frame,.sc-bar,.sc-tags{transition:none}}
@media print{.sc-pause{display:none}.sc-view img.is-drift{animation:none}}
