/* "How it works" deck: a small, silent copy of the TapeDeck 5.0 deck, driven by js/demo.js.
   --pos (0..1) is the playhead; each lane's --len is how much of the tape its take covers. */

.mini {
  --pos: 0;
  position: relative; border: 1px solid var(--line-2); border-radius: 32px; padding: 16px;
  background: linear-gradient(180deg, rgba(242, 237, 228, .04), rgba(242, 237, 228, 0) 30%), var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 50px 100px -50px rgba(0, 0, 0, .95), 0 30px 90px -60px rgba(207, 200, 188, .4);
}
.mini-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px 14px; }
.mini-title { font-size: 1.05rem; font-weight: 600; }
.mini-sub { font-size: .85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mini-tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }

/* Display: reels, counter, status line, L/R meters */
.display { background: var(--card); border-radius: 22px; padding: 18px 18px 16px; }
.display-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center; gap: 8px; }
.reel { width: 60px; height: 60px; }
.reel .rim { fill: none; stroke: var(--hairline); stroke-width: 1; }
.reel .pack { fill: var(--reel-pack); }
.reel .ring { fill: none; stroke: var(--reel-line); stroke-opacity: .6; stroke-width: 1; }
.reel .spokes { fill: none; stroke: var(--reel-line); stroke-width: 2; stroke-linecap: round; transform-box: view-box; transform-origin: 32px 32px; }
.reel .hub { fill: none; stroke: var(--reel-line); stroke-width: 1.5; }
.mini[data-mode="rec"] .reel .pack { fill: #5A2E1D; }
.mini[data-mode="play"] .spokes, .mini[data-mode="rec"] .spokes { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.counter {
  display: block; text-align: center; font-size: clamp(2.5rem, 5.4vw, 3.3rem); font-weight: 300;
  line-height: 1.05; letter-spacing: .01em; font-variant-numeric: tabular-nums;
}
.mini[data-mode="rec"] .counter { color: var(--rec); }
.status {
  margin-top: 10px; text-align: center; font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.status b { color: var(--text); font-weight: 700; }
.mini[data-mode="rec"] .status b { color: var(--rec); }
.meters { display: grid; gap: 8px; margin-top: 14px; }
.meter { display: grid; grid-template-columns: 12px minmax(0, 1fr); align-items: center; gap: 8px; font-size: .68rem; color: var(--text-2); }
.dashes { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; }
.dashes i { height: 4px; border-radius: 2px; background: var(--hairline); }
.dashes i.on { background: var(--wave); }
.mini[data-mode="rec"] .dashes i.on { background: var(--rec); }
.dashes i.peak.on, .mini[data-mode="rec"] .dashes i.peak.on { background: var(--warn); }

/* Lanes */
.lanes { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.lane {
  display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 12px;
  height: 64px; padding: 0 14px 0 12px; background: var(--card);
  border: 1.5px solid transparent; border-radius: 18px;
}
.lane-id { display: flex; flex-direction: column; gap: 4px; }
.lane-n {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.lane-name { font-size: .78rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave { position: relative; height: 40px; }
.wave::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hairline); }
.take { position: absolute; inset: 0; clip-path: inset(0 calc((1 - var(--len, 0)) * 100%) 0 0); background: var(--card); }
.take svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.take path { fill: none; stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.take .dim path { stroke: #827C73; }
.take .lit { clip-path: inset(0 calc((1 - var(--pos)) * 100%) 0 0); }
.take .lit path { stroke: #ECE6DC; }
.head { position: absolute; top: -8px; bottom: -8px; left: calc(var(--pos) * 100%); width: 1.5px; background: var(--text); }
.next-take { position: absolute; inset: 0; display: none; align-items: center; padding-left: 10px; color: var(--rec); font-size: .95rem; }

.lane.is-target { border-color: var(--rec); }
.lane.is-target .lane-n { background: var(--rec); color: var(--on-rec); }
.mini[data-mode="stop"] .lane.is-target .next-take { display: flex; }
.lane.is-rec { background: #2A1C16; border-color: var(--rec); }
.lane.is-rec .take { background: #2A1C16; }
.lane.is-rec .take path { stroke: var(--rec); }
.mini[data-mode="rec"] .head { background: var(--rec); }

/* Retake / bounce chips, transport and hint */
.chips-row { display: flex; justify-content: center; gap: 10px; min-height: 44px; margin-top: 16px; }
.chip {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; border-radius: 999px;
  padding: 0 18px; height: 40px; font: inherit; font-size: .74rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; background: var(--surface); color: var(--text);
}
.chip--rec { background: #2A1C16; color: var(--rec); }
.chip[hidden] { display: none; }
.transport { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 6px; }
.t-btn {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; background: var(--surface); color: var(--text);
}
.t-btn--small { width: 44px; height: 44px; background: transparent; }
.t-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-btn svg .solid { fill: currentColor; }
.t-btn:disabled { color: var(--text-3); cursor: default; }
.t-btn .i-pause, .mini[data-mode="play"] .t-btn .i-play { display: none; }
.mini[data-mode="play"] .t-btn .i-pause { display: block; }
.rec-btn {
  -webkit-appearance: none; appearance: none; cursor: pointer; display: grid; place-items: center;
  width: 80px; height: 80px; padding: 6px; border-radius: 50%; border: 3px solid #8A847C; background: transparent;
}
.rec-btn span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--rec); transition: width .18s ease, height .18s ease, border-radius .18s ease; }
.mini[data-mode="rec"] .rec-btn { border-color: #5A2E1D; }
.mini[data-mode="rec"] .rec-btn span { width: 42%; height: 42%; border-radius: 6px; }
.rec-btn:disabled { cursor: default; border-color: var(--hairline); }
.rec-btn:disabled span { background: #5A2E1D; }
.hint {
  margin-top: 12px; text-align: center; font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-2); min-height: 1.3em;
}
.mini[data-mode="rec"] .hint { color: var(--rec); }

@media (max-width: 640px) {
  .mini { padding: 12px; border-radius: 26px; }
  .display { padding: 16px 12px 14px; }
  .display-row { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .reel { width: 46px; height: 46px; }
  .lane { grid-template-columns: 52px minmax(0, 1fr); padding: 0 10px; gap: 8px; }
  .transport { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mini .spokes { animation: none !important; }
  .rec-btn span { transition: none; }
}

/* Former style="" attributes, now classes: the strict Content-Security-Policy blocks inline styles. */
.sx-41f06c5b { background:#121110 !important; }
.sx-a6ba3a0d { background:#F4EFE6 !important; }
.sx-ec37fead { background:linear-gradient(90deg,#121110 50%,#F4EFE6 50%) !important; }
