/* Stocks owns its secondary navigation; the legacy global sidebar stays hidden. */
.site-enabled .site-stocks .app{width:min(1560px,calc(100% - 48px))}
.site-stocks .stock-workspace{display:flex;align-items:flex-start;gap:20px;min-width:0}
.stock-workspace:fullscreen{background:var(--site-bg);padding:16px;overflow:auto;box-sizing:border-box;width:100%;height:100%;align-items:flex-start}
.stock-workspace:fullscreen .stock-section-nav{top:0}
.site-stocks .stock-section-nav{width:152px;flex:0 0 152px;position:sticky;top:82px;padding:8px;border:1px solid var(--site-border-two);border-radius:12px;background:var(--site-surface-glass);color:var(--site-text)}
.stock-section-nav-head{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:42px;padding:0 6px 8px;color:var(--site-muted);font-size:13px}
.stock-section-nav nav{display:grid;gap:5px}
.site-stocks .stock-section-nav nav a{display:flex;align-items:center;gap:12px;min-height:42px;padding:9px 12px;border:1px solid transparent;border-radius:8px;color:var(--site-muted);font-size:14px;text-decoration:none;white-space:nowrap}
.site-stocks .stock-section-nav nav a:hover{color:var(--site-text);background:var(--site-hover)}
.site-stocks .stock-section-nav nav a[aria-current=page]{color:var(--site-accent);border-color:var(--site-border-four);background:color-mix(in srgb,var(--site-accent) 10%,transparent)}
.stock-section-nav svg,.stock-eod-status svg,.stock-search-form svg{width:19px;height:19px;flex:0 0 19px;display:block}
.site-stocks .stock-section-nav.is-collapsed{width:58px;flex-basis:58px}
.stock-section-nav.is-collapsed nav a{justify-content:center;padding-inline:8px}
.stock-section-nav.is-collapsed nav a span,.stock-section-nav.is-collapsed .stock-section-nav-head>span{display:none}
.stock-section-nav.is-collapsed .stock-section-nav-head{justify-content:center;padding-inline:0}
.site-stocks .stock-page{width:100%;min-width:0;flex:1;margin:0;gap:12px;animation:none}
.site-stocks .stock-topbar{margin:0;gap:12px;min-height:0}
.site-stocks .stock-search-zone{max-width:580px;min-width:0;flex:1}
.site-stocks .stock-search-form{background:var(--site-surface-glass);border-color:var(--site-border-two);border-radius:8px;min-height:42px;padding:5px 10px;gap:8px}
.site-stocks .stock-search-input{font-size:14px;color:var(--site-text);min-width:0}
.site-stocks .stock-search-input::placeholder{color:var(--site-muted);opacity:1}
.stock-eod-status{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px;color:var(--site-muted);font-size:12px}
.stock-eod-status>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0;line-height:1.6}
.stock-eod-status strong{color:var(--site-text);font-weight:500;font-variant-numeric:tabular-nums}
.stock-eod-dot{width:5px;height:5px;border-radius:50%;background:var(--site-accent);flex-shrink:0}
.stock-eod-status.is-warning .stock-eod-dot{background:#d6ac66}
.stock-eod-status .stock-action{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;flex-shrink:0}
.stock-eod-status svg{width:14px;height:14px;flex-basis:14px}
.stock-mode-tabs{display:flex;gap:6px;padding-bottom:2px}
.site-stocks .stock-card{border:1px solid var(--site-border-two);background:var(--site-surface-glass);border-radius:10px;box-shadow:none;padding:16px;min-width:0}
.site-stocks .stock-section-head{gap:10px;flex-wrap:wrap;margin-bottom:10px}
.site-stocks .stock-section-title{font-family:inherit;font-size:15px;line-height:1.5;letter-spacing:0;font-weight:600;color:var(--site-text)}
.site-stocks .stock-section-title::first-letter{color:inherit;font-size:inherit}
.site-stocks .stock-refresh-note,.site-stocks .stock-code,.site-stocks .stock-daily-code,.site-stocks .stock-daily-quote-code{color:var(--site-muted);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.site-stocks .stock-action,.site-stocks .stock-icon-button,.site-stocks .stock-universe-retry,.site-stocks .stock-select,.site-stocks .stock-input{color:var(--site-text);background:var(--site-surface-glass);border:1px solid var(--site-border-four);border-radius:6px;min-height:34px;font-size:13px;box-shadow:none}
.site-stocks .stock-action.active,.site-stocks .stock-action.primary,.site-stocks .stock-daily-filter.active{color:var(--site-accent);border-color:var(--site-accent);background:color-mix(in srgb,var(--site-accent) 12%,transparent)}
.site-stocks .stock-action:hover:not(:disabled),.site-stocks .stock-icon-button:hover:not(:disabled){border-color:var(--site-accent)}
.site-stocks :is(button,a,input,select):focus-visible{outline:2px solid var(--site-accent);outline-offset:3px}
.site-stocks .stock-action:disabled{opacity:.5;cursor:wait}
.site-stocks .stock-daily-layout{height:max(630px,calc(100dvh - 232px));max-height:none;grid-template-columns:minmax(235px,300px) minmax(0,1fr);gap:12px;overflow:visible}
.site-stocks .stock-daily-chart-card{overflow:visible}
.site-stocks .stock-daily-chart-card>.stock-section-head{display:none}
.site-stocks .stock-daily-sidebar{overflow:hidden;min-height:0}
.site-stocks .stock-daily-list{min-height:180px;flex:1;overscroll-behavior:contain}
.site-stocks .stock-daily-canvas-wrap{min-height:285px;flex:1;background:transparent;border-color:var(--site-border-two)}
.site-stocks .stock-daily-canvas{background:transparent}
.site-stocks .stock-daily-quote{padding:0 0 12px;border:0;background:transparent;box-shadow:none;border-radius:0}
.site-stocks .stock-daily-quote-main{gap:12px;align-items:center;flex-wrap:wrap;padding:0 0 12px}
.site-stocks .stock-daily-quote-name strong{font-size:20px;font-weight:600;color:var(--site-text)}
.site-stocks .stock-daily-quote-price>strong{font-size:26px;letter-spacing:-.5px}
.site-stocks .stock-daily-quote-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 12px;padding-top:8px;border-color:var(--site-border-two)}
.site-stocks .stock-daily-stat span{color:var(--site-muted);font-size:11px}
.site-stocks .stock-daily-stat{border:0;background:transparent;box-shadow:none;padding:0;min-height:0}
.site-stocks .stock-daily-stat strong{font-size:12px;font-weight:500;color:var(--site-text);font-variant-numeric:tabular-nums;white-space:nowrap}
.site-stocks .stock-daily-control-row{gap:8px;flex-wrap:wrap;justify-content:space-between}
.site-stocks .stock-daily-period-row,.site-stocks .stock-daily-range-row{display:flex;gap:4px;flex-wrap:wrap}
.site-stocks .stock-daily-period-row .stock-action,.site-stocks .stock-daily-range-row .stock-action{padding:5px 9px;min-height:30px;font-size:12px}
.site-stocks .stock-daily-ma-legend{padding:10px 0 4px;font-size:11px;gap:9px;flex-wrap:wrap}
.site-stocks .stock-watchlist-table{font-size:13px;font-variant-numeric:tabular-nums}
.site-stocks .stock-watchlist-table th{color:var(--site-muted);font-weight:500;background:color-mix(in srgb,var(--site-surface) 80%,transparent)}
.site-stocks .stock-watchlist-table td{color:var(--site-text);border-color:var(--site-border-two);padding:12px 9px}
.site-stocks .stock-daily-row,.site-stocks .stock-watch-row{border-color:var(--site-border-two)}
.site-stocks .stock-daily-row.active{background:color-mix(in srgb,var(--site-accent) 10%,transparent)}
.site-stocks .stock-daily-name,.site-stocks .stock-limit-board-stock-name{color:var(--site-text)}
.site-stocks .stock-limit-board-stock,.site-stocks .stock-strategy-card,.site-stocks .stock-market-card{background:var(--site-surface-glass);border-color:var(--site-border-two);border-radius:8px;box-shadow:none}
.site-stocks .stock-limit-board-group-head{border-color:var(--site-border-two);color:var(--site-text)}
.site-stocks .stock-limit-board-level-badge{color:var(--site-accent);background:color-mix(in srgb,var(--site-accent) 12%,transparent)}
.site-stocks .stock-empty{padding:30px 12px;color:var(--site-muted);font-size:13px}
.site-stocks .stock-up{color:#ec7a81}.site-stocks .stock-down{color:#62c5b1}
html[data-theme=sakura] .site-stocks .stock-up{color:#bb3555}html[data-theme=sakura] .site-stocks .stock-down{color:#147b6a}
@media(max-width:1100px){
 .site-stocks .stock-workspace{gap:12px}.site-stocks .stock-section-nav{width:132px;flex-basis:132px}
 .site-stocks .stock-daily-layout{grid-template-columns:minmax(210px,245px) minmax(0,1fr)}
 .site-stocks .stock-daily-quote-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .site-stocks .stock-card{padding:12px}
}
@media(max-width:860px){
 .site-enabled .site-stocks .app{width:calc(100% - 28px)}
 .site-stocks .stock-workspace{display:block}
 .site-stocks .stock-section-nav,.site-stocks .stock-section-nav.is-collapsed{position:static;width:100%;padding:0;margin:0 0 12px;border:0;background:transparent;border-radius:0}
 .stock-section-nav-head{display:none}
 .stock-section-nav nav{display:flex;gap:4px;overflow-x:auto;scrollbar-width:thin;padding:3px 1px 8px}
 .site-stocks .stock-section-nav nav a{min-height:40px;padding:8px 12px;gap:7px;flex-shrink:0;font-size:13px;border-color:var(--site-border-two);background:var(--site-surface-glass)}
 .stock-section-nav.is-collapsed nav a span{display:inline}
 .site-stocks .stock-daily-layout{height:auto;grid-template-columns:minmax(190px,35%) minmax(0,1fr);align-items:stretch}
 .site-stocks .stock-daily-sidebar{max-height:740px}
 .site-stocks .stock-daily-chart-card{min-height:650px}
 .site-stocks .stock-daily-quote-price>strong{font-size:24px}
 .site-stocks .stock-daily-quote-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .stock-eod-status{align-items:flex-start;gap:8px}
}
@media(max-width:600px){
 .site-stocks .stock-daily-layout{display:flex;flex-direction:column;gap:10px}
 .site-stocks .stock-daily-sidebar{height:280px;max-height:320px;min-height:240px}
 .site-stocks .stock-daily-chart-card{min-height:650px}
 .site-stocks .stock-daily-toolbar{gap:7px}
 .site-stocks .stock-daily-filter-row{display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin}
 .site-stocks .stock-daily-filter{flex-shrink:0}
 .site-stocks .stock-filter-layout{grid-template-columns:1fr}
 .site-stocks .stock-section-tools{flex-wrap:wrap}
 .stock-eod-status>div>span:not(.stock-eod-dot){flex-basis:100%}
 .site-stocks .stock-daily-quote-main{align-items:flex-start}
 .site-stocks .stock-daily-quote-price{align-items:flex-start}
 .site-stocks .stock-search-input{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.site-stocks *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* One chart surface shared by all five securities lists. */
.stock-kline-modal{box-sizing:border-box;width:min(1240px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--site-border-four,#59717e);border-radius:16px;color:var(--site-text,#eff5f6);background:var(--site-surface-float,#10202e);box-shadow:0 24px 100px #0008;overflow:auto;overscroll-behavior:contain;font-family:inherit;color-scheme:dark}
.stock-kline-modal{margin:auto}
.stock-kline-modal::backdrop{background:#020915b8}
.stock-kline-surface:fullscreen{box-sizing:border-box;width:100%;height:100%;overflow:auto;overscroll-behavior:contain;background:var(--site-surface-float,#10202e);color:var(--site-text,#eff5f6)}
.stock-kline-surface:fullscreen canvas{height:calc(100dvh - 280px);min-height:430px}
.stock-kline-modal[open]{animation:stock-kline-appear 140ms ease-out}
.stock-kline-head{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--site-border-two);background:var(--site-surface-float,#10202e)}
.stock-kline-head>div:first-child{min-width:0}.stock-kline-head h2{margin:0;font-size:20px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}.stock-kline-head p{margin:4px 0 0;color:var(--site-muted);font-size:12px;line-height:1.6}
.stock-kline-head-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.stock-kline-modal button,.stock-kline-modal select{font:inherit;cursor:pointer;color:inherit;background:var(--site-button,#10212d);border:1px solid var(--site-border-two);border-radius:7px}
.stock-kline-head-actions button{display:grid;place-items:center;width:42px;height:42px;padding:10px}.stock-kline-head-actions svg{width:20px;height:20px}
.stock-kline-modal button:hover{background:var(--site-hover)}.stock-kline-modal :focus-visible{outline:2px solid var(--site-accent);outline-offset:3px}
.stock-kline-body{padding:16px 20px 20px;min-width:0}.stock-kline-quote{display:flex;align-items:center;gap:32px;padding-bottom:16px}.stock-kline-price{display:flex;align-items:baseline;gap:12px;white-space:nowrap}.stock-kline-price>strong{font-size:32px;line-height:1;font-variant-numeric:tabular-nums}.stock-kline-price>span{font-size:14px;font-variant-numeric:tabular-nums}
.stock-kline-quote dl{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:18px;flex:1;margin:0}.stock-kline-quote dt{font-size:12px;color:var(--site-muted);margin-bottom:4px}.stock-kline-quote dd{margin:0;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.stock-kline-quote:empty{display:none}
.stock-kline-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:4px 12px}.stock-kline-controls>div{display:flex;gap:5px}.stock-kline-controls button{min-height:36px;padding:6px 15px;font-size:13px}.stock-kline-controls button[aria-pressed=true]{color:var(--site-tab-active);border-color:var(--site-accent-line);background:var(--site-accent-wash)}
.stock-kline-controls label{display:flex;align-items:center;gap:9px;color:var(--site-muted);font-size:12px}.stock-kline-controls select{min-height:36px;padding:6px 28px 6px 10px;max-width:140px;color:var(--site-text);background:var(--site-surface)}
.stock-kline-feedback{display:flex;align-items:center;gap:10px}.stock-kline-feedback p{font-size:13px;line-height:1.6;color:var(--site-muted);margin:0 0 8px}.stock-kline-feedback p[role=alert]{color:var(--site-error)}.stock-kline-feedback button{padding:6px 10px;font-size:12px;margin-bottom:8px;flex-shrink:0}
.stock-kline-legend{display:flex;align-items:center;flex-wrap:wrap;gap:12px;font-size:11px;padding-bottom:8px;color:var(--site-muted)}.stock-kline-legend .indicator-0{color:#ffd166}.stock-kline-legend .indicator-1{color:#f78cfa}.stock-kline-legend .indicator-2{color:#69cbff}.stock-kline-legend .indicator-3{color:#a7f070}.stock-kline-legend .indicator-4{color:#ffb86b}.stock-kline-legend .indicator-5{color:#8f7dff}
.stock-kline-canvas-wrap{position:relative;min-width:0;background:var(--site-input,#09151f);border-radius:6px}.stock-kline-canvas-wrap:has(canvas[hidden]){min-height:220px}.stock-kline-canvas-wrap canvas{display:block;width:100%;height:clamp(430px,calc(100dvh - 320px),650px);touch-action:pan-y;cursor:crosshair}.stock-kline-modal [hidden]{display:none!important}
.stock-kline-tooltip{position:absolute;z-index:2;pointer-events:none;max-width:min(340px,100%);padding:10px 12px;border:1px solid var(--site-border);border-radius:8px;background:var(--site-surface-float);color:var(--site-text);font-size:11px;line-height:1.6;box-shadow:0 6px 24px #0004;overflow-wrap:anywhere}
.stock-kline-scroll{width:100%;margin:12px 0 0;accent-color:var(--site-accent)}.stock-kline-modal:fullscreen{width:100%;height:100%;max-height:none;border:0;border-radius:0}.stock-kline-modal:fullscreen canvas{height:calc(100dvh - 280px);min-height:430px}
.stock-content [data-stock-kline-code],.stock-content [data-stock-filter-row],.stock-content [data-stock-row]{cursor:pointer}.stock-content [data-stock-kline-code]:hover,.stock-content [data-stock-kline-code]:focus-visible{background:var(--site-accent-wash)}.stock-content [data-stock-kline-code]:focus-visible{outline:2px solid var(--site-accent);outline-offset:-2px}
html[data-theme=sakura] .stock-kline-modal{color-scheme:light}.stock-kline-modal .is-up{color:#ff6b7d}.stock-kline-modal .is-down{color:#4fc994}
@keyframes stock-kline-appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:850px){.stock-kline-quote{align-items:flex-start;gap:16px;flex-direction:column}.stock-kline-quote dl{width:100%;gap:12px}.stock-kline-price>strong{font-size:28px}}
@media(max-width:600px){.stock-kline-modal{width:100%;max-height:100dvh;height:100dvh;margin:0;border-radius:0;border-width:0}.stock-kline-head{padding:10px 12px;padding-top:max(10px,env(safe-area-inset-top))}.stock-kline-head h2{font-size:18px}.stock-kline-head-actions button{width:40px;height:40px}.stock-kline-body{padding:12px 10px max(16px,env(safe-area-inset-bottom))}.stock-kline-quote{gap:12px;padding-bottom:12px}.stock-kline-quote dl{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.stock-kline-controls{gap:8px}.stock-kline-controls button{padding-inline:11px;min-height:40px}.stock-kline-controls label{gap:6px;font-size:11px}.stock-kline-controls select{max-width:100px;min-height:40px}.stock-kline-legend{gap:9px}.stock-kline-canvas-wrap canvas{height:480px}.stock-kline-modal:fullscreen canvas{min-height:480px}}
@media(prefers-reduced-motion:reduce){.stock-kline-modal[open]{animation:none}.stock-kline-modal *{scroll-behavior:auto!important}}
/* Independent publication exceptions use amber, separate from unread notices. */
.stock-exception-nav{display:grid;gap:6px;padding:12px 8px;border-top:1px solid var(--border, #8393a333)}
.stock-exception-nav button{display:flex;align-items:center;gap:7px;border:1px solid #c2925150;border-radius:7px;background:#b77b2512;color:var(--site-text,#dde9e8);padding:8px;font:inherit;font-size:12px;cursor:pointer}
.stock-exception-count{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:5px;background:#c18c3c25;color:#c58a33;font-weight:700}
.stock-exception-mark{display:inline-block;vertical-align:middle;margin-left:5px;border:1px solid #b8874155;border-radius:4px;padding:0 4px;background:#b8874117;color:#c59450;font:inherit;font-size:10px;line-height:17px;cursor:pointer;white-space:nowrap}
.stock-section-nav.is-collapsed .stock-exception-nav button{justify-content:center;padding:7px 2px}.stock-section-nav.is-collapsed .stock-exception-nav button>span:not(.stock-exception-count){display:none}.stock-section-nav.is-collapsed .stock-exception-nav .stock-exception-count{display:grid!important}
.stock-exception-dialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(510px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #a5916855;border-radius:14px;background:var(--site-bg,#132029);color:var(--site-text,#e3eeee);padding:0;box-shadow:0 24px 90px #0007;font-family:inherit;font-size:14px;line-height:1.7}
.stock-exception-dialog::backdrop{background:#020b14a6}.stock-exception-dialog>header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:inherit;z-index:1;border-bottom:1px solid #96aaaa25}.stock-exception-dialog h2{font-size:18px;margin:0}.stock-exception-dialog header button{min-width:36px;min-height:36px;color:inherit;background:transparent;border:0;font-size:25px;cursor:pointer}.stock-exception-items{padding:0 20px 18px}.stock-exception-items article{padding:17px 0;border-bottom:1px solid #96aaaa25}.stock-exception-items article:last-child{border:0}.stock-exception-items strong{font-size:15px}.stock-exception-items small{font-size:12px;font-weight:400;opacity:.7}.stock-exception-items p{margin:8px 0;color:#d3a568}.stock-exception-items dl{margin:8px 0 14px;display:grid;gap:3px;font-size:12px}.stock-exception-items dl>div{display:flex;justify-content:space-between;gap:20px}.stock-exception-items dt{opacity:.65}.stock-exception-items dd{margin:0;text-align:right}.stock-exception-empty{padding:20px 0}
html[data-theme=sakura] .stock-exception-dialog{background:#fff8fa;color:#49353e}html[data-theme=sakura] .stock-exception-nav button{color:#624238}html[data-theme=sakura] .stock-exception-mark,html[data-theme=sakura] .stock-exception-items p{color:#8d5b22}

.stock-exception-dialog button:focus-visible{outline:2px solid var(--site-accent,#9cdbd9);outline-offset:3px}

.stock-source-admin{width:min(860px,calc(100vw - 24px));color:var(--site-text)}
.stock-source-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-block:12px}
.stock-source-health{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.stock-source-health>section{padding:12px;border:1px solid var(--site-border-two);border-radius:8px;background:var(--site-surface-glass)}
.stock-source-admin p{line-height:1.6;overflow-wrap:anywhere;color:var(--site-muted);font-size:13px}
.stock-source-admin summary{cursor:pointer;color:var(--site-text)}

.stock-source-admin [data-admin-body]{padding:16px 20px 4px}
.stock-source-admin .stock-exception-items{padding:0 0 18px}
.stock-source-admin .stock-source-actions{margin-top:0}
.stock-source-admin .stock-action{min-height:34px;padding:5px 10px;border:1px solid var(--site-border-four);border-radius:6px;background:var(--site-surface-glass);color:var(--site-text);font:inherit;font-size:13px;cursor:pointer}
.stock-source-admin .stock-action:disabled{opacity:.5;cursor:default}
.stock-source-admin .stock-action:focus-visible{outline:2px solid var(--site-accent);outline-offset:2px}
