/* Daily-use market operations console. JP gains red, losses green. */
:root{color-scheme:dark;--bg:#080f1c;--surface:#0e1a2c;--surface-2:#122136;--border:#22354a;--border-strong:#34536a;--ink:#e5eef8;--ink-2:#b5c6d9;--ink-3:#8cabc1;--brand:#52d3d5;--brand-ink:#80e3df;--brand-soft:#123439;--up:#ff7d87;--up-soft:#35232f;--down:#4ed49e;--down-soft:#16352d;--accent:#7ab8ff;--warn:#f3c273;--radius:8px;--radius-sm:5px;--shadow:0 3px 12px #0002;--shadow-md:0 8px 24px #0004;--maxw:1360px}
body{background-color:var(--bg);background-image:linear-gradient(#365b7210 1px,transparent 1px),linear-gradient(90deg,#365b7210 1px,transparent 1px);background-size:48px 48px}
.topbar{background:#0a1424f5;backdrop-filter:blur(10px);border-bottom:1px solid #377483;box-shadow:0 1px 10px #32bccc0b}
.topbar-inner{gap:20px}.brand::after{background:linear-gradient(90deg,#52d3d5,#266c8a)}
.brand-role{color:var(--ink-3)}.live-dot::before{animation:none;background:var(--brand);box-shadow:none}
.nav{background:#0c1727f5}.nav a.active{background:#52d3d508}.wrap{padding-top:24px}
.command-intro{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:18px}
.command-intro h1{font-size:25px;letter-spacing:.04em;font-weight:700;margin:4px 0}
.command-kicker{font:11px var(--mono);color:var(--brand);letter-spacing:.2em}.command-note{font-size:11px;color:var(--ink-3);line-height:1.7}
.section{margin-bottom:28px;min-width:0}.section-head{flex-wrap:wrap;gap:8px 12px}.section-head h2{font-size:15px;letter-spacing:.02em;border-left-width:2px}.section-head .upd{color:var(--ink-3);font-size:10px;font-variant-numeric:tabular-nums}
.panel,.idx-card{border-color:var(--border);box-shadow:inset 0 1px 0 #ffffff03,0 6px 18px #0001}
.idx-card{padding:16px 15px;position:relative;min-height:130px;background:linear-gradient(135deg,#14253a,var(--surface))}.idx-card .price{font-size:27px;color:var(--ink);letter-spacing:-.035em}.idx-card .spark{opacity:.5}.idx-card .change{font-size:12px}.idx-card .price-date{font-size:10px;color:var(--ink-3);margin-top:4px}
.pill.active,.rank-view-btn.active{background:var(--brand-soft);color:var(--brand);border-color:#347879}.pill.active .n{color:var(--brand)}
.rank th{background:#14243a;color:var(--ink-3);font-size:11px}.rank td{border-color:#213247;padding-top:11px;padding-bottom:11px}.rank tbody tr:hover{background:#1a3042}.rank tbody tr:nth-child(even){background:#13223866}.rank tbody tr:nth-child(even):hover{background:#1a3042}.rank-no.top{background:var(--brand-soft);color:var(--brand)}
#rankBody,#themesBody{overflow-x:auto;overscroll-behavior-x:contain}.pill-mkt,.chip,.market-sectors span,.theme-chip{background:var(--surface-2);color:var(--ink-2)}
.flash-reference{background:var(--surface-2);border-color:var(--border)}.flash-detail-link.primary{background:var(--brand-soft);color:var(--brand)}.flash-detail-link:hover,.flash-detail-link.primary:hover{background:#1b3b45;color:var(--brand)}
.flash-chart-panel .mini-nochart,.mini-nochart{background:var(--surface-2)}.flash-item .chips .chip.pos{background:var(--up-soft);color:var(--up)}.flash-item .chips .chip.neg{background:var(--down-soft);color:var(--down)}
.data-notice{padding:22px;color:var(--warn);background:#28251c66;border:1px solid #8a704645;font-size:12px;line-height:1.9}.data-notice small{color:var(--ink-3)}
.monitor-ad{margin:26px 0;padding:12px;border:1px dashed var(--border);border-radius:6px;min-height:90px;max-width:100%;overflow:hidden;background:#0b1624}.monitor-ad-label{font-size:10px;letter-spacing:.12em;color:var(--ink-3);display:block;margin-bottom:8px}.monitor-ad .adsbygoogle{position:static!important;max-width:100%}
:focus-visible{outline:2px solid var(--brand);outline-offset:3px}button{touch-action:manipulation}.heatmap{isolation:isolate}.footer{background:#0a1422;border-color:var(--border)}
@media(min-width:1100px){.flash-list{grid-template-columns:repeat(3,minmax(0,1fr))}.market-news-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.brand-role{display:none}.topbar-inner{padding:0 14px;gap:12px}.topbar-meta{font-size:10px;gap:8px}.topbar-meta .live-dot{display:none}.wrap{padding:16px 12px}.command-intro{align-items:start;flex-direction:column;gap:6px}.command-intro h1{font-size:21px}.command-note{font-size:10px}.section-head .upd{flex-basis:100%;margin-left:11px}.idx-card{padding:13px 11px;min-height:120px}.idx-card .price{font-size:24px}.rank{min-width:710px}.rank-chart-grid{min-width:0}.rank-chart-card{min-width:0}.section{scroll-margin-top:110px}.nav a{padding:11px 12px}.monitor-ad{margin:20px 0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

/* Match the existing table selector specificity. */
table.rank .pill-mkt,.rank-no{background:var(--surface-2);color:var(--ink-2)}
.rank-chart-grid{background:var(--surface-2)}.rank-no.top{background:var(--brand-soft);color:var(--brand)}
.hot-badge{background:var(--up-soft);color:var(--up)}.hm-tile{border-color:#081423}.hm-tile .hm-nm,.hm-tile .hm-pct{text-shadow:none;color:#f0f5fa}
/* Business descriptions and accessible native company detail dialog. */
.company-trigger { color: var(--text, #e3edf5); text-decoration: none; cursor: pointer; }
.company-trigger:hover { color: #6fdddd; text-decoration: underline; text-underline-offset: 4px; }
.company-trigger:focus-visible, .company-dialog a:focus-visible, .company-close:focus-visible { outline: 2px solid #65d5da; outline-offset: 4px; border-radius: 3px; }
.company-hint { font-size: 10px; font-weight: 500; color: #66bfc9; white-space: nowrap; margin-left: 5px; }
.company-summary { color: #a4b8c9 !important; white-space: normal; line-height: 1.6; max-width: 390px; margin-top: 3px; }
.company-modal-open { overflow: hidden; }
.company-dialog { color-scheme: dark; box-sizing: border-box; width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 0; color: #dce8f1; background: #0d1b2c; border: 1px solid #36616e; border-radius: 16px; box-shadow: 0 24px 100px #0008; }
.company-dialog::backdrop { background: #020912c9; backdrop-filter: blur(3px); }
.company-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px 20px; border-bottom: 1px solid #263e53; background: #112337; }
.company-eyebrow { color: #60c4cc; font-size: 10px; letter-spacing: .12em; }
.company-dialog h2 { margin: 8px 0; font-size: 24px; line-height: 1.4; color: #edf6fc; }
.company-code { font-size: 12px; color: #9bb2c5; }
.company-close { flex: none; cursor: pointer; border: 1px solid #426072; border-radius: 7px; padding: 8px 11px; background: #132b40; color: #d5e6ee; font: inherit; font-size: 12px; }
.company-dialog-body { padding: 24px 28px 28px; }
.company-lead { margin: 0 0 24px; color: #88dce0; font-size: 20px; font-weight: 650; line-height: 1.6; }
.company-dialog section { margin: 24px 0; }
.company-dialog h3 { color: #b2c8d8; font-size: 12px; letter-spacing: .03em; margin: 0 0 12px; }
.company-description { font-size: 15px; line-height: 1.95; margin: 0; }
.company-themes { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.company-themes span { padding: 5px 10px; border: 1px solid #294c61; border-radius: 5px; color: #b7d1df; font-size: 12px; }
.company-dialog small { color: #90a9bb; font-size: 11px; line-height: 1.7; }
.company-links { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.company-links a { display: flex; justify-content: space-between; padding: 12px; color: #8bdadf; border: 1px solid #35586b; border-radius: 7px; text-decoration: none; font-size: 13px; }
.company-links a:hover { background: #163649; }
.company-source { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid #294052; font-size: 11px; color: #8da7bc; }
.company-source a { color: #9fc2d2; }
.company-warning { color: #e5ba79; }
@media (max-width: 600px) {
  .company-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .company-dialog-head, .company-dialog-body { padding: 20px; }
  .company-dialog h2 { font-size: 21px; }
  .company-lead { font-size: 18px; }
  .company-links { grid-template-columns: 1fr; }
  .company-summary { min-width: 180px; max-width: 260px; }
}

/* Cash index cards: three domestic markets above six global indicators. */
.global-index-heading{margin-top:24px}
.tse-grid .idx-card{min-height:126px;background:linear-gradient(135deg,#143039,#102032);border-top-color:#387b86}
.idx-card .head{gap:8px}.idx-card .pct-badge,.spot-badge{flex-shrink:0}
.idx-card .price{margin:7px 0 3px}.idx-card .index-unit{font-size:10px;font-weight:400;letter-spacing:0;color:var(--ink-3);margin-left:8px;white-space:nowrap}
.idx-card .index-source{display:inline-block;position:relative;z-index:1;margin-top:4px;font-size:9px;color:var(--ink-3);text-decoration:none}
.idx-card .index-source:hover{color:var(--brand);text-decoration:underline}
.idx-card .change-unavailable{color:var(--ink-3);font-weight:400}.spot-badge{color:var(--brand);background:var(--brand-soft);padding:2px 7px;border-radius:6px;font-size:11px}
.index-unavailable .price{color:var(--ink-3)}.index-unavailable>.index-unit{margin:0}
@media(min-width:761px){.tse-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.tse-grid{grid-template-columns:1fr}.tse-grid .idx-card{min-height:115px}.idx-card .price{font-size:25px}.idx-card .index-unit{font-size:9px}}

/* Click-to-load market charts and evidence-led earnings. */
.idx-card { position:relative; }
.index-chart-button { position:absolute; inset:0; z-index:1; width:100%; border:0; border-radius:inherit; background:transparent; color:var(--accent,#47d2d4); cursor:pointer; text-align:right; padding:18px; }
.index-chart-button span { position:absolute; right:18px; bottom:16px; font-size:12px; background:var(--surface,#0b1726); padding:3px 7px; border-radius:4px; }
.index-chart-button:hover { box-shadow:inset 0 0 0 1px #47d2d4; }
.index-chart-button:focus-visible { outline:2px solid #47d2d4; outline-offset:3px; }
.index-source { position:relative; z-index:2; }
.cached-quote { color:#edbe66; }
body.market-chart-open { overflow:hidden; }
.market-chart-dialog { width:min(1120px,calc(100vw - 32px)); max-width:none; max-height:94dvh; padding:20px; border:1px solid #2c5367; border-radius:14px; background:#0b1726; color:#dce7f3; box-shadow:0 24px 100px #0009; }
.market-chart-dialog::backdrop { background:#020813c9; }
.market-chart-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.market-chart-head h2 { font-size:22px; margin:0; }
.market-chart-close { background:#16283b; color:#dce7f3; border:1px solid #365266; border-radius:7px; width:40px; height:40px; cursor:pointer; font-size:20px; }
.market-chart-periods { display:flex; gap:8px; margin:14px 0 8px; }
.market-chart-periods button { color:#b7c9da; background:#112236; border:1px solid #2b475d; border-radius:6px; padding:8px 18px; cursor:pointer; }
.market-chart-periods button[aria-pressed="true"] { color:#63e3e5; background:#153a43; border-color:#47c6ce; }
.market-chart-status,.market-chart-note { font-size:12px; color:#92afc4; margin:8px 0; }
.market-chart-host { height:min(62dvh,620px); min-height:340px; }
.tradingview-widget-container { height:100%; width:100%; }
.tradingview-widget-container__widget { height:calc(100% - 28px); width:100%; }
.tradingview-widget-copyright { font-size:12px; line-height:28px; text-align:center; }
.tradingview-widget-copyright a { color:#75b6f4; }
.flash-business { color:#92b3c9; font-size:13px; margin:3px 0 14px; }
.flash-numbers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.flash-numbers:empty { display:none; }
.flash-numbers>div { padding:10px 12px; border-radius:6px; background:#152539; }
.flash-numbers span,.flash-numbers small { display:block; color:#91aabe; font-size:11px; }
.flash-numbers strong { display:block; color:#dce7f3; font-size:16px; margin:3px 0; }
.flash-numbers small { line-height:1.5; }
.flash-explanation { font-size:13px; line-height:1.8; color:#b8cddd; }
@media(max-width:640px) {
 .market-chart-dialog { padding:12px; width:calc(100vw - 16px); }
 .market-chart-head h2 { font-size:18px; }
 .market-chart-periods { gap:5px; }
 .market-chart-periods button { padding:8px 12px; flex:1; }
 .market-chart-host { height:57dvh; min-height:300px; }
 .flash-numbers { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.market-chart-host>svg { display:block; width:100%; height:calc(100% - 65px); min-height:240px; outline-offset:2px; }
.market-ohlc { font-size:12px; color:#c9d9e8; min-height:24px; margin:6px 0; font-variant-numeric:tabular-nums; }
.market-history-source { display:block; text-align:right; margin-top:6px; color:#75b6f4; font-size:12px; }
.market-chart-dialog { margin:auto; }
