/* Jaisandar 207 · unified product system */
:root{--jai-radius:18px;--jai-border:#dce5e5;--jai-muted:#667374;--jai-soft:#f6f9f9;--jai-accent:#006666}
/* 1. unified headings + actions */
.market-block-heading,.economy-chart-card>header,.bank-ranking-card>header,.bank-bars-card>header,.trade-detail-card>header,.dividend-analysis-head,.market-export-heading{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:18px!important}
.market-block-heading h3,.economy-chart-card>header h3,.bank-ranking-card>header h3,.bank-bars-card>header h3,.trade-detail-card>header h3,.dividend-analysis-head h3{margin:4px 0 0!important;line-height:1.12!important}
.market-block-heading>small,.economy-chart-head-actions,.bank-head-actions{margin-left:auto!important;display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
.visual-download-button,.jai-product-action{min-height:38px!important;border-radius:11px!important}
/* 3. tables */
.economy-table-wrap,.trade-detail-table-wrap,.bank-history-table-wrap,.jai-table-shell{position:relative;max-width:100%;overflow:auto;border:1px solid var(--jai-border);border-radius:16px;background:#fff;scrollbar-width:thin}
table.economy-table,.trade-detail-table,.bank-history-table{border-collapse:separate!important;border-spacing:0!important;width:100%}
table.economy-table thead th,.trade-detail-table thead th,.bank-history-table thead th{position:sticky;top:0;z-index:3;background:#f7fafa!important;box-shadow:0 1px 0 var(--jai-border)}
table.economy-table th:first-child,table.economy-table td:first-child,.trade-detail-table th:first-child,.trade-detail-table td:first-child,.bank-history-table th:first-child,.bank-history-table td:first-child{position:sticky;left:0;z-index:2;background:inherit}
table.economy-table tbody tr:hover,.trade-detail-table tbody tr:hover,.bank-history-table tbody tr:hover{background:#f5f9f9!important}
table.economy-table td:not(:first-child),table.economy-table th:not(:first-child),.trade-detail-table td:not(:first-child),.trade-detail-table th:not(:first-child),.bank-history-table td:not(:first-child),.bank-history-table th:not(:first-child){text-align:right}
/* 4. infographic showcase */
body.jai-infographic-mode .rubric-story{border-radius:20px!important;overflow:hidden!important;border:1px solid #eadde4!important;background:#fff!important;transition:transform .22s ease,box-shadow .22s ease!important}
body.jai-infographic-mode .rubric-story:hover{transform:translateY(-3px);box-shadow:0 16px 38px rgba(46,18,32,.09)!important}
body.jai-infographic-mode .rubric-story img{transition:transform .35s ease!important}
body.jai-infographic-mode .rubric-story:hover img{transform:scale(1.025)}
.jai-format-badge{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#fff0f7;color:#660033;font-size:11px;font-weight:800;letter-spacing:.04em;margin:0 0 8px}
.card-views{display:inline-flex!important;gap:5px!important;align-items:center!important;margin-left:8px!important;font-weight:700!important}
/* 2. compare drawer */
.jai-compare-add{position:absolute;top:10px;right:10px;z-index:7;width:30px;height:30px;border:1px solid #cddada;border-radius:9px;background:rgba(255,255,255,.94);font-weight:900;color:#006666;cursor:pointer}
.qazaq-row,.story-card,[data-stock-row]{position:relative}
.jai-compare-drawer{position:fixed;left:50%;bottom:18px;z-index:9997;transform:translate(-50%,130%);width:min(760px,calc(100% - 24px));background:#fff;border:1px solid #cddada;border-radius:18px;box-shadow:0 20px 60px rgba(0,40,40,.18);padding:12px 14px;transition:transform .25s ease}
.jai-compare-drawer.open{transform:translate(-50%,0)}
.jai-compare-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.jai-compare-head strong{font-size:14px}.jai-compare-items{display:flex;gap:7px;overflow:auto;padding-top:9px}.jai-compare-chip{flex:0 0 auto;border:1px solid #d8e3e3;background:#f7fafa;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800}.jai-compare-clear{border:0;background:none;color:#667374;cursor:pointer;font-weight:700}
/* 5. data search */
.jai-data-search-trigger{position:fixed;right:18px;bottom:18px;z-index:9990;border:1px solid #d3dfdf;background:#fff;color:#173535;border-radius:14px;padding:10px 13px;font-weight:800;box-shadow:0 8px 30px rgba(0,55,55,.10);cursor:pointer}.jai-data-search-trigger kbd{font-size:10px;color:#718080;margin-left:8px}
.jai-data-search{position:fixed;inset:0;z-index:10000;background:rgba(12,25,25,.42);backdrop-filter:blur(7px);display:grid;place-items:start center;padding:9vh 14px}.jai-data-search[hidden]{display:none!important}.jai-data-search-panel{width:min(720px,100%);max-height:78vh;overflow:hidden;background:#fff;border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.25);border:1px solid #dbe5e5}.jai-data-search-input{width:100%;height:64px;border:0;border-bottom:1px solid #e4ebeb;padding:0 20px;font:700 18px/1.2 inherit;outline:none}.jai-data-search-results{max-height:60vh;overflow:auto;padding:8px}.jai-data-result{display:flex;justify-content:space-between;gap:15px;padding:12px 13px;border-radius:12px;color:#173535;text-decoration:none}.jai-data-result:hover,.jai-data-result.active{background:#f1f7f7}.jai-data-result small{color:#7c8989}
/* 6/7 progressive controls */
.jai-progressive-toolbar{position:sticky;top:8px;z-index:25;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border:1px solid #dbe5e5;border-radius:16px;padding:10px!important;box-shadow:0 7px 24px rgba(0,50,50,.05)}
.jai-filter-toggle{border:1px solid #cfdddd;background:#fff;border-radius:10px;min-height:36px;padding:0 12px;font-weight:800;color:#315050;cursor:pointer}.jai-progressive-toolbar.jai-collapsed>:not(:first-child):not(:nth-child(2)):not(.jai-filter-toggle){display:none!important}
.jai-filter-summary{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 0}.jai-filter-summary span{padding:5px 8px;border-radius:999px;background:#eef5f5;color:#496060;font-size:11px;font-weight:700}
@media(max-width:760px){
 .market-block-heading,.economy-chart-card>header,.bank-ranking-card>header,.bank-bars-card>header,.trade-detail-card>header,.dividend-analysis-head{align-items:stretch!important;flex-direction:column!important;gap:10px!important}
 .market-block-heading>small,.economy-chart-head-actions,.bank-head-actions{margin-left:0!important}
 .jai-data-search-trigger{right:10px;bottom:10px;padding:9px 11px}.jai-data-search-trigger kbd{display:none}
 .jai-progressive-toolbar{top:4px;border-radius:13px}
 .economy-table-wrap.jai-mobile-cards,.trade-detail-table-wrap.jai-mobile-cards{overflow:visible;border:0;background:transparent}
 .jai-mobile-cards table,.jai-mobile-cards thead,.jai-mobile-cards tbody,.jai-mobile-cards tr,.jai-mobile-cards td{display:block;width:100%}.jai-mobile-cards thead{display:none}.jai-mobile-cards tr{margin:0 0 10px;border:1px solid var(--jai-border);border-radius:14px;background:#fff;padding:9px 12px}.jai-mobile-cards td{position:static!important;display:flex!important;justify-content:space-between;gap:18px;padding:8px 0!important;border:0!important;text-align:right!important}.jai-mobile-cards td:before{content:attr(data-label);text-align:left;color:#687777;font-size:12px;font-weight:700}.jai-mobile-cards td:first-child{font-weight:900!important;border-bottom:1px solid #edf1f1!important;margin-bottom:3px!important}
}
@media(prefers-reduced-motion:reduce){.jai-compare-drawer,.rubric-story,.rubric-story img{transition:none!important}}
.jai-compare-go{border:0;background:#006666;color:#fff;border-radius:9px;padding:7px 10px;font-weight:800;cursor:pointer;margin-right:4px}


/* Jaisandar 208 · keep compare action separate from price/change */
[data-stock-row]>.jai-compare-add,
[data-qazaq-stock-row]>.jai-compare-add{
  position:static!important;
  top:auto!important;
  right:auto!important;
  transform:none!important;
  flex:0 0 32px!important;
  width:32px!important;
  height:32px!important;
  display:inline-grid!important;
  place-items:center!important;
  margin-left:auto!important;
  margin-right:10px!important;
  border-radius:10px!important;
  background:#f3f8f8!important;
  border:1px solid #c8d8d8!important;
  color:#006666!important;
  font-size:18px!important;
  line-height:1!important;
  box-shadow:none!important;
}
[data-stock-row]>.jai-compare-add:hover,
[data-qazaq-stock-row]>.jai-compare-add:hover{background:#e7f1f1!important;border-color:#9fbcbc!important}
[data-stock-row]>.ranked-stock-value,
[data-qazaq-stock-row]>.qazaq-quote{margin-left:0!important}
@media(max-width:760px){
  [data-stock-row]>.jai-compare-add,
  [data-qazaq-stock-row]>.jai-compare-add{
    width:30px!important;height:30px!important;flex-basis:30px!important;margin-right:8px!important;
  }
}
