/* Animated hero phones (phoneshow.py). Screens are inline SVG coloured by these tokens, so they follow the site theme.
   Light = white screen in a dark phone; dark = near-black screen. Keep both theme blocks in sync (style.css pattern). */
.ps{--ps-bg:#ffffff;--ps-panel:#f3f6fa;--ps-line:#e1e7ef;--ps-ink:#0f172a;--ps-mute:#6b7a90;--ps-up:#16a34a;--ps-dn:#e11d48;
  --ps-nifty:#2563eb;--ps-glow:rgba(22,163,74,.18);position:relative}
:root[data-theme="dark"] .ps{--ps-bg:#05070b;--ps-panel:#0d121b;--ps-line:#1b2331;
  --ps-ink:#edf2f9;--ps-mute:#8592a8;--ps-up:#22c55e;--ps-dn:#f43f5e;--ps-nifty:#60a5fa;--ps-glow:rgba(34,197,94,.22)}
:root[data-theme="dark"] .ps{--ps-bg:#05070b;--ps-panel:#0d121b;--ps-line:#1b2331;--ps-ink:#edf2f9;--ps-mute:#8592a8;
  --ps-up:#22c55e;--ps-dn:#f43f5e;--ps-nifty:#60a5fa;--ps-glow:rgba(34,197,94,.22)}

.ps::before{content:"";position:absolute;inset:8% 4% 10%;background:radial-gradient(closest-side,var(--ps-glow),transparent);
  filter:blur(20px);z-index:0;pointer-events:none}
.ps.hx-phones{align-items:flex-start}
.ps .hx-phone{z-index:1;height:auto}
.ps .hx-phone.front{z-index:2}
.ps-screen{position:relative;aspect-ratio:390/844;border-radius:36px;overflow:hidden;background:var(--ps-bg)}
.ps-screen svg{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .8s ease;display:block}
.ps-screen svg.on{opacity:1}
.ps svg text{font-family:inherit}
.ps-dots{position:absolute;left:0;right:0;bottom:-6px;display:flex;justify-content:center;gap:8px;z-index:3}
.ps-dots button{width:8px;height:8px;border-radius:99px;border:0;padding:0;background:var(--line,#cbd5e1);cursor:pointer;transition:width .3s,background .3s}
.ps-dots button[aria-current=true]{width:24px;background:var(--brand,#16a34a)}

/* colours */
.ps .b{fill:var(--ps-bg)}
.ps .p{fill:var(--ps-panel)}
.ps .k{fill:var(--ps-ink)}
.ps .m{fill:var(--ps-mute)}
.ps .u{fill:var(--ps-up)}
.ps .d{fill:var(--ps-dn)}
.ps .w{fill:#fff}
.ps .nf{fill:var(--ps-nifty)}
.ps .sl2{fill:var(--ps-line)}
.ps .sd2{fill:var(--ps-dn);opacity:.55}
.ps .gu{stop-color:var(--ps-up)}
.ps .gd{stop-color:var(--ps-dn)}
.ps .zone{fill-opacity:.16}
.ps .sl{stroke:var(--ps-line);stroke-width:1}
.ps .su{stroke:var(--ps-up)}
.ps .sd{stroke:var(--ps-dn)}
.ps .sm{stroke:var(--ps-mute)}
.ps .dash{stroke-dasharray:3 4}
.ps path.draw,.ps .lv{fill:none}
.ps .ln{stroke-width:.9;stroke-opacity:.42;stroke-linejoin:round}
.ps .nifty{stroke:var(--ps-nifty);stroke-width:2.4;fill:none}
.ps .sp{stroke-width:1.8;stroke-linejoin:round}
.ps .cl{stroke-width:2.2;stroke-linejoin:round}
.ps .lv{stroke-width:1;opacity:.8}
.ps .t7{font-size:7px}.ps .t8{font-size:8px}.ps .t9{font-size:9px}.ps .t10{font-size:10px}.ps .t11{font-size:11px}
.ps .t12{font-size:12px}.ps .t13{font-size:13px}.ps .t14{font-size:14px}.ps .t15{font-size:15px}.ps .t16{font-size:16px}
.ps .t28{font-size:28px}
.ps .w7{font-weight:700}.ps .w8{font-weight:800}

/* animations: replayed each time a screen becomes .on */
.ps path.draw{stroke-dasharray:1;stroke-dashoffset:1}
.ps svg.on path.draw{animation:ps-draw 1.7s cubic-bezier(.3,.6,.25,1) forwards;animation-delay:calc(var(--i,0) * 12ms)}
.ps .grow{transform-box:fill-box;transform-origin:left center;transform:scaleX(0)}
.ps .grow.gr{transform-origin:right center}
.ps svg.on .grow{animation:ps-grow .9s cubic-bezier(.2,.7,.2,1) .35s forwards}
.ps .rise{opacity:0;transform:translateY(8px)}
.ps svg.on .rise{animation:ps-rise .55s ease forwards;animation-delay:calc(var(--i,0) * 45ms)}
.ps .pop{opacity:0}
.ps svg.on .pop{animation:ps-pop .4s ease forwards;animation-delay:calc(1.2s + var(--i,0) * 8ms)}
.ps .fadein{opacity:0}
.ps svg.on .fadein{animation:ps-pop .9s ease .6s forwards}
@keyframes ps-draw{to{stroke-dashoffset:0}}
@keyframes ps-grow{to{transform:scaleX(1)}}
@keyframes ps-rise{to{opacity:1;transform:none}}
@keyframes ps-pop{to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .ps-screen svg{transition:none}
  .ps path.draw{stroke-dashoffset:0}.ps .grow{transform:none}.ps .rise,.ps .pop,.ps .fadein{opacity:1;transform:none}
  .ps svg.on path.draw,.ps svg.on .grow,.ps svg.on .rise,.ps svg.on .pop,.ps svg.on .fadein{animation:none}
}

/* front screen 1: the real board, panned left -> right (pan_screen) */
.ps-screen .ps-pan{position:absolute;inset:0;opacity:0;transition:opacity .8s ease;background:var(--ps-bg)}
.ps-screen .ps-pan.on{opacity:1}
.ps-pan img{position:absolute;left:0;top:0;width:auto;max-width:none;height:100%;display:block;transform:translateX(0)}
/* the pan stops with the stock-card column's left edge (stock names) at the phone's left edge instead of the picture's
   right end, where the column is wider than the phone and its names were cut off (user 2026-10-23). translateX % = the
   picture's own width, so it holds at any phone size; the column starts at ~75.4% of the board picture. */
.ps-pan .ps-pd{display:none}
:root[data-theme="dark"] .ps-pan .ps-pd{display:block}:root[data-theme="dark"] .ps-pan .ps-pl{display:none}
.ps-pan.on img{animation:ps-pan 9s ease-in-out .5s forwards}
@keyframes ps-pan{to{transform:translateX(-74.8%)}}
@media (prefers-reduced-motion:reduce){.ps-pan.on img{animation:none}}

/* back phone: real cards screenshot scrolling top -> bottom and back (cards_screen) */
.ps-screen .ps-vs{position:absolute;inset:0;background:var(--ps-bg)}
.ps-vs img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 0;display:block;
  animation:ps-vs 13s ease-in-out 1s infinite alternate}
.ps-vs .ps-pd{display:none}
:root[data-theme="dark"] .ps-vs .ps-pd{display:block}:root[data-theme="dark"] .ps-vs .ps-pl{display:none}
@keyframes ps-vs{0%,8%{object-position:50% 0}92%,100%{object-position:50% 100%}}
@media (prefers-reduced-motion:reduce){.ps-vs img{animation:none}}

/* one phone: the cards screen sits in the front rotation and scrolls once each time it shows */
.ps-screen .ps-s.ps-vs{opacity:0;transition:opacity .8s ease}
.ps-screen .ps-s.ps-vs.on{opacity:1}
.ps-s.ps-vs img{animation:none}
.ps-s.ps-vs.on img{animation:ps-vs1 11s ease-in-out .8s forwards}
@keyframes ps-vs1{to{object-position:50% 100%}}
@media (prefers-reduced-motion:reduce){.ps-s.ps-vs.on img{animation:none}}
.hx-phones.ps-one{display:flex!important;justify-content:center}
.hx-phones.ps-one .hx-phone.front{position:relative!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;margin:0 auto}
