/* Insights interactive scenes. Loaded only on pages that carry an .ins-scene host.
   Tokens come from product/product.css (:root) and the group colour (--g) from insights.css. */
.ins-scene{position:relative;margin:0 auto;max-width:calc(var(--max,1180px) + 2*var(--gutter,24px));padding:0 var(--gutter,24px)}
.ins-scene>img,.ins-scene>picture,.ins-scene>figure{display:block;width:100%;height:auto}
.ins-scene>picture img{width:100%;height:auto;border-radius:16px;border:1px solid var(--line)}
/* Reserve the mounted height before mount (CLS). Between 701 and 1199px a mounted scene is 650-1300px tall while the
   16:9 poster is ~400-650px, and the runtime mounts within ~100ms of load, so the caption and the first paragraph,
   which are in view at tablet width, used to be pushed down (CLS 0.05-0.13 at 768). With the box reserved, any
   remaining growth happens below the fold. Only when scripts run (no-JS keeps the plain poster); dropped again
   when the scene falls back to its poster. <=700px uses the 4:5 mobile poster, which already reaches the fold. */
@media (scripting:enabled) and (min-width:701px) and (max-width:1199px){
  .ins-scene:not(.is-live):not([data-scene-state=fallback]){min-height:780px}
}

.scn{--scn-ink:var(--ink,#e8eef7);--scn-muted:var(--muted,#95a3b8);--scn-line:var(--line,rgba(160,185,220,.14));
  --scn-acc:var(--g,var(--accent,#9470f5));--scn-ok:var(--ok,#5fd6a4);--scn-risk:var(--risk,#ee7a5c);--scn-gold:var(--gold,#e2ae5e);--scn-cyan:var(--cyan,#58dcf8);
  position:relative;border:1px solid var(--scn-line);border-radius:16px;overflow:hidden;color:var(--scn-ink);
  background:radial-gradient(70% 80% at 80% 0%,var(--g-soft,rgba(148,112,245,.12)),transparent 70%),linear-gradient(160deg,#081226 0%,#040914 60%,#03070f 100%);
  box-shadow:0 40px 100px rgba(0,0,0,.45);font-size:15px;line-height:1.5}
.scn[hidden]{display:none!important}

/* Top bar: illustrative label + Play / Pause / Reset */
.scn-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;padding:12px 16px;border-bottom:1px solid var(--scn-line);background:rgba(3,7,15,.45)}
.scn-label{margin:0;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--scn-gold)}
.scn-ctls{display:flex;gap:6px}
.scn-btn{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:6px 12px;border:1px solid var(--scn-line);border-radius:999px;
  background:rgba(255,255,255,.03);color:var(--scn-ink);font-size:13px;line-height:1.2;cursor:pointer;transition:background .2s,border-color .2s}
.scn-btn:hover{background:rgba(255,255,255,.08);border-color:rgba(232,238,247,.3)}
.scn-btn[aria-pressed=true]{background:var(--scn-acc);border-color:var(--scn-acc);color:#03070f}
.scn-btn:focus-visible,.scn-choice:focus-visible,.scn-range:focus-visible,.scn-card:focus-visible{outline:2px solid var(--scn-gold);outline-offset:3px}
.scn-btn:disabled{opacity:.45;cursor:default}
.scn-btn--primary{background:var(--scn-ink);border-color:var(--scn-ink);color:#03070f;font-weight:550}
.scn-btn--primary:hover{background:#fff}
.scn-ico{width:10px;height:10px;display:inline-block;background:currentColor}
.scn-ico--play{clip-path:polygon(0 0,100% 50%,0 100%)}
.scn-ico--pause{clip-path:polygon(0 0,35% 0,35% 100%,0 100%,0 0,65% 0,100% 0,100% 100%,65% 100%,65% 0)}
.scn-ico--reset{border-radius:50%;background:none;border:2px solid currentColor;border-top-color:transparent;width:11px;height:11px}

/* Stage */
.scn-stage{padding:clamp(14px,2.4vw,28px)}
.scn-svg{display:block;width:100%;height:auto;max-height:440px;overflow:visible}
.scn-svg text{font-family:inherit}
.scn-head{margin:0 0 6px;font-size:clamp(17px,1.8vw,22px);font-weight:400;letter-spacing:-.01em;color:var(--scn-ink)}
.scn-sub{margin:0 0 14px;color:var(--scn-muted);font-size:14px}
.scn-status{margin:0;padding:12px 16px;border-top:1px solid var(--scn-line);font-size:14px;color:var(--body,#b8c3d4);min-height:1.5em;background:rgba(3,7,15,.35)}
.scn-note{margin:14px 0 0;font-size:12.5px;color:var(--scn-muted)}

/* Choice buttons (phases, toggles, actions) */
.scn-choices{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.scn-choice{min-height:40px;padding:8px 14px;border:1px solid var(--scn-line);border-radius:10px;background:rgba(255,255,255,.03);color:var(--scn-ink);font-size:14px;cursor:pointer;text-align:left;transition:background .2s,border-color .2s}
.scn-choice:hover{border-color:rgba(232,238,247,.3);background:rgba(255,255,255,.07)}
.scn-choice[aria-pressed=true]{border-color:var(--scn-acc);background:color-mix(in srgb,var(--scn-acc) 22%,transparent);box-shadow:inset 0 0 0 1px var(--scn-acc)}
.scn-choice small{display:block;color:var(--scn-muted);font-size:12px}

/* Sliders */
.scn-sliders{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px 20px;margin:16px 0}
.scn-slider{display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--scn-muted)}
.scn-slider strong{color:var(--scn-ink);font-weight:550;font-variant-numeric:tabular-nums}
.scn-range{width:100%;accent-color:var(--scn-acc);min-height:28px}

/* Readouts */
.scn-readout{display:flex;flex-wrap:wrap;gap:10px 28px;margin-top:14px;padding-top:14px;border-top:1px solid var(--scn-line);font-size:14px;color:var(--scn-muted)}
.scn-readout strong{color:var(--scn-ink);font-weight:550;font-variant-numeric:tabular-nums}
.scn-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0 0 14px}
.scn-kpi{padding:10px 12px;border:1px solid var(--scn-line);border-radius:10px;background:rgba(255,255,255,.025)}
.scn-kpi span{display:block;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--scn-muted)}
.scn-kpi strong{display:block;font-size:clamp(20px,2.2vw,28px);font-weight:400;font-variant-numeric:tabular-nums;color:var(--scn-ink)}
.scn-kpi.is-risk strong{color:var(--scn-risk)}
.scn-kpi.is-ok strong{color:var(--scn-ok)}

/* Cards (scene 05 risk cards, 07 workspaces, 02 reasons) */
.scn-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.scn-card{position:relative;padding:14px;border:1px solid var(--scn-line);border-radius:12px;background:rgba(255,255,255,.03);transition:border-color .3s,background .3s,opacity .3s}
.scn-card h4{margin:0 0 4px;font-size:15px;font-weight:550;color:var(--scn-ink)}
.scn-card p{margin:0 0 6px;font-size:13.5px;color:var(--scn-muted)}
.scn-card .scn-tag{display:inline-block;margin:0 6px 6px 0;padding:2px 8px;border-radius:999px;font-size:11px;letter-spacing:.06em;border:1px solid var(--scn-line);color:var(--scn-muted)}
.scn-card.is-risk{border-color:var(--scn-risk);background:rgba(238,122,92,.08)}
.scn-card.is-risk .scn-tag--state{color:var(--scn-risk);border-color:var(--scn-risk)}
.scn-card.is-ok{border-color:var(--scn-ok);background:rgba(95,214,164,.07)}
.scn-card.is-ok .scn-tag--state{color:var(--scn-ok);border-color:var(--scn-ok)}
.scn-card.is-dim{opacity:.55}
.scn-list{margin:0;padding:0;list-style:none;font-size:13.5px}
.scn-list li{padding:6px 0;border-bottom:1px solid var(--scn-line);display:flex;justify-content:space-between;gap:12px}
.scn-list li:last-child{border-bottom:0}
.scn-list b{font-weight:550;color:var(--scn-ink);font-variant-numeric:tabular-nums}

/* Two-column stage (visual + panel) collapses on small screens */
.scn-split{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:clamp(14px,2.4vw,28px);align-items:start}
@media (max-width:860px){.scn-split{grid-template-columns:1fr}}
@media (max-width:640px){
  .scn{border-radius:12px;font-size:14px}
  .scn-bar{padding:10px 12px}
  .scn-btn{padding:6px 10px}
  .scn-btn-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .scn-choice{flex:1 1 calc(50% - 8px)}
  .scn-sliders{grid-template-columns:1fr}
  .scn-svg{max-height:none}
  .scn-hide-sm{display:none}
}
@media (max-width:400px){.scn-choice{flex-basis:100%}}

/* SVG animation helpers */
.scn-svg .is-fade{transition:opacity .5s ease}
.scn-svg .is-move{transition:transform .6s ease}
@media (prefers-reduced-motion:reduce){
  .scn *,.scn *::before,.scn *::after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
.scn-list svg{display:inline-block;vertical-align:baseline}
ol.scn-grid{list-style:none;margin:0;padding:0}
