/* =========================================================
   Phương Nguyễn Advisor — styles
   Design tokens theo CLAUDE.md §3
   ========================================================= */
:root {
  --bg: #F4F2ED;
  --surface: #FFFFFF;
  --surface-muted: #ECE9E3;
  --border: #DAD6CE;
  --rule: #8F8B84;
  --text: #111111;
  --text-muted: #6E6A63;
  --inverse-bg: #161616;
  --inverse-text: #F4F2ED;
  --inverse-muted: #9A978F;
  --inverse-line: #2C2C2C;  /* đường kẻ trên nền tối */

  --brand: #0E1A33;
  --brand-text: #FFFFFF;
  --brand-blue: #1F5FD1;
  --heading: #07327F;   /* xanh navy lấy từ logo (mặt đậm của chữ P) — màu tiêu đề lớn */
  --brand-gold: #C9962B;
  --brand-gold-lt: #E9C46A;
  --accent: #22C55E;

  --up: #16A34A;
  --down: #DC2626;

  --flow-1: #1E7A46;
  --flow-2: #2FA35F;
  --flow-3: #6CC28E;

  --font: "Be Vietnam Pro", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1240px;
  --gutter: 32px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
.tnum, [data-count], .kpi__value, .band__num, .change { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 99px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typography helpers ---------- */
.eyebrow, .label, .watch__label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.4;
}
.eyebrow--dark, .watch__label { color: var(--heading); }
/* Tiêu đề phụ & chữ số nổi bật: xanh navy của logo (--heading), giống tiêu đề chính */
.eyebrow { color: var(--heading); }
.card h3, .method__step h3, .certs strong,
.kpi__value, .daily__stat b, .foreign__split b, .flow__list b:not(.change--up):not(.change--down),
.rank li b, .impact__list li > b, .dist__col b, .mtable tbody th:not([class]) { color: var(--heading); }
.meta { font-size: 11px; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.note { font-size: 12px; color: var(--text-muted); }
.tag {
  display: inline-block; padding: 1px 8px; border: 1px solid var(--border); border-radius: 99px;
  font-size: 10px; letter-spacing: .04em; color: var(--text-muted); background: var(--surface);
}
.change { font-size: 12px; font-weight: 600; }
.change--up { color: var(--up); }
.change--down { color: var(--down); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--text);
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.btn--primary:hover { background: #1b2b50; box-shadow: 0 6px 18px -8px rgba(14,26,51,.6); }
.btn--secondary { background: transparent; color: var(--text); border-color: #2a2a2a; }
.btn--secondary:hover { background: var(--text); color: var(--bg); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: 10px; }
.btn--xs { min-height: 32px; padding: 0 14px; font-size: 9.5px; }
.btn--block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 50%; background: transparent; transition: border-color .2s;
}
.btn-icon:hover { border-color: var(--text); }
.btn-icon svg, .fab svg, .lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.link-ghost {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.link-ghost:hover { background-size: 100% 1px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo img { height: 42px; width: auto; }
.btn-icon--zalo {
  width: auto; padding: 0 12px; border-radius: 999px; text-decoration: none;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #0068FF; border-color: #BFD5FF;
}
.btn-icon--zalo:hover { border-color: #0068FF; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.contact-direct { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.contact-direct__links { display: flex; gap: 10px; flex-wrap: wrap; }
.meta a { color: var(--text); }
.nav { display: flex; gap: 24px; margin-right: auto; }
.nav a { white-space: nowrap; }
.nav a {
  font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  text-decoration: none; padding-block: 8px; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--brand-gold);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--text); transition: transform .3s var(--ease); }
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { padding: 8px var(--gutter) 24px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu nav { display: grid; margin-bottom: 16px; }
.mobile-menu nav a {
  padding: 14px 0; border-bottom: 1px solid var(--border); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.mobile-menu .btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 56px; align-items: center; padding-top: 12px; padding-bottom: 36px;
}
.hero__content { display: flex; flex-direction: column; justify-content: center; padding-block: 24px; }
.hero__title {
  font-size: clamp(36px, 5.2vw, 76px); font-weight: 700; line-height: 1.02; letter-spacing: -.04em; white-space: nowrap;
  margin: 18px 0 22px; padding-top: .06em; color: var(--heading);
}
.hero__lead { max-width: 520px; color: var(--text-muted); font-size: 14.5px; }
.hero__lead strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__media {
  position: relative; margin: 0; border-radius: 4px; overflow: hidden; background: #e9e8e6;
  aspect-ratio: 1 / 1; align-self: start;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero__media figcaption {
  position: absolute; inset: auto 0 0 0; padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(10,10,10,.82), rgba(10,10,10,0));
  color: #fff; display: grid; gap: 2px;
}
.hero__media figcaption span { font-size: 10.5px; opacity: .8; }
.hero__media figcaption strong { font-size: 13px; font-weight: 700; }

/* ---------- KPI row ---------- */
.kpi { padding-top: 8px; padding-bottom: 40px; }
.kpi__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.kpi__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.kpi__item { padding: 18px 20px 22px; border-right: 1px solid var(--border); display: grid; gap: 6px; align-content: start; }
.kpi__item:first-child { padding-left: 0; }
.kpi__item:last-child { border-right: 0; }
.kpi__value { font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi__value small { font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.kpi__value--text { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.kpi .link-ghost { margin-top: 18px; }

/* ---------- Generic section ---------- */
.section { padding-top: 0; padding-bottom: 64px; }
.section__head {
  position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding-top: 18px; margin-bottom: 22px;
}
.section__head::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--rule);
  transform-origin: left;
}
.section__head h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; margin-top: 8px; color: var(--heading); }

/* ---------- Biểu đồ VN-Index + khối ngoại ---------- */
:root { --chart-line: #F59E0B; --ceiling: #A855F7; --floor: #06B6D4; --floor-text: #0D0D0D; }
.market { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 32px; }
.chart-card { background: var(--inverse-bg); color: var(--inverse-text); border-radius: 12px; padding: 22px 22px 14px; }
.chart-card .label { color: var(--inverse-muted); }
.chart-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-card__value { font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.chart-card__value .change { font-size: 12px; font-weight: 600; margin-left: 6px; letter-spacing: 0; }
.chart-card .change--up { color: #22C55E; }
.chart-card .change--down { color: #EF4444; }
.tabs { display: inline-flex; gap: 4px; background: #222; padding: 4px; border-radius: 999px; }
.tabs button {
  min-width: 44px; min-height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--inverse-muted);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; cursor: pointer; transition: background .2s, color .2s;
}
.tabs button[aria-selected="true"] { background: #3a3a3a; color: #fff; }
.tabs button:hover { color: #fff; }
.chart { position: relative; height: 300px; padding-right: 0; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.chart .grid { stroke: var(--inverse-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .cursor { stroke: #777; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--chart-line); stroke: var(--inverse-bg); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart__y span, .chart__x span { position: absolute; font-size: 10.5px; color: var(--inverse-muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.chart__y span { right: 0; transform: translateY(-50%); }
.chart__x span { bottom: 0; transform: translateX(-50%); white-space: nowrap; }
.chart__x span:first-child { transform: none; }
.chart__x span:last-child { transform: translateX(-100%); }
.chart__empty { color: var(--inverse-muted); font-size: 13px; padding-top: 120px; text-align: center; }
.chart__tip { min-height: 20px; font-size: 12px; color: var(--inverse-muted); font-variant-numeric: tabular-nums; }
.foreign { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.foreign__net { font-size: clamp(32px, 3.4vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; }
.foreign__net small { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.foreign__net.change--up { color: var(--up); }
.foreign__net.change--down { color: var(--down); }
.foreign__split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 10px 0 6px; }
.foreign__split > div { padding: 10px 0; display: grid; gap: 2px; }
.foreign__split > div + div { border-left: 1px solid var(--border); padding-left: 16px; }
.foreign__split b { font-size: 15px; font-variant-numeric: tabular-nums; }
.foreign__lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
.rank { list-style: none; margin: 6px 0 0; padding: 0; }
.rank li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.rank li span.change--up { color: var(--up); }
.rank li span.change--down { color: var(--down); }
.foreign__note { font-size: 11px; color: var(--text-muted); margin-top: 10px; }

/* ---------- Top tăng / giảm ---------- */
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.movers__col { border-top: 1px solid var(--border); padding-top: 12px; }
.mtable { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mtable th, .mtable td { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; text-align: right; }
.mtable thead th { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 8px 0; }
.mtable th:first-child, .mtable td:first-child { text-align: left; }
.mtable tbody th { font-weight: 700; }
.mtable tbody tr { transition: background .2s; }
.mtable tbody tr:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.mtable .change--up { color: var(--up); }
.mtable .change--down { color: var(--down); }
.mtable .is-ceiling { color: var(--ceiling); }
.mtable .is-floor { color: var(--floor); }
.pill { display: inline-block; min-width: 72px; padding: 3px 10px; border-radius: 999px; color: #fff !important; font-weight: 600; font-size: 12px; text-align: center; }
.pill.change--up { background: var(--up); }
.pill.change--down { background: var(--down); }
.pill.is-ceiling { background: var(--ceiling); }
.pill.is-floor { background: var(--floor); }

/* Đường biểu đồ vẽ dần khi cuộn tới */
.js .chart-card .line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.js .chart-card.is-in .line, .js .chart.is-drawn .line { stroke-dashoffset: 0; }
.js .chart-card .area { opacity: 0; transition: opacity .8s ease .9s; }
.js .chart-card.is-in .area, .js .chart.is-drawn .area { opacity: 1; }

/* ---------- Báo cáo ngày ---------- */
.daily__headline { font-size: 15px; font-weight: 600; line-height: 1.5; padding: 12px 0; color: var(--heading); }
.daily__stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.daily__stat { display: grid; gap: 2px; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); }
.daily__stat:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--border); }
.daily__stat b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.daily__stat .change { font-size: 12px; }
.daily__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; }
.daily__time { font-size: 11.5px; }
.daily .btn--xs { min-height: 40px; padding: 0 16px; }

.report {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 16px;
  background: var(--bg); color: var(--text); box-shadow: 0 24px 80px -20px rgba(0,0,0,.45);
}
.report::backdrop { background: rgba(10,10,12,.55); backdrop-filter: blur(3px); }
.report[open] { display: flex; flex-direction: column; animation: report-in .35s var(--ease); }
@keyframes report-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.report__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg); }
.report__bar .btn-icon { width: 44px; height: 44px; font-size: 16px; cursor: pointer; }
.report__body { overflow-y: auto; padding: 24px 28px 32px; }
.report__head { padding-bottom: 18px; border-bottom: 2px solid var(--rule); margin-bottom: 8px; }
.report__head h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.02em; color: var(--heading); margin-bottom: 6px; }
.report__headline { font-size: 15px; font-weight: 600; margin-top: 10px; }
.report section { padding: 18px 0 6px; border-bottom: 1px solid var(--border); }
.report h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); margin-bottom: 10px; }
.report ul, .report ol { margin: 0 0 10px; padding-left: 20px; }
.report li { font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.report__table { overflow-x: auto; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.report table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.report th, .report td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.report thead th { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.report tbody th { font-weight: 600; white-space: nowrap; }
.report td.muted { font-size: 12px; }
.report__sources li { font-size: 12.5px; }
.report__sources a { color: var(--brand-blue); }
.report__notes li { font-size: 12.5px; color: var(--text-muted); }
.report__disclaimer { font-size: 12px; color: var(--text-muted); padding-top: 16px; }
@media (max-width: 640px) {
  .report { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .report__body { padding: 18px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { .report[open] { animation: none; } }

/* ---------- Việc cần xem ---------- */
.watch { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.watch__col { border-top: 1px solid var(--border); padding-top: 12px; }
.watch__row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.ticker { font-weight: 700; font-size: 13px; color: var(--up); min-width: 44px; }
.ticker--gold { color: var(--brand-gold); }
.blur { filter: blur(4px); user-select: none; }
.lock { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12.5px; grid-column: 1 / 3; }
.watch__topic { text-decoration: none; font-weight: 500; }
.watch__topic:hover { text-decoration: underline; }
.watch__note { font-size: 12.5px; color: var(--text-muted); padding-top: 12px; }
.watch__note strong { color: var(--text); }

/* ---------- Cards (dịch vụ) ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.card { padding: 18px 22px 20px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; transition: background .25s; }
.card:first-child { padding-left: 0; }
.card:last-child { border-right: 0; }
.card:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.card__num { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--text-muted); }
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.card p:not(.card__num) { font-size: 13px; color: var(--text-muted); line-height: 1.55; flex-grow: 1; }
.card .link-ghost { align-self: flex-start; margin-top: 6px; }

/* ---------- Dòng tiền ngành ---------- */
.flow { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.flow__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.flow__list li {
  display: grid; grid-template-columns: 22px minmax(120px, 1.1fr) 1.2fr 32px; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.flow__i { font-size: 11px; color: var(--text-muted); }
.flow__name { font-weight: 500; }
.flow__name small { font-size: 11px; font-weight: 600; margin-left: 6px; }
.flow__name small.change--up { color: var(--up); }
.flow__name small.change--down { color: var(--down); }
.tag--live { color: var(--brand-gold); border-color: var(--brand-gold); margin-left: 4px; }
.flow__list b { text-align: right; font-weight: 700; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--c); border-radius: inherit; transform-origin: left; }
.flow__aside { display: grid; gap: 22px; justify-items: start; padding-top: 4px; }
.flow__aside p { font-size: 13.5px; color: var(--text-muted); max-width: 520px; }
.flow__aside strong { color: var(--text); }

/* ---------- Về tôi ---------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; }
.about__method, .about__certs { border-top: 1px solid var(--border); padding-top: 12px; }
.method { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.method__step { padding: 14px 20px 6px; border-right: 1px solid var(--border); display: grid; gap: 8px; align-content: start; }
.method__step:first-child { padding-left: 0; }
.method__step:last-child { border-right: 0; }
.method__step .card__num { color: var(--brand-gold); font-weight: 700; }
.method__step h3 { font-size: 15px; font-weight: 700; }
.method__step p { font-size: 13px; color: var(--text-muted); }
.certs { list-style: none; margin: 0; padding: 0; }
.certs li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cert__icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-gold-lt); font-size: 12px; font-weight: 700;
}
.certs strong { display: block; font-size: 14px; font-weight: 700; }
.certs span:not(.cert__icon) { font-size: 12px; color: var(--text-muted); }

/* ---------- Video ---------- */
.videos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.video { text-decoration: none; display: grid; gap: 10px; align-content: start; }
.video__thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-muted); }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.video:hover .video__thumb img { transform: scale(1.04); }
.video__play {
  position: absolute; left: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(14,26,51,.88);
}
.video__play::after { content: ""; position: absolute; left: 13px; top: 10px; border: 7px solid transparent; border-left: 11px solid #fff; border-right: 0; }
.video__title { font-size: 13.5px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video:hover .video__title { text-decoration: underline; }

/* ---------- Dark band ---------- */
.band { background: var(--inverse-bg); color: var(--inverse-text); padding-top: 56px; margin-top: 24px; }
.band h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 36px; }
.band__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--inverse-line); }
.band__grid > div { padding: 26px 28px 8px; border-right: 1px solid var(--inverse-line); }
.band__grid > div:first-child { padding-left: 0; }
.band__grid > div:last-child { border-right: 0; }
.band__num { font-size: clamp(44px, 5.4vw, 68px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 14px; }
.band__num--up { color: var(--accent); }
.band__grid p:not(.band__num) { font-size: 12.5px; color: var(--inverse-muted); max-width: 300px; }
.band__grid strong { color: var(--inverse-text); }
.band__foot { font-size: 11px; color: #77756f; padding: 24px 0 40px; }
.band__cta {
  display: flex; justify-content: space-between; align-items: center; text-decoration: none;
  padding-block: 26px; border-top: 1px solid var(--inverse-line);
  font-size: clamp(15px, 1.6vw, 19px); font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.band__cta:hover span:last-child { transform: translateY(3px); }
.band__cta span:last-child { transition: transform .25s var(--ease); }

/* ---------- Form ---------- */
.form-wrap { padding-top: 36px; padding-bottom: 88px; }
.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field input, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 18px; font-size: 16px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border: 1px solid var(--border); border-radius: 999px; transition: border-color .2s, background .2s;
}
.field textarea { border-radius: 14px; resize: vertical; min-height: 110px; background: var(--surface); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); background: var(--surface); }
.field input::placeholder, .field textarea::placeholder { color: #a7a39b; font-size: 13px; }
.field.is-invalid input { border-color: var(--down); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.check { display: inline-flex; gap: 10px; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; min-height: 32px; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.check--consent { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12.5px; color: var(--text-muted); align-items: flex-start; max-width: 560px; }
.check--consent input { margin-top: 3px; flex-shrink: 0; }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__msg { font-size: 13px; min-height: 1em; }
.form__msg.is-ok { color: var(--up); }
.form__msg.is-err { color: var(--down); }

/* ---------- Footer ---------- */
.footer { background: var(--inverse-bg); color: var(--inverse-muted); padding: 40px 0 36px; font-size: 12px; }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--inverse-line); margin-bottom: 18px; }
.footer__logo { height: 44px; width: auto; }
.footer__social { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__social a { color: var(--inverse-text); text-decoration: none; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding-block: 8px; }
.footer__social a:hover { color: var(--brand-gold-lt); }
.footer__line { color: var(--inverse-text); margin-bottom: 6px; }
.footer__line a { text-decoration: none; font-weight: 600; }
.footer__legal { font-size: 11px; line-height: 1.6; max-width: 900px; }
.footer__legal a { color: var(--inverse-text); }

/* ---------- Floating contact ---------- */
.fab-group { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab--zalo b { font-size: 11px; font-weight: 800; letter-spacing: 0; text-transform: none; display: none; }
.fab {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  background: var(--brand); color: #fff; border-radius: 999px; text-decoration: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.55);
  transition: transform .25s var(--ease);
}
.fab:hover { transform: translateY(-2px); }
.fab.fab--zalo { background: #0068FF; }

/* =========================================================
   Dữ liệu Yuanta Việt Nam (assets/yuanta-data.js)
   ========================================================= */
.tag--preview { color: var(--brand-blue); border-color: var(--brand-blue); margin-left: 4px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; background: #3a3a3a; }
.badge.change--up { background: var(--up); color: #fff; }
.badge.change--down { background: var(--down); color: #fff; }

/* Ticker bar chỉ số (mẫu 2) — cuộn ngang bằng tay, không tự chạy */
.tickerbar { background: var(--inverse-bg); color: var(--inverse-text); }
.tickerbar__inner { display: flex; align-items: center; gap: 24px; min-height: 40px; }
.tickerbar__list {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.tickerbar__list::-webkit-scrollbar { display: none; }
.tickerbar__list li { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; padding: 8px 0; scroll-snap-align: start; }
.tickerbar__name { color: var(--inverse-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tickerbar__src { flex-shrink: 0; font-size: 10.5px; color: var(--inverse-muted); }

/* Chỉ báo kỹ thuật dưới biểu đồ */
.tech { border-top: 1px solid var(--inverse-line); margin-top: 10px; padding-top: 12px; }
.tech__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px 16px; margin: 8px 0 0; }
.tech__grid div { display: grid; gap: 2px; }
.tech__grid dt { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--inverse-muted); }
.tech__grid dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tech__note { font-size: 10.5px; color: var(--inverse-muted); margin-top: 10px; }

/* Khối ngoại 20 phiên — cột lên (mua ròng) / xuống (bán ròng) quanh trục giữa */
.fbars { margin: 8px 0 4px; }
.fbars__plot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 96px; margin-top: 8px; position: relative; }
.fbars__plot::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--border); }
.fbars__bar { position: relative; height: 100%; }
.fbars__bar i { position: absolute; left: 0; right: 0; height: calc(var(--h) * 50%); border-radius: 2px; }
.fbars__bar.is-up i { bottom: 50%; background: var(--up); transform-origin: bottom; }
.fbars__bar.is-down i { top: 50%; background: var(--down); transform-origin: top; }
.fbars__axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.note .change--up, .foreign .note b.change--up { color: var(--up); }
.note .change--down, .foreign .note b.change--down { color: var(--down); }

/* Mã nâng đỡ / đè chỉ số + phân bố tăng giảm */
.impact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.impact__col { border-top: 1px solid var(--border); padding-top: 12px; display: grid; gap: 10px; align-content: start; }
.impact__list { list-style: none; margin: 0; padding: 0; }
.impact__list li { display: grid; grid-template-columns: 52px 1fr 60px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.impact__list li > span:last-child { text-align: right; font-weight: 600; }
.dbar { display: block; position: relative; height: 8px; }
.dbar::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; border-left: 1px solid var(--rule); }
.dbar i { position: absolute; top: 0; bottom: 0; width: calc(var(--v) * 50%); border-radius: 2px; }
.dbar.is-up i { left: 50%; background: var(--up); transform-origin: left; }
.dbar.is-down i { right: 50%; background: var(--down); transform-origin: right; }
.dist { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; align-items: end; height: 190px; }
.dist__col { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; height: 100%; text-align: center; font-variant-numeric: tabular-nums; }
.dist__col b { font-size: 12px; }
.dist__bar { position: relative; }
.dist__bar i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--h) * 100%); min-height: 2px; border-radius: 3px 3px 0 0; transform-origin: bottom; background: var(--rule); }
.dist__col.is-up i { background: var(--up); }
.dist__col.is-down i { background: var(--down); }
.dist__lbl { font-size: 10px; color: var(--text-muted); line-height: 1.25; }

/* Dòng tiền ngành (Yuanta): hàng có dòng phụ GTGD · P/E · P/B · mã dẫn dắt */
.flow__main { min-width: 0; }
.flow__list li.flow__row { grid-template-columns: 22px minmax(150px, 1.3fr) 1fr 64px; }
.flow__list .flow__row b { font-size: 13px; }
.flow__list .flow__row b.change--up { color: var(--up); }
.flow__list .flow__row b.change--down { color: var(--down); }
.flow__name small.flow__meta { display: block; margin: 3px 0 0; font-size: 11px; font-weight: 400; color: var(--text-muted); line-height: 1.45; }
.flow__more { margin-top: 4px; }
.flow__more summary { cursor: pointer; list-style: none; min-height: 44px; display: flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.flow__more summary::-webkit-details-marker { display: none; }
.flow__more summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.flow__more[open] summary span { display: inline-block; transform: rotate(90deg); }
.flow__more .flow__list { border-top: 0; }
.flow__more .bar i { transform: none; }
.hot { width: 100%; border-top: 1px solid var(--border); padding-top: 12px; }
.hot ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hot li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.5; }
.hot__stocks { font-size: 12px; font-variant-numeric: tabular-nums; }
.hot .change--up { color: var(--up); }
.hot .change--down { color: var(--down); }
.hot .note { margin-top: 8px; }

.js .fbars__bar i, .js .dist__bar i { transform: scaleY(0); transition: transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 40ms + 150ms); }
.js .is-in .fbars__bar i, .js .is-in .dist__bar i, .js [data-reveal].is-in .fbars__bar i { transform: scaleY(1); }
.js .dbar i { transform: scaleX(0); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 200ms); }
.js .is-in .dbar i { transform: scaleX(1); }

/* ---------- Bản đồ nhiệt VN100 ---------- */
.heat__meta { margin: -8px 0 18px; }
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.heat__group { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.heat__name { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); }
.heat__name span { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.heat__name .change--up { color: var(--up); }
.heat__name .change--down { color: var(--down); }
.heat__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; }
.hm { display: grid; place-items: center; align-content: center; min-height: 48px; padding: 4px 2px; border-radius: 6px; text-align: center; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hm b { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.hm span { font-size: 10.5px; }
.hm--0 { background: var(--surface-muted); color: var(--text); }
.hm--u1 { background: color-mix(in srgb, var(--up) 30%, var(--surface)); color: var(--text); }
.hm--u2 { background: color-mix(in srgb, var(--up) 70%, var(--surface)); color: #fff; }
.hm--u3 { background: var(--up); color: #fff; }
.hm--d1 { background: color-mix(in srgb, var(--down) 30%, var(--surface)); color: var(--text); }
.hm--d2 { background: color-mix(in srgb, var(--down) 70%, var(--surface)); color: #fff; }
.hm--d3 { background: var(--down); color: #fff; }
.hm--ceil { background: var(--ceiling); color: #fff; }
.hm--floor { background: var(--floor); color: var(--floor-text); }
.heat__legend { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.heat__legend li { display: inline-flex; align-items: center; gap: 6px; }
.heat__legend .hm { display: inline-block; min-height: 0; width: 14px; height: 14px; padding: 0; border-radius: 3px; }
.heat__more { display: none; }
@media (max-width: 640px) {
  .heat { grid-template-columns: 1fr; gap: 12px; }
  .heat:not(.is-open) > .heat__group:nth-child(n+7) { display: none; }
  .heat__more { display: flex; width: 100%; justify-content: center; margin-top: 12px; }
  .heat__tiles { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
}

/* =========================================================
   Scroll animations (CLAUDE.md — Quy tắc bắt buộc #3)
   Chỉ ẩn khi có JS; reduced-motion hiển thị ngay.
   ========================================================= */
.js [data-reveal], .js [data-stagger] > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal="fade"] { transform: scale(.98); }
.js [data-reveal].is-in, .js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js .section__head::before { transform: scaleX(0); transition: transform .9s var(--ease); }
.js .section__head.is-in::before { transform: scaleX(1); }
.js .bar i { transform: scaleX(0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms + 200ms); }
.js .is-in .bar i { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .chart-card .line, .js .chart-card .area { stroke-dashoffset: 0 !important; opacity: 1 !important; transition: none !important; }
  .js [data-reveal], .js [data-stagger] > *, .js .section__head::before, .js .bar i {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* =========================================================
   Responsive (mobile-first fallbacks)
   ========================================================= */
@media (max-width: 1480px) {
  .hide-sm { display: none; }   /* nút số điện thoại dạng chữ — vẫn còn nút icon gọi + nút nổi */
}
@media (max-width: 1240px) {
  .nav { gap: 18px; }
  .nav a { font-size: 10.5px; }
}
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  .nav { display: none; }
  .burger { display: block; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero__media { width: 100%; aspect-ratio: 4 / 3; }
  .hero__media img { object-position: 50% 22%; }
  .kpi__grid { grid-template-columns: 1fr 1fr; }
  .kpi__item { padding-left: 20px; border-bottom: 1px solid var(--border); }
  .kpi__item:nth-child(odd) { padding-left: 0; }
  .kpi__item:nth-child(2n) { border-right: 0; }
  .kpi__item:nth-child(n+3) { border-bottom: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card:nth-child(odd) { padding-left: 0; }
  .card:nth-child(2n) { border-right: 0; }
  .card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .card:nth-child(3) { padding-left: 0; }
  .watch, .flow, .about, .market, .movers, .impact { grid-template-columns: 1fr; gap: 32px; }
  .tech__grid { grid-template-columns: repeat(3, 1fr); }
  .tickerbar__src { display: none; }
  .chart { height: 240px; }
  .videos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero__title { font-size: clamp(34px, 10.4vw, 46px); }
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .hide-xs { display: none; }
  .header__inner { height: 60px; gap: 12px; }
  .hero { padding-top: 12px; }
  .hero__cta .btn { width: 100%; }
  .kpi__item { padding: 14px 12px 16px; }
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(n) { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .card:last-child { border-bottom: 0; }
  .method { grid-template-columns: 1fr; }
  .method__step, .method__step:first-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--border); }
  .flow__list li { grid-template-columns: 18px minmax(0, 1fr) 30px; row-gap: 8px; }
  .flow__list .bar { grid-column: 2 / 4; grid-row: 2; }
  .flow__list b { grid-row: 1; grid-column: 3; }
  .flow__list li.flow__row { grid-template-columns: 18px minmax(0, 1fr) 64px; }
  .tickerbar__list { gap: 22px; }
  .dist { gap: 3px; height: 170px; }
  .dist__lbl { font-size: 9px; }
  .impact__list li { grid-template-columns: 48px 1fr 56px; }
  .videos { grid-template-columns: 1fr; }
  .band { padding-top: 44px; }
  .band__grid { grid-template-columns: 1fr; }
  .band__grid > div, .band__grid > div:first-child { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--inverse-line); }
  .band__grid > div:last-child { border-bottom: 0; }
  .form__row { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .watch__row { gap: 12px; }
  .hero__media { aspect-ratio: 1 / 1; }
  .fab span { display: none; }
  .fab--zalo b { display: inline; }
  .fab-group { right: 16px; bottom: 16px; }
  .fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .fab svg { width: 20px; height: 20px; }
  .logo img { height: 38px; }
  .header__actions { gap: 6px; }
  .btn-icon--zalo { display: none; }
}
