
:root{--bg:#090f1c;--panel:#111c2e;--line:#26334a;--text:#ecf0f8;--muted:#9aaac0;--gold:#edc681;--up:#ff647a;--down:#41c79a}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,'PingFang TC',sans-serif;font-size:15px}button,input,select{font:inherit}button,select,.upload{border:1px solid var(--line);background:#172339;color:var(--text);border-radius:9px;padding:10px 14px;cursor:pointer;min-height:44px}button:hover,.upload:hover{border-color:var(--gold)}button.active{background:#edc681;color:#172033;border-color:var(--gold)}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #8bbfff;outline-offset:3px}header{height:80px;padding:20px 28px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:22px}.brand{font-size:27px;font-weight:850;color:var(--gold);letter-spacing:2px}.brand small{display:block;font-size:9px;letter-spacing:1px;color:var(--muted)}header .name{font-size:18px}header .right{margin-left:auto;display:flex;gap:10px;align-items:center}.badge{font-size:12px;color:var(--gold);border:1px solid #63513a;padding:6px 10px;border-radius:20px}.shell{display:grid;grid-template-columns:235px minmax(0,1fr);max-width:1800px;margin:auto;min-height:calc(100vh - 80px)}aside{padding:24px 16px;border-right:1px solid var(--line)}h1{font-size:20px;margin:0 0 6px}p{color:var(--muted);line-height:1.7}input[type=search]{width:100%;background:var(--bg);border:1px solid var(--line);border-radius:8px;color:white;padding:12px;margin:18px 0 10px}aside select{width:100%;margin-bottom:15px}.stock{width:100%;display:block;text-align:left;margin-bottom:8px;background:transparent;padding:15px 12px}.stock b{font-size:19px}.stock small{display:block;margin-top:6px;color:var(--muted)}.stock.active small{color:#444b55}.hint{font-size:12px;color:var(--muted);line-height:1.8;margin-top:20px}main{padding:26px;min-width:0}.eyebrow{color:var(--gold);font-size:11px;letter-spacing:2px}.stock-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:10px 0 20px}h2{font-size:32px;margin:0 0 7px}.sub{color:var(--muted);font-size:13px}.price{font-size:25px;font-weight:750;text-align:right}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}.metric{padding:16px 18px;background:var(--panel);border:1px solid var(--line);border-radius:12px}.metric span{color:var(--muted);font-size:12px}.metric strong{display:block;font-size:25px;margin-top:6px}.content{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.card{border:1px solid var(--line);border-radius:14px;background:var(--panel);overflow:hidden}.card-top{padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.card-top h3{font-size:16px;margin:0}.tabs{display:flex;gap:5px}.tabs button{min-height:38px;padding:6px 12px;font-size:13px}.chart{padding:0 14px}svg{width:100%;display:block}#chart{height:310px}.chart-info{margin:0 18px;padding:10px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:12px;min-height:38px}.timeline{padding:12px 18px 18px}.fund-row{border-top:1px solid var(--line);padding:12px 0}.fund-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.fund-heading button{background:none;border:0;padding:4px 0;text-align:left;min-height:35px;font-size:13px}.fund-heading .active{color:var(--gold)}.fund-heading small{color:var(--muted)}.track{position:relative;height:34px;margin:4px 54px 0 30px;background:linear-gradient(transparent 48%,#344258 48%,#344258 52%,transparent 52%)}.dot{position:absolute;top:4px;padding:0;width:26px;min-height:26px;height:26px;border-radius:50%;transform:translateX(-50%);font-size:12px;font-weight:bold;border:2px solid var(--panel)}.dot.selected{outline:2px solid var(--gold)}.entry,.reentry,.increase{color:var(--up)}.exit,.decrease{color:var(--down)}.dot.entry,.dot.reentry,.dot.increase{background:var(--up);color:#111}.dot.exit,.dot.decrease{background:var(--down);color:#111}.dot.observed{background:#a9b5c9;color:#111}.dot.unknown{background:#414a5d;color:white}.legend{display:flex;gap:18px;flex-wrap:wrap;color:var(--muted);font-size:12px;padding:0 18px 16px}.events-head{padding:18px;border-bottom:1px solid var(--line)}.events-head h3{margin:0 0 12px}.events-head select{width:100%;font-size:13px}.events{max-height:665px;overflow:auto;padding:0 14px 14px}.event{width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 5px}.event.selected{background:#1d2a40;border-left:3px solid var(--gold);padding-left:10px}.event .date{font-size:12px;color:var(--muted);display:flex;justify-content:space-between}.event b{display:block;margin:9px 0;font-size:14px}.event .change{font-size:18px;font-weight:700}.event small{display:block;color:var(--muted);margin-top:6px;font-size:12px}.foot{font-size:12px;color:var(--muted);margin-top:15px;line-height:1.8}.message{color:var(--gold);font-size:13px;padding:8px 0}.empty{padding:25px;color:var(--muted)}details{margin-top:20px;color:var(--muted);font-size:13px}summary{cursor:pointer;padding:10px}#file{display:none}.mobile-nav{display:none}
@media(max-width:1150px){.content{grid-template-columns:1fr}.events{max-height:380px;display:grid;grid-template-columns:1fr 1fr;gap:0 18px}}
@media(max-width:700px){header{height:66px;padding:12px 16px;gap:12px}.brand{font-size:22px}header .name{font-size:13px}.badge{display:none}.upload{font-size:12px;padding:9px}.shell{display:block}aside{border-right:0;border-bottom:1px solid var(--line);padding:12px 16px}aside h1,aside>p,aside .hint{display:none}.picker{display:flex;gap:8px}input[type=search]{margin:0;flex:1;min-width:0}aside select{margin:0;width:130px;font-size:12px}#stocks{display:flex;gap:8px;overflow:auto;margin-top:10px}.stock{flex:0 0 145px;margin:0;padding:10px}.stock b{font-size:15px}.stock small{font-size:11px}main{padding:18px 12px}h2{font-size:26px}.stock-head{align-items:start}.price{font-size:20px}.metrics{gap:6px}.metric{padding:12px 9px}.metric strong{font-size:20px}.metric span{font-size:11px}.content{display:block}.content>.card{margin-bottom:15px}#chart{height:250px}.timeline{display:none}.events{display:block;max-height:none}.event{padding:16px 8px}.foot{padding:0 4px}.mobile-nav{display:flex;gap:8px;margin:12px 0}.mobile-nav button{flex:1}.card-top{padding:14px}.chart{padding:0 3px}.eyebrow{font-size:10px}}
@media(max-width:700px){.brand small{display:none}header .name{font-size:12px}.upload{white-space:nowrap}header .right{flex-shrink:0}.track{display:none}}

a{color:var(--gold)}header .right a{font-size:13px;padding:10px}#volume{height:55px}#priceDate{font-size:12px;color:var(--muted);text-align:right;margin-top:6px}.mobile-nav{display:flex;gap:10px}.mobile-nav button{flex:1}.timeline{padding:12px 14px 18px}.track{margin:4px 48px 0 0}.dot.reported,.dot.unknown{background:#63738c;color:white}.dot.resumed{background:#acb7c7;color:#111}.fund-heading{flex-wrap:wrap}.fund-heading small{font-size:12px}.lookup{width:100%;margin:8px 0}.event small{overflow-wrap:anywhere}#stocks{max-height:65vh;overflow:auto}#chart{height:280px}#chart line:not(.event-marker),#volume line{opacity:.35}#userLabel{font-size:12px;color:var(--muted)}@media(max-width:700px){header .right a{padding:6px;font-size:11px}#userLabel{display:none}.lookup{width:100%}#stocks{max-height:none}#chart{height:280px}#volume{height:55px}.timeline{display:none}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.stock-head{flex-wrap:wrap}header{height:auto;min-height:66px}.brand{font-size:20px}header .name{max-width:90px}.foot{overflow-wrap:anywhere}}

.play-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:0 18px 14px}.play-controls label{font-size:12px;color:var(--muted)}.play-controls select{padding:6px;min-height:40px}#playStatus{font-size:12px;color:var(--gold)}[hidden]{display:none!important}.fund-flow{margin:12px 18px;border-top:1px solid var(--line);padding-top:12px}.fund-flow h3{font-size:15px;margin:0 0 8px}.fund-flow h3 small,.fund-flow p,#fundFlowInfo{color:var(--muted);font-size:12px;font-weight:400}.fund-flow p{margin-bottom:0}#fundFlowChart{height:120px}.fund-day-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;max-height:180px;overflow:auto;margin-top:10px}.fund-day-rows>div{display:flex;gap:12px;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:8px 0;font-size:12px}.fund-day-rows strong{white-space:nowrap;font-size:15px}.replay-open{overflow:hidden}#player.replaying{position:fixed;inset:0;z-index:9999;width:100%;height:100%;height:100dvh;overflow:auto;border:0;border-radius:0;padding:6px max(10px,env(safe-area-inset-right)) 12px max(10px,env(safe-area-inset-left));background:#0e192a}#player.replaying .tabs,#player.replaying .timeline,#player.replaying .history-heading,#player.replaying .legend{display:none}#player.replaying #chart{height:clamp(180px,40vh,520px)}#player.replaying #volume{height:45px}#player.replaying .fund-flow{margin-top:8px}#player.replaying .fund-day-rows{max-height:20vh}#player.replaying #fundFlowChart{height:100px}#player.replaying .card-top{padding:12px 18px}#player.replaying .chart-info{min-height:30px;padding:6px 0}@media(max-width:700px){.fund-day-rows{grid-template-columns:1fr}.play-controls{padding:0 12px 12px;gap:8px}.fund-flow{margin:12px}.replaying .play-controls button{flex:1}.replaying .play-controls label{flex-basis:100%}#player.replaying #chart{height:30vh;min-height:160px}#player.replaying .fund-day-rows{max-height:24vh}}

.fund-flow{margin-left:14px;margin-right:14px}@media(max-width:700px){.fund-flow{margin-left:3px;margin-right:3px}}

/* Holdings-first view. Charts only appear while replaying. */
#player:not(.replaying)>.chart,#player:not(.replaying)>#chartInfo,#player:not(.replaying) .tabs,#player:not(.replaying) #fundFlowChart,#player:not(.replaying) .play-axis,#player:not(.replaying) .play-controls label,#player .timeline,#player .history-heading,#player .legend{display:none}
.content{grid-template-columns:minmax(0,1fr) 300px}.fund-day-rows{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible;gap:10px}.fund-day-rows>.holding-card{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:12px;border:1px solid var(--line);border-radius:9px;background:#132036;min-width:0}.holding-name{display:flex;flex-direction:column;gap:3px;min-width:0}.holding-name b{font-size:15px;color:var(--gold)}.holding-name span{font-size:12px;line-height:1.4;overflow-wrap:anywhere}.holding-numbers{display:flex;flex-direction:column;gap:4px}.holding-numbers strong{font-size:18px}.holding-numbers>span,.holding-state{font-size:12px;color:var(--muted)}.holding-numbers .increase{color:var(--up)}.holding-numbers .decrease{color:var(--down)}.play-axis{display:flex;align-items:center;gap:12px;margin:6px 18px;font-size:12px;color:var(--gold)}#playSeek{flex:1;min-width:40px;height:36px;accent-color:var(--gold);cursor:pointer}#seekDate{white-space:nowrap;font-variant-numeric:tabular-nums}
#player.replaying #chart{height:30vh;min-height:170px;max-height:360px}#player.replaying #volume{height:32px}#player.replaying #fundFlowChart{height:55px}#player.replaying .fund-day-rows{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;overflow:visible;gap:6px 12px}#player.replaying .holding-card{grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:6px 10px}#player.replaying .holding-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#player.replaying .holding-numbers{align-items:flex-end;justify-content:center;grid-column:2;grid-row:1 / 3}#player.replaying .holding-state{grid-column:1}#player.replaying .holding-numbers strong{font-size:16px}#player.replaying .card-top{padding:8px 18px}#player.replaying .play-controls{padding-bottom:6px}#player.replaying .fund-flow{padding-top:6px;margin-top:6px}#player.replaying .fund-flow h3{margin-bottom:2px}
@media(min-width:701px){aside{position:sticky;top:0;height:100vh;overflow-y:auto}#stocks{max-height:calc(100vh - 330px);min-height:160px}.hint{margin-top:10px}}
@media(max-width:1150px){.content{grid-template-columns:1fr}.fund-day-rows{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.fund-day-rows{grid-template-columns:1fr}.play-axis{flex-wrap:wrap;margin:6px 12px;gap:6px}#seekDate{flex-basis:100%;text-align:right}#player.replaying .fund-day-rows{grid-template-columns:1fr}#player.replaying #chart{height:26vh}#player.replaying .play-controls label{flex-basis:auto}#player.replaying .holding-card{padding:8px 10px}}
@media(min-width:701px){#player.replaying #chart{height:26vh}#player.replaying .holding-name{flex-direction:row;align-items:center;gap:8px}#player.replaying .holding-name b{flex-shrink:0;font-size:13px}#player.replaying .holding-name span{font-size:11px;min-width:0}#player.replaying .holding-card{padding:5px 8px;gap:2px 8px;min-height:50px}#player.replaying .holding-state{font-size:10px;line-height:12px}#player.replaying .holding-numbers{gap:2px}#player.replaying .holding-numbers strong{font-size:15px;line-height:18px}#player.replaying .holding-numbers>span{font-size:11px;line-height:14px}}
/* v4: website navigation and stock overview, with a separate query page. */
body[data-page=overview] .shell{grid-template-columns:160px minmax(0,1fr);max-width:none}body[data-page=overview] main{padding:18px 22px}body[data-page=overview] .site-sidebar{padding:12px 8px;background:#0f1a2e;position:sticky;top:0;height:100vh;overflow:auto}body[data-page=overview] .sidebar-nav{display:flex;flex-direction:column;gap:3px}body[data-page=overview] .nav-item{display:flex;align-items:center;gap:7px;padding:9px 6px;border-radius:6px;font-size:13px;color:#b8c4d9;text-decoration:none;min-height:38px}body[data-page=overview] .nav-item svg{width:15px;height:15px;flex-shrink:0}body[data-page=overview] .nav-item:hover{background:#1b2e4c}body[data-page=overview] .nav-item[aria-current=page]{background:#4070d8;color:white}#sidebarSignOut{width:100%;margin-top:10px}body[data-page=overview] .stock-head,body[data-page=overview] .metrics,body[data-page=overview] .mobile-nav,body[data-page=overview] .history-panel,body[data-page=overview] main>.foot,body[data-page=overview] main>details{display:none}body[data-page=overview] #player:not(.replaying){display:none}body[data-page=overview] .content{display:block}body[data-page=overview] #stocks.stock-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:9px;max-height:none;overflow:visible;margin:10px 0}body[data-page=overview] .stock{margin:0;padding:12px;min-height:100px;min-width:0;border-radius:8px}body[data-page=overview] .stock b{display:flex;flex-wrap:wrap;gap:5px;font-size:17px}body[data-page=overview] .stock small{font-size:12px;margin-top:5px}body[data-page=overview] .stock.active{outline:3px solid var(--gold);outline-offset:1px;background:#27364f;color:#fff}body[data-page=overview] .stock.active small{color:var(--muted)}body[data-page=overview] .stock .increase{color:var(--up)}body[data-page=overview] .stock .decrease{color:var(--down)}.overview-heading{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap}.overview-heading h1{font-size:23px}.overview-heading #gridInfo{font-size:12px;color:var(--muted)}.grid-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.grid-actions span{font-size:12px;color:var(--muted)}body[data-page=overview] #notice{min-height:30px;font-size:12px}
/* Fixed full-screen layout: 23 funds = three columns, eight compact rows. */
@media(min-width:701px){
 #player.replaying{display:grid;grid-template-rows:auto auto minmax(150px,1fr) auto auto auto;align-content:stretch;padding:4px 12px 6px;gap:0;height:100dvh;overflow:auto}
 #player.replaying>.card-top{padding:3px 10px;min-height:24px}#player.replaying>.card-top h3{font-size:15px}
 #player.replaying .play-controls{padding:3px 10px;gap:8px}#player.replaying .play-controls button{min-height:34px;padding:5px 12px;font-size:12px}#player.replaying .play-controls select{min-height:30px;padding:4px;font-size:12px}#player.replaying #playStatus{font-size:11px}
 #player.replaying>.chart{min-height:150px;height:auto;display:grid;grid-template-rows:minmax(0,1fr) 24px;padding:0 10px}
 #player.replaying #chart{height:100%;min-height:0;max-height:none}#player.replaying #volume{height:24px}
 #player.replaying #chartInfo{margin:0 10px;padding:1px 0;min-height:16px;font-size:10px;line-height:14px}
 #player.replaying .play-axis{margin:1px 10px;gap:8px;min-height:30px;font-size:11px}#player.replaying #playSeek{height:28px}
 #player.replaying .fund-flow{margin:0 10px;padding-top:3px;min-height:0}#player.replaying .fund-flow h3{font-size:12px;line-height:16px;margin:0}#player.replaying #fundFlowChart{display:none}#player.replaying #fundFlowInfo{font-size:10px;line-height:14px}
 #player.replaying .fund-day-rows{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 8px;margin:3px 0 0;max-height:none}
 #player.replaying .holding-card{height:38px;min-height:38px;padding:2px 7px;gap:0 5px;border-radius:6px;grid-template-rows:18px 14px;align-items:center}
 #player.replaying .holding-name{gap:5px;line-height:15px}#player.replaying .holding-name b{font-size:12px}#player.replaying .holding-name span{font-size:10px;line-height:14px}
 #player.replaying .holding-state{font-size:10px;line-height:12px}#player.replaying .holding-numbers strong{font-size:14px;line-height:16px}#player.replaying .holding-numbers>span{font-size:10px;line-height:12px}#player.replaying .fund-flow p{font-size:10px;line-height:13px;margin:2px 0 0}
}
.fund-marker{cursor:pointer}.fund-marker:focus{outline:1px solid var(--gold)}
@media(max-width:700px){body[data-page=overview] .shell{display:block}body[data-page=overview] .site-sidebar{position:static;height:auto;padding:6px 10px}body[data-page=overview] .sidebar-nav{flex-direction:row;overflow-x:auto}body[data-page=overview] .nav-item{flex-shrink:0}body[data-page=overview] #sidebarSignOut{width:auto;margin:4px 0}body[data-page=overview] main{padding:12px}body[data-page=overview] #stocks.stock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-page=overview] .stock{min-height:96px}body[data-page=overview] .stock b{font-size:15px}.grid-actions span{flex-basis:100%}#player.replaying #fundFlowChart{display:none}}
.stock-card-open{overflow:hidden}.stock-card-backdrop{position:fixed;inset:0;z-index:9000;background:#030913b8;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(3px)}#stockCard{width:min(530px,100%);max-height:80dvh;display:flex;flex-direction:column;background:#111d30;border:1px solid #4f6381;border-radius:16px;box-shadow:0 24px 80px #0009;padding:20px;outline:none}.stock-card-heading{display:flex;gap:14px;align-items:flex-start;justify-content:space-between}.stock-card-heading h2{font-size:25px;margin:0}.stock-card-heading p{margin:5px 0 0;color:var(--muted);font-size:12px}#closeStockCard{flex-shrink:0}#stockCardStatus{font-size:12px;line-height:1.5;margin:12px 0 8px;color:var(--gold)}#stockCardFunds{list-style:none;margin:0 0 14px;padding:0;overflow:auto;min-height:50px;display:grid;grid-template-columns:1fr;gap:5px}#stockCardFunds li{padding:9px 10px;border-radius:7px;background:#1a2941;color:var(--text);font-size:14px;line-height:1.4}.stock-card-controls{display:flex;gap:8px}.stock-card-controls button{flex:1;font-size:13px}.stock-card-hint{margin:10px 0 0;font-size:12px;text-align:center;color:var(--muted)}#prevDay{display:none}#player.replaying #prevDay{display:inline-block}
#player.replaying .holding-card.activity-buy{background:#452131;border-color:#ff647a;box-shadow:inset 3px 0 #ff647a}#player.replaying .holding-card.activity-sell{background:#163e32;border-color:#41c79a;box-shadow:inset 3px 0 #41c79a}#player.replaying .holding-card.pulse-buy{animation:fund-buy-flash .48s ease-out 1}#player.replaying .holding-card.pulse-sell{animation:fund-sell-flash .48s ease-out 1}@keyframes fund-buy-flash{0%{background:#452131}35%{background:#aa334d}100%{background:#452131}}@keyframes fund-sell-flash{0%{background:#163e32}35%{background:#21875d}100%{background:#163e32}}@media(prefers-reduced-motion:reduce){#player.replaying .holding-card.pulse-buy,#player.replaying .holding-card.pulse-sell{animation:none}}@media(max-width:700px){.stock-card-backdrop{padding:12px}#stockCard{padding:15px;max-height:85dvh}.stock-card-heading h2{font-size:23px}#stockCardFunds li{font-size:13px}}

/* Query page keeps the price history visible alongside the event record. */
body[data-page=query] #player:not(.replaying) .chart,body[data-page=query] #player:not(.replaying) #chartInfo,body[data-page=query] #player:not(.replaying) #interval{display:block}
body[data-page=query] #player:not(.replaying) #volume{height:55px}
.date-filters{padding:12px 18px;display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--line)}.date-filters label{font-size:12px;color:var(--muted);flex:1;min-width:110px}.date-filters input{display:block;width:100%;min-height:44px;margin-top:5px;color:var(--text);background:#172339;border:1px solid var(--line);border-radius:7px;padding:6px;color-scheme:dark}.date-filters button{font-size:12px}.date-filters #rangeStatus{width:100%;font-size:12px;color:var(--gold)}body[data-page=overview] .stock .market-value{color:var(--gold);font-weight:650}

#stockCardFunds li{padding:0}.fund-detail-link{display:flex;justify-content:space-between;width:100%;text-align:left;border:1px solid transparent;background:#1a2941;font-size:14px;line-height:1.5;padding:12px}.fund-detail-link span{color:var(--gold)}.fund-detail-backdrop{position:fixed;inset:0;z-index:9500;background:#030913d9;display:flex;align-items:center;justify-content:center;padding:24px}#fundDetail{display:flex;flex-direction:column;width:min(1050px,96vw);max-height:88dvh;border:1px solid #526786;border-radius:16px;background:#111d30;padding:24px;box-shadow:0 24px 80px #0009}.fund-detail-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.fund-detail-heading h2{font-size:23px}.fund-detail-heading p{margin:5px 0;font-size:13px}#closeFundDetail{flex-shrink:0}#fundDetailStatus{color:var(--gold);font-size:13px}.fund-detail-scroll{overflow:auto;min-height:100px}#fundDetail table{border-collapse:collapse;width:100%;font-size:14px}#fundDetail th{position:sticky;top:0;background:#20314a;text-align:right;white-space:nowrap;padding:12px}#fundDetail td{padding:12px;border-bottom:1px solid #2a3951;text-align:right;white-space:nowrap}#fundDetail th:first-child,#fundDetail td:first-child{text-align:left}#fundDetail .highlight-stock{background:#493c25;color:#f4d79f}.fund-detail-note{font-size:12px;line-height:1.6;margin-bottom:0}@media(max-width:700px){.fund-detail-backdrop{padding:10px}#fundDetail{width:100%;padding:14px;max-height:92dvh}.fund-detail-heading{flex-wrap:wrap}.fund-detail-heading h2{font-size:18px}#fundDetail td,#fundDetail th{padding:10px 8px;font-size:12px}}

.etf-page-nav{display:grid;gap:8px;margin-bottom:18px}.etf-page-nav a{display:block;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--gold);text-decoration:none;font-weight:700}body[data-page="query"] #title{white-space:nowrap}body[data-page="query"] #showHoldingFunds{text-align:left;width:100%}body[data-page="query"] #stockCard .stock-card-controls,body[data-page="query"] #stockCard .stock-card-hint{display:none}

body[data-page="query"] .mobile-nav[hidden]{display:none!important}.query-stock-head{display:flex;align-items:center;justify-content:flex-start;gap:clamp(24px,4vw,72px);flex-wrap:wrap;margin:16px 0 22px}.query-stock-head .stock-identity{margin-right:auto}.query-stock-head .quote-item{text-align:left;min-width:95px}.quote-item>span{display:block;color:var(--muted);font-size:13px;margin-bottom:8px}.quote-item strong{display:block;font-size:25px}.quote-up{color:#ff647a}.quote-down{color:#41c79a}.query-stock-head #subtitle{font-size:12px}.query-stock-head #priceDate{font-size:12px}@media(max-width:700px){.query-stock-head{gap:20px}.query-stock-head .stock-identity{flex-basis:100%}.query-stock-head .quote-item{min-width:80px}.query-stock-head .price,.query-stock-head .quote-item strong{font-size:22px}}

body[data-page="query"] header{position:relative;min-height:68px;height:68px;padding-top:10px;padding-bottom:10px}body[data-page="query"] header #userLabel{position:absolute;left:50%;transform:translateX(-50%);font-size:14px;white-space:nowrap}body[data-page="query"] header .name{font-size:14px;max-width:160px}body[data-page="query"] main{padding-top:10px}body[data-page="query"] .query-stock-head{margin:0 0 12px}body[data-page="query"] .query-stock-head h2{font-size:28px;margin-bottom:4px}body[data-page="query"] #priceDate{display:none}body[data-page="query"] .metrics{margin-bottom:12px}body[data-page="query"] .metric{padding:10px 16px}body[data-page="query"] .metric strong{margin-top:3px;font-size:22px}.query-toolbar{display:contents}#player:not(.replaying) .query-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px}#player:not(.replaying) .query-toolbar>.card-top,#player:not(.replaying) .query-toolbar>.play-controls{display:contents}#player:not(.replaying) .query-toolbar #playerTitle{order:0;white-space:nowrap}#player:not(.replaying) .query-toolbar #play{order:1;font-size:13px;padding:8px 10px}#player:not(.replaying) .query-toolbar #playStatus{order:2;font-size:12px}#player:not(.replaying) .query-toolbar #interval{order:3;display:flex;margin-left:auto}#player:not(.replaying) .query-toolbar #interval button{padding:6px 8px}@media(max-width:1100px){body[data-page="query"] header .name{display:none}}@media(max-width:700px){body[data-page="query"] header #userLabel{position:static;transform:none;margin-left:auto;white-space:normal;text-align:center}body[data-page="query"] header .right{margin-left:0}body[data-page="query"] header{height:auto;min-height:66px}.query-toolbar #playStatus{flex-basis:100%}}

/* v17: query page shares the site sidebar; both ETF pages are compacted. */
@media(min-width:701px){
body[data-page=query] .shell{grid-template-columns:160px 210px minmax(0,1fr);max-width:none}
body[data-page=query] .site-sidebar{padding:12px 8px;background:#0f1a2e;position:sticky;top:0;height:100vh;overflow:auto}
body[data-page=query] .query-picker{padding:14px 12px}
}
body[data-page=query] .sidebar-nav{display:flex;flex-direction:column;gap:3px}
body[data-page=query] .nav-item{display:flex;align-items:center;gap:7px;padding:9px 6px;border-radius:6px;font-size:13px;color:#b8c4d9;text-decoration:none;min-height:38px}
body[data-page=query] .nav-item svg{width:15px;height:15px;flex-shrink:0}
body[data-page=query] .nav-item:hover{background:#1b2e4c}
body[data-page=query] .nav-item[aria-current=page]{background:#4070d8;color:#fff}
body[data-page=overview],body[data-page=query]{font-size:14px}
body[data-page=overview] header,body[data-page=query] header{height:54px;padding:8px 18px;gap:14px}
body[data-page=overview] .brand,body[data-page=query] .brand{font-size:21px;letter-spacing:1px}
body[data-page=overview] .brand small,body[data-page=query] .brand small{font-size:8px}
body[data-page=overview] header .name,body[data-page=query] header .name{font-size:14px}
body[data-page=overview] .shell,body[data-page=query] .shell{min-height:calc(100vh - 54px)}
body[data-page=overview] main,body[data-page=query] main{padding:14px 18px}
body[data-page=overview] .metrics,body[data-page=query] .metrics{gap:10px;margin-bottom:14px}
body[data-page=overview] .metric,body[data-page=query] .metric{padding:11px 14px}
body[data-page=overview] .metric strong,body[data-page=query] .metric strong{font-size:20px}
body[data-page=overview] .price,body[data-page=query] .price,body[data-page=query] .quote-item strong{font-size:20px}
body[data-page=overview] h2{font-size:24px}
body[data-page="query"] .query-stock-head h2{font-size:22px}
body[data-page=overview] .overview-heading h1{font-size:20px}
body[data-page=overview] #stocks.stock-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px}
body[data-page=overview] .stock{min-height:86px;padding:10px}
body[data-page=overview] .stock b{font-size:15px}
@media(min-width:1151px){body[data-page=overview] .content,body[data-page=query] .content{grid-template-columns:minmax(0,1fr) 270px}}
@media(max-width:700px){
body[data-page=query] .shell{display:block}
body[data-page=query] .site-sidebar{position:static;height:auto;padding:6px 10px}
body[data-page=query] .sidebar-nav{flex-direction:row;overflow-x:auto}
body[data-page=query] .nav-item{flex-shrink:0}
body[data-page=query] #sidebarSignOut{width:auto;margin:4px 0}
body[data-page=overview] header,body[data-page=query] header{height:auto;min-height:48px;padding:8px 12px}
}
@media(min-width:701px){
body[data-page=query] .stock{padding:9px 12px;margin-bottom:6px}
body[data-page=query] .stock b{font-size:15px}
body[data-page=query] .stock small{margin-top:3px;font-size:12px}
}
body[data-page=overview] header .name,body[data-page=query] header .name{white-space:nowrap}

/* v18: card code/name alternates light red / white in a checkerboard (set by JS). */
body[data-page=overview] .stock b{color:#fff}
body[data-page=overview] .stock.tone-red b,body[data-page=overview] .stock.tone-red b span{color:#ff9aa8}

/* v20 */
#fundFlowInfo:empty{display:none}
.events-head h3{color:#ff9aa8}
body[data-page=query] .query-picker h1{color:#ff9aa8}
body[data-page=query] .query-tagline{font-size:15px;line-height:1.5;margin:0;color:#fff}

/* v22: centered member name + tier in header; breadcrumb removed. */
header{position:relative}
.header-user{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:8px;max-width:46%;white-space:nowrap}
.header-user #userLabel{font-size:14px;color:var(--text);overflow:hidden;text-overflow:ellipsis}
.u-tier{font-size:10.5px;font-weight:700;padding:2px 7px;border-radius:999px}
.u-tier.permanent{background:rgba(245,193,108,.15);color:var(--gold);border:1px solid var(--gold)}
.u-tier.normal{background:rgba(51,88,224,.15);color:#7f9bff;border:1px solid #3358e0}
.u-tier.none{background:rgba(138,147,166,.12);color:var(--muted);border:1px solid var(--muted)}
.u-tier[hidden]{display:none}
@media(max-width:700px){.header-user{position:static;transform:none;margin:0 auto;max-width:48%}.header-user #userLabel{font-size:12px}}
.header-user #userLabel{min-width:0;flex:0 1 auto}
@media(max-width:700px){.header-user{flex:0 1 auto;min-width:0;max-width:58%}.header-user #userLabel{max-width:96px;text-overflow:ellipsis;overflow:hidden}}

/* v23: war-room pill beside stock names; header user box overrides legacy rules. */
.title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.title-row h2{margin:0}
.war-room-btn{display:inline-flex;align-items:center;justify-content:center;padding:3px 14px;border-radius:999px;background:rgba(125,200,255,.16);border:1px solid #6bb8f0;color:#a5dcff;font-size:12px;font-weight:700;line-height:1.5;text-decoration:none;white-space:nowrap}
.war-room-btn:hover{background:rgba(125,200,255,.3);color:#fff}
.war-room-btn:focus-visible{outline:3px solid #8bbfff;outline-offset:2px}
.war-room-btn[hidden]{display:none}
body header .header-user #userLabel,body[data-page=query] header .header-user #userLabel{display:inline;position:static;transform:none;margin:0;white-space:nowrap}

/* v25 彈出小卡補上桌面卡片原有的四項資料 */
.stock-card-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;margin:12px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#0c1626;font-size:14px;color:#cdd8ea}
.stock-card-stats:empty{display:none}
.stock-card-stats .market-value{color:var(--gold);font-weight:650}
.stock-card-stats .increase{color:var(--up)}
.stock-card-stats .decrease{color:var(--down)}

/* v26 說明按鈕進了標題列，窄螢幕把程式版本號收起來，避免擠出畫面。 */
@media(max-width:700px){header .right .build-version{display:none}}

/* 2026-10-31 adjacent holding rows, preserve selected stock. */
#fundDetail #fundDetailBody > tr:nth-child(odd):not(.highlight-stock){background-color:#111d30}
#fundDetail #fundDetailBody > tr:nth-child(even):not(.highlight-stock){background-color:#1b2c45}
#fundDetail #fundDetailBody > tr.highlight-stock{background-color:#493c25;color:#f4d79f}
