/* cine.css — stage, palette and type for the "constellation" look (constellation-viz skill).
   Everything is scoped to .anim-frame.cine, so it can sit next to any site stylesheet.
   The stage is dark on purpose in light and dark pages alike: the glow needs a dark ground.

   To re-brand, change the --c-* values. Keep the roles: one warm primary (gold), one cool
   secondary (teal), one focus colour (violet), one category colour (rose), plus good / bad
   (mint / red). Ink colours must keep >= 4.5:1 contrast against --c-bg1. */
.anim-frame.cine{
  --c-bg0:#04080a; --c-bg1:#0a1a1e; --c-bg2:#12343a;
  --c-ink:#eef5f5; --c-ink-soft:#a3babd; --c-ink-faint:#6a8387;
  --c-line:rgba(170,215,222,.2); --c-glass:rgba(13,27,31,.8);
  --c-teal:#3fd3d6; --c-blue:#5db9ff; --c-gold:#f2c987; --c-violet:#a88cf5; --c-rose:#f27f9f; --c-mint:#6fe2b3; --c-red:#ff7565;
  --c-sans:var(--sans, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif);
  --c-mono:var(--mono, "JetBrains Mono", "SF Mono", Consolas, monospace);
  /* if the host site has its own tokens, remap them so token-driven SVG and chrome go dark too */
  --paper:#0a1518; --paper-2:#0c1a1e; --ink:var(--c-ink); --ink-soft:var(--c-ink-soft); --ink-faint:var(--c-ink-faint);
  --line:#1b2f34; --line-strong:#2f4a50; --accent:var(--c-teal); --accent-soft:rgba(63,211,214,.14); --accent-ink:#a9eef0;
  --warn:var(--c-red); --warn-soft:rgba(255,117,101,.14); --ok:var(--c-mint); --ok-soft:rgba(111,226,179,.12);
  --med:var(--c-gold); --focus:var(--c-teal);

  position:relative; max-width:100%; margin:2rem 0; overflow:hidden;
  border:1px solid #1b2f34; border-radius:16px; background:var(--c-bg0); color:var(--c-ink); color-scheme:dark;
  font-family:var(--c-sans);
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
}
.anim-frame.cine .anim-stage{display:block; padding:1rem; overflow-x:auto;
  background:radial-gradient(120% 95% at 50% 42%, var(--c-bg2) 0%, var(--c-bg1) 46%, var(--c-bg0) 100%)}
.anim-frame.cine .anim-stage svg{width:100%; height:auto; display:block}

/* caption, replay, step label and scrubber that anim.js injects */
.anim-frame.cine figcaption{display:flex; justify-content:space-between; align-items:center; gap:.75rem; flex-wrap:wrap;
  padding:.75rem 1rem; border-top:1px solid #1b2f34; background:#0c1a1e; font-size:.84rem; color:var(--c-ink-soft)}
.anim-frame.cine .anim-caption b{color:var(--c-ink)}
.anim-frame.cine .anim-controls{display:flex; align-items:center; gap:.4rem; margin-left:auto}
.anim-frame.cine .anim-btn{display:inline-flex; align-items:center; gap:.3rem; min-height:36px; padding:.35rem .6rem;
  font:500 .8rem var(--c-sans); color:var(--c-ink); background:transparent; border:1px solid #2f4a50; border-radius:6px; cursor:pointer}
.anim-frame.cine .anim-btn:hover{background:#0a1518}
.anim-frame.cine .anim-speed{min-height:36px; padding:.3rem .45rem; font:500 .8rem var(--c-sans); color:var(--c-ink); background:transparent; border:1px solid #2f4a50; border-radius:6px; cursor:pointer}
.anim-frame.cine .anim-speed option{color:#111; background:#fff}
.anim-frame.cine .anim-pause{min-width:5.2rem; justify-content:center}
.anim-frame.cine .anim-step{font:400 .72rem var(--c-mono); color:var(--c-ink-faint)}
.anim-frame.cine .anim-scrub-wrap{padding:0 1rem .75rem; background:#0c1a1e}
.anim-frame.cine .anim-scrub-wrap label{display:block; font:400 .72rem var(--c-mono); color:var(--c-ink-faint); margin-bottom:.2rem}
.anim-frame.cine .anim-scrub{width:100%; accent-color:var(--c-teal); margin:0; display:block}
.anim-frame.cine[data-reduced] .anim-replay{display:none}
.anim-frame.cine .visually-hidden{position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}

/* type scale, in SVG user units (tuned for a viewBox about 900 wide shown about 900px wide).
   These classes set fill and size in CSS, which outranks SVG presentation attributes:
   override per element with el.style.fill / el.style.fontSize, not setAttribute. */
.cine-svg text{font-family:var(--c-sans)}
.cine-svg .ch{font-size:13.5px; font-weight:600; fill:var(--c-ink); letter-spacing:.01em}  /* heading */
.cine-svg .ct{font-size:11px; font-weight:500; fill:var(--c-ink)}                           /* label */
.cine-svg .cs{font-size:9.6px; fill:var(--c-ink-soft)}                                      /* secondary */
.cine-svg .cn{font-size:17px; font-weight:600; fill:var(--c-ink)}                           /* big number */
.cine-svg .ck{font-size:8.4px; font-weight:600; letter-spacing:.09em; fill:var(--c-ink-faint)} /* CAPS TAG */

/* hover-to-focus: put .cine-hover on a wrapper <g>, toggle .cine-dim on the others */
.cine-svg .cine-hover{transition:opacity 150ms cubic-bezier(.2,.7,.2,1)}
.cine-svg .cine-dim{opacity:.2 !important}
.cine-svg [role="button"]:focus{outline:none}
.cine-svg [role="button"]:focus-visible rect:nth-of-type(2){stroke:var(--c-teal); stroke-width:2}

.cine-star{animation:cine-twinkle 4.5s ease-in-out infinite alternate}
@keyframes cine-twinkle{from{opacity:.12} to{opacity:.7}}
@media (prefers-reduced-motion:reduce){ .cine-amb{display:none} .cine-star{animation:none; opacity:.4} }
html[data-motion="reduce"] .cine-amb{display:none}
