/* SMUI.info (ui/info.js): the part's own facts in a film-hologram information frame, joined to the piece it describes
   by a leader line. Thin see-through hairline frame, two chamfered (notched) corners with brighter corner brackets,
   offset registration ticks, one short amber accent, a row of tick marks. No glass, no blur, no tilt, no opaque fill:
   only a dark wash inside the line work, denser behind the words and thinning toward the far corner, so the words read
   over the rig and the rig still shows through. Tokens from ui/hud.css; every size is multiplied by --u (1 on a phone,
   up to 1.4 on a laptop).
   Hierarchy inside the frame: the numbers (a phone, where the frame grows out of the readouts) in a tinted strip like
   the stills' sub-headers; the first fact (what the piece is) in ice; the other facts a step smaller; what it joins a
   step smaller again, under a dashed hairline. */
.smui-info.smui-info{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;overflow:visible;font-family:var(--smui-font,"Barlow Condensed",system-ui,sans-serif);-webkit-font-smoothing:antialiased;-webkit-user-select:none;user-select:none;color:var(--ice,#d9f3ff)}
.smui-info:empty{display:none}
.smui-info svg{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}

/* leader: elbow from the open dot at the piece to the frame; the lock ring marks the dot once as the frame arrives */
.smui-info .lead path{fill:none;stroke:rgba(217,243,255,.78);stroke-width:1;stroke-linejoin:round;stroke-linecap:round}
.smui-info .lead .dot{fill:rgba(2,5,11,.5);stroke:var(--ice,#d9f3ff);stroke-width:1.2}
.smui-info .lead .knee{fill:var(--ice,#d9f3ff);stroke:none}
.smui-info .lead .lock{fill:none;stroke:var(--cy,#45d4ff);stroke-width:1;opacity:0;transform-box:fill-box;transform-origin:center}

/* the frame */
.smui-info .frm{position:absolute;box-sizing:border-box;pointer-events:none}
.smui-info.smui-info-tap .frm{pointer-events:auto;cursor:pointer;-webkit-tap-highlight-color:transparent}
.smui-info .frm>svg{width:100%;height:100%}
.smui-info .wash{stroke:none}
.smui-info .edge{fill:none;stroke:rgba(190,236,255,.4);stroke-width:1}
.smui-info .brk{fill:none;stroke:rgba(217,243,255,.92);stroke-width:1.4;stroke-linecap:square}
.smui-info .reg{fill:none;stroke:rgba(134,178,203,.7);stroke-width:1}
.smui-info .tks{fill:none;stroke:rgba(134,178,203,.62);stroke-width:1}
.smui-info .acc{fill:var(--hot,#ffab3d);stroke:none}
.smui-info .bar{fill:var(--cy,#45d4ff);stroke:none;opacity:.85}

.smui-info .txt{position:relative;box-sizing:border-box;padding:calc(14px*var(--u,1)) calc(18px*var(--u,1)) calc(16px*var(--u,1))}
.smui-info .ttl{margin:0 0 calc(10px*var(--u,1));padding-right:calc(10px*var(--u,1));font-weight:500;font-size:calc(13px*var(--u,1));line-height:calc(16px*var(--u,1));letter-spacing:.2em;text-transform:uppercase;color:var(--ice,#d9f3ff);text-shadow:0 0 calc(6px*var(--u,1)) #02050b;text-wrap:balance}

/* the numbers strip (a phone: the frame stands where the readouts were, so it carries their numbers) */
.smui-info .nums{position:relative;display:flex;flex-wrap:wrap;gap:calc(4px*var(--u,1)) calc(22px*var(--u,1));margin:calc(-5px*var(--u,1)) calc(-8px*var(--u,1)) calc(11px*var(--u,1));padding:calc(6px*var(--u,1)) calc(8px*var(--u,1)) calc(7px*var(--u,1));background:linear-gradient(90deg,rgba(69,212,255,.13),rgba(69,212,255,.035) 70%,rgba(69,212,255,0))}
.smui-info .nums::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,rgba(217,243,255,.5),rgba(190,236,255,.14))}
.smui-info .nums:empty{display:none}
.smui-info .nv small{display:block;height:calc(11px*var(--u,1));line-height:calc(11px*var(--u,1));margin:0 0 calc(3px*var(--u,1));font-weight:500;font-size:calc(10.5px*var(--u,1));letter-spacing:.2em;color:#a9cfe2;white-space:nowrap}
.smui-info .nv p{margin:0;font-weight:400;font-size:calc(19px*var(--u,1));line-height:calc(21px*var(--u,1));letter-spacing:.01em;color:var(--ice,#d9f3ff);white-space:nowrap;font-variant-numeric:tabular-nums;text-shadow:0 0 calc(6px*var(--u,1)) #02050b}
.smui-info .nv p u{text-decoration:none;font-weight:500;font-size:calc(10.5px*var(--u,1));letter-spacing:.16em;color:#a9cfe2;margin-left:calc(4px*var(--u,1))}

.smui-info ul{margin:0;padding:0;list-style:none}
.smui-info li,.smui-info .cn{position:relative;margin:0;padding-left:calc(14px*var(--u,1));font-weight:400;font-size:calc(14.5px*var(--u,1));line-height:calc(19px*var(--u,1));letter-spacing:.025em;color:#c9dfec;text-shadow:0 0 calc(6px*var(--u,1)) #02050b,0 0 calc(2px*var(--u,1)) #02050b;text-wrap:pretty}
.smui-info li+li{margin-top:calc(7px*var(--u,1))}
/* the first fact says what the piece is: a step larger, in ice */
.smui-info li.lead{font-size:calc(15px*var(--u,1));line-height:calc(19.5px*var(--u,1));letter-spacing:.02em;color:var(--ice,#d9f3ff)}
.smui-info li.lead+li{margin-top:calc(8px*var(--u,1))}
/* a short hairline tick in front of each fact, on the first line's middle */
.smui-info li::before{content:"";position:absolute;left:0;top:calc(9.5px*var(--u,1));width:calc(7px*var(--u,1));height:1px;background:var(--cy,#45d4ff);opacity:.8}
.smui-info li.lead::before{top:calc(10px*var(--u,1));width:calc(8px*var(--u,1));height:calc(1.5px*var(--u,1));opacity:1}
.smui-info li b,.smui-info .cn b{font-weight:500;color:#eefaff;white-space:nowrap}
/* what it joins: under a dashed hairline, marked by a small elbow (the leader's own shape), a step smaller and dimmer */
.smui-info .cn{margin-top:calc(12px*var(--u,1));padding-top:calc(11px*var(--u,1));font-size:calc(13.5px*var(--u,1));line-height:calc(18px*var(--u,1));color:#a8c7d9}
.smui-info .cn b{color:var(--ice,#d9f3ff)}
.smui-info .cn::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:repeating-linear-gradient(90deg,rgba(134,178,203,.55) 0 calc(3px*var(--u,1)),transparent calc(3px*var(--u,1)) calc(6px*var(--u,1)))}
.smui-info .cn::after{content:"";position:absolute;left:calc(1px*var(--u,1));top:calc(14px*var(--u,1));width:calc(6px*var(--u,1));height:calc(6px*var(--u,1));box-sizing:border-box;border-left:1px solid var(--cy,#45d4ff);border-bottom:1px solid var(--cy,#45d4ff);opacity:.85}
.smui-info ul:empty+.cn{margin-top:0;padding-top:0}
.smui-info ul:empty+.cn::before{display:none}
.smui-info ul:empty+.cn::after{top:calc(3px*var(--u,1))}

/* short of room even with one fact (a phone on its side): closer spacing, the first fact at the others' size */
.smui-info .frm.tight .txt{padding:calc(10px*var(--u,1)) calc(16px*var(--u,1)) calc(11px*var(--u,1))}
.smui-info .frm.tight li.lead{font-size:calc(14.5px*var(--u,1));line-height:calc(19px*var(--u,1))}
.smui-info .frm.tight .cn{margin-top:calc(8px*var(--u,1));padding-top:calc(8px*var(--u,1))}
.smui-info .frm.tight .cn::after{top:calc(11px*var(--u,1))}

/* ---- motion (tokens in ui/hud.css). The eye goes from the part to its facts: the dot locks on and the leader draws out
   from it, then the frame's line work opens from the corner the leader enters (a slight scale from there, with its
   opacity), then the words fade in where they stand (they never travel). Every step is a transition on .is-on, so a
   second tap mid-entry reverses it from where it is, quicker than it came, with no jump. Only transform and opacity
   move; the leader's draw is its stroke-dashoffset (paint only). will-change only while it moves (.is-moving). */
.smui-info .lead path{stroke-dasharray:var(--len,400);stroke-dashoffset:var(--len,400);transition:stroke-dashoffset var(--m-exit,150ms) var(--e-exit,ease-in)}
.smui-info .lead .dot,.smui-info .lead .knee{opacity:0;transition:opacity var(--m-exit,150ms) var(--e-exit,ease-in)}
.smui-info .frm>svg{opacity:0;transform:scale(.965);transform-origin:0 0;transition:opacity var(--m-exit,150ms) var(--e-exit,ease-in),transform var(--m-exit,150ms) var(--e-exit,ease-in)}
.smui-info .frm[data-side="left"]>svg{transform-origin:100% 0}
.smui-info .frm[data-side="below"]>svg{transform-origin:50% 0}
.smui-info .frm[data-side="above"]>svg{transform-origin:50% 100%}
.smui-info .txt{opacity:0;transition:opacity var(--m-exit,150ms) var(--e-exit,ease-in)}
.smui-info.is-on .lead path{stroke-dashoffset:0;transition:stroke-dashoffset var(--m-draw,220ms) var(--e-out,ease-out)}
.smui-info.is-on .lead .dot{opacity:1;transition:opacity 90ms linear}
.smui-info.is-on .lead .knee{opacity:1;transition:opacity 90ms linear calc(var(--m-draw,220ms) * .85)}
.smui-info.is-on .frm>svg{opacity:1;transform:none;transition:opacity var(--m-entry,260ms) var(--e-out,ease-out) calc(var(--m-draw,220ms) * .6),transform var(--m-entry,260ms) var(--e-out,ease-out) calc(var(--m-draw,220ms) * .6)}
.smui-info.is-on .txt{opacity:1;transition:opacity var(--m-fade,200ms) var(--e-out,ease-out) var(--m-draw,220ms)}
.smui-info.is-moving .frm>svg,.smui-info.is-moving .txt{will-change:opacity,transform}
/* pressed (a phone: a tap on the frame puts it away): its line work answers under the finger */
.smui-info .frm.is-pressed .brk,.smui-info .frm.is-pressed .edge{opacity:.55}
@media (prefers-reduced-motion:reduce){
  .smui-info .frm>svg{transform:none}
  .smui-info .lead path{stroke-dasharray:none;stroke-dashoffset:0}
  .smui-info .lead .lock{display:none}
  .smui-info .lead{opacity:0;transition:opacity var(--m-fade,120ms) linear}
  .smui-info.is-on .lead{opacity:1}
  .smui-info *::before,.smui-info *::after{transition:none!important}
}
