/* HAL — the red eye of the RichX network + the protocol terminal. --hal-acc is the site's own colour (gold or green). */
.hal-stage{position:relative;cursor:pointer;outline:none;filter:none!important;-webkit-tap-highlight-color:transparent}
.intro .hal-stage{width:min(58vw,30svh,280px)!important;aspect-ratio:1;margin:0 auto 10px!important;flex:0 0 auto}
@media (max-height:700px){.intro .hal-stage{width:min(52vw,24svh)!important}}
.hal-stage .hal{position:absolute;inset:13%;width:74%;height:74%;border-radius:50%;filter:drop-shadow(0 0 34px rgba(255,31,61,.55))}
.hal-stage .hret{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.hal-stage .hret .s1,.hal-stage .hret .s2{transform-origin:200px 200px}
.hal-stage .hret .s1{animation:halspin 30s linear infinite}.hal-stage .hret .s2{animation:halspin 7s linear infinite reverse}
.hal-stage .hret .acc{stroke:var(--hal-acc,#FFD700)}.hal-stage .hret text.acc{fill:var(--hal-acc,#FFD700);stroke:none}
.hal-stage .hret .tap{animation:halbl 1.4s steps(2) infinite}
.hal-stage:focus-visible{box-shadow:0 0 0 2px var(--hal-acc,#FFD700);border-radius:50%}
.speaking .hal-stage .hal{filter:drop-shadow(0 0 60px rgba(255,31,61,.95))}
@keyframes halspin{to{transform:rotate(360deg)}}
@keyframes halbl{50%{opacity:.3}}
#hal-term{position:fixed;inset:0;z-index:9000;display:none;flex-direction:column;padding:calc(10px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
 background:radial-gradient(90% 60% at 50% 30%,rgba(90,0,16,.6),rgba(10,8,4,.97) 60%),#0D0A04;color:#FFF8E8;font-family:'Share Tech Mono',ui-monospace,Menlo,monospace}
#hal-term.on{display:flex;animation:htopen .45s cubic-bezier(.2,.8,.2,1)}
@keyframes htopen{0%{clip-path:inset(49% 0 49% 0);filter:brightness(3)}60%{clip-path:inset(0 0 0 0)}100%{filter:none}}
#hal-term::after{content:'';position:fixed;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,rgba(255,70,91,.05) 0 1px,transparent 1px 3px)}
.ht-top{display:flex;justify-content:space-between;align-items:center;font-size:.66rem;letter-spacing:.18em;color:#FF465B}
.ht-x{width:42px;height:42px;font-size:18px;color:#FF465B;background:none;border:0;box-shadow:inset 0 0 0 1px #FF465B;cursor:pointer}
.ht-eye{width:min(52vw,230px,28svh);aspect-ratio:1;margin:8px auto}.ht-eye canvas{width:100%;height:100%;filter:drop-shadow(0 0 50px rgba(255,31,61,.7))}
.ht-log{flex:1;min-height:120px;margin:0 0 12px;padding:12px;background:rgba(8,6,2,.92);box-shadow:inset 0 0 0 1px rgba(255,70,91,.4);font-size:.72rem;line-height:1.6;color:#FFF8E8;white-space:pre-wrap;overflow:auto}
.ht-log .n{color:var(--hal-acc,#FFD700)}.ht-log .u{color:#B9AE8E}.ht-log .r{color:#FF465B}
.ht-acts{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.ht-go{display:inline-flex;align-items:center;gap:8px;padding:11px 14px;border:0;cursor:pointer;font:700 .64rem Orbitron,'Chakra Petch',sans-serif;letter-spacing:.12em;
 background:var(--hal-acc,#FFD700);color:#0D0A04;clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px)}
.ht-go.ghost{background:rgba(13,10,4,.8);color:var(--hal-acc,#FFD700);box-shadow:inset 0 0 0 1px var(--hal-acc,#FFD700)}
.ht-go i{width:14px;height:14px;border-radius:50%;background:radial-gradient(circle,#fff 0,#FF6A78 14%,#FF1F3D 30%,#5a0010 62%,#0D0A04 75%)}
.ht-note{margin-top:10px;font-size:.56rem;line-height:1.6;letter-spacing:.1em;color:#B9AE8E;text-align:center}
body.hal-open{overflow:hidden}
@media (prefers-reduced-motion:reduce){.hal-stage .hret .s1,.hal-stage .hret .s2,.hal-stage .hret .tap,#hal-term.on{animation:none}}
