/* ==========================================================================
   Tygiachoden News: hệ thống giao diện kiểu báo tài chính.
   Đổi màu thương hiệu: sửa --brand và --brand-dark ở ngay dưới đây.
   ========================================================================== */
:root {
  --brand: #0b3c7d;        /* xanh thương hiệu */
  --brand-dark: #082b5b;   /* nền dải logo, chân trang */
  --brand-soft: #eef3fa;   /* nền nhạt cho khối nhấn */
  --accent: #f2b705;       /* vàng lấy từ logo */
  --ink: #1b1f24;
  --ink-2: #3d4651;
  --muted: #6b7480;
  --line: #e3e7ec;
  --line-strong: #cfd6de;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-page: #eceff3;    /* nền xám hai rìa, làm nổi khối nội dung trắng */
  --up: #0a8a4a;
  --down: #cf2e2e;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1200px;
}

/* ---------- Nền tảng ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
table { font-variant-numeric: tabular-nums; }
.tgn-wrap, .max-w-7xl { max-width: var(--wrap) !important; margin-left: auto; margin-right: auto; }
.tgn-wrap { padding-left: 16px; padding-right: 16px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tgn-skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #111; padding: 8px 12px; z-index: 100; }
.tgn-skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.is-up { color: var(--up); } .is-down { color: var(--down); } .is-flat { color: var(--muted); }
.text-up { color: var(--up); } .text-down { color: var(--down); } .text-neutral { color: var(--muted); }

/* ---------- Thanh trên cùng ---------- */
.tgn-topbar { background: var(--bg-soft); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.tgn-topbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 30px; gap: 16px; }
.tgn-topbar__date { display: flex; gap: 14px; white-space: nowrap; overflow: hidden; }
.tgn-topbar__upd { color: var(--muted); }
.tgn-topbar__links { display: flex; gap: 18px; white-space: nowrap; }
.tgn-topbar__links a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Dải logo ---------- */
.tgn-brand { background: var(--brand-dark); color: #fff; }
.tgn-brand__in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.tgn-logo a { display: inline-flex; align-items: center; color: #fff; font-weight: 700; font-size: 20px; }
.tgn-logo .custom-logo { height: 40px; width: auto; max-width: none; }
.tgn-brand__tag { flex: 1; margin: 0; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.22); font-size: 13px; color: rgba(255,255,255,.78); line-height: 1.4; max-width: 330px; }
.tgn-search { margin-left: auto; display: flex; width: 300px; background: #fff; border-radius: 3px; overflow: hidden; }
.tgn-search input { flex: 1; min-width: 0; border: 0; padding: 8px 12px; font-size: 14px; color: var(--ink); background: transparent; }
.tgn-search input:focus { outline: none; box-shadow: none; }
.tgn-search button { padding: 0 12px; color: var(--brand); background: transparent; }
.tgn-burger, .tgn-search-toggle { display: none; color: #fff; padding: 8px; margin: 0 -8px; }

/* ---------- Menu chính ---------- */
.tgn-nav { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 2px solid var(--brand); }
.admin-bar .tgn-nav { top: 32px; }
.tgn-menu { display: flex; align-items: stretch; margin: 0 -12px; }
.tgn-menu > li { position: relative; }
.tgn-menu > li > a { display: flex; align-items: center; height: 44px; padding: 0 12px; font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .01em; color: var(--ink); white-space: nowrap; }
.tgn-menu > li > a:hover, .tgn-menu > li:focus-within > a, .tgn-menu > li.is-open > a,
.tgn-menu > .current-menu-item > a, .tgn-menu > .current-menu-ancestor > a, .tgn-menu > .current-menu-parent > a { color: var(--brand); }
.tgn-menu > .current-menu-item > a, .tgn-menu > .current-menu-ancestor > a, .tgn-menu > .current-menu-parent > a { box-shadow: inset 0 -3px 0 var(--brand); }
.tgn-menu > .menu-item-has-children > a::after { content: ""; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; }
.tgn-menu .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 230px; background: #fff; border: 1px solid var(--line-strong); border-top: 2px solid var(--brand); box-shadow: 0 10px 28px rgba(8,43,91,.14); padding: 8px 0; z-index: 50; }
.tgn-menu > li:hover > .sub-menu, .tgn-menu > li:focus-within > .sub-menu, .tgn-menu > li.is-open > .sub-menu { display: block; }
.tgn-menu .sub-menu a { display: block; padding: 7px 16px; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tgn-menu .sub-menu a:hover { background: var(--brand-soft); color: var(--brand); }
.tgn-menu .tgn-mega > .sub-menu { padding: 12px 8px; }
.tgn-menu .tgn-mega > .sub-menu > li { break-inside: avoid; }
.tgn-menu .tgn-mega--2 > .sub-menu { columns: 2; column-gap: 0; min-width: 380px; }
.tgn-menu .tgn-mega--4 > .sub-menu { columns: 4; column-gap: 0; min-width: 720px; }

/* ---------- Dải giá ---------- */
.tgn-ticker { background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; overflow: hidden; }
.tgn-ticker__list { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; }
.tgn-ticker__list::-webkit-scrollbar { display: none; }
.tgn-ticker__item { flex: 0 0 auto; position: relative; }
.tgn-ticker__item + .tgn-ticker__item::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.tgn-ticker__item a { display: flex; align-items: baseline; gap: 7px; padding: 8px 14px; white-space: nowrap; }
.tgn-ticker__item a:hover .tgn-ticker__label { color: var(--brand); }
.tgn-ticker__label { color: var(--muted); font-weight: 500; }
.tgn-ticker__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.tgn-ticker__chg { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Menu trượt trên điện thoại ---------- */
.tgn-drawer[hidden] { display: none; }
.tgn-drawer { position: fixed; inset: 0; z-index: 90; }
.tgn-drawer__backdrop { position: absolute; inset: 0; background: rgba(6,20,40,.55); }
.tgn-drawer__panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(86vw, 340px); background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tgn-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--brand-dark); color: #fff; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; }
.tgn-drawer__menu > li { border-bottom: 1px solid var(--line); position: relative; }
.tgn-drawer__menu > li > a { display: block; padding: 13px 52px 13px 16px; font-weight: 700; font-size: 15px; }
.tgn-drawer__menu .sub-menu { display: none; padding: 4px 0 12px; background: var(--bg-soft); columns: 2; column-gap: 0; }
.tgn-drawer__menu li.is-open > .sub-menu { display: block; }
.tgn-drawer__menu .sub-menu li { break-inside: avoid; }
.tgn-drawer__menu .sub-menu a { display: block; padding: 8px 16px; font-size: 14px; color: var(--ink-2); }
.tgn-drawer__toggle { position: absolute; right: 0; top: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tgn-drawer__toggle::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
li.is-open > .tgn-drawer__toggle::before { transform: rotate(-135deg); }
body.tgn-lock { overflow: hidden; }

/* ---------- Khung trang ---------- */
.tgn-site { min-height: 50vh; }
.tgn-nav, .tgn-ticker, .tgn-site { max-width: calc(var(--wrap) + 32px); margin-left: auto; margin-right: auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.tgn-site { background: var(--bg); }
@media (max-width: 1263px) { .tgn-nav, .tgn-ticker, .tgn-site { border-left: 0; border-right: 0; } }
.tgn-page { padding: 18px 0 40px; }
.tgn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.tgn-layout--full { grid-template-columns: minmax(0, 1fr); }
.tgn-main { min-width: 0; }
.tgn-aside { min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tgn-aside__sticky { position: sticky; top: 62px; display: flex; flex-direction: column; gap: 28px; }

.tgn-crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.tgn-crumbs a { color: var(--brand); }
.tgn-crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; }
.tgn-crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--line-strong); }
.tgn-crumbs a:hover { color: var(--brand); text-decoration: underline; }
.tgn-crumbs li:last-child span { display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.tgn-sec-title { margin: 0 0 14px; border-bottom: 1px solid var(--line-strong); font-family: var(--sans); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.3; color: var(--brand-dark); }
.tgn-sec-title > span { display: inline-block; padding: 0 0 7px; margin-bottom: -1px; border-bottom: 3px solid var(--brand); }
.tgn-sec-title a:hover { color: var(--brand); }
.tgn-more { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.tgn-more:hover { text-decoration: underline; }
.tgn-more::after { content: " ›"; }

/* ---------- Thẻ bài viết ---------- */
.tgn-thumb { display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.tgn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.tgn-card__media:hover img { transform: scale(1.03); }
.tgn-thumb--empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.tgn-thumb--empty span { color: rgba(255,255,255,.55); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.tgn-card__title { margin: 0; font-family: var(--serif); font-weight: 700; color: var(--ink); line-height: 1.35; }
.tgn-card__title a:hover { color: var(--brand); }
.tgn-card__excerpt { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tgn-card__date { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

.tgn-card--lead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tgn-card--lead .tgn-card__title { font-size: 25px; line-height: 1.28; }
.tgn-card--lead .tgn-card__excerpt { font-size: 15px; -webkit-line-clamp: 5; margin-top: 10px; }
.tgn-card--row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.tgn-card--row .tgn-card__title { font-size: 18px; }
.tgn-card--card .tgn-card__title { font-size: 16px; margin-top: 10px; }
.tgn-card--text { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tgn-card--text .tgn-card__title { font-size: 15px; font-family: var(--sans); font-weight: 600; line-height: 1.4; }
.tgn-card--text:first-child { padding-top: 0; }
.tgn-card--text:last-child { border-bottom: 0; }
.tgn-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tgn-news { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.tgn-news .tgn-card__title, .tgn-news .tgn-card__excerpt { margin-bottom: 0; }
.tgn-news .tgn-card--lead { display: block; padding: 0; border: 0; }
.tgn-news .tgn-card--lead .tgn-card__title { font-size: 19px; margin-top: 12px; }
.tgn-news .tgn-card--lead .tgn-card__excerpt { -webkit-line-clamp: 3; font-size: 14px; }
.tgn-news__side { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line); }
.tgn-news__side .tgn-card--thumb { flex: none; padding: 0; border-bottom: 0; }
.tgn-card--thumb { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tgn-card--thumb .tgn-card__title { margin-top: 0; font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tgn-card--thumb .tgn-card__date { margin-top: 4px; }

/* ---------- Đầu trang chuyên mục ---------- */
.tgn-arch-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--brand); }
.tgn-arch-head h1 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--brand-dark); }
.tgn-arch-head__desc { margin-top: 8px; color: var(--ink-2); font-size: 15px; max-width: 75ch; }
.tgn-arch-head__desc p { margin: 0 0 6px; }

.tgn-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.tgn-pager .page-numbers { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tgn-pager a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.tgn-pager .current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Bài viết ---------- */
.tgn-kicker { display: inline-block; margin-bottom: 8px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.tgn-kicker:hover { text-decoration: underline; }
.tgn-headline { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.25; color: var(--ink); letter-spacing: -.005em; }
.tgn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tgn-meta__author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.tgn-meta__author img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.tgn-meta__author:hover { color: var(--brand); }
.tgn-meta__sep { width: 1px; height: 12px; background: var(--line-strong); }

.content-area, .block-wysiwyg { font-size: 16.5px; line-height: 1.72; color: #222831; overflow-wrap: break-word; }
.content-area { margin-top: 22px; text-align: left; }
.block-wysiwyg { font-size: 15.5px; line-height: 1.65; }
.content-area > *:first-child, .block-wysiwyg > *:first-child { margin-top: 0; }
.block-wysiwyg > *:last-child { margin-bottom: 0; }
.content-area h1, .block-wysiwyg h1 { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.25; margin: 0 0 14px; color: var(--ink); }
.content-area h2, .block-wysiwyg h2 { font-family: var(--serif); font-size: 23px; font-weight: 700; line-height: 1.3; margin: 34px 0 12px; color: var(--ink); }
.content-area h3, .block-wysiwyg h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 1.35; margin: 26px 0 10px; color: var(--ink); }
.content-area h4, .block-wysiwyg h4 { font-size: 16.5px; font-weight: 700; margin: 22px 0 8px; }
.content-area p, .block-wysiwyg p { margin: 0 0 16px; }
/* Căn đều hai bên cho đoạn văn trong bài, bỏ qua ghi chú và chú thích ngắn */
.content-area p, .block-wysiwyg p, .content-area li, .block-wysiwyg li,
.tgn-quote__foot p, .tgn-faq__a, .tgn-author__bio, .tgn-main .tgn-box--pad p { text-align: justify; text-justify: inter-word; }
.content-area .tgn-note, .block-wysiwyg .tgn-note, .tgn-quote .tgn-note, figcaption, .tgn-aside p, .tgn-aside li { text-align: left; }
.content-area ul, .block-wysiwyg ul { list-style: disc; margin: 0 0 16px 22px; }
.content-area ol, .block-wysiwyg ol { list-style: decimal; margin: 0 0 16px 22px; }
.content-area li, .block-wysiwyg li { margin-bottom: 6px; }
.content-area a, .block-wysiwyg a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.content-area a:hover, .block-wysiwyg a:hover { color: var(--brand-dark); text-decoration-thickness: 2px; }
.content-area img { height: auto; }
.content-area figure, .content-area .wp-caption { max-width: 100%; margin: 22px 0; }
.content-area figcaption, .content-area .wp-caption-text { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; font-style: italic; }
.content-area blockquote, .block-wysiwyg blockquote { margin: 22px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); color: var(--ink-2); font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.content-area blockquote p, .block-wysiwyg blockquote p { margin: 0; }
.content-area blockquote cite { display: block; margin-top: 8px; font-family: var(--sans); font-size: 13px; font-style: normal; color: var(--muted); }

/* Bảng trong nội dung soạn thảo (không áp vào bảng do shortcode tự dựng có lớp riêng) */
.content-area table:not([class]), .block-wysiwyg table:not([class]), .rate-table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; line-height: 1.5; background: #fff;
}
.content-area table:not([class]) th, .content-area table:not([class]) td,
.block-wysiwyg table:not([class]) th, .block-wysiwyg table:not([class]) td,
.rate-table th, .rate-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: middle; }
.content-area table:not([class]) thead th, .block-wysiwyg table:not([class]) thead th, .rate-table thead th { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.content-area table:not([class]) tbody tr:nth-child(even), .block-wysiwyg table:not([class]) tbody tr:nth-child(even) { background: #fafbfc; }
@media (max-width: 640px) {
  .content-area table:not([class]), .block-wysiwyg table:not([class]) { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
}

/* Danh sách liên kết nhiều cột trong nội dung cũ */
.tygia-wrapper { border: 1px solid var(--line); padding: 18px 22px; margin: 20px 0; background: #fff; }
.tygia-list { columns: 3; column-gap: 36px; padding-left: 18px; margin: 0 !important; }
.tygia-list li { break-inside: avoid; margin-bottom: 10px; }
.tygia-list a { font-size: 15px; font-weight: 500; }
@media (max-width: 768px) { .tygia-list { columns: 2; } }
@media (max-width: 480px) { .tygia-list { columns: 1; } }

/* ---------- Khối dữ liệu ---------- */
.tgn-box { border: 1px solid var(--line); background: #fff; }
.tgn-box--pad { padding: 16px; }
.tgn-quote { border: 1px solid var(--line-strong); border-top: 3px solid var(--brand); background: #fff; }
.tgn-quote__grid { display: grid; grid-template-columns: 1fr 1fr; }
.tgn-quote__cell { padding: 16px 18px; }
.tgn-quote__cell + .tgn-quote__cell { border-left: 1px solid var(--line); }
.tgn-quote__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tgn-quote__num { margin-top: 4px; font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.tgn-quote__num small { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tgn-quote__chg { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tgn-quote__chg b { font-weight: 700; }
.tgn-quote__foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.tgn-quote__foot p { margin: 0; font-size: 15.5px; line-height: 1.6; }
.tgn-quote__foot .tgn-note { margin-top: 8px; }
.tgn-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.tgn-note a { text-decoration: underline; }
/* Ghi chú đứng sau bất kỳ khối nào cũng có khoảng thở, trừ khi nơi dùng tự đặt lề riêng */
* + .tgn-note, * + p.tgn-note { margin-top: 12px; line-height: 1.65; }

.tgn-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tgn-table th { padding: 9px 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12.5px; font-weight: 700; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.tgn-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tgn-table tr:last-child td { border-bottom: 0; }
.tgn-table tbody tr:hover { background: #fafbfd; }
.tgn-table .num { text-align: right; white-space: nowrap; }
.tgn-table .is-key td { background: #fff8e1; font-weight: 700; }
.tgn-table a { color: var(--brand); font-weight: 600; }
.tgn-table a:hover { text-decoration: underline; }
.tgn-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tgn-home-h1 { margin: 0 0 4px; font-family: var(--serif); font-size: 32px; font-weight: 700; line-height: 1.22; color: var(--ink); }
.tgn-home-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.tgn-stack > * + * { margin-top: 34px; }

/* Câu hỏi thường gặp */
.tgn-faq details { border-bottom: 1px solid var(--line); }
.tgn-faq summary { position: relative; padding: 13px 34px 13px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; line-height: 1.45; color: var(--ink); }
.tgn-faq summary::-webkit-details-marker, summary::-webkit-details-marker { display: none; }
.tgn-faq summary::after { content: ""; position: absolute; right: 6px; top: 19px; width: 8px; height: 8px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .15s; }
.tgn-faq details[open] summary::after { transform: rotate(-135deg); top: 23px; }
.tgn-faq summary:hover { color: var(--brand); }
.tgn-faq__a { padding: 0 0 14px; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
details[open] .faq-icon { transform: rotate(180deg); }

/* ---------- Cột phải ---------- */
.tgn-widget ul { margin: 0; }
.tgn-side-quote { border: 1px solid var(--line-strong); border-top: 3px solid var(--brand); }
.tgn-side-quote__row { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tgn-side-quote__row span { font-size: 13px; color: var(--muted); }
.tgn-side-quote__row b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tgn-side-quote__foot { padding: 8px 14px; font-size: 12px; color: var(--muted); background: var(--bg-soft); display: flex; justify-content: space-between; gap: 8px; }
.tgn-side-quote__foot a { color: var(--brand); font-weight: 600; }
.tgn-mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tgn-mini th { padding: 6px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: right; border-bottom: 1px solid var(--line-strong); }
.tgn-mini th:first-child, .tgn-mini td:first-child { text-align: left; padding-left: 0; }
.tgn-mini td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); }
.tgn-mini td:last-child, .tgn-mini th:last-child { padding-right: 0; }
.tgn-mini a { font-weight: 700; color: var(--brand); }
.tgn-mini a:hover { text-decoration: underline; }

/* ---------- Chia sẻ, thẻ, tác giả, bình luận ---------- */
.tgn-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tgn-share__b { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.tgn-share__b:hover, .tgn-share__b:focus-visible { opacity: .85; }
.tgn-share__b--fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.tgn-share__b--zalo { background: #0068ff; border-color: #0068ff; color: #fff; }
.tgn-share__b--x { background: #111; border-color: #111; color: #fff; }
.tgn-share__b--copy:hover, .tgn-share__b--copy:focus-visible { opacity: 1; border-color: var(--brand); color: var(--brand); }
.tgn-share__z { fill: #0068ff; }
.tgn-share__ok, .tgn-share__b.is-done .tgn-share__i { display: none; }
.tgn-share__b.is-done { background: #15803d; border-color: #15803d; color: #fff; }
.tgn-share__b.is-done .tgn-share__ok { display: block; }
.tgn-share__msg { font-size: 13px; color: #15803d; font-weight: 600; }
.tgn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tgn-tags a { padding: 4px 10px; background: var(--bg-soft); font-size: 13px; color: var(--ink-2); }
.tgn-tags a:hover { background: var(--brand-soft); color: var(--brand); }
.tgn-author { display: flex; gap: 14px; margin-top: 26px; padding: 16px; background: var(--bg-soft); border-left: 3px solid var(--brand); }
.tgn-author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.tgn-author__name { font-weight: 700; font-size: 15.5px; }
.tgn-author__name a:hover { color: var(--brand); }
.tgn-author__bio { margin-top: 4px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.tgn-block { margin-top: 36px; }

.tgn-comments .comment-list { margin: 0; }
.tgn-comments .comment-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.tgn-comments .children { margin: 12px 0 0 28px; padding-left: 14px; border-left: 2px solid var(--line); }
.tgn-comments .children li:last-child { border-bottom: 0; padding-bottom: 0; }
.tgn-comment__head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tgn-comment__head img { width: 32px; height: 32px; border-radius: 50%; }
.tgn-comment__head b { color: var(--ink); font-size: 14px; }
.tgn-comment__body { margin-top: 6px; font-size: 15px; line-height: 1.6; }
.tgn-comment__body p { margin: 0 0 8px; }
.tgn-comment__reply a { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.comment-respond { margin-top: 18px; }
.comment-respond .comment-reply-title { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.comment-respond .comment-reply-title small { margin-left: 8px; font-weight: 500; }
.comment-form { display: grid; gap: 10px; }
.comment-form p { margin: 0; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form textarea,
.tgn-form input[type=search], .tgn-form input[type=text] { width: 100%; border: 1px solid var(--line-strong); padding: 9px 12px; font-size: 15px; background: #fff; border-radius: 2px; }
.comment-form input:focus, .comment-form textarea:focus, .tgn-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,60,125,.12); }
.comment-form .comment-form-cookies-consent { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.tgn-btn, .comment-form .submit { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; border-radius: 2px; cursor: pointer; }
.tgn-btn:hover, .comment-form .submit:hover { background: var(--brand-dark); }
.tgn-form { display: flex; gap: 8px; max-width: 560px; }

/* ---------- Chân trang ---------- */
.tgn-footer { background: var(--brand-dark); color: rgba(255,255,255,.8); font-size: 14px; }
.tgn-footer a:hover { color: #fff; text-decoration: underline; }
.tgn-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding: 36px 0 26px; }
.tgn-footer__about .custom-logo { height: 40px; width: auto; margin-bottom: 14px; }
.tgn-footer__about p { margin: 0 0 10px; line-height: 1.6; }
.tgn-footer__about p a { color: #fff; font-weight: 600; }
.tgn-footer__social { display: flex; gap: 14px; }
.tgn-footer__title { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.tgn-footer__list li { margin-bottom: 7px; }
.tgn-footer__more { color: var(--accent); font-weight: 600; }
.tgn-footer__note { margin: 0; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.62); }
.tgn-footer__note a { text-decoration: underline; }
.tgn-footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12.5px; color: rgba(255,255,255,.62); }

/* ---------- Tinh chỉnh các khối cũ dựng bằng Tailwind ---------- */
.tgn-site .rounded-lg, .tgn-site .rounded-xl, .tgn-site .rounded-2xl, .tgn-site .rounded-md { border-radius: 3px; }
.tgn-site .shadow, .tgn-site .shadow-sm, .tgn-site .shadow-md, .tgn-site .shadow-lg { box-shadow: none; }
.bank-swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; overflow: hidden; }
.bank-swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 100%; }

/* ---------- Thiết bị nhỏ ---------- */
@media (max-width: 1100px) {
  .tgn-brand__tag { display: none; }
  .tgn-menu > li > a { padding: 0 9px; font-size: 13px; }
  .tgn-menu { margin: 0 -9px; }
}
@media (max-width: 1023px) {
  .tgn-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tgn-aside__sticky { position: static; }
  .tgn-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 860px) {
  .tgn-topbar__links, .tgn-topbar__upd { display: none; }
  .tgn-nav { display: none; }
  .tgn-brand { position: sticky; top: 0; z-index: 40; }
  .admin-bar .tgn-brand { top: 46px; }
  .tgn-brand__in { min-height: 54px; gap: 12px; }
  .tgn-logo .custom-logo { height: 30px; }
  .tgn-burger, .tgn-search-toggle { display: inline-flex; }
  .tgn-search-toggle { margin-left: auto; }
  .tgn-brand__in .tgn-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); line-height: 0; }
  .tgn-brand__in .tgn-logo a { line-height: 1.2; }
  .tgn-search { display: none; position: absolute; left: 0; right: 0; top: 100%; width: auto; margin: 0; border-radius: 0; border-bottom: 2px solid var(--brand); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
  .tgn-brand.is-search .tgn-search { display: flex; }
  .tgn-brand__in { position: relative; }
  .tgn-search input { padding: 12px 14px; font-size: 16px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .tgn-wrap { padding-left: 10px; padding-right: 10px; }
  .tgn-ticker__list { margin: 0 -10px; }
  .tgn-page { padding-top: 14px; }
  .tgn-headline, .tgn-home-h1 { font-size: 25px; }
  .content-area { font-size: 16.5px; }
  .content-area h2, .block-wysiwyg h2 { font-size: 21px; margin-top: 28px; }
  .content-area h3, .block-wysiwyg h3 { font-size: 18px; }
  .tgn-arch-head h1 { font-size: 24px; }
  .tgn-card--lead { grid-template-columns: 1fr; gap: 12px; }
  .tgn-card--lead .tgn-card__title { font-size: 21px; }
  .tgn-card--row { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .tgn-card--row .tgn-card__title { font-size: 16px; }
  .tgn-card--row .tgn-card__excerpt { display: none; }
  .tgn-grid-3 { grid-template-columns: 1fr; gap: 0; }
  .tgn-grid-3 .tgn-card--card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .tgn-grid-3 .tgn-card--card .tgn-card__title { margin-top: 0; }
  .tgn-news { grid-template-columns: 1fr; gap: 14px; }
  .tgn-news__side { padding-left: 0; border-left: 0; padding-top: 14px; border-top: 1px solid var(--line); }
  .tgn-news__side { gap: 14px; }
  .tgn-card--thumb .tgn-card__title { -webkit-line-clamp: 3; }
  .tgn-quote__num { font-size: 30px; }
  .tgn-quote__cell { padding: 12px 14px; }
  .tgn-quote__foot { padding: 12px 14px; }
  .tgn-table { font-size: 13.5px; }
  .tgn-table th, .tgn-table td { padding: 8px 10px; }
  .tgn-footer__grid { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .tgn-footer__bottom { flex-direction: column; gap: 6px; }
  .tgn-crumbs li:last-child { display: none; }
  .tgn-stack > * + * { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .tgn-topbar, .tgn-nav, .tgn-ticker, .tgn-aside, .tgn-footer, .tgn-share, .tgn-comments, .tgn-drawer, .tgn-search, .tgn-burger { display: none !important; }
  .tgn-brand { background: none; color: #000; }
  .tgn-layout { display: block; }
}

/* ---------- Bổ sung ---------- */
.tgn-quote__foot p.tgn-note { font-size: 12.5px; line-height: 1.5; }
.bank-swiper { overflow: hidden; position: relative; }
.bank-swiper .swiper-pagination { display: none !important; }
#tgc-bank-dots { display: none !important; }
#tgc-bank-title { font-size: 13px; font-weight: 600; color: var(--brand); }

/* ---------- Biểu đồ tỷ giá (SVG) ---------- */
.tgn-chart { --c-sell: var(--brand); --c-buy: #e08a00; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.tgn-chart__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tgn-chart__title { font-family: var(--serif, 'Noto Serif', serif); font-size: 20px; font-weight: 700; color: var(--ink, #14171c); }
.tgn-chart__cur { border: 1px solid var(--line); border-radius: 4px; padding: 6px 34px 6px 12px; font-size: 14px; font-weight: 600; background-color: #fff; }
.tgn-chart__sum { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 28px; margin-top: 12px; }
.tgn-chart__val span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #5b6472; }
.tgn-chart__val b { display: block; font-size: 26px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink, #14171c); }
.tgn-chart__key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c-sell); flex: none; }
.tgn-chart__key--buy { background: var(--c-buy); }
.tgn-chart__chg { font-size: 13.5px; color: #5b6472; padding-bottom: 5px; }
.tgn-chart__chg b { font-size: 15px; }
.tgn-chart__chg.is-up b { color: var(--up, #0a8a4a); }
.tgn-chart__chg.is-down b { color: var(--down, #cf2e2e); }
.tgn-chart__tabs { display: flex; gap: 6px; margin: 14px 0 8px; }
.tgn-chart__tab { border: 1px solid var(--line); background: #f4f6f9; color: #3a4350; border-radius: 4px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tgn-chart__tab:hover { background: #e9edf3; }
.tgn-chart__tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tgn-chart__plot { position: relative; min-height: 260px; touch-action: pan-y; cursor: crosshair; transition: opacity .15s; }
.tgn-chart.is-loading .tgn-chart__plot { opacity: .45; }
.tgn-chart__plot svg { display: block; max-width: 100%; }
.tgn-chart__grid { stroke: #e7eaef; stroke-width: 1; }
.tgn-chart__axis { font-size: 11.5px; fill: #6b7482; font-variant-numeric: tabular-nums; }
.tgn-chart__band { fill: var(--c-sell); opacity: .07; }
.tgn-chart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tgn-chart__line--sell { stroke: var(--c-sell); }
.tgn-chart__line--buy { stroke: var(--c-buy); }
.tgn-chart__vline { stroke: #9aa3b0; stroke-width: 1; stroke-dasharray: 3 3; }
.tgn-chart__dot { stroke: #fff; stroke-width: 2; }
.tgn-chart__dot--sell { fill: var(--c-sell); }
.tgn-chart__dot--buy { fill: var(--c-buy); }
.tgn-chart__tip { position: absolute; top: 8px; z-index: 2; pointer-events: none; background: #14171c; color: #fff; border-radius: 4px; padding: 8px 10px; font-size: 12.5px; line-height: 1.6; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.tgn-chart__tip b { margin-left: 6px; font-variant-numeric: tabular-nums; }
.tgn-chart__tip .tgn-chart__key { margin-right: 6px; width: 8px; height: 8px; }
.tgn-chart__tip-date { color: #c9d0da; font-size: 11.5px; }
.tgn-chart { --c-bank: #8a93a1; }
.tgn-chart__val--buy b, .tgn-chart__val--bank b { font-size: 20px; font-weight: 600; color: #3a4350; padding-bottom: 2px; }
.tgn-chart__val[hidden] { display: none; }
.tgn-chart__key--bank { width: 16px; height: 0; border-radius: 0; background: none; border-top: 2px dashed var(--c-bank); }
.tgn-chart__stop--a { stop-color: var(--c-sell); stop-opacity: .28; }
.tgn-chart__stop--b { stop-color: var(--c-sell); stop-opacity: 0; }
.tgn-chart__line--sell { stroke-width: 2.6; }
.tgn-chart__line--bank { stroke: var(--c-bank); stroke-width: 1.4; stroke-dasharray: 5 4; }
.tgn-chart__dot--bank { fill: var(--c-bank); }
.tgn-chart__end { fill: var(--c-sell); stroke: #fff; stroke-width: 2; }
.tgn-chart__end-halo { fill: var(--c-sell); opacity: .16; }
.tgn-chart__tag { fill: var(--c-sell); }
.tgn-chart__tag-text { fill: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tgn-chart__tip-gap { margin-top: 3px; padding-top: 3px; border-top: 1px solid rgba(255,255,255,.18); color: #c9d0da; }
.tgn-chart__tip-gap b { color: #fff; }
.tgn-chart__meta { margin: 8px 0 0; font-size: 12px; color: #6b7482; }
@media (max-width: 480px) {
  .tgn-chart { padding: 12px; }
  .tgn-chart__val b { font-size: 22px; }
  .tgn-chart__val--buy b, .tgn-chart__val--bank b { font-size: 17px; }
  .tgn-chart__sum { gap: 8px 20px; }
  .tgn-chart__tab { flex: 1; padding: 7px 4px; }
}

/* ---------- Biểu tượng trong menu (cờ, logo ngân hàng) ---------- */
.tgn-menu .sub-menu a, .tgn-drawer__menu .sub-menu a { display: flex; align-items: center; gap: 10px; }
.tgn-mi { flex: none; display: block; }
.tgn-mi--flag { width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); object-fit: cover; }
.tgn-mi--bank { width: 22px; height: 22px; object-fit: contain; }
.tgn-mi.tgn-mi--gold { width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; }
.tgn-mi.tgn-mi--gold.gb-logo--letter.is-word { font-size: 6.5px; display: inline-flex; border-radius: 4px; }
.tgn-mi.tgn-mi--svg { display: inline-flex; align-items: center; justify-content: center; }
.tgn-mi.tgn-mi--svg svg { width: 20px; height: 20px; }
.tgn-mi--letter { display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }

/* ---------- Logo ngân hàng trong bảng và thẻ ---------- */
.tgn-bl { flex: none; display: inline-block; object-fit: contain; border-radius: 4px; vertical-align: middle; }
.tgn-bl--letter { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; }
.tgn-bankchip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tgn-bankcell { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
#tgc-bank-title { display: flex; align-items: center; gap: 8px; }
.tgn-flag { flex: none; display: inline-block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); object-fit: cover; vertical-align: middle; }

/* Trang giá vàng, bạc thế giới */
.tgn-tv { height: 480px; border: 1px solid var(--line); background: var(--bg-soft); }
.tgn-tv__box { width: 100%; height: 100%; }
@media (max-width: 640px) { .tgn-tv { height: 400px; } }

/* Trang tỷ giá ngân hàng */
.tgn-quote__grid--3 { grid-template-columns: repeat(3, 1fr); }
.tgn-quote__grid--3 .tgn-quote__num { font-size: 32px; }
.tgn-home-sub .tgn-bl { vertical-align: -4px; margin-right: 4px; }
.tgn-muted { color: var(--muted); font-weight: 400; }
.tgn-rank { display: inline-block; min-width: 44px; padding: 2px 6px; border-radius: 3px; background: var(--bg-soft); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.tgn-rank small { font-weight: 400; color: var(--muted); }
.tgn-rank.is-top { background: #e8f5ee; color: #11683f; }
.tgn-rank.is-best { background: #11683f; color: #fff; }
.tgn-rank.is-best small { color: #d4efe0; }
.tgn-table td.is-best { color: #11683f; font-weight: 700; background: #eef8f2; }
.tgn-table--fx td { white-space: nowrap; }
.tgn-conv { border: 1px solid var(--line-strong); padding: 14px 16px; background: #fff; }
.tgn-conv__row { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.tgn-conv__row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tgn-conv__row select, .tgn-conv__row input, .tgn-lookup input { height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; font-size: 15px; color: var(--ink); background: #fff; }
.tgn-conv__row select, .tgn-chart__cur { -webkit-appearance: none; appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b7480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tgn-conv__row select::-ms-expand, .tgn-chart__cur::-ms-expand { display: none; }
.tgn-conv__row input { width: 140px; }
.tgn-conv__out { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tgn-conv__out p { margin: 6px 0 0; font-size: 14.5px; }
.tgn-conv__big { font-size: 20px; font-variant-numeric: tabular-nums; }
.tgn-conv__big b { color: var(--brand); }
.tgn-conv__cmp b { color: var(--down); }
.tgn-conv__cmp.is-best { color: #11683f; font-weight: 600; }
.tgn-lookup { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.tgn-lookup label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tgn-lookup button, .tgn-hub__bar select { height: 38px; padding: 0 16px; border: 0; border-radius: 3px; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; }
.tgn-banklist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tgn-banklist a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
.tgn-banklist a:hover { border-color: var(--brand); color: var(--brand); }
.tgn-info dl { margin: 0; }
.tgn-info__src { font-size: 12.5px; color: var(--muted); }
.tgn-info__src a { color: var(--muted); text-decoration: underline; }
.tgn-hub__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.tgn-hub__bar label { font-weight: 700; font-size: 14px; }
.tgn-hub__bar select { -webkit-appearance: none; appearance: none; padding: 0 38px 0 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.tgn-hub__bar select::-ms-expand { display: none; }
.tgn-hub th[data-sort] { cursor: pointer; user-select: none; }
.tgn-hub th[data-sort]::after { content: ' ↕'; opacity: .45; }
.tgn-hub th[aria-sort="ascending"]::after { content: ' ▲'; opacity: 1; }
.tgn-hub th[aria-sort="descending"]::after { content: ' ▼'; opacity: 1; }
@media (max-width: 760px) {
  .tgn-quote__grid--3 { grid-template-columns: 1fr 1fr; }
  .tgn-quote__grid--3 .tgn-quote__cell:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .tgn-quote__grid--3 .tgn-quote__num { font-size: 26px; }
  .tgn-banklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Cột phải riêng của trang ngân hàng, trang chợ đen ---------- */
.tgn-side-rank { margin: 0; padding: 0; list-style: none; }
.tgn-side-rank li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tgn-side-rank li.is-me { background: var(--bg-soft); margin: 0 -8px; padding: 7px 8px; font-weight: 700; }
.tgn-side-rank__n { flex: 0 0 20px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.tgn-side-rank .tgn-bankcell { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.tgn-side-rank .tgn-bankcell a { font-weight: 600; color: var(--ink); }
.tgn-side-rank .tgn-bankcell a:hover { color: var(--brand); }
.tgn-side-rank b { font-variant-numeric: tabular-nums; }
.tgn-mini td a { white-space: nowrap; }

/* ---------- Trang bộ máy tổ chức ---------- */
.tgn-org-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 0 22px; background: var(--line); border: 1px solid var(--line); }
.tgn-org-stat { background: #fff; padding: 14px 16px; text-align: center; }
.tgn-org-stat b { display: block; font-family: var(--serif); font-size: 28px; line-height: 1.1; color: var(--brand); }
.tgn-org-stat span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

.tgn-org-chart, .tgn-org-dept, .tgn-org-flow { margin-top: 32px; }
.tgn-org-tree { padding: 22px 16px 6px; background: var(--bg-soft); border: 1px solid var(--line); }
.tgn-org-root { max-width: 320px; margin: 0 auto; padding: 12px 16px; background: var(--brand); color: #fff; font-weight: 700; text-align: center; border-radius: 3px; }
.tgn-org-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; position: relative; }
.tgn-org-branches::before { content: ""; position: absolute; top: -16px; left: 16.6%; right: 16.6%; height: 1px; background: var(--line-strong); }
.tgn-org-branches::after { content: ""; position: absolute; top: -32px; left: 50%; width: 1px; height: 17px; background: var(--line-strong); }
.tgn-org-branch { position: relative; }
.tgn-org-branch::before { content: ""; position: absolute; top: -16px; left: 50%; width: 1px; height: 16px; background: var(--line-strong); }
.tgn-org-node { padding: 11px 12px; background: #fff; border: 1px solid var(--line-strong); border-top: 3px solid var(--brand); text-align: center; }
.tgn-org-node a, .tgn-org-node span { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.tgn-org-node a:hover { color: var(--brand); }
.tgn-org-node em { display: block; margin-top: 3px; font-style: normal; font-size: 12.5px; color: var(--muted); }
.tgn-org-names { margin: 10px 0 18px; padding: 0; list-style: none; text-align: center; }
.tgn-org-names li { font-size: 13.5px; padding: 3px 0; }
.tgn-org-names a { color: var(--ink-2); }
.tgn-org-names a:hover { color: var(--brand); text-decoration: underline; }

.tgn-org-dept { border: 1px solid var(--line); }
.tgn-org-dept__head { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.tgn-org-dept__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.tgn-org-dept__head h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 4px; }
.tgn-org-dept__head h2 a:hover { color: var(--brand); }
.tgn-org-dept__head p { margin: 0; font-size: 14px; color: var(--ink-2); text-align: justify; }
.tgn-org-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.tgn-org-card { display: flex; gap: 13px; padding: 16px 18px; background: #fff; }
.tgn-org-card__face { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; }
.tgn-org-card__face img { width: 58px; height: 58px; object-fit: cover; }
.tgn-org-card__initial { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--brand); }
.tgn-org-card__body { min-width: 0; }
.tgn-org-card h3 { font-size: 16px; font-weight: 700; margin: 0; }
.tgn-org-card h3 a:hover { color: var(--brand); }
.tgn-org-card__role { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--brand); }
.tgn-org-card__duty { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); text-align: justify; }

.tgn-org-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.tgn-org-steps li { position: relative; padding: 14px 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.tgn-org-steps__n { position: absolute; top: 10px; right: 12px; font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--line-strong); line-height: 1; }
.tgn-org-steps b { display: block; font-size: 15px; margin-bottom: 5px; }
.tgn-org-steps li > span:last-child { display: block; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

@media (max-width: 760px) {
  .tgn-org-stats { grid-template-columns: 1fr; }
  .tgn-org-branches { grid-template-columns: 1fr; gap: 10px; }
  .tgn-org-branches::before, .tgn-org-branches::after, .tgn-org-branch::before { display: none; }
  .tgn-org-branches { margin-top: 16px; }
  .tgn-org-names { margin-bottom: 6px; }
  .tgn-org-people, .tgn-org-steps { grid-template-columns: 1fr; }
}

/* ---------- Trang giới thiệu ---------- */
.tgn-ab-block { margin-top: 32px; }
.tgn-ab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tgn-ab-card { display: block; padding: 16px 18px; background: #fff; }
.tgn-ab-card b { display: block; font-size: 15.5px; color: var(--ink); }
.tgn-ab-card span { display: block; margin-top: 5px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.tgn-ab-card:hover { background: var(--brand-soft); }
.tgn-ab-card:hover b { color: var(--brand); }
.tgn-ab-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tgn-ab-flow__item { padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--brand); }
.tgn-ab-flow__item b { display: block; margin-bottom: 5px; font-size: 15px; }
.tgn-ab-flow__item span { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); text-align: justify; display: block; }
.tgn-ab-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tgn-ab-rule { display: flex; gap: 11px; padding: 14px 16px; background: var(--bg-soft); }
.tgn-ab-rule__tick { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--up); }
.tgn-ab-rule b { font-size: 15px; }
.tgn-ab-rule p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); text-align: justify; }
.tgn-ab-team p { font-size: 15px; line-height: 1.65; text-align: justify; margin: 0 0 14px; }
.tgn-ab-team__links { display: flex; flex-wrap: wrap; gap: 10px; }
.tgn-ab-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; border-radius: 3px; }
.tgn-ab-btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.tgn-ab-btn--ghost { background: #fff; color: var(--brand); }
.tgn-ab-btn--ghost:hover { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 760px) {
  .tgn-ab-grid, .tgn-ab-flow, .tgn-ab-rules { grid-template-columns: 1fr; }
}

/* ---------- Trang liên hệ ---------- */
.tgn-lh-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); }
.tgn-lh-card { background: #fff; padding: 15px 16px; }
.tgn-lh-card__label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tgn-lh-card__val { display: block; margin: 5px 0 4px; font-size: 16px; font-weight: 700; color: var(--brand); line-height: 1.4; }
a.tgn-lh-card__val:hover { text-decoration: underline; }
.tgn-lh-card__note { display: block; font-size: 12.5px; color: var(--muted); }
.tgn-lh-hours { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 16px; background: var(--bg-soft); border-left: 3px solid var(--brand); }
.tgn-lh-hours b { display: block; font-size: 15px; }
.tgn-lh-hours span { font-size: 13.5px; color: var(--ink-2); }
.tgn-lh-social { display: flex; gap: 8px; }
.tgn-lh-social a { padding: 7px 14px; background: #fff; border: 1px solid var(--line-strong); font-size: 13.5px; font-weight: 600; color: var(--brand); border-radius: 3px; }
.tgn-lh-social a:hover { border-color: var(--brand); }
.tgn-lh-form { margin-top: 32px; }

.tgc-form { margin-top: 14px; padding: 18px; border: 1px solid var(--line-strong); background: #fff; }
.tgc-form__trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.tgc-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tgc-form label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tgc-form label span { color: var(--down); }
.tgc-form input, .tgc-form select, .tgc-form textarea { display: block; width: 100%; margin-top: 5px; padding: 0 12px; height: 40px; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; font-family: inherit; font-size: 15px; font-weight: 400; color: var(--ink); }
.tgc-form textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.tgc-form select { -webkit-appearance: none; appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236b7480' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tgc-form input:focus, .tgc-form select:focus, .tgc-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.tgc-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tgc-form__foot .tgn-note { flex: 1 1 260px; margin-top: 0; }
.tgc-form__foot button { border: 0; cursor: pointer; font-family: inherit; }
.tgc-form__msg { margin: 0 0 4px; padding: 11px 14px; font-size: 14px; border-left: 3px solid var(--line-strong); background: var(--bg-soft); }
.tgc-form__msg.is-ok { border-color: var(--up); color: #11683f; background: #eef8f2; }
.tgc-form__msg.is-err { border-color: var(--down); color: #8d2020; background: #fdf0f0; }
@media (max-width: 760px) {
  .tgn-lh-cards, .tgc-form__row { grid-template-columns: 1fr; }
  .tgc-form { padding: 14px; }
}

/* ---------- Khối thông tin ở cột trái chân trang ---------- */
.tgn-icon { flex: 0 0 auto; }
.tgn-footer__info { margin: 14px 0 0; padding: 0; list-style: none; }
.tgn-footer__info li { display: flex; gap: 10px; margin-bottom: 11px; line-height: 1.6; }
.tgn-footer__info li > .tgn-icon { margin-top: 3px; color: var(--accent); }
.tgn-footer__info a { color: #fff; font-weight: 600; }
.tgn-footer__social { display: flex; flex-wrap: wrap; gap: 8px; }
.tgn-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; font-size: 13px; font-weight: 700; }
.tgn-footer__social a:hover { border-color: var(--accent); background: var(--accent); color: var(--brand-dark); text-decoration: none; }
.tgn-footer__info li.tgn-footer__social-row { align-items: center; padding-left: 26px; margin-top: 14px; }

/* Lưới logo ngân hàng ở chân trang: hiện đủ các ngân hàng mà vẫn gọn. */
.tgn-footer__banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 5px; margin: 0; padding: 0; list-style: none; }
.tgn-footer__banks a { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #fff; border-radius: 4px; transition: transform .12s; }
.tgn-footer__banks a:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent); }
.tgn-footer__banks img { width: 21px; height: 21px; object-fit: contain; }
.tgn-footer__banks .tgn-bl--letter { color: var(--brand); font-size: 13px; font-weight: 700; }

/* Công cụ quy đổi trên trang ngoại tệ chợ đen */
.tgn-cv { margin: 16px 0 22px; padding: 16px; border: 1px solid var(--line-strong); border-top: 3px solid var(--brand); background: #fff; }
.tgn-cv__tabs { display: inline-flex; margin-bottom: 14px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.tgn-cv__tab { padding: 7px 14px; border: 0; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tgn-cv__tab + .tgn-cv__tab { border-left: 1px solid var(--line-strong); }
.tgn-cv__tab.is-active { background: var(--brand); color: #fff; }
.tgn-cv__row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.tgn-cv__row.is-rev [data-side="fx"] { order: 3; }
.tgn-cv__row.is-rev .tgn-cv__swap { order: 2; }
.tgn-cv__row.is-rev [data-side="vnd"] { order: 1; }
.tgn-cv__field { display: flex; align-items: stretch; min-width: 0; height: 52px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; overflow: hidden; cursor: text; }
.tgn-cv__field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 60, 125, .12); }
.tgn-cv__cur { display: flex; align-items: center; gap: 8px; flex: none; padding: 0 12px; border-right: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--brand); font-size: 15px; }
.tgn-cv__cur .tgn-flag { border-radius: 2px; }
.tgn-cv__field input { flex: 1; min-width: 0; width: 100%; height: auto; padding: 0 14px; border: 0; outline: 0; background: transparent; text-align: right; font: inherit; font-size: 20px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tgn-cv__swap { display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; cursor: pointer; }
.tgn-cv__swap:hover { background: var(--brand-dark); }
.block-wysiwyg .tgn-cv__res, .tgn-cv__res { margin: 18px 0 0; text-align: center; font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--brand-dark); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tgn-cv__res b { color: var(--down); }
.block-wysiwyg .tgn-cv__note, .tgn-cv__note { margin: 8px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.tgn-cv__note b { color: var(--brand-dark); }
@media (max-width: 640px) {
  .tgn-cv { padding: 14px 12px; }
  .tgn-cv__tabs { display: flex; }
  .tgn-cv__tab { flex: 1; }
  .tgn-cv__row { grid-template-columns: 1fr; gap: 10px; }
  .tgn-cv__swap { justify-self: center; width: 44px; height: 44px; transform: rotate(90deg); }
  .tgn-cv__res { font-size: 22px; }
}

/* Ảnh bài viết trên trang tác giả */
.tgn-author-thumb { display: block; width: 240px; height: 150px; }
@media (max-width: 767px) { .tgn-author-thumb { width: 120px; height: 80px; } }

/* ===== Công cụ tỷ giá (/cong-cu/) ===== */
.tgn-tool { padding: 18px; border: 1px solid var(--line-strong); border-top: 3px solid var(--brand); background: #fff; }
.tgn-tf { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tgn-tf__f { display: block; min-width: 0; }
.tgn-tf__f[hidden] { display: none; }
.tgn-tf__f > span:first-child { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.tgn-tf__f select, .tgn-tf__f input[type=text], .tgn-tf__f input[type=date], .tgn-tf__f input[type=email] { display: block; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background-color: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); }
.tgn-tf__f select { -webkit-appearance: none; appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230b3c7d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.tgn-tf__f input.num { text-align: right; font-variant-numeric: tabular-nums; }
.tgn-tf__f select:focus, .tgn-tf__f input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 60, 125, .12); }
.tgn-seg { display: flex; height: 44px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.tgn-seg button { flex: 1; min-width: 0; padding: 0 10px; border: 0; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tgn-seg button + button { border-left: 1px solid var(--line-strong); }
.tgn-seg button.is-active { background: var(--brand); color: #fff; }
.tgn-tsel { position: relative; gap: 7px; cursor: pointer; }
.tgn-tsel b { min-width: 34px; }
.tgn-tsel select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.tgn-tool .tgn-cv__field:focus-within .tgn-tsel { color: var(--brand-dark); }
.tgn-tmiss { font-size: 17px; font-weight: 600; color: var(--muted); }
.tgn-tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tgn-tgrid--sm { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tgn-tcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.tgn-tcard:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(11, 60, 125, .08); }
.tgn-tcard b { font-size: 14.5px; font-weight: 700; line-height: 1.35; }
.tgn-tcard:hover b { color: var(--brand); }
.tgn-tcard__ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.tgn-tcard--lg { align-items: flex-start; padding: 16px; }
.tgn-tcard--lg .tgn-tcard__ic { width: 46px; height: 46px; }
.tgn-tcard__body { display: block; min-width: 0; }
.tgn-tcard--lg b { display: block; font-family: var(--serif); font-size: 17px; }
.tgn-tcard__body > span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 767px) {
  .tgn-tool { padding: 14px 12px; }
  .tgn-tf { grid-template-columns: 1fr; gap: 12px; }
  .tgn-tgrid { grid-template-columns: 1fr; gap: 10px; }
}
.tgn-tsum { display: grid; grid-template-columns: 1.25fr 1fr 1fr; border: 1px solid var(--line); background: var(--bg-soft); }
.tgn-tsum:empty { display: none; }
.tgn-tsum__c { min-width: 0; padding: 14px 16px; }
.tgn-tsum__c + .tgn-tsum__c { border-left: 1px solid var(--line); }
.tgn-tsum__c span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tgn-tsum__c b { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tgn-tsum__c b small { font-size: 13px; font-weight: 600; color: var(--muted); }
.tgn-tsum__c em { display: block; margin-top: 3px; font-size: 12.5px; font-style: normal; color: var(--ink-2); }
.tgn-tsum__c--main { background: #eef8f2; }
.tgn-tsum__c--main b { font-size: 26px; color: #11683f; }
.tgn-tsum > .tgn-tmiss { grid-column: 1 / -1; margin: 0; padding: 16px; text-align: center; }
.tgn-table--rank td:first-child, .tgn-table--rank th:first-child { width: 40px; color: var(--muted); }
@media (max-width: 767px) {
  .tgn-tsum { grid-template-columns: 1fr; }
  .tgn-tsum__c + .tgn-tsum__c { border-left: 0; border-top: 1px solid var(--line); }
  .tgn-tsum__c { padding: 12px 14px; }
}
@media (max-width: 767px) {
  .tgn-table--rank th:nth-child(3), .tgn-table--rank td:nth-child(3) { display: none; }
  .tgn-table--rank th, .tgn-table--rank td { padding-left: 8px; padding-right: 8px; }
  .tgn-table--rank td:first-child, .tgn-table--rank th:first-child { width: 28px; }
  .tgn-table.tgn-table--rank th { white-space: normal; line-height: 1.3; }
  .tgn-table--rank .tgn-bankcell { white-space: normal; gap: 7px; }
}
.tgn-tdiff { display: none; }
@media (max-width: 767px) {
  .tgn-table--rank th:nth-child(5), .tgn-table--rank td:nth-child(5) { display: none; }
  .tgn-tdiff { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--muted); }
}
.tgn-tsum--even { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.tgn-tchips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.tgn-tchips button { height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 16px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tgn-tchips button:hover { border-color: var(--brand); color: var(--brand); }
.tgn-tchips button.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.tgn-ttag { display: inline-block; padding: 1px 6px; border-radius: 3px; background: #fff3cd; color: #7a5b00; font-size: 11px; font-style: normal; font-weight: 700; vertical-align: 1px; }
.tgn-tool.is-busy .tgn-tsum { opacity: .5; }
@media (max-width: 767px) {
  .tgn-tsum--even { grid-template-columns: 1fr; grid-auto-flow: row; }
  .tgn-table.tgn-table--day th { white-space: normal; line-height: 1.3; }
  .tgn-table--day th, .tgn-table--day td { padding-left: 8px; padding-right: 8px; }
  .tgn-table--day .tgn-bankcell { white-space: normal; gap: 7px; }
}
.tgn-tup, .tgn-tsum__c b.tgn-tup { color: var(--up); }
.tgn-tdown, .tgn-tsum__c b.tgn-tdown { color: var(--down); }
@media (max-width: 767px) {
  .tgn-table.tgn-table--gap th { white-space: normal; line-height: 1.3; }
  .tgn-table--gap th, .tgn-table--gap td { padding-left: 8px; padding-right: 8px; }
  .tgn-table--gap .tgn-bankcell { white-space: normal; gap: 7px; }
}
.tgn-tchips button[hidden] { display: none; }
.tgn-trows { display: grid; gap: 8px; }
.tgn-trow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px 36px; gap: 8px; align-items: center; }
.tgn-trow input { min-width: 0; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.tgn-trow input.num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.tgn-trow input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 60, 125, .12); }
.tgn-trow__c { font-size: 13px; font-weight: 700; color: var(--muted); }
.tgn-trow__x { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; }
.tgn-trow__x:hover { border-color: var(--down); color: var(--down); }
.tgn-tadd { margin-top: 10px; height: 36px; padding: 0 14px; border: 1px dashed var(--line-strong); border-radius: 6px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--brand); cursor: pointer; }
.tgn-tadd:hover { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 767px) {
  .tgn-trow { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 34px 34px; gap: 6px; }
  .tgn-trow input { padding: 0 9px; font-size: 16px; }
  .tgn-trow__x { width: 34px; }
}
.tgn-thp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tgn-talert__now { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.tgn-talert__now b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tgn-talert__go { height: 44px; padding: 0 26px; border: 0; border-radius: 6px; font: inherit; font-size: 15px; font-weight: 700; }
.tgn-talert__go:disabled { opacity: .55; cursor: default; }
.tgn-tmsg { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--bg-soft); font-size: 14px; line-height: 1.5; color: var(--ink); }
.tgn-tmsg[hidden] { display: none; }
.tgn-tmsg p { margin: 0; }
.tgn-tmsg form { margin: 10px 0 0; }
.tgn-tmsg .tgn-btn { border: 0; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 700; }
.tgn-tmsg--ok { border-left-color: var(--up); background: #eef8f2; }
.tgn-tmsg--err { border-left-color: var(--down); background: #fdf1f1; }
div.tgn-tmsg { margin: 0; }
@media (max-width: 767px) { .tgn-talert__go { width: 100%; } }
.tgn-mi--tool { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: var(--brand); }

/* Công cụ mã nhúng tỷ giá */
.tgn-tchk { display: flex; flex-wrap: wrap; gap: 8px; }
.tgn-tchk label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.tgn-tchk input { accent-color: var(--brand); }
.tgn-tembed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.tgn-tembed__label { margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.tgn-tembed__code { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-soft); font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); resize: vertical; }
.tgn-tembed__code + .tgn-btn { margin-top: 14px; }
.tgn-tembed__ok { margin-left: 10px; font-size: 13.5px; font-weight: 600; color: var(--up); }
.tgn-tembed__ok[hidden] { display: none; }
@media (max-width: 760px) { .tgn-tembed { grid-template-columns: 1fr; } }

/* ---------- Trang người Việt ở nước ngoài ---------- */
.tgn-kb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tgn-kb-card { padding: 14px 16px; background: #fff; scroll-margin-top: 80px; }
.tgn-kb-card:target { background: var(--brand-soft); }
.tgn-kb-card__head { display: flex; align-items: center; gap: 8px; }
.tgn-kb-card__head img { width: 22px; height: auto; border-radius: 2px; }
.tgn-kb-card__head b { font-size: 15.5px; color: var(--ink); }
.tgn-kb-card__head span { margin-left: auto; font-size: 12px; color: var(--muted); }
.tgn-kb-card__big { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.tgn-kb-card__big strong { font-size: 17px; color: var(--brand); }
.tgn-kb-card__sub { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.tgn-kb-card__links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13.5px; }
.tgn-kb-card__links a { color: var(--brand); text-decoration: underline; }
.tgn-kb-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
.tgn-kb-guides h3 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.tgn-kb-guides ul { margin: 0; padding-left: 18px; }
.tgn-kb-guides li { margin: 5px 0; font-size: 14.5px; line-height: 1.5; }
.tgn-kb-guides a:hover { color: var(--brand); text-decoration: underline; }
.tgn-kb-home { display: grid; gap: 12px; margin-top: 4px; padding: 16px 18px; background: var(--brand-soft); border: 1px solid var(--line); }
.tgn-kb-home__text b { display: block; font-size: 16px; color: var(--ink); }
.tgn-kb-home__text span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.tgn-kb-home__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tgn-kb-home__chips a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--ink); }
.tgn-kb-home__chips a:hover { border-color: var(--brand); color: var(--brand); }
.tgn-kb-home__chips img { width: 18px; height: auto; border-radius: 2px; }
.tgn-kb-home__more { justify-self: start; font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: underline; }
.tgn-ab-grid.tgn-ab-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .tgn-kb-grid, .tgn-kb-guides, .tgn-ab-grid.tgn-ab-grid--2 { grid-template-columns: 1fr; }
}

/* Hộp "Trả lời nhanh" đầu bài kiến thức */
.content-area .tgn-quick { margin: 20px 0 26px; padding: 14px 18px 12px; background: var(--brand-soft); border-left: 3px solid var(--brand); }
.content-area .tgn-quick > p:first-child { margin: 0 0 6px; font-weight: 700; color: var(--brand-dark); }
.content-area .tgn-quick ul { margin: 0; padding-left: 18px; }
.content-area .tgn-quick li { margin: 4px 0; text-align: left; }

/* Không cho cả trang trượt ngang trên điện thoại khi có phần tử lỡ rộng hơn màn hình (iOS Safari). */
html, body { overflow-x: clip; }

/* Ảnh mặt trước + mặt sau tờ tiền ghép 1 hàng (inc/note-pairs.php) */
.content-area .tgc-pair { display: flex; gap: 16px; align-items: flex-start; margin: 22px auto; }
.content-area .tgc-pair figure { margin: 0; min-width: 0; }
.content-area .tgc-pair img { width: 100%; height: auto; display: block; }
.content-area .tgc-pair figcaption { font-size: 12.5px; line-height: 1.4; }
@media (max-width: 640px) {
  .content-area .tgc-pair { gap: 10px; }
  .content-area .tgc-pair.is-land { flex-direction: column; }
  .content-area .tgc-pair.is-land figure { flex: none !important; width: 100%; }
  .content-area .tgc-pair.is-land img { width: auto; max-width: 100%; max-height: 440px; margin: 0 auto; }
}

/* ===== Bảng giá vàng trong nước (template-parts/news/gold.php) ===== */
.gb-hero { display: flex; align-items: center; gap: 14px; }
.gb-hero .tgn-home-h1 { margin-bottom: 2px; }
.gb-logo { width: 29px; height: 29px; flex: 0 0 29px; border-radius: 7px; object-fit: contain; background: #fff; border: 1px solid #eceae4; }
.gb-logo--lg { width: 56px; height: 56px; flex-basis: 56px; border-radius: 12px; }
img.gb-logo { border: 0; border-radius: 0; background: none; }
.gb-logo--letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #8a6d1d; background: #fbf6e6; }
.gb-logo--letter.is-word { font-size: 9px; letter-spacing: .02em; color: #fff; background: #b8860b; border-color: #b8860b; }
.gb-logo--lg.is-word { font-size: 15px; }

.gb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.gb-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.gb-stat span { display: block; font-size: 13px; color: var(--muted); }
.gb-stat b { display: block; margin: 6px 0 4px; font-size: 21px; line-height: 1.25; color: var(--ink); font-variant-numeric: tabular-nums; }
.gb-stat b em { font-style: normal; }
.gb-stat small { display: block; font-size: 13px; color: var(--muted); }
.gb-text h2 { font-size: 19px; }

.gt-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 18px; }
.gt-title h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 700; line-height: 1.35; color: var(--ink); padding-left: 11px; border-left: 4px solid var(--accent); }
.gt-sec { scroll-margin-top: 80px; }
.gt-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.gt-toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.gt-toc a:hover { border-color: var(--accent); color: var(--ink); }
.gt-sub { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.gt-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gt-brands a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: inherit; text-decoration: none; }
.gt-brands a:hover { border-color: var(--accent); }
.gt-brands b { display: block; font-size: 14.5px; font-weight: 600; }
.gt-brands small { display: block; font-size: 12px; color: var(--muted); }
.gt-title span, .gt-title a { font-size: 13px; color: var(--muted); }
.gt-title a { text-decoration: underline; text-underline-offset: 3px; }
.gt-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.gt-wrap { border: 1px solid #dfe3e8; border-radius: 0; overflow-x: auto; background: #fff; }
.gt-wrap--scroll { overflow-x: auto; }
.gt { width: 100%; border-collapse: collapse; font-size: 15px; }
.gt th { padding: 11px 16px; text-align: left; font-weight: 700; color: var(--brand-dark); background: #e8eef7; border-bottom: 1px solid #cfdaea; white-space: nowrap; }
.gt td { padding: 9px 16px; border-top: 1px solid #ececec; vertical-align: middle; }
.gt td + td { border-left: 1px solid #ececec; }
.gt th + th { border-left: 1px solid #cfdaea; }
.gt tbody tr:first-child td { border-top: 0; }
.gt tbody tr:hover td { background: #fafafa; }
.gt tr.is-current td { background: #fffbea; }
.gt .num { text-align: right; }
.gt-type a, .gt-type span { color: #1d5fb4; text-decoration: none; }
.gt--nobrand .gt-type span, .gt--hist td:first-child { color: var(--ink); }
.gt-type a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gt-co { display: flex; align-items: center; gap: 10px; }
.gt-co a, .gt-co b { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.gt:not(.gt--nobrand) td.gt-type { white-space: nowrap; }
.gt-co a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gt-mtype { display: none; }
.gt-p { display: block; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.gt-p.is-empty { color: var(--muted); font-size: 13.5px; }
.gt-c { display: block; margin-top: 1px; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gt-pct { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gt .is-up { color: #16a34a; } .gt .is-down { color: #e5383b; } .gt .is-flat { color: var(--muted); }

@media (max-width: 640px) {
  .gb-hero { gap: 10px; }
  .gb-logo--lg { width: 44px; height: 44px; flex-basis: 44px; border-radius: 10px; }
  .gb-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gb-stat { padding: 10px 12px; }
  .gb-stat b { font-size: 16px; }
  .gb-stat b em { display: block; }
  .gb-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gt-title h2 { font-size: 18px; }
  .gt-brands { grid-template-columns: 1fr; }
  .gt-toc a { font-size: 12.5px; padding: 5px 10px; }
  .gt { font-size: 13.5px; }
  .gt th, .gt td { padding: 8px 10px; }
  .gt-chg { display: none; }
  .gt:not(.gt--nobrand) .gt-type { display: none; }
  .gt-mtype { display: block; margin-top: 2px; font-size: 12px; color: #1d5fb4; line-height: 1.3; }
  .gt-co { gap: 8px; }
  .gt-co a, .gt-co b { white-space: normal; }
  .gb-logo { width: 22px; height: 22px; flex-basis: 22px; border-radius: 5px; }
  .gb-logo--letter.is-word { font-size: 7px; }
  .gt-c { font-size: 12.5px; margin-top: 2px; }
}

/* Khối giá nổi bật trang vàng (.gh) */
.gh { padding: 0; }
.gh-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.gh-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; font-size: 19px; font-weight: 600; color: var(--brand); }
.gh-title .gb-logo { width: 26px; height: 26px; flex-basis: 26px; }
.gh-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gh-box { padding: 2px 0 2px 14px; border-left: 4px solid; }
.gh-box.is-buy { border-color: #4caf1a; } .gh-box.is-sell { border-color: #e5262b; }
.gh-l { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.gh-v { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.gh-v b { font-size: 34px; line-height: 1.15; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.gh-v small { font-size: 13px; color: var(--muted); }
.gh-c { display: block; margin-top: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.gh-c.is-up { color: #16a34a; } .gh-c.is-down { color: #e5383b; } .gh-c.is-flat { color: var(--muted); }
.gh-world { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 0; font-size: 14px; color: var(--muted); }
.gh-world b { color: var(--ink); font-size: 15px; }
.gh-world a { margin-left: auto; font-size: 13px; }
.gh-world a.gh-world__l { margin-left: 0; font-size: 14px; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.gi a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.gh > :last-child { border-bottom: 0; }
@media (max-width: 640px) {
  .gh { padding: 0; }
  .gh-title { font-size: 16.5px; }
  .gh-row { gap: 10px; }
  .gh-box { padding-left: 10px; border-left-width: 3px; }
  .gh-v b { font-size: 24px; }
  .gh-v small { font-size: 11px; }
  .gh-c { font-size: 12px; }
  .gh-world a { margin-left: 0; }
}

/* Cột phải trang giá vàng (sidebar-gold.php) */
.gs-brands { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.gs-brands li + li { border-top: 1px solid var(--line); }
.gs-brands a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: inherit; text-decoration: none; }
.gs-brands a:hover { background: #fafafa; }
.gs-brands li.is-current a { background: #fffbea; }
.gs-brands .gb-logo { width: 24px; height: 24px; flex-basis: 24px; border-radius: 6px; }
.gs-brands .gb-logo--letter.is-word { font-size: 7.5px; }
.gs-name { flex: 1; font-size: 14px; font-weight: 500; }
.gs-p { text-align: right; line-height: 1.25; }
.gs-p b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.gs-p small { display: block; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-calc { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.gs-calc label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.gs-calc select, .gs-calc input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 14.5px; color: var(--ink); background: #fff; }
.gs-calc__qty { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gs-calc__out { display: grid; gap: 6px; padding: 10px 12px; border-radius: 6px; background: var(--bg-soft); }
.gs-calc__out div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.gs-calc__out b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.gs-calc .tgn-note { margin: 0; }

/* Đoạn mở bài trang giá vàng */
.gi { margin: 0; font-size: 16.5px; line-height: 1.75; color: var(--ink-2); text-align: justify; }
.gi strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.gi .gi-up, .gi strong.gi-up { color: #4a8c00; font-weight: 700; }
.gi .gi-down, .gi strong.gi-down { color: #d62828; font-weight: 700; }
.gi .gi-gap { color: #a16207; }
@media (max-width: 640px) { .gi { font-size: 15.5px; line-height: 1.7; } }

/* Trang vĩ mô: khối số 3 cột */
.gh-row.gh-row--3 { grid-template-columns: 1.3fr 1fr 1fr; }
.gh-box.is-main { border-color: var(--accent); }
.gh-row--3 .gh-box:not(.is-main) .gh-v b { font-size: 26px; }
@media (max-width: 640px) { .gh-row.gh-row--3 { grid-template-columns: 1fr 1fr; } .gh-row--3 .gh-box.is-main { grid-column: 1 / -1; } .gh-row--3 .gh-box:not(.is-main) .gh-v b { font-size: 20px; } }
.gh-box.is-neutral { border-color: #9aa5b1; }

/* Trang lịch kinh tế */
.gl-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gl-card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-top: 3px solid #9aa5b1; background: #fff; }
.gl-card.is-first { border-top-color: var(--accent); background: #fffdf5; }
.gl-card b { font-size: 15px; line-height: 1.35; color: var(--ink); }
.gl-sub { font-size: 13px; color: var(--muted); }
.gl-when { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.gl-left { font-size: 12.5px; color: #4a8c00; font-weight: 600; }
.gl-tag { display: inline-block; padding: 1px 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #fff; background: #64748b; vertical-align: 1px; align-self: flex-start; }
.gl-tag--fomc { background: #0b3c7d; } .gl-tag--cpi { background: #b45309; } .gl-tag--nfp { background: #047857; }
.gl-table td { vertical-align: top; }
.gl-side { list-style: none; margin: 0; padding: 0; }
.gl-side li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.gl-side li b { flex: 0 0 42px; color: var(--brand); }
.gl-side small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) { .gl-next { grid-template-columns: 1fr; } }
/* Số tăng/giảm trong bảng trang vĩ mô (tgn_macro_sign): xanh tăng, đỏ giảm */
.gt .gi-up { color: #16a34a; font-weight: 600; }
.gt .gi-down { color: #e5383b; font-weight: 600; }
.gt-legend { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; white-space: nowrap; }
.gt-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.gt-legend i.is-up { background: #16a34a; } .gt-legend i.is-down { background: #e5383b; }

/* Hộp dẫn sang giá chợ đen trong bài mệnh giá tiền (inc/bm-pilot.php) */
.tgn-pilot-box { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 18px 0; padding: 12px 16px; border-left: 4px solid var(--accent); background: #fffbea; }
.tgn-pilot-box span { font-size: 13.5px; color: var(--muted); width: 100%; }
.tgn-pilot-box b { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tgn-pilot-box a { font-weight: 600; }

/* Tin tức về đồng tiền trên trang ngoại tệ + hộp giá cuối bài (inc/bm-news.php) */
.tgn-bmbox { margin: 26px 0 8px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: #fffdf5; }
.tgn-bmbox__t { padding: 9px 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.tgn-bmbox__row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: inherit; text-decoration: none; }
.tgn-bmbox__row + .tgn-bmbox__row { border-top: 1px solid var(--line); }
.tgn-bmbox__row span { flex: 1; font-weight: 600; color: var(--brand); }
.tgn-bmbox__row b { font-variant-numeric: tabular-nums; }
.tgn-bmbox__row i { font-style: normal; font-size: 20px; color: var(--muted); }
.tgn-bmbox__row:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* Thanh điều hướng dưới màn hình trên điện thoại (footer.php) */
.tgn-bbar { display: none; }
@media (max-width: 860px) {
  .tgn-bbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 80;
    background: #fff; border-radius: 999px; box-shadow: 0 8px 28px rgba(8, 43, 91, .16), 0 0 0 1px rgba(8, 43, 91, .06);
    padding: 6px 4px;
  }
  /* Kính mờ: nền trong suốt, làm mờ nội dung phía sau. Trình duyệt cũ không hỗ trợ thì giữ nền trắng. */
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tgn-bbar {
      background: rgba(255, 255, 255, .62);
      -webkit-backdrop-filter: blur(18px) saturate(180%);
      backdrop-filter: blur(18px) saturate(180%);
      box-shadow: 0 8px 30px rgba(8, 43, 91, .14), inset 0 0 0 1px rgba(255, 255, 255, .55), 0 0 0 1px rgba(8, 43, 91, .07);
    }
  }
  .tgn-bbar__i.is-active svg { filter: drop-shadow(0 2px 4px rgba(11, 60, 125, .25)); }
  .tgn-bbar__i {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 48px; padding: 0; border: 0; background: none; color: #5b6573; font: inherit; font-size: 11.5px; font-weight: 500;
    text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tgn-bbar__i svg { width: 23px; height: 23px; fill: currentColor; }
  .tgn-bbar__i svg.is-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .tgn-bbar__i.is-active { color: var(--brand); font-weight: 700; }
  .tgn-bbar__i:active { opacity: .6; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.tgn-lock .tgn-bbar { display: none; }
}
@media print { .tgn-bbar { display: none !important; } }
.tgn-chart__axis--in { font-size: 10.5px; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
