@charset "UTF-8";
/* ==========================================================================
   Người Đồng Hành — mảng Giá vàng & xếp hạng lãi suất (ndh_auto)
   ==========================================================================

   Phần bổ sung của ndh_auto, không có trong theme WordPress gốc. Trang dựng
   lại bằng class sẵn có của theme (.parc__hero, .lender__body, .cmp__table,
   .faq__list, .toc…), tệp này chỉ bù phần riêng của bảng giá: cột số canh
   phải, mũi tên tăng/giảm, hàng nhóm theo thương hiệu, biểu đồ SVG, cụm
   liên kết. Màu lấy từ tokens.css; tăng/giảm dùng --c-up/--c-down theo quy
   ước bảng điện (xanh tăng, đỏ giảm). Nạp sau saving.css, trước ndh.css.
   -------------------------------------------------------------------------- */

.gold {
	--gold-s1: var(--c-brand-600);   /* đường "bán ra" — 5.21:1 */
	--gold-s2: var(--c-muted);       /* đường "mua vào" */
	--gold-grid: var(--c-line-soft);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.gold .gold__crumbs { padding-block: 0; margin-bottom: 4px; }
.gold__grid--solo { grid-template-columns: minmax(0, 1fr); }
.gold__grid--solo .parc__title { max-width: 28ch; }

.gold__kicker {
	display: inline-flex; align-items: center; gap: 8px;
	margin-bottom: 10px;
	font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
	color: var(--c-brand-600);
}
.gold__kicker .ico { width: 18px; height: 18px; }
.gold__kicker a:hover { text-decoration: underline; }

.gold__title { max-width: 24ch; }
.gold__lead strong { color: var(--c-ink); font-weight: 700; }
.gold__lead a { color: var(--c-brand-700); text-decoration: underline; text-underline-offset: 2px; }

.gold__stamp { flex-wrap: wrap; row-gap: 2px; font-variant-numeric: tabular-nums; }
.gold__stamp time { font-weight: 700; }
.gold__stamp-sub { color: var(--c-muted); }
.gold__stamp-sub time { font-weight: 500; }

/* Chấm "đang cập nhật trực tiếp" */
.gold__live {
	position: relative;
	width: 9px; height: 9px; flex: none;
	border-radius: 50%;
	background: var(--c-up);
}
.gold__live::after {
	content: "";
	position: absolute; inset: -4px;
	border-radius: 50%;
	border: 2px solid var(--c-up);
	opacity: .35;
	animation: gold-pulse 2s ease-out infinite;
}
@keyframes gold-pulse { from { transform: scale(.6); opacity: .5; } to { transform: scale(1.3); opacity: 0; } }

.gold .cstat2 a.cstat2__value:hover { color: var(--c-brand-700); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Khối nội dung
   -------------------------------------------------------------------------- */
.gold-sec { scroll-margin-top: 24px; }
.gold-sec + .gold-sec,
.gold .lender__main > .faq { margin-top: 8px; }
.gold .lender__main > :first-child > .lender__h2:first-child,
.gold .lender__main > .lender__h2:first-child { margin-top: 0; }
.gold .riders__lead a { color: var(--c-brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* Thông báo (nguồn tạm lỗi, ngày đang diễn ra…) */
.gold-note {
	display: flex; align-items: flex-start; gap: 10px;
	margin-bottom: 20px;
	padding: 14px 18px;
	border-radius: 12px;
	border: 1px solid var(--c-brand-200);
	border-left: 4px solid var(--c-warm-400);
	background: var(--c-brand-50);
	font-size: 15px; line-height: 1.6; color: var(--c-text);
}
.gold-note .ico { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--c-brand-700); }
.gold-note a { color: var(--c-brand-700); font-weight: 600; text-decoration: underline; }

/* Đoạn tóm tắt sinh từ số liệu */
.gold-summary {
	margin-bottom: 22px;
	padding: 18px 20px;
	border-radius: 12px;
	background: var(--c-cream);
	border: 1px solid #F2E7D5;
	font-size: 16px; line-height: 1.7; color: var(--c-text);
}
.gold-summary strong { color: var(--c-ink); }
.gold-summary a { color: var(--c-brand-700); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Bảng giá
   -------------------------------------------------------------------------- */
.gold-table__wrap { background: #fff; }
.gold-table { min-width: 560px; }
.gold-table th, .gold-table td { vertical-align: middle; }
.gold-table__num { text-align: right !important; white-space: nowrap; }
.gold-table tbody th { white-space: normal; min-width: 200px; }
.gold-table__val { display: block; font-size: 15.5px; font-weight: 700; color: var(--c-ink); }

.gold-table__group th {
	padding-block: 10px;
	background: var(--c-soft);
	font-size: 14.5px; font-weight: 700; color: var(--c-ink);
	white-space: normal;
}
.gold-table tbody tr.gold-table__group:hover th { background: var(--c-soft); }
.gold-table__group a { display: inline-flex; align-items: center; gap: 4px; color: var(--c-brand-700); }
.gold-table__group a:hover { text-decoration: underline; }
.gold-table__group a .ico { width: 14px; height: 14px; }

.gold-table__posted,
.gold-table__src,
.gold-table__stale {
	display: inline-block;
	margin-left: 8px;
	font-size: 12.5px; font-weight: 400; color: var(--c-muted);
}
.gold-table tbody th > .gold-table__posted,
.gold-table tbody th > .gold-table__stale { display: block; margin: 2px 0 0; }
.gold-table__stale { color: var(--c-down); }
.gold-table__src::before { content: "· "; }

.gold-chg { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 500; }
.gold-chg--up { color: var(--c-up); }
.gold-chg--down { color: var(--c-down); }
.gold-chg--flat { color: var(--c-muted); }

/* Ô vừa đổi giá khi tự làm mới */
.gold-flash { animation: gold-flash 1.6s ease-out; }
@keyframes gold-flash { from { background: var(--c-warm-100); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
	.gold-flash, .gold__live::after { animation: none; }
}

/* Bảng phụ (giá các ngày gần đây, biên độ…) */
.gold-mini { min-width: 0; }
.gold-mini a { color: var(--c-brand-700); font-weight: 700; }
.gold-mini a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Ô số liệu trong thân trang (giá thế giới quy đổi, chênh lệch…)
   -------------------------------------------------------------------------- */
.gold-kpis {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px;
	margin: 20px 0 6px;
}
.gold-kpi {
	display: flex; flex-direction: column; gap: 2px;
	padding: 16px 18px;
	border-radius: 12px;
	border: 1px solid var(--c-line);
	background: #fff;
}
.gold-kpi__label { font-size: 13px; color: var(--c-muted); }
.gold-kpi__value { font-size: 24px; font-weight: 800; color: var(--c-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.gold-kpi__sub { font-size: 13px; color: var(--c-text); }
a.gold-kpi:hover { border-color: var(--c-brand-300); background: var(--c-brand-50); }

/* --------------------------------------------------------------------------
   Biểu đồ SVG (vẽ trên máy chủ)
   -------------------------------------------------------------------------- */
.gold-chart {
	position: relative;
	margin: 0 0 18px;
	padding: 16px 16px 8px;
	border: 1px solid var(--c-line);
	border-radius: 12px;
	background: #fff;
}
.gold-chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 6px; }
.gold-chart__title { font-size: 15px; font-weight: 700; color: var(--c-ink); }
.gold-chart__unit { font-weight: 400; font-size: 13px; color: var(--c-muted); }
.gold-chart__legend { display: flex; gap: 14px; font-size: 13px; color: var(--c-text); }
.gold-chart__legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; border-radius: 2px; vertical-align: middle; }
.gold-chart__svg { display: block; width: 100%; height: auto; overflow: visible; }
.gold-chart__empty { padding: 20px 0; font-size: 14px; color: var(--c-muted); }
.gold-chart__tip {
	position: absolute; pointer-events: none;
	padding: 7px 10px;
	border: 1px solid var(--c-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: var(--sh-2);
	font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.gold-chart__tip[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Phân trang ngày trước / ngày sau
   -------------------------------------------------------------------------- */
.gold-pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.gold-pager a { flex: 1 1 220px; max-width: 360px; }
.gold-pager a[rel="next"] { margin-left: auto; justify-content: flex-end; }

/* Danh sách ngày theo tháng (lịch sử giá vàng) */
.gold-month + .gold-month { margin-top: 22px; }
.gold-month__title { margin-bottom: 10px; font-size: 16.5px; font-weight: 700; color: var(--c-ink); }
.gold-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.gold-dates a {
	display: block;
	padding: 8px 12px;
	border: 1px solid var(--c-line-soft);
	border-radius: 8px;
	font-size: 14px; color: var(--c-text);
	font-variant-numeric: tabular-nums;
}
.gold-dates a:hover { border-color: var(--c-brand-200); background: var(--c-brand-50); color: var(--c-brand-700); }

/* --------------------------------------------------------------------------
   Cụm liên kết nội bộ
   -------------------------------------------------------------------------- */
.gold-links { margin-top: 36px; }
.gold-links + .gold-links { margin-top: 22px; }
.gold-links__title { margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--c-muted); }
.gold-links__list { display: flex; flex-wrap: wrap; gap: 8px; }
.gold-links__item {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 12px 8px 15px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-pill);
	background: #fff;
	font-size: 14px; font-weight: 500; color: var(--c-text);
	transition: border-color .2s, background-color .2s, color .2s;
}
.gold-links__item .ico { width: 14px; height: 14px; color: var(--c-muted); }
.gold-links__item:hover { border-color: var(--c-brand-200); background: var(--c-brand-50); color: var(--c-brand-700); }
.gold-links__item[aria-current="page"] { border-color: var(--c-brand-600); color: var(--c-brand-700); font-weight: 700; }

/* Ghi nguồn cuối trang */
.gold-source {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 1px solid var(--c-line-soft);
	font-size: 13.5px; line-height: 1.65; color: var(--c-muted);
}
.gold-source a { color: var(--c-brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* Trang nguồn dữ liệu: trạng thái */
.gold-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.gold-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.gold-status--ok { color: var(--c-up); }
.gold-status--err { color: var(--c-down); }

@media (max-width: 560px) {
	.gold-table tbody th { min-width: 150px; }
	.gold-table th, .gold-table td { padding: 11px 12px; }
	.gold-kpi__value { font-size: 21px; }
}
