/* Brand OS Portal - explainer player v3 (shared standard for Library, Studio and Builder; rules: EXPLAINER-VIDEO-RULES.md)
   Product colour comes from data-xp-color on .xp: library (violet), studio (green), builder (the spectrum). */
.xp{position:relative;--xpc:#6B4FE0;--xpd:#5A3FD0;--xpt:#EFEBFF;--xpg:rgba(107,79,224,.28)}
.xp[data-xp-color=studio]{--xpc:#1E8C78;--xpd:#156B5C;--xpt:#EAF6F1;--xpg:rgba(30,140,120,.28)}
.xp[data-xp-color=builder]{--xpc:#7C3AED;--xpd:#6D28D9;--xpt:#F1ECFF;--xpg:rgba(124,58,237,.26);
 --xps:conic-gradient(from 200deg,#6B4FE0,#2F6FE4 28%,#1E8C78 56%,#F5B524 76%,#F97316 86%,#6B4FE0);
 --xpsl:linear-gradient(90deg,#6B4FE0,#2F6FE4 35%,#1E8C78 68%,#F5B524 88%,#F97316);--xpdd:linear-gradient(90deg,#5A3FD0,#2A62CC 35%,#156B5C 68%,#B45309)}
/* Builder = the spectrum (Vedran 18.11): ring, bars and lines in the full spectrum, white-on chips in the deep spectrum */
.xp[data-xp-color=builder] .xp-spot{box-shadow:0 0 26px 4px rgba(124,58,237,.22),0 0 44px 6px rgba(244,63,94,.12)}
.xp[data-xp-color=builder] .xp-spot::before{content:"";position:absolute;inset:-2px;border-radius:14px;padding:2px;background:var(--xps);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
.xp[data-xp-color=builder] .xp-bar i,.xp[data-xp-color=builder] .xp-line i{background:var(--xpsl)}
.xp[data-xp-color=builder] .xp-n,.xp[data-xp-color=builder] .xp-endk,.xp[data-xp-color=builder] .xp-snd[aria-pressed=true]{background:var(--xpdd)}
.xp[data-xp-color=builder] .xp-ch.on .xp-cn{background:var(--xpdd);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
/* fit: the whole player (window bar + video + chapters) always fits on screen under the site nav.
   Width follows the screen height: 16:10 video, bar 46 + chapters 62 + nav and breathing room 150 = 258 px reserved. */
.q-stagewrap:has(> .xp){width:min(100%,calc((100svh - 258px) * 1.6));margin-inline:auto}
@supports not (height:100svh){.q-stagewrap:has(> .xp){width:min(100%,calc((100vh - 258px) * 1.6))}}
.xp-v{position:relative;aspect-ratio:16/10;background:#0B0C0B;overflow:hidden;cursor:pointer;isolation:isolate}
.xp-cam{position:absolute;inset:0;transform-origin:0 0;transition:transform 1.25s cubic-bezier(.65,0,.25,1);will-change:transform}
.xp-cam video{display:block;width:100%;height:100%;object-fit:cover}
/* focus: a clean product-colour outline with a soft glow. The rest of the picture is never dimmed. */
.xp-spot{position:absolute;border-radius:12px;box-shadow:0 0 0 1.5px var(--xpc),0 0 0 5px var(--xpg),0 0 28px 4px var(--xpg);opacity:0;pointer-events:none;
 transition:left 1.25s cubic-bezier(.65,0,.25,1),top 1.25s cubic-bezier(.65,0,.25,1),width 1.25s cubic-bezier(.65,0,.25,1),height 1.25s cubic-bezier(.65,0,.25,1),opacity .6s}
.xp-spot.in{opacity:1}
/* guide card */
.xp-card{position:absolute;z-index:3;width:clamp(240px,30%,340px);padding:16px 18px 18px;border-radius:18px;
 background:rgba(255,255,255,.97);color:#0B0C0B;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
 box-shadow:0 30px 60px -24px rgba(0,0,0,.5),0 0 0 1px rgba(11,12,11,.06);
 opacity:0;transform:translateY(10px) scale(.98);transition:opacity .4s,transform .55s cubic-bezier(.2,.8,.2,1);pointer-events:none}
.xp-card.in{opacity:1;transform:none}
.xp-kick{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.xp-n{display:inline-grid;place-items:center;height:24px;padding:0 9px;border-radius:999px;background:var(--xpd);color:#fff;font-size:12px;font-weight:800;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.xp-of{font-size:12.5px;font-weight:600;color:#5F635C}
.xp-card b{display:block;font-size:19px;font-weight:800;line-height:1.22;letter-spacing:-.015em;text-wrap:balance;padding-bottom:1px}
.xp-card p{margin:6px 0 0;font-size:14px;line-height:1.45;color:#3D413A;text-wrap:pretty}
.xp-line{display:block;height:3px;margin-top:14px;border-radius:3px;background:var(--xpt);overflow:hidden}
.xp-line i{display:block;height:100%;background:var(--xpc);transform:scaleX(0);transform-origin:0 50%}
/* sound: top right of the window bar, never on the picture */
.xp-snd{all:unset;flex:none;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px 0 9px;border-radius:999px;margin-left:10px;
 background:#fff;color:#0B0C0B;font-size:12.5px;font-weight:700;box-shadow:inset 0 0 0 1px rgba(11,12,11,.14);cursor:pointer;transition:background .2s,color .2s;white-space:nowrap}
.xp-snd:hover{box-shadow:inset 0 0 0 1px rgba(11,12,11,.4)}.xp-snd svg{width:16px;height:16px}
.xp-snd[aria-pressed=true]{background:var(--xpd);color:#fff;box-shadow:none}
.xp-snd:focus-visible{outline:2px solid var(--xpc);outline-offset:3px}
.xp .lb-fbar .lb-live{margin-left:auto}
/* end card */
.xp-end{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:rgba(11,12,11,.55);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);animation:xpf .5s ease both;cursor:default}
.xp-end[hidden]{display:none}
@keyframes xpf{from{opacity:0}to{opacity:1}}
.xp-endc{text-align:center;color:#fff;padding:0 24px}
.xp-endk{display:inline-block;font-size:13px;font-weight:700;color:#fff;background:var(--xpd);padding:5px 12px;border-radius:999px;margin-bottom:14px}
.xp-endc b{display:block;font-size:clamp(22px,3.2vw,36px);font-weight:800;line-height:1.15;letter-spacing:-.02em;text-wrap:balance;max-width:16em;margin:0 auto;padding-bottom:2px}
.xp-endb{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:22px}
.xp-end .btn.b2{background:rgba(255,255,255,.12);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}
/* chapter rail */
.xp-foot{display:flex;align-items:center;gap:14px;padding:12px 16px 14px;background:#F3F3EE;border-top:1px solid rgba(11,12,11,.07)}
.xp-pp{all:unset;flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#0B0C0B;color:#fff;cursor:pointer}
.xp-pp svg{width:16px;height:16px;fill:currentColor}.xp-pp .pl{display:none}.xp.paused .xp-pp .pa{display:none}.xp.paused .xp-pp .pl{display:block}
.xp-pp:focus-visible,.xp-ch:focus-visible{outline:2px solid var(--xpc);outline-offset:3px}
.xp-rail{flex:1;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:10px;min-width:0}
.xp-ch{all:unset;cursor:pointer;display:grid;grid-template-columns:auto 1fr;column-gap:7px;row-gap:8px;min-width:0;border-radius:8px}
.xp-bar{grid-column:1/-1;height:3px;border-radius:3px;background:rgba(11,12,11,.12);overflow:hidden}
.xp-bar i{display:block;height:100%;background:var(--xpc);transform:scaleX(0);transform-origin:0 50%}
.xp-ch.done .xp-bar i{transform:scaleX(1)!important}
.xp-cn{font-size:12px;font-weight:800;color:#5F635C;font-variant-numeric:tabular-nums}
.xp-ct{font-size:12.5px;font-weight:600;color:#5F635C;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xp-ch.on .xp-cn{color:var(--xpd)}.xp-ch.on .xp-ct,.xp-ch:hover .xp-ct{color:#0B0C0B}
@media (max-width:700px){
 /* phones: the guide sits under the picture as a caption strip, so it never covers the action */
 .xp-card.xp-below{position:relative;left:auto!important;top:auto!important;width:auto;min-height:118px;margin:0;padding:14px 16px 14px;border-radius:0;background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;border-top:1px solid rgba(11,12,11,.07);transform:none;opacity:1;transition:none}
 .xp-card.xp-below:not(.in) b,.xp-card.xp-below:not(.in) p{opacity:0}
 .xp-card.xp-below b,.xp-card.xp-below p{transition:opacity .25s}
 .xp-kick{margin-bottom:6px}.xp-n{height:21px;padding:0 8px;font-size:11.5px}.xp-of{font-size:12px}
 .xp-card b{font-size:16px}.xp-card p{font-size:13.5px;margin-top:4px}.xp-line{margin-top:10px}
 .xp-snd{height:28px;padding:0 9px;margin-left:auto}.xp-snd span{display:none}.xp-foot{gap:10px;padding:10px 12px 12px}
 .xp-ct{display:none}.xp-rail{gap:6px}.xp-ch{grid-template-columns:1fr;justify-items:center}
 .xp-endb .btn{font-size:14px}
 /* end card fits the small phone frame: smaller kicker and title, buttons side by side */
 .xp-endk{font-size:11.5px;padding:4px 10px;margin-bottom:8px}.xp-endc b{font-size:19px;line-height:1.18}
 .xp-endb{margin-top:12px;gap:8px;flex-wrap:nowrap}.xp-endb .btn{font-size:13px;height:38px;padding:0 13px;white-space:nowrap}
}
/* compact player (under 780 px wide, e.g. a 1026x620 laptop window): small card with the title only, so it never covers the action;
   the active chapter widens to show its full name, the others show their number */
.xp.xp-sm .xp-card:not(.xp-below){width:clamp(170px,32%,230px);padding:10px 12px 12px;border-radius:14px}
.xp.xp-sm .xp-card:not(.xp-below) p{display:none}
.xp.xp-sm .xp-card:not(.xp-below) b{font-size:14.5px;line-height:1.25}
.xp.xp-sm .xp-card:not(.xp-below) .xp-kick{margin-bottom:6px}
.xp.xp-sm .xp-card:not(.xp-below) .xp-n{height:20px;padding:0 8px;font-size:11px}
.xp.xp-sm .xp-card:not(.xp-below) .xp-line{margin-top:8px}
.xp.xp-sm .xp-rail{display:flex;gap:8px}.xp.xp-sm .xp-ch{flex:1 1 0;transition:flex-grow .4s}.xp.xp-sm .xp-ch.on{flex-grow:3.2}
.xp.xp-sm .xp-ch:not(.on) .xp-ct{display:none}
@media (prefers-reduced-motion:reduce){.xp-card,.xp-spot,.xp-cam{transition:none}}

/* phones (24.11.2026): portrait 4:5 stage, the camera in xp.js frames the action at readable size */
@media (max-width:699px){.xp-v{aspect-ratio:4/5}.xp-v>.xp-cam{inset:auto;left:0;top:0}}
