:root {
  color-scheme: light;
  /* Design tokens — the SAME set as the Space (client/src/theme.css),
 * aligned 2026-11-20: layered surfaces (bg → surface → surface-2),
 * one accent, a fixed status palette, radius 8 controls / 12 cards.
 * The font stacks are NOT touched here (Be Vietnam Pro + Noto Serif
 * via SITE_FONT_LINKS, live since 2026-11-19).
 * UI/UX FIX ROUND (2026-11-20, audit CAO-02/TB-01/TB-02/TB-05/TB-09):
 * --accent-text is the accent darkened for SMALL TEXT on the light
 * scheme (#c2410c = 5.18:1 on white, AA for <14px text; --accent
 * itself stays for borders/fills). --title-card-lead/row pin the
 * editorial serif card-title sizes as tokens. Motion durations
 * come from the MOTION.md scale (fast 120ms / base 180ms). */
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --text: #1a1710;
  --dim: #6f6a5e;
  --border: #e0dacb;
  --accent: #d9480f;
  --accent-text: #c2410c;
  --accent-soft: #fdf0e9;
  --giveaway: #2f7d4f;
  --giveaway-soft: #ecf5ef;
  --deal: #2456a6;
  --deal-soft: #ecf1fa;
  --ai: #0f766e;
  --ai-soft: #e6f4f1;
  --radius: 12px;
  --radius-sm: 8px;
  --ok: #2f7d4f;
  --ok-soft: #ecf5ef;
  --warn: #9a6a00;
  --warn-soft: #faf1da;
  --danger: #b3261e;
  --danger-soft: #fbeae8;
  --info: #2456a6;
  --info-soft: #ecf1fa;
  --title-card-lead: 26px;
  --title-card-row: 19px;
  --motion-fast: 120ms;
  --motion-base: 180ms;
  --serif: "Noto Serif", Georgia, serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100e0b;
  --surface: #1a1712;
  --surface-2: #23201a;
  --text: #ece7dd;
  --dim: #a39a8a;
  --border: #35302a;
  --accent: #ff8a5c;
  --accent-text: #ff8a5c;
  --accent-soft: #2e2019;
  --giveaway: #6fce93;
  --giveaway-soft: #1c2b21;
  --deal: #84a9e8;
  --deal-soft: #1d2739;
  --ai: #5eead4;
  --ai-soft: #17302c;
  --ok: #6fce93;
  --ok-soft: #1c2b21;
  --warn: #e8c268;
  --warn-soft: #2e2716;
  --danger: #f0938a;
  --danger-soft: #331d1a;
  --info: #84a9e8;
  --info-soft: #1d2739;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #100e0b;
    --surface: #1a1712;
    --surface-2: #23201a;
    --text: #ece7dd;
    --dim: #a39a8a;
    --border: #35302a;
    --accent: #ff8a5c;
    --accent-text: #ff8a5c;
    --accent-soft: #2e2019;
    --giveaway: #6fce93;
    --giveaway-soft: #1c2b21;
    --deal: #84a9e8;
    --deal-soft: #1d2739;
    --ai: #5eead4;
    --ai-soft: #17302c;
    --ok: #6fce93;
    --ok-soft: #1c2b21;
    --warn: #e8c268;
    --warn-soft: #2e2716;
    --danger: #f0938a;
    --danger-soft: #331d1a;
    --info: #84a9e8;
    --info-soft: #1d2739;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "Be Vietnam Pro",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  margin: 0;
  background: var(--tg-theme-bg-color, var(--bg));
  color: var(--tg-theme-text-color, var(--text));
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
@media (min-width: 1100px) {
  main {
    max-width: 1400px;
  }
}
a,
button {
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (pointer: coarse) {
  .langbtn,
  .themebtn,
  .readbtn,
  .groupnav a,
  .article-actions a,
  .article-actions button,
  header.site nav a,
  footer.site a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
a {
  color: var(--deal);
}
header.site {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}
header.site .brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
header.site a.brand:hover {
  color: var(--accent-text);
}
header.site .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex: none;
  display: block;
}
header.site nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}
header.site nav a {
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 999px;
}
header.site nav a:hover {
  background: var(--accent-soft);
}
.rule {
  border-bottom: 4px double var(--tg-theme-text-color, var(--text));
  margin-bottom: 8px;
}
.langbar {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.langbar .lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--dim);
}
/* ONE CHIP SPEC (UI/UX fix round 2026-11-20, audit CAO-02/TB-02):
 * every pill on the site — region chip, offer-kind chip, hashtag,
 * group nav, language switch, status badge — shares ONE geometry:
 * 28px visual height, 12px font, 4px 12px padding, 999px radius.
 * Variants differ ONLY in semantic color. Clickable display chips
 * (.tag) keep the 28px shape and reach the 44px touch target via
 * an invisible ::after hit area; REAL controls (language switch,
 * group nav, read button, article actions, header/footer links)
 * take a real min-height:44px on coarse pointers instead — the
 * coarse rule above names controls only, never content chips. */
.langbtn,
.themebtn,
.groupnav a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
}
.langbtn,
.themebtn {
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
}
.themebar {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
/* THEME DROPDOWN (Thanh 2026-11-20 17:47 — "dạng dropdown hoặc
 * switch thay vì 3 nút"): the three theme buttons are now ONE
 * dropdown. The button face shows the CURRENT mode (icon +
 * label), switched purely by CSS from html[data-theme], so it
 * is already correct before any JS runs; the menu carries the
 * three choices as menuitemradio with a visible check on the
 * active one (also CSS-driven from html[data-theme], with
 * aria-checked synced by the theme scripts). Every interactive
 * part is a real 44px touch target; open/close motion is
 * transform + opacity only, within the motion token, and the
 * global reduced-motion rule above collapses it. The theme
 * logic behind the control is UNCHANGED (bt-theme key, system
 * default, early anti-flash bootstrap, live OS-scheme follow). */
.themedd {
  position: relative;
  display: inline-flex;
}
.themedd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.themedd-btn:hover {
  background: var(--accent-soft);
}
.themedd-btn .td-ic,
.themedd-btn .td-lb {
  display: none;
  align-items: center;
  gap: 6px;
}
html[data-theme="light"] .themedd-btn .td-light {
  display: inline-flex;
}
html[data-theme="dark"] .themedd-btn .td-dark {
  display: inline-flex;
}
html[data-theme="system"] .themedd-btn .td-system {
  display: inline-flex;
}
.themedd-btn .td-chev {
  display: inline-flex;
  transition: transform var(--motion-fast) ease;
}
.themedd-btn[aria-expanded="true"] .td-chev {
  transform: rotate(180deg);
}
.themedd-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 200px;
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}
.themedd-menu.open {
  opacity: 1;
  transform: none;
}
.themedd-menu[hidden] {
  display: none;
}
.themedd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tg-theme-text-color, var(--text));
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
}
.themedd-item:hover,
.themedd-item:focus-visible {
  background: var(--accent-soft);
}
.themedd-item .td-check {
  margin-left: auto;
  opacity: 0;
  display: inline-flex;
}
html[data-theme="light"] .themedd-item[data-theme-set="light"] .td-check {
  opacity: 1;
}
html[data-theme="dark"] .themedd-item[data-theme-set="dark"] .td-check {
  opacity: 1;
}
html[data-theme="system"] .themedd-item[data-theme-set="system"] .td-check {
  opacity: 1;
}
/* Language flags (Thanh 2026-11-20 17:48): 18×12 (3:2) inline
 * SVG flags beside the language labels, softly rounded,
 * vertically centered with the label text; the buttons keep
 * their existing geometry and 44px coarse-pointer target. */
.langbtn {
  gap: 6px;
}
.flag {
  display: inline-flex;
  border-radius: 3px;
  overflow: hidden;
  flex: none;
  line-height: 0;
}
.flag svg {
  display: block;
}
/* MASTHEAD CONTROL ROW — ONE FIXED HEIGHT SPEC (Thanh
 * 2026-11-20 18:15, screenshot: the row rendered "nút to nút
 * nhỏ"): the two language buttons ([data-lang-set]) and the
 * theme dropdown button ([data-themedd-btn]) share ONE
 * geometry — the same fixed height, padding and line-height —
 * and every icon sits in a fixed, flex-centered, flex:none
 * box (flag 18×12, theme icon 18×18, chevron 16×16), so icon
 * content can never inflate one button over its neighbours:
 * the three render at one height BY CONSTRUCTION. Before this
 * rule the language buttons took the 28px chip height from
 * the shared chip rule while the theme button carried
 * min-height:44px — two heights in one row. This rule sits
 * after both source rules and wins the cascade for the three
 * masthead controls only (.themebtn and .groupnav a keep the
 * chip geometry). Acceptance is by rendered offsetHeight of
 * all three buttons, recorded as QA-1004. */
.langbtn,
.themedd-btn {
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  line-height: 1;
}
.flag {
  width: 18px;
  height: 12px;
  align-items: center;
  justify-content: center;
}
.themedd-btn .td-ic {
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.themedd-btn .td-chev {
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.groupnav a {
  color: var(--tg-theme-text-color, var(--text));
}
.langbtn:hover,
.themebtn:hover,
.groupnav a:hover {
  background: var(--accent-soft);
}
.langbtn[aria-pressed="true"],
.themebtn[aria-pressed="true"] {
  background: var(--tg-theme-text-color, var(--text));
  color: var(--tg-theme-bg-color, var(--bg));
  border-color: transparent;
}
.lei,
.le {
  display: none;
}
html[data-lang="en"] .lei {
  display: inline;
}
html[data-lang="en"] .le {
  display: block;
}
html[data-lang="en"] .lvi,
html[data-lang="en"] .lv {
  display: none;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  margin: 16px 0 0;
}
h1.date {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 0;
}
h1.page {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 16px 0 4px;
}
.counts {
  font-size: 14px;
  color: var(--dim);
  margin: 8px 0 0;
  font-variant-numeric: tabular-nums;
}
.hotband {
  margin-top: 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  padding: 16px;
}
/* HEAD DE-CLUTTER (Thanh 2026-11-20 17:01 — "hơi loạn thông
 * tin"): the two stacked head bands repeated every title at
 * full length with an identical group + region chip row under
 * each, and the TOC then repeated the same titles a third
 * time. Presentation only — same bands, same members, same
 * order: (1) the SECURITY PRIORITY band becomes a compact
 * list: titles shortened at string level to at most 2 lines
 * (bandShortTitle, word-boundary — never CSS line-clamp), the
 * .hb-meta chip row is GONE inside this band, and each item
 * carries at most one badge (the article's own HOT badge);
 * tighter padding on the spacing scale. (2) the FEATURED band
 * becomes small cover cards reusing the card component's
 * 16:9 frame rule, serif title type and HOT badge. Head
 * rhythm on the 4/8/12/16/24/32 scale: bands sit 16px apart,
 * group sections keep their 32px. */
.hotband.secband {
  padding: 12px 16px;
}
.secband ol {
  margin-top: 8px;
}
.secband li {
  padding: 2px 0;
}
.secband .hb-title a {
  font-size: 15px;
  line-height: 1.5;
}
.secband .hb-badge {
  flex: none;
  margin-left: 8px;
}
/* BAND RESTYLE (Thanh 2026-11-20 17:24 — "Tin mới nhất và Bảo mật
 * ưu tiên UI vẫn chưa ổn"): (1) SECURITY band drops the duplicated
 * label pill (icon + title is the ONE block label), sits on the
 * standard surface with a thin accent bar at the left instead of
 * the big cream wash, rows are split by hairlines, titles may run
 * to TWO lines ending at a word boundary (string shortening at
 * BAND_TITLE_MAX + a 2-line clamp guard), and the HOT badge is the
 * site's standard small badge in a fixed slot after the title.
 * (2) LATEST band also sits on the standard surface; every meta
 * part (group, region, date) is the SAME small chip; each row
 * carries a 16:9 thumbnail at the left as its visual anchor
 * (72x41 fixed at this restyle; superseded 2026-11-21 by the
 * COMPACT ROW STANDARD below — content-derived height — and
 * again 2026-11-21 19:58 by the FIXED BOX below: a uniform
 * 120px × 67.5px thumb on every row at every width).
 * Both bands now share tokens + the 4/8 spacing rhythm with the
 * featured cards and group cards below. */
.secband,
.latband {
  background: var(--surface);
  border: 1px solid var(--border);
}
.secband {
  border-left: 3px solid var(--accent);
}
.secband li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.secband li:last-child {
  border-bottom: none;
}
.secband .hb-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.latband li.lat-li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-rows: minmax(39.5px, auto) 28px;
  column-gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.latband li.lat-li:last-child {
  border-bottom: none;
}
.latband .hb-thumb {
  grid-row: 1/3;
  width: 120px;
  height: 67.5px;
  justify-self: start;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}
.latband .hb-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}
.latband .lat-main {
  grid-column: 2;
  min-width: 0;
}
.latband .hb-meta {
  grid-column: 2;
  margin-top: 4px;
}
.hb-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--dim);
  white-space: nowrap;
  flex: none;
}
/* COMPACT ROW STANDARD (Thanh 2026-11-21 — his screenshot of the
 * Latest band on mobile showed all four defects at once): the
 * compact row (Latest band here; the Space's Latest band is the
 * reference surface and carries the same rules) — (1) the row
 * title is NEVER underlined at rest (it is a link, but the
 * underline is gone; hover may underline, like card titles);
 * (2) the title clamps to at most 2 lines, the ellipsis landing
 * at the end of line two at a word boundary, and the full-title
 * tooltip is set by SITE_COMPACT_SCRIPT ONLY when the rendered
 * title is actually truncated (measured), so it inherits the
 * browser's ~0.5s hover-intent delay and never appears for a
 * title that fits; (3) NO repeated per-row decorative icon —
 * the clock lives only in the band heading; (4) the meta row is
 * exactly ONE row: nowrap, the group chip alone may shrink with
 * an ellipsis while the region + date chips are unshrinkable
 * and never drop to a second line; and the thumbnail box
 * is FIXED AND UNIFORM — 120px × 67.5px (16:9) at EVERY
 * width on every row (FIXED BOX, Thanh 2026-11-21 19:58,
 * superseding the earlier content-derived height, under
 * which one-line-title rows measured narrower — 84.6×47.6
 * live — than two-line rows at 119.4×67.2 in the same
 * strip): the first grid track is a fixed 120px, the
 * .hb-thumb box carries explicit width:120px;height:67.5px,
 * and the row tracks floor at minmax(39.5px,auto) 28px so
 * a one-line row grows to fit the box. PHÌNH BÌA FIX
 * (Thanh 2026-11-21 17:56): the grid
 * item is a WRAPPER box (.hb-thumb span), never the img
 * itself — an img as the grid item feeds its intrinsic
 * width (900–2400px once loaded) into the auto column
 * track and balloons the row, crushing the text column
 * to ~0. The img inside is position:absolute
 * inset:0 object-fit:cover, so it never participates in
 * track sizing at all. ROW PIN (2026-11-21 18:49): one
 * disagreement survived that fix — at desktop widths Chrome
 * sizes a TWO-line-title row's tracks from the clamped
 * title's one-line height while the stretched thumb takes
 * the true height, so the thumb overshot the row's bottom
 * and painted over the title's first characters (BT-307,
 * measured live). SITE_COMPACT_SCRIPT's fit() now pins each
 * row's gridTemplateRows to the measured title height +
 * 28px, the Space LatestRow mechanism; see its docblock.
 * The row therefore uses the compact title slot
 * (14px / 1.4) and a compact meta chip (24px, 11px): with
 * the standard 16px title and 28px chips, a 390px row
 * leaves only ~170px for the meta and the group chip
 * collapsed to an empty circle in the Space's 2026-11-21
 * audit capture; the compact sizes keep all three chips
 * on the one row, the group chip ellipsizing only when
 * its label is genuinely too long for the column. */
.hotband.latband .hb-title {
  display: block;
}
.latband .hb-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
}
.latband .hb-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
.hotband.latband .hb-meta {
  flex-wrap: nowrap;
  gap: 6px;
}
.latband .hb-chip {
  height: 24px;
  font-size: 11px;
  padding: 2px 10px;
}
.latband .hb-chip {
  min-width: 0;
  overflow: hidden;
}
.latband .hb-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.latband .hb-chip:nth-child(2),
.latband .hb-chip:nth-child(3) {
  flex: none;
}
/* FEATURED SLIDER (Thanh 2026-11-20 17:20): the featured band is a
 * horizontal snap slider — same cards, same members, same order;
 * only the track scrolls (internally), the page never gains a
 * horizontal scrollbar. Prev/Next buttons step one card, disable
 * at the ends, and reduced motion makes steps instant (the SITE
 * script switches scroll behavior). */
.fb-nav {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}
.fb-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.fb-nav button:disabled {
  opacity: 0.4;
  cursor: default;
}
.fb-nav button:hover:not(:disabled) {
  background: var(--accent-soft);
}
.fb-cards {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.fb-cards::-webkit-scrollbar {
  display: none;
}
.fb-card {
  flex: 0 0 218px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
}
@media (max-width: 640px) {
  .fb-card {
    flex-basis: min(64vw, 218px);
  }
}
.fb-card figure {
  margin: 0;
}
.fb-card .badges {
  margin: 8px 0 0;
}
.fb-card h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 8px 0 0;
}
.fb-card h3 a {
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
}
.fb-card h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
/* HEAD-BAND HEADER (Thanh's screenshot 2026-11-20 15:41): the
 * band label pill used to SHRINK inside this flex row and wrap
 * its own text ("BẢO MẬT ƯU / TIÊN"), squeezing the band title
 * and breaking the header at phone widths. The pill is now an
 * unshrinkable one-line unit (nowrap + flex:none on the shared
 * pill rules below) and the header wraps DELIBERATELY: when
 * pill + title no longer fit one row (360px), the title drops
 * to its own full row under the pill instead of being crushed. */
.hotband .hb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
}
.hotband h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.hotband h2 svg {
  vertical-align: -3px;
}
.hotband ol {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.hotband li {
  padding: 4px 0;
}
.hotband li a {
  color: var(--tg-theme-text-color, var(--text));
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
/* BAND ITEM TITLE + META (same screenshot): the title line is
 * a flex row whose icon is the ONE band icon size (16px),
 * centered on the first title line (16px text at 1.5 line
 * height = a 24px line box, so a 4px top offset) — the same
 * icon+text alignment mechanism as the shared chip spec. The
 * meta (group label, region pill, action/time chip) is its OWN
 * row under the title, wrapping only at component boundaries:
 * every component is nowrap, so a label can never break
 * mid-word ("CÔNG" / "NGHỆ & DEV") again. */
.hotband .hb-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.hotband .hb-title > svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
}
.hotband .hb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.hotband .hb-cat {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  white-space: nowrap;
}
.hotband .hb-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--tg-theme-bg-color, var(--bg));
  border-radius: 999px;
  height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
  white-space: nowrap;
  flex: none;
}
.hotband .hb-note {
  font-size: 13px;
  color: var(--dim);
  margin: 8px 0 0;
}
.b-pin,
.b-sec,
.b-lat,
.b-hot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex: none;
}
.b-pin {
  background: #b3261e;
  color: #fff;
}
.b-sec {
  background: #8a5a00;
  color: #fff;
}
.b-lat {
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  border: 1px solid var(--border);
  color: var(--dim);
}
section.group {
  margin-top: 32px;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 2px solid var(--tg-theme-text-color, var(--text));
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.sec-head .cnt {
  font-size: 13px;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  position: relative;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 24px rgba(26, 23, 16, 0.12);
  opacity: 0;
  transition: opacity var(--motion-fast) ease;
  pointer-events: none;
}
@media (hover: hover) {
  .card:hover::after {
    opacity: 1;
  }
}
.card figure {
  margin: 0 0 8px;
}
article.read figure {
  margin: 16px 0;
}
.card figure img,
.hero img,
.fb-card figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.hero img {
  aspect-ratio: 16/9;
}
/* Cover render — FINAL standard (Thanh's ruling 2026-11-20
 * 16:28, recorded in the Frontend Design System skill,
 * pillar 2): every cover on the web — card images and the
 * article hero alike — sits in a FIXED 16:9 frame
 * (aspect-ratio:16/9 + the shared object-fit:cover above,
 * centre-cropped). This REPLACES the previous round's
 * fixed-height plug (13rem cards / 20rem lead, and the
 * hero's max-height:340px): the frame height now depends
 * only on the card's width, so portrait, square, ultra-wide
 * and landscape sources are all cropped into the same 16:9
 * frame and one tall source image can never dominate its
 * card or stretch a grid row again. Regular and lead cards
 * share the identical 16:9 frame. */
.card figure img,
.fb-card figure img {
  aspect-ratio: 16/9;
}
/* 16:9 HARDENING (QA finding 2026-11-20 17:00, item D10): the
 * hero img used to carry its SOURCE pixel size as width/height
 * attributes (1300x725 for a 1000x558 file); in the QA render
 * engine the height attribute acted as a presentational hint
 * pinning the box height, which made both dimensions definite
 * and silently disabled aspect-ratio — the hero rendered
 * 1366x724 (~1.89) instead of 16:9. Two structural fixes:
 * every cover img now carries width=1600 height=900 (the
 * attribute-derived ratio IS 16:9, keeping the layout-shift
 * benefit) and the shared rule above sets height:auto
 * explicitly — any author CSS beats the attribute hint, so
 * the height returns to auto and aspect-ratio:16/9 governs
 * on every engine. Card imgs get the same treatment. */
figcaption {
  font-size: 13px;
  font-style: italic;
  color: var(--dim);
  margin-top: 8px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.b-hot {
  background: var(--accent);
  color: #fff;
}
.b-cat {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}
.b-kind,
.b-region,
.b-exp {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
.b-kind {
  font-weight: 600;
}
.b-kind.gv {
  background: var(--giveaway-soft);
  color: var(--giveaway);
}
.b-kind.dl {
  background: var(--deal-soft);
  color: var(--deal);
}
.b-exp {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}
.b-region {
  border: 1px solid var(--border);
  color: var(--dim);
}
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.card h3.sz-row {
  font-size: var(--title-card-row);
}
.card h3.sz-lead {
  font-size: var(--title-card-lead);
}
.card h3 a {
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
}
.card h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}
.meta {
  font-size: 12px;
  color: var(--dim);
  margin: 4px 0 0;
}
.summary {
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.88;
  margin: 8px 0 0;
}
.summary.lead {
  font-size: 15px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  margin-top: 12px;
}
.facts .org {
  color: var(--dim);
}
.facts .price {
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
  background: var(--deal-soft);
  color: var(--deal);
}
.facts .price.ai {
  background: var(--ai-soft);
  color: var(--ai);
}
.facts .dl-gv {
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 500;
  background: var(--giveaway-soft);
  color: var(--giveaway);
}
.facts .dl {
  color: var(--dim);
}
/* CARD ACTION PAIR — ONE BOX SPEC (button-system unification,
 * Thanh 2026-11-20 17:58/17:59; HARDENED 18:16 after the pair
 * STILL rendered unequal on production): "Đọc bài đầy đủ"
 * (outline) and "Nghe bài này" (filled) share ONE box and
 * differ ONLY in fill/color, per the design system's component
 * state matrix. Root cause of the surviving drift, traced in
 * the DEPLOYED stylesheet (assets/site-1cmx-r3jqpa.css), not
 * the spec text: the pair shipped as two SEPARATE rules there,
 * .readbtn's only min-height lived inside the
 * @media (pointer:coarse) group rule — so on a fine pointer
 * the <a> rendered at content height ≈38px (13px × the
 * inherited body line-height 1.5 + padding + border) against
 * the <button>'s own min-height:44px — and NEITHER rule set
 * line-height, so the text box depended on inheritance (the
 * anchor inherits, the button takes the UA control metrics).
 * This ONE rule now pins EVERY box property explicitly —
 * fixed height AND min-height, line-height:1, font-family —
 * so no cascade layer or inheritance path can split the pair
 * again; acceptance is by rendered measurement (offsetHeight
 * + computed font-size), recorded as QA-1004. */
.readbtn,
.tts-listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  margin-top: 12px;
}
.readbtn {
  color: var(--accent-text);
  text-decoration: none;
}
.tts-listen {
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}
/* CARD ACTION PAIR — GAP + ONE CONTAINER (Thanh 2026-11-20
 * 18:46/18:53, third report): the pair above STILL rendered
 * unequal and TOUCHING on the reader's machine. The touching
 * half is structural in the markup itself: cardHtml emitted the
 * two buttons as bare siblings in inline flow — no flex
 * container, no horizontal margin anywhere (only margin-top) —
 * so they rendered at 0px from each other by construction. The
 * pair now sits in ONE flex container with a 12px gap on the
 * spacing scale, the buttons' own margin-top is zeroed inside
 * it, and the shared rule above remains the pair's ONLY box
 * spec (the coarse-pointer group rule naming .readbtn without
 * .tts-listen can no longer split them: both take height and
 * min-height from the shared rule at every pointer type).
 * Acceptance is by rendered measurement (offsetHeight +
 * computed font-size + the pixel gap between the two boxes),
 * never by CSS text alone. */
.cardactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.cardactions .readbtn,
.cardactions .tts-listen {
  margin-top: 0;
}
.tts-listen.tts-on {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}
/* EDGE TIP LINE (Thanh 2026-11-20 19:07, exception confirmed
 * 19:11): a small muted bilingual tip beside the player on the
 * edition page and the article page. It is the ONE TTS-adjacent
 * element that does NOT follow the voice gate — it stays
 * visible even when the player and every listen button are
 * hidden for lack of any voice, because that audience needs
 * the tip most. Lucide lightbulb, never an emoji. */
.tts-tip {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--dim);
  margin: 8px 0 0;
}
.tts-tip svg {
  flex: none;
  margin-top: 1px;
}
/* ARTICLE-PAGE PLAYER CONTROLS (Thanh 2026-11-20 18:59): the
 * single-article player gains the edition player's voice picker
 * + rate segment, sharing the same stored settings
 * (bt-tts-voice-vi / bt-tts-voice-en / bt-tts-rate). Hidden by
 * default; the TTS script reveals it under the same
 * availability decision as every other TTS surface. */
.tts-single-ctrl {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}
.tts-single-ctrl select {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}
.daynav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.daynav .daynav-btn {
  margin-top: 0;
}
.daynav .daynav-off {
  opacity: 0.45;
  border-color: var(--border);
  color: var(--dim);
}
.readbtn:hover {
  background: var(--accent-soft);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--tg-theme-bg-color, var(--bg));
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--deal);
  text-decoration: none;
}
.tag::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.tag:hover {
  border-color: var(--deal);
}
.groupnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
article.read h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 0;
}
article.read .byline {
  font-size: 13px;
  color: var(--dim);
  margin: 8px 0 0;
}
article.read .lead {
  font-size: 17px;
  line-height: 1.6;
  margin: 16px 0 0;
}
article.read .body {
  font-size: 16px;
  line-height: 1.75;
}
article.read .body h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 24px 0 8px;
}
article.read .body h2:first-child {
  margin-top: 0;
}
article.read .body p {
  margin: 0 0 12px;
}
article.read .body ul,
article.read .body ol {
  margin: 0 0 12px;
  padding-left: 24px;
}
article.read .body li {
  margin: 4px 0;
}
article.read .src {
  font-size: 13px;
  color: var(--dim);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 24px;
}
.backlink {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
  margin-top: 16px;
}
.backlink:hover {
  color: var(--accent-text);
}
.action-box {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 8px 16px 12px;
  margin: 24px 0;
}
.action-box h2 {
  margin-top: 12px !important;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 14px;
}
th,
td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
blockquote {
  border-left: 3px solid var(--accent);
  margin: 12px 0;
  padding: 4px 12px;
  opacity: 0.92;
}
pre {
  overflow-x: auto;
  background: #14120f;
  color: #ece7dd;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}
code {
  font-size: 0.92em;
}
input[type="search"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  color: var(--tg-theme-text-color, var(--text));
  font-size: 16px;
  font-family: inherit;
}
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}
.article-actions a,
.article-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--tg-theme-secondary-bg-color, var(--surface));
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}
.article-actions a:hover,
.article-actions button:hover {
  background: var(--accent-soft);
}
.article-actions a.original {
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}
.article-actions .fb {
  font-size: 13px;
  color: var(--accent-text);
}
.daylist {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.daylist li {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}
.daylist li:first-child {
  border-top: none;
}
.daylist a {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--tg-theme-text-color, var(--text));
  text-decoration: none;
}
.daylist a:hover {
  color: var(--accent);
}
.daylist .meta {
  margin-top: 4px;
}
footer.site {
  margin-top: 32px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 13px;
  color: var(--dim);
}
/* Card grid + edition TOC (2026-11-20): group sections lay their
 * cards out in an even 2-column grid on wide screens (lead card
 * full row), and edition pages gain a sticky table-of-contents
 * column on the left at >=1100px — below that the page keeps its
 * single-column flow with the group nav. TOC article links wrap
 * naturally and are NEVER cut by CSS (the old webkit line-clamp
 * truncated mid-word and leaked the clamped third line's glyph
 * tops as a dashed streak — removed 2026-11-20; long titles are
 * shortened at STRING level by tocShortTitle instead) and the
 * scroll-spy marks the group in view with .active (audit TB-06)
 * — color/weight only, at motion-fast, never a move or scale. */
.hotband,
.group {
  scroll-margin-top: 16px;
}
@media (min-width: 900px) {
  section.group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    align-items: start;
  }
  section.group .sec-head {
    grid-column: 1/-1;
  }
  .card.lead {
    grid-column: 1/-1;
  }
}
.toc {
  display: none;
}
/* Layout balance (2026-11-20 "Tối ưu cách bố trí" axis): below
 * 1100px the TOC is a collapsible <details> panel over the
 * single content column (the scroll-spy script closes it on
 * narrow viewports; the summary row toggles it). From 1100px
 * the page uses the full width to 1400px: a 264px sticky TOC
 * column + the content column on a 32px gap — no narrow column
 * floating in empty space. */
.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 16px;
}
.toc summary.toc-sum {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.toc summary.toc-sum::-webkit-details-marker {
  display: none;
}
.toc .toc-body {
  padding: 0 16px 16px;
}
.toc h2 {
  display: none;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  color: var(--dim);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.5;
  display: block;
  padding: 4px 8px;
  border-radius: 8px;
}
.toc a.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.toc a.toc-g {
  display: block;
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
  margin-top: 8px;
}
.toc .toc-cnt {
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  font-weight: 500;
}
@media (min-width: 1100px) {
  .with-toc {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  .toc {
    display: block;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 16px;
    margin-bottom: 0;
  }
  .toc summary.toc-sum {
    display: none;
  }
  .toc .toc-body {
    padding: 0;
  }
  .toc h2 {
    display: block;
  }
  .toc h2 {
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 8px;
  }
  .toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .toc li {
    margin: 0;
  }
  .toc a {
    color: var(--dim);
    text-decoration: none;
    font-size: 12px;
    line-height: 1.5;
    display: block;
    padding: 4px 8px;
    border-radius: 8px;
    transition:
      background-color var(--motion-fast) ease,
      color var(--motion-fast) ease;
  }
  .toc a:hover {
    background: var(--accent-soft);
    color: var(--text);
  }
  .toc a.active {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 600;
  }
  .toc a.toc-g {
    display: block;
    font-weight: 600;
    color: var(--text);
    font-size: 12px;
    margin-top: 8px;
  }
  .toc .toc-cnt {
    font-variant-numeric: tabular-nums;
    color: var(--dim);
    font-weight: 500;
  }
}
header.site .brand svg {
  vertical-align: -2px;
  margin-right: 6px;
}
.article-actions svg,
.backlink svg {
  vertical-align: -2px;
  margin-right: 4px;
}
.src svg {
  vertical-align: -2px;
  margin-right: 2px;
}
/* Band item icons are aligned by the .hb-title flex row in the
 * hotband block above (16px, 4px top offset) — no per-icon
 * vertical-align rule remains here. */
/* LISTEN PLAYER (TTS, spec F — 2026-11-20): the SAME player design
 * as the Space (the reference surface): layered surface card, one
 * accent, 52px cover tile, round 52px play toggle, 44px round
 * prev/next, segmented rate steps, a real voice <select>, progress
 * bar, expandable queue — tokens and spacing scale shared with the
 * rest of the site. The equalizer bars animate only while playing
 * and are frozen by the reduced-motion override above. */
.tts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  display: grid;
  gap: 12px;
}
.tts-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tts-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tts-now {
  min-width: 0;
  flex: 1;
}
.tts-pos {
  font-size: 12px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.tts-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 4px 0 0;
}
.tts-scope {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .tts-scope {
    display: none;
  }
}
.tts-eq {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  height: 12px;
}
.tts-eq i {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: var(--accent);
}
.tts-eq.on i {
  animation: tts-eq-b 900ms ease-in-out infinite;
}
.tts-eq i:nth-child(2) {
  animation-delay: 150ms;
}
.tts-eq i:nth-child(3) {
  animation-delay: 300ms;
}
@keyframes tts-eq-b {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 12px;
  }
}
.tts-progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.tts-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  width: 0%;
}
.tts-ctrl {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tts-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  flex: none;
}
.tts-round:disabled {
  opacity: 0.4;
  cursor: default;
}
.tts-play {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.tts-play:hover {
  background: var(--accent-text);
}
.tts-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.tts-btn:hover {
  background: var(--accent-soft);
}
.tts-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  margin: 0 0 4px;
}
.tts-seg {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tts-seg button {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
}
.tts-seg button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}
.tts select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.tts-note {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.6;
  margin: 0;
}
.tts-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  height: 28px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--warn-soft);
  color: var(--warn);
}
.tts-queue {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
}
.tts-queue button {
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  font-size: 13px;
  color: var(--dim);
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}
.tts-queue button:hover {
  background: var(--surface-2);
}
.tts-queue button.active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.tts-qnum {
  font-size: 12px;
  color: var(--dim);
  flex: none;
  font-variant-numeric: tabular-nums;
}
.tts-qgrp {
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
  flex: none;
  text-align: right;
}
.tts-qtext {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .tts-queue button {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 2px;
  }
  .tts-qnum {
    padding-top: 1px;
  }
  .tts-qgrp {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
    padding-left: 22px;
    text-align: left;
    font-size: 11px;
  }
}
.card.tts-reading,
article.read.tts-reading {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tts-listen:hover {
  background: var(--accent-text);
}
