/* Interaction layer (2026-10-09), loaded last on every page: account control and menu, theme toggle, sidebar footer,
   eased hover / press / focus states, entrance and live-value motion. prefers-reduced-motion switches motion off. */
:root{--ease:cubic-bezier(.2,.7,.2,1);--ease-out:cubic-bezier(.16,1,.3,1);--dur:.18s;--avatar:#bda16b;--avatar-ink:#122338;--danger:#b42318;--focus:#1b4d89;--pop:0 24px 52px -20px rgba(15,34,56,.38),0 2px 8px rgba(15,34,56,.07)}
:root[data-theme=dark]{--avatar:#d9b86c;--avatar-ink:#0d1a2b;--danger:#f19a9a;--focus:#8fc0f5;--pop:0 24px 52px -16px rgba(0,0,0,.75),0 2px 8px rgba(0,0,0,.4)}
html{-webkit-tap-highlight-color:transparent}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
::selection{background:color-mix(in srgb,var(--gold,#c9971f) 30%,transparent)}
body:not(.page-home){scrollbar-color:color-mix(in srgb,var(--muted) 40%,transparent) transparent}

/* Controls: state changes ease, presses give, one consistent focus ring. */
button,select,.outline,.primary,a.button{transition:background-color var(--dur) var(--ease),border-color var(--dur) var(--ease),color var(--dur) var(--ease),box-shadow var(--dur) var(--ease),opacity var(--dur),transform .14s var(--ease)}
button:not(:disabled):active,.outline:active,.primary:active{transform:scale(.97)}
th button:active,td button:active,.pk-sort:active,.auth-trigger:active,svg button:active{transform:none}
input,select,textarea{transition:border-color var(--dur) var(--ease),box-shadow var(--dur) var(--ease),background-color var(--dur)}
body:not(.page-home) input:not([type=checkbox]):not([type=radio]):not([type=range]):focus,body:not(.page-home) select:focus,body:not(.page-home) textarea:focus{outline:none;border-color:var(--focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--focus) 20%,transparent)}
body:not(.page-home) :is(a,button,summary,select,[tabindex]):focus-visible{outline:2px solid var(--focus);outline-offset:2px}
tbody tr,tbody tr>*{transition:background-color .15s var(--ease)}

/* Page entrance: the static sections of the main column rise in one after another. theme.js marks the page as
   entering and motion.js clears the mark once the rise has played, so live re-renders never replay it. */
body:not(.page-home) main{animation:none}
.iev-enter body:not(.page-home) main>*{animation:iev-rise .6s var(--ease-out) backwards}
.iev-enter body:not(.page-home) main>:nth-child(2){animation-delay:.05s}.iev-enter body:not(.page-home) main>:nth-child(3){animation-delay:.1s}
.iev-enter body:not(.page-home) main>:nth-child(4){animation-delay:.15s}.iev-enter body:not(.page-home) main>:nth-child(5){animation-delay:.2s}
.iev-enter body:not(.page-home) main>:nth-child(n+6){animation-delay:.24s}

/* Live prices: a short wash in the direction of the change (US colours: green up, red down). */
.tick-up,.tick-down{border-radius:4px;animation:iev-tick 1.4s var(--ease) both}
.tick-up{--tick:rgba(23,138,108,.18)}.tick-down{--tick:rgba(200,55,60,.16)}
:root[data-theme=dark] .tick-up{--tick:rgba(111,212,168,.2)}:root[data-theme=dark] .tick-down{--tick:rgba(241,132,142,.2)}
@keyframes iev-tick{0%,35%{background:var(--tick);box-shadow:0 0 0 3px var(--tick)}100%{background:transparent;box-shadow:0 0 0 3px transparent}}

/* ===== Theme toggle ===== */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.theme-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;transition:transform .5s var(--ease-out)}
.page-home .theme-icon{display:none}
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}

/* ===== Desktop sidebar footer: EN | 中文 beside an icon theme toggle, the account control full width below. ===== */
@media(min-width:701px){
 body:not(.page-home) header{display:grid;grid-template-columns:minmax(0,1fr) 42px;grid-template-rows:auto 1fr auto auto;column-gap:8px;row-gap:10px}
 body:not(.page-home) header .brand{grid-column:1/-1}
 body:not(.page-home) header .language-switch{grid-row:3;grid-column:1;margin:0;min-width:0}
 body:not(.page-home) header .language-switch button{flex:1;min-width:0;padding:0;font-size:0!important}
 body:not(.page-home) header .language-switch button::after{font-size:13.5px;font-weight:600;letter-spacing:.02em}
 body:not(.page-home) header .language-switch [data-language=en]::after{content:'EN'}
 body:not(.page-home) header .language-switch [data-language=zh]::after{content:'中文'}
 body:not(.page-home) header .theme-toggle{grid-row:3;grid-column:2;align-self:stretch;width:42px;min-height:0;padding:0;margin:0}
 body:not(.page-home) header .theme-toggle span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body:not(.page-home) header .auth-control{grid-row:4;grid-column:1/-1;margin:0}
 body:not(.page-home) header .auth-signin{min-height:44px;border-radius:8px}
}

/* ===== Account control ===== */
.auth-control{position:relative;min-width:0}
.auth-signin{display:flex!important;align-items:center;justify-content:center;gap:8px;text-decoration:none!important;transition:border-color var(--dur) var(--ease),background-color var(--dur) var(--ease),color var(--dur)}
.auth-signin svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
body:not(.page-home) .auth-signin:hover{border-color:var(--blue);color:var(--blue)!important;background:var(--tint)}
.auth-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:50px;margin:0;padding:7px 10px 7px 7px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:15px;text-align:left;cursor:pointer}
.auth-trigger:hover{border-color:color-mix(in srgb,var(--avatar) 70%,var(--line));background:var(--surface)}
.auth-control.is-open .auth-trigger{border-color:var(--avatar);box-shadow:0 0 0 3px color-mix(in srgb,var(--avatar) 25%,transparent)}
.auth-avatar{flex:none;display:grid;place-items:center;width:34px;height:34px;margin:0;padding:0;border:0;border-radius:50%;background:var(--avatar);color:var(--avatar-ink);font:700 15px/1 "IBM Plex Sans",sans-serif;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);transition:transform .45s var(--ease-out)}
.auth-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.auth-chev{flex:none;width:16px;height:16px;fill:none;stroke:var(--muted);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:stroke var(--dur)}
.auth-control.is-open .auth-chev{stroke:var(--ink)}
.auth-menu{position:fixed;z-index:1000;top:auto;right:auto;bottom:auto;width:min(272px,calc(100vw - 24px));max-width:none;padding:6px;margin:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:var(--pop);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(6px) scale(.97);transition:opacity .14s var(--ease),transform .2s var(--ease),visibility 0s .2s}
.auth-menu[data-side=below]{transform:translateY(-6px) scale(.97)}
.auth-menu.is-open{opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:opacity .18s var(--ease),transform .32s var(--ease-out),visibility 0s}
.auth-head{display:flex;align-items:center;gap:12px;padding:10px 10px 14px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.auth-head .auth-avatar{width:40px;height:40px;font-size:17px}
.auth-menu .auth-email{margin:0;min-width:0;font-size:14.5px;line-height:1.45;overflow-wrap:anywhere;color:var(--ink)}
.auth-item{display:flex!important;align-items:center;gap:11px;width:100%;min-height:42px;margin:0!important;padding:9px 10px!important;border:0!important;border-radius:7px!important;background:none!important;color:var(--ink)!important;font:inherit;font-size:15px!important;font-weight:500!important;text-align:left;text-decoration:none!important;cursor:pointer}
.auth-item svg{width:17px;height:17px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:stroke var(--dur),transform .3s var(--ease-out)}
.auth-item:hover,.auth-item:focus-visible{background:var(--tint)!important;color:var(--blue)!important;outline:none}
.auth-item:hover svg,.auth-item:focus-visible svg{stroke:currentColor}
.auth-item:not(:disabled):active{transform:scale(.98)}
.auth-item.is-danger,.auth-item.is-danger:hover,.auth-item.is-danger:focus-visible{color:var(--danger)!important}.auth-item.is-danger svg{stroke:currentColor}
.auth-item.is-danger:hover,.auth-item.is-danger:focus-visible{background:color-mix(in srgb,var(--danger) 10%,transparent)!important}
.auth-item:disabled{opacity:.55;cursor:wait}
.auth-menu hr{border:0;border-top:1px solid var(--line);margin:6px 4px}
.auth-error{margin:6px 10px 4px;font-size:14px;color:var(--danger)}.auth-error:empty{display:none}
.auth-menu.is-open .auth-item{animation:iev-item .34s var(--ease-out) both}
.auth-menu.is-open .auth-item:nth-of-type(2){animation-delay:.03s}.auth-menu.is-open .auth-item:nth-of-type(3){animation-delay:.06s}

/* Delete-account dialog. */
.auth-dialog{border-radius:14px!important;box-shadow:0 40px 90px -24px rgba(7,23,43,.55)}
.auth-dialog[open]{animation:iev-pop .32s var(--ease-out)}
.auth-dialog::backdrop{background:rgba(7,23,43,.5)!important;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:iev-fade .2s var(--ease)}
.auth-dialog h2{font-size:22px}
.auth-dialog p{color:var(--muted)}.auth-dialog [role=alert]{color:var(--danger);font-size:14px;margin:10px 0 0}.auth-dialog [role=alert]:empty{display:none}
.auth-actions button{min-height:42px;padding:9px 18px;border-radius:7px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:15px;cursor:pointer}
.auth-actions button:hover{background:var(--raised)}
.auth-actions .is-danger{background:var(--danger);border-color:var(--danger);color:#fff;font-weight:600}
:root[data-theme=dark] .auth-actions .is-danger{color:#2a0d0d}
.auth-actions .is-danger:not(:disabled):hover{background:color-mix(in srgb,var(--danger) 86%,#000);border-color:color-mix(in srgb,var(--danger) 86%,#000)}

/* Landing header: pill trigger on the navy bar. */
.page-home .auth-trigger{width:auto;min-height:40px;max-width:220px;padding:3px 12px 3px 3px;border-radius:999px;border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:#e6edf6;gap:8px}
.page-home .auth-trigger:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.28)}
.page-home .auth-control.is-open .auth-trigger{border-color:var(--avatar);box-shadow:0 0 0 3px rgba(189,161,107,.28)}
.page-home .auth-chev{stroke:rgba(230,237,246,.7)}.page-home .auth-control.is-open .auth-chev{stroke:#fff}
.page-home .auth-trigger .auth-avatar{width:32px;height:32px;font-size:14px}
.page-home .auth-signin svg{display:none}

@media(hover:hover){.auth-trigger:hover .auth-avatar{transform:scale(1.06)}.auth-item:hover svg{transform:translateX(1px)}.theme-toggle:hover .theme-icon{transform:rotate(-20deg)}}
@media(max-width:700px){
 body:not(.page-home) .auth-trigger{width:auto;min-height:42px;padding:3px;border-color:transparent;background:transparent;border-radius:50%;gap:0}
 body:not(.page-home) .auth-trigger .auth-avatar{width:36px;height:36px}
 body:not(.page-home) .auth-name,body:not(.page-home) .auth-chev{display:none}
 .page-home .auth-name,.page-home .auth-chev{display:none}.page-home .auth-trigger{padding:2px;gap:0;border-color:transparent;background:transparent}
}

@keyframes iev-rise{from{opacity:0;transform:translateY(8px)}}
@keyframes iev-fade{from{opacity:0}}
@keyframes iev-pop{from{opacity:0;transform:translateY(10px) scale(.97)}}
@keyframes iev-item{from{opacity:0;transform:translateY(4px)}}

@media(prefers-reduced-motion:reduce){
 *,*:before,*:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Locked nav links: a line lock in the nav's own colour instead of the emoji. */
.site-nav a.auth-locked:after{content:''!important;position:static!important;display:block;width:13px!important;height:13px!important;margin-left:auto;flex:none;border-radius:0!important;background:currentColor!important;opacity:.5;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat}
@media(max-width:700px){.site-nav a.auth-locked:after{display:inline-block;width:11px!important;height:11px!important;margin-left:5px}}

/* ===== Waiting states (2026-10-10) =====
   Containers that wait for data carry aria-busy="true" and hold skeletons shaped like the content they will show.
   One shimmer sweeps across every skeleton on the page together (fixed background); when a container stops being
   busy, motion.js fades its first real content in. Button-triggered work shows a spinner inside the button. */
:root{--sk-fill:var(--sk) linear-gradient(100deg,transparent 0 38%,var(--sk-glow) 47%,var(--sk-gold) 53%,transparent 62% 100%) no-repeat fixed;--sk:#e9eef5;--sk-glow:rgba(255,255,255,.9);--sk-gold:rgba(201,151,31,.07);--ghost-candles:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Crect x='10' y='122' width='2' height='36'/%3E%3Crect x='5' y='137' width='12' height='13'/%3E%3Crect x='32' y='116' width='2' height='31'/%3E%3Crect x='27' y='129' width='12' height='8'/%3E%3Crect x='53' y='112' width='2' height='30'/%3E%3Crect x='48' y='125' width='12' height='4'/%3E%3Crect x='75' y='113' width='2' height='26'/%3E%3Crect x='70' y='125' width='12' height='3'/%3E%3Crect x='97' y='120' width='2' height='24'/%3E%3Crect x='92' y='127' width='12' height='8'/%3E%3Crect x='119' y='122' width='2' height='25'/%3E%3Crect x='113' y='135' width='12' height='8'/%3E%3Crect x='140' y='133' width='2' height='33'/%3E%3Crect x='135' y='143' width='12' height='9'/%3E%3Crect x='162' y='146' width='2' height='28'/%3E%3Crect x='157' y='151' width='12' height='12'/%3E%3Crect x='184' y='151' width='2' height='39'/%3E%3Crect x='179' y='163' width='12' height='15'/%3E%3Crect x='206' y='163' width='2' height='39'/%3E%3Crect x='200' y='178' width='12' height='9'/%3E%3Crect x='227' y='179' width='2' height='28'/%3E%3Crect x='222' y='187' width='12' height='6'/%3E%3Crect x='249' y='187' width='2' height='19'/%3E%3Crect x='244' y='193' width='12' height='5'/%3E%3Crect x='271' y='191' width='2' height='30'/%3E%3Crect x='266' y='199' width='12' height='7'/%3E%3Crect x='292' y='193' width='2' height='36'/%3E%3Crect x='287' y='206' width='12' height='9'/%3E%3Crect x='314' y='206' width='2' height='19'/%3E%3Crect x='309' y='214' width='12' height='3'/%3E%3Crect x='336' y='205' width='2' height='22'/%3E%3Crect x='331' y='214' width='12' height='7'/%3E%3Crect x='358' y='216' width='2' height='26'/%3E%3Crect x='353' y='220' width='12' height='13'/%3E%3Crect x='379' y='221' width='2' height='28'/%3E%3Crect x='374' y='233' width='12' height='3'/%3E%3Crect x='401' y='228' width='2' height='18'/%3E%3Crect x='396' y='234' width='12' height='3'/%3E%3Crect x='423' y='225' width='2' height='20'/%3E%3Crect x='418' y='234' width='12' height='3'/%3E%3Crect x='445' y='220' width='2' height='26'/%3E%3Crect x='440' y='230' width='12' height='4'/%3E%3Crect x='466' y='208' width='2' height='32'/%3E%3Crect x='461' y='223' width='12' height='7'/%3E%3Crect x='488' y='211' width='2' height='25'/%3E%3Crect x='483' y='223' width='12' height='3'/%3E%3Crect x='510' y='209' width='2' height='28'/%3E%3Crect x='505' y='219' width='12' height='6'/%3E%3Crect x='532' y='210' width='2' height='21'/%3E%3Crect x='527' y='219' width='12' height='3'/%3E%3Crect x='553' y='193' width='2' height='33'/%3E%3Crect x='548' y='204' width='12' height='14'/%3E%3Crect x='575' y='181' width='2' height='37'/%3E%3Crect x='570' y='190' width='12' height='14'/%3E%3Crect x='597' y='179' width='2' height='25'/%3E%3Crect x='592' y='184' width='12' height='6'/%3E%3Crect x='619' y='154' width='2' height='36'/%3E%3Crect x='613' y='162' width='12' height='22'/%3E%3Crect x='640' y='124' width='2' height='45'/%3E%3Crect x='635' y='140' width='12' height='23'/%3E%3Crect x='662' y='120' width='2' height='29'/%3E%3Crect x='657' y='126' width='12' height='14'/%3E%3Crect x='684' y='105' width='2' height='36'/%3E%3Crect x='679' y='111' width='12' height='15'/%3E%3Crect x='706' y='86' width='2' height='39'/%3E%3Crect x='700' y='101' width='12' height='10'/%3E%3Crect x='727' y='78' width='2' height='30'/%3E%3Crect x='722' y='91' width='12' height='10'/%3E%3Crect x='749' y='58' width='2' height='38'/%3E%3Crect x='744' y='65' width='12' height='26'/%3E%3Crect x='771' y='28' width='2' height='44'/%3E%3Crect x='766' y='39' width='12' height='26'/%3E%3Crect x='792' y='18' width='2' height='34'/%3E%3Crect x='787' y='28' width='12' height='12'/%3E%3Crect x='814' y='6' width='2' height='41'/%3E%3Crect x='809' y='20' width='12' height='20'/%3E%3Crect x='836' y='9' width='2' height='36'/%3E%3Crect x='831' y='24' width='12' height='16'/%3E%3Crect x='858' y='23' width='2' height='32'/%3E%3Crect x='853' y='27' width='12' height='13'/%3E%3Crect x='879' y='16' width='2' height='28'/%3E%3Crect x='874' y='31' width='12' height='9'/%3E%3Crect x='901' y='31' width='2' height='24'/%3E%3Crect x='896' y='38' width='12' height='3'/%3E%3Crect x='923' y='21' width='2' height='26'/%3E%3Crect x='918' y='33' width='12' height='7'/%3E%3Crect x='945' y='22' width='2' height='28'/%3E%3Crect x='940' y='29' width='12' height='11'/%3E%3Crect x='966' y='14' width='2' height='38'/%3E%3Crect x='961' y='28' width='12' height='12'/%3E%3Crect x='988' y='30' width='2' height='16'/%3E%3Crect x='983' y='40' width='12' height='3'/%3E%3C/svg%3E"); --ghost-area:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Cpath d='M0,193L17,192L33,190L50,186L67,190L83,190L100,192L117,194L133,196L150,196L167,196L183,200L200,199L217,199L233,201L250,206L267,205L283,200L300,196L317,197L333,195L350,193L367,189L383,182L400,176L417,174L433,164L450,155L467,150L483,147L500,136L517,130L533,129L550,125L567,117L583,115L600,117L617,113L633,115L650,110L667,112L683,115L700,121L717,120L733,119L750,124L767,131L783,135L800,143L817,148L833,149L850,148L867,151L883,147L900,151L917,154L933,151L950,153L967,145L983,144L1000,145L1000,300L0,300Z' opacity='.35'/%3E%3Cpath d='M0,193L17,192L33,190L50,186L67,190L83,190L100,192L117,194L133,196L150,196L167,196L183,200L200,199L217,199L233,201L250,206L267,205L283,200L300,196L317,197L333,195L350,193L367,189L383,182L400,176L417,174L433,164L450,155L467,150L483,147L500,136L517,130L533,129L550,125L567,117L583,115L600,117L617,113L633,115L650,110L667,112L683,115L700,121L717,120L733,119L750,124L767,131L783,135L800,143L817,148L833,149L850,148L867,151L883,147L900,151L917,154L933,151L950,153L967,145L983,144L1000,145' fill='none' stroke='%23000' stroke-width='6' stroke-linejoin='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");--ghost-bars:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 300' preserveAspectRatio='none'%3E%3Crect x='14' y='230' width='55' height='70' rx='6'/%3E%3Crect x='97' y='190' width='55' height='110' rx='6'/%3E%3Crect x='181' y='171' width='55' height='129' rx='6'/%3E%3Crect x='264' y='176' width='55' height='124' rx='6'/%3E%3Crect x='347' y='147' width='55' height='153' rx='6'/%3E%3Crect x='431' y='156' width='55' height='144' rx='6'/%3E%3Crect x='514' y='137' width='55' height='163' rx='6'/%3E%3Crect x='597' y='116' width='55' height='184' rx='6'/%3E%3Crect x='681' y='102' width='55' height='198' rx='6'/%3E%3Crect x='764' y='77' width='55' height='223' rx='6'/%3E%3Crect x='847' y='53' width='55' height='247' rx='6'/%3E%3Crect x='931' y='52' width='55' height='248' rx='6'/%3E%3C/svg%3E"); }
:root[data-theme=dark]{--sk:#17263b;--sk-glow:rgba(150,185,230,.09);--sk-gold:rgba(240,192,90,.08)}
.sk{display:block;width:var(--w,100%);max-width:100%;height:var(--h,.8em);border-radius:var(--r,6px);background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite;pointer-events:none}
:is(i,span,b).sk{display:inline-block;vertical-align:middle}
.sk-row{pointer-events:none}.sk-row:hover>*,.sk-row:hover{background:none!important;box-shadow:none!important}
@keyframes iev-shimmer{from{background-position:-80vw 0}to{background-position:180vw 0}}
/* Chart areas: a ghost silhouette of the chart to come, shimmering, over faint grid lines. */
.sk-chart,.pro-chart[aria-busy=true],.pf-chart[aria-busy=true],.db-chart[aria-busy=true],.chart-wrap[aria-busy=true],.st-chart-panel[aria-busy=true],.rv[data-wait] :is(.rv-chart,.rv-flow):empty,.ow-card[data-wait] .ow-chart:empty{position:relative;min-height:var(--h,240px);border-radius:10px;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),color-mix(in srgb,var(--line) 70%,transparent) calc(25% - 1px) 25%)}
.sk-chart::before,.pro-chart[aria-busy=true]::before,.pf-chart[aria-busy=true]::before,.db-chart[aria-busy=true]::before,.pro-chart[aria-busy=true]::before,.pf-chart[aria-busy=true]::before,.db-chart[aria-busy=true]::before,.chart-wrap[aria-busy=true]::before,.st-chart-panel[aria-busy=true]::before,.rv[data-wait] :is(.rv-chart,.rv-flow):empty::before,.ow-card[data-wait] .ow-chart:empty::before{content:'';position:absolute;inset:10% 2% 12%;background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite;-webkit-mask:var(--ghost,var(--ghost-area)) center/100% 100% no-repeat;mask:var(--ghost,var(--ghost-area)) center/100% 100% no-repeat}
.sk-chart.is-candles,.chart-wrap,.st-chart-panel,.pro-chart{--ghost:var(--ghost-candles)}
.chart-wrap[aria-busy=true]::before{inset:7% 9% 15% 1%}
/* Indeterminate gold progress line, for waits whose shape is unknown. */
.iev-bar{position:relative;display:block;height:2px;overflow:hidden;border-radius:2px;background:color-mix(in srgb,var(--gold,#c9971f) 18%,transparent)}
.iev-bar::after{content:'';position:absolute;inset:0;width:36%;border-radius:inherit;background:linear-gradient(90deg,transparent,var(--gold,#c9971f) 40%,var(--gold,#c9971f) 60%,transparent);animation:iev-indet 1.3s var(--ease) infinite}
@keyframes iev-indet{from{transform:translateX(-110%)}to{transform:translateX(290%)}}
/* Screen-reader-only status while the skeleton speaks for it visually. */
.iev-sr{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
/* Buttons doing work: a small ring turns beside the label until the work ends. */
button[aria-busy=true]:not(:has(.sk)){cursor:progress}
button[aria-busy=true]:not(.pf-icon):not(:has(.sk))::after{content:'';display:inline-block;flex:none;width:.85em;height:.85em;margin-left:.55em;vertical-align:-.12em;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;opacity:.8;animation:iev-spin .7s linear infinite}
@keyframes iev-spin{to{transform:rotate(360deg)}}
/* First data in: the container's first children rise in sequence (once; polls never replay it). */
.iev-in>*{animation:iev-rise .55s var(--ease-out) backwards}
.iev-in>:nth-child(2){animation-delay:.03s}.iev-in>:nth-child(3){animation-delay:.06s}.iev-in>:nth-child(4){animation-delay:.09s}.iev-in>:nth-child(5){animation-delay:.12s}.iev-in>:nth-child(6){animation-delay:.15s}.iev-in>:nth-child(7){animation-delay:.18s}.iev-in>:nth-child(8){animation-delay:.21s}.iev-in>:nth-child(9){animation-delay:.24s}.iev-in>:nth-child(n+10){animation-delay:.27s}
/* Sparklines and chart lines draw in from left to right on their first appearance only. */
.iev-draw svg,svg.iev-draw{animation:iev-wipe 1.15s var(--ease-out) backwards}
@keyframes iev-wipe{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}

/* Page skeleton details. */
.market-card[aria-busy=true] svg{border-radius:5px;background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite}
.range-controls:empty{min-height:35px}
.pro-chart[aria-busy=true]::before{z-index:2;inset:12% 70px 18% 2%}.pro-chart[aria-busy=true] .pro-chart-message{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:701px){#pk-wait{min-height:877px}}#pk-wait .pk-controls .sk{display:block}#pk-wait label .sk{margin-bottom:8px}
.st-turnover-table .skeleton-row span,.gr-setups-table .skeleton-row span{background:var(--sk-fill)!important;background-size:80vw 100%!important;animation:iev-shimmer 2.1s linear infinite!important;opacity:1!important}
.pf-chart[aria-busy=true]{--h:280px}.pf-perf:has(.pf-chart[aria-busy=true]) .pf-chart-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#pf-alloc-bar>.sk{display:block;width:100%}
.si-rank .sk-row{min-height:74.2px}.si-table tbody .sk-row td{height:63px}@media(max-width:700px){.si-rank .sk-row{min-height:104px}.si-table tbody .sk-row td{height:59px}}
#si-status:has(~.si-panel #si-bought[aria-busy=true]){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.tile-spark{--h:40px;margin-top:auto;border-radius:8px}
.page-home .skeleton{background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite}.page-home .skeleton::after{display:none}
.sk-donut{--w:170px;--h:170px;--r:50%;display:block!important;margin:15px auto;-webkit-mask:radial-gradient(circle,transparent 53%,#000 54%);mask:radial-gradient(circle,transparent 53%,#000 54%)}
.sk-gauge{--w:min(300px,100%);--h:auto;--r:999px 999px 0 0;display:block!important;aspect-ratio:2/1;margin:20px auto 30px;-webkit-mask:radial-gradient(circle at 50% 100%,transparent 52%,#000 53%);mask:radial-gradient(circle at 50% 100%,transparent 52%,#000 53%)}
.db-kpi-card.sk-hold .db-kpi .sk{--h:.75em}
.db-chip.sk-hold{min-height:40px}.db-dlist.sk-hold li{height:37.5px;padding:0}
.sk-pillgroup{--h:41px;--r:10px}
@media(max-width:1000px){#fundamentals-table .sk-lines+.sk-lines .sk:nth-child(n+10){display:none}}@media(max-width:700px){#fundamentals-table .sk-lines+.sk-lines .sk:nth-child(n+10){display:block}#fundamentals-table .sk-lines+.sk-lines .sk:nth-child(n+12){display:none}}
.db-select select:empty,.db-controls select:empty{min-width:150px}
@media(max-width:700px){#sentiment-components .sk-chart{--h:150px!important}#fear-details[aria-busy=true]{min-height:311px}.db-stats2[aria-busy=true]{min-height:149px}.db-summary[aria-busy=true]{min-height:250px;align-content:flex-start}}.db-controls select:has(+.sk-pillgroup){display:none}
.db-pills:empty{width:232px;max-width:100%;height:41px;border-color:transparent;background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite}
.sk-gauge{--w:100%!important;margin:34px auto 47px!important}
.rv[data-wait] .rv-chart:empty{--ghost:var(--ghost-bars);--h:346px}.rv[data-wait] .rv-flow:empty{--h:340px}
.ow-card[data-wait] .ow-chart:empty{--ghost:var(--ghost-area);--h:300px}
.sk-lines{display:grid;gap:14px;padding:6px 0 10px}.sk-lines .sk{--h:16px}.sk-lines .sk:first-child{--h:12px;opacity:.7}
.st-chart-panel[aria-busy=true]::before{z-index:2;inset:56px 80px 76px 64px}
.st-chart-panel[aria-busy=true] .st-chart>*{opacity:0}
#stock-status:has(+#stock-content[aria-busy=true]){color:transparent}
.st-chart-panel[aria-busy=true] #stock-chart-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#insights-empty[aria-busy=true]{padding:0;text-align:left}
@media(max-width:700px){.st-chart-panel[aria-busy=true]::before{inset:56px 56px 70px 12px}}
.sk-wrap{display:none!important}
@media(max-width:700px){.sk-wrap{display:inline-block!important}br.sk-wrap{display:inline!important}.market-toolbar #refresh-status{min-height:4.8em}.market-stats .sk-row:nth-child(n+3){min-height:65px}}
.macro-news:has(#macro-rows[aria-busy=true]) :is(#macro-status,#macro-show),.movers:has(#movers-rows[aria-busy=true]) :is(#movers-status,#movers-show){width:fit-content;color:transparent!important;border-color:transparent!important;border-radius:6px;background:var(--sk-fill);background-size:80vw 100%;animation:iev-shimmer 2.1s linear infinite;pointer-events:none}
.chart-wrap[aria-busy=true] #chart-message{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Landing stories come alive as they scroll in: lines draw, areas and heat cells fill in, value marks pop, the
   Fed ladder bars grow from the left (once). */
.reveal-ready .feature.in :is(.vz-line,.vz-ema){stroke-dasharray:1;animation:iev-dash 1.6s var(--ease-out) .35s backwards}
@keyframes iev-dash{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.reveal-ready .feature.in .vz-area{animation:iev-fade 1s var(--ease) .8s backwards}
.reveal-ready .feature.in .vz-heat{transform-box:fill-box;transform-origin:50% 100%;animation:iev-cell .5s var(--ease-out) backwards}
.reveal-ready .feature.in .vz-heat:nth-of-type(1){animation-delay:.9s}.reveal-ready .feature.in .vz-heat:nth-of-type(2){animation-delay:.94s}.reveal-ready .feature.in .vz-heat:nth-of-type(3){animation-delay:.98s}.reveal-ready .feature.in .vz-heat:nth-of-type(4){animation-delay:1.02s}.reveal-ready .feature.in .vz-heat:nth-of-type(5){animation-delay:1.06s}.reveal-ready .feature.in .vz-heat:nth-of-type(6){animation-delay:1.1s}.reveal-ready .feature.in .vz-heat:nth-of-type(7){animation-delay:1.14s}.reveal-ready .feature.in .vz-heat:nth-of-type(8){animation-delay:1.18s}.reveal-ready .feature.in .vz-heat:nth-of-type(9){animation-delay:1.22s}.reveal-ready .feature.in .vz-heat:nth-of-type(10){animation-delay:1.26s}.reveal-ready .feature.in .vz-heat:nth-of-type(n+11){animation-delay:1.3s}
@keyframes iev-cell{from{opacity:0;transform:scale(.4)}}
.reveal-ready .feature.in .viz-svg:has(.vz-up){animation:iev-wipe 1.5s var(--ease-out) .3s backwards}
.reveal-ready .feature.in .vz-cap{transform-box:fill-box;transform-origin:center;animation:iev-cell .55s var(--ease-out) .6s backwards}
.reveal-ready .feature.in .vz-cap-base{animation-delay:.75s}.reveal-ready .feature.in .vz-cap-bull{animation-delay:.9s}
.reveal-ready .feature.in .fed-ladder:not(.is-settled) .ladder-bar{transform-origin:0 50%;animation:iev-grow .9s var(--ease-out) .3s backwards}
.reveal-ready .feature.in .fed-ladder:not(.is-settled) .ladder-row:nth-child(3) .ladder-bar{animation-delay:.38s}.reveal-ready .feature.in .fed-ladder:not(.is-settled) .ladder-row:nth-child(4) .ladder-bar{animation-delay:.46s}.reveal-ready .feature.in .fed-ladder:not(.is-settled) .ladder-row:nth-child(5) .ladder-bar{animation-delay:.54s}.reveal-ready .feature.in .fed-ladder:not(.is-settled) .ladder-row:nth-child(6) .ladder-bar{animation-delay:.62s}
@keyframes iev-grow{from{transform:scaleX(0)}}
.fed-bar.iev-grow{transform-origin:0 50%;animation:iev-grow .9s var(--ease-out) backwards}

/* Sliding selection: underline tabs and segmented controls move one indicator (motion.js sets its box). */
.iev-ink{position:relative}.dashboard-anchor.iev-ink{position:sticky}
.iev-ink::before{content:'';position:absolute;left:0;top:0;width:var(--ink-w,0);height:var(--ink-h,0);transform:translate(var(--ink-x,0),var(--ink-y,0));pointer-events:none;opacity:var(--ink-o,0)}
.iev-ink.ink-ready::before{transition:transform .42s var(--ease-out),width .42s var(--ease-out),height .42s var(--ease-out),opacity .2s}
.iev-ink[data-ink=line]::before{border-radius:3px 3px 0 0;background:var(--gold,#c9971f)}
.iev-ink[data-ink=line]>[aria-selected=true]::after{opacity:0}
.iev-ink[data-ink=pill]::before{z-index:0;border-radius:7px;background:var(--surface);box-shadow:0 1px 2px rgba(15,34,56,.1),0 0 0 1px var(--line)}
:root[data-theme=dark] .iev-ink[data-ink=pill]::before{background:var(--tint);box-shadow:0 0 0 1px var(--line)}
.iev-ink[data-ink=pill]>*{position:relative;z-index:1}
.iev-ink[data-ink=pill]>[aria-pressed=true],.iev-ink[data-ink=pill]>[aria-current=true]{background:transparent!important;box-shadow:none!important;border-color:transparent!important}
.range-controls.iev-ink::before{border-radius:4px;background:var(--tint);box-shadow:0 0 0 1px var(--line)}
.dashboard-anchor.iev-ink::before{border-radius:999px;background:var(--tint);box-shadow:none}

/* Sidebar: the current-page mark draws in, icons lean toward the pointer, the logo answers hover. */
.site-nav a[aria-current]::after{animation:iev-mark .55s var(--ease-out) .12s backwards}
@keyframes iev-mark{from{transform:scaleY(0)}}
@media(max-width:700px){@keyframes iev-mark{from{transform:scaleX(0)}}}
.brand-logo{transition:transform .6s var(--ease-out)}
@media(hover:hover){
 .site-nav a::before{transition:opacity .18s,transform .3s var(--ease-out)}
 .site-nav a:hover::before{transform:translateX(2px)}
 .brand:hover .brand-logo{transform:rotate(-6deg) scale(1.06)}
}

@media(prefers-reduced-motion:reduce){
 .sk,.sk-chart::before,.chart-wrap[aria-busy=true]::before,.st-chart-panel[aria-busy=true]::before,.rv[data-wait] :is(.rv-chart,.rv-flow):empty::before,.ow-card[data-wait] .ow-chart:empty::before,.market-card[aria-busy=true] svg,.page-home .skeleton,.st-turnover-table .skeleton-row span,.gr-setups-table .skeleton-row span,.macro-news:has(#macro-rows[aria-busy=true]) :is(#macro-status,#macro-show),.movers:has(#movers-rows[aria-busy=true]) :is(#movers-status,#movers-show){animation:none}
 .iev-bar::after{animation:none;width:100%;opacity:.5}
 button[aria-busy=true]:not(.pf-icon):not(:has(.sk))::after{animation:none;border-right-color:currentColor;opacity:.35}
}

/* White-on-transparent company logos sit on a navy tile (company-mark.js measures and flags them). */
.is-light-logo{background:#14263d!important}
/* A stock tab opened from a link waits for its module at the height it will have, so the footer never jumps up; the
   revenue controls keep their row while the filings load. */
#stock-earnings:empty,#stock-revenue:empty,#stock-ownership:empty{min-height:70vh}
@media (min-width:701px){.rv[data-wait] .rv-controls{min-height:42px}}
/* Financials tab without data (ETF, bank, IFRS filer, SEC trouble): no period selects or quote bar that can never fill. */
.st-fin-off :is(.period-controls,.market-connection){display:none}
/* The revenue subtitle keeps its line while the filings load. */
.rv[data-wait] .rv-sub:empty::before{content:"\00a0"} .rv[data-wait] .rv-legend:empty{min-height:20px}

/* Phones use the same compact EN | 中文 switch as the desktop sidebar: each language named in its own script, never "Chinese". */
@media(max-width:700px){
 body:not(.page-home) header .language-switch button{font-size:0!important;min-width:46px}
 body:not(.page-home) header .language-switch button::after{font-size:14px;font-weight:600;letter-spacing:.02em}
 body:not(.page-home) header .language-switch [data-language=en]::after{content:'EN'}
 body:not(.page-home) header .language-switch [data-language=zh]::after{content:'中文'}
}
