/* Sapiens overload test, shared styles for #ot (test) and #otd (team view) */
#ot,#otd{--f2:"Twklausannepan 200","TWK Lausanne",system-ui,sans-serif;--f5:"Twklausannepan 500","TWK Lausanne",system-ui,sans-serif;--blue:#354e61;--lblue:#d5e4ed;--green:#1f5955;--lgreen:#cef0d1;--beige:#f5e6d0;--acg:#87e0a5;--acr:#ffa185;--ink:#000;--mut:rgba(0,0,0,.6);--line:rgba(53,78,97,.18);--tblue:#eef4f8;--tgreen:#ebf7ec;--tbeige:#faf2e7;font-family:var(--f2);font-weight:200;font-size:1rem;line-height:1.4;color:var(--ink);text-align:left}
#ot *,#otd *{box-sizing:border-box}
#ot h2,#ot h3,#ot p,#otd h2,#otd h3,#otd p{margin:0}
#ot .k,#otd .k{font-family:var(--f5);font-weight:500;font-size:1rem;line-height:1.25;letter-spacing:-.01em;text-transform:uppercase;margin-bottom:.5rem}
#ot .lead,#otd .lead{color:var(--mut);max-width:40rem;margin-bottom:1.25rem}
#ot .card,#otd .card{background:#fff;border-radius:20px;padding:2rem 1.5rem;margin-bottom:1rem}
#ot .c-blue,#otd .c-blue{background:var(--tblue)}#ot .c-green,#otd .c-green{background:var(--tgreen)}#ot .c-beige,#otd .c-beige{background:var(--tbeige)}
#ot .c-line,#otd .c-line{border:1px solid var(--line)}
#ot .btn,#otd .btn{display:inline-flex;align-items:center;justify-content:center;height:3rem;padding:0 1.75rem;border-radius:100px;border:1px solid var(--blue);background:var(--blue);color:#fff;font-family:var(--f5);font-weight:500;font-size:.95rem;cursor:pointer;text-decoration:none;line-height:1}
#ot .btn.ghost,#otd .btn.ghost{background:transparent;color:var(--blue)}
#ot .btn.small,#otd .btn.small{height:2.4rem;padding:0 1.1rem;font-size:.85rem}
#ot .btn:disabled{opacity:.5;cursor:default}
#ot .actions,#otd .actions{display:flex;gap:.75rem;align-items:center;flex-wrap:wrap;margin-top:1.25rem}
#ot .msg,#otd .msg{color:var(--mut);font-size:.85rem}
#ot .chip,#otd .chip{display:inline-flex;align-items:center;gap:.4rem;height:2rem;padding:0 .8rem;border:1px solid var(--line);border-radius:100px;background:#fff;font-family:var(--f5);font-weight:500;font-size:.8rem;color:var(--blue);white-space:nowrap}
#ot .chips{display:flex;gap:.5rem;flex-wrap:wrap}
#ot .tag,#otd .tag{display:inline-block;font-family:var(--f5);font-weight:500;font-size:.72rem;line-height:1.35;padding:.15rem .5rem;border-radius:100px;white-space:nowrap;color:var(--ink)}
#ot .hide,#otd .hide{display:none!important}
#ot .grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;margin-bottom:1rem}
#ot .grid2 .card{margin:0}
/* how it works */
#ot .how{list-style:none;margin:0;padding:0}
#ot .how li{display:grid;grid-template-columns:8.5rem 1fr;gap:1rem;align-items:center;padding:.9rem 0;border-bottom:1px solid var(--line)}
#ot .how li:last-child{border-bottom:0}
#ot .how .vis{display:flex;gap:6px;align-items:center}
#ot .dot{width:22px;height:22px;border-radius:50%;display:inline-block;box-shadow:inset 0 0 0 1px rgba(0,0,0,.12)}
#ot .pad-mini{display:inline-flex;align-items:center;justify-content:center;width:26px;height:34px;border-radius:9px;background:#0f1a22;color:var(--acg);font-family:var(--f5);font-size:.8rem}
#ot .scr-mini{position:relative;display:inline-block;width:64px;height:42px;border-radius:9px;background:#0f1a22}
#ot .scr-mini i{position:absolute;bottom:5px;width:18px;height:9px;border-radius:3px;background:#f4f6f8}
#ot .scr-mini .l{left:5px}#ot .scr-mini .r{right:5px}
#ot .lead a,#ot .note a{color:var(--blue);text-decoration:underline;text-underline-offset:2px}
#ot .how b{font-family:var(--f5);font-weight:500}
#ot .keys{font-size:.85rem;color:var(--mut);margin-top:.75rem}
#ot kbd{font-family:var(--f5);font-weight:500;font-size:.75rem;border:1px solid var(--line);border-radius:6px;padding:.05rem .35rem;background:#fff;color:var(--blue)}
/* result */
#ot .top{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
#ot .top .k{margin:0}
#ot .hero-n{font-family:var(--f2);font-weight:200;font-size:5.5rem;line-height:1;letter-spacing:-.03em;margin:.5rem 0 .25rem}
#ot .hero-l{font-size:1.05rem;color:var(--mut);margin-bottom:1.25rem}
#ot .stats{list-style:none;margin:0;padding:0}
#ot .stats li{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--line);font-size:.95rem}
#ot .stats li:last-child{border-bottom:0}
#ot .stats b{font-family:var(--f5);font-weight:500}
#ot .stats span{color:var(--mut)}
#ot .res{display:flex;gap:1.5rem 2.5rem;flex-wrap:wrap;align-items:center;justify-content:space-between}
#ot .res .hero-l{margin-bottom:0}
#ot .res-b{display:flex;align-items:center;gap:1.25rem;flex-wrap:wrap}
#ot svg.donut{width:160px;height:160px;display:block;font-family:var(--f5)}
#ot svg.donut .dn{font-size:24px;font-weight:500;fill:#000}
#ot svg.donut .dl{font-size:10.5px;font-weight:500;fill:rgba(0,0,0,.6)}
#ot .leg{list-style:none;margin:0;padding:0;min-width:10rem}
#ot .leg li{display:flex;align-items:center;gap:.5rem;padding:.35rem 0;font-size:.95rem}
#ot .leg li i{width:.7rem;height:.7rem;border-radius:50%;display:inline-block}
#ot .leg li span{color:var(--mut);flex:1}
#ot .leg li b{font-family:var(--f5);font-weight:500}
#ot .leg li.acc{border-top:1px solid var(--line);margin-top:.35rem;padding-top:.6rem}
#ot svg.chart,#otd svg.chart{display:block;width:100%;height:auto;overflow:visible;font-family:var(--f5)}
#ot .ax,#otd .ax{stroke:rgba(53,78,97,.18);stroke-width:1;fill:none}
#ot .tick{font-size:12px;fill:rgba(0,0,0,.6);font-weight:500}
#otd .tick{font-size:10px;fill:rgba(0,0,0,.6);font-weight:500}
#ot .cap{font-size:.85rem;color:var(--mut);margin-top:.5rem}
#ot .delta{font-family:var(--f5);font-weight:500;font-size:1.1rem;margin-top:.5rem}
#ot .note{font-size:.78rem;line-height:1.5;color:var(--mut);margin-top:1rem}
#ot .saved{display:inline-flex;align-items:center;gap:.4rem;font-size:.85rem;color:var(--mut)}
#ot .saved i{width:.55rem;height:.55rem;border-radius:50%;background:#c9c9c9;display:inline-block}
#ot .saved.ok i{background:var(--acg)}#ot .saved.bad i{background:var(--acr)}
/* ---------- test overlay (cockpit) ---------- */
#ot-stage{position:fixed;inset:0;z-index:2147483000;background:#0b1117;color:#fff;display:none;flex-direction:column;align-items:center;font-family:"Twklausannepan 500","TWK Lausanne",system-ui,sans-serif;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
#ot-stage.on{display:flex}
#ot-stage *{box-sizing:border-box}
#ot-stage .bar{width:100%;max-width:560px;display:flex;justify-content:space-between;align-items:center;padding:max(12px,env(safe-area-inset-top)) 16px 8px}
#ot-stage .time{font-size:1.35rem;letter-spacing:.02em;font-variant-numeric:tabular-nums;min-width:4ch}
#ot-stage .lbl{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;opacity:.55}
#ot-stage .quit{background:none;border:1px solid rgba(255,255,255,.25);color:#fff;border-radius:100px;height:2rem;padding:0 .9rem;font:inherit;font-size:.75rem;cursor:pointer}
#ot-stage .prog{width:100%;max-width:560px;height:3px;background:rgba(255,255,255,.1);margin:0 16px}
#ot-stage .prog i{display:block;height:3px;width:0;background:#fff}
#ot-stage .wheel{position:relative;width:calc(100% - 24px);max-width:536px;flex:1 1 44%;min-height:220px;margin:12px 0 10px;border-radius:28px;background:radial-gradient(120% 90% at 50% 40%,#16222c 0%,#0d151c 60%,#080d12 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),0 20px 60px rgba(0,0,0,.4);overflow:hidden}
#ot-stage .center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 60px}
#ot-stage .start-lights{display:flex;gap:10px;margin-bottom:18px}
#ot-stage .start-lights i{width:34px;height:34px;border-radius:50%;background:#1d2730;box-shadow:inset 0 0 0 2px #2a3640}
#ot-stage .start-lights i.on{background:#ff2d1f;box-shadow:0 0 18px #ff2d1f}
#ot-stage .flash-bad{animation:otbad .22s}
@keyframes otbad{0%{box-shadow:inset 0 0 0 3px #ffa185,0 20px 60px rgba(0,0,0,.4)}100%{box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),0 20px 60px rgba(0,0,0,.4)}}
#ot-stage .wheel{container-type:size}
#ot-stage .speed{position:absolute;top:14px;left:18px;right:18px;display:flex;align-items:center;gap:10px;z-index:2}
#ot-stage .speed span{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;opacity:.6}
#ot-stage .sb{position:relative;flex:1;height:10px;border-radius:5px;background:rgba(255,255,255,.08);overflow:hidden}
#ot-stage .sb i{position:absolute;inset:0;border-radius:5px;background:linear-gradient(90deg,#35d07f 0%,#f5c33b 55%,#ff4d3d 100%);clip-path:inset(0 100% 0 0);transition:clip-path .25s ease-out}
#ot-stage .lamp,#ot-stage .light{position:absolute;left:50%;top:44%;width:min(46vw,30vh,180px);height:min(46vw,30vh,180px);width:min(50cqw,44cqh,180px);height:min(50cqw,44cqh,180px);border-radius:50%}
#ot-stage .lamp{transform:translate(-50%,-50%);background:rgba(255,255,255,.03);box-shadow:inset 0 0 0 2px rgba(255,255,255,.07)}
#ot-stage .light{transform:translate(-50%,-50%) scale(.9);opacity:0;transition:opacity .05s,transform .08s}
#ot-stage .light.on{opacity:1;transform:translate(-50%,-50%) scale(1)}
#ot-stage .field{position:absolute;bottom:16px;width:30%;height:15%;max-height:64px;min-height:34px;border-radius:14px;background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);transition:background .05s,box-shadow .05s}
#ot-stage .field.l{left:16px}#ot-stage .field.r{right:16px}
#ot-stage .wheel.pre .lamp,#ot-stage .wheel.pre .field{opacity:0}
#ot-stage .field.on{background:#f4f6f8;box-shadow:0 0 30px rgba(255,255,255,.55)}
#ot-stage .say{font-size:1rem;opacity:.85;letter-spacing:.02em;max-width:16rem;line-height:1.35}
#ot-stage .say.go{font-size:2.6rem;opacity:1;letter-spacing:.06em;text-transform:uppercase}
#ot-stage .pad{width:calc(100% - 24px);max-width:536px;flex:1 1 34%;min-height:170px;max-height:300px;display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:1.15fr 1fr;gap:8px;margin-bottom:max(14px,env(safe-area-inset-bottom))}
#ot-stage .pad button{border:0;border-radius:18px;cursor:pointer;position:relative;font:inherit;touch-action:manipulation;transition:transform .06s,filter .06s}
#ot-stage .pad button:active,#ot-stage .pad button.hit{transform:scale(.96);filter:brightness(1.25)}
#ot-stage .pad .col{grid-column:span 2}
#ot-stage .pad .ped{grid-column:span 5;background:#1a252e;color:rgba(255,255,255,.85);font-size:.85rem;letter-spacing:.04em;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
#ot-stage .pad .pi{display:inline-block;width:26px;height:12px;border-radius:4px;background:#f4f6f8}
#ot-stage .pad .kh{position:absolute;right:8px;bottom:6px;font-size:.65rem;opacity:.5;color:#0b1117}
#ot-stage .pad .ped .kh{color:#fff}
#ot-stage .pad button.wrong{animation:otshake .22s}
#ot-stage.touch .kh{display:none}
@keyframes otshake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
/* ---------- team dashboard ---------- */
#otd .head{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
#otd .ttl{font-family:var(--f2);font-weight:200;font-size:2.4rem;line-height:1.1;letter-spacing:-.02em}
#otd .seg{display:inline-flex;border:1px solid var(--line);border-radius:100px;padding:3px;background:#fff}
#otd .seg button{border:0;background:transparent;height:2.2rem;padding:0 1rem;border-radius:100px;font-family:var(--f5);font-weight:500;font-size:.85rem;color:var(--blue);cursor:pointer}
#otd .seg button.on{background:var(--blue);color:#fff}
#otd .ctl{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
#otd .live{display:inline-flex;align-items:center;gap:.45rem;font-family:var(--f5);font-weight:500;font-size:.8rem;color:var(--blue)}
#otd .live i{width:.55rem;height:.55rem;border-radius:50%;background:var(--acg);box-shadow:0 0 0 0 rgba(135,224,165,.8);animation:otpulse 2s infinite}
#otd .live.off i{background:var(--acr);animation:none}
@keyframes otpulse{0%{box-shadow:0 0 0 0 rgba(135,224,165,.7)}70%{box-shadow:0 0 0 8px rgba(135,224,165,0)}100%{box-shadow:0 0 0 0 rgba(135,224,165,0)}}
#otd .main{display:grid;grid-template-columns:minmax(0,1fr) 20rem;gap:1rem;align-items:stretch}
#otd .main .card{margin:0}
#otd .tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1rem;margin-bottom:1rem}
#otd .tile{background:var(--tblue);border-radius:20px;padding:1.1rem 1.25rem}
#otd .tile .tl{font-size:.85rem;color:var(--mut)}
#otd .tile .tv{font-family:var(--f2);font-weight:200;font-size:2.6rem;line-height:1.05;letter-spacing:-.02em;margin-top:.2rem}
#otd .tile .ts{font-size:.8rem;color:var(--mut);margin-top:.1rem}
#otd .qr{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem}
#otd .qr .code{width:100%;max-width:15rem;aspect-ratio:1;background:#fff;border-radius:16px;padding:10px}
#otd .qr .code svg,#otd .qr .code img{width:100%;height:100%;display:block}
#otd .qr .url{font-family:var(--f5);font-weight:500;font-size:.9rem;color:var(--blue);word-break:break-all}
#otd .empty{display:flex;align-items:center;justify-content:center;min-height:22rem;color:var(--mut);text-align:center}
#otd .legend{display:flex;gap:1.25rem;flex-wrap:wrap;font-size:.85rem;color:var(--mut);margin-top:.75rem}
#otd .legend span{display:inline-flex;align-items:center;gap:.4rem}
#otd .legend i{width:.7rem;height:.7rem;border-radius:50%;display:inline-block}
#otd .dp circle{transition:cx .5s ease,cy .5s ease}
#otd .set{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
#otd .set input{height:2.4rem;border:1px solid var(--line);border-radius:100px;padding:0 .9rem;font-family:var(--f5);font-weight:500;font-size:.85rem;color:var(--blue);width:10rem}
@media (max-width:991px){#ot .grid2{grid-template-columns:minmax(0,1fr)}#otd .main{grid-template-columns:minmax(0,1fr)}#otd .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:767px){#ot .card,#otd .card{padding:1.5rem 1.15rem;border-radius:16px}#ot .how li{grid-template-columns:1fr;gap:.5rem}#ot .hero-n{font-size:4.5rem}}
#ot .ck{display:grid;grid-template-columns:minmax(0,21rem) minmax(0,1fr);gap:1.25rem 2.5rem;align-items:center;padding:.25rem 0 1.5rem;border-bottom:1px solid var(--line)}
#ot .ck svg{display:block;width:100%;height:auto}
#ot .ck svg text{font-family:var(--f5);font-weight:500}
#ot .ck ol{list-style:none;margin:0;padding:0}
#ot .ck li{display:flex;gap:.75rem;align-items:flex-start;padding:.5rem 0}
#ot .ck .n{flex:none;width:1.45rem;height:1.45rem;border-radius:50%;background:#fff;border:1.5px solid #0b1117;color:#0b1117;font-family:var(--f5);font-weight:500;font-size:.75rem;line-height:1;display:flex;align-items:center;justify-content:center;margin-top:.02rem}
#ot .ck b{font-family:var(--f5);font-weight:500}
@media (max-width:767px){#ot .ck{grid-template-columns:1fr;gap:1rem}#ot .ck svg{max-width:21rem}}
