/* Demo kit (30 Nov): the parts every reel and guided app shares, built from vf.css tokens.
   Frame    .demo-frame     outer frame of a reel or app: white stage, soft edge, feature shadow. The demo keeps its own paper inside.
   Launch   .demo-launch    cover play, as on the home hero reel: round blue badge, label, time (.demo-launch-badge, .demo-launch-time).
   Control  .demo-transport transport strip; .demo-control soft-blue disc (icon only), .demo-seek 2px track + 12px thumb (reads --progress), .demo-time.
   Pill     .demo-pill      the one chip a frame may carry: tint, no outline. .is-ok, .is-sea, .is-bad, or set --tint / --tint-ink.
   Bar      .demo-bar       flat rounded bar, no track. Width from --w. Blue gain by default; .is-start neutral tick, .is-result soft green,
                          .is-bad sunset, .is-soft pale blue for the values that are not the point.
   End      .demo-end       end frame: one big figure (.demo-end-figure, green gain; .is-flat in ink) and one plain line (.demo-end-line).
   Check    --demo-check    the stroked check as a mask for ::before ticks, never the ✓ glyph.
   Opener   .demo-opener    what the viewer is about to see, in the cover's top label slot: one ink line (two at most) with the AI
                          sparkle as the frame's one blue mark; no pill, tint or border. The text lives in the page HTML.
                          .is-centered for a centred cover: the sparkle sits inline before the first word.
                          .is-title is a reel's 1.5 s title beat on play: the same sentence large and alone in the stage. */
:root {
  --demo-start: var(--muted);
  --demo-gain: var(--blue);
  --demo-result: color-mix(in srgb, var(--ok) 40%, var(--white));
  --demo-result-ink: color-mix(in srgb, var(--ok) 55%, var(--ink));
  --demo-bad: var(--sunset);
  --demo-bad-ink: color-mix(in srgb, var(--sunset) 55%, var(--ink));
  --demo-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7.5'/%3E%3C/svg%3E");
}

.demo-frame { overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-16); background: var(--white); box-shadow: var(--shadow-3); }

.demo-launch { display: inline-flex; align-items: center; gap: var(--space-8); min-height: 44px; padding: 0 var(--space-8) 0 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 700 var(--type-15)/1.2 var(--sans); white-space: nowrap; cursor: pointer; }
.demo-launch-badge { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--blue-dark); color: var(--white); box-shadow: var(--shadow-2); transition: background-color .15s; }
.demo-launch-badge svg { width: 18px; height: 18px; margin-left: 2px; fill: currentColor; stroke: none; }
.demo-launch:hover { color: var(--blue-dark); }
.demo-launch:hover .demo-launch-badge { background: var(--ink); }
.demo-launch-time { color: var(--muted); font: 500 var(--type-13)/1 var(--mono); font-variant-numeric: tabular-nums; }
.demo-launch-time::before { content: "·"; margin-right: .5em; font-family: var(--sans); }

.demo-transport { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-8) var(--space-16); border-top: 1px solid var(--line-soft); background: var(--white); }
.demo-control { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); cursor: pointer; }
.demo-control::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.demo-control:hover { background: color-mix(in srgb, var(--blue) 16%, var(--white)); }
.demo-control svg { width: 18px; height: 18px; }
.demo-seek { appearance: none; flex: 1; min-width: 0; height: 36px; margin: 0; background: linear-gradient(to right, var(--blue-dark) var(--progress, 0%), var(--muted) var(--progress, 0%)) center / 100% 2px no-repeat; cursor: pointer; }
.demo-seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--blue-dark); }
.demo-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--blue-dark); }
.demo-time { flex: 0 0 11ch; color: var(--muted); font: 500 var(--type-13)/1.2 var(--mono); font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
:is(.demo-launch, .demo-control, .demo-seek):focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }

.demo-pill { display: inline-flex; align-items: center; gap: 4px; justify-self: start; width: fit-content; min-height: 24px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--tint, var(--blue)) 13%, var(--white)); color: var(--tint-ink, var(--blue-dark)); font: 700 var(--type-13)/1.3 var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.demo-pill svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-pill.is-ok { --tint: var(--ok); --tint-ink: var(--demo-result-ink); }
.demo-pill.is-sea { --tint: var(--sea); --tint-ink: var(--sea); }
.demo-pill.is-bad { --tint: var(--sunset); --tint-ink: var(--demo-bad-ink); }

.demo-bar { display: block; width: var(--w, 100%); min-width: 4px; height: var(--demo-bar-h, 24px); border-radius: var(--radius-pill); background: var(--demo-gain); }
.demo-bar.is-start { width: 3px; min-width: 3px; background: var(--demo-start); }
.demo-bar.is-result { background: var(--demo-result); }
.demo-bar.is-bad { background: var(--demo-bad); }
.demo-bar.is-soft { background: color-mix(in srgb, var(--blue) 30%, var(--white)); }

.demo-end { display: grid; align-content: center; justify-items: center; gap: var(--space-8); text-align: center; }
.demo-end-figure { display: block; margin: 0; color: var(--demo-result-ink); font-size: var(--type-56); font-weight: 850; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-end-figure.is-flat { color: var(--ink); }
.demo-end-line { display: block; max-width: 30ch; margin: 0; color: var(--text-2); font-size: var(--type-17); font-weight: 650; line-height: 1.4; letter-spacing: 0; text-wrap: balance; }

.demo-opener { display: flex; align-items: flex-start; gap: .45em; max-width: 44ch; margin: 0; color: var(--ink); font: 700 var(--type-13)/1.35 var(--sans); letter-spacing: 0; text-align: start; text-transform: none; text-wrap: balance; }
.demo-opener > svg { flex: none; width: 1.1em; height: 1.1em; margin-top: .1em; color: var(--blue); fill: var(--blue); stroke: none; }
.demo-opener.is-centered { display: block; margin-inline: auto; text-align: center; }
.demo-opener.is-centered > svg { display: inline-block; margin: 0 .35em 0 0; vertical-align: -.15em; }
.demo-opener.is-title { display: grid; justify-items: center; align-content: center; gap: var(--space-8); max-width: 22ch; margin: auto; font-size: var(--type-24); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; text-align: center; pointer-events: none; }
.demo-opener.is-title > svg { width: .9em; height: .9em; margin: 0; }
@media (max-width: 600px) { .demo-opener.is-title { font-size: var(--type-20); } }
