/*
 * Giao diện trang Eliana-ASR-1.0-vi, chuyển từ style inline của bản design gốc
 * (design-source/Main.dc.html) sang class. Giá trị giữ nguyên như gốc.
 *
 * Lưu ý khi sửa:
 * - Không thêm reset `box-sizing: border-box` toàn trang: gốc dùng content-box,
 *   đổi sẽ làm lệch kích thước nút và thẻ.
 * - Link có màu riêng phải khai báo cả trạng thái :hover, vì quy tắc chung
 *   `a:hover` bên dưới có độ ưu tiên cao hơn một class đơn lẻ (ở gốc, style
 *   inline luôn thắng nên link màu riêng không đổi màu khi rê chuột).
 */

/* ---- Font tự host: Be Vietnam Pro (SIL Open Font License 1.1, xem assets/fonts/OFL.txt) ----
 * Có đủ năm độ đậm trang dùng: 400, 500, 600, 700, 800.
 * Chữ Trung dùng font hệ thống (PingFang SC, Microsoft YaHei, Noto Sans CJK SC);
 * chữ mã dùng font mono của hệ thống. */
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('assets/fonts/BeVietnamPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('assets/fonts/BeVietnamPro-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('assets/fonts/BeVietnamPro-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('assets/fonts/BeVietnamPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Be Vietnam Pro';
  src: url('assets/fonts/BeVietnamPro-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #582ACF;
  --purple-deep: #3B1A99;
  --ink: #1B0B4A;
  --red: #D7263D;
  --red-text: #B01A30;
  --lavender: #F3EFFF;
  --lilac: #E9E1FF;
  --muted: #4A4266;
  --muted-2: #5A4E85;
  --line: #E1D8FF;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- Quy tắc chung (giữ nguyên từ <helmet> của gốc) ---- */
body { margin: 0; background: var(--ink); }
html { scroll-behavior: smooth; }
a { color: var(--purple); }
a:hover { color: var(--purple-deep); }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #FFC94D; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---- Rê chuột và bấm: chuyển tiếp ~150 ms, đổi nền/độ sáng nhẹ, giữ màu thương hiệu ----
 * Hiệu ứng rê chuột chỉ áp cho thiết bị có chuột (hover: hover) để không "dính" trên màn hình cảm ứng;
 * trạng thái bấm (:active) áp cho mọi thiết bị. */
a, .btn, .seg-btn, .pill-link, .nav-link {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, filter .15s ease,
    transform .15s ease, text-decoration-color .15s ease;
}
.btn:active:not(:disabled), .seg-btn:active, .pill-link:active { transform: translateY(1px); filter: brightness(.95); }
.btn:disabled { opacity: .5; cursor: default; }

@keyframes eliana-wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes eliana-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes eliana-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes eliana-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes eliana-glow { 0%, 100% { opacity: 0; transform: scale(.85); } 50% { opacity: .9; transform: scale(1.05); } }
.el-bar { transform-origin: center; animation: eliana-wave 1.1s ease-in-out infinite; animation-play-state: var(--play, running); }
.el-dot { animation: eliana-pulse 1.4s ease-in-out infinite; }
.el-caret { animation: eliana-blink 1s steps(1) infinite; }
/* Giảm chuyển động: tắt mọi hoạt cảnh và chuyển tiếp (kể cả hiệu ứng khi cuộn, mèo nhấp nhô,
   thẻ nhô lên, thanh benchmark chạy dài); app.js cũng không thêm class ẩn nào trong trường hợp này. */
@media (prefers-reduced-motion: reduce) {
  .el-bar, .el-dot, .el-caret, .mascot-wrap, .mascot-glow { animation: none !important; }
  .mascot-glow { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.mono { font-family: var(--mono); }

.page {
  font-family: 'Be Vietnam Pro', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  line-height: 1.55;
}

/* ---- Nút dạng "segmented" (ngôn ngữ, chế độ, tab) ---- */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
.seg--lang { background: var(--purple-deep); }
.seg--soft { background: #F1ECFF; }
.seg--white { background: #FFFFFF; }

.seg-btn {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
}
.seg-btn--lang { min-width: 52px; padding: 0 14px; color: #FFFFFF; }
.seg-btn--lang[aria-pressed="true"] { background: #FFFFFF; color: var(--purple-deep); }
.seg-btn--mode { padding: 0 16px; color: var(--purple-deep); }
.seg-btn--bench { padding: 0 18px; color: var(--purple-deep); }
.seg-btn--code { padding: 0 16px; border-radius: 10px; color: #D9CEFF; }
.seg-btn--mode[aria-pressed="true"],
.seg-btn--bench[aria-pressed="true"],
.seg-btn--code[aria-pressed="true"] { background: var(--purple); color: #FFFFFF; }

/* ---- Nút thường ---- */
.btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.btn--outline { border: 2px solid var(--purple); background: #FFFFFF; color: var(--purple); }
.btn--solid { border: 0; background: var(--purple); color: #FFFFFF; }
.btn--wide { padding: 0 18px; }
@media (hover: hover) {
  .btn--outline:hover:not(:disabled) { background: #F1ECFF; }
  .btn--solid:hover { background: var(--purple-deep); }
  .seg-btn--lang[aria-pressed="false"]:hover { background: rgba(255, 255, 255, 0.16); }
  .seg-btn--mode[aria-pressed="false"]:hover,
  .seg-btn--bench[aria-pressed="false"]:hover { background: rgba(88, 42, 207, 0.1); }
  .seg-btn--code[aria-pressed="false"]:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
  .seg-btn[aria-pressed="true"]:hover { filter: brightness(1.08); }
}

/* ---- Link dạng viên thuốc (CTA) ---- */
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.pill-link--light, .pill-link--light:hover { background: #FFFFFF; color: var(--purple-deep); }
.pill-link--ghost, .pill-link--ghost:hover { border: 2px solid #FFFFFF; color: #FFFFFF; }
.pill-link--red, .pill-link--red:hover { align-self: flex-start; background: var(--red); color: #FFFFFF; }
@media (hover: hover) {
  .pill-link--light:hover { background: #F1ECFF; }
  .pill-link--ghost:hover { background: rgba(255, 255, 255, 0.14); }
  .pill-link--red:hover { background: #BE1F34; }
  .nav-link:hover { background: rgba(255, 255, 255, 0.14); }
  /* Link chữ thường: gạch chân đậm hơn khi rê chuột. */
  a:not(.pill-link):not(.nav-link):not(.brand):hover { text-decoration-thickness: 2px; }
}

/* ---- Header + hero ---- */
.site-header { background: var(--purple); color: #FFFFFF; }
.topbar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}
.brand, .brand:hover { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #FFFFFF; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.nav-link, .nav-link:hover { color: #FFFFFF; text-decoration: none; font-size: 15px; font-weight: 500; padding: 12px 12px; border-radius: 999px; }

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 48px 56px;
  align-items: end;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; align-self: center; }
.eyebrow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.model-chip { font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 8px; background: #FFFFFF; color: var(--purple); }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--lilac); }
.hero-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--lilac); max-width: 34em; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-facts {
  list-style: none;
  margin: 12px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid #8E6BE8;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
}
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact-value { font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.fact-label { font-size: 14px; color: var(--lilac); }

/* ---- Khung ví dụ nhận dạng ---- */
.hero-demo-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
/* Khung bọc mèo: nhấp nhô chậm 5 px. Mèo chồng xuống mép khung ví dụ 9 px nên khi nhô lên
   chân vẫn chạm khung (khung ví dụ vẽ đè lên vì đứng sau trong DOM và có position). */
.mascot-wrap {
  position: relative;
  width: min(330px, 72%);
  margin-bottom: -9px;
  animation: eliana-bob 4.5s ease-in-out infinite;
}
/* Hai vạch vàng trên đầu mèo nằm sẵn trong ảnh, không tách được; thay vào đó là quầng sáng vàng
   đặt đúng chỗ hai vạch, nhấp nháy theo nhịp khi khung ví dụ đang nghe. */
.mascot-glow {
  position: absolute;
  left: 76%;
  top: 6%;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 102, 0.75) 0%, rgba(255, 214, 102, 0.3) 45%, rgba(255, 214, 102, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.mascot-wrap.is-listening .mascot-glow { animation: eliana-glow 1.1s ease-in-out infinite; }
.mascot {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.demo-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  color: var(--ink);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 24px 0 -8px var(--purple-deep), 0 30px 60px rgba(20, 6, 70, 0.45);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.demo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.demo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red-text);
}
.el-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.wave { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px; }
.wave .el-bar { flex: 1 1 0; min-width: 2px; border-radius: 3px; }
.transcript-box {
  min-height: 124px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #F7F4FF;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
}
#demo-meter { white-space: nowrap; }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--purple); width: 0; }
.transcript { margin: 0; font-size: 19px; line-height: 1.45; font-weight: 500; text-wrap: pretty; }
/* Lớp ẩn (câu dài nhất) và lớp chữ thật nằm chồng trong cùng một ô lưới: khung luôn cao bằng
   câu dài nhất ở mọi bề rộng màn hình, nên không nhảy bố cục khi chữ dài ra rồi quay về đầu. */
.transcript-stack { display: grid; }
.transcript-stack > .transcript { grid-area: 1 / 1; }
.transcript-sizer { visibility: hidden; }
.transcript-placeholder { color: #9A8FC4; font-style: italic; font-weight: 400; }
.transcript-partial { color: #6B5BB0; }
.el-caret {
  display: inline-block;
  width: 3px;
  height: 22px;
  margin-left: 3px;
  vertical-align: -3px;
  background: var(--red);
}
.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.demo-note { margin: 0; flex: 1 1 220px; font-size: 14px; color: var(--muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-disclaimer { margin: 0; padding-top: 14px; border-top: 1px dashed #CFC3F5; font-size: 13px; color: var(--muted-2); }

/* ---- Khung chung của các section ---- */
.section--white { background: #FFFFFF; }
.section--lavender { background: var(--lavender); }
.section--ink { background: var(--ink); color: #FFFFFF; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 96px 24px; }
.section-inner--highlights { padding: 112px 24px 96px; display: flex; flex-direction: column; gap: 48px; }
.section-inner--bench { display: flex; flex-direction: column; gap: 32px; }
.section-inner--quickstart {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 56px;
  align-items: start;
}
/* Cột mã rộng hơn cột chữ để dòng from_pretrained(...) không bị cắt trên màn hình rộng. */
@media (min-width: 960px) {
  .section-inner--quickstart { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.section-inner--family { display: flex; flex-direction: column; gap: 40px; }
.section-inner--license { display: flex; flex-direction: column; gap: 24px; }

.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.section-head--narrow { max-width: 680px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-text); }
.kicker--pink { color: #FF9AA6; }
.kicker--inherit { color: inherit; }
.section-title {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-title--tight { line-height: 1.12; }
.section-sub { margin: 0; font-size: 16px; color: var(--muted); }
.section-sub--on-dark { color: #D9CEFF; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
/* Họ model chỉ có hai thẻ: hai cột bằng nhau trên màn hình rộng, một cột trên điện thoại. */
.cards-grid--two { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
/* Họ model có ba thẻ: ba cột trên màn hình rộng, xếp dọc trên màn hình hẹp. */
.cards-grid--three { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cards-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Thẻ nhô lên nhẹ khi rê chuột (chỉ thiết bị có chuột). */
.hi-card, .fam-card { transition: transform .2s ease, box-shadow .2s ease; }
@media (hover: hover) {
  .hi-card:hover, .fam-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(27, 11, 74, 0.14); }
}

/* Section hiện dần khi cuộn tới. Class .reveal chỉ do app.js thêm (khi có IntersectionObserver và
   không bật giảm chuyển động), nên tắt JS thì nội dung vẫn hiện bình thường. */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; }
.reveal.is-revealed { opacity: 1; transform: none; }

/* ---- Điểm nổi bật ---- */
.hi-card { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 22px; }
.hi-card--purple { background: var(--purple); color: #FFFFFF; }
.hi-card--soft { background: var(--lavender); }
.hi-card--red { background: var(--red); color: #FFFFFF; }
.hi-big { font-variant-numeric: tabular-nums; font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.hi-card--soft .hi-big { color: var(--purple); }
/* Hai số (offline / streaming) trên một dòng: chữ nhỏ hơn một chút để vừa thẻ hẹp. */
.hi-big--pair { font-size: clamp(32px, 3.2vw, 40px); white-space: nowrap; }
.hi-title { margin: 8px 0 0; font-size: 20px; line-height: 1.25; font-weight: 700; }
.hi-body { margin: 0; font-size: 16px; }
.hi-card--purple .hi-body { color: var(--lilac); }
.hi-card--soft .hi-body { color: var(--muted); }
.hi-card--red .hi-body { color: #FFFFFF; }
.hi-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.hi-tag { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: #FFFFFF; color: var(--purple-deep); }
.hi-link, .hi-link:hover { margin-top: auto; padding-top: 12px; color: #FFFFFF; font-size: 15px; font-weight: 700; }

/* ---- Video giới thiệu (chỉ hiện khi có file media/eliana-demo.mp4) ---- */
.video-slot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 22px; background: var(--ink); }
.video-caption { font-size: 14px; color: var(--muted); }

/* ---- Benchmark ---- */
.bench-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.bench-lead { margin: 4px 0 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.3; font-weight: 800; color: var(--red-text); text-wrap: balance; }
.bench-summary { margin: 0; font-size: 17px; font-weight: 500; color: var(--ink); }
.bench-testsets { margin: 2px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.bench-testsets-label { font-weight: 700; color: var(--purple); }
.bench-testsets-label::after { content: ': '; }
.bench-chips { list-style: none; margin: 0; padding: 0; display: inline; }
.bench-chip { display: inline; font-weight: 600; }
.bench-chip + .bench-chip::before { content: ' · '; font-weight: 400; color: var(--muted); }
.bench-card { background: #FFFFFF; border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Bảng rộng hơn khung (điện thoại) thì cuộn ngang trong khung này, không tràn trang. */
.bench-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bench-scroll:focus-visible { outline: 3px solid #FFC94D; outline-offset: 3px; }
.bench-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bench-table--class { min-width: 720px; }
.bench-table--all { min-width: 640px; }
.bench-table--sets { min-width: 1000px; }
.bench-table th, .bench-table td { padding: 12px 10px; text-align: left; vertical-align: middle; }
/* Chỉ cột tên model sát mép trái; ô đầu của hàng tiêu đề thứ hai là cột số, giữ đệm của nó. */
.bench-table .bench-name-col { padding-left: 0; }
.bench-table th:last-child, .bench-table td:last-child { padding-right: 0; }
.bench-table thead th {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  vertical-align: bottom;
}
.bench-table thead tr:last-child th { border-bottom: 1px solid var(--line); }
.bench-table thead th[rowspan] { border-bottom: 1px solid var(--line); }
.bench-group { text-align: center !important; border-bottom: 2px solid #E9E1FF; padding-bottom: 6px !important; }
.bench-head-sub th { padding-top: 6px; text-transform: none !important; letter-spacing: 0 !important; font-size: 14px !important; }
.bench-row th, .bench-row td { border-bottom: 1px solid #F1ECFF; }
/* Cột tên dính bên trái khi cuộn ngang; nền phải đặc để không lộ cột phía sau. */
.bench-name-col { position: sticky; left: 0; z-index: 1; background: #FFFFFF; min-width: 150px; font-weight: 400; }
/* Độ rộng cột: phần lớn dành cho thanh WER để khác biệt giữa các model dễ thấy. */
.bench-table--class .bench-name-col { width: 30%; }
.bench-table--class .bench-cell { width: 27%; }
.bench-table--all .bench-name-col { width: 30%; }
.bench-table--all .bench-cell { width: 31%; }
.bench-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.bench-name { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; color: var(--ink); }
a.bench-name { color: var(--purple); }
.bench-dagger { font-weight: 700; color: var(--muted-2); cursor: help; }
.bench-mark { font-size: 13px; font-weight: 800; color: var(--purple); cursor: help; }
.bench-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  background: #F1ECFF;
  color: var(--purple-deep);
}
.bench-overlap, .bench-sub { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted-2); overflow-wrap: anywhere; }
.bench-meta-inline { display: none; }
.bench-meta-col { white-space: nowrap; font-size: 14px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
/* Hàng Eliana: nền đỏ nhạt, chữ đậm, thanh đỏ thương hiệu. */
.bench-row--eliana th, .bench-row--eliana td { background: #FFF0F2; }
.bench-row--eliana .bench-name { font-weight: 800; color: var(--red-text); }
.bench-row--eliana .bench-meta-col { color: var(--ink); font-weight: 700; }
.bench-cell { min-width: 140px; }
/* Ô WER: số trước (căn phải, rộng cố định) rồi tới thanh của chính nó, cách 9 px. */
.bench-cell-in { display: grid; grid-template-columns: 6ch minmax(32px, 1fr); align-items: center; gap: 9px; }
/* Ranh giới giữa các cột số liệu: đệm trái và đường kẻ dọc mảnh; đầu một khối (Offline ở tab 1,
   Nhóm B ở tab "Từng tập") có đường kẻ đậm hơn. Tiêu đề cột căn trái, trùng mép với ô số. */
.bench-table .bench-cell,
.bench-table--class .bench-col, .bench-table--all .bench-col,
.bench-table--class .bench-group, .bench-table--all .bench-group { padding-left: 22px; border-left: 1px solid var(--line); }
.bench-table .bench-group-start { border-left: 2px solid #C9B8FA; }
.bench-track { height: 22px; border-radius: 5px; background: #F7F4FF; overflow: hidden; }
.bench-bar { height: 100%; max-width: 100%; border-radius: 5px; background: #A995EE; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
/* Giá trị vượt thang: thanh đầy khung, đầu thanh có vạch chéo báo hiệu bị cắt. */
.bench-bar--clipped {
  border-radius: 5px 0 0 5px;
  background-image: repeating-linear-gradient(-60deg, transparent 0 5px, rgba(255, 255, 255, 0.85) 5px 8px);
  background-size: 18px 100%;
  background-position: right center;
  background-repeat: no-repeat;
}
.bench-row--eliana .bench-bar { background-color: var(--red); }
.bench-wer { text-align: right; font-family: var(--mono); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.bench-row--eliana .bench-wer { color: var(--red-text); }
/* ---- Tab "Từng tập": bảng số, không thanh ---- */
.bench-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 10px; }
.seg-btn--small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.bench-sets-note { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.bench-table--sets th, .bench-table--sets td { padding: 10px 5px; }
.bench-table--sets .bench-name-col { width: 175px; min-width: 160px; }
.bench-table--sets .bench-col { white-space: normal; text-align: right; font-size: 12px !important; line-height: 1.25; min-width: 58px; }
.bench-table--sets .bench-group { font-size: 12px; }
.bench-table--sets .bench-group-start { padding-left: 14px; }
.bench-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.bench-cell-dagger { margin-left: 1px; font-size: 11px; font-weight: 700; color: var(--muted-2); cursor: help; vertical-align: super; line-height: 0; }
/* Hai cột trung bình: nền nhẹ, chữ đậm. */
.bench-table .bench-avg { background: #F7F4FF; font-weight: 800; }
.bench-row--eliana .bench-num { color: var(--red-text); font-weight: 700; }
.bench-row--eliana .bench-avg { background: #FFE3E8; }
/* Ô thấp nhất của cột trong phạm vi đang xem: chữ đậm, nền vàng nhạt (màu nhấn). */
.bench-table td.bench-best { background: #FFEDB3; font-weight: 800; }
.bench-more {
  align-self: center;
  margin-top: 14px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid var(--purple);
  background: #FFFFFF;
  color: var(--purple);
  font-size: 15px;
  font-weight: 700;
}
@media (hover: hover) { .bench-more:hover { background: var(--purple); color: #FFFFFF; } }
.bench-foot { margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.bench-foot p { margin: 0; font-size: 14px; color: var(--muted); }
.bench-foot .bench-eval-note { font-style: italic; }
/* Chú thích riêng của tab có thể nhiều dòng (\n trong content.js), mỗi ý một dòng. */
#bench-legend { white-space: pre-line; }
@media (max-width: 640px) {
  .bench-card { padding: 20px 16px; }
  .bench-name-col { min-width: 132px; box-shadow: 1px 0 0 var(--line); }
  .bench-table--class .bench-name-col, .bench-table--all .bench-name-col { width: 140px; }
  .bench-table th, .bench-table td { padding: 10px 6px; }
  .bench-cell { min-width: 120px; }
  /* Ẩn cột Tham số / Đoạn, hiện dưới tên model để số WER vào ngay khung nhìn đầu tiên. */
  .bench-table .bench-meta-col { display: none; }
  .bench-meta-inline { display: block; }
  .bench-table--class { min-width: 500px; }
  .bench-table--all { min-width: 500px; }
  .bench-cell-in { grid-template-columns: 6ch minmax(28px, 1fr); gap: 8px; }
  .bench-table .bench-cell, .bench-table--class .bench-col, .bench-table--all .bench-col,
  .bench-table--class .bench-group, .bench-table--all .bench-group { padding-left: 14px; }
  .bench-table--sets .bench-name-col { width: 140px; }
  .bench-wer { font-size: 14px; }
}
/* Khung giới thiệu vi-asr-bench: nền trắng, viền tím nhạt, nút GitHub bên phải (xuống dòng khi hẹp). */
.bench-tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  padding: 22px 28px;
  border-radius: 18px;
  border: 2px solid #C9B8FA;
  background: #FFFFFF;
}
.bench-tool-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bench-tool-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; color: var(--ink); }
.bench-tool-body { margin: 0; font-size: 15px; color: var(--muted); }
.bench-tool-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--purple);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.bench-tool-link:hover { color: #FFFFFF; }
@media (hover: hover) { .bench-tool-link:hover { background: var(--purple-deep); } }
@media (max-width: 640px) { .bench-tool { padding: 18px 20px; } }
.repro { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.repro-item { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.repro-label { font-weight: 700; }
.repro-link { font-size: 14px; padding: 12px 0; overflow-wrap: anywhere; }

/* ---- Cách dùng ---- */
.quick-copy { display: flex; flex-direction: column; gap: 20px; }
.hf-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 14px; background: #2A1569; }
.hf-box-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hf-box-label { font-size: 13px; font-weight: 600; color: #D9CEFF; }
.hf-box-id { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.quick-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.quick-link, .quick-link:hover { display: inline-block; padding: 10px 0; font-size: 15px; font-weight: 600; color: #D9CEFF; }
.quick-link:hover { color: #FFFFFF; }
.code-panel { min-width: 0; border-radius: 18px; background: #110633; border: 1px solid #3B2A7A; overflow: hidden; }
.code-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #3B2A7A;
}
.code-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
/* Nút sao chép chỉ có biểu tượng, trên nền tối (repo ID, lệnh cài đặt, đoạn mã). */
.icon-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #B9A9F0;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.icon-btn .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .ico-done, .icon-btn.is-copied .ico-copy { display: none; }
.icon-btn.is-copied .ico-done { display: block; }
.icon-btn.is-copied { color: #7EE2A8; }
.icon-btn:focus-visible { outline: 2px solid #D9CEFF; outline-offset: 2px; }
@media (hover: hover) {
  .icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
}
/* Khối mã/BibTeX có cột riêng bên phải cho nút sao chép: phần chữ cuộn ngang trong cột trái nên không bao giờ bị nút che. */
.code-body { display: flex; align-items: flex-start; }
.code-body > .code-scroll, .code-body > .bib-scroll { flex: 1 1 auto; min-width: 0; }
.icon-btn--float { margin: 8px 8px 0 0; }
.bib-body { border-radius: 14px; background: #F7F4FF; }
.icon-btn--light { color: var(--purple); background: #F7F4FF; }
.icon-btn--light.is-copied { color: #1F8A4C; }
.icon-btn--light:focus-visible { outline-color: var(--purple); }
@media (hover: hover) {
  .icon-btn--light:hover { background: #E9E2FF; color: var(--purple-deep); }
}
.cmd-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 20px;
  border-bottom: 1px solid #3B2A7A;
  background: #170A42;
}
.cmd-text { min-width: 0; font-size: 14px; color: #EDE8FF; overflow-wrap: anywhere; }
/* Dấu nhắc lệnh chỉ để nhìn: nằm trong ::before nên không bị bôi đen hay sao chép. */
.cmd-text::before { content: '$ '; color: #8E7BE0; }
.code-scroll { overflow-x: auto; }
.code-pre { margin: 0; padding: 22px 12px 22px 20px; font-size: 14px; line-height: 1.7; color: #EDE8FF; white-space: pre; }
.code-note { margin: 0; padding: 14px 22px; border-top: 1px solid #3B2A7A; font-size: 13px; color: #B9A9F0; }

/* ---- Họ model ---- */
.fam-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 22px; }
.fam-card--released { border: 2px solid var(--purple); background: #FFFFFF; }
.fam-card--planned { border: 2px dashed #B9A9F0; background: #FBFAFF; }
.fam-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fam-thumb { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; }
.fam-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--lilac);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fam-status { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--lilac); color: var(--purple-deep); }
.fam-status--released { background: var(--purple); color: #FFFFFF; }
.fam-title { margin: 8px 0 0; font-size: 19px; font-weight: 700; }
.fam-body { margin: 0; font-size: 16px; color: var(--muted); }
.fam-link { margin-top: auto; padding-top: 12px; font-size: 15px; font-weight: 700; }

/* ---- Giấy phép, trích dẫn, liên hệ ---- */
.license-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 24px 48px;
  align-items: center;
  padding: 40px;
  border-radius: 22px;
  background: var(--red);
  color: #FFFFFF;
}
.license-head { display: flex; flex-direction: column; gap: 10px; }
.license-text { display: flex; flex-direction: column; gap: 12px; }
.license-body { margin: 0; font-size: 17px; }
.license-terms { margin: 0; font-size: 15px; font-weight: 700; }
.license-link, .license-link:hover { color: #FFFFFF; }
.license-scope { font-weight: 400; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.info-card { min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: 22px; background: #FFFFFF; }
.info-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.info-body { margin: 0; font-size: 16px; color: var(--muted); }
.bib-scroll { overflow-x: auto; }
.bib-pre { margin: 0; padding: 18px 12px 18px 20px; font-size: 13.5px; line-height: 1.7; color: var(--ink); white-space: pre; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.contact-label { font-size: 15px; font-weight: 700; }
.contact-link { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #D9CEFF; }
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.footer-name { font-size: 15px; font-weight: 700; color: #FFFFFF; }
.footer-license, .footer-copy { font-size: 14px; }

/* ---- Điện thoại (≤ 640 px) ---- */
@media (max-width: 640px) {
  /* Thanh trên: logo và bộ chọn ngôn ngữ cùng hàng 1, menu xuống hàng 2. */
  .topbar { padding: 14px 18px; gap: 8px 12px; }
  /* Menu một hàng; chữ dài hơn bề ngang (en, zh) thì vuốt ngang. */
  .main-nav { order: 3; flex-wrap: nowrap; width: calc(100% + 20px); margin: 0 -10px; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link, .nav-link:hover { flex: none; padding: 12px 6px; font-size: 13.5px; white-space: nowrap; }
  .hero { padding: 24px 18px 64px; gap: 40px; }
  /* Mèo nhỏ lại để khung ví dụ hiện sớm hơn. */
  .mascot-wrap { width: min(200px, 52%); }
  .demo-card { padding: 18px; }
  .section-inner, .section-inner--highlights { padding: 56px 18px; }
  .license-banner { padding: 28px 22px; }
  .info-card { padding: 24px 20px; }
  .hi-card { padding: 26px 22px; }
}

/* Tên tác giả ở chân trang dẫn tới trang cá nhân. */
.footer-author, .footer-author:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .footer-author:hover { color: #FFFFFF; } }

/* Màn rộng (hai cột): phần đầu trang phải nằm gọn trong một màn hình laptop, kể cả dòng ghi chú
   dưới khung ví dụ. Khung ví dụ cao gần 550 px, nên mèo co theo chiều cao cửa sổ: nhỏ nhất 150 px
   ở màn khoảng 790 px, đủ 330 px từ khoảng 970 px trở lên. */
@media (min-width: 960px) {
  .hero { padding-top: 8px; }
  .hero-demo-col .mascot-wrap { width: min(clamp(150px, calc(100svh - 640px), 330px), 72%); }
}
@media (min-width: 960px) and (max-height: 920px) {
  .demo-card { gap: 14px; padding: 20px 22px; }
  .transcript-box { min-height: 104px; }
}
