/* CNY Sound: the page's own look on the list stage, then the piece (the 75 messages written ahead, one bar each, by stage), scoped under .cnyp. */

/* ---------- CNY Sound's own look on the list stage (pieces/immersive.js; D102, D104) ----------
   From the client's own design system (CNY SOUND/docs/brand/web-design-system.md and the 2026 dark-room pages): the void ground #171110,
   warm white #FFFAF7, the brand orange #E0602D, display set in capitals and tight. The orange is the line that shows how far. */
.sbx[data-case="cny-sound"] { --sbx-g: #171110; --sbx-c: #fffaf7; --sbx-soft: rgba(255, 250, 247, .8); --sbx-rule: rgba(255, 250, 247, .2); --cny-or: #e0602d; }
.sbx[data-case="cny-sound"] .sbx-name { text-transform: uppercase; font-style: italic; letter-spacing: -.03em; line-height: .88; }
.sbx[data-case="cny-sound"] .sbx-h { text-transform: uppercase; letter-spacing: -.01em; }
/* the case list itself is set in Vervox's own faces (Brian 2026-11-13 15:56; pieces/immersive.css), so no capitals or italic here */
.sbx[data-case="cny-sound"] .sbx-mh { color: var(--cny-or); }
.sbx[data-case="cny-sound"] .sbx-ld-list li::after, .sbx[data-case="cny-sound"] .sbx-ld-now::after { background: var(--cny-or); }
.sbx[data-case="cny-sound"] .sbx-bar { background: rgba(23, 17, 16, .93); }
@media (max-width: 899px) { .sbx[data-case="cny-sound"] .sbx-dock { background: rgba(23, 17, 16, .95); } }
/* on short screens the eleven rows take a little less room, so the list fits the stage with any row open */
@media (max-height: 800px) and (min-width: 900px) { .sbx[data-case="cny-sound"] .sbx-ld-list a { font-size: clamp(.84rem, min(1.2vw, 2svh), 1.2rem); padding: clamp(3px, .8svh, 10px) 0; } }
/* the piece on this ground */
.sbx[data-case="cny-sound"] .sbx-after .cnyp { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- the piece ---------- */
.cnyp { --bh: 10px; --bg: 4px; --lw: 6.6em; padding: clamp(56px, 8vw, 120px) 0 0; display: grid; gap: clamp(26px, 3.4vw, 48px); }

/* the number, said once and big */
.cnyp-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }
.cnyp-big { display: grid; gap: 10px; max-width: none; }
.cnyp-big b { font-family: var(--disp); font-weight: 800; font-size: clamp(4.1rem, 19vw, 15rem); line-height: .82; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cnyp-big span { font-size: clamp(1.2rem, 2vw, 1.9rem); line-height: 1.2; color: var(--paper); font-weight: 500; max-width: 24em; text-wrap: balance; }
.cnyp-play { flex: none; }
.cnyp-head { font-family: var(--disp); font-weight: 800; font-size: clamp(1.35rem, 2.4vw, 2.2rem); line-height: 1.1; letter-spacing: -.02em; max-width: none; padding-top: clamp(22px, 3vw, 40px); border-top: 1px solid var(--rule); }

/* the bars. Phone and tablet: one row per stage, the label on the left, the ring running down between them */
.cnyp-eq { position: relative; }
.cnyp-cols { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cnyp-col { display: grid; grid-template-columns: var(--lw) 1fr; align-items: center; gap: 0 34px; min-height: 22px; }
.cnyp-col.is-gap { margin-top: 14px; }
.cnyp-cl { grid-column: 1; grid-row: 1; font-size: 14.5px; font-weight: 600; line-height: 1.15; color: var(--soft); transition: color .3s; }
.cnyp-col.on .cnyp-cl { color: var(--paper); }
.cnyp-bars { grid-column: 2; grid-row: 1; display: flex; flex-wrap: nowrap; gap: var(--bg); }
.cnyp-b { flex: none; width: var(--bh); height: 22px; padding: 0; border: 0; border-radius: 3px; cursor: pointer; position: relative; background: var(--rule); opacity: .5; transform: scale(.6); transition: background .35s ease, opacity .35s ease, transform .5s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--r) * 35ms); -webkit-tap-highlight-color: transparent; }
.cnyp-b::after { content: ""; position: absolute; inset: -5px -2px; }
.cnyp-col.on .cnyp-b { opacity: 1; transform: none; }
.cnyp-col.on .cnyp-b.is-c, .cnyp-col.on .cnyp-b.is-i, .cnyp-col.on .cnyp-b.is-s { background: var(--truel); }
.cnyp-b.is-h { background: transparent; box-shadow: inset 0 0 0 2px var(--rule2); }
.cnyp-col.on .cnyp-b.is-h { background: transparent; box-shadow: inset 0 0 0 2px var(--paper); }
.cnyp-b:hover, .cnyp-b:focus-visible, .cnyp-b[aria-pressed="true"] { outline: 2px solid var(--paper); outline-offset: 2px; z-index: 1; }
.cnyp-b:focus { outline-color: var(--paper); }
.cnyp-b:focus:not(:focus-visible):not([aria-pressed="true"]):not(:hover) { outline: none; }

.cnyp-base { position: absolute; top: 11px; bottom: 11px; left: calc(var(--lw) + 17px); width: 3px; margin-left: -1.5px; background: var(--rule2); pointer-events: none; }
.cnyp-fill { position: absolute; inset: 0; background: var(--paper); transform-origin: 50% 0; transform: scaleY(var(--f, 0)); }
/* the ring moves by transform, not top or left, so its travel never counts as a layout shift */
.cnyp-ring { position: absolute; left: 50%; top: 0; transform: translateY(var(--ry, 0px)); width: 28px; height: 28px; margin: -14px 0 0 -14px; z-index: 2; }
.cnyp-ring svg { width: 100%; height: 100%; overflow: visible; display: block; }
.cnyp-ring circle { fill: var(--ink); stroke: var(--paper); stroke-width: 4; transition: stroke .5s ease; }
.cnyp.is-end .cnyp-ring circle { stroke: var(--truel); }

/* on touch the whole chart takes the tap (pieces/cny-pipeline.js picks the nearest bar), so a side-to-side slide reads along a row and an up-and-down one still scrolls */
@media (max-width: 1099px) { .cnyp-cols { touch-action: pan-y; } }

/* 44px to tap (build PM final review, 2026-11-15), drawn exactly as before.
   The Play button: a 2px clear border all round makes it 44 tall; the paint stays in the box inside it (background-clip, and the fill is clipped there),
   the -2px margin keeps the layout where it was, the outside radius 4px leaves the same 2px corner inside, and the focus ring's offset drops by the 2px border so it lands where it did. */
.cnyp-play.btn { min-height: 44px; border: 2px solid transparent; background-clip: padding-box; border-radius: 4px; margin: -2px; }
.cnyp-play.btn:focus-visible { outline-offset: 1px; }
/* the three labels stacked in one cell; only the one in use shows (and is the button's name), so the width never changes with the label */
.cnyp-pl { display: grid; } .cnyp-pl > span { grid-area: 1 / 1; visibility: hidden; } .cnyp-pl > span.on { visibility: visible; }
/* The bars, phone and tablet: each button is 44 tall with -11px margins, so the rows keep their 32px spacing; the bar is drawn by ::before in the middle 22px.
   The button box itself takes no pointer; ::after (the middle 22px plus 5px above and below, plus half the gap each side) does, so neighbouring rows' boxes overlap
   without their tap cells overlapping. Touch is settled by the nearest bar in any case (pieces/cny-pipeline.js). */
@media (max-width: 1099px) {
  .cnyp-b, .cnyp-col.on .cnyp-b.is-c, .cnyp-col.on .cnyp-b.is-i, .cnyp-col.on .cnyp-b.is-s, .cnyp-b.is-h, .cnyp-col.on .cnyp-b.is-h { height: 44px; margin: -11px 0; background: transparent; box-shadow: none; border-radius: 0; pointer-events: none; }
  .cnyp-b::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; bottom: 11px; border-radius: 3px; background: var(--rule); transition: background .35s ease, box-shadow .35s ease; transition-delay: calc(var(--r) * 35ms); pointer-events: none; }
  .cnyp-col.on .cnyp-b.is-c::before, .cnyp-col.on .cnyp-b.is-i::before, .cnyp-col.on .cnyp-b.is-s::before { background: var(--truel); }
  .cnyp-b.is-h::before { background: transparent; box-shadow: inset 0 0 0 2px var(--rule2); }
  .cnyp-col.on .cnyp-b.is-h::before { background: transparent; box-shadow: inset 0 0 0 2px var(--paper); }
  .cnyp-b::after { inset: 6px -2px; pointer-events: auto; }
  .cnyp-b:hover, .cnyp-b:focus-visible, .cnyp-b[aria-pressed="true"], .cnyp-b:focus { outline: none; }
  .cnyp-b:hover::before, .cnyp-b:focus-visible::before, .cnyp-b[aria-pressed="true"]::before { outline: 2px solid var(--paper); outline-offset: 2px; }
}

@media (min-width: 560px) { .cnyp { --bh: 18px; --bg: 5px; --lw: 9em; } .cnyp-cl { font-size: 16px; } }

/* desktop: one column per stage, like a level meter; the ring runs along under them */
@media (min-width: 1100px) {
  .cnyp-eq { padding-bottom: 0; }
  .cnyp-cols { grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 0 clamp(8px, 1vw, 16px); align-items: end; }
  .cnyp-col { grid-template-columns: none; grid-template-rows: auto auto; gap: 0; align-items: stretch; min-height: 0; }
  .cnyp-col.is-gap { margin-top: 0; margin-left: clamp(10px, 1.6vw, 28px); }
  .cnyp-bars { grid-column: 1; grid-row: 1; flex-direction: column-reverse; gap: 5px; }
  .cnyp-b { width: 100%; height: 17px; }
  .cnyp-b::after { inset: -2.5px 0; }
  .cnyp-cl { grid-column: 1; grid-row: 2; height: 96px; padding-top: 50px; font-family: var(--disp); font-weight: 800; font-size: clamp(14px, 1.1vw, 17px); letter-spacing: -.01em; overflow-wrap: normal; }
  .cnyp-base { top: auto; bottom: 71px; left: 0; right: 0; width: auto; height: 3px; margin: 0 0 -1.5px; }
  .cnyp-fill { transform-origin: 0 50%; transform: scaleX(var(--f, 0)); }
  .cnyp-ring { left: 0; top: 50%; transform: translateX(var(--rx, 0px)); width: 40px; height: 40px; margin: -20px 0 0 -20px; }
}

/* what is being read, and the key */
.cnyp-read { min-height: 3.6em; margin: 0; max-width: 46em; font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.35; }
.cnyp-read b { display: block; font-size: .78em; font-weight: 600; color: var(--soft); margin-bottom: 4px; }
.cnyp-read q { font-weight: 600; color: var(--paper); }
.cnyp-read q::before { content: "\201C"; } .cnyp-read q::after { content: "\201D"; }
.cnyp-hint { color: var(--soft); }
.cnyp-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: 15px; color: var(--soft); }
.cnyp-key li { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.cnyp-key b { color: var(--paper); font-weight: 700; }
.cnyp-key i { width: 18px; height: 12px; border-radius: 3px; }
.cnyp-key i.is-c { background: var(--truel); } .cnyp-key i.is-h { box-shadow: inset 0 0 0 2px var(--paper); }

.cnyp-hours { margin: 0; max-width: 34em; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.4; color: var(--paper); padding-top: clamp(18px, 2vw, 28px); border-top: 1px solid var(--rule); text-wrap: pretty; }
.cnyp-src { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--soft); }

@media (prefers-reduced-motion: reduce) {
  .cnyp-b, .cnyp-b::before, .cnyp-ring circle, .cnyp-cl { transition: none !important; }
}
