/* /hero-test.css */
/* Hero tràn ngang thử nghiệm 13/10/2026 (anh Lộc: layout giống trang chủ BioGaia US). Bản 1 ảnh tĩnh, bản 2 clip.
   Chữ đặt góc dưới trái trên lớp phủ tối để mặt người ở phần trên khung không bị che. */
.hb { position: relative; display: flex; align-items: flex-end; min-height: clamp(480px, 72vh, 660px); overflow: hidden; background: #2b3a36; color: #fff; }
.hb-media, .hb-media img, .hb-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hb-media img { object-position: 60% 35%; }
.hb-media video { opacity: 0; transition: opacity .6s ease; }
.hb-media video.on { opacity: 1; }
.hb::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 28, 24, .72) 0%, rgba(12, 28, 24, .45) 38%, rgba(12, 28, 24, 0) 62%),
              linear-gradient(0deg, rgba(12, 28, 24, .55) 0%, rgba(12, 28, 24, 0) 45%); }
.hb-txt { position: relative; z-index: 1; width: 100%; padding-block: var(--g-xl, 64px) var(--g-l); }
.hb-box { max-width: 620px; }
.hb .crumbs, .hb .crumbs a, .hb .crumbs span, .hb .byline, .hb .byline a { color: rgba(255, 255, 255, .9); }
.hb h1 { color: #fff; margin: 12px 0 var(--g-s); max-width: 18ch; }
.hb .sub { margin: 0 0 var(--g-s); font-size: var(--t-lead); line-height: 1.45; color: #fff; max-width: 40ch; }
.hb .byline { margin: 0; font-size: var(--t-small); }
.hb-pause { position: absolute; z-index: 2; right: var(--gutter); bottom: var(--g-m); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(12, 28, 24, .35); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hb-pause[hidden] { display: none; }
.hb-intro { padding-block: var(--g-l); }
.hb-intro .container { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--g-l); align-items: start; }
.hb-intro .lead { margin: 0; max-width: 60ch; }
.hb-intro .quick { margin: 0; }
@media (max-width: 767px) {
  .hb { min-height: min(86vh, 620px); }
  .hb::after { background: linear-gradient(0deg, rgba(12, 28, 24, .82) 0%, rgba(12, 28, 24, .5) 42%, rgba(12, 28, 24, 0) 70%); }
  .hb-media img { object-position: 70% 30%; }
  .hb-txt { padding-block: 0 var(--g-m); }
  .hb-pause { top: var(--g-s); bottom: auto; }
  .hb-intro .container { grid-template-columns: 1fr; gap: var(--g-m); }
}
/* 14/10: bỏ khung Đọc nhanh (Phan-28), đoạn mở dưới banner còn một cột */
.hb-intro .container:not(:has(.quick)) { grid-template-columns: minmax(0, 1fr); }

/* /ux-chung.css */
/* Hiệu ứng và cách trình bày dùng chung (hướng UX anh Lộc duyệt 14/10/2026, thử trước ở trang Men vi sinh). Nạp sau hero-test.css, trước mau-b.css.
   Kèm ux-chung.js. Mẫu HTML: data-rv (hiện dần), .more-btn + .more (bấm mở), .stepper (bước nối đường mint), .pin (cuộn kể chuyện có ghim), .cmp-tabs (2 nút đổi cột).
   Anh Lộc 14/10: design đưa hết chữ ra ngoài, thiếu hiệu ứng. Mỗi khối hiện một câu chính, chi tiết mở bằng thao tác,
   phần tử hiện dần khi cuộn tới. Không ẩn chữ khi không có JS hoặc máy bật giảm chuyển động. */

/* 1 · Hiện dần khi cuộn tới (class js-rv do JS gắn, thiếu JS thì hiện ngay) */
.rv { animation: none !important; }
.js-rv [data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js-rv [data-rv].in { opacity: 1; transform: none; }
.js-rv .compare [data-rv] { transform: translateY(10px); }
.js-rv .compare dl > [data-rv]:nth-child(2) { --i: 1; } .js-rv .compare dl > [data-rv]:nth-child(3) { --i: 2; } .js-rv .compare dl > [data-rv]:nth-child(4) { --i: 3; }
/* Gạch mint dưới tiêu đề khối chạy ra khi khối hiện */
.s-head h2::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 14px; background: #6ECEB2; transform-origin: left; }
.js-rv .s-head[data-rv] h2::after { transform: scaleX(0); transition: transform .7s .25s cubic-bezier(.2, .7, .2, 1); }
.js-rv .s-head[data-rv].in h2::after { transform: scaleX(1); }
.s--mint .s-head h2::after { background: #0E0E0E; }

/* 2 · So sánh: điện thoại 2 nút, mỗi lần một cột */
.cmp-tabs { display: none; }
.cmp-more { margin: var(--g-m) 0 0; font-weight: var(--fw-medium); color: #0E0E0E; }
@media (max-width: 767px) {
  .cmp-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 var(--g-s); background: #fff; border: 1px solid #DAEDE8; }
  .cmp-tabs button { font: inherit; font-size: var(--t-small); font-weight: var(--fw-medium); min-height: 40px; padding: 0 16px; border: 0; background: none; cursor: pointer; color: #4A4A49; }
  .cmp-tabs button[aria-pressed="true"] { background: #6ECEB2; color: #0E0E0E; }
  #duong-ruot .compare > figure { display: none; }
  #duong-ruot .compare[data-k="0"] > figure:nth-child(1), #duong-ruot .compare[data-k="1"] > figure:nth-child(2) { display: block; animation: fadein .35s ease; }
}
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 3 · Cuộn kể chuyện có ghim (anh Lộc 14/10 tối): cả khung tiêu đề và hình đứng yên, chữ bên phải cuộn hết các bước rồi trang mới đi tiếp.
   Cấu trúc: .pin > .pin-in > (.s-head, .scrolly > .sc-fig + .sc-view > .sc-track > .sc-step). JS (ux-chung.js) gắn .js-pin, đặt chiều cao .pin
   theo số bước, đẩy .sc-track theo tiến độ cuộn, đổi data-state của hình theo bước đang ở giữa. Không JS hoặc giảm chuyển động thì xếp thường. */
:root { --hdr: 73px; }
.scrolly { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--g-l); align-items: center; }
.sc-fig { margin: 0; }
.sc-fig .panel svg [data-st] { display: inline !important; opacity: 0; transition: opacity .6s ease; }
.sc-fig[data-state="can"] .panel svg [data-st="can"], .sc-fig[data-state="lech"] .panel svg [data-st="lech"] { opacity: 1; }
.sc-step h3 { margin: 6px 0 10px; }
.sc-step p { margin: 0 0 10px; max-width: 46ch; }
.sc-n { font-size: var(--t-small); font-weight: var(--fw-semibold); color: #1E9C78; letter-spacing: .04em; }
.sc-step + .sc-step { margin-top: var(--g-l); }
.js-pin .pin { position: relative; }
.js-pin .pin-in { position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); display: flex; flex-direction: column; justify-content: center; padding-block: var(--g-m); box-sizing: border-box; }
.js-pin .s--pin { padding-block: 0; }
.js-pin .pin-in .s-head { margin-bottom: var(--g-m); }
.js-pin .pin-in > .container { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 0; }
.js-pin .scrolly { flex: 0 1 auto; min-height: 0; }
.js-pin .sc-fig .panel svg { max-height: calc(100vh - var(--hdr) - 260px); width: auto; max-width: 100%; display: block; margin: 0 auto; }
.js-pin .sc-view { height: 100%; max-height: 520px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.js-pin .sc-track { will-change: transform; }
.js-pin .sc-step { height: var(--sc-h, 520px); margin: 0; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .35s ease; }
.js-pin .sc-step.on { opacity: 1; }
@media (max-width: 767px) {
  :root { --hdr: 65px; }
  .scrolly { grid-template-columns: 1fr; gap: var(--g-s); }
  .js-pin .pin-in .s-head h2 { font-size: 1.375rem; }
  .js-pin .pin-in .s-head h2::after { display: none; }
  .js-pin .sc-fig .panel svg { height: 28vh; width: 100%; max-height: none; }
  .js-pin .sc-fig figcaption, .js-pin .sc-fig .key { display: none; }
  .js-pin .scrolly { display: flex; flex-direction: column; flex: 1 1 auto; }
  .js-pin .sc-view { flex: 1 1 0; min-height: 0; height: auto; max-height: none; }
}

/* 4, 5 · Thẻ: một dòng kết quả, bấm mới mở chi tiết */
.kq { font-weight: var(--fw-medium); color: #0E0E0E; }
.grp-card .kq { font-size: var(--t-body); margin: 0 0 12px; }
.more-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding: 8px 0; font: inherit; font-size: var(--t-small); font-weight: var(--fw-semibold); color: #0E0E0E; background: none; border: 0; border-bottom: 2px solid #6ECEB2; cursor: pointer; align-self: flex-start; }
.more-btn .pm { width: 16px; height: 16px; transition: transform .3s ease; }
.more-btn[aria-expanded="true"] .pm { transform: rotate(45deg); }
.more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.more > div { overflow: hidden; }
.open > .more { grid-template-rows: 1fr; }
.more-in { padding-top: 12px; font-size: var(--t-small); }
.more-in p { margin: 0 0 10px; }
.grp-card, .strain-card { transition: transform .3s ease, box-shadow .3s ease; }
@media (hover: hover) { .grp-card:hover, .strain-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(14, 14, 14, .08); } }
.strain-card { display: flex; flex-direction: column; }
.strain-card .kq { margin: 0 0 8px; }

/* 6 · Ba bước nối bằng đường mint chạy dần */
.stepper { list-style: none; margin: var(--g-m) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--g-l); position: relative; counter-reset: st; }
.stepper::before, .stepper::after { content: ""; position: absolute; top: 28px; left: 28px; right: calc(33.33% - 28px); height: 2px; background: #DAEDE8; }
.stepper::after { background: #6ECEB2; transform-origin: left; transform: scaleX(1); }
.js-rv .stepper[data-rv]::after { transform: scaleX(0); transition: transform 1.2s .3s cubic-bezier(.4, 0, .2, 1); }
.js-rv .stepper[data-rv].in::after { transform: scaleX(1); }
.js-rv .stepper[data-rv] { opacity: 1; transform: none; }
.stepper li { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; }
.stepper .ic { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2px solid #6ECEB2; display: grid; place-items: center; }
.stepper .ic svg { width: 28px; height: 28px; }
.stepper b { font-size: var(--t-card); font-weight: var(--fw-medium); color: #0E0E0E; margin-top: 8px; }
.stepper li > span:last-child { font-size: var(--t-small); max-width: 34ch; }
@media (max-width: 767px) {
  .stepper { grid-template-columns: 1fr; gap: var(--g-m); }
  .stepper::before, .stepper::after { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; }
  .stepper::after { transform-origin: top; }
  .js-rv .stepper[data-rv]::after { transform: scaleY(0); }
  .js-rv .stepper[data-rv].in::after { transform: scaleY(1); }
  .stepper li { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; }
  .stepper .ic { grid-row: span 2; }
  .stepper b { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .more, .more-btn .pm, .grp-card, .strain-card, .sc-step, .sc-fig .panel svg [data-st] { transition: none; }
}

/* Thẻ có biểu tượng: biểu tượng nằm cùng hàng với tiêu đề, không chiếm một hàng riêng (anh Lộc 14/10 tối) */
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-top .ic-sm { flex: none; margin: 0 !important; width: 44px; height: 44px; }
.card-top .ic-sm svg { width: 24px; height: 24px; }
.card-top h3 { margin: 0 !important; }

/* /mau-b.css */
/* Màu phương án B (Phan-28), anh Lộc cho thử 14/10/2026. Nạp sau cùng ở mọi trang qua tools/khung_chung.py (chuan_hoa).
   Muốn bỏ thử: xóa dòng nạp trong khung_chung.py rồi chạy lại khung_chung.py và build_demo.py.
   Trong Brand Manual: chữ chỉ dùng đen #0E0E0E, Grey 85 #4A4A49 hoặc trắng. Mint làm điểm nhấn, không làm màu chữ. */
:root { --color-text: #4A4A49; --color-text-muted: #6B6B6A; }
body { color: #4A4A49; }
h1, h2, h3, h4 { color: #0E0E0E; }
h2, h3, h4 { font-weight: 500; }
.hb h1, .hb .sub { color: #fff; }

/* Dải nền xen kẽ: xám xanh #F1F3F9 đổi sang Mint 15 */
.s--soft { background: #F0F7F7; }
.quick { background: #F0F7F7; }

/* Tab, nút lọc đang chọn: mint chữ đen thay nền đen */
.states button[aria-pressed="true"], .filters button[aria-pressed="true"], .tabs button[aria-selected="true"] {
  background: #6ECEB2; color: #0E0E0E; border-color: #6ECEB2; }

/* Lớp phủ ảnh banner nhạt bớt khoảng 20% ở mọi khổ, giữ hướng phủ riêng của từng trang */
.hb::after { opacity: .8; }

