/**
 * Gold rate pages (/price/gold/ and /price/gold-dubai/).
 * Ported from the approved "Gold Rate Today" design (warm gold rate card,
 * calculator, trend, tables, FAQ). Everything is scoped under .nbg so it
 * cannot leak into the rest of the site; html.nb-dark gets a dark palette.
 */

/* ---- Page background (light only; dark mode keeps the site's own) ---- */
body.nb-gold-page { background: #FFFCF6; }
html.nb-dark body.nb-gold-page { background: var(--wp--preset--color--base); }

/* ---- Heading block that lives in the site template: eyebrow + H1 ---- */
.nb-gold-page .nb-archive-head .nb-eyebrow { font: 700 12px/1.2 Inter, system-ui, sans-serif; letter-spacing: .14em; color: #B7862A; margin-top: 4px; }
html.nb-dark .nb-gold-page .nb-archive-head .nb-eyebrow { color: #E7C873; }
.nb-gold-page .nb-archive-head h1 { font: 800 clamp(30px, 5vw, 48px)/1.05 Archivo, "Arial Narrow", Arial, sans-serif; letter-spacing: -.02em; text-wrap: balance; }
.nb-gold-page .nb-archive-head .nb-breadcrumbs ol { font-size: 13px; margin-bottom: 4px; }
/* The heading block is a grid: let the column shrink to the screen so wide tables scroll inside their own box. */
.nb-gold-page .nb-archive-head { grid-template-columns: minmax(0, 1fr); }

/* ---- Palette ---- */
.nbg {
	--bg: #FFFCF6; --surface: #FFFFFF; --ink: #231A0B; --muted: #76694F; --line: #EFE3CB;
	--gold: #B7862A; --goldsoft: #FFF4DA; --goldink: #6A4A0A; --up: #12884A; --down: #D7261E; --dot: #1E9E5A;
	--hero-a: #FFF8E6; --hero-b: #FCE7B2; --hero-line: #EBCB85; --hero-shadow: rgba(183, 134, 42, .18); --tile-line: #F0DDAE;
	--on-bg: #231A0B; --on-fg: #FFFFFF; --chip-mix: #FFFFFF;
	--display: Archivo, "Arial Narrow", Arial, sans-serif;
	--body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
	--indic: "Noto Sans Tamil", "Noto Sans Malayalam", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Telugu", "Noto Sans Kannada", "Noto Sans Gujarati", "Noto Sans Arabic", var(--body);
	color: var(--ink); font: 400 16px/1.55 var(--body); max-width: 1080px; width: 100%; min-width: 0; margin: 0; padding: 0 0 8px;
	color-scheme: light;
}
html.nb-dark .nbg {
	--bg: #0A0A0B; --surface: #141416; --ink: #F4EEDF; --muted: #A9A08C; --line: #2E2A22;
	--gold: #E7C873; --goldsoft: #2A2312; --goldink: #F2D58E; --up: #3CCB7F; --down: #FF7A70; --dot: #3CCB7F;
	--hero-a: #1D170B; --hero-b: #2B2110; --hero-line: #4A3A18; --hero-shadow: rgba(0, 0, 0, .45); --tile-line: #3A2F18;
	--on-bg: #E7C873; --on-fg: #1F1606; --chip-mix: #141416;
	color-scheme: dark;
}
.nbg, .nbg *, .nbg *::before, .nbg *::after { box-sizing: border-box; }
.nbg [hidden] { display: none !important; }
.nbg .num { font-variant-numeric: tabular-nums; }
.nbg a { color: inherit; }
.nbg :focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Intro: Indic line, jump links, country switch ---- */
.nbg .indic { font: 600 15px/1.4 var(--indic); color: var(--gold); margin: 8px 0 0; }
.nbg .jump { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 18px; }
.nbg .jump a { font: 600 13px var(--body); color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; }
.nbg .jump a:hover { border-color: var(--gold); }
.nbg .mkt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.nbg .mkt-l { font: 600 13px var(--body); color: var(--muted); }
.nbg .mkt-s { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.nbg .mkt-s a { font: 700 14px var(--body); color: var(--muted); text-decoration: none; border-radius: 999px; padding: 8px 16px; white-space: nowrap; }
.nbg .mkt-s a small { font: 600 12px var(--body); opacity: .75; margin-left: 4px; }
.nbg .mkt-s a:not([aria-current]):hover { color: var(--ink); }
.nbg .mkt-s a[aria-current="page"] { background: var(--on-bg); color: var(--on-fg); }

/* ---- Section scaffolding ---- */
.nbg section { margin-top: 44px; scroll-margin-top: 16px; }
.nbg section#today { margin-top: 0; }
.nbg h2 { font: 800 clamp(22px, 3vw, 28px)/1.15 var(--display); letter-spacing: -.01em; margin: 0 0 6px; color: var(--ink); }
.nbg .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; max-width: 65ch; }
.nbg .foot { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.nbg .foot a { text-decoration-color: var(--gold); text-underline-offset: 2px; }

/* ---- Hero rate card ---- */
.nbg .hero { background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); color: var(--ink); border-radius: 24px; padding: 26px; position: relative; overflow: hidden; border: 1px solid var(--hero-line); box-shadow: 0 18px 50px var(--hero-shadow); }
.nbg .hrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.nbg .seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.nbg .seg button { font: 700 14px var(--body); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.nbg .seg button[aria-pressed="true"] { background: var(--on-bg); color: var(--on-fg); }
.nbg .updated { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.nbg .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot) 18%, transparent); }
.nbg .big { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.nbg .price { font: 900 clamp(52px, 10vw, 92px)/.9 var(--display); letter-spacing: -.035em; color: var(--ink); }
.nbg .price.long { font-size: clamp(34px, 8.4vw, 80px); }
.nbg .price small { font: 700 .32em var(--body); letter-spacing: 0; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.nbg .chg { display: inline-flex; align-items: center; gap: 6px; font: 800 15px var(--body); border-radius: 999px; padding: 7px 13px; margin-bottom: 8px; }
.nbg .chg.down { background: color-mix(in srgb, var(--down) 12%, var(--chip-mix)); color: var(--down); }
.nbg .chg.up { background: color-mix(in srgb, var(--up) 12%, var(--chip-mix)); color: var(--up); }
.nbg .units { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.nbg .units button { font: 700 14px var(--body); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 14px; cursor: pointer; text-align: left; }
.nbg .units button span { display: block; font: 500 11.5px var(--body); color: var(--muted); }
.nbg .units button[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.nbg .trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.nbg .trio.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nbg .trio div { background: var(--surface); border: 1px solid var(--tile-line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.nbg .trio b { display: block; font: 800 22px var(--display); color: var(--ink); }
.nbg .trio span { font-size: 12.5px; color: var(--muted); }
.nbg .trio em { font-style: normal; font-weight: 700; font-size: 12.5px; }
.nbg .trio em.dn { color: var(--down); }
.nbg .trio em.upc { color: var(--up); }
.nbg .summary { margin: 20px 0 0; font-size: 15px; color: var(--ink); max-width: 62ch; }
.nbg .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.nbg .btn { font: 700 14.5px var(--body); border-radius: 12px; padding: 11px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; }
.nbg .btn.wa { background: #25D366; color: #062B14; }
.nbg .btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.nbg .toast { font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 8px; }
@media (prefers-reduced-motion: no-preference) { .nbg .pin, .nbg .btn, .nbg .units button { transition: all .15s ease; } }

/* ---- Where today sits in the month ---- */
.nbg .gauge { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-top: 14px; }
.nbg .gauge-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.nbg .track { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #12884A, #E7C15A, #D7261E); margin: 26px 0 10px; }
.nbg .pin { position: absolute; top: -24px; transform: translateX(-50%); font: 800 12px var(--body); background: var(--ink); color: var(--bg); border-radius: 6px; padding: 3px 7px; white-space: nowrap; }
.nbg .pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.nbg .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.nbg .ends b { color: var(--ink); }
.nbg .tip { font-size: 14px; color: var(--muted); }
.nbg .tip b { color: var(--ink); }

/* ---- Calculator ---- */
.nbg .card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.nbg .card > p { margin: 0; }
.nbg .tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; flex-wrap: wrap; }
.nbg .tabs button { font: 700 14.5px var(--body); color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 4px; margin-right: 14px; cursor: pointer; }
.nbg .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.nbg .fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .nbg .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nbg label.f { display: flex; flex-direction: column; gap: 6px; font: 600 13px var(--body); color: var(--muted); min-width: 0; }
.nbg .f input, .nbg .f select { width: 100%; font: 600 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.nbg .chk { display: flex; align-items: center; gap: 8px; font: 600 14px var(--body); margin-top: 14px; color: var(--ink); }
.nbg .chk input { width: 18px; height: 18px; accent-color: var(--gold); }
.nbg .bill { margin-top: 18px; background: var(--goldsoft); border-radius: 16px; padding: 16px 18px; }
.nbg .bill .r { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 15px; }
.nbg .bill .r + .r { border-top: 1px dashed color-mix(in srgb, var(--gold) 35%, transparent); }
.nbg .bill .t { font: 800 22px var(--display); color: var(--goldink); }
.nbg .bill .t span:first-child { font: 700 15px var(--body); color: var(--ink); align-self: center; }
.nbg .note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* ---- Chart ---- */
.nbg .chartbox { position: relative; }
.nbg .chartbox svg { display: block; width: 100%; height: auto; }
.nbg .legend { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nbg .seg2 { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.nbg .seg2 button { font: 700 13px var(--body); color: var(--muted); background: none; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.nbg .seg2 button[aria-pressed="true"] { background: var(--on-bg); color: var(--on-fg); }

/* ---- Tables ---- */
.nbg .tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.nbg table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14.5px; margin: 0; }
.nbg th { font: 700 12px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.nbg th:first-child, .nbg td:first-child { text-align: left; }
.nbg td { padding: 12px 16px; text-align: right; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; }
.nbg tr:last-child td { border-bottom: 0; }
.nbg td small { display: block; font-size: 12px; font-weight: 700; }
.nbg .dn { color: var(--down); }
.nbg .upc { color: var(--up); }
.nbg td .w { font-weight: 700; }
.nbg td .w span { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.nbg tr.today td { background: var(--goldsoft); }

/* ---- Months ---- */
.nbg .months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nbg .mo { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.nbg .mo span { font-size: 13px; color: var(--muted); }
.nbg .mo b { display: block; font: 800 20px var(--display); }

/* ---- FAQ ---- */
.nbg details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.nbg details + details { margin-top: 10px; }
.nbg summary { font: 700 16px var(--body); cursor: pointer; color: var(--ink); }
.nbg details p { margin: 10px 0 0; color: var(--muted); max-width: 68ch; }
.nbg .disclaim { font-size: 12.5px; color: var(--muted); margin: 28px 0 0; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---- Promo banner sits under the rate box ---- */
.nbg > .nb-ad { margin: 14px 0 0; }
.nbg > .nb-ad .nb-ad-unit { max-width: 100%; overflow: hidden; }

/* ---- Phones ---- */
@media (max-width: 560px) {
	.nbg .hero { padding: 20px 16px; border-radius: 20px; }
	.nbg .trio { grid-template-columns: minmax(0, 1fr); }
	.nbg .trio.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nbg .seg button { padding: 8px 13px; }
	.nbg .units button { padding: 8px 11px; }
	.nbg .card { padding: 16px; }
	.nbg .gauge { padding: 16px; }
}

/* ---- Two columns: rate page + link sidebar ---- */
.nbg-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
@media (min-width: 1100px) { .nbg-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.nbg-layout > .nbg { max-width: none; }
.nbg .card p + p { margin-top: 12px; }
.nbg .card a { text-decoration-color: var(--gold); text-underline-offset: 2px; }
.nbg a.mo { text-decoration: none; color: inherit; display: block; }
.nbg a.mo:hover { border-color: var(--gold); }
.nbg a.mo b { color: var(--ink); font-size: 18px; }

/* ---- Sidebar lists (cities, countries, other pages) ---- */
.nbs { --ink: #231A0B; --muted: #76694F; --line: #EFE3CB; --gold: #B7862A; --surface: #FFFFFF; font-family: Inter, system-ui, sans-serif; color: var(--ink); }
html.nb-dark .nbs { --ink: #F4EEDF; --muted: #A9A08C; --line: #2E2A22; --gold: #E7C873; --surface: #141416; }
.nbs-box + .nbs-box { margin-top: 28px; }
.nbs h2 { font: 800 22px/1.2 Archivo, "Arial Narrow", Arial, sans-serif; letter-spacing: -.01em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); color: var(--ink); }
.nbs ul { list-style: none; margin: 0; padding: 4px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.nbs li + li { border-top: 1px solid var(--line); }
.nbs li a { display: flex; align-items: center; gap: 10px; padding: 13px 0; color: var(--ink); text-decoration: none; font-size: 15.5px; line-height: 1.3; }
.nbs li a::before { content: "»"; color: var(--gold); font-weight: 800; font-size: 20px; line-height: 1; }
.nbs li a:hover { color: var(--gold); }
.nbs li a[aria-current="page"] { font-weight: 700; color: var(--gold); }
@media (min-width: 1100px) { .nbs { position: sticky; top: 16px; } }
