:root{
  --bg:#0b1220; --bg2:#0f172a; --panel:#111827; --panel2:#0b1220;
  --text:#f8fafc; --muted:#94a3b8; --soft:#cbd5e1; --border:rgba(148,163,184,.18);
  --cyan:#38bdf8; --green:#22c55e; --red:#ef4444; --amber:#f59e0b; --yellow:#facc15;
  --purple:#a855f7; --grid:rgba(148,163,184,.14); --shadow:0 8px 24px rgba(0,0,0,.20);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:"Segoe UI",Inter,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;font-size:15px;line-height:1.45}
button,select,input{font:inherit}button{cursor:pointer}.hidden{display:none!important}

/* Streamlit parity: top filter shell is the first visual block, not a separate app header. */
.top-filter-shell{position:sticky;top:0;z-index:60;width:min(98vw,1880px);margin:8px auto 14px;padding:10px 12px;background:rgba(11,18,32,.96);border:1px solid var(--border);border-radius:18px;box-shadow:0 12px 30px rgba(0,0,0,.25);backdrop-filter:blur(12px)}
.top-filter-grid{display:grid;grid-template-columns:minmax(0,4.7fr) minmax(230px,1.3fr);gap:12px;align-items:center}
.top-nav-links{display:grid;grid-template-columns:repeat(6,minmax(118px,1fr));grid-auto-rows:32px;gap:5px 8px;min-width:0}
.top-nav-link{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;padding:0 10px;border:1px solid rgba(148,163,184,.18);border-radius:999px;background:rgba(15,23,42,.72);color:#e5e7eb;font-size:12.5px;font-weight:760;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;transition:.14s ease}
.top-nav-link:hover{border-color:rgba(56,189,248,.42);background:rgba(30,41,59,.85)}
.top-nav-link.active{background:linear-gradient(90deg,rgba(239,68,68,.20),rgba(168,85,247,.16));border-color:rgba(248,113,113,.60);color:#fff;box-shadow:inset 0 0 0 1px rgba(168,85,247,.08)}
.top-filter-controls-wrap{min-width:0}.top-filter-actions{display:grid;grid-template-columns:minmax(130px,1fr) minmax(82px,.62fr);gap:8px;align-items:end}.top-filter-label{display:block;color:#94a3b8;font-size:11px;font-weight:800;margin:0 0 4px 2px}.timeframe-field{display:block}.choose-wrap{min-width:0}
select,input{width:100%;min-height:38px;border:1px solid rgba(148,163,184,.22);border-radius:10px;background:#0f172a;color:#f8fafc;padding:7px 10px;outline:none}select:focus,input:focus{border-color:rgba(56,189,248,.65);box-shadow:0 0 0 2px rgba(56,189,248,.10)}
.primary,.ghost{min-height:38px;border-radius:10px;padding:7px 14px;font-weight:800}.primary{border:1px solid #0284c7;background:#0284c7;color:white}.primary:hover{background:#0369a1}.ghost{border:1px solid rgba(148,163,184,.25);background:rgba(15,23,42,.76);color:#f8fafc}.ghost:hover{border-color:rgba(56,189,248,.42)}.choose-btn{width:100%}.wide{width:100%}.small-btn{min-height:32px;padding:5px 10px;font-size:12px}

.page{width:min(96.5vw,1840px);margin:0 auto 56px;padding:0 4px}.view{display:none}.view.active{display:block;animation:fade .12s ease-out}@keyframes fade{from{opacity:.55}to{opacity:1}}
.dashboard-title-block{margin:2px 0 18px}.dashboard-title-block h1{font-size:clamp(2rem,3vw,2.65rem);line-height:1.08;letter-spacing:-.025em;margin:0;color:#f8fafc}.latest-stamp{margin-top:5px;font-size:1rem;font-weight:700;color:#cbd5e1;line-height:1.25}.error,.parity-alert,.inline-error{border-radius:10px;padding:10px 12px;margin:0 0 12px}.error,.inline-error{background:rgba(190,24,93,.14);color:#fda4af;border:1px solid rgba(251,113,133,.45)}.parity-alert{background:rgba(245,158,11,.10);color:#fde68a;border:1px solid rgba(245,158,11,.38);font-weight:650}

/* Streamlit-like cards / metrics */
.st-card,.st-metric,.dashboard-section,.market-gate-shell{background:linear-gradient(180deg,#111827 0%,#0b1220 100%);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}
.st-card{padding:16px 18px;margin:0 0 14px}.st-card h3{margin:0 0 10px}.metric-row{display:grid;gap:12px;margin:0 0 12px}.metric-row-3{grid-template-columns:repeat(3,minmax(0,1fr))}.metric-row-4{grid-template-columns:repeat(4,minmax(0,1fr))}.metric-row-5{grid-template-columns:repeat(5,minmax(0,1fr))}.st-metric{padding:16px 18px;min-height:104px}.metric-label{font-size:13px;color:#94a3b8;margin-bottom:6px;font-weight:600}.metric-value{font-size:28px;font-weight:800;color:#f8fafc;line-height:1.1}.metric-value.metric-small{font-size:18px;line-height:1.25}.metric-delta{font-size:13px;color:#cbd5e1;margin-top:7px}.delta-up{color:#22c55e}.delta-down{color:#ef4444}.delta-flat{color:#facc15}

/* Market gate: four-card Streamlit-style decision row. */
.market-gate-shell{padding:16px 18px;margin:0 0 14px;border-left:5px solid #38bdf8;background:linear-gradient(135deg,rgba(15,23,42,.96) 0%,rgba(8,47,73,.66) 52%,rgba(6,78,59,.40) 100%)}
.market-gate-header{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:12px}.market-gate-kicker{font-size:11px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:#93c5fd}.market-gate-title{font-size:24px;font-weight:900;margin:3px 0;color:#f8fafc}.market-gate-confidence{font-size:12px;border:1px solid rgba(148,163,184,.22);border-radius:999px;padding:5px 10px;color:#cbd5e1;white-space:nowrap}.market-gate-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.gate-cell{background:rgba(15,23,42,.54);border:1px solid rgba(148,163,184,.16);border-radius:12px;padding:12px}.gate-cell span{display:block;color:#93c5fd;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.06em;margin-bottom:4px}.gate-cell b{display:block;font-size:14px;color:#f8fafc;margin-bottom:5px}.gate-cell p{margin:0;color:#cbd5e1;font-size:13px;line-height:1.45}.gate-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.gate-tag{border-radius:999px;padding:4px 8px;font-size:11px;font-weight:750;background:rgba(15,23,42,.6);border:1px solid rgba(148,163,184,.22);color:#e5e7eb}

.dashboard-section{padding:16px 18px;margin:16px 0}.dashboard-section>h2,.dashboard-section>h3{margin:0 0 10px;font-size:1.28rem}.no-top-margin{margin-top:0}.plot{width:100%;min-height:620px;border-radius:10px;overflow:hidden}.plot-tall{min-height:720px}.compact-plot{min-height:430px}.heatmap-plot{min-height:760px}.plot .modebar{opacity:.72}.js-plotly-plot .plotly .modebar{right:8px!important}

.inline-filter-row{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:0 0 14px}.inline-filter-row label{display:grid;gap:4px;color:#cbd5e1;font-weight:700;font-size:13px;min-width:210px}.secondary-action{min-width:90px}.section-heading-with-control{display:flex;justify-content:space-between;gap:12px;align-items:end}.section-heading-with-control h2{margin:0}.section-heading-with-control label{display:grid;gap:4px;min-width:280px;color:#cbd5e1;font-size:13px}
.st-expander{margin:10px 0 14px;border:1px solid var(--border);border-radius:12px;background:rgba(15,23,42,.56)}.st-expander summary{padding:11px 14px;font-weight:750;cursor:pointer}.expander-body{padding:0 14px 12px;color:#cbd5e1}.tab-bar{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0 14px}.tab-btn{border:1px solid rgba(148,163,184,.20);border-radius:999px;background:rgba(15,23,42,.70);color:#cbd5e1;padding:7px 14px;font-weight:750}.tab-btn.active{background:linear-gradient(90deg,rgba(239,68,68,.20),rgba(168,85,247,.16));border-color:rgba(248,113,113,.60);color:#fff}.sector-tab-panel{display:none}.sector-tab-panel.active{display:block}

.table-wrap{width:100%;overflow:auto;border:1px solid rgba(148,163,184,.16);border-radius:12px;background:rgba(2,6,23,.22);max-height:680px}.ranking-table-wrap{max-height:700px}.eagle-table{width:100%;border-collapse:collapse;font-size:13px}.eagle-table th,.eagle-table td{padding:9px 10px;border-bottom:1px solid rgba(148,163,184,.12);white-space:nowrap}.eagle-table th{position:sticky;top:0;z-index:4;background:#111827;color:#f8fafc;text-align:center}.eagle-table td{text-align:right;color:#dbe4f0}.eagle-table td:first-child,.eagle-table td:nth-child(2){text-align:left}.eagle-table tr:hover td{background:rgba(30,41,59,.35)}.phase-pill{display:inline-flex;padding:2px 7px;border-radius:999px;border:1px solid var(--border);font-size:11px;font-weight:800}.phase-leader{color:#a855f7;border-color:rgba(168,85,247,.50);background:rgba(168,85,247,.12)}.phase-improving{color:#22c55e;border-color:rgba(34,197,94,.48);background:rgba(34,197,94,.11)}.phase-weakening{color:#facc15;border-color:rgba(250,204,21,.50);background:rgba(250,204,21,.10)}.phase-laggard{color:#ef4444;border-color:rgba(239,68,68,.50);background:rgba(239,68,68,.10)}

.stock-hero{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin:0 0 14px;padding:4px 2px}.stock-symbol{font-size:2.35rem;font-weight:900;color:#22c55e;line-height:1}.stock-company{font-size:1.05rem;color:#e5e7eb;font-weight:700;margin-top:6px}.technical-assessment{min-width:250px;max-width:420px;border:1px solid var(--border);border-radius:14px;padding:12px 14px;background:linear-gradient(180deg,#111827,#0b1220);font-weight:750;color:#e5e7eb}.money-flow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.meta-card{background:linear-gradient(180deg,#111827,#0b1220);border:1px solid var(--border);border-radius:14px;padding:12px 14px}.meta-card .k{font-size:12px;color:#94a3b8}.meta-card .v{font-size:17px;font-weight:800;margin-top:4px}.member-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.member-card{border:1px solid var(--border);border-radius:12px;background:rgba(15,23,42,.62);padding:10px}.member-card b{display:block;color:#f8fafc}.member-card span{font-size:12px;color:#94a3b8}.split-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.mini-table-box{border:1px solid var(--border);border-radius:12px;overflow:auto}.mini-table-box h4{padding:9px 10px;margin:0;background:#111827}

.radio-fieldset{border:0;padding:0;margin:0;display:flex;gap:12px;align-items:center}.radio-fieldset legend{font-size:13px;color:#cbd5e1;font-weight:700;margin-bottom:4px}.radio-fieldset label{display:inline-flex!important;min-width:auto!important;align-items:center;gap:5px}.radio-fieldset input{width:auto;min-height:auto}.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.metric-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.info-metric{border:1px solid rgba(148,163,184,.15);border-radius:10px;background:rgba(15,23,42,.5);padding:9px}.info-metric .k{font-size:11px;color:#94a3b8}.info-metric .v{font-weight:750;color:#f8fafc;margin-top:3px;overflow-wrap:anywhere}.system-actions{display:flex;gap:8px;flex-wrap:wrap}.placeholder-card{min-height:180px}.placeholder-card p{color:#cbd5e1;max-width:920px}

.key-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:rgba(2,6,23,.94);backdrop-filter:blur(12px);padding:16px}.key-card{width:min(470px,94vw);background:linear-gradient(180deg,#111827,#0b1220);border:1px solid rgba(56,189,248,.30);border-radius:18px;padding:22px;box-shadow:0 26px 80px rgba(0,0,0,.5)}.key-brand{font-weight:900;letter-spacing:.08em;color:#f8fafc}.key-card h2{margin:7px 0}.key-card p{color:#94a3b8}.key-card label{display:block;margin:9px 0 5px;color:#cbd5e1;font-weight:700}
.skeleton{height:80px;border-radius:10px;background:linear-gradient(90deg,#172033,#202b44,#172033);background-size:200% 100%;animation:pulse 1.5s linear infinite}.skeleton.tall{height:150px}@keyframes pulse{from{background-position:200% 0}to{background-position:-200% 0}}
.scroll-top-btn,.system-shortcut{position:fixed;right:18px;width:46px;height:46px;border-radius:999px;background:rgba(11,18,32,.96);border:1px solid rgba(148,163,184,.24);color:#f8fafc;font-size:18px;font-weight:900;z-index:70;box-shadow:0 10px 24px rgba(0,0,0,.28)}.scroll-top-btn{bottom:18px}.system-shortcut{bottom:74px}.scroll-top-btn:hover,.system-shortcut:hover{border-color:rgba(56,189,248,.5);color:#38bdf8}

@media(max-width:1500px){.top-nav-links{grid-template-columns:repeat(5,minmax(110px,1fr))}.metric-row-5{grid-template-columns:repeat(3,minmax(0,1fr))}.member-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1180px){.top-filter-grid{grid-template-columns:1fr}.top-nav-links{grid-template-columns:repeat(4,minmax(0,1fr))}.top-filter-controls-wrap{max-width:360px}.metric-row-4,.metric-row-5{grid-template-columns:repeat(2,minmax(0,1fr))}.market-gate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.money-flow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.member-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.top-filter-shell{position:relative;width:96vw}.top-nav-links{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:36px}.top-filter-actions{grid-template-columns:1fr 96px}.metric-row-3,.metric-row-4,.metric-row-5,.grid-two,.market-gate-grid,.split-tables{grid-template-columns:1fr}.plot,.plot-tall,.heatmap-plot{min-height:460px}.dashboard-title-block h1{font-size:2rem}.stock-hero{flex-direction:column}.technical-assessment{min-width:0;width:100%}.member-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.section-heading-with-control{align-items:flex-start;flex-direction:column}.section-heading-with-control label{min-width:0;width:100%}}

/* Streamlit-source visual parity overrides. Keep these values aligned with
   eagle_core/styles.py and eagle_core/market/pttt_gate.py. */
.top-filter-shell{
  position:sticky!important;top:0!important;z-index:999!important;
  width:min(98vw,1880px);margin:0 auto 12px!important;
  background:rgba(11,18,32,.985)!important;backdrop-filter:blur(14px);
  border:1px solid rgba(148,163,184,.22)!important;border-radius:18px!important;
  padding:4px 12px 3px 12px!important;box-shadow:0 12px 30px rgba(0,0,0,.28)!important;
}
.top-filter-grid{grid-template-columns:minmax(0,4.7fr) minmax(226px,1.3fr)!important;gap:10px!important}
.top-nav-links{grid-template-columns:repeat(6,minmax(118px,1fr))!important;grid-auto-rows:32px!important;gap:5px 8px!important;margin:0!important;align-items:center;align-content:center}
.top-nav-link{min-height:32px!important;padding:5px 12px!important;border-radius:999px!important;border:1px solid rgba(148,163,184,.22)!important;color:#e5e7eb!important;font-size:14px!important;font-weight:800!important;background:rgba(15,23,42,.72)!important;letter-spacing:.01em!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;line-height:1.05!important}
.top-nav-link:hover{border-color:rgba(56,189,248,.45)!important;color:#fff!important}
.top-nav-link.active{background:linear-gradient(90deg,rgba(239,68,68,.20) 0%,rgba(168,85,247,.16) 100%)!important;border-color:rgba(248,113,113,.60)!important;color:#f8fafc!important;box-shadow:inset 0 0 0 1px rgba(248,113,113,.15),0 14px 30px rgba(0,0,0,.22)!important}
.top-filter-label{color:#94a3b8!important;font-size:12px!important;font-weight:800!important;letter-spacing:.03em!important;margin-bottom:6px!important;text-transform:uppercase!important}
.top-filter-actions{min-width:226px!important;max-width:252px!important;display:grid!important;grid-template-columns:minmax(132px,1fr) 68px!important;gap:6px!important;align-items:end!important}
.page{width:min(96.5vw,1840px);margin:0 auto 56px;padding-top:0}
.dashboard-title-block{margin:0 0 .35rem}.dashboard-title-block h1{margin-top:.05rem!important;margin-bottom:.08rem!important;font-size:2.35rem;line-height:1.08}.latest-stamp{font-size:1rem;font-weight:700;color:#cbd5e1;line-height:1.25;white-space:normal;margin:.15rem 0 .35rem}

.market-gate-shell{padding:0!important;background:none!important;border:0!important;box-shadow:none!important;margin:0 0 14px!important}
.market-gate-card{background:linear-gradient(135deg,rgba(15,23,42,.98) 0%,rgba(8,47,73,.70) 58%,rgba(2,6,23,.96) 100%);border:1px solid rgba(148,163,184,.22);border-left:5px solid currentColor;border-radius:18px;padding:18px 20px;box-shadow:0 14px 34px rgba(0,0,0,.18);margin-bottom:14px}
.market-gate-head{display:grid;grid-template-columns:minmax(360px,1.02fr) minmax(760px,1.48fr);align-items:stretch;gap:14px;margin-bottom:14px}.market-gate-head-copy{min-height:138px;display:flex;flex-direction:column;justify-content:center;padding:2px 4px 2px 0}.market-gate-top-boxes{display:grid;grid-template-columns:minmax(235px,1.05fr) minmax(220px,.98fr) minmax(190px,.82fr);align-items:stretch;gap:10px;min-width:0}
.market-gate-eyebrow{font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}.market-gate-regime{font-size:28px;font-weight:950;line-height:1.15;letter-spacing:-.02em}.market-gate-action{color:#e5e7eb;font-size:14px;font-weight:720;margin-top:7px;line-height:1.38}
.market-regime-score,.market-phase-score,.market-gate-score{box-sizing:border-box;min-height:138px;border:1px solid rgba(148,163,184,.24);border-radius:16px;padding:13px 14px;background:rgba(15,23,42,.55);display:flex;flex-direction:column;justify-content:center}.market-gate-score{text-align:right}.market-regime-score span,.market-phase-score span,.market-gate-score span{display:block;color:#94a3b8;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}.market-regime-score b,.market-phase-score b{display:block;font-size:18px;line-height:1.25}.market-gate-score b{display:block;font-size:28px;line-height:1.05}.market-regime-score small,.market-phase-score small,.market-gate-score small{display:block;font-size:13px;color:#cbd5e1;margin-top:6px;line-height:1.3}
.market-gate-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.market-gate-cell{background:rgba(15,23,42,.54);border:1px solid rgba(148,163,184,.16);border-radius:14px;padding:11px 12px;min-height:104px}.market-gate-cell span{display:block;color:#94a3b8;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}.market-gate-cell b{display:block;color:#f8fafc;font-size:18px;line-height:1.28;margin-bottom:5px}.market-gate-cell small{display:block;color:#cbd5e1;font-size:13px;line-height:1.35}
.market-gate-overview{margin-top:12px}.market-gate-insight{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.market-gate-insight>div{border:1px solid rgba(148,163,184,.16);border-radius:14px;padding:12px 13px;background:rgba(15,23,42,.46);min-height:122px}.market-gate-insight span{display:block;color:#94a3b8;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}.market-gate-insight b{display:block;color:#f8fafc;font-size:17px;line-height:1.3;margin-bottom:6px}.market-gate-insight p{margin:0;color:#cbd5e1;font-size:13px;line-height:1.4}.market-gate-band-legend{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid rgba(148,163,184,.18)}.band-label{font-size:12px;font-weight:900;color:#94a3b8;align-self:center;letter-spacing:.06em;text-transform:uppercase;margin-right:4px}.band-pill{font-size:12px;font-weight:800;border-radius:999px;padding:4px 10px;white-space:nowrap;border:1px solid currentColor}

.criteria-list p{margin:.35rem 0}.muted-note{color:#94a3b8}.heatmap-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.heatmap-pair h3{font-size:1rem;margin:0 0 4px;color:#e5e7eb}.sector-heatmap{min-height:420px}.matrix-table-wrap{max-height:620px}.matrix-table-wrap .eagle-table td:nth-child(1),.matrix-table-wrap .eagle-table td:nth-child(2){text-align:left}
.eagle-table .score-high{color:#22c55e;font-weight:800}.eagle-table .score-low{color:#ef4444;font-weight:800}.eagle-table .streak-pos{color:#22c55e;font-weight:800}.eagle-table .streak-neg{color:#ef4444;font-weight:800}

@media(max-width:1500px){.market-gate-insight{grid-template-columns:repeat(2,minmax(0,1fr))}.market-gate-head{grid-template-columns:minmax(320px,.88fr) minmax(680px,1.35fr)}.market-gate-top-boxes{grid-template-columns:minmax(215px,1.05fr) minmax(195px,.96fr) minmax(170px,.80fr)}}
@media(max-width:1250px){.top-filter-grid{grid-template-columns:1fr!important}.top-filter-actions{width:100%!important;max-width:none!important;min-width:0!important}.top-nav-links{grid-template-columns:repeat(4,minmax(118px,1fr))!important}}
@media(max-width:1200px){.market-gate-head{grid-template-columns:1fr}.market-gate-head-copy{min-height:0;padding-bottom:4px}.market-gate-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.top-nav-links{grid-template-columns:repeat(2,minmax(0,1fr))!important}.top-filter-actions{display:grid!important;grid-template-columns:1fr 68px!important}.heatmap-pair{grid-template-columns:1fr}}
@media(max-width:820px){.market-gate-top-boxes{grid-template-columns:1fr}.market-gate-score,.market-regime-score,.market-phase-score{width:100%;min-height:0;text-align:left}}
@media(max-width:760px){.market-gate-grid,.market-gate-insight{grid-template-columns:1fr}}


/* Source-parity refinements: PT Ngành / PT Cổ phiếu */
.ptcp-money-flow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:4px 0 14px;align-items:stretch}
.ptcp-money-card{background:linear-gradient(180deg,#111827 0%,#0b1220 100%);border:1px solid rgba(148,163,184,.18);border-radius:16px;padding:14px 16px;min-height:112px;box-shadow:0 8px 24px rgba(0,0,0,.20);display:flex;flex-direction:column;justify-content:center}
.ptcp-money-title{font-size:13px;color:#94a3b8;font-weight:800;letter-spacing:.02em;margin-bottom:7px}.ptcp-money-value{font-size:25px;line-height:1.18;font-weight:900;color:#f8fafc}.ptcp-signal-list{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.ptcp-signal-pill{display:inline-flex;align-items:center;border:1px solid rgba(56,189,248,.28);background:rgba(8,47,73,.34);color:#e0f2fe;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:750;line-height:1.12;white-space:nowrap}
.eagle-playbook{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.playbook-card{background:linear-gradient(180deg,#111827,#0b1220);border:1px solid rgba(148,163,184,.18);border-radius:14px;padding:14px 16px;min-height:100px}.playbook-card.wide{grid-column:span 2}.playbook-card .k,.profile-card .k{font-size:12px;color:#94a3b8;font-weight:800;margin-bottom:6px}.playbook-card .v{font-size:17px;font-weight:850;color:#f8fafc;line-height:1.35}.playbook-card .sub{font-size:12px;color:#cbd5e1;margin-top:6px;line-height:1.45}
.company-profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.profile-card{background:#0f172a;border:1px solid rgba(148,163,184,.18);border-radius:14px;padding:13px 15px}.profile-card .v{font-size:14px;font-weight:750;color:#f8fafc;line-height:1.45;word-break:break-word}.profile-card.wide{grid-column:span 2}
.stock-hero-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;justify-content:flex-end}.stock-hero-actions button:disabled{opacity:.45;cursor:not-allowed}
.metric-delta{min-height:17px}
@media(max-width:1180px){.ptcp-money-flow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.eagle-playbook,.company-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.ptcp-money-flow-grid,.eagle-playbook,.company-profile-grid{grid-template-columns:1fr}.playbook-card.wide,.profile-card.wide{grid-column:span 1}}


/* ─────────────────────────────────────────────────────────────────────────────
   STREAMLIT GOLDEN UI CONTRACT
   Source anchors: eagle_core/styles.py, app/shell_runtime.py, chart_utils.py.
   These rules intentionally override the earlier Web Pilot prototype where its
   SaaS-card presentation diverged from Streamlit. Web-only improvements are
   limited to responsive behavior, sticky tables, focus states and accessibility.
   ─────────────────────────────────────────────────────────────────────────── */
:root{
  --ui-bg:#0b1220;--ui-plot:#0f172a;
  --ui-text:#f8fafc;--ui-body:#e5e7eb;--ui-muted:#94a3b8;--ui-soft:#cbd5e1;
}
body{background:var(--ui-bg);color:var(--ui-body);font-size:14px;line-height:1.5;overflow-x:hidden}
.top-filter-shell{top:0!important;width:min(99vw,1920px)!important;margin:0 auto 8px!important;padding:4px 12px 3px!important;background:rgba(11,18,32,.985)!important;backdrop-filter:blur(14px)!important;border:1px solid rgba(148,163,184,.22)!important;border-radius:18px!important;box-shadow:0 12px 30px rgba(0,0,0,.28)!important}
.top-filter-grid{grid-template-columns:minmax(0,4.7fr) minmax(226px,1.3fr)!important;gap:10px!important}
.top-nav-links{grid-template-columns:repeat(6,minmax(118px,1fr))!important;grid-auto-rows:32px!important;gap:5px 8px!important;margin:0!important}
.top-nav-link{min-height:32px!important;padding:5px 12px!important;font-size:14px!important;font-weight:800!important;letter-spacing:.01em!important;border:1px solid rgba(148,163,184,.22)!important;border-radius:999px!important;background:rgba(15,23,42,.72)!important;color:#e5e7eb!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;transition:border-color .12s ease,background .12s ease,color .12s ease,transform .12s ease!important}
.top-nav-link:hover{border-color:rgba(56,189,248,.45)!important;color:#fff!important;transform:translateY(-1px)}
.top-nav-link.active{background:linear-gradient(90deg,rgba(239,68,68,.20) 0%,rgba(168,85,247,.16) 100%)!important;border-color:rgba(248,113,113,.60)!important;color:#f8fafc!important;box-shadow:inset 0 0 0 1px rgba(248,113,113,.15),0 14px 30px rgba(0,0,0,.22)!important}
.top-filter-label{font-size:12px!important;font-weight:800!important;letter-spacing:.03em!important;text-transform:uppercase!important;margin-bottom:6px!important}
.top-filter-actions{min-width:226px!important;max-width:252px!important;grid-template-columns:minmax(132px,1fr) 68px!important;gap:6px!important}
.top-filter-actions select,.choose-btn{min-height:32px!important;height:32px!important;border-radius:9px!important;padding-top:4px!important;padding-bottom:4px!important}
.page{width:min(97.4vw,1860px)!important;margin:0 auto 64px!important;padding:0 2px!important}
.dashboard-title-block{margin:.15rem 0 .65rem!important}
.dashboard-title-block h1{font-size:clamp(2rem,3vw,2.55rem)!important;line-height:1.08!important;letter-spacing:-.025em!important;margin:.05rem 0 .08rem!important;color:var(--ui-text)!important}
.latest-stamp{font-size:1rem!important;font-weight:700!important;color:var(--ui-soft)!important;margin:.15rem 0 .35rem!important}
.view-caption{margin:.18rem 0 .35rem;color:var(--ui-muted);font-size:13px;font-weight:600}

/* Metrics: preserve the clean Streamlit column rhythm, with only a subtle
   outline so Web scans better on very wide monitors. */
.metric-row{gap:10px!important;margin:0 0 10px!important}
.st-metric{min-height:104px!important;padding:14px 16px!important;background:linear-gradient(180deg,rgba(17,24,39,.72),rgba(11,18,32,.52))!important;border:1px solid rgba(148,163,184,.14)!important;border-radius:14px!important;box-shadow:none!important}
.metric-label{font-size:13px!important;color:var(--ui-muted)!important;font-weight:600!important;margin-bottom:6px!important}
.metric-value{font-size:28px!important;font-weight:750!important;letter-spacing:-.02em!important;color:var(--ui-text)!important}
.metric-delta{font-size:13px!important;margin-top:7px!important}

/* Streamlit subheaders/charts are not wrapped in oversized SaaS cards. */
.dashboard-section{background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:8px 0 2px!important;margin:18px 0 22px!important}
.dashboard-section>h2,.dashboard-section>h3,.section-heading-with-control h2{font-size:1.28rem!important;line-height:1.25!important;color:var(--ui-text)!important;margin:0 0 8px!important;font-weight:750!important}
.plot{border-radius:0!important;overflow:visible!important;background:var(--ui-plot)!important}
.plot .modebar,.js-plotly-plot .plotly .modebar{opacity:.78!important;right:112px!important;left:auto!important}

/* Market Gate follows Streamlit conclusion-box / PT-TT overview language. */
.market-gate-card{border-radius:18px!important;padding:18px 20px!important;background:linear-gradient(135deg,rgba(15,23,42,.96) 0%,rgba(8,47,73,.70) 52%,rgba(6,78,59,.46) 100%)!important;border-top:1px solid rgba(56,189,248,.22)!important;border-right:1px solid rgba(56,189,248,.22)!important;border-bottom:1px solid rgba(56,189,248,.22)!important;box-shadow:0 10px 28px rgba(2,132,199,.14)!important}
.market-gate-head{margin-bottom:12px!important}.market-gate-regime{font-size:24px!important;font-weight:900!important}.market-gate-action{font-size:14px!important;font-weight:720!important}
.market-regime-score,.market-phase-score,.market-gate-score,.market-gate-cell,.market-gate-insight>div{background:rgba(15,23,42,.52)!important;border-radius:13px!important;box-shadow:none!important}
.market-gate-cell span,.market-gate-insight span,.market-regime-score span,.market-phase-score span,.market-gate-score span{color:var(--ui-muted)!important;font-size:11px!important;font-weight:850!important;letter-spacing:.05em!important}

/* Native Streamlit-style tabs: text row + active underline, not pills. */
.tab-bar{display:flex!important;gap:2px!important;flex-wrap:wrap!important;margin:10px 0 16px!important;border-bottom:1px solid rgba(148,163,184,.20)!important}
.tab-btn{position:relative!important;border:0!important;border-radius:0!important;background:transparent!important;color:#aeb9c8!important;padding:9px 14px 10px!important;font-size:14px!important;font-weight:750!important;box-shadow:none!important}
.tab-btn:hover{color:#fff!important;background:rgba(30,41,59,.25)!important}
.tab-btn.active{color:#fff!important;background:transparent!important}
.tab-btn.active::after{content:"";position:absolute;left:12px;right:12px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:#38bdf8}

.st-expander{border:1px solid rgba(148,163,184,.18)!important;border-radius:12px!important;background:rgba(15,23,42,.42)!important;box-shadow:none!important}
.st-expander summary{padding:10px 14px!important;font-weight:700!important;color:#e5e7eb!important}

/* Tables mirror compact-table-wrap from Streamlit, improved with row identity. */
.table-wrap{border:1px solid rgba(148,163,184,.16)!important;border-radius:16px!important;background:rgba(2,6,23,.35)!important;padding:6px 8px!important;box-shadow:none!important;scrollbar-color:#475569 #0b1220}
.eagle-table{font-size:13px!important;background:transparent!important}
.eagle-table th,.eagle-table td{padding:6px 8px!important;border-bottom:1px solid rgba(148,163,184,.11)!important}
.eagle-table th{background:#111827!important;color:#f8fafc!important;border-bottom:1px solid rgba(148,163,184,.32)!important;box-shadow:0 8px 14px rgba(0,0,0,.22)!important}
.eagle-table th:first-child,.eagle-table td:first-child{position:sticky;left:0;z-index:3;background:#0b1220!important;box-shadow:8px 0 12px rgba(0,0,0,.18)}
.eagle-table th:first-child{z-index:7;background:#111827!important}
.eagle-table tbody tr:nth-child(even) td{background-color:rgba(15,23,42,.15)}
.eagle-table tbody tr:hover td{background:rgba(56,189,248,.055)!important}
.eagle-table .score-high{color:#22c55e!important;font-weight:850!important}.eagle-table .score-low{color:#ef4444!important;font-weight:850!important}.eagle-table .streak-pos{color:#22c55e!important;font-weight:850!important}.eagle-table .streak-neg{color:#ef4444!important;font-weight:850!important}
.phase-pill{padding:2px 7px!important;border-radius:999px!important;font-size:11px!important;font-weight:800!important}

/* Stock detail matches the Streamlit emphasis: ticker/company are one headline. */
.stock-hero{padding:3px 0 7px!important;margin-bottom:10px!important;border-bottom:1px solid rgba(148,163,184,.14)}
.stock-symbol{font-size:2.22rem!important;color:#38bdf8!important;font-weight:900!important;letter-spacing:-.025em!important}
.stock-company{font-size:1.08rem!important;color:#f8fafc!important;font-weight:700!important}
.technical-assessment{border:0!important;border-radius:0!important;padding:5px 0!important;background:transparent!important;min-width:0!important;color:#cbd5e1!important;box-shadow:none!important}
.ptcp-money-card,.playbook-card,.profile-card,.meta-card{box-shadow:none!important;border-color:rgba(148,163,184,.16)!important;background:linear-gradient(180deg,rgba(17,24,39,.76),rgba(11,18,32,.54))!important}
.ptcp-money-title,.playbook-card .k,.profile-card .k{color:#94a3b8!important}

/* Better focus/keyboard treatment than Streamlit while keeping its palette. */
button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid rgba(56,189,248,.72)!important;outline-offset:2px!important}

.heatmap-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:3px 0 10px;color:#cbd5e1;font-size:12px;font-weight:650}
.heatmap-legend-bar{height:12px;min-width:260px;flex:1 1 420px;max-width:620px;border-radius:999px;background:linear-gradient(90deg,#c52f3b 0%,#cf5a67 10%,#dc929b 20%,#e8b3b8 30%,#f1d1d2 42%,#f6e5aa 50%,#d7eadc 58%,#a8dac5 70%,#62bf93 82%,#239d6b 92%,#078452 100%);border:1px solid rgba(148,163,184,.18)}
.heatmap-limit-chip{display:inline-flex;align-items:center;gap:5px}.heatmap-swatch{width:11px;height:11px;border-radius:3px;display:inline-block;border:1px solid rgba(255,255,255,.18)}

@media(max-width:1250px){.top-nav-links{grid-template-columns:repeat(4,minmax(118px,1fr))!important}.top-filter-grid{grid-template-columns:1fr!important}.top-filter-actions{width:100%!important;max-width:none!important;min-width:0!important}}
@media(max-width:980px){.metric-row-5{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metric-row-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}.market-gate-head{grid-template-columns:1fr!important}.market-gate-top-boxes{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:900px){.top-nav-links{grid-template-columns:repeat(2,minmax(0,1fr))!important}.heatmap-pair{grid-template-columns:1fr!important}}
@media(max-width:720px){.metric-row-3,.metric-row-4,.metric-row-5{grid-template-columns:1fr!important}.market-gate-top-boxes,.market-gate-grid,.market-gate-insight{grid-template-columns:1fr!important}.top-filter-actions{grid-template-columns:1fr 68px!important}.dashboard-title-block h1{font-size:1.9rem!important}}


/* Interaction parity and overlap hardening */
.section-heading-with-control,.st-select-block,.inline-filter-row{position:relative;z-index:40}
.st-select-block{display:block;width:100%;max-width:100%;margin:8px 0 12px;color:#cbd5e1;font-size:13px;font-weight:700}
.st-select-block select{display:block;width:100%;height:38px;margin-top:6px;padding:5px 36px 5px 12px;border:1px solid rgba(148,163,184,.24);border-radius:8px;background:#0b1220;color:#f8fafc;position:relative;z-index:45}
.st-select-block select:focus{border-color:rgba(56,189,248,.75);box-shadow:0 0 0 3px rgba(56,189,248,.10)}
.plot,.js-plotly-plot,.plot-container{position:relative;z-index:1;min-width:0!important}
.js-plotly-plot .plotly .modebar{top:4px!important;right:6px!important;left:auto!important;z-index:6!important;background:rgba(11,18,32,.78)!important;border:1px solid rgba(148,163,184,.12)!important;border-radius:8px!important;padding:2px!important}
.js-plotly-plot .modebar-btn{opacity:.78!important}
.js-plotly-plot .modebar-btn:hover{opacity:1!important}
.data-link{appearance:none;border:0;background:transparent;padding:0;color:#f8fafc;font:inherit;font-weight:750;text-decoration:none;cursor:pointer;text-align:inherit}
.data-link:hover{color:#38bdf8;text-decoration:underline;text-underline-offset:3px}
.member-card-link{appearance:none;text-align:left;cursor:pointer;border-color:color-mix(in srgb,var(--member-tone,#94a3b8) 55%, transparent)!important;background:linear-gradient(180deg,color-mix(in srgb,var(--member-tone,#94a3b8) 12%,#0b1220),#0b1220)!important}
.member-card-link:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(0,0,0,.24);border-color:var(--member-tone,#38bdf8)!important}
.member-card-link b{color:#f8fafc}.member-card-link span{color:#cbd5e1}
.company-profile-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:9px!important}
.company-fin-card{background:linear-gradient(180deg,#0b1220 0%,#07101f 100%);border:1px solid rgba(59,130,246,.22);border-radius:12px;padding:17px 18px;min-height:114px;box-shadow:0 6px 18px rgba(0,0,0,.14)}
.company-fin-label{font-size:15px;color:#94a3b8;margin-bottom:12px;line-height:1.28;font-weight:500}.company-fin-label span{color:#7dd3fc;font-size:.70em;font-weight:600}.company-fin-value{font-size:19px;font-weight:800;color:#f8fafc;line-height:1.18;word-break:break-word}
.detail-modal{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:20px}.detail-modal.hidden{display:none!important}.detail-modal-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.82);backdrop-filter:blur(8px)}.detail-modal-card{position:relative;z-index:1;width:min(1040px,96vw);max-height:90vh;overflow:auto;background:linear-gradient(180deg,#0f172a,#0b1220);border:1px solid rgba(56,189,248,.30);border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.58)}.detail-modal-head{position:sticky;top:0;z-index:4;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px;background:rgba(15,23,42,.96);border-bottom:1px solid rgba(148,163,184,.16);backdrop-filter:blur(10px)}.detail-modal-eyebrow{font-size:11px;font-weight:900;letter-spacing:.08em;color:#38bdf8}.detail-modal-head h2{margin:4px 0 2px;font-size:28px}.detail-modal-sub{color:#94a3b8;font-size:13px}.detail-modal-close{width:38px;height:38px;border-radius:999px;border:1px solid rgba(148,163,184,.24);background:#111827;color:#f8fafc;font-size:24px;line-height:1}.detail-modal-body{padding:18px 20px}.detail-modal-foot{position:sticky;bottom:0;z-index:4;display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;background:rgba(15,23,42,.96);border-top:1px solid rgba(148,163,184,.16)}.popup-metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}.popup-metric-grid>div{border:1px solid rgba(148,163,184,.16);background:rgba(11,18,32,.66);border-radius:12px;padding:12px}.popup-metric-grid span{display:block;color:#94a3b8;font-size:12px;margin-bottom:5px}.popup-metric-grid b{font-size:18px;color:#f8fafc}.popup-member-list{border-top:1px solid rgba(148,163,184,.14);padding-top:12px}.popup-member-list .data-link{display:inline-block;margin:3px 8px 3px 0}.popup-plot{min-height:330px!important}.modal-open{overflow:hidden}
@media(max-width:1280px){.company-profile-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:1024px){.company-profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:760px){.company-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.popup-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-modal{padding:8px}}
@media(max-width:560px){.company-profile-grid,.popup-metric-grid{grid-template-columns:1fr!important}}

/* Searchable sector combobox is isolated from Plotly layers. */
.control-label{display:block;margin-bottom:6px;color:#cbd5e1;font-size:13px;font-weight:750}
.eagle-combobox{position:relative;z-index:120;width:100%}
.eagle-combobox-button{width:100%;height:38px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 12px;border:1px solid rgba(148,163,184,.24);border-radius:8px;background:#0b1220;color:#f8fafc;text-align:left;font-weight:650}
.eagle-combobox-button:hover{border-color:rgba(148,163,184,.42);background:#0e1729}.eagle-combobox-button[aria-expanded="true"]{border-color:rgba(56,189,248,.75);box-shadow:0 0 0 3px rgba(56,189,248,.10)}
.combo-chevron{font-size:18px;color:#94a3b8;line-height:1}.eagle-combobox-button[aria-expanded="true"] .combo-chevron{transform:rotate(180deg)}
.eagle-combobox-menu{position:absolute;z-index:10000;left:0;right:0;top:calc(100% + 6px);padding:8px;border:1px solid rgba(148,163,184,.26);border-radius:10px;background:#0b1220;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.eagle-combobox-search{height:36px!important;min-height:36px!important;margin:0 0 7px!important}.eagle-combobox-options{max-height:320px;overflow:auto;overscroll-behavior:contain}
.eagle-combobox-option{display:flex;width:100%;align-items:center;justify-content:space-between;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:#e5e7eb;text-align:left;font-weight:650}
.eagle-combobox-option[hidden]{display:none!important}
.eagle-combobox-option:hover,.eagle-combobox-option[aria-selected="true"]{background:rgba(56,189,248,.10);color:#f8fafc}.eagle-combobox-option[aria-selected="true"]::after{content:"✓";color:#38bdf8;font-weight:900}
.visually-hidden-select{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;padding:0!important;margin:-1px!important}
body.combo-open .js-plotly-plot .plotly .modebar{pointer-events:none!important;opacity:.12!important}

/* Prevent Plotly SVG/colorbars/modebars from leaking into following sections. */
.plot{position:relative;isolation:isolate;contain:layout paint;overflow:hidden}
.plot.plot-empty,.plot-tall.plot-empty,.heatmap-plot.plot-empty,.compact-plot.plot-empty{min-height:0!important;height:auto!important;contain:content;padding:0!important}
.plot.plot-empty>.parity-alert,.plot.plot-empty>.error{margin:4px 0 10px}


/* ========================================================================== */
/* Streamlit data/visual parity                                                */
/* ========================================================================== */
.plot{overflow:hidden!important;contain:layout paint!important}
#sectorBalanceChart{height:620px!important;min-height:620px!important;max-height:620px!important}
#sectorSelectedSection{contain:layout paint;overflow:visible}
.js-plotly-plot .plotly .modebar{transform:scale(.82);transform-origin:top right;background:rgba(11,18,32,.66)!important;border-radius:7px!important;padding:1px!important}
.js-plotly-plot .modebar-btn{width:24px!important;height:24px!important;padding:2px!important}
.js-plotly-plot .modebar-btn svg{width:17px!important;height:17px!important}
.heatmap-plot .slice text,.heatmap-plot .treemaptext{font-weight:800!important;text-shadow:none!important}

/* Tactical playbook mirrors the Streamlit decision hierarchy. */
.eagle-playbook-panel{display:block!important;border-left:3px solid #38bdf8;background:linear-gradient(135deg,rgba(12,32,54,.92),rgba(15,23,42,.84));border-radius:16px;padding:16px 18px}
.eagle-playbook-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:12px}.eagle-playbook-eyebrow,.eagle-subhead,.eagle-decision-k{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#7dd3fc}.eagle-playbook-title{font-size:22px;font-weight:900;color:#f8fafc;margin:4px 0}.eagle-playbook-meta{font-size:12px;color:#cbd5e1}.eagle-risk-pill{border-radius:999px;padding:5px 10px;font-size:11px;font-weight:850;border:1px solid rgba(148,163,184,.25)}.eagle-risk-pill.pass{color:#86efac;border-color:rgba(34,197,94,.38);background:rgba(34,197,94,.08)}.eagle-risk-pill.wait{color:#fde68a;border-color:rgba(245,158,11,.38);background:rgba(245,158,11,.08)}
.eagle-subhead{margin:14px 0 7px}.eagle-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.eagle-overview-cell{background:rgba(11,18,32,.62);border:1px solid rgba(148,163,184,.14);border-radius:10px;padding:9px 11px;min-height:70px}.eagle-overview-k{font-size:10px;color:#94a3b8;font-weight:800;text-transform:uppercase}.eagle-overview-v{font-size:15px;color:#f8fafc;font-weight:850;margin-top:3px}.eagle-overview-sub{font-size:11px;color:#cbd5e1;margin-top:3px;line-height:1.35}
.eagle-decision-card{border:1px solid rgba(34,197,94,.26);background:rgba(5,46,22,.10);border-radius:12px;padding:11px}.eagle-decision-v{font-size:18px;font-weight:900;color:#86efac;margin:3px 0}.eagle-decision-sub{font-size:12px;color:#cbd5e1}.eagle-layer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}.eagle-layer-card{border-radius:9px;padding:8px 10px;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.48)}.eagle-layer-card.pass{border-color:rgba(34,197,94,.30);background:rgba(34,197,94,.055)}.eagle-layer-card.wait{border-color:rgba(56,189,248,.28);background:rgba(56,189,248,.045)}.eagle-layer-card.fail{border-color:rgba(239,68,68,.32);background:rgba(239,68,68,.055)}.eagle-layer-k{font-size:10px;color:#94a3b8;font-weight:850;text-transform:uppercase}.eagle-layer-v{font-size:14px;font-weight:850;margin-top:3px}.eagle-layer-card.pass .eagle-layer-v{color:#86efac}.eagle-layer-card.wait .eagle-layer-v{color:#7dd3fc}.eagle-layer-card.fail .eagle-layer-v{color:#fda4af}.eagle-layer-sub{font-size:11px;color:#cbd5e1;margin-top:3px}.eagle-evidence-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.eagle-gate-chip{font-size:10px;border-radius:999px;padding:4px 7px;border:1px solid rgba(148,163,184,.20)}.eagle-gate-chip.pass{color:#bbf7d0;border-color:rgba(34,197,94,.30);background:rgba(34,197,94,.06)}.eagle-gate-chip.fail{color:#fecaca;border-color:rgba(239,68,68,.30);background:rgba(239,68,68,.06)}
.eagle-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}.eagle-action-card{border-radius:10px;padding:9px 11px;border:1px solid rgba(148,163,184,.16);background:rgba(11,18,32,.58)}.eagle-action-k{font-size:10px;text-transform:uppercase;color:#94a3b8;font-weight:850}.eagle-action-v{font-size:15px;font-weight:900;margin-top:3px}.eagle-action-sub{font-size:11px;color:#cbd5e1;margin-top:3px;line-height:1.35}.eagle-action-buy .eagle-action-v{color:#7dd3fc}.eagle-action-risk .eagle-action-v{color:#fda4af}.eagle-action-target .eagle-action-v{color:#c4b5fd}.eagle-action-watch .eagle-action-v{color:#fde68a}

/* Dense data tables: no sticky-cell ghosting; numeric alignment follows Streamlit. */
.eagle-table{width:max-content!important;min-width:100%!important;table-layout:auto!important}.eagle-table th:first-child,.eagle-table td:first-child{position:static!important;left:auto!important;box-shadow:none!important}.stock-detail-table th,.stock-detail-table td{font-variant-numeric:tabular-nums}.stock-detail-table td:nth-child(2),.stock-detail-table td:nth-child(3),.stock-detail-table td:nth-child(4),.stock-detail-table td:nth-child(5),.stock-detail-table td:nth-child(6),.stock-detail-table td:nth-child(8),.stock-detail-table td:nth-child(10){text-align:right!important}.stock-detail-table td:nth-child(n+11){text-align:center!important}.stock-detail-table td:nth-child(9){font-weight:750}.ranking-table-wrap .eagle-table{min-width:1480px!important}.ranking-table-wrap{overflow-x:auto!important;overflow-y:auto!important}

@media(max-width:760px){.eagle-overview-grid,.eagle-layer-grid,.eagle-action-grid{grid-template-columns:1fr}.eagle-playbook-head{flex-direction:column}.ranking-table-wrap .eagle-table{min-width:1180px!important}}

/* Streamlit keeps the five KPI metrics on one row at normal desktop widths. */
@media (min-width:1181px){
  .metric-row-5{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}


/* ============================================================
   Chart interaction, Market Gate semantics, read-only views
   ============================================================ */
.eagle-chart-frame{position:relative;min-width:0;border:1px solid rgba(148,163,184,.12);border-radius:12px;background:#0f172a;overflow:hidden;isolation:isolate}
.eagle-chart-frame>.plot{border:0!important;border-radius:0!important}
.eagle-chart-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:5px 8px;background:linear-gradient(180deg,rgba(15,23,42,.98),rgba(11,18,32,.94));border-bottom:1px solid rgba(148,163,184,.14);position:relative;z-index:12}
.chart-toolbar-actions{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.chart-toolbar-actions button{display:inline-flex;align-items:center;gap:5px;height:29px;padding:0 8px;border:1px solid rgba(148,163,184,.18);border-radius:7px;background:rgba(30,41,59,.76);color:#cbd5e1;font-size:11px;font-weight:750;cursor:pointer}.chart-toolbar-actions button:hover,.chart-toolbar-actions button.active{background:rgba(14,116,144,.28);border-color:rgba(34,211,238,.50);color:#f8fafc}.chart-toolbar-actions button:focus-visible{outline:2px solid #38bdf8;outline-offset:1px}.chart-legend-hint{color:#64748b;font-size:10.5px;font-weight:650;white-space:nowrap}
.eagle-chart-frame:fullscreen,.eagle-chart-frame.is-native-fullscreen,.eagle-chart-frame.chart-fullscreen-fallback{background:#0b1220;padding:10px;display:flex;flex-direction:column}.eagle-chart-frame:fullscreen>.plot,.eagle-chart-frame.is-native-fullscreen>.plot,.eagle-chart-frame.chart-fullscreen-fallback>.plot{flex:1!important;height:auto!important;min-height:calc(100vh - 78px)!important;max-height:none!important}.chart-fullscreen-fallback{position:fixed!important;inset:0!important;z-index:5000!important;border-radius:0!important}.chart-fullscreen-open{overflow:hidden!important}
.semantic-delta{font-weight:850}.semantic-positive{color:#22c55e!important}.semantic-negative{color:#ef4444!important}.semantic-cyan{color:#22d3ee!important}.metric-divider{color:#64748b;padding:0 3px}.discipline-card{background:linear-gradient(135deg,rgba(2,132,199,.10),rgba(15,23,42,.52))!important;border-color:rgba(56,189,248,.28)!important}.discipline-card b{color:#f8fafc!important}.discipline-card p{line-height:1.52!important}
.market-gate-cell b strong{font-size:18px}.market-gate-cell small .semantic-delta,.market-gate-score small .semantic-delta{font-size:18px!important}
.filter-workbench{display:grid;grid-template-columns:repeat(9,minmax(108px,1fr));align-items:end;gap:8px;margin:0 0 12px;padding:12px;border:1px solid rgba(148,163,184,.14);border-radius:12px;background:rgba(15,23,42,.52)}.filter-workbench label{display:grid;gap:5px;color:#94a3b8;font-size:11px;font-weight:800}.filter-workbench select,.filter-workbench input{width:100%;height:36px;padding:0 9px;border:1px solid rgba(148,163,184,.20);border-radius:8px;background:#0b1220;color:#e5e7eb}.filter-workbench button{height:36px}.placeholder-kicker{color:#f59e0b;font-size:11px;font-weight:900;letter-spacing:.08em;margin-bottom:6px}.placeholder-card h3{margin:0 0 8px}.placeholder-card p{max-width:900px;line-height:1.55}
#view-radar .eagle-table,#view-signals .eagle-table,#view-filter .eagle-table,#view-supercp .eagle-table{min-width:1320px}
@media(max-width:1360px){.filter-workbench{grid-template-columns:repeat(5,minmax(130px,1fr))}.chart-legend-hint{display:none}}
@media(max-width:820px){.filter-workbench{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-toolbar-actions button span{display:none}.chart-toolbar-actions button{min-width:31px;justify-content:center;padding:0 6px}}
@media(max-width:520px){.filter-workbench{grid-template-columns:1fr}.eagle-chart-toolbar{padding:5px}.chart-toolbar-actions{gap:3px}}
.chart-series-panel{position:absolute;z-index:30;top:40px;left:8px;width:min(360px,calc(100% - 16px));max-height:320px;overflow:auto;padding:10px;background:rgba(15,23,42,.98);border:1px solid rgba(56,189,248,.32);border-radius:10px;box-shadow:0 18px 48px rgba(0,0,0,.42)}.chart-series-panel.hidden{display:none!important}.chart-series-title{font-size:11px;color:#94a3b8;font-weight:900;letter-spacing:.05em;text-transform:uppercase;margin:0 0 7px}.chart-series-option{display:grid;grid-template-columns:18px 10px minmax(0,1fr);align-items:center;gap:7px;min-height:30px;padding:4px 5px;border-radius:6px;color:#e2e8f0;font-size:12px;font-weight:700;cursor:pointer}.chart-series-option:hover{background:rgba(56,189,248,.08)}.chart-series-option input{accent-color:#22d3ee}.chart-series-option i{width:9px;height:9px;border-radius:999px;display:block}


/* Streamlit parity */
.choose-btn,#stockLoadBtn,.detail-modal-foot .primary{background:#16a34a!important;border-color:#22c55e!important;color:#fff!important}.choose-btn:hover,#stockLoadBtn:hover{background:#15803d!important}.stock-symbol,#stockSymbol{color:#22c55e!important}.ticker-link{color:#22c55e!important}.sector-link{color:#7dd3fc!important}.data-link:hover{filter:brightness(1.18)}
.market-gate-card{overflow:hidden}.market-gate-cell,.market-regime-score,.market-phase-score,.market-gate-score{transition:border-color .15s ease,background .15s ease}.market-gate-cell b{color:#f8fafc}.market-gate-insight>div{border-width:1px}.discipline-card{border-color:rgba(250,204,21,.34)!important;background:rgba(250,204,21,.055)!important}
.streamlit-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0 10px}.streamlit-filter-grid label,.range-box{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#cbd5e1}.streamlit-filter-grid input,.streamlit-filter-grid select,.range-box input,.range-box select{width:100%;min-height:40px;background:#111827;border:1px solid rgba(148,163,184,.22);border-radius:9px;color:#f8fafc;padding:8px 11px}.check-filter-row{display:flex;gap:28px;flex-wrap:wrap;margin:4px 0 14px;color:#cbd5e1}.check-filter-row label{display:flex;gap:8px;align-items:center}.signal-strip{border:1px solid rgba(56,189,248,.28);background:linear-gradient(90deg,rgba(14,116,144,.18),rgba(15,23,42,.72));border-radius:10px;padding:12px 14px;margin:10px 0 18px;color:#cbd5e1}.signal-strip b{color:#7dd3fc;margin-right:12px}.signal-strip strong{color:#f8fafc;margin-right:10px}.metric-accent-cyan{border-color:rgba(56,189,248,.55)!important;box-shadow:0 0 0 1px rgba(56,189,248,.08) inset}.metric-text-value{font-size:1.8rem!important}.count-inline{font-size:.9rem;color:#22c55e;margin-left:8px}.filter-tabs{margin-top:12px}.filter-tab-panel{display:none;padding:16px 0 8px}.filter-tab-panel.active{display:grid}.filter-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.range-box{padding:0}.range-box h3{margin:0;color:#f8fafc;font-size:15px}.range-hint{color:#94a3b8;font-size:11px}.filter-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0}.popup-metric-grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}.popup-member-grid{margin:8px 0 18px}.popup-heatmap{min-height:430px}.detail-modal-card{width:min(1240px,97vw)}.eagle-warning-strip{margin:10px 0 4px;padding:10px 12px;border:1px solid rgba(249,115,22,.42);background:rgba(249,115,22,.09);border-radius:10px;color:#fdba74;font-weight:800}.eagle-playbook-title{font-weight:950!important}.sector-kpi-row .metric-delta.delta-up{color:#22c55e}.sector-kpi-row .metric-delta.delta-down{color:#ef4444}.chart-toolbar [data-chart-action="png"]{border-color:rgba(34,197,94,.35)}
@media (max-width:900px){.streamlit-filter-grid,.filter-grid-3,.popup-metric-grid-5{grid-template-columns:1fr 1fr}}@media (max-width:620px){.streamlit-filter-grid,.filter-grid-3,.popup-metric-grid-5{grid-template-columns:1fr}}


/* Strict Streamlit parity and real-data acceptance */
.setup-semantic-pill{display:inline-flex;align-items:center;border:1px solid;border-radius:999px;padding:3px 8px;margin:0 2px}.stock-warning-ribbon{font-size:13px;line-height:1.5}.radar-map-controls{display:grid;grid-template-columns:minmax(300px,2fr) auto minmax(190px,1fr) auto;align-items:end;gap:14px;margin:8px 0 14px;padding:12px 14px;border:1px solid rgba(148,163,184,.18);background:rgba(15,23,42,.5);border-radius:10px}.radar-map-controls label{display:flex;gap:8px;align-items:center;color:#cbd5e1;font-size:13px}.radar-map-controls .range-control{display:flex;flex-direction:column;align-items:stretch}.radar-map-controls select{min-height:38px;background:#111827;color:#f8fafc;border:1px solid rgba(148,163,184,.22);border-radius:8px;padding:6px 9px}.radar-map-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(320px,.85fr);gap:16px;align-items:start}.radar-sector-summary{max-height:590px}.radar-stock-heatmap{min-height:600px}.radar-tab-panel{display:none;padding-top:10px}.radar-tab-panel.active{display:block}.radar-tabs{margin-top:4px}.explain-summary-grid{display:grid;grid-template-columns:1.8fr 1fr 1fr;gap:12px;margin:12px 0}.explain-card{display:flex;flex-direction:column;gap:8px;min-height:116px;padding:16px;border:1px solid rgba(148,163,184,.18);border-radius:12px;background:rgba(15,23,42,.72)}.explain-card>span{font-size:12px;color:#94a3b8;font-weight:800}.explain-card>b{font-size:21px;color:#f8fafc}.explain-card small{color:#94a3b8}.money-breakdown-table td:nth-child(3),.money-breakdown-table td:nth-child(4),.money-breakdown-table td:nth-child(5){text-align:right;font-variant-numeric:tabular-nums}.breakdown-total{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding:12px 16px;border:1px solid rgba(56,189,248,.38);background:linear-gradient(135deg,rgba(8,47,73,.42),rgba(15,23,42,.92));border-radius:10px}.breakdown-total b{font-size:23px}.filter-tab-panel:not(.filter-grid-3){padding-top:16px}.rsline-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 14px}.ticker-search-box{max-width:520px;margin-bottom:14px}.action-check-box label{display:flex;align-items:center;gap:8px;min-height:40px}.filter-grid-3 .range-box input+input{margin-top:2px}.eagle-table .ticker-link{font-weight:900}.eagle-table .sector-link{font-weight:800}
@media(max-width:1050px){.radar-map-grid{grid-template-columns:1fr}.radar-map-controls{grid-template-columns:1fr 1fr}.explain-summary-grid{grid-template-columns:1fr 1fr}.rsline-checks{grid-template-columns:1fr}}@media(max-width:680px){.radar-map-controls,.explain-summary-grid{grid-template-columns:1fr}}


/* Real-data visual parity */
.eagle-chart-toolbar{justify-content:flex-start!important}.chart-legend-hint{display:none!important}
.radar-kpi-card,.signal-switch-card{appearance:none;color:inherit;text-align:left;cursor:pointer;transition:.16s ease}.radar-kpi-card:hover,.signal-switch-card:hover{transform:translateY(-1px);border-color:rgba(56,189,248,.70)!important}.radar-kpi-card.active,.signal-switch-card.active{border-color:#38bdf8!important;box-shadow:inset 0 0 0 1px rgba(56,189,248,.18),0 10px 28px rgba(14,165,233,.10)!important}.metric-card-action{margin-top:8px;font-size:11px;color:#64748b;font-weight:700}.radar-kpi-card.active .metric-card-action{color:#7dd3fc}
.signal-card-grid{display:grid;gap:12px;margin:12px 0 18px}.signal-card-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.signal-card-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.signal-switch-card{min-height:105px;border-radius:13px;border:1px solid rgba(148,163,184,.30);background:linear-gradient(180deg,rgba(15,23,42,.97),rgba(2,6,23,.99));padding:14px 16px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.signal-switch-card span{font-size:12px;font-weight:850;color:#cbd5e1}.signal-switch-card b{font-size:1.8rem;margin-top:8px;color:#f8fafc}.section-head-inline{display:flex;justify-content:space-between;align-items:end;margin:8px 0 10px}.mini-eyebrow{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#38bdf8}
.member-grid{align-items:stretch}.member-card-link{display:flex!important;flex-direction:column;justify-content:center;min-height:68px;gap:3px}.member-card-link small{display:block;color:#64748b;font-size:10px;margin-top:2px}.popup-member-grid .member-card-link{min-height:64px}
.stock-detail-table{font-size:12px!important}.stock-detail-table th,.stock-detail-table td{padding:8px 8px!important}.stock-detail-table .score-positive{color:#22c55e;font-weight:800}.stock-detail-table .score-negative{color:#facc15;font-weight:750}.stock-detail-table .rs-positive{color:#22c55e;font-weight:850}.stock-detail-table .rs-negative{color:#ef4444;font-weight:850}.stock-detail-table .volume-hot,.stock-detail-table .volume-ratio-hot{background:rgba(236,72,153,.22)!important;color:#f9a8d4!important;font-weight:850}.stock-detail-table td.tech-pass,.stock-detail-table td.tech-fail{padding:0!important;border-right:1px solid rgba(255,255,255,.06)}.stock-detail-table td.tech-pass{background:#16a34a!important}.stock-detail-table td.tech-fail{background:#dc2626!important}.stock-detail-table td.tech-na{background:rgba(71,85,105,.25)!important}.tech-cell-mark{display:block;min-width:52px;min-height:32px;width:100%;height:100%}
#marketHeatmap .textpoint,#sectorMarketCapHeatmap .textpoint{font-weight:800}.heatmap-legend-bar{filter:saturate(1.18) contrast(1.08)}
#radarStockHeatmap .hm,#coreSectorHeatmap1W .hm,#coreSectorHeatmap1M .hm,#thematicSectorHeatmap1W .hm,#thematicSectorHeatmap1M .hm{shape-rendering:crispEdges}
.data-link.sector-link{font-weight:850!important;text-decoration:none}.data-link.sector-link:hover{text-decoration:underline}
@media(max-width:1000px){.signal-card-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.signal-card-grid-3{grid-template-columns:1fr}}

/* Real-data interaction */
.plot{overflow:visible!important;contain:none!important;isolation:isolate!important}
.eagle-chart-frame{overflow:visible!important}
.eagle-chart-frame .svg-container,.eagle-chart-frame .main-svg{overflow:visible!important}
.eagle-chart-hover-tooltip{position:fixed;z-index:99999;max-width:340px;padding:10px 12px;border:1px solid #475569;border-radius:9px;background:rgba(2,6,23,.97);color:#f8fafc;font-size:12px;line-height:1.45;box-shadow:0 14px 36px rgba(0,0,0,.45);pointer-events:none;white-space:normal}.eagle-chart-hover-tooltip.hidden{display:none!important}.hover-sep{height:1px;background:rgba(148,163,184,.25);margin:7px 0}
.data-link.sector-link,.sector-link{color:#22c55e!important;font-weight:850!important}.data-link.sector-link:hover{text-decoration:underline;color:#4ade80!important}
.phase-leader{color:#c084fc!important;border-color:#a855f7!important;background:rgba(168,85,247,.14)!important}.phase-improving{color:#4ade80!important;border-color:#22c55e!important;background:rgba(34,197,94,.14)!important}.phase-weakening{color:#fde047!important;border-color:#facc15!important;background:rgba(250,204,21,.14)!important}.phase-laggard{color:#f87171!important;border-color:#ef4444!important;background:rgba(239,68,68,.14)!important}
.member-card{border-left:4px solid var(--member-tone,#64748b)!important;background:linear-gradient(90deg,color-mix(in srgb,var(--member-tone,#64748b) 10%,#0f172a),#0f172a 40%)!important}.member-card b{color:var(--member-tone,#f8fafc)!important}.member-card small{color:#94a3b8!important}
.eagle-table th.sticky-ticker-col,.eagle-table td.sticky-ticker-col{position:sticky!important;left:0!important;z-index:8!important;background:#0b1220!important;box-shadow:8px 0 14px rgba(0,0,0,.28)!important}.eagle-table th.sticky-ticker-col{top:0!important;z-index:12!important;background:#111827!important}
.stock-detail-table th,.stock-detail-table td{white-space:nowrap}.stock-detail-table th:nth-last-child(-n+7),.stock-detail-table td:nth-last-child(-n+7){min-width:72px!important;max-width:82px!important;text-align:center!important}.stock-detail-table .tech-cell-mark{width:100%;min-width:38px;height:24px;border-radius:3px}
.detail-modal-card{width:min(1500px,98vw)!important}.detail-modal-body{overflow:visible!important}.popup-heatmap{min-height:610px!important}.popup-member-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}.popup-plot{min-height:430px!important}
.heatmap-legend{margin:5px 0 8px!important}.heatmap-legend+[class*="eagle-chart-frame"]{margin-top:0!important}
@media(max-width:900px){.popup-member-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* Visual, tooltip and semantic rules */
.eagle-chart-hover-tooltip{max-width:380px!important;min-width:220px!important;padding:11px 13px!important;background:rgba(2,6,23,.985)!important;border:1px solid #64748b!important;border-radius:10px!important;box-shadow:0 16px 44px rgba(0,0,0,.58)!important;line-height:1.5!important}
.eagle-chart-hover-tooltip .hover-date{font-weight:850;color:#f8fafc;font-size:13px;margin-bottom:7px;padding-bottom:6px;border-bottom:1px solid rgba(148,163,184,.28)}
.eagle-chart-hover-tooltip .hover-title{font-weight:850;color:#f8fafc;margin:2px 0}.eagle-chart-hover-tooltip .hover-sub{color:#cbd5e1;margin-bottom:5px}.eagle-chart-hover-tooltip .hover-line{display:flex;gap:18px;justify-content:space-between;align-items:center;padding:2px 0}.eagle-chart-hover-tooltip .hover-line span{color:#cbd5e1}.eagle-chart-hover-tooltip .hover-line b{color:#f8fafc}.eagle-chart-hover-tooltip .hover-grid{display:grid;grid-template-columns:max-content 1fr;gap:3px 14px}.eagle-chart-hover-tooltip .hover-grid span{color:#94a3b8}.eagle-chart-hover-tooltip .hover-grid b{color:#f8fafc;text-align:right}
.semantic-pill{display:inline-flex;align-items:center;border:1px solid color-mix(in srgb,var(--pill-tone,#64748b) 70%,transparent);background:color-mix(in srgb,var(--pill-tone,#64748b) 14%,transparent);color:var(--pill-tone,#cbd5e1);border-radius:999px;padding:2px 8px;font-weight:800;white-space:nowrap}.setup-super{--pill-tone:#a855f7}.setup-breakout{--pill-tone:#22c55e}.setup-pullback{--pill-tone:#38bdf8}.setup-defensive{--pill-tone:#facc15}.setup-neutral{--pill-tone:#94a3b8}
.sector-name-cell .data-link,.data-link.sector-link,.sector-link{color:#22c55e!important;font-weight:850!important}.sector-name-cell .data-link:hover,.data-link.sector-link:hover{color:#4ade80!important}
.member-card{min-height:76px!important;padding:10px 12px!important}.member-card span{font-weight:750!important}.member-card small{margin-top:4px!important}.member-grid{gap:9px!important}
#sectorMembers .member-card,#detailPopupSectorMembers .member-card{border:1px solid color-mix(in srgb,var(--member-tone,#64748b) 58%,#334155)!important;border-left-width:4px!important}
#coreSectorHeatmap1W .hm,#coreSectorHeatmap1M .hm,#thematicSectorHeatmap1W .hm,#thematicSectorHeatmap1M .hm,#radarStockHeatmap .hm{shape-rendering:crispEdges!important;filter:none!important}
#coreSectorHeatmap1W,#coreSectorHeatmap1M,#thematicSectorHeatmap1W,#thematicSectorHeatmap1M{background:#0b1220!important}
.eagle-chart-frame .plot{width:100%!important}.eagle-chart-frame .plot .svg-container{width:100%!important}
#detailPopupSectorHeatmap{width:100%!important;min-height:650px!important}.detail-modal-body{padding-bottom:22px!important}.detail-modal-card{max-height:94vh!important}.detail-modal-body{max-height:calc(94vh - 132px)!important;overflow:auto!important}
.heatmap-legend[data-heatmap-for]{display:flex!important;align-items:center!important;gap:8px!important}.heatmap-legend-bar{height:10px!important;border-radius:999px!important}
.eagle-table .sticky-ticker-col .data-link{font-weight:900!important;color:#22c55e!important}

/* Final readability and semantic contract. */
.js-plotly-plot .hoverlayer{pointer-events:none!important}
.eagle-table .sector-name-cell .sector-link,.eagle-table .sector-link{color:#22c55e!important;font-weight:850!important}
.eagle-table .sector-name-cell .sector-link:hover,.eagle-table .sector-link:hover{color:#4ade80!important}
#coreSectorHeatmap1W,#coreSectorHeatmap1M,#thematicSectorHeatmap1W,#thematicSectorHeatmap1M{background:#0f172a;border-radius:8px}
#radarStockHeatmap{background:#0f172a;border-radius:8px}
#sectorMarketCapHeatmap .textpoint,#detailPopupSectorHeatmap .textpoint,#marketHeatmap .textpoint{font-weight:850!important;text-shadow:0 1px 1px rgba(0,0,0,.22)}
.eagle-chart-frame{overflow:visible!important}
.eagle-chart-frame .plot{overflow:visible!important}

/* Geometry, tooltip, timeframe and interaction rules */
/* Keep every Plotly surface inside its own box; the external tooltip is frame-local and fixed. */
.plot{position:relative!important;z-index:1!important;overflow:hidden!important;contain:layout paint!important;isolation:isolate!important}
.eagle-chart-frame{position:relative!important;z-index:2!important;overflow:visible!important;contain:none!important;margin:0 0 14px!important}
.eagle-chart-frame .plot,.eagle-chart-frame .svg-container,.eagle-chart-frame .main-svg{max-width:100%!important}
.dashboard-section,.sector-tab-panel,.detail-modal-body{position:relative!important}
.dashboard-section>.eagle-chart-frame{z-index:2!important}
.table-wrap{position:relative!important;z-index:20!important;overflow:auto!important;overscroll-behavior:contain!important;pointer-events:auto!important;scrollbar-gutter:stable both-edges}
.table-wrap *{pointer-events:auto}
.eagle-table{position:relative!important;z-index:21!important}

/* Plotly's own white/translucent hover boxes are suppressed. The EAGLE black tooltip is the sole hover surface. */
.js-plotly-plot .hoverlayer .hovertext,.js-plotly-plot .hoverlayer .axistext,.js-plotly-plot .hoverlayer .hovertext path,.js-plotly-plot .hoverlayer .hovertext text{display:none!important;opacity:0!important}
.eagle-chart-hover-tooltip{position:fixed!important;z-index:2147483000!important;max-width:430px!important;min-width:250px!important;background:#020617!important;color:#f8fafc!important;border:1px solid #64748b!important;border-radius:10px!important;box-shadow:0 18px 48px rgba(0,0,0,.66)!important;backdrop-filter:none!important;pointer-events:none!important;opacity:1!important}
.eagle-chart-hover-tooltip .hover-date{color:#fff!important}.eagle-chart-hover-tooltip .hover-title{color:#fff!important}.eagle-chart-hover-tooltip .hover-sub{color:#cbd5e1!important}.eagle-chart-hover-tooltip .hover-grid b,.eagle-chart-hover-tooltip .hover-line b{color:#fff!important}
.chart-fullscreen-fallback .eagle-chart-hover-tooltip,.eagle-chart-frame:fullscreen .eagle-chart-hover-tooltip{z-index:2147483646!important}

/* Legend/explanation is kept immediately above the plotting area. */
.js-plotly-plot .legend{transform:translateY(0)!important}
.eagle-chart-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;position:relative!important;z-index:35!important}
.chart-toolbar-actions{display:flex!important;align-items:center!important;gap:4px!important;flex-wrap:wrap!important}
.chart-timeframe-control{display:flex;align-items:center;gap:6px;margin-left:auto;color:#94a3b8;font-size:11px;font-weight:800;white-space:nowrap}
.chart-timeframe-control.hidden{display:none!important}.chart-timeframe-control select{height:31px;min-width:155px;padding:3px 28px 3px 9px;border:1px solid rgba(148,163,184,.24);border-radius:7px;background:#0b1220;color:#e5e7eb;font-size:11px;font-weight:700}
.chart-overview-btn.hidden{display:none!important}

/* Give Y/Y2 titles enough breathing room without letting them collide with neighbor sections. */
.eagle-chart-frame .js-plotly-plot{width:100%!important;max-width:100%!important}
.eagle-chart-frame .ytitle,.eagle-chart-frame .y2title{font-weight:700!important}

/* Stronger Streamlit-consistent semantic colors. */
.member-card{border-width:1px 1px 1px 5px!important;border-color:color-mix(in srgb,var(--member-tone,#64748b) 78%,#334155)!important;background:linear-gradient(110deg,color-mix(in srgb,var(--member-tone,#64748b) 22%,#0f172a) 0%,#0f172a 45%,#0b1220 100%)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--member-tone,#64748b) 10%,transparent)!important}
.member-card b,.member-card span{color:var(--member-tone,#f8fafc)!important}.member-card small{color:#94a3b8!important}
.member-card-link:hover{border-color:var(--member-tone,#38bdf8)!important;background:linear-gradient(110deg,color-mix(in srgb,var(--member-tone,#64748b) 30%,#0f172a),#0b1220 70%)!important}

/* Sticky ticker stays readable while horizontal scroll remains draggable. */
.eagle-table th.sticky-ticker-col,.eagle-table td.sticky-ticker-col{position:sticky!important;left:0!important;z-index:34!important;background:#0b1220!important;box-shadow:8px 0 16px rgba(0,0,0,.32)!important}
.eagle-table th.sticky-ticker-col{top:0!important;z-index:38!important;background:#111827!important}

/* Sector modal uses the full available width; treemap no longer looks like a half-panel. */
.detail-modal-card{width:min(1560px,98.5vw)!important}.detail-modal-body{width:100%!important;box-sizing:border-box!important}
#detailPopupSectorHeatmap,#detailPopupSectorHeatmap.eagle-chart-frame,#detailPopupSectorHeatmap .plot-container{width:100%!important;max-width:none!important}
#detailPopupSectorHeatmap{min-height:700px!important}
.popup-member-grid{width:100%!important}

/* Links must remain clickable above nearby chart surfaces. */
.data-link,.sector-link,.member-card-link{position:relative!important;z-index:45!important;pointer-events:auto!important}
.sector-name-cell .data-link,.data-link.sector-link,.sector-link{color:#22c55e!important}

@media(max-width:980px){.chart-timeframe-control{width:100%;justify-content:flex-end}.chart-timeframe-control select{min-width:180px}}

/* Keep Pilot-key recovery deterministic without exposing the key. */
.key-card .key-hint{font-size:12px;line-height:1.45;color:#94a3b8;margin-top:-2px;margin-bottom:10px}
.key-card .key-hint code{color:#cbd5e1;background:rgba(15,23,42,.7);padding:2px 5px;border-radius:5px;word-break:break-all}


/* Global filters, deterministic legends/tooltips and treemap semantics */
.eagle-chart-legend-strip{
  display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;
  min-height:34px!important;padding:5px 12px 4px!important;border-top:1px solid rgba(148,163,184,.08)!important;
  border-bottom:1px solid rgba(148,163,184,.10)!important;background:#0f172a!important;
  position:relative!important;z-index:34!important;
}
.eagle-chart-legend-strip.hidden{display:none!important}
.eagle-chart-legend-item{
  appearance:none!important;border:0!important;background:transparent!important;color:#e2e8f0!important;
  display:inline-flex!important;align-items:center!important;gap:6px!important;padding:3px 6px!important;
  border-radius:6px!important;font-size:12px!important;font-weight:750!important;cursor:pointer!important;
}
.eagle-chart-legend-item:hover{background:rgba(56,189,248,.08)!important}
.eagle-chart-legend-item.muted{opacity:.34!important}
.eagle-chart-legend-swatch{width:20px!important;height:3px!important;border-radius:999px!important;display:inline-block!important;flex:0 0 auto!important}
.eagle-chart-legend-swatch.candle{height:10px!important;width:18px!important;border-radius:2px!important;background:linear-gradient(90deg,#22c55e 0 48%,#ef4444 52% 100%)!important;border:1px solid rgba(226,232,240,.25)!important}

/* Native Plotly hover is deliberately enabled for matrix/heatmap charts because it maps the exact cell.
   It is forced to the same opaque black visual language as the custom EAGLE hover surface. */
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext{
  display:block!important;opacity:1!important;
}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext path,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext path{
  display:block!important;opacity:1!important;fill:#020617!important;stroke:#64748b!important;
}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext text,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext text{
  display:block!important;opacity:1!important;fill:#f8fafc!important;
}

/* Member cards must visibly encode the canonical Điểm KT band, not merely carry a subtle border. */
#sectorMembers .member-card,#detailPopupSectorMembers .member-card{
  border-left:6px solid var(--member-tone,#64748b)!important;
  border-color:color-mix(in srgb,var(--member-tone,#64748b) 88%,#334155)!important;
  background:linear-gradient(105deg,color-mix(in srgb,var(--member-tone,#64748b) 42%,#0f172a) 0%,#0f172a 48%,#0b1220 100%)!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--member-tone,#64748b) 18%,transparent),0 4px 14px rgba(0,0,0,.14)!important;
}
#sectorMembers .member-card b,#sectorMembers .member-card span,
#detailPopupSectorMembers .member-card b,#detailPopupSectorMembers .member-card span{
  color:var(--member-tone,#f8fafc)!important;
}

/* Plot area gets more horizontal room while automargin still protects both Y/Y2 titles. */
.eagle-chart-frame>.plot{width:100%!important;max-width:100%!important}
.eagle-chart-frame .cartesianlayer{overflow:visible!important}

/* Treemap text stays two-line (ticker over move); Plotly uniformtext hides it automatically on tiny leaves. */
#marketHeatmap .treemaptext,#sectorMarketCapHeatmap .treemaptext,#detailPopupSectorHeatmap .treemaptext{
  font-weight:850!important;text-shadow:none!important;
}


/* Market Gate semantics, compact charts, heatmap hover and PTCP fit */
/* Streamlit-like Market Gate: the gate itself follows the active policy color;
   internal KPI/insight cards preserve their own semantic states instead of a monochrome wash. */
.market-gate-card{
  background:linear-gradient(135deg,color-mix(in srgb,currentColor 10%,#0f172a) 0%,#0f172a 48%,color-mix(in srgb,currentColor 6%,#082f49) 100%)!important;
  border:1px solid color-mix(in srgb,currentColor 58%,#334155)!important;
  border-left:5px solid currentColor!important;
  box-shadow:0 12px 30px color-mix(in srgb,currentColor 15%,transparent)!important;
}
.market-regime-score,.market-phase-score,.market-gate-score,.market-gate-cell{
  background:linear-gradient(180deg,color-mix(in srgb,currentColor 8%,#0f172a),rgba(15,23,42,.54))!important;
  border-color:color-mix(in srgb,currentColor 42%,#334155)!important;
}
.market-gate-insight>div{
  background:linear-gradient(180deg,color-mix(in srgb,var(--insight-tone,#64748b) 8%,#0f172a),rgba(15,23,42,.50))!important;
  border-color:color-mix(in srgb,var(--insight-tone,#64748b) 48%,#334155)!important;
}
.market-gate-insight-allocation b{color:var(--insight-tone,#22c55e)!important}
.market-gate-insight-thesis{--insight-tone:#38bdf8}.market-gate-insight-risk{--insight-tone:#64748b}
.discipline-card{background:linear-gradient(180deg,color-mix(in srgb,var(--insight-tone,#facc15) 8%,#0f172a),rgba(15,23,42,.52))!important;border-color:color-mix(in srgb,var(--insight-tone,#facc15) 52%,#334155)!important}
.metric-note{color:#94a3b8!important;font-weight:700!important}

/* External legend already lives above the plot; reserve only the geometry actually needed by axes. */
.eagle-chart-frame>.plot{margin-top:0!important;margin-bottom:0!important}
.eagle-chart-frame .svg-container,.eagle-chart-frame .main-svg{margin-top:0!important;margin-bottom:0!important}
.eagle-chart-legend-strip{margin:0!important}

/* Exact Plotly point events drive the EAGLE black tooltip for every chart/heatmap.
   Keep native Plotly hover hidden to avoid duplicate/white hover layers. */
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext,
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext path,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext path,
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext text,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext text{display:none!important;opacity:0!important}

/* Member cards mirror Streamlit get_score_color(): the whole card is tinted by Điểm KT,
   while ticker/score text remains readable and consistent. */
#sectorMembers .member-card,#detailPopupSectorMembers .member-card{
  border:1px solid var(--member-border,rgba(148,163,184,.28))!important;
  border-left-width:1px!important;
  background:linear-gradient(180deg,var(--member-soft,rgba(100,116,139,.12)) 0%,#0b1220 100%)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
}
#sectorMembers .member-card b,#detailPopupSectorMembers .member-card b{color:#f8fafc!important}
#sectorMembers .member-card span,#detailPopupSectorMembers .member-card span{color:#e2e8f0!important}
#sectorMembers .member-card small,#detailPopupSectorMembers .member-card small{color:#94a3b8!important}

/* PTCP detailed table: all seven technical families remain visible at normal desktop width. */
#stockDetailTable{overflow-x:hidden!important;padding-left:4px!important;padding-right:4px!important}
.stock-detail-table{width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:11.5px!important}
.stock-detail-table th,.stock-detail-table td{padding:7px 5px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.stock-detail-table th:nth-child(n+9):nth-child(-n+15){font-size:10px!important;line-height:1.05!important;white-space:normal!important;text-align:center!important;padding-left:2px!important;padding-right:2px!important}
.stock-detail-table td:nth-child(n+9):nth-child(-n+15){padding:0!important}
.stock-detail-table .tech-cell-mark{min-width:0!important;min-height:30px!important}
@media(max-width:1180px){.stock-detail-table{font-size:10.5px!important}.stock-detail-table th,.stock-detail-table td{padding-left:3px!important;padding-right:3px!important}}

/* Semantic colors, matrix hover and full-width Radar */
/* Avoid color-mix/currentColor fallbacks: all tints are precomputed by app.js. */
.market-gate-card{
  background:linear-gradient(135deg,var(--gate-soft,rgba(56,189,248,.12)) 0%,#0f172a 48%,#082f49 100%)!important;
  border-color:var(--gate-tone,#38bdf8)!important;
  border-left:5px solid var(--gate-tone,#38bdf8)!important;
  box-shadow:0 12px 30px var(--gate-soft,rgba(56,189,248,.12))!important;
}
.market-regime-score,.market-phase-score,.market-gate-score,.market-gate-cell{
  background:linear-gradient(180deg,var(--semantic-soft,rgba(100,116,139,.14)) 0%,rgba(15,23,42,.58) 100%)!important;
  border-color:var(--semantic-border,#64748b)!important;
  box-shadow:inset 4px 0 0 var(--semantic-tone,#64748b)!important;
}
.market-regime-score b,.market-phase-score b,.market-gate-score b,.market-gate-cell>b{
  color:var(--semantic-tone,#f8fafc)!important;
}
.market-gate-insight>div{
  border-color:var(--insight-tone,#64748b)!important;
  border-left:4px solid var(--insight-tone,#64748b)!important;
}
.market-gate-insight>div>span,.market-gate-insight>div>b{color:var(--insight-tone,#cbd5e1)!important}
.discipline-card b{color:var(--insight-tone,#facc15)!important}

/* Matrix charts use Plotly's exact cell hit-testing and opaque black tooltip. */
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext{display:block!important;opacity:1!important}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext path,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext path{display:block!important;opacity:1!important;fill:#020617!important;stroke:#64748b!important}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext text,
.eagle-native-hover .js-plotly-plot .hoverlayer .axistext text{display:block!important;opacity:1!important;fill:#f8fafc!important}

/* Điểm KT must be obvious at a glance, including on Chromium without color-mix(). */
#sectorMembers .member-card,#detailPopupSectorMembers .member-card{
  border:1px solid var(--member-border,#64748b)!important;
  border-left:6px solid var(--member-tone,#64748b)!important;
  background:linear-gradient(110deg,var(--member-soft,rgba(100,116,139,.16)) 0%,var(--member-soft,rgba(100,116,139,.16)) 36%,#0f172a 72%,#0b1220 100%)!important;
  box-shadow:inset 0 0 0 1px var(--member-soft,rgba(100,116,139,.16)),0 5px 16px rgba(0,0,0,.18)!important;
}
#sectorMembers .member-card b,#sectorMembers .member-card span,
#detailPopupSectorMembers .member-card b,#detailPopupSectorMembers .member-card span{color:var(--member-tone,#f8fafc)!important}

/* Sector map gets the full row; summary follows underneath instead of squeezing it. */
.radar-map-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
.radar-sector-summary{max-height:380px!important;width:100%!important}
#radarSectorChart,#radarStockHeatmap{width:100%!important;max-width:none!important}
#radarStockHeatmap .svg-container,#radarStockHeatmap .main-svg{width:100%!important;max-width:none!important}

/* Compact chart frame after Plotly rangeslider removal. */
.eagle-chart-frame{margin-bottom:8px!important}
.eagle-chart-frame>.plot,.eagle-chart-frame .svg-container,.eagle-chart-frame .main-svg{margin-bottom:0!important;padding-bottom:0!important}

/* All charts use the EAGLE opaque tooltip; suppress Plotly's translucent SVG label only. */
.eagle-custom-hover .js-plotly-plot .hoverlayer{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.eagle-chart-hover-tooltip:not(.hidden){display:block!important;opacity:1!important;visibility:visible!important;background:#020617!important;color:#f8fafc!important}

/* Restore the proven Radar split layout: map on the left, sector summary on the right. */
.radar-map-grid{grid-template-columns:minmax(0,1.7fr) minmax(320px,.85fr)!important;gap:16px!important;align-items:start!important}
.radar-sector-summary{max-height:620px!important;width:auto!important;overflow:auto!important}
#radarSectorChart,#radarStockHeatmap{width:100%!important;max-width:none!important}
#radarStockHeatmap .plot-container,#radarStockHeatmap .svg-container,#radarStockHeatmap .main-svg{width:100%!important;max-width:none!important}

/* Keep market trend axes/titles visible without adding a second blank footer. */
#technicalTrendChart,#marketOverviewChart,#breadthChart,#marketRsChart{overflow:visible!important}
#technicalTrendChart .main-svg,#marketOverviewChart .main-svg,#breadthChart .main-svg,#marketRsChart .main-svg{overflow:visible!important}

@media(max-width:1050px){
  .radar-map-grid{grid-template-columns:minmax(0,1fr)!important}
  .radar-sector-summary{max-height:420px!important;width:100%!important}
}

/* CSP-safe semantic labels, native heatmap hover and compact Radar */
/* Web Pilot forbids inline styles. These classes carry the same semantic palette without
   weakening CSP, so the browser cannot silently fall back to white/grey labels. */
.tone-green{--tone:#22c55e;--tone-soft:rgba(34,197,94,.14);--tone-border:rgba(34,197,94,.58)}
.tone-red{--tone:#ef4444;--tone-soft:rgba(239,68,68,.14);--tone-border:rgba(239,68,68,.58)}
.tone-yellow{--tone:#facc15;--tone-soft:rgba(250,204,21,.13);--tone-border:rgba(250,204,21,.56)}
.tone-amber{--tone:#f59e0b;--tone-soft:rgba(245,158,11,.13);--tone-border:rgba(245,158,11,.56)}
.tone-orange{--tone:#f97316;--tone-soft:rgba(249,115,22,.14);--tone-border:rgba(249,115,22,.58)}
.tone-cyan{--tone:#38bdf8;--tone-soft:rgba(56,189,248,.13);--tone-border:rgba(56,189,248,.56)}
.tone-purple{--tone:#a855f7;--tone-soft:rgba(168,85,247,.14);--tone-border:rgba(168,85,247,.58)}
.tone-slate{--tone:#64748b;--tone-soft:rgba(100,116,139,.14);--tone-border:rgba(100,116,139,.56)}
.tone-white{--tone:#f8fafc;--tone-soft:rgba(248,250,252,.10);--tone-border:rgba(248,250,252,.42)}
.market-gate-card[class*="tone-"]{color:var(--tone)!important;border-color:var(--tone-border)!important;border-left-color:var(--tone)!important;background:linear-gradient(135deg,var(--tone-soft) 0%,#0f172a 48%,#082f49 100%)!important;box-shadow:0 12px 30px var(--tone-soft)!important}
.market-gate-eyebrow[class*="tone-"],.market-gate-regime[class*="tone-"]{color:var(--tone)!important}
.market-regime-score[class*="tone-"],.market-phase-score[class*="tone-"],.market-gate-score[class*="tone-"],.market-gate-cell[class*="tone-"]{background:linear-gradient(180deg,var(--tone-soft) 0%,rgba(15,23,42,.58) 100%)!important;border-color:var(--tone-border)!important;box-shadow:inset 4px 0 0 var(--tone)!important}
.market-regime-score[class*="tone-"]>b,.market-phase-score[class*="tone-"]>b,.market-gate-score[class*="tone-"]>b,.market-gate-cell[class*="tone-"]>b{color:var(--tone)!important}
.market-gate-insight>div[class*="tone-"],.discipline-card[class*="tone-"]{border-color:var(--tone-border)!important;border-left-color:var(--tone)!important;background:linear-gradient(180deg,var(--tone-soft),rgba(15,23,42,.50))!important}
.market-gate-insight>div[class*="tone-"]>span,.market-gate-insight>div[class*="tone-"]>b,.discipline-card[class*="tone-"]>b{color:var(--tone)!important}
.market-gate-insight-thesis>b{color:#f8fafc!important}
.market-gate-insight-risk>b[class*="tone-"]{color:var(--tone)!important}
.semantic-positive{color:#22c55e!important}.semantic-negative{color:#ef4444!important}.semantic-neutral{color:#94a3b8!important}
.semantic-flat{color:#facc15!important}

/* Streamlit technical-score bands for representative-stock cards. */
.kt-band-blue{--member-tone:#0ea5e9;--member-soft:rgba(14,165,233,.14);--member-border:rgba(14,165,233,.58)}
.kt-band-red{--member-tone:#ef4444;--member-soft:rgba(239,68,68,.14);--member-border:rgba(239,68,68,.58)}
.kt-band-yellow{--member-tone:#facc15;--member-soft:rgba(250,204,21,.13);--member-border:rgba(250,204,21,.56)}
.kt-band-green{--member-tone:#22c55e;--member-soft:rgba(34,197,94,.14);--member-border:rgba(34,197,94,.58)}
.kt-band-purple-light{--member-tone:#d8b4fe;--member-soft:rgba(216,180,254,.13);--member-border:rgba(216,180,254,.56)}
.kt-band-purple-mid{--member-tone:#c084fc;--member-soft:rgba(192,132,252,.14);--member-border:rgba(192,132,252,.58)}
.kt-band-purple-strong{--member-tone:#9333ea;--member-soft:rgba(147,51,234,.16);--member-border:rgba(147,51,234,.62)}
.kt-band-neutral{--member-tone:#64748b;--member-soft:rgba(100,116,139,.14);--member-border:rgba(100,116,139,.52)}
#sectorMembers .member-card b,#sectorMembers .member-card span,#detailPopupSectorMembers .member-card b,#detailPopupSectorMembers .member-card span{color:#f8fafc!important}

/* Exact Plotly heatmap hit-testing, with one opaque black tooltip and no ghost label. */
.eagle-native-hover .eagle-chart-hover-tooltip{display:none!important}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext,.eagle-native-hover .js-plotly-plot .hoverlayer .axistext{display:block!important;opacity:1!important;visibility:visible!important}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext path,.eagle-native-hover .js-plotly-plot .hoverlayer .axistext path{display:block!important;opacity:1!important;fill:#020617!important;stroke:#64748b!important;stroke-width:1px!important}
.eagle-native-hover .js-plotly-plot .hoverlayer .hovertext text,.eagle-native-hover .js-plotly-plot .hoverlayer .axistext text{display:block!important;opacity:1!important;fill:#f8fafc!important;text-shadow:none!important}

.app-integer-input{text-align:right!important;font-variant-numeric:tabular-nums!important}
.app-number-input{text-align:right!important;font-variant-numeric:tabular-nums!important;font-feature-settings:"tnum" 1}
#radarStockHeatmap,#radarStockHeatmap .plot-container,#radarStockHeatmap .svg-container,#radarStockHeatmap .main-svg{width:100%!important;max-width:none!important}

.super-chart-legend{display:flex;align-items:center;gap:9px 16px;flex-wrap:wrap;margin:2px 0 8px;padding:8px 10px;border:1px solid rgba(148,163,184,.16);border-radius:10px;background:rgba(15,23,42,.55);color:#cbd5e1;font-size:12px;font-weight:750}
.super-chart-legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.super-chart-legend i{display:inline-block;flex:0 0 auto}
.super-legend-axis-x{width:20px;height:2px;background:#38bdf8}.super-legend-axis-y{width:20px;height:2px;background:#22c55e}
.super-legend-gradient{width:46px;height:9px;border-radius:999px;background:linear-gradient(90deg,#ef4444,#f59e0b,#22c55e);border:1px solid rgba(226,232,240,.25)}
.super-legend-size{width:13px;height:13px;border-radius:50%;background:#a855f7;border:1px solid #cbd5e1;box-shadow:-10px 3px 0 -4px #a855f7}

/* Exact matrix hit-testing and canonical table semantics */
.sector-member-heading{display:flex;align-items:end;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.sector-member-heading h3{margin:0!important}
.sector-member-heading label{display:flex;align-items:center;gap:9px;color:#cbd5e1;font-size:13px;font-weight:750}
.sector-member-heading select{min-width:154px;min-height:38px;padding:7px 34px 7px 10px;background:#111827;border:1px solid rgba(148,163,184,.28);border-radius:9px;color:#f8fafc;font-weight:750}

.eagle-table td.price-session-cell{white-space:nowrap}
.price-session-marker{display:inline-flex;min-width:1.05em;justify-content:center;font-weight:900}
.price-session-marker.price-move-up{color:#22c55e!important}
.price-session-marker.price-move-down{color:#ef4444!important}
.price-session-marker.price-move-flat{color:#facc15!important}
.eagle-table td.volume-alert-top10{color:#111827!important;background:#f9a8d4!important;font-weight:850!important;text-align:right!important}
.eagle-table td.volume-alert-top5{color:#fff!important;background:#b91c1c!important;font-weight:850!important;text-align:right!important}

#detailPopupSectorHeatmap .treemaplayer text,
#radarStockHeatmap .heatmaplayer text{font-family:"Arial Black",Inter,"Segoe UI",sans-serif!important;font-weight:900!important}

/* Fail-closed market loading without false intermediate states */
.market-gate-loading{min-height:560px;padding:18px 20px;border:1px solid rgba(56,189,248,.34);border-left:5px solid #38bdf8;border-radius:18px;background:linear-gradient(135deg,rgba(8,47,73,.34),rgba(15,23,42,.98) 42%,rgba(6,78,59,.18));box-shadow:0 14px 34px rgba(2,132,199,.12)}
.market-loading-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:14px}.market-loading-head strong{display:block;color:#f8fafc;font-size:18px}.market-loading-head span{display:block;color:#94a3b8;font-size:13px;margin-top:5px}.market-loading-spinner{display:block;width:22px;height:22px;flex:0 0 22px;border:3px solid rgba(56,189,248,.18);border-top-color:#38bdf8;border-radius:50%;animation:market-spin .85s linear infinite}
.market-loading-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.market-loading-insights{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}.market-loading-block{min-height:104px;padding:13px;border:1px solid rgba(148,163,184,.14);border-radius:14px;background:rgba(15,23,42,.52);overflow:hidden}.market-loading-block.tall{min-height:126px}.market-loading-block span,.market-loading-block b,.market-loading-block small{display:block;border-radius:999px;background:linear-gradient(90deg,#172033,#25324d,#172033);background-size:200% 100%;animation:pulse 1.5s linear infinite}.market-loading-block span{height:9px;width:46%;margin-bottom:14px}.market-loading-block b{height:20px;width:70%;margin-bottom:12px}.market-loading-block small{height:8px;width:88%}
.market-gate-shell{position:relative}.market-gate-refreshing>.market-gate-card{filter:saturate(.78) brightness(.82);pointer-events:none}.market-loading-overlay{position:absolute;z-index:8;inset:0;display:flex;align-items:center;justify-content:center;gap:12px;border-radius:18px;background:rgba(2,6,23,.66);backdrop-filter:blur(2px);color:#e2e8f0}.market-loading-overlay div{display:flex;flex-direction:column;gap:3px}.market-loading-overlay b{font-size:15px}.market-loading-overlay span{font-size:12px;color:#cbd5e1}
.market-load-failure{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;padding:24px;border:1px solid rgba(245,158,11,.42);border-left:5px solid #f59e0b;border-radius:18px;background:linear-gradient(135deg,rgba(120,53,15,.18),rgba(15,23,42,.96));color:#f8fafc}.market-load-failure span{color:#fde68a}.market-load-failure small{color:#94a3b8}
@keyframes market-spin{to{transform:rotate(360deg)}}

/* Market Score delta follows the shared up/down/flat palette. */
.market-gate-score small .semantic-delta.semantic-positive{color:#22c55e!important}
.market-gate-score small .semantic-delta.semantic-negative{color:#ef4444!important}
.market-gate-score small .semantic-delta.semantic-neutral{color:#facc15!important}
.super-filter-row{margin-bottom:14px}
@media(max-width:1180px){.market-loading-grid,.market-loading-insights{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.market-loading-grid,.market-loading-insights{grid-template-columns:1fr}.market-loading-overlay{padding:18px}}

/* Read-only dashboards and focused Radar motion */
.radar-trail-hint{margin:-5px 0 10px;color:#94a3b8;font-size:12px;font-weight:650}
.dashboard-action-row{margin-top:12px}
.portfolio-control-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:10px;align-items:end;margin:12px 0 16px;padding:14px;border:1px solid rgba(148,163,184,.16);border-radius:14px;background:rgba(15,23,42,.42)}
.backtest-control-grid{display:grid;grid-template-columns:repeat(7,minmax(135px,1fr));gap:10px;align-items:end;margin:12px 0 16px;padding:14px;border:1px solid rgba(148,163,184,.16);border-radius:14px;background:rgba(15,23,42,.42)}
.portfolio-control-grid label,.backtest-control-grid label{display:grid;gap:5px;color:#cbd5e1;font-size:13px;font-weight:700;min-width:0}
.portfolio-control-grid .check-control{display:flex;align-items:center;gap:8px;min-height:38px;padding:0 4px}.check-control input{width:auto;min-height:auto}
.portfolio-manual-field{grid-column:span 2}
.portfolio-snapshot-grid,.portfolio-result-grid{display:grid;grid-template-columns:minmax(360px,.82fr) minmax(0,1.7fr);gap:16px;align-items:start}
.portfolio-snapshot-grid h3{margin:0 0 8px;color:#e5e7eb}.portfolio-snapshot-grid .table-wrap{max-height:430px}
.portfolio-result-grid #portfolioOptimizerTable{max-height:610px}
#portfolioOptimizerNotice{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 10px}
.result-chip{display:inline-flex;padding:5px 9px;border:1px solid rgba(56,189,248,.26);border-radius:999px;background:rgba(14,165,233,.08);color:#dbeafe;font-size:12px;font-weight:750}
.backtest-source-card{display:flex;align-items:center;justify-content:space-between;gap:18px;border-left:5px solid #64748b}.backtest-source-card.source-ready{border-left-color:#22c55e}.backtest-source-card.source-blocked{border-left-color:#f59e0b}.backtest-source-card h3{margin:3px 0 0}
.backtest-source-metrics{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.backtest-source-metrics span{display:flex;flex-direction:column;min-width:130px;padding:8px 10px;border:1px solid rgba(148,163,184,.14);border-radius:10px;color:#94a3b8;font-size:11px}.backtest-source-metrics b{margin-top:2px;color:#f8fafc;font-size:13px}
#view-events .eagle-table td:nth-child(8),#view-events .eagle-table td:nth-child(9){white-space:normal;min-width:250px;line-height:1.35;text-align:left}
#view-portfolio .metric-text-value{font-size:22px!important}
@media(max-width:1280px){.portfolio-control-grid,.backtest-control-grid{grid-template-columns:repeat(3,minmax(170px,1fr))}.portfolio-snapshot-grid,.portfolio-result-grid{grid-template-columns:1fr}}
@media(max-width:820px){.portfolio-control-grid,.backtest-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portfolio-manual-field{grid-column:span 2}.backtest-source-card{align-items:flex-start;flex-direction:column}.backtest-source-metrics{justify-content:flex-start}}
@media(max-width:560px){.portfolio-control-grid,.backtest-control-grid{grid-template-columns:1fr}.portfolio-manual-field{grid-column:span 1}}

/* Compact deltas, synchronized Radar playback and event markers */
.eagle-chart-hover-tooltip{min-width:0!important;width:max-content!important;max-width:min(350px,calc(100vw - 18px))!important;padding:7px 9px!important;border-radius:8px!important;font-size:11.25px!important;line-height:1.28!important}
.eagle-chart-hover-tooltip .hover-date{margin:0 0 5px!important;padding:0 0 5px!important;font-size:11.5px!important}
.eagle-chart-hover-tooltip .hover-title{margin:5px 0 2px!important;font-size:11.5px!important}
.eagle-chart-hover-tooltip .hover-line{grid-template-columns:auto auto!important;gap:5px 14px!important;min-height:17px!important}
.hover-value-inline{display:inline-flex;align-items:baseline;justify-content:flex-end;gap:7px;white-space:nowrap}
.eagle-chart-hover-tooltip .hover-primary-value{color:#f8fafc!important}
.eagle-chart-hover-tooltip .hover-session-inline{font-weight:850!important}
.eagle-chart-hover-tooltip .hover-session-inline.semantic-positive{color:#22c55e!important}
.eagle-chart-hover-tooltip .hover-session-inline.semantic-negative{color:#ef4444!important}
.eagle-chart-hover-tooltip .hover-session-inline.semantic-flat{color:#facc15!important}
.eagle-chart-hover-tooltip .hover-session-inline .hover-relative-value{color:inherit!important}
.data-link-wrap{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.ticker-event-badge{display:inline-flex;align-items:center;justify-content:center;color:#fbbf24!important;font-size:15px;font-weight:950;line-height:1;text-shadow:0 0 7px rgba(251,191,36,.38);cursor:help;vertical-align:middle}
.stock-symbol .ticker-event-badge{font-size:.58em;margin-left:4px;transform:translateY(-2px)}
.member-card .ticker-event-badge{font-size:14px}
.radar-motion-control{display:grid;gap:5px;min-width:192px}
.radar-motion-control>label{display:flex;align-items:center;gap:7px}
.radar-motion-actions{display:flex;align-items:center;gap:8px}
.radar-motion-actions button{min-width:92px}
.radar-motion-actions button.is-running{border-color:rgba(239,68,68,.64)!important;color:#fecaca!important;background:rgba(127,29,29,.28)!important}
.radar-motion-status{color:#94a3b8;font-size:11px;font-weight:700;white-space:nowrap}
.backtest-advanced{margin:0 0 16px;border:1px solid rgba(148,163,184,.20);border-radius:14px;background:rgba(15,23,42,.38);overflow:hidden}
.backtest-advanced>summary{padding:13px 15px;cursor:pointer;color:#f8fafc;font-size:14px;font-weight:850;background:rgba(30,41,59,.55);border-bottom:1px solid rgba(148,163,184,.14)}
.backtest-advanced:not([open])>summary{border-bottom:0}
.backtest-advanced-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:15px}
.backtest-advanced-grid>label,.backtest-exit-group label{display:grid;gap:5px;min-width:0;color:#cbd5e1;font-size:12px;font-weight:700}
.backtest-advanced-grid select,.backtest-advanced-grid input{min-width:0;width:100%}
.backtest-advanced-grid select[multiple]{height:84px;padding:5px}
.backtest-advanced-grid select[multiple] option{padding:4px 6px;border-radius:5px}
.backtest-advanced-grid select[multiple] option:checked{background:#2563eb;color:#fff}
.backtest-advanced-grid .check-control{display:flex;align-items:center;gap:8px;min-height:40px;padding-top:18px}
.backtest-advanced-grid .check-control input{width:auto}
.backtest-span-2{grid-column:span 2}
.backtest-exit-group{grid-column:span 2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:10px;border:1px solid rgba(148,163,184,.18);border-radius:10px;min-width:0}
.backtest-exit-group legend{padding:0 6px;color:#e2e8f0;font-size:12px;font-weight:850}
@media(max-width:1320px){.backtest-advanced-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px){.backtest-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.backtest-exit-group{grid-column:span 2}}
@media(max-width:580px){.backtest-advanced-grid{grid-template-columns:1fr}.backtest-span-2,.backtest-exit-group{grid-column:span 1}.backtest-exit-group{grid-template-columns:1fr}}

/* Visual parity for assessments, PNG labels and holdings */
.technical-assessment.technical-positive,.technical-status.technical-positive{color:#22c55e!important}
.technical-assessment.technical-negative,.technical-status.technical-negative{color:#ef4444!important}
.technical-assessment.technical-neutral,.technical-status.technical-neutral{color:#facc15!important}
.technical-status{font-weight:850}
#portfolioPositionsTable{max-width:100%;overflow:auto}
#portfolioPositionsTable .portfolio-positions-table{min-width:2100px}
#portfolioPositionsTable .portfolio-positions-table td:last-child{min-width:260px;white-space:normal;line-height:1.35}
#marketHeatmap .treemaplayer text,#sectorMarketCapHeatmap .treemaplayer text,#detailPopupSectorHeatmap .treemaplayer text{line-height:1.15!important}

.price-session-delta{display:inline;font-size:inherit;font-weight:inherit;line-height:inherit;white-space:nowrap;font-variant-numeric:tabular-nums;}
.popup-delta-value{font-size:inherit!important;font-weight:inherit!important;}

/* 2026-09-07 Web Market Gate legibility + semantic delta colors.
   Scope intentionally limited to the Web market summary cards; Streamlit and
   dense stock tables retain their existing typography. */
.market-gate-cell small .metric-note{
  display:inline!important;
  font-size:17px!important;
  line-height:1.35!important;
  font-weight:750!important;
  text-transform:none!important;
  letter-spacing:0!important;
  color:#cbd5e1!important;
  margin:0!important;
}
.market-gate-cell small .semantic-delta,
.market-gate-score small .semantic-delta{
  display:inline-block!important;
  font-size:18px!important;
  line-height:1.35!important;
  text-transform:none!important;
  letter-spacing:0!important;
  margin:0!important;
}
.market-gate-cell small .semantic-delta.semantic-positive,
.market-gate-score small .semantic-delta.semantic-positive{
  color:#22c55e!important;
}
.market-gate-cell small .semantic-delta.semantic-negative,
.market-gate-score small .semantic-delta.semantic-negative{
  color:#ef4444!important;
}
.market-gate-cell small .semantic-delta.semantic-neutral,
.market-gate-score small .semantic-delta.semantic-neutral{
  color:#facc15!important;
}
/* Web-wide semantic delta color contract: up = green, down = red, unchanged = yellow. */
.semantic-delta.semantic-positive{color:#22c55e!important}
.semantic-delta.semantic-negative{color:#ef4444!important}
.semantic-delta.semantic-neutral{color:#facc15!important}

/* Canonical Eagle Score + direction colors — parity with Streamlit. */
.eagle-score-value{font-weight:850!important}
.direction-arrow-up{color:#22c55e!important;font-weight:900!important}
.direction-arrow-down{color:#ef4444!important;font-weight:900!important}
.direction-arrow-flat{color:#facc15!important;font-weight:900!important}
.eagle-table .direction-arrow-up,.eagle-table .direction-arrow-down,.eagle-table .direction-arrow-flat{font-size:1em!important;line-height:1!important}

/* EAGLE_SCORE_COLOR_CONTRACT_V2_20260907
   Canonical Web parity with Streamlit: >=65 purple, >=55 green, >=45 yellow, <45 red.
   Apply on both td and inner score span so table/theme rules cannot wash the score back to white. */
.eagle-score-cell.eagle-score-band-purple,.eagle-score-value.eagle-score-band-purple{color:#a855f7!important}
.eagle-score-cell.eagle-score-band-green,.eagle-score-value.eagle-score-band-green{color:#22c55e!important}
.eagle-score-cell.eagle-score-band-yellow,.eagle-score-value.eagle-score-band-yellow{color:#facc15!important}
.eagle-score-cell.eagle-score-band-red,.eagle-score-value.eagle-score-band-red{color:#ef4444!important}
.eagle-score-cell.eagle-score-band-na,.eagle-score-value.eagle-score-band-na{color:#94a3b8!important}
.eagle-score-cell{font-weight:850!important}
