@import url('/fonts.css?v=2.1.1');
*{box-sizing:border-box}body{margin:0;background:#0f1115;color:#fff;font-family:'Vazir',Tahoma,sans-serif;font-size:12px}button,input{font:inherit}header{height:58px;padding:0 4vw;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #292e37;background:#171a20}header b{font-size:17px}header span{color:#00c853}.search{max-width:1440px;margin:18px auto 10px;padding:0 18px;display:flex;justify-content:space-between;gap:12px}.search form{display:flex;gap:7px}.search form>div{position:relative}.search input{width:260px;background:#1c1f26;border:1px solid #343b47;border-radius:8px;color:#fff;padding:10px}.search button,.chart-head button{background:#242932;color:#aab2bd;border:1px solid #363e49;border-radius:7px;padding:8px 12px;cursor:pointer}.search button[type=submit],#scan,.chart-head button.active{background:#2f80ed;color:#fff;border-color:#2f80ed}#suggestions{display:none;position:absolute;z-index:9;top:43px;right:0;width:320px;background:#1c1f26;border:1px solid #343b47;border-radius:9px;overflow:hidden}#suggestions.open{display:grid}#suggestions button{display:flex;justify-content:space-between;border:0;border-bottom:1px solid #2c323c;border-radius:0;background:transparent;text-align:right}.workspace{max-width:1440px;margin:auto;padding:0 18px;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:12px}.chart-card,.decision,.scanner{background:#1c1f26;border:1px solid #2e3540;border-radius:12px;overflow:hidden}.chart-head{height:54px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.chart-head>div{display:flex;align-items:center;gap:7px}.chart-head small{color:#aab2bd;margin-right:8px}.chart-head label{color:#aab2bd;padding:0 5px}#chart{height:610px}.decision{padding:16px}.verdict{padding-bottom:12px;border-bottom:1px solid #303640}.verdict small,.notice,#scanMeta{color:#8d97a4}.verdict h2{margin:8px 0}.bull{color:#00c853}.bear{color:#ff5252}.scores{display:grid;gap:12px;margin:17px 0}.scores div{display:grid;grid-template-columns:1fr 30px;gap:5px}.scores i{grid-column:1/-1;height:5px;background:#2b313b;border-radius:4px;overflow:hidden}.scores em{display:block;height:100%}#buyBar{background:#00c853}#exitBar{background:#ff5252}#plan{display:grid;gap:8px}#plan div{display:flex;justify-content:space-between;padding:8px;background:#242932;border-radius:7px}#reasons{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}#reasons span{padding:5px 7px;border:1px solid #39414e;border-radius:7px;color:#aab2bd}.scanner{max-width:1404px;margin:12px auto;padding:14px 16px}.scanner>div:first-child{display:flex;justify-content:space-between}.table{overflow:auto;margin-top:12px}table{width:100%;border-collapse:collapse}th,td{padding:10px;text-align:right;border-top:1px solid #303640}tbody tr{cursor:pointer}tbody tr:hover{background:#242932}#loading{position:fixed;inset:0;background:#0f1115bb;z-index:20;place-items:center;font-size:16px}#loading:not([hidden]){display:grid}@media(max-width:850px){.workspace{grid-template-columns:1fr}.decision{order:-1}#chart{height:480px}.search{flex-wrap:wrap}.chart-head{height:auto;align-items:flex-start;gap:8px}.chart-head>div:last-child{flex-wrap:wrap}}
.scan-actions{display:flex;gap:7px}.gear{font-size:18px;min-width:42px;padding:7px!important}.modal{position:fixed;inset:0;z-index:50;background:#080a0dcc;display:grid;place-items:center;padding:18px}.modal[hidden]{display:none}.settings-card{width:min(720px,96vw);max-height:90vh;overflow:auto;background:#111923;border:1px solid #344354;border-radius:16px;padding:16px;box-shadow:0 24px 80px #000a}.settings-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.settings-head>div{display:grid;gap:4px}.settings-head b{font-size:18px}.settings-head small,.settings-card section>small{color:#8190a0}.settings-head button{background:#1b2a39;color:#fff;border:1px solid #344354;border-radius:8px;font-size:22px}.settings-card section{padding:14px 0;border-top:1px solid #283746}.settings-card h3{margin:0 0 10px}.field{display:grid;gap:6px}.field input,.industry-search{width:100%;background:#142536;border:1px solid #30465a;color:#fff;border-radius:9px;padding:10px}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title div{display:flex;gap:5px}.section-title button,#refreshCatalog{background:transparent;color:#59d9ae;border:0;cursor:pointer}.check-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.check-grid label{display:flex;align-items:center;gap:7px;padding:8px;background:#142536;border:1px solid #263c50;border-radius:8px}.industries{max-height:210px;overflow:auto;margin-top:9px}.settings-footer{display:flex;justify-content:space-between;gap:8px;position:sticky;bottom:-16px;background:#111923;padding:12px 0 4px}.settings-footer button{padding:11px 16px;border-radius:9px;border:1px solid #345;background:#1b2a39;color:#fff}.settings-footer button[type=submit]{background:#35d39d;color:#061b14;border-color:#35d39d;font-weight:bold}@media(max-width:600px){.check-grid{grid-template-columns:1fr 1fr}.two-fields{grid-template-columns:1fr}.settings-card{padding:13px}.search input{width:210px}}
.scanner-head{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.scanner-head>div{display:grid;gap:5px}.scanner-head input{width:min(280px,42vw);background:#242932;border:1px solid #3a4655;border-radius:8px;color:#fff;padding:9px 11px}thead{background:#25354a;color:#eef6ff}thead th{position:sticky;top:0;z-index:2;border-top:0;border-bottom:1px solid #4b6682;white-space:nowrap;cursor:pointer;user-select:none}thead th:hover,thead th.sort-active{background:#304968;color:#68b2ff}tbody td{color:#dbe1e8}tbody tr:nth-child(even){background:#191d24}@media(max-width:600px){.scanner-head{align-items:stretch;flex-direction:column}.scanner-head input{width:100%}}
.top-tabs{display:flex;align-self:stretch}.top-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;color:#8d97a4;padding:0 18px;cursor:pointer}.top-tabs button.active{color:#fff;border-bottom-color:#2f80ed;background:#202631}.top-tabs i{font-style:normal;background:#2f80ed;color:#fff;border-radius:10px;padding:1px 6px;margin-right:4px}.watch-active{border-color:#00c853!important;color:#00c853!important}.watch-panel{max-width:1404px;margin:18px auto;padding:18px;background:#1c1f26;border:1px solid #2e3540;border-radius:12px}.watch-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.watch-head>div:first-child{display:grid;gap:5px}.watch-head small{color:#8d97a4}.watch-head>div:last-child,.watch-head form{display:flex;gap:7px}.watch-head input{background:#242932;border:1px solid #3a4655;border-radius:8px;color:#fff;padding:9px}.watch-head button,.watch-grid button{background:#242932;color:#dbe1e8;border:1px solid #3a4655;border-radius:7px;padding:8px 11px;cursor:pointer}.watch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:10px;margin-top:16px}.watch-grid article{padding:13px;background:#171b21;border:1px solid #303946;border-radius:10px}.watch-grid article>div:first-child{display:flex;justify-content:space-between;align-items:center}.watch-grid article>div:first-child b{font-size:15px}.watch-grid dl{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}.watch-grid dl div{background:#222832;border-radius:7px;padding:7px}.watch-grid dt{color:#8d97a4}.watch-grid dd{margin:4px 0 0;font-weight:bold}.watch-grid footer{display:flex;justify-content:space-between}.watch-grid [data-remove]{color:#ff7878;border-color:#613b42}.watch-empty{grid-column:1/-1;text-align:center;color:#8d97a4;padding:40px}@media(max-width:700px){header{padding:0 12px}.top-tabs button{padding:0 9px}.watch-head{align-items:stretch;flex-direction:column}.watch-head>div:last-child{flex-wrap:wrap}.watch-head form{flex:1}.watch-head input{min-width:0;flex:1}.scan-actions{flex-wrap:wrap}}
#backgroundSync.sync-running{color:#ffcc66;border-color:#8a6b28}#syncProgress{display:flex;align-items:center;gap:6px;min-width:92px;color:#aab2bd}#syncProgress i{display:block;width:54px;height:5px;background:#303640;border-radius:5px;overflow:hidden}#syncProgress em{display:block;width:0;height:100%;background:#35d39d;transition:width .25s}#syncProgress b{min-width:28px;font-weight:normal}
#reasons .evidence-positive{border-color:#246443;color:#62dfa3}#reasons .evidence-negative{border-color:#713a43;color:#ff8c98}#reasons .evidence-warning{border-color:#735d2d;color:#ffd16a}#plan b{max-width:58%;text-align:left;font-size:11px}
.rs-strong{color:#62dfa3!important}.rs-weak{color:#ff8c98!important}.rs-neutral{color:#ffd16a!important}.rs-strong small,.rs-weak small,.rs-neutral small{display:block;margin-top:2px;opacity:.78;white-space:nowrap}
.regime-supportive{color:#62dfa3!important}.regime-defensive{color:#ff8c98!important}.regime-neutral{color:#ffd16a!important}.regime-supportive small,.regime-defensive small,.regime-neutral small{display:block;margin-top:2px;opacity:.78;white-space:nowrap}
.portfolio-panel{max-width:1404px;margin:18px auto;padding:18px;background:#1c1f26;border:1px solid #2e3540;border-radius:12px}.portfolio-head{display:flex;justify-content:space-between;align-items:center}.portfolio-head>div{display:grid;gap:5px}.portfolio-head small{color:#8d97a4}.portfolio-head button,.portfolio-form button,.portfolio-grid button{background:#242932;color:#dbe1e8;border:1px solid #3a4655;border-radius:7px;padding:9px 12px;cursor:pointer}.portfolio-form{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:9px;margin:16px 0;padding:14px;background:#151a21;border-radius:10px}.portfolio-form label{display:grid;gap:6px;color:#9ba6b3}.portfolio-form input{min-width:0;background:#202732;border:1px solid #394655;border-radius:7px;color:#fff;padding:9px}.portfolio-notes{grid-column:span 3}.portfolio-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.portfolio-summary>div{display:grid;gap:6px;padding:12px;background:#171b21;border:1px solid #303946;border-radius:9px}.portfolio-summary span,.portfolio-grid dt{color:#8d97a4}.portfolio-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:11px}.portfolio-grid article{padding:14px;background:#171b21;border:1px solid #303946;border-radius:10px}.portfolio-grid article>header,.portfolio-grid footer{display:flex;align-items:center;justify-content:space-between;gap:7px}.portfolio-grid article>header{height:auto;padding:0;background:transparent;border:0}.portfolio-grid article>header b{font-size:16px}.portfolio-grid dl{display:grid;grid-template-columns:1fr 1fr;gap:7px}.portfolio-grid dl div{padding:7px;background:#222832;border-radius:7px}.portfolio-grid dd{margin:4px 0 0}.portfolio-grid p{min-height:34px;color:#aab2bd}.portfolio-exit{border-color:#7c3540!important}.portfolio-reduce{border-color:#8a6b28!important}.portfolio-review{border-color:#7a6230!important}.health{display:flex;align-items:center;gap:8px;margin:12px 0}.health i{height:6px;flex:1;background:#303640;border-radius:5px;overflow:hidden}.health em{display:block;height:100%;background:linear-gradient(90deg,#ff5252,#ffd166,#35d39d)}.portfolio-history{margin-top:18px;color:#aab2bd}.portfolio-history summary{cursor:pointer}.portfolio-history div div{padding:8px;border-bottom:1px solid #303640}@media(max-width:900px){.portfolio-form{grid-template-columns:repeat(2,1fr)}.portfolio-notes{grid-column:span 2}}@media(max-width:560px){.portfolio-form,.portfolio-summary{grid-template-columns:1fr}.portfolio-notes{grid-column:auto}.portfolio-head{align-items:flex-start;gap:10px}.portfolio-grid{grid-template-columns:1fr}}
.grouped-number{direction:ltr;text-align:right}.portfolio-symbol-field{position:relative}#portfolioSuggestions{display:none;position:absolute;z-index:12;top:62px;right:0;width:300px;max-height:250px;overflow:auto;background:#1c2530;border:1px solid #415166;border-radius:9px;box-shadow:0 12px 35px #0008}#portfolioSuggestions.open{display:grid}#portfolioSuggestions button{display:flex;justify-content:space-between;gap:15px;text-align:right;background:transparent;color:#fff;border:0;border-bottom:1px solid #303d4c;border-radius:0;padding:10px;cursor:pointer}#portfolioSuggestions button:hover{background:#283747}#portfolioSuggestions span{color:#9ba6b3}
.portfolio-panel{background:radial-gradient(circle at 90% 0,#193149 0,transparent 34%),#171c23;padding:22px}.portfolio-head b{font-size:21px}.portfolio-head button{background:#206eaa;border-color:#3985bd;color:#fff}.portfolio-guide{display:flex;gap:9px;flex-wrap:wrap;margin:15px 0 18px}.portfolio-guide span{padding:7px 10px;border:1px solid #35516b;border-radius:20px;background:#182a3a;color:#b9d9ef}.portfolio-summary{order:-1;margin:0 0 14px;grid-template-columns:repeat(3,minmax(0,1fr))}.portfolio-summary>div{position:relative;overflow:hidden;padding:16px;border-color:#344454;background:linear-gradient(145deg,#222b35,#181e26)}.portfolio-summary>div:after{content:'';position:absolute;width:70px;height:70px;border-radius:50%;left:-25px;bottom:-35px;background:#3889c51a}.portfolio-summary b{font-size:17px}.portfolio-form{grid-template-columns:repeat(3,minmax(150px,1fr));align-items:end;padding:18px;border:1px solid #304255;background:#121820}.portfolio-form-title{grid-column:1/-1;display:grid;gap:5px;padding-bottom:11px;border-bottom:1px solid #283746}.portfolio-form-title b{font-size:15px}.portfolio-form-title small{color:#7f91a4}.portfolio-form label{font-size:11px}.portfolio-form input{height:41px}.portfolio-form button[type=submit]{height:41px;background:#21b780;border-color:#21b780;color:#061d15;font-weight:bold}.portfolio-notes{grid-column:span 2}.portfolio-grid article{background:linear-gradient(160deg,#1d242d,#14191f);box-shadow:0 8px 24px #0002;transition:transform .18s,border-color .18s}.portfolio-grid article:hover{transform:translateY(-2px);border-color:#486078}.portfolio-grid article>header span{padding:5px 8px;border-radius:12px;background:#263442}.portfolio-exit>header span{background:#6a2631}.portfolio-reduce>header span,.portfolio-review>header span{background:#665124}.portfolio-grid footer button:first-child{color:#65b7f3}.portfolio-grid footer button:last-child{color:#ff8b95}.portfolio-history{padding:13px;background:#131920;border:1px solid #2b3948;border-radius:9px}@media(max-width:800px){.portfolio-form{grid-template-columns:repeat(2,1fr)}}@media(max-width:520px){.portfolio-panel{padding:13px}.portfolio-form,.portfolio-summary{grid-template-columns:1fr}.portfolio-notes{grid-column:auto}.portfolio-guide span{font-size:10px}}
.market-dashboard{max-width:1404px;margin:18px auto;padding:0 18px 24px}.dashboard-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dashboard-head>div{display:grid;gap:5px}.dashboard-head>b,.dashboard-head div>b{font-size:21px}.dashboard-head small,.dashboard-card small{color:#8d97a4}.dashboard-head button{background:#206eaa;border:1px solid #3985bd;color:#fff;border-radius:8px;padding:9px 14px;cursor:pointer}.index-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.index-card,.dashboard-card{background:linear-gradient(150deg,#1d242d,#14191f);border:1px solid #303946;border-radius:12px;padding:16px}.index-card{display:grid;gap:8px;min-height:112px}.index-card strong{font-size:22px}.index-card span{font-size:12px;color:#9ba6b3}.dashboard-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:11px;margin-top:11px}.dashboard-card header{height:auto;background:transparent;border:0;padding:0;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.breadth-bar{height:24px;display:flex;overflow:hidden;border-radius:8px;background:#2a3038}.breadth-bar i{display:block;height:100%;transition:width .35s}.breadth-bar #positiveBar{background:#20b777}.breadth-bar #zeroBar{background:#6f7884}.breadth-bar #negativeBar{background:#d9535f}.breadth-legend{display:flex;justify-content:space-between;margin-top:12px}.stats-card dl{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0}.stats-card dl div{background:#202731;border-radius:8px;padding:9px}.stats-card dt{color:#8995a3;font-size:11px}.stats-card dd{margin:5px 0 0;font-weight:bold}.industries-card{margin-top:11px}.industries-card header>div{display:grid;gap:5px}.industries-card input{background:#202731;border:1px solid #3b4755;color:#fff;border-radius:8px;padding:8px 10px;width:min(280px,42vw)}.industry-table{max-height:470px;overflow:auto}.industry-table table{width:100%;border-collapse:collapse}.industry-table th,.industry-table td{padding:10px;border-bottom:1px solid #2d3540;text-align:right}.industry-table td:first-child{display:grid;gap:3px}.industry-table td:first-child small{font-size:10px}.bull{color:#45d494!important}.bear{color:#ff707c!important}@media(max-width:900px){.index-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}}@media(max-width:560px){.market-dashboard{padding:0 10px 18px}.index-grid{grid-template-columns:1fr}.stats-card dl{grid-template-columns:repeat(2,1fr)}.industries-card header{align-items:stretch;flex-direction:column;gap:9px}.industries-card input{width:100%}.industry-table{overflow:auto}.industry-table table{min-width:720px}}

.market-live-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:11px}.market-live-grid .wide{grid-column:1/-1}.live-chart-card{min-width:0}.live-chart-card header>div{display:grid;gap:4px}.mini-market-chart{height:220px;min-width:0}.chart-legend{display:flex;align-items:center;gap:7px;color:#8d97a4;font-size:11px}.chart-legend i{width:8px;height:8px;border-radius:50%;display:inline-block}.total-dot{background:#4da3ff}.equal-dot{background:#f3ba4a}.positive-dot{background:#35d39d}.negative-dot{background:#ff6675}.heatmap-card{margin-top:11px}.heatmap-card header>div{display:grid;gap:5px}.industry-heatmap{display:flex;flex-wrap:wrap;gap:7px;align-content:flex-start;min-height:260px}.heat-tile{position:relative;min-width:110px;min-height:78px;flex:1 1 140px;border-radius:9px;border:1px solid #ffffff16;padding:11px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;transition:transform .15s,border-color .15s}.heat-tile:hover{transform:translateY(-2px);border-color:#ffffff55;z-index:2}.heat-tile b{font-size:12px;line-height:1.5}.heat-tile strong{font-size:15px}.heat-tile small{color:#e6edf5aa}.heat-pos-3{background:#087a52}.heat-pos-2{background:#126445}.heat-pos-1{background:#1b4938}.heat-zero{background:#343b45}.heat-neg-1{background:#563239}.heat-neg-2{background:#76313c}.heat-neg-3{background:#982f3d}@media(max-width:900px){.market-live-grid{grid-template-columns:1fr}.market-live-grid .wide{grid-column:auto}}@media(max-width:560px){.mini-market-chart{height:190px}.industry-heatmap{gap:5px}.heat-tile{min-width:95px;min-height:72px;padding:9px}}

/* ===== Pre-Open Radar ===== */
.preopen-panel{
  max-width:1404px;
  margin:18px auto;
  padding:22px;
  background:radial-gradient(circle at 90% 0,#25374b 0,transparent 32%),#171c23;
  border:1px solid #2e3540;
  border-radius:12px
}

/* Readability pass: lift secondary text contrast across every main view. */
:root{--muted:#b3c3d5}
.search button,.chart-head button,.chart-head small,.chart-head label,#reasons span,
.verdict small,.notice,#scanMeta,.top-tabs button,.watch-head small,.watch-grid dt,
.watch-empty,#syncProgress,.portfolio-head small,.portfolio-form label,
.portfolio-summary span,.portfolio-grid dt,.portfolio-grid p,.portfolio-history,
.settings-head small,.settings-card section>small,.portfolio-form-title small,
.dashboard-head small,.dashboard-card small,.index-card span,.stats-card dt,
.chart-legend,.header-tools #source{color:#b3c3d5}
tbody td{color:#e5ebf2}

.preopen-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}

.preopen-head>div{
  display:grid;
  gap:5px
}

.preopen-head b{
  font-size:21px
}

.preopen-head small,
.preopen-section small{
  color:#8d97a4
}

.preopen-head button{
  background:#206eaa;
  border:1px solid #3985bd;
  color:#fff;
  border-radius:8px;
  padding:9px 14px;
  cursor:pointer
}

.preopen-head button:disabled{
  opacity:.55;
  cursor:wait
}

.preopen-guide{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin:15px 0 18px
}

.preopen-guide span{
  padding:7px 11px;
  border:1px solid #35516b;
  border-radius:20px;
  background:#182a3a;
  color:#b9d9ef
}

.preopen-section{
  margin-top:12px;
  padding:16px;
  background:linear-gradient(150deg,#1d242d,#14191f);
  border:1px solid #303946;
  border-radius:12px
}

.portfolio-preopen{
  border-color:#405a70
}

.preopen-section>header{
  height:auto;
  padding:0;
  margin:0 0 13px;
  border:0;
  background:transparent;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}

.preopen-section>header>div{
  display:grid;
  gap:5px
}

.preopen-section>header b{
  font-size:16px
}

.preopen-section input{
  width:min(280px,40vw);
  padding:9px 11px;
  background:#202731;
  border:1px solid #3b4755;
  border-radius:8px;
  color:#fff
}

.preopen-table{
  overflow:auto;
  margin-top:0
}

.preopen-table table{
  min-width:1050px
}

.preopen-table th{
  color:#9ba6b3;
  white-space:nowrap;
  background:#171c23
}

.preopen-table td{
  white-space:nowrap
}

.preopen-table tbody tr:hover{
  background:#222b35
}

.preopen-table td b{
  font-size:13px
}

#preopenPortfolioRows td:nth-child(2) b,
#preopenPortfolioRows td:nth-child(3) b,
#preopenMarketRows td:nth-child(3) b{
  display:inline-flex;
  min-width:36px;
  justify-content:center;
  padding:4px 7px;
  border-radius:7px;
  background:#252d37
}

@media(max-width:700px){
  .preopen-panel{
    margin:10px;
    padding:13px
  }

  .preopen-head,
  .preopen-section>header{
    align-items:stretch;
    flex-direction:column
  }

  .preopen-section input{
    width:100%
  }

  .preopen-guide span{
    font-size:10px
  }
}


.preopen-head>.preopen-session-switch{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px
}
.preopen-session-switch button{
  width:112px;
  min-width:112px;
  height:36px;
  padding:0 12px;
  border-radius:8px;
  border:1px solid #3a526b;
  background:#172535;
  color:#9fb3c8;
  cursor:pointer;
  font-weight:normal;
  box-shadow:none;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease
}
.preopen-session-switch button:hover{
  border-color:#4d88bd;
  color:#fff
}
.preopen-session-switch button[data-preopen-session="normal"].active{
  background:#2f80ed;
  color:#fff;
  border-color:#69b1ff;
  box-shadow:0 0 0 2px rgba(47,128,237,.16)
}
.preopen-session-switch button[data-preopen-session="gold"].active{
  background:#b88712;
  color:#fff;
  border-color:#e6b93d;
  box-shadow:0 0 0 2px rgba(230,185,61,.16)
}


/* Preopen market sortable columns */
.preopen-table th[data-preopen-sort]{
  cursor:pointer;
  user-select:none;
  transition:background .18s ease,color .18s ease;
}

.preopen-table th[data-preopen-sort]:hover{
  background:#304968;
  color:#68b2ff;
}

.preopen-table th[data-preopen-sort].sort-active{
  background:#304968;
  color:#68b2ff;
}

.preopen-table th[data-preopen-sort].sort-active::after{
  content:" \25BC";
  display:inline-block;
  margin-right:5px;
  font-size:10px;
}

.preopen-table th[data-preopen-sort].sort-active[data-sort-dir="asc"]::after{
  content:" \25B2";
}

/* V2: clear navigation, readable working surfaces and keyboard access. */
:root{color-scheme:dark;--surface:#141d29;--border:#2b3b4e;--muted:#9aadc2;--accent:#55cbb3}
body{background:#0c131d;color:#e7edf5;line-height:1.7}
body>.app-header{height:auto;min-height:92px;display:flex;align-items:center;gap:22px;padding:18px 28px;background:#111c2a;border-bottom:1px solid var(--border);flex-wrap:wrap}
.app-brand{display:flex;align-items:center;gap:12px;flex-shrink:0}.app-brand>div{display:grid;gap:2px}.app-brand b{font-size:20px;letter-spacing:-.4px}.app-brand small{font-size:11px;color:var(--muted)}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#193d3c;color:#77e1c7;font:bold 25px Georgia,serif;border:1px solid #32635e}
.app-header .top-tabs{display:flex;gap:5px;flex:1;flex-wrap:wrap;background:#0d1622;padding:5px;border:1px solid #253448;border-radius:12px}
.app-header .top-tabs button{border:1px solid transparent;border-radius:8px;padding:10px 12px;background:transparent;color:#aebfd1;white-space:nowrap;font-weight:600;min-height:42px}
.app-header .top-tabs button.active{background:#203b45;color:#93edda;border-color:#365c65;box-shadow:none}.app-header .top-tabs button:hover{background:#1d2c3e;color:#fff}.top-tabs i{font-style:normal;font-size:10px;background:#314151;border-radius:5px;padding:1px 5px;margin-right:5px}
.header-tools{display:flex;align-items:center;gap:12px}.header-tools #source{font-size:11px;color:#acc0d5;background:transparent;padding:0}.header-tools #source[data-state=ready]{color:#78d7b9}.header-tools #source[data-state=error]{color:#ff9da4}.header-tools #source[data-state=warning]{color:#ecc078}
#globalSettings{border:1px solid #3a4c62;background:#1b2a3d;color:#dfebf7;border-radius:8px;padding:8px 13px;cursor:pointer}
button,input,select,textarea{font:inherit}button{transition:background .15s,border-color .15s}button:disabled{opacity:.5;cursor:wait}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #77dfc5;outline-offset:3px}
.dashboard-head,.portfolio-head,.preopen-head{padding-bottom:12px;border-bottom:1px solid #29394b}.dashboard-card,.index-card,.portfolio-panel,.preopen-panel{border-color:var(--border);box-shadow:0 6px 20px #00000012}
.dashboard-card small,.dashboard-head small,.portfolio-head small,.preopen-head small{color:var(--muted);line-height:1.8}.index-card{padding:20px;min-height:125px}.index-card strong{font-size:25px}
.portfolio-grid article{padding:19px;border-radius:14px}.portfolio-grid article.portfolio-exit{border-right:4px solid #ee7885}.portfolio-grid article.portfolio-reduce,.portfolio-grid article.portfolio-review{border-right:4px solid #e9b65c}.portfolio-grid dt{font-size:12px}.portfolio-grid dd{font-size:15px}.portfolio-grid footer{flex-wrap:wrap}.portfolio-guide{gap:8px}
th{font-size:12px}td{font-size:13px}tbody tr:hover{background:#20304455}input,select,textarea{min-height:40px}.watch-empty{color:#a9bad0;line-height:1.9;padding:25px!important}
@media(min-width:1450px){body>.app-header{padding-inline:calc((100vw - 1404px)/2 + 18px)}}
@media(max-width:1100px){.app-header .top-tabs{order:3;flex-basis:100%}.header-tools{margin-right:auto}}
@media(max-width:600px){body>.app-header{padding:13px 12px;gap:12px}.app-brand b{font-size:17px}.brand-mark{width:35px;height:35px}.app-brand small{font-size:10px}.header-tools{gap:8px}.header-tools #source{max-width:95px;line-height:1.5}.app-header .top-tabs{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;border-radius:9px}.app-header .top-tabs button{padding:8px 11px;min-height:42px}.index-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.index-card{padding:12px;min-height:112px}.index-card strong{font-size:19px}.dashboard-head b,.portfolio-head b{font-size:18px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Exit radar: decision evidence stays adjacent to each portfolio position. */
.exit-radar{margin:15px 0;padding:14px;background:#101c29;border:1px solid #30465b;border-radius:11px}.exit-radar>header{display:flex!important;align-items:center;justify-content:space-between;gap:8px!important;margin:0 0 10px!important}.exit-radar>header>b{font-size:14px!important}.exit-radar>header>span{font-size:11px!important}.radar-score{display:flex;align-items:center;gap:12px;margin:10px 0}.radar-score>b{font-size:30px;color:#c4dcf3;line-height:1.2}.radar-score>span{font-size:11px;color:#a8bcd0}.radar-components{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.radar-components>div{display:grid;gap:4px;text-align:center;background:#1e2a39;padding:8px 2px;border-radius:6px;font-size:10px}.radar-components b{font-size:14px}.exit-radar ul{padding-right:17px;font-size:12px;color:#c3cfdd}.exit-radar>small{display:block;font-size:10px;color:#9cb2c7;line-height:1.8}.exit-radar details{margin-top:10px;font-size:11px}.exit-radar details p{min-height:0!important;font-size:11px}.radar-urgent{border-color:#d96b76;background:#271b26}.radar-protect{border-color:#b68a4b}.radar-watch{border-color:#8b834e}.radar-normal{border-color:#376356}.radar-unavailable{border-style:dashed}.radar-method{margin-top:5px}.portfolio-data-unavailable>.health{display:none}.portfolio-data-unavailable>dl{opacity:.6}.exit-radar summary{cursor:pointer}

.portfolio-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));align-items:start}.portfolio-entry{margin:12px 0 18px;border:1px solid #35506a;border-radius:10px;background:#152232}.portfolio-entry>summary{padding:13px 16px;cursor:pointer;color:#b6d9ee;font-weight:600}.portfolio-entry .portfolio-form{margin:0;border:0;border-top:1px solid #304255;border-radius:0 0 10px 10px}.portfolio-grid article>header>span{color:#dae7f3}.exit-radar>header{height:auto!important;background:transparent!important;padding:0!important}.radar-urgent>header>span,.portfolio-exit>header>span{color:#ffacb6!important;background:#542a37!important}.radar-protect>header>span{color:#f5cf8a!important}.radar-unavailable>header>span,.portfolio-data-unavailable>header>span{color:#b8c6d6!important;background:#273442!important}.exit-radar>header>b{white-space:nowrap}.radar-context{min-height:0!important;font-size:11px!important}

.portfolio-head{flex-wrap:wrap;gap:12px}.portfolio-auto-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.portfolio-auto-controls label{display:flex;align-items:center;gap:6px}.portfolio-auto-controls input{width:85px;padding:8px;border:1px solid #53677c;border-radius:8px;background:#152332;color:white}.portfolio-auto-controls button{padding:9px;border-radius:8px;border:1px solid #53677c;background:#243447;color:white;cursor:pointer}.portfolio-auto-controls button.active{background:#146b4e;border-color:#48d69b;color:white}.portfolio-auto-controls small{flex-basis:100%;line-height:1.9;color:#b5c8db}.auto-presets{display:flex;gap:4px}

/* Compact portfolio toolbar: actions share a row even on narrow screens. */
.portfolio-head{display:flex;align-items:center;gap:12px;padding-bottom:12px}
.portfolio-head>.portfolio-auto-controls{display:grid;grid-template-columns:auto auto auto auto;gap:8px;align-items:center;max-width:100%;min-width:0}
.portfolio-auto-controls #refreshPortfolio,.portfolio-auto-controls #portfolioAutoToggle{white-space:nowrap;min-height:40px;margin:0;padding:8px 10px;font-size:12px}
.portfolio-auto-controls label{font-size:11px;white-space:nowrap;gap:5px;margin:0}
.portfolio-auto-controls input{width:65px;min-height:38px;padding:5px}
.portfolio-auto-controls select{font:inherit;font-size:11px;min-height:38px;max-width:100%;padding:5px;border:1px solid #53677c;border-radius:8px;background:#152332;color:#dbe1e8}
.portfolio-auto-controls #portfolioAutoStatus{grid-column:1/-1;line-height:1.65;font-size:10px;overflow-wrap:anywhere}
@media(max-width:650px){.portfolio-head{gap:9px;align-items:stretch}.portfolio-head>div:first-child{width:100%}.portfolio-head>.portfolio-auto-controls{width:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}.portfolio-auto-controls label{justify-content:center}.portfolio-auto-controls .auto-presets{display:block}.portfolio-auto-controls select{width:100%}.portfolio-guide{display:none}.portfolio-head{margin-bottom:10px}.portfolio-auto-controls #portfolioAutoToggle,.portfolio-auto-controls #refreshPortfolio{font-size:11px;padding:7px 4px}}

.industry-sort{display:inline-flex;align-items:center;gap:6px;background:transparent;border:0;padding:6px 0;color:inherit;font:inherit;white-space:nowrap;cursor:pointer}
.industry-sort span{opacity:.55}
.industry-table th[aria-sort="ascending"] .industry-sort,.industry-table th[aria-sort="descending"] .industry-sort{color:var(--accent,#59d9ae)}
.industry-table th[aria-sort="ascending"] span,.industry-table th[aria-sort="descending"] span{opacity:1}
.industry-sort:focus-visible{outline:2px solid #59d9ae;outline-offset:4px;border-radius:4px}

.heatmap-navigation{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0;color:#b8c6d6;font-size:12px}.heatmap-navigation [hidden]{display:none}.heat-tile{color:#f4f7fb;text-align:right;font:inherit;cursor:pointer}.heat-tile:focus-visible,.industry-drill:focus-visible{outline:2px solid #fff;outline-offset:3px}.stock-heat-tile{flex-basis:205px;gap:8px;min-height:218px}.stock-heat-tile strong{font-size:24px;direction:ltr;text-align:right}.stock-heat-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.stock-heat-top b{font-size:17px}.heat-freshness{font-size:10px;border:1px solid #ffffff44;border-radius:5px;padding:2px 5px}.stock-heat-metrics{display:grid;gap:6px;font-size:11px}.stock-heat-metrics>span{display:flex;justify-content:space-between;gap:8px}.heat-demand-track{height:5px;border-radius:5px;background:#f4888855;overflow:hidden;display:block;direction:ltr}.heat-demand-track i{display:block;height:100%;background:#64e7b5}.heat-selected{outline:2px solid #fff;outline-offset:1px}.heatmap-stock-detail{margin-top:16px;padding:18px;background:#132031;border:1px solid #52667b;border-radius:12px}.heatmap-stock-detail[hidden]{display:none}.heatmap-stock-detail header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.heatmap-stock-detail header>div{display:grid;gap:6px}.heatmap-stock-detail dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.heatmap-stock-detail dt{font-size:11px;color:#aebcce}.heatmap-stock-detail dd{margin:5px 0;font-weight:bold}.heatmap-stock-detail p{font-size:11px;color:#aebcce;line-height:1.9}.heat-day-range{display:flex;justify-content:space-between;gap:10px;font-size:11px;flex-wrap:wrap;direction:ltr}.heat-range-track{height:6px;position:relative;margin:12px 5px;background:linear-gradient(90deg,#d65465,#e4be62,#48ba98);border-radius:6px}.heat-range-track i{position:absolute;top:-4px;width:4px;height:14px;background:white;transform:translateX(-50%)}.industry-drill{background:none;border:0;padding:4px 0;color:inherit;font:inherit;font-weight:bold;cursor:pointer}.industry-drill:hover{color:#59d9ae}@media(max-width:560px){.stock-heat-tile{flex-basis:145px;min-width:0;padding:10px}.stock-heat-top{flex-wrap:wrap}.heatmap-stock-detail dl{grid-template-columns:repeat(2,minmax(0,1fr))}.heatmap-stock-detail{padding:12px}.stock-heat-metrics>span{flex-wrap:wrap}.heatmap-navigation{line-height:1.9}}
.opportunity-panel{margin:20px 0;padding:24px;border:1px solid #264454;border-radius:20px;background:linear-gradient(135deg,#102833,#101923);color:#e6f0f4}.opportunity-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.opportunity-heading h2{margin:8px 0}.opportunity-number{font-size:38px;color:#64e5be;font-weight:800;text-align:center}.opportunity-number small{display:block;font-size:12px;color:#a5bac8}.opportunity-components{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin:22px 0}.opportunity-components div{padding:12px;background:#ffffff06;border-radius:12px}.opportunity-components b{float:left}.opportunity-components progress{width:100%;height:7px;accent-color:#64e5be;margin-top:12px}.decision-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.decision-grid article{padding:18px;border:1px solid #35505b;border-radius:14px}.decision-grid h3{font-size:16px;margin:10px 0}.decision-grid p{color:#b5c8d2;line-height:1.9;margin:0}.opportunity-details{display:flex;gap:16px;flex-wrap:wrap;margin:20px 0;color:#b5c8d2;font-size:13px}.opportunity-blockers{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.opportunity-blockers span{padding:7px 12px;border-radius:9px;background:#e7ae3112;color:#eac586;font-size:12px}.candidate-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:18px 0}.candidate-cards button{display:flex;flex-direction:column;align-items:stretch;text-align:right;padding:20px;border:1px solid #355a60;border-radius:16px;background:linear-gradient(135deg,#173537,#12212e);color:#d9edf0;cursor:pointer}.candidate-cards button:hover{border-color:#64e5be}.candidate-cards strong{font-size:23px;margin:12px 0}.candidate-cards strong b{float:left;color:#64e5be}.candidate-cards p{line-height:1.8;color:#eac586;min-height:44px}.candidate-cards small{color:#9db8c1}.candidate-cards span{color:#64e5be}@media(max-width:800px){.opportunity-components{grid-template-columns:repeat(2,minmax(0,1fr))}.candidate-cards,.decision-grid{grid-template-columns:1fr}.opportunity-panel{padding:16px}.opportunity-heading h2{font-size:18px}}
/* One shared content boundary for every symbol-analysis section. */
#marketView{width:100%;max-width:1440px;margin-inline:auto;padding:0 18px 20px;min-width:0}
#marketView>.search,#marketView>.workspace,#marketView>.opportunity-panel,#marketView>.scanner{width:100%;max-width:none;margin-inline:0;min-width:0}
#marketView>.search,#marketView>.workspace{padding-inline:0}
#marketView .workspace>*,#marketView .scanner>*,#marketView .opportunity-panel>*,#marketView .candidate-cards>*,#marketView .decision-grid>*,#marketView .opportunity-components>*{min-width:0}
#marketView .search{flex-wrap:wrap}
#marketView .scan-actions{flex-wrap:wrap;min-width:0;max-width:100%}
#marketView .chart-head{height:auto;min-height:54px;flex-wrap:wrap;gap:8px}
#marketView .chart-head>div{min-width:0;flex-wrap:wrap}
#marketView .opportunity-panel,#marketView .candidate-cards,#marketView .decision{overflow-wrap:anywhere}
#marketView .table{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain}
.app-header .top-tabs{min-width:0;max-width:100%}
@media(max-width:600px){
 #marketView{padding-inline:12px}
 #marketView .search form{width:100%;min-width:0;flex-wrap:wrap}
 #marketView .search form>div{flex:1 1 120px;min-width:0}
 #marketView .search input{width:100%;min-width:0;max-width:100%}
 #marketView #suggestions{width:100%;max-width:100%}
 #marketView .opportunity-heading{flex-wrap:wrap}
 #marketView .scanner{padding:12px}
 #marketView .opportunity-panel{padding:16px}
}

/* Final contrast layer; keep it last so legacy page rules cannot dim copy. */
:root{--muted:#b3c3d5}
.search button,.chart-head button,.chart-head small,.chart-head label,#reasons span,
.verdict small,.notice,#scanMeta,.top-tabs button,.watch-head small,.watch-grid dt,
.watch-empty,#syncProgress,.portfolio-head small,.portfolio-form label,
.portfolio-summary span,.portfolio-grid dt,.portfolio-grid p,.portfolio-history,
.settings-head small,.settings-card section>small,.portfolio-form-title small,
.dashboard-head small,.dashboard-card small,.index-card span,.stats-card dt,
.chart-legend,.header-tools #source{color:#b3c3d5}
tbody td{color:#e5ebf2}
