/* MyBouncer UX layer, shared by every page (load after the page's own stylesheet).
   - smooth page-to-page transitions (View Transitions, with a fade fallback)
   - a thin progress bar while pages and data load
   - shimmer skeletons for content that is still loading
   Presentation only: no page logic depends on this file. */
:root{--ux-brand:#276EF1;--ux-sk:#E5E8ED;--ux-sk-hi:#F3F5F8;--ux-ease:cubic-bezier(.2,.7,.2,1)}

/* ---------- page transitions ---------- */
@view-transition{navigation:auto}
::view-transition-old(root){animation:ux-vt-out .16s ease-in both}
::view-transition-new(root){animation:ux-vt-in .32s var(--ux-ease) both}
::view-transition-group(ux-header),::view-transition-group(ux-rail){animation-duration:.25s}
.site-header{view-transition-name:ux-header}
.sidebar{view-transition-name:ux-rail}
@keyframes ux-vt-out{to{opacity:0;transform:translateY(-4px)}}
@keyframes ux-vt-in{from{opacity:0;transform:translateY(8px)}}
/* browsers without cross-page transitions: fade the page in, and out when leaving (ux.js) */
html.ux-fade body{animation:ux-page-in .3s var(--ux-ease) both}
html.ux-fade.ux-leaving body{opacity:0;transition:opacity .14s ease-in}
@keyframes ux-page-in{from{opacity:0}}

/* ---------- top progress bar ---------- */
#ux-bar{position:fixed;left:0;top:0;height:3px;width:100%;z-index:2147483000;pointer-events:none;transform-origin:0 50%;transform:scaleX(0);opacity:0;
  background:linear-gradient(90deg,var(--ux-brand),#6AA0FF);transition:transform .3s var(--ux-ease),opacity .3s ease}
#ux-bar.on{opacity:1}
#ux-bar.done{transform:scaleX(1)!important;opacity:0;transition:transform .2s ease,opacity .35s ease .15s}

/* ---------- skeletons ---------- */
@keyframes ux-shimmer{from{background-position:100% 0}to{background-position:0 0}}
.ux-sk,:where(.sk){background:linear-gradient(90deg,var(--ux-sk) 25%,var(--ux-sk-hi) 37%,var(--ux-sk) 63%);background-size:400% 100%;animation:ux-shimmer 1.4s ease infinite;border-radius:8px}
.ux-sk{display:block}
.ux-skel{display:grid;gap:12px;padding:6px 0;width:100%}
.ux-skel .ux-row{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line,#E5E7EB);border-radius:14px;background:#fff}
.ux-skel .ux-av{width:42px;height:42px;border-radius:50%;flex:none}
.ux-skel .ux-txt{flex:1;display:grid;gap:8px}
.ux-skel .ux-l{height:12px}
.ux-skel .ux-l.w1{width:55%}.ux-skel .ux-l.w2{width:80%}.ux-skel .ux-l.w3{width:35%}
.ux-skel.lines{gap:10px}
.ux-skel.lines .ux-l{height:13px}
.ux-skel-inline{display:inline-block;width:120px;height:.9em;vertical-align:middle;border-radius:6px}
h1 .ux-skel-inline,h2 .ux-skel-inline{width:200px;height:.8em}
.ux-vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Containers marked data-skel show a skeleton while they are empty (it disappears as soon as content arrives). */
[data-skel]:empty::before{content:"";display:block;width:100%;background:linear-gradient(90deg,var(--ux-sk) 25%,var(--ux-sk-hi) 37%,var(--ux-sk) 63%);background-size:400% 100%;animation:ux-shimmer 1.4s ease infinite}
[data-skel="rows"]:empty::before{height:236px;-webkit-mask:repeating-linear-gradient(180deg,#000 0 68px,transparent 68px 84px);mask:repeating-linear-gradient(180deg,#000 0 68px,transparent 68px 84px)}
[data-skel="list"]:empty::before{height:130px;-webkit-mask:repeating-linear-gradient(180deg,#000 0 34px,transparent 34px 48px);mask:repeating-linear-gradient(180deg,#000 0 34px,transparent 34px 48px)}
[data-skel="cards"]:empty::before{height:168px;-webkit-mask:repeating-linear-gradient(90deg,#000 0 calc(33.33% - 12px),transparent calc(33.33% - 12px) 33.33%);mask:repeating-linear-gradient(90deg,#000 0 calc(33.33% - 12px),transparent calc(33.33% - 12px) 33.33%);border-radius:14px}
[data-skel="chips"]:empty::before{height:36px;max-width:520px;-webkit-mask:repeating-linear-gradient(90deg,#000 0 96px,transparent 96px 108px);mask:repeating-linear-gradient(90deg,#000 0 96px,transparent 96px 108px);border-radius:999px}
[data-skel="chart"]:empty::before{height:180px;border-radius:14px}
[data-skel="block"]:empty::before{height:96px;border-radius:14px}
[data-skel]:empty{display:block}

/* content arriving where a skeleton was: a soft fade-up */
.ux-in{animation:ux-in .38s var(--ux-ease) both}
@keyframes ux-in{from{opacity:0;transform:translateY(6px)}}

/* ---------- browser surfaces in the brand palette ---------- */
::selection{background:rgba(39,110,241,.22);color:inherit}
:where(input,textarea,[contenteditable]){caret-color:var(--ux-brand)}
:where(input[type=checkbox],input[type=radio],input[type=range],progress){accent-color:var(--ux-brand)}
html{scrollbar-color:#C5CAD3 transparent}
:where(a):focus-visible{outline:2px solid var(--ux-brand);outline-offset:3px;border-radius:4px}
:where(button,[role=button],summary,select):focus-visible{outline:2px solid var(--ux-brand);outline-offset:2px}

/* ---------- Watermelon UI "Button 4": the trailing arrow slides out and grows a little on hover ---------- */
.btn .ic-arrow,.submit svg,.gs-cta .ic{transition:transform .2s cubic-bezier(.2,.7,.2,1)}
.btn:hover .ic-arrow,.submit:hover svg,a.tile:hover .ic-arrow{transform:translateX(4px) scale(1.1)}
/* ---------- Watermelon UI "Button 20": text links get an underline that grows from the centre ---------- */
:where(.footer-col a,.inline-link,.form-foot a,.alt a,.choose-foot a){position:relative;text-decoration:none}
:where(.footer-col a,.inline-link,.form-foot a,.alt a,.choose-foot a)::after{content:"";position:absolute;left:50%;bottom:-2px;width:100%;height:1px;background:currentColor;transform:translateX(-50%) scaleX(0);transform-origin:center;transition:transform .3s ease-in-out}
:where(.footer-col a,.inline-link,.form-foot a,.alt a,.choose-foot a):hover::after{transform:translateX(-50%) scaleX(1)}

/* ---------- bigger tap areas for small text links and buttons (layout unchanged: padding grows, negative margin gives it back) ---------- */
html body :is(.bz-sos a,.lc-chip button,.rc-empty a,#forgot,.back-home,.sel .links a){display:inline-block;padding-top:12px!important;padding-bottom:12px!important;margin-top:-12px!important;margin-bottom:-12px!important}
html body .back-home{display:block}
html body .page a.back,html body .wrap:has(#signup) a.back{padding-top:12px!important;padding-bottom:12px!important;margin-top:-12px!important;margin-bottom:4px!important}

/* ---------- small touches ---------- */
:where(small){font-size:max(12px,.83em)}
:where(.btn,.submit,button[type=submit]):not(:disabled):active{transform:scale(.975)}
:where(.btn,.submit){transition:transform .12s ease,background-color .15s,border-color .15s,box-shadow .15s,color .15s,filter .15s}
img.ux-img{opacity:0;transition:opacity .35s ease}
img.ux-img.ux-ok{opacity:1}

@media (prefers-reduced-motion:reduce){
  .btn:hover .ic-arrow,.submit:hover svg{transform:none}
  :where(.footer-col a,.inline-link,.form-foot a,.alt a,.choose-foot a)::after{transition:none}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
  html.ux-fade body,.ux-in{animation:none}
  .ux-sk,:where(.sk),[data-skel]:empty::before{animation:none}
  img.ux-img{opacity:1;transition:none}
}
