/* Jaisandar 311 · data-first cleanup + restrained motion */
:root{--jai-data-accent:#006666;--jai-data-soft:#eef8f6;--jai-data-border:#d9e6e3;--jai-data-muted:#75827f}

/* Remove duplicated/cross-rubric chrome. Bottom dock + sheets are the only mobile navigation. */
.jai-data-contextbar{display:none!important}
.rubric-motion-banner{display:none!important}
body.home[data-jai-rubric="market"] .rubric-motion-banner,
body.home[data-jai-rubric="economy"] .rubric-motion-banner,
body.home[data-jai-rubric="banking"] .rubric-motion-banner{display:none!important}

/* Economy: data first. Decorative heroes no longer sit above the chart. */
body.home .economy-window>.economy-hero{display:none!important}
body.home .economy-window{scroll-margin-top:92px}
body.home .economy-window>.economy-toolbar,
body.home .economy-window>.tenge-toolbar,
body.home .economy-window>.cpc-toolbar{margin-top:0!important}

/* Dividend: remove the oversized intro block, keep the actual tools. */
body.home .dividend-window>.dividend-head{display:none!important}
body.home .dividend-window>.dividend-mode-tabs{margin-top:0!important}

/* Compact base-rate overview. */
.rate-overview{display:flex!important;align-items:stretch!important;gap:7px!important;margin:0 0 10px!important;overflow-x:auto!important;scrollbar-width:none!important}
.rate-overview::-webkit-scrollbar{display:none}
.rate-overview>article,.rate-overview>.rate-compare-toggle{flex:0 0 auto!important;min-width:132px!important;min-height:58px!important;margin:0!important;padding:9px 11px!important;border:1px solid var(--jai-data-border)!important;border-radius:12px!important;background:#fff!important;box-shadow:none!important}
.rate-overview>article span{font-size:8px!important;letter-spacing:.08em!important;color:var(--jai-data-muted)!important;font-weight:900!important}
.rate-overview>article strong{display:block!important;margin-top:4px!important;font-size:16px!important;line-height:1.05!important;color:#263330!important}
.rate-overview>.rate-compare-toggle{display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;align-items:center!important;gap:7px!important;text-align:left!important}
.rate-overview>.rate-compare-toggle i{width:24px!important;height:24px!important;display:grid!important;place-items:center!important;border-radius:8px!important;background:var(--jai-data-soft)!important;color:var(--jai-data-accent)!important;font-style:normal!important}
.rate-overview>.rate-compare-toggle b{font-size:11px!important}.rate-overview>.rate-compare-toggle small{display:none!important}

/* One quiet metadata line replaces large banners. */
.jai-data-freshness{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:26px;margin:0 0 8px;padding:0 2px;color:var(--jai-data-muted);font-size:9px;line-height:1.3;font-weight:750;letter-spacing:.015em}
.jai-data-freshness>span{display:inline-flex;align-items:center;gap:6px;min-width:0}
.jai-data-freshness i{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--jai-data-accent);opacity:.72;box-shadow:0 0 0 3px rgba(0,102,102,.07)}
.jai-data-freshness b{color:#42514e;font-weight:900}
.jai-data-freshness.is-fresh i{animation:jai311-date-pulse .72s ease-out 1}
@keyframes jai311-date-pulse{0%{transform:scale(.65);box-shadow:0 0 0 0 rgba(0,102,102,.25)}70%{transform:scale(1.12);box-shadow:0 0 0 7px rgba(0,102,102,0)}100%{transform:none}}

/* Sources become a consistent microline instead of a visual block. */
body.home :is(.economy-source,.market-source,.deposit-source,.migration-flow-note>span:last-child){margin:9px 0 0!important;padding:7px 0 0!important;border-top:1px solid #edf1f0!important;background:transparent!important;color:#7b8582!important;font-size:9px!important;line-height:1.4!important}
body.home :is(.economy-source,.market-source,.deposit-source) a{color:#486d65!important;text-decoration:none!important;border-bottom:1px solid #b9cbc7!important}

/* Calm section accents; no big colored shells. */
body.home[data-jai-rubric="market"]{--jai-data-accent:#006666;--jai-data-soft:#eef8f6}
body.home[data-jai-rubric="economy"]{--jai-data-accent:#4b7b31;--jai-data-soft:#f3f9eb}
body.home[data-jai-rubric="banking"]{--jai-data-accent:#3f6f9d;--jai-data-soft:#eff5fb}
body.home[data-jai-rubric="trade"]{--jai-data-accent:#8b2d49;--jai-data-soft:#fbf1f4}
body.home :is(.economy-chart-card,.ranking-card,.qazaq-chart-card,.heatmap-window,.dividend-detail,.bank-bars-card){position:relative}
body.home :is(.economy-chart-card,.ranking-card,.qazaq-chart-card,.dividend-detail,.bank-bars-card)::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:2px;border-radius:99px;background:var(--jai-data-accent);opacity:.6;pointer-events:none}

/* Toolbars are controls, not cards. */
body.home :is(.economy-toolbar,.tenge-toolbar,.cpc-toolbar,.market-period-toolbar,.gdp-chart-actions){box-shadow:none!important}

/* Restrained micro-motion. */
body.home :is(button,[role="button"]){-webkit-tap-highlight-color:transparent}
body.home :is(button,[role="button"]):active{transform:scale(.975)}
body.home :is(.home-economy-rail button,.jai305-card,.economy-subtab,.market-subtab,.bank-subtab) em{transition:transform .18s ease}
body.home :is(.home-economy-rail button,.jai305-card):hover em{transform:translateX(5px)}
.jai-chart-reveal{opacity:0;transform:translateY(8px);transition:opacity .28s ease,transform .28s ease}
.jai-chart-reveal.jai-in-view{opacity:1;transform:none}
.jai-data-updating :is(.economy-line-chart,.dividend-chart,[data-local-market-chart],.jtp-chart){opacity:.62;transform:translateY(2px);transition:none!important}
:is(.economy-line-chart,.dividend-chart,[data-local-market-chart],.jtp-chart){transition:opacity .2s ease,transform .2s ease}

/* Compact progressive disclosure for explanatory notes. */
.jai311-note-details{margin:8px 0!important;border-top:1px solid #edf1f0!important}
.jai311-note-details>summary{cursor:pointer;list-style:none;padding:9px 1px;color:#61706c;font-size:10px;font-weight:900}
.jai311-note-details>summary::-webkit-details-marker{display:none}.jai311-note-details>summary:after{content:"＋";float:right;color:var(--jai-data-accent)}
.jai311-note-details[open]>summary:after{content:"−"}.jai311-note-details>.economy-note{margin:0 0 8px!important}

/* Generic focus mode. */
.jai311-focus-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:0 10px;border:1px solid #d9e4e1;border-radius:9px;background:#fff;color:#40534f;font-size:9px;font-weight:900;cursor:pointer}
.jai311-focus-btn:hover{border-color:#9dbbb4;color:var(--jai-data-accent)}
.jai311-focus-active{position:fixed!important;z-index:100000!important;inset:0!important;width:100vw!important;height:100dvh!important;margin:0!important;padding:14px!important;border-radius:0!important;background:#fff!important;overflow:auto!important;box-shadow:none!important}
.jai311-focus-active>.jai311-focus-btn{position:sticky;z-index:3;top:0;float:right;background:#fff}
body.jai311-focus-lock{overflow:hidden!important}

/* Empty states never leave a large white void. */
.jai311-empty{display:grid;place-items:center;min-height:110px;padding:18px;border:1px dashed #cedbd8;border-radius:13px;background:#f8fbfa;color:#71807c;text-align:center;font-size:11px;font-weight:800}

@media(max-width:900px){
  /* Small sticky controls: data stays reachable while reading the chart. */
  body.home :is(.economy-toolbar,.cpc-toolbar,.market-period-toolbar){position:sticky!important;z-index:38!important;top:calc(env(safe-area-inset-top,0px) + 6px)!important;padding:6px!important;border:1px solid rgba(217,230,227,.9)!important;border-radius:12px!important;background:rgba(255,255,255,.94)!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important}
  body.home .tenge-toolbar{position:relative!important}
  body.home .jai-data-freshness{margin-bottom:6px;font-size:8.5px}
  .rate-overview{margin-bottom:8px!important;padding-bottom:2px!important}
  .rate-overview>article,.rate-overview>.rate-compare-toggle{min-width:118px!important;min-height:54px!important;padding:8px 9px!important}
  .rate-overview>article strong{font-size:14px!important}
  /* Economy intro content is intentionally compact. */
  .migration-flow-head{margin-bottom:8px!important;padding-bottom:8px!important}
  .migration-flow-copy>p{display:none!important}
  .migration-flow-copy h2{font-size:20px!important;margin:2px 0!important}
  .migration-flow-kicker{font-size:8px!important}
  /* One stable source/date line, not a banner. */
  .dividend-window .jai-data-freshness{margin-top:0}
  /* Focus mode remains usable above Safari bottom UI. */
  .jai311-focus-active{padding:calc(env(safe-area-inset-top,0px) + 8px) 8px calc(env(safe-area-inset-bottom,0px) + 12px)!important}
}

@media(prefers-reduced-motion:reduce){
  .jai-data-freshness.is-fresh i,.jai-chart-reveal{animation:none!important;transition:none!important}
  .jai-chart-reveal{opacity:1!important;transform:none!important}
}
