/* TradeSao – Lịch sử giá vàng SJC · v1.1 */
.tsgh{
	--ink:#161b26;--ink-2:#4b5563;--mut:#6b7280;--line:#e7e5df;--line-2:#f0eee8;
	--bg:#fff;--soft:#faf8f3;--soft-2:#f5f2ea;
	--gold:#b07a0c;--gold-soft:#fbf3de;--gold-line:#ecd9a6;
	--navy:#101a2e;--navy-2:#1b2a47;
	--up:#0b7a43;--up-bg:#e7f5ed;--down:#c62828;--down-bg:#fdecea;--flat:#6b7280;--flat-bg:#f1f1ef;
	--s-sell:#b07a0c;--s-buy:#2f6fb2;
	--r:14px;--r-sm:10px;
	color:var(--ink);font-size:15px;line-height:1.55;overflow-wrap:anywhere;
	/* Căn theo khung header JNews: tối đa 1330px, lề 15px, ở giữa */
	width:100%;max-width:1330px;margin:0 auto;padding:0 15px;
	font-variant-numeric:tabular-nums;
}
.jnews-dark-mode .tsgh{
	--ink:#eef0f4;--ink-2:#c5c9d2;--mut:#9aa1ad;--line:#2c313b;--line-2:#242830;
	--bg:#1a1d23;--soft:#20242b;--soft-2:#262a32;
	--gold:#d9a53a;--gold-soft:#2b2618;--gold-line:#4a3f22;
	--up:#4cc38a;--up-bg:#173026;--down:#f28b82;--down-bg:#3a1f1f;--flat:#9aa1ad;--flat-bg:#2a2e36;
	--s-sell:#b57f14;--s-buy:#5b96da;
}
.tsgh *,.tsgh *::before,.tsgh *::after{box-sizing:border-box}
.tsgh a{color:inherit}
.tsgh .screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.tsgh .tsgh-muted{color:var(--mut);font-size:13px;margin:0}
.tsgh .tsgh-below{margin-top:8px}
.tsgh .tsgh-h{font-size:20px;line-height:1.3;font-weight:700;margin:0;letter-spacing:-.01em}
.tsgh .tsgh-h3{font-size:16px;font-weight:700;margin:20px 0 10px}
.tsgh .tsgh-sec{margin:32px 0 0;scroll-margin-top:90px}
.tsgh .tsgh-sec-head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;justify-content:space-between;margin:0 0 12px}
.tsgh .tsgh-sec-note{margin:0;font-size:13px;color:var(--mut)}
.tsgh .tsgh-link{font-size:14px;font-weight:600;color:var(--gold);text-decoration:none;white-space:nowrap}
.tsgh .tsgh-link:hover{text-decoration:underline}
.tsgh .tsgh-card{background:var(--bg);border:1px solid var(--line);border-radius:var(--r);padding:18px}

/* ---------- Pill ---------- */
.tsgh .tsgh-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:3px 9px;font-size:13px;font-weight:600;line-height:1.3;white-space:nowrap}
.tsgh .tsgh-pill.is-up{color:var(--up);background:var(--up-bg)}
.tsgh .tsgh-pill.is-down{color:var(--down);background:var(--down-bg)}
.tsgh .tsgh-pill.is-flat{color:var(--flat);background:var(--flat-bg)}
.tsgh .tsgh-pill.is-sm{font-size:12px;padding:2px 7px}
.tsgh .tsgh-pill span[aria-hidden]{font-size:.75em}
.tsgh .tsgh-pill-pct{font-weight:500;opacity:.85}

/* ---------- Hero ---------- */
.tsgh-hero{background:linear-gradient(145deg,var(--navy) 0%,var(--navy-2) 100%);color:#fff;border-radius:18px;padding:22px;position:relative;overflow:hidden}
.tsgh-hero::after{content:"";position:absolute;right:-60px;top:-60px;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,rgba(217,165,58,.35),rgba(217,165,58,0) 70%);pointer-events:none}
.tsgh-hero-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 16px;align-items:flex-start;position:relative;z-index:1}
.tsgh .tsgh-hero-title{font-size:22px;font-weight:800;margin:0;color:#fff;line-height:1.25}
.tsgh-hero-sub{margin:2px 0 0;font-size:13px;color:rgba(255,255,255,.7)}
.tsgh-live{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:13px;color:rgba(255,255,255,.85);background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:5px 12px}
.tsgh-dot{width:8px;height:8px;border-radius:50%;background:#4cc38a;box-shadow:0 0 0 0 rgba(76,195,138,.6);animation:tsgh-pulse 2s infinite}
@keyframes tsgh-pulse{0%{box-shadow:0 0 0 0 rgba(76,195,138,.55)}70%{box-shadow:0 0 0 8px rgba(76,195,138,0)}100%{box-shadow:0 0 0 0 rgba(76,195,138,0)}}
@media (prefers-reduced-motion:reduce){.tsgh-dot{animation:none}}
.tsgh-quote{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0 0;position:relative;z-index:1}
.tsgh-q{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:6px;min-width:0}
.tsgh-q-main{background:rgba(217,165,58,.14);border-color:rgba(217,165,58,.45)}
.tsgh-q-lbl{font-size:13px;color:rgba(255,255,255,.72);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.tsgh-q-val{font-size:40px;line-height:1.05;font-weight:800;letter-spacing:-.02em;color:#fff}
.tsgh-q-main .tsgh-q-val{color:#f5c65b}
.tsgh-hero .tsgh-pill{align-self:flex-start}
.tsgh-hero .tsgh-pill.is-up{background:rgba(76,195,138,.18);color:#7fe0b0}
.tsgh-hero .tsgh-pill.is-down{background:rgba(242,139,130,.18);color:#ffb0a8}
.tsgh-hero .tsgh-pill.is-flat{background:rgba(255,255,255,.12);color:rgba(255,255,255,.8)}
.tsgh-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:16px 0 0;background:rgba(255,255,255,.1);border-radius:12px;overflow:hidden;position:relative;z-index:1}
.tsgh-meta>div{background:var(--navy);padding:10px 12px;min-width:0}
.tsgh-meta dt{font-size:12px;color:rgba(255,255,255,.62);margin:0}
.tsgh-meta dd{margin:2px 0 0;font-size:15px;font-weight:700;color:#fff}

/* ---------- Nav ---------- */
.tsgh-nav{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:14px 0 0;padding:2px 0}
.tsgh-nav::-webkit-scrollbar{display:none}
.tsgh .tsgh-nav a{flex:0 0 auto;text-decoration:none;font-size:14px;font-weight:600;color:var(--ink-2);background:var(--soft);border:1px solid var(--line);border-radius:999px;padding:7px 14px;transition:border-color .15s,background .15s}
.tsgh .tsgh-nav a:hover{border-color:var(--gold);color:var(--ink)}

/* ---------- Crumbs ---------- */
.tsgh-crumbs{font-size:14px;margin:18px 0 0;color:var(--mut);display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tsgh .tsgh-crumbs a{color:var(--gold);text-decoration:none;font-weight:600}
.tsgh .tsgh-crumbs a:hover{text-decoration:underline}
.tsgh-crumbs [aria-current]{color:var(--ink);font-weight:600}
.tsgh-sep{color:var(--line)}

/* ---------- Tiles ---------- */
.tsgh-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0 0}
.tsgh-tile{background:var(--soft);border:1px solid var(--line-2);border-radius:var(--r-sm);padding:12px 14px;display:flex;flex-direction:column;gap:4px;min-width:0}
.tsgh-tile-l{font-size:12px;color:var(--mut);font-weight:600}
.tsgh-tile-v{font-size:22px;font-weight:800;line-height:1.15;letter-spacing:-.01em}
.tsgh-tile-s .tsgh-pill{margin-top:2px}

/* ---------- Performance ---------- */
.tsgh-perf{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
.tsgh-perf li{margin:0;border-radius:var(--r-sm);padding:10px 12px;border:1px solid var(--line-2);background:var(--soft);display:flex;flex-direction:column;gap:2px}
.tsgh-perf-l{font-size:12px;color:var(--mut);font-weight:600}
.tsgh-perf-v{font-size:18px;font-weight:800}
.tsgh-perf-s{font-size:12px;color:var(--mut)}
.tsgh-perf li.is-up .tsgh-perf-v{color:var(--up)}
.tsgh-perf li.is-down .tsgh-perf-v{color:var(--down)}
.tsgh-perf li.is-up{background:var(--up-bg);border-color:transparent}
.tsgh-perf li.is-down{background:var(--down-bg);border-color:transparent}

/* ---------- Ticks ---------- */
.tsgh .tsgh-ticks{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--bg)}
.tsgh .tsgh-ticks li{display:grid;grid-template-columns:88px 1fr 1fr;gap:12px;align-items:center;padding:12px 16px;margin:0;border-top:1px solid var(--line-2)}
.tsgh .tsgh-ticks li:first-child{border-top:0;background:var(--gold-soft)}
.tsgh-tk-time b{display:block;font-size:17px}
.tsgh-tk-time small,.tsgh-tk-p small{display:block;font-size:12px;color:var(--mut)}
.tsgh-tk-p{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.tsgh-tk-p small{flex-basis:100%}
.tsgh-tk-p b{font-size:18px}
.tsgh-empty{background:var(--soft);border:1px dashed var(--line);border-radius:var(--r);padding:16px}
.tsgh-empty p{margin:0 0 6px}
.tsgh-empty p:last-child{margin:0}

/* ---------- Pager / buttons ---------- */
.tsgh-pager{display:flex;justify-content:space-between;gap:8px;margin:16px 0 0}
.tsgh .tsgh-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:9px 14px;font-size:14px;font-weight:600;background:var(--bg);color:var(--ink);text-decoration:none;cursor:pointer;line-height:1.2;transition:border-color .15s}
.tsgh .tsgh-btn:hover{border-color:var(--gold)}
.tsgh .tsgh-btn-p{background:var(--navy);border-color:var(--navy);color:#fff}
.tsgh .tsgh-btn-p:hover{background:var(--navy-2)}

/* ---------- Segmented ---------- */
.tsgh .tsgh-seg{display:flex;gap:4px;background:var(--soft-2);border-radius:10px;padding:4px;overflow-x:auto;scrollbar-width:none}
.tsgh .tsgh-seg::-webkit-scrollbar{display:none}
.tsgh .tsgh-seg button{flex:1 0 auto;border:0;background:transparent;border-radius:7px;padding:7px 10px;font-size:13px;font-weight:600;color:var(--ink-2);cursor:pointer;line-height:1.2;margin:0;min-height:34px}
.tsgh .tsgh-seg button:hover{color:var(--ink)}
.tsgh .tsgh-seg button[aria-pressed=true]{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px rgba(16,26,46,.14)}
.tsgh .tsgh-seg button:focus-visible,.tsgh .tsgh-btn:focus-visible,.tsgh a:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* ---------- Chart ---------- */
.tsgh .tsgh-chart-card{padding:18px}
.tsgh-switch{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-2);cursor:pointer;margin:0}
.tsgh-switch input{accent-color:var(--s-buy);margin:0}
.tsgh-sum{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:baseline;margin:14px 0 6px;font-size:13px;color:var(--mut);min-height:24px}
.tsgh-sum b{color:var(--ink);font-size:15px}
.tsgh-chart{position:relative;width:100%;min-height:260px;touch-action:pan-y;user-select:none}
.tsgh-chart svg{display:block;max-width:100%;overflow:visible}
.tsgh-tip{position:absolute;top:6px;z-index:2;pointer-events:none;background:var(--bg);border:1px solid var(--line);border-radius:10px;box-shadow:0 6px 18px rgba(16,26,46,.14);padding:8px 10px;font-size:13px;min-width:150px}
.tsgh-tip-d{color:var(--mut);font-size:12px;margin-bottom:4px}
.tsgh-tip-r{display:flex;align-items:center;gap:8px;justify-content:space-between}
.tsgh-tip-r b{font-size:15px}
.tsgh-tip-k{display:inline-block;width:12px;height:2px;border-radius:2px;margin-right:6px;vertical-align:middle}
.tsgh-legend{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;font-size:13px;margin-top:10px}
.tsgh-legend .tsgh-pick{margin-left:auto}
.tsgh-k{display:inline-block;width:16px;height:3px;border-radius:2px;vertical-align:middle;margin-right:6px}
.tsgh-k-s{background:var(--s-sell)}
.tsgh-k-b{background:var(--s-buy)}
.tsgh .tsgh-chart-card .tsgh-seg{margin-top:10px}

/* ---------- Tables ---------- */
.tsgh-tw{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--r);background:var(--bg)}
.tsgh .tsgh-t{width:100%;border-collapse:collapse;margin:0;font-size:14px;border:0}
.tsgh .tsgh-t th,.tsgh .tsgh-t td{padding:10px 12px;border:0;border-bottom:1px solid var(--line-2);text-align:right;white-space:nowrap;vertical-align:middle;background:transparent}
.tsgh .tsgh-t th:first-child,.tsgh .tsgh-t td:first-child{text-align:left}
.tsgh .tsgh-t thead th{background:var(--soft);font-weight:600;font-size:12px;color:var(--mut);text-transform:uppercase;letter-spacing:.04em}
.tsgh .tsgh-t tbody tr:last-child>*{border-bottom:0}
.tsgh .tsgh-t tbody tr:hover>*{background:var(--soft)}
.tsgh .tsgh-t tbody th a{font-weight:700;color:var(--gold);text-decoration:none}
.tsgh .tsgh-t tbody th a:hover{text-decoration:underline}
.tsgh .tsgh-t tr.is-cur>*{background:var(--gold-soft)}
.tsgh .tsgh-t td a{color:var(--gold);font-weight:600;text-decoration:none}
.tsgh .tsgh-col-range{min-width:170px;text-align:left!important}
.tsgh-range-txt{display:block;font-size:12px;color:var(--mut);margin-bottom:4px}
.tsgh-range{display:block;position:relative;height:6px;background:var(--line-2);border-radius:999px}
.tsgh-range-bar{position:absolute;top:0;bottom:0;background:var(--gold-line);border-radius:999px}
.tsgh-range-mk{position:absolute;top:-3px;width:3px;height:12px;margin-left:-1.5px;background:var(--gold);border-radius:2px}
.tsgh-details{margin-top:14px}
.tsgh-details summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--gold);margin-bottom:10px}

/* ---------- Calendar ---------- */
.tsgh-cal{margin-top:16px;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--bg)}
.tsgh-cal-row,.tsgh-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.tsgh-cal-hd span{padding:8px 4px;text-align:center;font-size:12px;font-weight:700;color:var(--mut);background:var(--soft);text-transform:uppercase}
.tsgh .tsgh-cal-c{display:flex;flex-direction:column;gap:2px;min-height:74px;padding:6px 8px;border-top:1px solid var(--line-2);border-left:1px solid var(--line-2);text-decoration:none;color:var(--ink);position:relative}
.tsgh .tsgh-cal-c:nth-child(7n+1){border-left:0}
.tsgh .tsgh-cal-c.is-pad,.tsgh .tsgh-cal-c.is-none{background:var(--soft)}
.tsgh .tsgh-cal-c.is-none .tsgh-cal-d{color:var(--mut)}
.tsgh a.tsgh-cal-c:hover{background:var(--gold-soft)}
.tsgh-cal-d{font-size:12px;font-weight:700;color:var(--ink-2)}
.tsgh-cal-v{font-size:15px;font-weight:800;margin-top:auto}
.tsgh-cal-x{font-size:11px;font-weight:700}
.tsgh .tsgh-cal-c.is-up .tsgh-cal-x{color:var(--up)}
.tsgh .tsgh-cal-c.is-down .tsgh-cal-x{color:var(--down)}
.tsgh .tsgh-cal-c.is-flat .tsgh-cal-x{color:var(--flat)}
.tsgh .tsgh-cal-c.is-up{box-shadow:inset 0 3px 0 var(--up)}
.tsgh .tsgh-cal-c.is-down{box-shadow:inset 0 3px 0 var(--down)}
.tsgh .tsgh-cal-c.is-today{outline:2px solid var(--gold);outline-offset:-2px}

/* ---------- Month cards ---------- */
.tsgh-months{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin-top:16px}
.tsgh .tsgh-mcard{display:flex;flex-direction:column;gap:6px;border:1px solid var(--line);border-radius:var(--r-sm);padding:12px 14px;background:var(--bg);text-decoration:none;color:var(--ink);transition:border-color .15s,transform .15s}
.tsgh .tsgh-mcard:hover{border-color:var(--gold);transform:translateY(-1px)}
.tsgh-mcard-m{font-size:12px;font-weight:700;color:var(--mut);text-transform:uppercase;letter-spacing:.04em}
.tsgh-mcard-v{font-size:22px;font-weight:800;line-height:1.1}
.tsgh .tsgh-mcard .tsgh-pill{align-self:flex-start}
.tsgh-mcard .tsgh-range{margin-top:6px}
.tsgh-mcard-r{font-size:12px;color:var(--mut)}

/* ---------- Tools ---------- */
.tsgh-tools{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tsgh-tools .tsgh-h{font-size:17px}
.tsgh-tools .tsgh-muted{margin:2px 0 12px}
.tsgh-row{display:flex;flex-wrap:wrap;gap:8px}
.tsgh .tsgh-row input{flex:1 1 150px;min-width:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:15px;background:var(--bg);color:var(--ink);height:auto;margin:0;box-shadow:none}
.tsgh .tsgh-row input:focus{outline:2px solid var(--gold);outline-offset:1px;border-color:var(--gold)}
.tsgh-row .tsgh-seg{flex:1 1 200px}
.tsgh-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.tsgh .tsgh-chips a{font-size:13px;font-weight:600;color:var(--ink-2);text-decoration:none;border:1px solid var(--line);border-radius:999px;padding:5px 11px}
.tsgh .tsgh-chips a:hover{border-color:var(--gold);color:var(--ink)}
.tsgh-calc-out{margin:14px 0 0;display:grid;gap:8px}
.tsgh-calc-out>div{display:flex;justify-content:space-between;gap:10px;align-items:baseline;background:var(--soft);border-radius:10px;padding:10px 12px}
.tsgh-calc-out dt{font-size:13px;color:var(--ink-2);margin:0}
.tsgh-calc-out dd{margin:0;font-weight:800;font-size:17px;text-align:right}
.tsgh-calc-out .tsgh-c-spread-row{background:transparent;padding:2px 12px}
.tsgh-calc-out .tsgh-c-spread-row dd{font-size:14px;color:var(--mut);font-weight:600}

/* ---------- FAQ / foot ---------- */
.tsgh-faq details{border:1px solid var(--line);border-radius:var(--r-sm);padding:0 16px;margin:0 0 8px;background:var(--bg)}
.tsgh-faq summary{cursor:pointer;font-weight:700;padding:13px 0;list-style:none;position:relative;padding-right:24px}
.tsgh-faq summary::-webkit-details-marker{display:none}
.tsgh-faq summary::after{content:"+";position:absolute;right:0;top:10px;font-size:20px;color:var(--gold);font-weight:400}
.tsgh-faq details[open] summary::after{content:"−"}
.tsgh-faq details p{margin:0 0 14px;color:var(--ink-2)}
.tsgh .tsgh-foot{font-size:12px;color:var(--mut);margin:24px 0 0;line-height:1.6}
.tsgh .tsgh-foot a{color:var(--gold)}

/* Trang dùng mẫu Elementor toàn chiều rộng (không có tiêu đề/khung của theme) */
.tsgh.is-bare{padding-top:28px;padding-bottom:48px}
/* Khi nằm trong khung nội dung của theme thì không cần lề riêng */
.jeg_main .tsgh,.entry-content .tsgh,.content-inner .tsgh{padding-left:0;padding-right:0;max-width:100%}
.jeg_main .tsgh.is-bare,.entry-content .tsgh.is-bare{padding-left:0;padding-right:0}

/* ---------- Responsive ---------- */
@media (max-width:767px){
	.tsgh.is-bare{max-width:calc(100% - 10px)}
}
@media (max-width:479px){
	.tsgh.is-bare{max-width:100%}
}
@media (max-width:760px){
	.tsgh-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
	.tsgh-tools{grid-template-columns:1fr}
}
@media (max-width:600px){
	.tsgh{font-size:14px}
	.tsgh-hero{padding:16px;border-radius:16px}
	.tsgh .tsgh-hero-title{font-size:19px}
	.tsgh-quote{gap:8px;margin-top:14px}
	.tsgh-q{padding:12px}
	.tsgh-q-val{font-size:30px}
	.tsgh-q-lbl{font-size:12px}
	.tsgh .tsgh-h{font-size:18px}
	.tsgh .tsgh-sec{margin-top:26px}
	.tsgh .tsgh-card{padding:14px}
	.tsgh-tile-v{font-size:19px}
	.tsgh .tsgh-ticks li{grid-template-columns:60px 1fr 1fr;gap:8px;padding:10px 12px}
	.tsgh-tk-time b{font-size:15px}
	.tsgh-tk-p b{font-size:16px}
	.tsgh .tsgh-hide-sm{display:none}
	.tsgh .tsgh-t th,.tsgh .tsgh-t td{padding:9px 8px;font-size:13px}
	.tsgh .tsgh-col-range{min-width:0}
	.tsgh .tsgh-col-range .tsgh-range{display:none}
	.tsgh .tsgh-col-range .tsgh-range-txt{margin:0;font-size:12px}
	.tsgh-perf{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
	.tsgh-perf li{padding:8px 9px}
	.tsgh-perf-v{font-size:15px}
	.tsgh-perf-s{font-size:11px}
	.tsgh .tsgh-cal-c{min-height:58px;padding:4px 4px}
	.tsgh-cal-v{font-size:12px}
	.tsgh-cal-x{font-size:10px}
	.tsgh-months{grid-template-columns:repeat(2,minmax(0,1fr))}
	.tsgh-mcard-v{font-size:19px}
	.tsgh .tsgh-seg button{padding:7px 6px;font-size:12px}
}
@media (max-width:380px){
	.tsgh .tsgh-cal-c .tsgh-cal-x{display:none}
}
