/* W1f walkthrough v4 (wave 36, round 2). Tokens come from ../../site/css/site.css; figure hues are reserved for the music pictures (the step marker is ink). */
:root { --ui-dim: #56534e; --hh: 48px; }   /* darker dim ink: >= 4.5:1 on the page and the vellum (the site value #7f7c78 is 2.9:1) */
.wbar { position: sticky; top: 0; z-index: 30; min-height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: color-mix(in srgb, var(--page) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 14px; }
.wbar .home { font-size: 17px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-decoration: none; font-family: var(--serif); white-space: nowrap; }
.wbar .home small { font-size: 12px; letter-spacing: .12em; color: var(--ui-dim); margin-left: 6px; text-transform: none; }
.wbar .grow { flex: 1; } .wbar .home { display: inline-flex; align-items: center; min-height: 28px; }
.skip { white-space: nowrap; padding: 6px 8px; border: 0; border-radius: var(--u-r); color: var(--ink); background: none; }   /* B46c (R2): a link (a.lnk from ui-tokens.css), not a pill */
/* ONE progress cue: the counter and the dots (no bar). The current step is marked in neutral ink, never a figure hue. */
.prog { display: flex; align-items: center; gap: 12px; }
.cnt { font: 15px var(--sans); color: var(--ink); white-space: nowrap; } .cnt b { font-size: 20px; font-weight: 700; }
.ctitle { font: italic 15px var(--serif); color: var(--ui); white-space: nowrap; min-width: 8em; }
.dots { position: relative; display: flex; align-items: center; }
.dots::before { content: ''; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; margin-top: -1px; background: var(--line); }
.dots .dfill { position: absolute; left: 12px; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); transition: width .45s; }
.dots button { all: unset; cursor: pointer; position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.dots button i { display: block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--page); box-sizing: border-box; transition: background-color .45s, transform .45s cubic-bezier(.3,1.4,.5,1); }
.dots button.seen i { background: var(--ui-dim); }
.dots button.on i { background: var(--ink); transform: scale(1.5); }
.dots button:focus-visible { outline: 1.5px solid var(--ink); outline-offset: -2px; border-radius: 50%; }
.resume { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 6px 16px; background: var(--vellum-hi); border-bottom: 1px solid var(--line); font: 15px var(--sans); color: var(--ink); }
.resume button { all: unset; cursor: pointer; box-sizing: border-box; min-height: 30px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--ui); border-radius: var(--u-r); background: var(--vellum); color: var(--ink); }
.resume button[data-a="go"] { background: var(--ink); color: var(--vellum-hi); border-color: var(--ink); }
.resume button:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.walk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.stage { position: relative; grid-column: 2; grid-row: 1; } .steps { grid-column: 1; grid-row: 1; }
.stage-in { position: sticky; top: var(--hh); height: calc(100vh - var(--hh)); display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px 0; }
.art { position: relative; background: var(--vellum); border: 1px solid var(--line); border-radius: 4px; aspect-ratio: 4 / 3; max-height: 70vh; width: 100%; overflow: hidden; }
.art > * { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); opacity: 0; transition: opacity .14s; pointer-events: none; }
.art > .on { opacity: 1; pointer-events: auto; transition: opacity .22s .12s; }
.leg { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 13px/1.3 var(--sans); color: var(--ink); min-height: 1.3em; }
.leg .lg { display: inline-flex; align-items: center; } .leg .sw { display: inline-block; width: 16px; height: 9px; border-radius: 5px; margin-right: 6px; } .leg .sw.fr { height: 4px; border-radius: 2px; }
.art-cap { margin: 0; font: 14px/1.4 var(--sans); color: var(--ui-dim); min-height: 2.8em; }
.art-tip { margin: 0; font: 12px/1.3 var(--sans); color: var(--ui-dim); }
svg.roll { background: var(--vellum); padding: 0; }
.steps { padding: 0 0 20vh; }
.card { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; opacity: .5; transition: opacity .3s; }
.card.on { opacity: 1; }
.card .n { font: 12px var(--sans); letter-spacing: .16em; color: var(--ui-dim); text-transform: uppercase; }
.card h2 { font: 400 clamp(26px, 3.2vw, 38px)/1.1 var(--serif); color: var(--ink); margin: 6px 0 14px; }
.card .fug { font: 700 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ui-dim); margin: -6px 0 12px; }
/* play chips: one per sound, the only play control. Click = pick it, show it, play it. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { all: unset; box-sizing: border-box; position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 16px 0 13px; border-radius: var(--u-r); border: 1px solid var(--ui); background: var(--vellum-hi); color: var(--ink); font: 15px var(--sans); cursor: pointer; transition: background-color .15s, color .15s; }
.chip:hover { background: var(--vellum); }
.chip:focus-visible { outline: 1.5px solid var(--u-focus); outline-offset: 2px; }   /* R11 */
.chip.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.chip .ic { flex: none; width: 11px; height: 12px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.chip small { font-size: 12px; opacity: .85; }
.chip.playing { background: var(--ink); color: var(--vellum-hi); border-color: var(--ink); }
.chip.playing .ic { clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0); }
.chip.playing::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: rgba(243,241,234,.7); }
.chip.loading .ic { clip-path: none; background: none; width: 12px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; box-sizing: border-box; animation: wspin .8s linear infinite; }
@keyframes wspin { to { transform: rotate(360deg); } }
.card p.listen { font: 19px/1.4 var(--serif); font-style: italic; color: var(--ink); margin: 0 0 14px; max-width: 32em; }
.card p.copy { font-size: 19px; line-height: 1.5; margin: 0 0 14px; max-width: 34em; }
.card em { font-style: italic; color: var(--ink); }
.card .small { font: 14px/1.4 var(--sans); color: var(--ui); margin: 0 0 10px; }
.card .tag { margin: 4px 0; font: 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ui-dim); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 12px; font-family: var(--sans); font-size: 14px; }
.atlas { display: inline-flex; align-items: center; min-height: 28px; color: var(--ink); }
details.aside { font: 15px/1.5 var(--sans); max-width: 38em; border-left: 2px solid var(--line); padding: 2px 0 2px 12px; margin-top: 6px; }
details.aside summary { cursor: pointer; color: var(--ui); min-height: 28px; display: flex; align-items: center; } details.aside p { margin: 8px 0 0; }
details.aside .ab { overflow: hidden; }
.endrow a.big { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--ui); border-radius: var(--u-r); background: var(--vellum-hi); text-decoration: none; font: 15px var(--sans); }
.endrow a.big.prime { background: var(--ink); color: var(--vellum-hi); border-color: var(--ink); }
.gloss { max-width: 760px; margin: 0 auto; padding: 30px 24px; border-top: 1px solid var(--line); font: 15px/1.5 var(--sans); }
.gloss h2 { font: 400 22px var(--serif); margin: 0 0 8px; } .gloss dt { font-weight: 700; color: var(--ink); margin-top: 12px; } .gloss dd { margin: 2px 0 0; }
.wfoot { padding: 18px 24px 30px; font: 12px var(--sans); color: var(--ui-dim); text-align: center; border-top: 1px solid var(--line); }
.wfoot a { color: var(--ui); }
/* picture details */
svg.roll .nt.fut { opacity: .22; } svg.roll .nt.fr.fut { opacity: .12; } svg.roll .tg.fut { opacity: 0; }
svg.roll .nt.fr { opacity: .75; }
svg.roll.spot .nt:not(.sb) { opacity: .16; }
.art-cap.cf { animation: capin .35s ease-out; } @keyframes capin { from { opacity: 0; } }
svg.roll .nt { transform-box: fill-box; transform-origin: left center; }
svg.roll.enter .nt, svg.roll.enter .tg { animation: ntin .19s ease-out backwards; animation-delay: calc(var(--d, 0s) * .55 + .08s); }
@keyframes ntin { from { opacity: 0; transform: scaleX(.25) translateX(-6px); } }
svg.roll.enter .tg { animation-name: tgin; } @keyframes tgin { from { opacity: 0; } }
svg.chordv .cd { transition: transform .95s cubic-bezier(.5,.05,.2,1), opacity .5s, r .6s; transition-delay: var(--d, 0s); }
svg.chordv .sn, svg.chordv .cn { transition: opacity .4s; }
svg.chordv.inst .cd, svg.chordv.inst .sn, svg.chordv.inst .cn { transition: none !important; }
/* step 9: the real atlas wheel (an unforked n5 embed): a picture here, not a control (its own click-to-play stays off) */
iframe.wheelv { inset: 2px !important; width: calc(100% - 4px) !important; height: calc(100% - 4px) !important; border: 0; background: transparent; cursor: pointer; }
@media (max-width: 800px) {
  .walk { display: block; padding: 0 16px; } .stage, .steps { grid-column: auto; grid-row: auto; }
  .stage { position: sticky; top: var(--hh); z-index: 10; background: var(--page); padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
  .stage-in { position: static; height: auto; padding: 0; gap: 4px; }
  .art { aspect-ratio: 3 / 2; max-height: 30vh; } .art > * { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
  .art-cap { min-height: 0; font-size: 13px; } .art-tip { display: none; } .leg { font-size: 12px; gap: 2px 12px; }
  .card { min-height: 62vh; padding: 28px 0; } .card p.copy, .card p.listen { font-size: 17px; }
  /* two-row header: brand, counter, link; then the 24 px dots */
  .wbar { flex-wrap: wrap; padding: 3px 10px 2px; gap: 0 8px; } .wbar .grow { display: none; } .wbar .home small { display: none; } .wbar .home { order: 1; font-size: 14px; letter-spacing: .08em; }
  .prog { display: contents; } .cnt { order: 2; margin-left: auto; font-size: 14px; } .cnt b { font-size: 16px; } .ctitle { display: none; }
  .skip { order: 3; padding: 4px 10px; font-size: 12px; } .dots { order: 4; flex: 0 0 216px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .art > *, .card, .dots button i, .dots .dfill, .chip { transition: none !important; } svg.roll .nt, svg.roll .tg, .art-cap { animation: none !important; } svg.chordv .cd, svg.chordv .sn, svg.chordv .cn { transition: none !important; } .chip.loading .ic { animation: none; } }
/* B50b (S49, W50): the steps are plain page scroll (not JS-paged), so a soft snap: each card settles at the centre of the viewport when a scroll ends near it.
   `proximity`, never mandatory (the visitor can always rest between steps); scroll-padding keeps the sticky header clear; off under reduced motion. */
html { scroll-snap-type: y proximity; scroll-padding-top: var(--hh, 48px); }
.card { scroll-snap-align: center; }
@media (prefers-reduced-motion: reduce) { html { scroll-snap-type: none; } }
/* B51a (Z91): the "See ... in the atlas" link sits below the step's info sections (the asides) */
.row.row-atlas { margin-top: 12px; }
