/* The demo page: the landing page's ledger (landing.css), driven by a recording instead of a script.
   One chart carries the story: the objective against its limit, drawn as far as the playhead. */

.demo-intro h1 { text-wrap: balance; }
.player { margin-bottom: 64px; }
.player .ledger-head h2 { font-weight: 500; }

/* -------------------------------------------------------------------- chart */
.chart { margin: 0; padding: 12px 16px 4px; border-top: 1px solid var(--line); }
.chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; color: var(--fg); }
.plot { position: relative; height: 132px; margin: 12px 0 6px; cursor: pointer; touch-action: pan-y; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.peak { position: absolute; top: 0; margin-left: 8px; font: 400 12px/16px var(--mono); color: var(--fg-2); white-space: nowrap; pointer-events: none; }
.plot .band { fill: var(--fill); }
.plot .limit { stroke: var(--fg-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.plot .ahead, .plot .line { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plot .ahead { stroke: var(--line); }
.plot .line { stroke: var(--fg); }
.limit-label { position: absolute; right: 0; margin-bottom: 3px; padding: 0 0 0 6px; font: 400 12px/16px var(--mono); color: var(--fg-2); pointer-events: none; }
.marks i { position: absolute; bottom: -6px; width: 1px; height: 6px; background: var(--fg); }
.playhead { display: none; position: absolute; top: -4px; bottom: -6px; left: 100%; width: 1px; background: var(--fg); pointer-events: none; }
.js .playhead { display: block; }
.chart-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 8px; }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-mark { width: 1px; height: 8px; background: var(--fg); }
.key-band { width: 12px; height: 8px; background: var(--fill); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- transport */
/* Without JavaScript there is nothing to play: the page is the finished run. */
.transport { display: none; align-items: center; gap: 12px; padding: 8px 16px 12px; }
.js .transport { display: flex; }
.transport .btn { min-width: 72px; }
.transport .clock { font-size: 12px; line-height: 16px; color: var(--fg-2); white-space: nowrap; }
.transport .speed { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.transport select { height: 28px; padding: 0 8px; font-size: 12px; }
.scrub { flex: 1; min-width: 0; height: 28px; margin: 0; background: none; accent-color: var(--fg); cursor: pointer; }

/* ------------------------------------------------------------------- gauges */
.player .gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.player .gauge .reading .faint { display: block; }
.gauge .state { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--fg-2); }
.gauge .state [data-status] { font-weight: 500; color: var(--fg); }
@media (max-width: 600px) {
  .player .gauges { grid-template-columns: minmax(0, 1fr); }
  .player .gauge + .gauge { border-left: 0; border-top: 1px solid var(--line); }
  .transport { flex-wrap: wrap; }
  .scrub { order: 3; flex-basis: 100%; }
}

/* ------------------------------------------------------------------- ledger */
/* Unlike the landing page's, this ledger can be scrolled back through. */
.player .ledger-view { height: 456px; overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
.player .delta { white-space: normal; height: auto; min-height: 24px; padding: 3px 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.ledger .gate { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--fg-2); }
.ledger .gate .icon { width: 14px; height: 14px; }
.ledger .ask-state { margin-top: 8px; font-size: 12px; line-height: 16px; font-weight: 500; }

/* -------------------------------------------------------------------- notes */
.demo-notes { padding: 48px 0; border-top: 1px solid var(--line); }
.demo-notes:last-child { padding-bottom: 0; }
.beats { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.beats li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.beats .seek { font: 400 12px/20px var(--mono); color: var(--fg-2); text-align: left; }
html:not(.js) .beats .seek { visibility: hidden; }
.about { margin: 16px 0 32px; }
.about > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; padding: 10px 0; }
.about dd { text-align: left; font-size: 14px; line-height: 20px; color: var(--fg-2); }
@media (max-width: 480px) { .about > div { grid-template-columns: minmax(0, 1fr); } }
