/* Chart motion (owner 17/11/2026), driven by dist/chart-fx.mjs. Only opacity and the individual transform properties
   (translate / scale, which add to a chart's own transform instead of replacing it) move; brightness/shadows switch
   without a transition. Reduced motion: no movement, the colour/opacity emphasis stays. Both themes in this file. */

/* ---------- 1. SVG charts: the mark under the pointer comes forward, the others step back ---------- */
.cfx .cfx-b,.cfx .cfx-d{transform-box:fill-box;transition:opacity .18s ease,translate .18s ease,scale .18s ease}
.cfx .cfx-b{transform-origin:50% 100%}
.cfx .cfx-b.cfx-top{transform-origin:50% 0}
.cfx .cfx-d{transform-origin:50% 50%}
.cfx .cfx-l,.cfx .cfx-ar{transition:opacity .2s ease}
.cfx.cfx-pt .cfx-b:not(.cfx-on),.cfx.cfx-pt .cfx-d:not(.cfx-on){opacity:.42}
.cfx .cfx-b.cfx-on{translate:0 -2px;filter:brightness(1.28)}
.cfx .cfx-b.cfx-top.cfx-on{translate:0 2px}
.cfx .cfx-d.cfx-on{scale:1.7;filter:drop-shadow(0 0 3px rgba(255,255,255,.8))}
.cfx.cfx-ln .cfx-l:not(.cfx-on){opacity:.3}
.cfx.cfx-ln .cfx-ar{opacity:.55}
.cfx .cfx-l.cfx-on{filter:brightness(1.3) drop-shadow(0 0 2.5px rgba(255,255,255,.45))}
/* the chart's own focus dot / ring (moved by the chart's code) gets a glow */
.cfx.cfx-hot .fx-hl,.cfx.cfx-hot .sf-ring,.cfx.cfx-hot .og-ring,.cfx.cfx-hot .mb-liqdot,.cfx.cfx-hot .marketdot{transform-box:fill-box;transform-origin:50% 50%;scale:1.3;filter:drop-shadow(0 0 4px rgba(255,255,255,.7));transition:scale .15s ease}
.br2-dial:hover .br2-needle{filter:drop-shadow(0 0 4px rgba(241,189,74,.75))}

/* ---------- 2. HTML charts ---------- */
/* Treemaps (Thị trường bản đồ nhiệt, Tiền chảy bản đồ ngành): the tile rises, the rest dim */
.mb-tm>.mb-t,.fl-tm>.fl-tile{transition:color .15s,background-color .15s,border-color .15s,opacity .18s ease,scale .18s ease}
.mb-tm:hover>.mb-t:not(:hover),.fl-tm:hover>.fl-tile:not(:hover){opacity:.72}
.mb-tm>.mb-t:hover,.fl-tm>.fl-tile:hover{scale:1.04;z-index:3;box-shadow:0 10px 24px #000b,inset 0 0 0 1.5px #ffffffc0;filter:brightness(1.14)}
/* Heat tables (Độ khỏe giá "Theo phiên", dải 40 phiên) */
.fl-heat td{transition:scale .15s ease}
.fl-heat td:hover{scale:1.08;position:relative;z-index:2;box-shadow:0 4px 14px #000a,0 0 0 1.5px #ffffffc8}
.fl-mini i{transition:scale .15s ease}
.fl-mini i:hover{scale:1.35;position:relative;z-index:2;box-shadow:0 0 0 1px #ffffffc8}
/* Breadth tiles (Tăng / Đứng / Giảm) */
.br2-tile{transition:translate .18s ease}
.br2-tile:hover{translate:0 -2px;filter:brightness(1.12)}
/* Columns: home "Tác động VN-Index", Cảng month pairs */
.sp-col{transition:opacity .18s ease}
.sp-chart:hover>.sp-col:not(:hover){opacity:.5}
.sp-half i{transition:translate .18s ease}
.sp-col:hover .sp-half i{filter:brightness(1.3)}
.sp-col:hover .sp-pos i{translate:0 -2px}
.sp-col:hover .sp-neg i{translate:0 2px}
/* Cảng "Đọc nhanh" columns (.sx-bars): hover / focus / tap lifts one, the others fade */
.sx-bc{transition:opacity .18s ease}.sx-bc>i{transition:translate .18s ease}
.sx-bars:hover>.sx-bc:not(:hover),.sx-bars:focus-within:not(:hover)>.sx-bc:not(:focus){opacity:.42}
.sx-bc:hover>i,.sx-bars:not(:hover)>.sx-bc:focus>i{translate:0 -2px;filter:brightness(1.18)}
.pt-bc{transition:opacity .18s ease}
.pt-bars:hover>.pt-bc:not(:hover){opacity:.5}
.pt-bc .pair i{transform-origin:50% 100%;transition:filter .15s,translate .18s ease}
.pt-bc:hover .pair i{translate:0 -3px;filter:brightness(1.22)}
/* Horizontal bars: VPA, Khối ngoại, Tôm cá markets, health rows, table mini bars */
.sx-vb,.sx-vr,.fx-row,.sf-mrow,.hs-row{transition:opacity .18s ease}
.sx-vbs:hover>.sx-vb:not(:hover){opacity:.55}
.sx-vrows:hover>.sx-vr:not(:hover){opacity:.65}
.sx-vb i{transform-origin:0 50%;transition:scale .18s ease}
.sx-vb:hover i{scale:1 1.18;filter:brightness(1.25);box-shadow:0 0 10px #ffffff2e}
.fx-fly:hover>.fx-row:not(:hover){opacity:.6}
.fx-b i{transition:scale .18s ease}
.fx-b:hover i{scale:1 1.15}
.sf-mk:hover .sf-mrow:not(:hover){opacity:.6}
.sf-track i{transition:scale .18s ease}
.sf-mrow:hover .sf-track i{scale:1 1.35;filter:brightness(1.22)}
.hs-list:hover .hs-row:not(:hover){opacity:.6}
.hs-bar em{transition:scale .18s ease}
.hs-row:hover .hs-bar em{scale:1 1.6;filter:brightness(1.25)}
.dash-bar i,.mb-pbar i,.fl-meter i,.fl-rbar i{transition:scale .15s ease}
.dash-sector:hover .dash-bar i,tr:hover .mb-pbar i,tr:hover .fl-meter i,tr:hover .fl-rbar i{scale:1 1.45;filter:brightness(1.3)}

/* ---------- 3. Tooltips fade in instead of popping (opacity + translate only) ---------- */
@keyframes cfxTip{from{opacity:0;translate:0 4px}to{opacity:1;translate:0 0}}
.mc-tip:not([hidden]),.mt-tip:not([hidden]),.fx-tip:not([hidden]),.fxq:not([hidden]),.sf-tip:not(.off),.og-tip:not(.off),.sp-col:hover .sp-tip,.sp-col:focus .sp-tip,.sx-bc:hover .sx-tip,.sx-bc:focus .sx-tip{animation:cfxTip .16s ease-out}

/* ---------- 4. Entrance, once (chart-fx.mjs: .cfx-a = start pose, paused; .cfx-run = play) ---------- */
@keyframes cfxGrowY{from{scale:1 0}}
@keyframes cfxGrowX{from{scale:0 1}}
@keyframes cfxDraw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes cfxPop{from{opacity:0;scale:.3}}
@keyframes cfxFade{from{opacity:0}}
@keyframes cfxTile{from{opacity:0;scale:.96}}
.cfx-a .cfx-b,.pt-bars.cfx-a .pair i{animation:cfxGrowY .6s cubic-bezier(.2,.8,.2,1) both paused}
.pt-bars.cfx-a .pair i,.sx-bars.cfx-a .sx-bc>i{transform-origin:50% 100%}
.sx-bars.cfx-a .sx-bc>i{animation:cfxGrowY .6s cubic-bezier(.2,.8,.2,1) both paused}
.cfx-a .cfx-l.cfx-dash{animation:cfxFade .7s ease-out .2s both paused}
.cfx-a .cfx-l:not(.cfx-dash){stroke-dasharray:1;animation:cfxDraw .9s cubic-bezier(.35,.6,.3,1) both paused}
.cfx-a .cfx-d{animation:cfxPop .35s ease-out .45s both paused}
.cfx-a .cfx-ar{animation:cfxFade .7s ease-out .15s both paused}
.mb-tm.cfx-a>.mb-t,.fl-tm.cfx-a>.fl-tile{animation:cfxTile .45s ease-out both paused}
.fl-heatwrap.cfx-a tbody tr{animation:cfxFade .45s ease-out both paused}
.sx-vrows.cfx-a .sx-vb i,.hs-list.cfx-a .hs-bar em{transform-origin:0 50%;animation:cfxGrowX .6s cubic-bezier(.2,.8,.2,1) both paused}
.cfx-a.cfx-run .cfx-b,.cfx-a.cfx-run .cfx-l,.cfx-a.cfx-run .cfx-d,.cfx-a.cfx-run .cfx-ar,.pt-bars.cfx-run .pair i,.sx-bars.cfx-run .sx-bc>i,.mb-tm.cfx-run>.mb-t,.fl-tm.cfx-run>.fl-tile,.fl-heatwrap.cfx-run tbody tr,.sx-vrows.cfx-run .sx-vb i,.hs-list.cfx-run .hs-bar em{animation-play-state:running}

/* ---------- 5. Cards with a chart lift a little (computers only) ---------- */
@media (hover:hover) and (pointer:fine) and (min-width:621px){
  .cfx-card{transition:translate .2s ease}
  .cfx-card:hover{translate:0 -2px;box-shadow:inset 0 1px 0 #ffffff08,0 14px 30px #0007}
}

/* ---------- Light theme ---------- */
html[data-theme="light"] .cfx .cfx-d.cfx-on{filter:drop-shadow(0 0 3px rgba(0,0,0,.45))}
html[data-theme="light"] .cfx .cfx-b.cfx-on{filter:brightness(1.12) saturate(1.15)}
html[data-theme="light"] .cfx .cfx-l.cfx-on{filter:drop-shadow(0 0 2px rgba(0,0,0,.35))}
html[data-theme="light"] .cfx.cfx-hot .fx-hl,html[data-theme="light"] .cfx.cfx-hot .sf-ring,html[data-theme="light"] .cfx.cfx-hot .og-ring,html[data-theme="light"] .cfx.cfx-hot .mb-liqdot,html[data-theme="light"] .cfx.cfx-hot .marketdot{filter:drop-shadow(0 0 3px rgba(0,0,0,.4))}
html[data-theme="light"] .mb-tm>.mb-t:hover,html[data-theme="light"] .fl-tm>.fl-tile:hover{box-shadow:0 8px 20px rgba(20,24,32,.28),inset 0 0 0 1.5px rgba(0,0,0,.55);filter:brightness(1.05) saturate(1.1)}
html[data-theme="light"] .fl-heat td:hover{box-shadow:0 4px 12px rgba(20,24,32,.25),0 0 0 1.5px rgba(0,0,0,.6)}
html[data-theme="light"] .fl-mini i:hover{box-shadow:0 0 0 1px rgba(0,0,0,.6)}
html[data-theme="light"] .sx-vb:hover i{box-shadow:0 0 8px rgba(0,0,0,.18);filter:brightness(1.08) saturate(1.15)}
@media (hover:hover) and (pointer:fine) and (min-width:621px){
  html[data-theme="light"] .cfx-card:hover{box-shadow:0 12px 28px rgba(20,24,32,.12)}
}

/* ---------- Reduced motion: nothing moves (emphasis by colour/opacity stays) ---------- */
@media (prefers-reduced-motion:reduce){
  .cfx .cfx-b,.cfx .cfx-d,.cfx .cfx-l,.cfx .cfx-ar,.mb-tm>.mb-t,.fl-tm>.fl-tile,.fl-heat td,.fl-mini i,.br2-tile,.sp-col,.sp-half i,.pt-bc,.pt-bc .pair i,.sx-bc,.sx-bc>i,.sx-vb,.sx-vr,.sx-vb i,.fx-row,.fx-b i,.sf-mrow,.sf-track i,.hs-row,.hs-bar em,.dash-bar i,.mb-pbar i,.fl-meter i,.fl-rbar i,.cfx-card{transition:none!important}
  .cfx .cfx-on,.cfx.cfx-hot .fx-hl,.cfx.cfx-hot .sf-ring,.cfx.cfx-hot .og-ring,.cfx.cfx-hot .mb-liqdot,.cfx.cfx-hot .marketdot,.mb-tm>.mb-t:hover,.fl-tm>.fl-tile:hover,.fl-heat td:hover,.fl-mini i:hover,.br2-tile:hover,.sp-col:hover .sp-half i,.pt-bc:hover .pair i,.sx-bc:hover>i,.sx-bc:focus>i,.sx-vb:hover i,.fx-b:hover i,.sf-mrow:hover .sf-track i,.hs-row:hover .hs-bar em,.dash-sector:hover .dash-bar i,tr:hover .mb-pbar i,tr:hover .fl-meter i,tr:hover .fl-rbar i,.cfx-card:hover{translate:none!important;scale:none!important}
  .mc-tip,.mt-tip,.fx-tip,.fxq,.sf-tip,.og-tip,.sp-tip,.sx-tip,.cfx-a *{animation:none!important}
}

@media print{.cfx-a *{animation:none!important}}

/* Shared number box for SVG charts (data-tip, chart-fx.mjs, 17/11/2026): the .sx-tip look (market-home.css; light theme in
   light-theme-fixes.css), fixed to the viewport above the hovered / tapped column, fades in. */
.sx-tip.cfx-tip{display:block;position:fixed;left:0;top:0;bottom:auto;z-index:90;opacity:0;transition:opacity .16s;font-variant-numeric:tabular-nums}
.sx-tip.cfx-tip.on{opacity:1}
.sx-tip.cfx-tip em{font-style:normal}
@media(prefers-reduced-motion:reduce){.sx-tip.cfx-tip,.sx-tip.cfx-tip.on{transition:none}}
/* Cột "Xu hướng" của bảng số (mini-bars.mjs trendSVG, 19/11/2026) */
th.tr-h{text-align:center;white-space:nowrap}td.tr-c{text-align:center;padding-top:6px;padding-bottom:6px;width:110px}
.tr-svg{display:inline-block;vertical-align:middle;overflow:visible;cursor:pointer}.tr-svg .tr-old{fill:#59606b}.tr-svg .tr-last{fill:var(--gold,#ebc266)}.tr-svg .tr-neg{fill:var(--red,#e68f85)}.tr-svg .tr-nil{fill:#3a3f46}.tr-svg .tr-zero{stroke:#ffffff26;stroke-width:1}
html[data-theme="light"] .tr-svg .tr-old{fill:#c3c7cd}html[data-theme="light"] .tr-svg .tr-nil{fill:#e3e5e8}html[data-theme="light"] .tr-svg .tr-zero{stroke:#0000002e}

/* chủ dự án 19/11/2026: iPhone tự phóng to khi bấm ô nhập có chữ < 16px rồi giữ nguyên sau khi chọn mã → mọi ô nhập trên máy cảm ứng dùng 16px */
@media (hover:none) and (pointer:coarse){input,select,textarea{font-size:16px!important}}

/* 19/11/2026: đoạn giới thiệu ở đầu trang mã trên điện thoại: chữ nhỏ, màu phụ; JS cắt ~170 ký tự, Xem thêm mở Hồ sơ */
@media(max-width:620px){body .companyexcerpt{font-size:14px;line-height:1.6;color:var(--muted,#9a9a9a)}}
