/* FINMODEL / Immersive 3D demo V8 — one visual system, no nested browser boxes. */
#demo.hx3{--hx-ink:#183460;--hx-blue:#4c6bf0;--hx-teal:#15afbd;--hx-line:#dce6f6;--hx-soft:#eff4ff;position:relative;max-width:1220px;margin:46px auto 24px;font-family:Inter,Manrope,system-ui,sans-serif;color:var(--hx-ink);width:100%;isolation:isolate}
#demo.hx3 *{box-sizing:border-box}#demo.hx3 button{font:inherit;cursor:pointer}#demo.hx3 button:focus-visible{outline:2px solid #4b69f6;outline-offset:3px}
#demo .hx-topline{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 2px 14px}
#demo .hx-top-label{display:flex;align-items:center;gap:9px;font-size:11px;letter-spacing:.065em;color:#3d5e98}
#demo .hx-top-label b{font-weight:900}#demo .hx-top-label small{font-size:11px;letter-spacing:0;color:#8799b6;font-weight:600}
#demo .hx-live{height:8px;width:8px;border-radius:50%;background:#13bbae;box-shadow:0 0 0 5px #13bbae1c,0 0 16px #13bbae80}
#demo .hx-time{color:#8b9cba;font-size:9px;font-weight:900;letter-spacing:.1em}
#demo .hx-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-bottom:1px solid #d7e2f4;gap:3px;margin-bottom:14px}
#demo .hx-steps button{background:none;border:0;border-bottom:3px solid transparent;padding:10px 4px 12px;display:flex;align-items:center;justify-content:center;gap:8px;color:#7b8eab;font-size:11px;font-weight:800;white-space:nowrap;transition:color .25s,border-color .3s}
#demo .hx-steps button span{font:850 10px ui-monospace,Consolas,monospace;color:#a0b1ce}
#demo[data-phase=dialogue] [data-hxstep=dialogue],#demo[data-phase=llm] [data-hxstep=llm],#demo[data-phase=engine] [data-hxstep=engine],#demo[data-phase=blocks] [data-hxstep=blocks],#demo[data-phase=complete] [data-hxstep=complete]{color:#335bd6;border-bottom-color:#4c69ed}
#demo .hx-world{height:590px;position:relative;overflow:hidden;border:1px solid #d3e0f4;border-radius:22px;background:radial-gradient(ellipse at 54% 35%,#f0f5ff 0,#f9fbff 48%,#ffffff 100%);box-shadow:0 26px 80px #335f981a,0 2px 8px #4566a00a;perspective:1100px;perspective-origin:50% 48%;transform-style:preserve-3d}
#demo .hx-world-grid{position:absolute;inset:0;background-image:linear-gradient(90deg,#89adf512 1px,transparent 1px),linear-gradient(#89adf512 1px,transparent 1px);background-size:33px 33px;transform:rotateX(63deg) scale(1.5);transform-origin:50% 60%;mask-image:linear-gradient(to bottom,transparent 4%,#000 74%,transparent);opacity:.55}
#demo .hx-nebula{position:absolute;width:410px;height:410px;border-radius:50%;filter:blur(54px);pointer-events:none;opacity:.58;animation:hxBreathe 6s ease-in-out infinite alternate}
#demo .hx-nebula-one{left:12%;top:17%;background:#c9d7ff83}#demo .hx-nebula-two{right:8%;bottom:4%;background:#a9eef235;animation-delay:1.5s}
#demo .hx-depth{position:absolute;inset:0;transform-style:preserve-3d;pointer-events:none;opacity:.52}
#demo .hx-depth-ring{position:absolute;width:440px;height:440px;left:calc(50% - 220px);top:calc(50% - 220px);border:1px solid #8aa8f742;border-radius:50%;transform-style:preserve-3d;animation:hxRing 17s linear infinite}
#demo .hx-depth-ring.r1{transform:rotateX(65deg) rotateZ(15deg);box-shadow:0 0 25px #5c82f01b inset}#demo .hx-depth-ring.r2{width:360px;height:360px;left:calc(50% - 180px);top:calc(50% - 180px);border-style:dashed;animation-direction:reverse;animation-duration:21s}#demo .hx-depth-ring.r3{width:550px;height:550px;left:calc(50% - 275px);top:calc(50% - 275px);opacity:.3;animation-duration:30s}
#demo .hx-particle{position:absolute;left:var(--x);top:var(--y);width:3px;height:3px;background:#7899ff;border-radius:50%;box-shadow:0 0 12px #7597ff;transform:translateZ(var(--z));animation:hxParticle 3s ease-in-out var(--delay) infinite alternate}
#demo .hx-conduits{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;opacity:0;transition:opacity .7s}
#demo[data-phase=llm] .hx-conduits,#demo[data-phase=engine] .hx-conduits{opacity:.5}
#demo .hx-conduits path{fill:none;stroke:url(#hxbeam);stroke-width:2.5;stroke-dasharray:8 14;animation:hxDash 1.1s linear infinite}
#demo .hx-conduits .hx-packet{fill:#527cfb;filter:drop-shadow(0 0 7px #527cfb)}#demo .hx-conduits .hx-packet.p2{fill:#10bbba}
#demo .hx-scene{position:absolute;inset:0;padding:25px 33px 20px;display:flex;flex-direction:column;z-index:3;opacity:0;visibility:hidden;pointer-events:none;transform:translateZ(-150px) scale(.88) translateY(18px);filter:blur(14px);transition:opacity .65s,transform .85s cubic-bezier(.18,.82,.2,1),filter .65s,visibility 0s .65s}
#demo[data-phase=dialogue] .hx-dialogue,#demo[data-phase=llm] .hx-llm,#demo[data-phase=engine] .hx-engine,#demo[data-phase=blocks] .hx-blocks,#demo[data-phase=complete] .hx-complete{opacity:1;visibility:visible;pointer-events:auto;transform:translateZ(0) scale(1) translateY(0);filter:blur(0);transition-delay:0s}
#demo .hx-scene-title{flex:none;max-width:100%;margin-bottom:17px;z-index:7}
#demo .hx-scene-title>span{color:#6481c0;letter-spacing:.145em;font-size:10px;font-weight:900}
#demo .hx-scene-title h3{font-size:clamp(21px,2.25vw,30px);line-height:1.14;letter-spacing:-.042em;margin:6px 0 5px;font-weight:850;color:#142f61}
#demo .hx-scene-title p{font-size:12px;line-height:1.5;color:#7085a7;margin:0}
/* Dialogue: no triple nesting. Two regions in same spatial plane. */
#demo .hx-dialogue{display:grid;grid-template-columns:1.08fr .88fr;grid-template-rows:auto minmax(0,1fr);column-gap:56px}
#demo .hx-dialogue .hx-scene-title{grid-column:1 / -1}
#demo .hx-chat-panel{position:relative;align-self:stretch;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:0 5px 0 0}
#demo .hx-chat-top{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:8px;color:#274a9a}
#demo .hx-chat-avatar{height:24px;width:24px;display:grid;place-items:center;border-radius:9px;color:white;background:linear-gradient(140deg,#536bf2,#9a79ff);box-shadow:0 5px 16px #4f72ff45}
#demo .hx-chat-top i{font-style:normal;margin-left:auto;font-size:10px;color:#139c92}
#demo .hx-chat-init{background:linear-gradient(105deg,#edf2ff,#f9faff);border-left:3px solid #7896f2;padding:8px 12px;font-size:11px;color:#415b88;border-radius:5px;margin:0 0 11px}
#demo .hx-turn{position:absolute;left:2px;right:10px;top:80px;opacity:0;filter:blur(9px);transform:translateY(28px) rotateX(-10deg) scale(.95);transform-origin:center;transition:opacity .6s,transform .8s cubic-bezier(.2,.8,.2,1),filter .6s;pointer-events:none}
#demo[data-dialog-step="1"] .hx-turn[data-turn="1"],#demo[data-dialog-step="2"] .hx-turn[data-turn="2"],#demo[data-dialog-step="3"] .hx-turn[data-turn="3"],#demo[data-dialog-step="4"] .hx-turn[data-turn="4"],#demo[data-dialog-step="5"] .hx-turn[data-turn="4"]{opacity:1;filter:none;transform:none}
#demo .hx-question{display:flex;gap:12px;align-items:center;margin-bottom:13px}
#demo .hx-ai-mark{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:13px;color:#5b72ee;background:#edf2ff;font-size:23px}
#demo .hx-question small{font-size:10px;color:#7a8eaf;display:block;margin-bottom:4px}
#demo .hx-question strong{font-size:clamp(15px,1.6vw,20px);line-height:1.22;letter-spacing:-.025em;display:block;color:#193c78}
#demo .hx-hint{font-size:11px;color:#5373b4;padding:10px 13px;border:1px solid #d3e1ff;border-radius:9px;background:#f1f5ff;margin:0 14px 17px 47px;box-shadow:0 5px 18px #416ee10b}
#demo .hx-hint span{display:inline-block;margin-right:7px;font-size:9px;font-weight:900;color:#3e65cf;letter-spacing:.06em}
#demo .hx-answer{font-size:clamp(12px,1.08vw,14px);font-weight:740;color:#1a4e90;background:#e7f0ff;border-radius:13px 13px 4px 13px;padding:13px 16px;margin-left:48px;box-shadow:0 9px 22px #5e8bfa19;opacity:0;transform:translateY(14px) scale(.97);transition:opacity .5s .3s,transform .5s .3s}
#demo .hx-answer small{display:block;font-size:9px;color:#6782b9;font-weight:800;margin-bottom:4px}
#demo .hx-answer b{color:#11a599;margin-left:6px}
#demo[data-phase=dialogue] .hx-turn:not([data-turn="5"]) .hx-answer{opacity:1;transform:none}
#demo .hx-chat-type{position:absolute;bottom:6px;left:47px;display:flex;align-items:center;gap:5px;font-size:10px;color:#8aa0bd}
#demo .hx-chat-type>span{height:5px;width:5px;border-radius:50%;background:#7899e9;animation:hxDots .9s ease-in-out infinite alternate}#demo .hx-chat-type>span:nth-child(2){animation-delay:.2s}#demo .hx-chat-type>span:nth-child(3){animation-delay:.4s}#demo .hx-chat-type small{margin-left:6px}
#demo .hx-extract{align-self:stretch;position:relative;min-width:0;display:flex;flex-direction:column;gap:9px;padding:0 0 0 22px;border-left:1px dashed #c6d8fc;transform:translateZ(45px)}
#demo .hx-extract-head{margin-bottom:3px}#demo .hx-extract-head span{display:block;font-size:10px;color:#7090bd;font-weight:850;letter-spacing:.1em}#demo .hx-extract-head b{display:block;font-size:15px;letter-spacing:-.025em;margin-top:5px}
#demo .hx-receipt{display:flex;align-items:center;gap:10px;background:#ffffffd9;border:1px solid #dce6f6;box-shadow:0 9px 26px #4467a30c;border-radius:11px;padding:11px 13px;opacity:.18;filter:grayscale(.9);transform:translateX(20px) rotateY(-15deg);transition:opacity .5s,transform .7s cubic-bezier(.2,.8,.2,1),filter .5s}
#demo[data-dialog-step="1"] .hx-receipt[data-answer="1"],#demo[data-dialog-step="2"] .hx-receipt:nth-child(-n+3),#demo[data-dialog-step="3"] .hx-receipt:nth-child(-n+4),#demo[data-dialog-step="4"] .hx-receipt:nth-child(-n+5),#demo[data-dialog-step="5"] .hx-receipt{opacity:1;filter:none;transform:none}
#demo .hx-receipt-n{font:800 10px ui-monospace,Consolas,monospace;color:#8aa2d7}
#demo .hx-receipt div{flex:1;min-width:0}#demo .hx-receipt small{display:block;color:#8095b8;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#demo .hx-receipt strong{display:block;color:#2953a3;font-size:12px;margin-top:4px}#demo .hx-receipt i{font-size:13px;color:#14a79c;font-style:normal}
#demo .hx-extract-footer{display:flex;align-items:center;gap:9px;margin-top:auto;padding:8px 0;color:#6983b2;font-size:11px}
#demo .hx-verified{font-size:20px;color:#5692fa}
/* LLM spatial scene */
#demo .hx-analysis-stage{position:relative;display:grid;grid-template-columns:1fr 1.08fr 1.08fr;gap:20px;flex:1;min-height:0;align-items:center;transform-style:preserve-3d}
#demo .hx-subcap{font-size:10px;font-weight:900;letter-spacing:.11em;color:#7190c0;margin-bottom:13px}
#demo .hx-facts,#demo .hx-structures{z-index:5;min-width:0}
#demo .hx-facts>span{display:block;width:fit-content;margin:6px 0;padding:8px 13px;border-radius:8px;background:#ffffffee;border:1px solid #dce7fa;box-shadow:0 5px 14px #5d80af0b;color:#42639d;font-size:12px;font-weight:750;opacity:0;transform:translateX(-45px) translateZ(-50px);transition:opacity .5s,transform .7s}
#demo[data-phase=llm] .hx-facts>span{opacity:1;transform:none;transition-delay:calc(var(--i)*.12s)}
#demo .hx-core-space{position:relative;transform-style:preserve-3d;height:330px;display:grid;place-items:center}
#demo .hx-orbit{position:absolute;width:225px;height:225px;border-radius:50%;border:2px solid #6188ef55;box-shadow:0 0 28px #688bff30,0 0 30px #a9bfff2d inset;transform:rotateX(68deg) rotateZ(-26deg);animation:hxOrbit 8s linear infinite}
#demo .hx-orbit.inner{width:170px;height:170px;transform:rotateY(65deg) rotateZ(25deg);border-color:#33c0d165;animation-duration:5s;animation-direction:reverse}
#demo .hx-core-shaft{position:absolute;width:270px;height:270px;border-radius:50%;background:radial-gradient(circle,#78a0fe26,transparent 68%);filter:blur(15px)}
#demo .hx-core{position:relative;z-index:4;width:136px;height:136px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;background:radial-gradient(circle at 31% 20%,#ffffff,#cbdcfe 55%,#7e9fec 100%);box-shadow:0 20px 40px #426deb55,0 0 0 8px #e5edffad,0 0 70px #6b8aff44;color:#2550a4;transform:translateZ(55px);animation:hxCorePulse 3s ease-in-out infinite alternate}
#demo .hx-core span{font-size:32px;color:#4669e4;line-height:1}#demo .hx-core b{font-size:22px;letter-spacing:-.06em}#demo .hx-core small{font-size:10px;color:#6780b0}
#demo .hx-methodology{position:absolute;bottom:1px;left:4%;right:4%;text-align:center;padding:11px 13px;border-radius:10px;border:1px solid #cfdcf5;background:#fffffff2;box-shadow:0 9px 26px #3a65ac18;font-size:9px;color:#8297ba;letter-spacing:.09em;font-weight:850}
#demo .hx-methodology b{display:block;color:#375cb6;font-size:14px;letter-spacing:-.02em;margin:3px}#demo .hx-methodology small{display:block;font-size:9px;letter-spacing:0;font-weight:600}
#demo .hx-structure-item{display:flex;align-items:center;gap:10px;border:1px solid #d7e5f8;background:#fff;border-radius:10px;margin-bottom:9px;padding:10px 12px;opacity:0;transform:translate3d(55px,8px,-60px) rotateY(20deg);transition:opacity .55s,transform .75s cubic-bezier(.2,.8,.2,1)}
#demo[data-phase=llm] .hx-structure-item{opacity:1;transform:none;transition-delay:calc(.3s + var(--i)*.22s)}
#demo .hx-structure-item>span{font:800 10px ui-monospace,Consolas,monospace;color:#6d88c4}
#demo .hx-structure-item div{flex:1}#demo .hx-structure-item strong{display:block;font-size:13px;color:#2e53aa}#demo .hx-structure-item small{display:block;font-size:10px;color:#7c92b0;margin-top:3px}#demo .hx-structure-item i{color:#17aaa4;font-style:normal}
#demo .hx-bridge{display:flex;justify-content:center;gap:14px;align-items:center;color:#7690b8;font-size:11px;font-weight:760}#demo .hx-bridge i{color:#4d72df;font-style:normal;font-size:19px}#demo .hx-bridge strong{color:#237e9f}
/* Engine: animated 3D math system, always tied to genuine parameters */
#demo .hx-engine .hx-scene-title{margin-bottom:0}
#demo .hx-math-universe{position:relative;flex:1;min-height:0;display:grid;grid-template-columns:160px minmax(0,1fr) 140px;gap:10px;align-items:center;transform-style:preserve-3d}
#demo .hx-math-holo{position:absolute;left:50%;top:49%;width:500px;height:385px;transform:translate(-50%,-50%) rotateX(60deg);pointer-events:none;opacity:.5}
#demo .hx-math-orbit{position:absolute;inset:0;border-radius:50%;border:1px solid #6794f35c;animation:hxOrbit 6s linear infinite;box-shadow:0 0 60px #8fafff2d inset}
#demo .hx-math-orbit.o2{inset:18%;transform:rotateY(60deg);border-color:#25c3c775;animation-direction:reverse}
#demo .hx-math-orbit.o3{inset:-12%;border-style:dashed;opacity:.3;animation-duration:15s}
#demo .hx-math-center{position:absolute;inset:30%;display:grid;place-items:center;align-content:center;font-size:65px;color:#7899ea;text-shadow:0 0 45px #5d8bf6aa}
#demo .hx-math-center small{font-size:10px;letter-spacing:.14em;text-align:center;font-weight:850;color:#2d58a4}
#demo .hx-data-input,#demo .hx-data-output{position:relative;z-index:6;display:flex;flex-direction:column;gap:8px;transform:translateZ(45px)}
#demo .hx-data-input>span,#demo .hx-data-output>span{font-size:9px;letter-spacing:.09em;font-weight:850;color:#7795c1;margin-bottom:5px}
#demo .hx-data-input b,#demo .hx-data-output strong{display:block;font-size:11px;color:#3d62ac;background:#ffffffc7;border:1px solid #d9e5fb;padding:10px;border-radius:9px;box-shadow:0 4px 14px #3c69a210}
#demo .hx-data-output strong{color:#088e9d;border-color:#c9eeee;background:#f7fffd}
#demo .hx-compute-stage{z-index:7;position:relative;height:350px;perspective:800px;transform-style:preserve-3d}
#demo .hx-wave{position:absolute;inset:10px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:0;filter:blur(12px);transform:translate3d(0,15px,-150px) rotateX(-8deg) scale(.86);transition:opacity .4s,filter .5s,transform .7s cubic-bezier(.16,.85,.2,1)}
#demo[data-phase=engine][data-wave="1"] .hx-wave[data-wave="1"],#demo[data-phase=engine][data-wave="2"] .hx-wave[data-wave="2"],#demo[data-phase=engine][data-wave="3"] .hx-wave[data-wave="3"],#demo[data-phase=engine][data-wave="4"] .hx-wave[data-wave="4"]{opacity:1;filter:none;transform:translateZ(50px) rotateX(0) scale(1)}
#demo .hx-wave-cap{text-align:center;color:#6285bf;margin-bottom:14px}#demo .hx-wave-cap span{display:block;font-size:10px;letter-spacing:.12em;font-weight:900}#demo .hx-wave-cap b{font-size:14px;letter-spacing:-.02em;color:#3d61bc}
#demo .hx-equations{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;max-width:540px;transform-style:preserve-3d}
#demo .hx-eq{min-width:0;position:relative;border-radius:13px;padding:12px 13px;background:linear-gradient(125deg,#ffffffed,#f3f7ffeb);border:1px solid #b7cafd;box-shadow:0 12px 25px #426eea24,0 0 18px #fff inset;transform:translate3d(calc((var(--i) - 1.5)*45px),40px,-80px) rotateY(-12deg);opacity:0;transition:transform .65s cubic-bezier(.12,.83,.15,1),opacity .6s}
#demo[data-phase=engine] .hx-wave:not([data-wave="0"]) .hx-eq{transform:none;opacity:1;transition-delay:calc(var(--i)*.1s)}
#demo .hx-eq:before{content:"";position:absolute;left:10px;right:10px;top:0;height:2px;background:linear-gradient(90deg,transparent,#6992ff,#34bfc8,transparent)}
#demo .hx-eq small{display:block;font-size:9px;font-weight:800;color:#7890b6;margin-bottom:7px}#demo .hx-eq code{display:block;white-space:normal;font:750 clamp(10px,.97vw,13px)/1.35 ui-monospace,Consolas,monospace;color:#3159bf;min-height:30px}#demo .hx-eq strong{display:block;font-size:15px;color:#128e93;margin-top:5px}
#demo .hx-math-lower{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#4b6fb8;font-size:11px;font-weight:750;padding:0 6px}
#demo .hx-flux{display:flex;align-items:center;gap:9px}#demo .hx-flux i{width:22px;height:2px;background:#4d81e2;position:relative;overflow:hidden}#demo .hx-flux i:after{content:"";position:absolute;inset:0;background:#26c9cf;animation:hxDash 1s linear infinite}
/* Assembly: modules burst outward into perspective network */
#demo .hx-assembly-space{position:relative;flex:1;min-height:0;transform-style:preserve-3d;display:grid;place-items:center}
#demo .hx-assembly-back{position:absolute;width:630px;height:340px;left:calc(50% - 315px);top:3%;border-radius:50%;background:radial-gradient(ellipse,#a6c0fa38,transparent 68%);filter:blur(9px);transform:rotateX(58deg);box-shadow:0 0 100px #a9bfff27}
#demo .hx-assembly-nexus{position:absolute;top:32%;left:calc(50% - 76px);width:152px;height:152px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(circle at 36% 25%,#fff,#dce8ff 52%,#a4bafa);border:1px solid #a9bff1;box-shadow:0 0 0 14px #a9c2fa18,0 0 80px #738ff26b;transform:translateZ(-55px);z-index:0;animation:hxCorePulse 3s infinite alternate}
#demo .hx-assembly-nexus span{font-size:34px;color:#4e70e7}#demo .hx-assembly-nexus b{font-size:11px;color:#3252a8;letter-spacing:.11em}
#demo .hx-modules{z-index:3;position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px 13px;width:100%;padding:10px 35px;transform:rotateX(4deg) rotateY(-3deg);transform-style:preserve-3d}
#demo .hx-module{display:flex;align-items:center;gap:7px;min-height:61px;min-width:0;border:1px solid #bfd0f4;background:linear-gradient(160deg,#ffffffeb,#f3f7ffdb);border-radius:12px;padding:10px 8px;box-shadow:0 14px 20px #5272b026,0 0 20px #fff inset;opacity:0;filter:blur(9px);transform:translate3d(calc((var(--i) - 8)*15px),80px,calc(-220px + var(--i)*4px)) rotateY(26deg) scale(.7);transition:opacity .5s,transform .85s cubic-bezier(.15,.87,.15,1),filter .5s;transition-delay:calc(var(--i)*.035s)}
#demo .hx-module span{font:800 10px ui-monospace,Consolas,monospace;color:#7290cc}#demo .hx-module strong{font-size:11px;line-height:1.15;flex:1;color:#3158ad}#demo .hx-module i{font:900 12px system-ui;color:#10a999;font-style:normal}
#demo .hx-assembly-foot{display:flex;justify-content:center;align-items:center;gap:12px;color:#6583ac;font-size:12px}
#demo .hx-assembly-foot strong{color:#3b62bb}#demo .hx-lamp{width:8px;height:8px;border-radius:50%;background:#13bdab;box-shadow:0 0 0 5px #13bdab1a}
/* Real model: main physical glass panel with two supporting real reports. */
#demo .hx-complete .hx-scene-title{margin-bottom:0;z-index:12}
#demo .hx-proof-space{flex:1;position:relative;min-height:0;transform-style:preserve-3d;perspective:1100px}
#demo .hx-proof-glow{position:absolute;inset:3% 5% 0;background:radial-gradient(ellipse at 40% 45%,#adbeff55,transparent 64%);filter:blur(20px)}
#demo .hx-proof-main{position:absolute;z-index:4;top:4%;left:3%;width:72%;height:88%;border-radius:15px;border:1px solid #b4c8ee;background:#fff;overflow:hidden;box-shadow:0 28px 60px #224b9b3c,0 0 55px #9ab7ff21;transform-origin:50% 60%;transform:translate3d(-120px,90px,-260px) rotateY(23deg) rotateX(12deg) scale(.76);opacity:0;transition:transform 1.4s cubic-bezier(.12,.85,.18,1),opacity 1s}
#demo[data-phase=complete] .hx-proof-main{transform:translate3d(0,0,60px) rotateY(-4deg) rotateX(3deg) scale(1);opacity:1;transition-delay:.15s}
#demo .hx-proof-top{height:34px;background:linear-gradient(95deg,#f4f7ff,#fff);border-bottom:1px solid #dbe5f5;display:flex;align-items:center;justify-content:space-between;padding:0 12px;color:#4262af;font-size:9px;font-weight:950;letter-spacing:.07em}
#demo .hx-proof-top i{font-size:8px;font-style:normal;color:#10a39a}
#demo .hx-proof-image{height:calc(100% - 34px);width:100%;overflow:hidden;background:white}
#demo .hx-proof-image picture,#demo .hx-proof-image img{display:block;width:100%;height:100%;object-fit:contain;object-position:top left}
#demo .hx-proof-report{position:absolute;right:0;width:31%;height:42%;z-index:5;border:1px solid #b9c9ed;border-radius:11px;background:white;overflow:hidden;box-shadow:0 24px 42px #31549a3a;transform:translate3d(150px,50px,-200px) rotateY(-27deg) scale(.7);opacity:0;transition:opacity .8s,transform 1.3s cubic-bezier(.14,.88,.2,1)}
#demo .hx-report-pnl{top:8%}#demo .hx-report-cf{bottom:4%}
#demo[data-phase=complete] .hx-report-pnl{opacity:1;transform:translate3d(0,0,110px) rotateY(-11deg) rotateX(3deg) scale(1);transition-delay:.8s}
#demo[data-phase=complete] .hx-report-cf{opacity:1;transform:translate3d(0,0,130px) rotateY(-11deg) rotateX(3deg) scale(1);transition-delay:1.2s}
#demo .hx-proof-report>div{height:43px;padding:5px 10px;background:#f5f8ff;display:flex;flex-direction:column;justify-content:center;border-bottom:1px solid #dce5f5}#demo .hx-proof-report b{font-size:12px;color:#3159b2}#demo .hx-proof-report span{font-size:9px;color:#8499b6}#demo .hx-proof-report img{width:100%;height:calc(100% - 43px);object-fit:contain;object-position:top left;display:block}
#demo .hx-result-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0}
#demo .hx-result-bottom span{display:block;font-size:9px;font-weight:900;letter-spacing:.1em;color:#849abe}#demo .hx-result-bottom strong{display:block;font-size:16px;letter-spacing:-.02em;color:#1a499f;margin-top:2px}
#demo .hx-result-bottom button{border:1px solid #cad9fb;border-radius:9px;padding:9px 13px;background:#f3f7ff;color:#315bd2;font-size:11px;font-weight:850}
#demo .hx-footer{display:flex;align-items:center;gap:14px;justify-content:space-between;margin-top:12px}
#demo .hx-footer-progress{flex:1;display:flex;align-items:center;gap:16px;min-width:0}
#demo .hx-footer-progress>span{font-size:11px;font-weight:760;color:#6a82ae;white-space:nowrap}
#demo .hx-footer-progress>div{flex:1;max-width:310px;height:4px;border-radius:5px;background:#e1e8f7;overflow:hidden}
#demo .hx-footer-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#4d6dfe,#33bfbe);transition:width .45s}
#demo .hx-footer-controls{display:flex;gap:8px}
#demo .hx-footer-controls button{padding:8px 12px;border:1px solid #d0def6;background:white;border-radius:9px;color:#4062b5;font-size:11px;font-weight:850;white-space:nowrap}
#demo .hx-footer-controls button:first-child{background:#496aef;color:white;border-color:#496aef}
#demo .hx-disclaimer{margin:11px 3px 0;color:#92a2b9;font-size:10px;line-height:1.5}
@keyframes hxBreathe{to{transform:translate(20px,-20px) scale(1.18);opacity:.36}}@keyframes hxParticle{to{transform:translate3d(19px,-22px,70px);opacity:.08}}@keyframes hxRing{to{rotate:360deg}}@keyframes hxDash{to{stroke-dashoffset:-100;transform:translateX(20px)}}@keyframes hxOrbit{to{rotate:360deg}}@keyframes hxCorePulse{to{box-shadow:0 20px 55px #426deb4b,0 0 0 14px #e5edffb5,0 0 90px #6b8aff50}}@keyframes hxDots{to{opacity:.2;transform:translateY(-3px)}}
/* Responsive is a recomposition, never shrink a full desktop. */
@media(max-width:1100px){#demo .hx-world{height:560px}#demo .hx-scene{padding:20px 19px 17px}#demo .hx-dialogue{column-gap:20px}#demo .hx-modules{gap:8px;padding:10px 0}#demo .hx-module{padding:8px 6px}#demo .hx-module strong{font-size:10px}#demo .hx-math-universe{grid-template-columns:125px minmax(0,1fr) 104px}#demo .hx-eq{padding:10px 9px}}
@media(max-width:700px){#demo.hx3{margin:24px auto 14px}#demo .hx-top-label{gap:7px;flex-wrap:wrap}#demo .hx-top-label b{font-size:9px}#demo .hx-top-label small,#demo .hx-time{display:none}#demo .hx-topline{padding-bottom:8px}#demo .hx-steps{gap:0;margin-bottom:8px}#demo .hx-steps button{padding:6px 2px 8px;font-size:0;gap:0;flex-direction:column;min-height:38px}#demo .hx-steps button span{font-size:11px}#demo .hx-steps button:after{content:attr(data-short);font-size:9px;margin-top:3px}
#demo .hx-world{height:566px;border-radius:14px}#demo .hx-scene{padding:15px 13px 13px}#demo .hx-scene-title{margin-bottom:11px}#demo .hx-scene-title>span{font-size:8px}#demo .hx-scene-title h3{font-size:20px;margin:4px 0}#demo .hx-scene-title p{font-size:10px;line-height:1.35}
#demo .hx-dialogue{display:flex;flex-direction:column;gap:7px}#demo .hx-dialogue .hx-scene-title{margin-bottom:0}#demo .hx-chat-panel{flex:1;min-height:215px;max-height:245px;padding-right:0}#demo .hx-chat-top{font-size:10px;margin-bottom:4px}#demo .hx-chat-avatar{height:19px;width:19px}#demo .hx-chat-init{font-size:9px;padding:6px 8px;margin-bottom:6px}#demo .hx-turn{top:59px;right:1px}#demo .hx-question{gap:7px;margin-bottom:7px}#demo .hx-ai-mark{width:25px;height:25px;font-size:15px;border-radius:8px}#demo .hx-question small{font-size:8px;margin-bottom:2px}#demo .hx-question strong{font-size:14px}#demo .hx-hint{padding:6px 8px;font-size:9px;margin:0 4px 8px 30px}#demo .hx-hint span{font-size:8px}#demo .hx-answer{font-size:11px;padding:8px 10px;margin-left:30px}#demo .hx-answer small{font-size:8px}#demo .hx-chat-type{display:none}
#demo .hx-extract{flex:none;min-height:163px;height:178px;border-left:0;border-top:1px dashed #c6d8fc;padding:7px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:5px 7px;align-content:start}#demo .hx-extract-head{grid-column:1/-1;margin:0}#demo .hx-extract-head span{font-size:8px}#demo .hx-extract-head b{font-size:11px;margin:2px 0}#demo .hx-receipt{padding:5px 6px;gap:4px;border-radius:7px;min-height:45px}#demo .hx-receipt-n{font-size:8px}#demo .hx-receipt small{font-size:7px}#demo .hx-receipt strong{font-size:9px;margin-top:2px}#demo .hx-receipt i{font-size:9px}#demo .hx-extract-footer{display:none}
#demo .hx-analysis-stage{grid-template-columns:1fr 1fr;gap:5px 10px;grid-template-rows:190px 175px;align-items:stretch}#demo .hx-facts{grid-column:1;grid-row:1}#demo .hx-core-space{grid-column:2;grid-row:1;height:180px;transform:scale(.65);transform-origin:center top}#demo .hx-structures{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:1fr 1fr;gap:5px}#demo .hx-structures .hx-subcap{grid-column:1/-1;margin:0}#demo .hx-structure-item{margin:0;padding:6px;gap:5px}#demo .hx-structure-item>span{font-size:8px}#demo .hx-structure-item strong{font-size:10px}#demo .hx-structure-item small{font-size:8px}#demo .hx-structure-item i{font-size:10px}#demo .hx-facts>span{font-size:9px;margin:4px 0;padding:5px 7px}#demo .hx-subcap{font-size:8px;margin-bottom:8px}#demo .hx-bridge{font-size:8px;gap:5px;flex-wrap:wrap}#demo .hx-bridge i{font-size:12px}
#demo .hx-math-universe{display:flex;flex-direction:column;gap:4px;align-items:stretch}#demo .hx-data-input{display:flex;flex-direction:row;flex-wrap:wrap;gap:4px}#demo .hx-data-input>span{width:100%;font-size:8px;margin:0}#demo .hx-data-input b{font-size:9px;padding:5px 7px}#demo .hx-data-output{display:none}#demo .hx-compute-stage{height:300px;flex:1}#demo .hx-equations{gap:8px}#demo .hx-eq{padding:10px 8px}#demo .hx-eq code{font-size:10px}#demo .hx-eq strong{font-size:12px}#demo .hx-wave-cap{margin-bottom:8px}#demo .hx-wave-cap span{font-size:8px}#demo .hx-wave-cap b{font-size:11px}#demo .hx-math-holo{width:300px;height:210px;top:50%}#demo .hx-math-lower{font-size:9px;flex-direction:column;gap:5px}
#demo .hx-assembly-space{align-items:start}#demo .hx-assembly-nexus{width:100px;height:100px;left:calc(50% - 50px);top:34%}#demo .hx-modules{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:13px 0 0;transform:none}#demo .hx-module{min-height:43px;border-radius:8px;padding:5px 6px}#demo .hx-module strong{font-size:9px}#demo .hx-module span{font-size:8px}#demo .hx-module i{font-size:9px}#demo .hx-assembly-foot{gap:6px;flex-wrap:wrap;font-size:10px;text-align:center}
#demo .hx-proof-space{flex:1}#demo .hx-proof-main{left:0;top:6%;width:100%;height:61%}#demo[data-phase=complete] .hx-proof-main{transform:none}#demo .hx-proof-top{height:27px;font-size:7px;padding:0 7px}#demo .hx-proof-top i{font-size:7px}#demo .hx-proof-image{height:calc(100% - 27px)}#demo .hx-proof-report{width:48%;height:30%;top:auto;bottom:0;right:auto}#demo .hx-report-pnl{left:0}#demo .hx-report-cf{right:0;bottom:0}#demo[data-phase=complete] .hx-report-pnl,#demo[data-phase=complete] .hx-report-cf{transform:none}#demo .hx-proof-report>div{height:30px;padding:3px 6px}#demo .hx-proof-report b{font-size:9px}#demo .hx-proof-report span{font-size:7px}#demo .hx-proof-report img{height:calc(100% - 30px)}#demo .hx-result-bottom span{font-size:7px}#demo .hx-result-bottom strong{font-size:11px}#demo .hx-result-bottom button{padding:7px;font-size:9px}
#demo .hx-footer{gap:6px;align-items:stretch}#demo .hx-footer-progress{flex-direction:column;align-items:flex-start;gap:5px;justify-content:center}#demo .hx-footer-progress>span{font-size:8px;white-space:normal}#demo .hx-footer-progress>div{width:100%}#demo .hx-footer-controls{gap:5px}#demo .hx-footer-controls button{padding:8px 7px;font-size:9px}#demo .hx-disclaimer{font-size:9px;margin-top:7px}}
@media(max-width:345px){#demo .hx-world{height:563px}#demo .hx-scene-title h3{font-size:18px}#demo .hx-question strong{font-size:12px}#demo .hx-hint{font-size:8px}#demo .hx-answer{font-size:10px}#demo .hx-facts>span{font-size:8px}#demo .hx-structure-item small{font-size:7px}#demo .hx-module strong{font-size:8px}#demo .hx-eq code{font-size:9px}}
@media(prefers-reduced-motion:reduce){#demo *,#demo *:before,#demo *:after{animation:none!important;transition-duration:.01ms!important}}

/* Visual QA refinement: deeper physical staging, contrast, clear final proof, reduced blur */
#demo .hx-scene{filter:blur(5px);transition:opacity .48s,transform .65s cubic-bezier(.18,.82,.2,1),filter .46s,visibility 0s .48s}
#demo[data-phase=dialogue] .hx-dialogue,#demo[data-phase=llm] .hx-llm,#demo[data-phase=engine] .hx-engine,#demo[data-phase=blocks] .hx-blocks,#demo[data-phase=complete] .hx-complete{filter:none}
#demo .hx-turn{filter:blur(5px);transition:opacity .4s,transform .56s cubic-bezier(.2,.8,.2,1),filter .38s}
#demo .hx-wave{filter:blur(4px);transition:opacity .28s,filter .38s,transform .48s cubic-bezier(.16,.85,.2,1)}
#demo .hx-math-universe:before{content:"";position:absolute;z-index:1;left:18%;right:11%;top:4%;bottom:0;background:radial-gradient(ellipse at 49% 51%,#263e8599,#4b77c93b 45%,transparent 72%);filter:blur(35px);pointer-events:none;transform:translateZ(-110px)}
#demo .hx-eq{border:1px solid #a6bef8;background:linear-gradient(135deg,#ffffff,#eff5ff);box-shadow:0 18px 38px #315ee252,0 0 18px #fff inset}
#demo .hx-equations{transform:rotateY(-3deg) rotateX(3deg) translateZ(40px)}
#demo .hx-eq strong{font-size:17px}
#demo .hx-module{box-shadow:0 16px 25px #436ee93b,0 0 20px #fff inset;background:linear-gradient(140deg,#fff,#edf4ff)}
#demo .hx-proof-main{width:57%;left:2%;height:88%}
#demo .hx-proof-report{width:38%;right:1%;height:42%}
#demo .hx-proof-image img{object-fit:cover;object-position:top left}
#demo .hx-proof-image picture{height:100%;width:100%}
#demo[data-phase=complete] .hx-proof-main{transform:translate3d(0,0,65px) rotateY(-7deg) rotateX(3deg) scale(1)}
#demo[data-phase=complete] .hx-report-pnl{transform:translate3d(0,0,105px) rotateY(-9deg) rotateX(2deg)}
#demo[data-phase=complete] .hx-report-cf{transform:translate3d(0,0,130px) rotateY(-9deg) rotateX(2deg)}
@media(max-width:700px){#demo .hx-proof-main{left:0;width:100%;height:61%}#demo .hx-proof-report{width:48%;height:30%;right:auto}#demo .hx-report-cf{right:0}#demo[data-phase=complete] .hx-proof-main{transform:none}#demo[data-phase=complete] .hx-report-pnl,#demo[data-phase=complete] .hx-report-cf{transform:none}#demo .hx-equations{transform:none}#demo .hx-eq strong{font-size:13px}}

#demo .hx-world{transform:rotateX(var(--rot-x,0deg)) rotateY(var(--rot-y,0deg));transition:transform .24s ease-out}


/* V9 sequential assembly: one module per HyperScript cue, kinetic depth with clear settling. */
#demo .hx-modules{isolation:isolate}
#demo .hx-modules:before{content:"";position:absolute;inset:10px 30px;z-index:-1;pointer-events:none;
 background:linear-gradient(90deg,transparent 7%,#80a4ef25 8%,transparent 9%),
 repeating-linear-gradient(0deg,transparent 0px,transparent 74px,#7e9ef125 75px,transparent 76px);
 opacity:.85;transform:translateZ(-60px)}
#demo .hx-module{will-change:transform,opacity,filter;transition:none;transition-delay:0s;position:relative;overflow:visible;backface-visibility:hidden}
#demo[data-phase=blocks] .hx-module.hx-built{animation:hxModuleMaterialize .48s cubic-bezier(.16,.9,.25,1) both}
#demo .hx-module:after{content:"";position:absolute;inset:-5px;border-radius:16px;border:1px solid #21b8c800;pointer-events:none;opacity:0}
#demo[data-phase=blocks] .hx-module.hx-built:after{animation:hxModuleSignal .48s ease-out both}
#demo[data-phase=blocks] .hx-module.hx-latest{z-index:5;border-color:#55d5d5;box-shadow:0 0 0 2px #a6fff860,0 16px 30px #356eff48,0 0 26px #30cbd563}
#demo .hx-module i{opacity:0;transform:scale(.4);transition:opacity .12s,transform .2s ease-out}
#demo[data-phase=blocks] .hx-module.hx-built i{opacity:1;transform:scale(1);transition-delay:.28s}
#demo[data-phase=blocks][data-manual="yes"] .hx-module.hx-built{animation:none!important;opacity:1;filter:none;transform:translateZ(40px)}
#demo[data-phase=blocks][data-manual="yes"] .hx-module.hx-built:after{animation:none}
@keyframes hxModuleMaterialize{
  0%{opacity:0;filter:blur(7px) brightness(1.6);transform:translate3d(calc((2.5 - var(--col))*172px),calc((1 - var(--row))*82px),-260px) rotateY(42deg) rotateX(-24deg) scale(.39)}
  35%{opacity:1;filter:blur(0) brightness(1.23)}
  73%{opacity:1;filter:none;transform:translate3d(0,-8px,86px) rotateY(-5deg) rotateX(4deg) scale(1.13)}
  100%{opacity:1;filter:none;transform:translate3d(0,0,40px) rotateY(0) rotateX(0) scale(1)}
}
@keyframes hxModuleSignal{0%,25%{opacity:0;border-color:#57ddf100;box-shadow:0 0 0 0 #41bfd500}65%{opacity:1;border-color:#55d8efcc;box-shadow:0 0 0 7px #41bfd520}100%{opacity:0;border-color:#55d8ef00;box-shadow:0 0 0 15px #41bfd500}}
#demo .hx-assembly-foot{flex:none;min-height:62px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 16px;align-items:center;padding:9px 17px 10px;border:1px solid #d6e4fa;border-radius:12px;background:linear-gradient(90deg,#f6f9ff,#fff);box-shadow:0 8px 22px #416ee013}
#demo .hx-assembly-state{display:flex;flex-direction:column;gap:3px;min-width:0}
#demo .hx-assembly-kicker{font-size:9px;letter-spacing:.12em;font-weight:900;color:#7591c5;display:flex;align-items:center;gap:8px}
#demo .hx-assembly-kicker i{width:7px;height:7px;background:#21c2bc;box-shadow:0 0 0 4px #21c2bc19;border-radius:50%;animation:hxCorePulse 1s ease-in-out infinite alternate}
#demo .hx-assembly-state strong{font-size:13px;line-height:1.25;color:#2d55a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#demo .hx-assembly-meta{display:flex;align-items:baseline;gap:5px;color:#8397b8;font:800 13px ui-monospace,Consolas,monospace}
#demo .hx-assembly-meta b{font-size:23px;color:#14a599;letter-spacing:-.055em;font-weight:900;min-width:29px;text-align:right}
#demo .hx-assembly-meter{grid-column:1/-1;height:3px;background:#e4edfc;border-radius:4px;overflow:hidden;margin-top:5px}
#demo .hx-assembly-meter i{display:block;width:0;height:100%;background:linear-gradient(90deg,#486ef2,#13bfbb);border-radius:4px;box-shadow:0 0 10px #4e7af9;transition:width .45s linear}
#demo[data-phase=blocks] .hx-assembly-nexus{animation:hxCorePulse .55s ease-in-out infinite alternate}
@media(max-width:700px){
 #demo .hx-modules:before{inset:6px 0;background:repeating-linear-gradient(0deg,transparent 0px,transparent 50px,#7e9ef119 51px,transparent 52px)}
 #demo .hx-module{min-height:43px}
 #demo .hx-module strong{font-size:9.5px}
 #demo .hx-assembly-foot{min-height:59px;gap:2px 7px;padding:7px 9px;border-radius:9px}
 #demo .hx-assembly-state strong{font-size:10px}
 #demo .hx-assembly-kicker{font-size:7px}
 #demo .hx-assembly-meta b{font-size:18px}
 #demo .hx-assembly-meta{font-size:10px}
}
@media(max-width:345px){#demo .hx-module strong{font-size:8px}#demo .hx-assembly-state strong{font-size:9px}}
@media(prefers-reduced-motion:reduce){#demo[data-phase=blocks] .hx-module.hx-built{animation:none!important;opacity:1;filter:none;transform:translateZ(40px)}#demo[data-phase=blocks] .hx-module.hx-built:after{animation:none!important}}

/* The path is from one central calculation core toward each target cell, not a generic side slide. */
@media(max-width:700px){
 #demo[data-phase=blocks] .hx-module.hx-built{animation-name:hxModuleMaterializeMobile}
 @keyframes hxModuleMaterializeMobile{
  0%{opacity:0;filter:blur(5px) brightness(1.55);transform:translate3d(calc((1 - var(--mcol))*110px),calc((2.5 - var(--mrow))*48px),-200px) rotateY(32deg) rotateX(-17deg) scale(.48)}
  36%{opacity:1;filter:none}
  75%{opacity:1;filter:none;transform:translate3d(0,-4px,70px) rotateY(-4deg) scale(1.065)}
  100%{opacity:1;filter:none;transform:translate3d(0,0,40px) scale(1)}
 }
 #demo[data-phase=blocks][data-manual="yes"] .hx-module.hx-built{animation:none!important}
}

/* Keep the original central core visible when additional model modules appear.
   Preserve its original size, position, 3D depth and pulse animation.
   Blend only where modules overlap so their labels stay legible. */
#demo .hx-assembly-nexus{transition:opacity .65s,transform .8s ease,filter .65s}
#demo[data-phase=blocks]:has(.hx-module:nth-child(5).hx-built) .hx-assembly-nexus{mix-blend-mode:multiply}
