/* Motion in a Straight Line: chapter-wide scene styles (the kit is assets/xp/xp.css).
   Art direction: a strobe in the dark room. One body, lit every few seconds; each flash leaves a ghost, so the whole
   history of the motion stays on screen, and the graphs draw themselves from it. Content palette (visuals only, never
   type): the pens of a chart recorder. */
:root {
  --xp-strobe: #fff3d6;  /* the strobe-lit body and its ghosts */
  --xp-x: #ffa22e;       /* position, displacement, distance, area under v-t (saffron pen) */
  --xp-v: #4c86ff;       /* velocity (cobalt pen) */
  --xp-a: #ff5c93;       /* acceleration, g (pink pen) */
  --xp-b: #3fe0c5;       /* the second train, the other observer */
  --xp-brake: #ff3b30;   /* brake lights: braking distance */
  --xp-react: #ffd23f;   /* amber: reaction distance */
}
/* the hero is a 2D canvas: no drag, page scroll passes through */
.xp-open .xp-canvas canvas, .xs-scrub .xp-canvas canvas { display: block; touch-action: pan-y; }
.p11-stage { position: absolute; inset: 0; }

/* x-t shape sparklines in spec cards (act 02) */
.p11-spark { display: block; width: 100%; max-width: 180px; height: auto; margin-bottom: 10px; }
.p11-spark .ax { fill: none; stroke: var(--mix-5, rgba(233,228,216,.35)); stroke-width: 1; }
.p11-spark .ln { fill: none; stroke: var(--xp-x); stroke-width: 2.2; stroke-linecap: round; }
.p11-spark .ln.faint { opacity: .35; }
@media (max-width: 899px) { .p11-shapes { grid-template-columns: 1fr 1fr; } .p11-shapes .xs-spec { padding: 14px 14px 10px; } }
/* a looping clip inside a section photo slot */
.p11-loopvid { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: #000; }
.p11-spec-d { margin: 6px 0 0 !important; font-size: var(--text-sm); line-height: 1.45; color: var(--mix-2); }

/* Rive pieces inside sections (pattern from the pilot's act 10): the frame fills its visual column, capped by height */
.xs g-rive .gr-stage { width: auto; margin-left: 0; }
.xs g-rive .gr-frame { width: min(100%, calc(56svh * var(--gr-ratio))); border-radius: 12px; }
@media (min-width: 900px) { .xs g-rive .gr-frame { width: min(100%, calc(76svh * var(--gr-ratio))); } }
.xs g-rive .gr-quiet > * { max-width: 1px; white-space: normal; overflow: hidden; }
g-rive .gr-quiet, g-rive .gr-quiet * { white-space: normal !important; max-width: 1px; }
.xs-vis > g-rive, .xs-vis g-rive { width: 100%; justify-self: stretch; }
/* closed drawers lay out nothing; smaller stats stay small on desktop */
.xp-body details:not([open]) > :not(summary) { display: none; }
.xs .xs-num.xs-num-s { font-size: clamp(2.6rem, 9vw, 5.5rem); }
.p11-spark .ln.b { stroke: var(--xp-b); }
@media (min-width: 900px) { .p11-shapes3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 899px) { .p11-shapes3 { grid-template-columns: 1fr; } .p11-shapes3 .xs-spec { display: grid; grid-template-columns: 110px 1fr; gap: 0 14px; align-items: center; } .p11-shapes3 .p11-spark { grid-row: span 2; margin: 0; } }
.p11-spark .ln.v { stroke: var(--xp-v); }
.p11-spark .fill { fill: color-mix(in srgb, var(--xp-x) 30%, transparent); stroke: none; }
