/* =====================================================================
   GoldRates Hub — stylesheet (no external fonts, no framework)
   Palette: porcelain #F5F6F4 · ink #14231F · assay green #1E4D43
            gold #B07D1A / #D9A93A (live figures only) · up #1F7A4D · down #B23A2E
   ===================================================================== */
:root {
  --bg: #F5F6F4;
  --surface: #FFFFFF;
  --surface-2: #EDF0EC;
  --ink: #14231F;
  --ink-2: #3B4A45;
  --muted: #5E6C67;
  --line: #DDE3DD;
  --line-2: #C6CFC7;
  --brand: #1E4D43;          /* assay green: header mark, buttons */
  --accent: #1E4D43;         /* links and active states */
  --accent-tint: #E2EDE8;
  --gold: #B07D1A;           /* large live figures */
  --gold-ink: #8A6212;       /* small live figures (AA contrast on white) */
  --gold-2: #D9A93A;         /* gold on dark backgrounds */
  --gold-tint: #FBF4E4;
  --up: #1F7A4D;
  --down: #B23A2E;
  --deep: #14231F;           /* ticker and footer */
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgba(20, 35, 31, .05), 0 6px 20px rgba(20, 35, 31, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1412;
    --surface: #131D1A;
    --surface-2: #19251F;
    --ink: #E8EEEA;
    --ink-2: #C3CDC8;
    --muted: #8E9C96;
    --line: #22312C;
    --line-2: #2E3F39;
    --brand: #1E4D43;
    --accent: #86C9B4;
    --accent-tint: #15302A;
    --gold: #E2B54B;
    --gold-ink: #E2B54B;
    --gold-2: #E9C46A;
    --gold-tint: #241F12;
    --up: #4CC28A;
    --down: #F07F71;
    --deep: #09100E;
    --shadow: none;
    color-scheme: dark;
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.22; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.45rem); letter-spacing: -.022em; margin: 8px 0 10px; }
h2 { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); letter-spacing: -.012em; }
p { text-wrap: pretty; }
small { font-size: .8em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
main.wrap { padding-bottom: 40px; min-height: 60vh; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }
.flag { display: inline-block; vertical-align: -3px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); object-fit: cover; }

/* ---------------------------------------------------------------- ticker */
.ticker { background: var(--deep); color: #DCE4E0; font-size: .8rem; }
.ticker-in { display: flex; gap: 26px; overflow-x: auto; white-space: nowrap; padding: 7px 22px; scrollbar-width: none; }
.ticker-in::-webkit-scrollbar { display: none; }
.ticker b { font-weight: 600; color: #9FB3AB; margin-right: 4px; }
.ticker .lv, .ticker [data-fx] { color: var(--gold-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.ticker .chg { font-size: .78rem; margin-left: 2px; }
.ticker .chg.up { color: #63D69E; }
.ticker .chg.down { color: #FF9183; }

/* ---------------------------------------------------------------- header */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; position: relative; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 760; font-size: 1.06rem; letter-spacing: -.01em; }
.logo svg { flex: none; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 8px 11px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 560; font-size: .93rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); }
.nav .lang { margin-left: 8px; border: 1px solid var(--line-2); font-size: .86rem; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 .9rem var(--font); cursor: pointer; }
.menu-btn::before { content: ""; width: 16px; height: 12px; background: linear-gradient(currentColor 0 0) top / 100% 2px no-repeat, linear-gradient(currentColor 0 0) center / 100% 2px no-repeat, linear-gradient(currentColor 0 0) bottom / 100% 2px no-repeat; }

/* ---------------------------------------------------------------- breadcrumbs */
.crumbs { font-size: .84rem; color: var(--muted); margin: 16px 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; padding: 14px 0 4px; }
.hero:has(> .hero-side) { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.hero h1 .flag, .hero h1 .hallmark { margin-right: 6px; vertical-align: middle; }
.lead { font-size: 1.07rem; color: var(--ink-2); max-width: 64ch; margin: 0 0 6px; }
.lead strong { color: var(--ink); }
.lead .lv { color: var(--gold-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.bigprice { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 28px; margin: 18px 0 10px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.bigprice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--gold-2), var(--gold)); }
.bp-label { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.bp-num { display: block; margin: 4px 0 2px; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.35rem); font-weight: 760; line-height: 1.08; letter-spacing: -.025em; color: var(--gold); font-variant-numeric: tabular-nums; }
.bp-num .lv { color: inherit; }
.bp-cur { font-size: .4em; font-weight: 650; letter-spacing: 0; color: var(--ink-2); }
.cur-pick { display: grid; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 220px; }
.cur-pick select { text-transform: none; letter-spacing: 0; font-weight: 600; }
.hero-side { display: grid; gap: 12px; }
.karat-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.karat-strip li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); font-variant-numeric: tabular-nums; }
.karat-strip li > :nth-child(2) { margin-left: auto; }
.karat-strip .lv { font-weight: 720; font-size: 1.04rem; color: var(--gold-ink); }
.karat-strip small { color: var(--muted); font-size: .72rem; }
.karat-strip a { text-decoration: none; }
.range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.range div { padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-s); }
.range dt { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.range dd { margin: 2px 0 0; font-weight: 720; font-variant-numeric: tabular-nums; }
.range a { color: inherit; }
.hero-main .range { margin-top: 10px; max-width: 520px; }

/* hallmark "stamp" for karats: 18K | 750 */
.hallmark { display: inline-flex; align-items: baseline; gap: .4em; padding: .2em .55em .22em; border: 1.5px solid var(--accent); border-radius: 5px; background: var(--surface); color: var(--accent); font: 700 .8rem/1.15 var(--mono); letter-spacing: .02em; white-space: nowrap; box-shadow: inset 0 0 0 1.5px var(--surface), inset 0 0 0 2.5px color-mix(in srgb, var(--accent) 30%, transparent); }
.hallmark b { font-weight: 800; }
.hallmark small { font-size: .78em; font-weight: 600; opacity: .78; }
a:hover > .hallmark { background: var(--accent-tint); }
h1 .hallmark { font-size: .5em; vertical-align: .2em; }

/* live status */
.upd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); animation: pulse 2.2s ease-out infinite; }
.dot.stale { background: #C98A1B; animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 122, 77, .45); } 70% { box-shadow: 0 0 0 8px rgba(31, 122, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); } }
.chg { font-weight: 680; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.chg.flat { color: var(--muted); }
.lv { font-variant-numeric: tabular-nums; border-radius: 4px; transition: background-color .8s; }
.lv.f-up { background: color-mix(in srgb, var(--up) 18%, transparent); transition: none; }
.lv.f-down { background: color-mix(in srgb, var(--down) 16%, transparent); transition: none; }

/* ---------------------------------------------------------------- sections */
.block { margin: 36px 0; }
.block > h2, .block-head h2 { margin: 0 0 14px; }
.block h3 { font-size: 1.04rem; margin: 22px 0 10px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.block-head > h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.grid2 > div > h2 { margin-top: 0; }
.note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.note.warn { color: var(--down); font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .94rem; font-variant-numeric: tabular-nums; }
.tbl:not(.tbl-wrap > .tbl) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 10px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--surface-2); color: var(--ink-2); font-size: .74rem; font-weight: 720; letter-spacing: .05em; text-transform: uppercase; }
.tbl thead th:first-child, .tbl th[scope="row"] { text-align: left; }
.tbl th[scope="row"] { font-weight: 620; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr:hover > * { background: var(--surface-2); }
.tbl td .lv { color: var(--gold-ink); font-weight: 640; }
.tbl td.ba .lv { color: var(--ink-2); font-weight: 560; }
.tbl th.ba { background: color-mix(in srgb, var(--surface-2) 70%, var(--accent-tint)); }
.tbl a { color: var(--ink); text-decoration: none; }
.tbl a:hover { color: var(--accent); text-decoration: underline; }
.tbl th small { margin-left: 6px; color: var(--muted); font-weight: 500; font-size: .74rem; }
.tbl .flag { margin-right: 8px; }
.tbl.compact th, .tbl.compact td { padding: 8px 12px; }
.tbl.prices th[scope="row"] { min-width: 96px; }
.filter { max-width: 300px; padding-left: 36px !important; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366736E' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") 12px 50% no-repeat !important; }

/* ---------------------------------------------------------------- forms */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-s); font-size: 1rem; }
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="number"] { font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid var(--brand); border-radius: 10px; background: var(--brand); color: #fff; font-weight: 650; text-decoration: none; cursor: pointer; transition: filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.hint { margin: 0; font-size: .82rem; color: var(--muted); }

/* spread / making controls */
.spread { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 12px 0 0; padding: 12px 16px; background: var(--surface-2); border-radius: var(--radius-s); }
.spread label { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 620; }
.spread input { width: 86px !important; min-height: 36px !important; padding: 6px 9px !important; }
.spread .hint { flex-basis: 100%; }

/* calculators */
.calc { display: grid; gap: 12px; }
.calc label { display: grid; gap: 6px; font-size: .86rem; font-weight: 650; color: var(--ink-2); }
.calc.card { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px; }
.calc .calc-out, .calc table, .calc fieldset, .calc > .btn, .calc > a, .calc .tbl-wrap { grid-column: 1 / -1; }
.calc > a { font-size: .9rem; }
.calc fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calc legend { padding: 0 6px; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.calc-out { display: block; padding: 16px 18px; background: var(--accent-tint); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 12px; font-variant-numeric: tabular-nums; }
.calc-out .big { display: block; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); font-weight: 760; letter-spacing: -.02em; color: var(--gold); line-height: 1.15; }
.calc-out dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; margin: 10px 0 0; font-size: .92rem; }
.calc-out dt { color: var(--ink-2); }
.calc-out dd { margin: 0; text-align: right; font-weight: 650; }
.calc-out .up { color: var(--up); } .calc-out .down { color: var(--down); }
.calc-out p { margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); }
.calc.inline { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); align-items: end; max-width: 720px; margin-top: 14px; }
.calc.inline .calc-out { grid-column: auto; padding: 9px 14px; }
.calc.inline .calc-out .big { font-size: 1.3rem; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin: 18px 0 0; }
.calc-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.tbl.rows td { padding: 6px 8px; }
.tbl.rows input, .tbl.rows select { min-height: 38px; }
.x { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.x:hover { color: var(--down); border-color: var(--down); }
.check { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 14px 4px 0; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* segmented control + chart */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 11px; }
.seg button { padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: .84rem; font-weight: 680; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
canvas.chart { display: block; width: 100%; height: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); touch-action: pan-y; }
.tv { display: grid; place-items: center; gap: 8px; min-height: 140px; padding: 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; }
.tv.loaded { display: block; padding: 0; border-style: solid; min-height: 480px; overflow: hidden; }

/* ---------------------------------------------------------------- lists & links */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pill { display: inline-flex; align-items: center; margin: 0 6px 6px 0; padding: 6px 13px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); font-size: .87rem; font-weight: 620; text-decoration: none; }
.pills .pill { margin: 0; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.plinks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.plinks.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.plinks li { display: flex; align-items: center; gap: 6px; }
.plinks a { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.plinks a:hover { background: var(--surface); color: var(--accent); }
.plinks small { margin-left: auto; color: var(--muted); }
.plinks small a { padding: 0; color: var(--muted); }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tools li { position: relative; display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); transition: border-color .15s; }
.tools li:hover { border-color: var(--accent); }
.tools a { color: var(--accent); font-weight: 680; text-decoration: none; }
.tools a::after { content: ""; position: absolute; inset: 0; }
.tools span { font-size: .86rem; color: var(--muted); }
.tools.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0; }
.tools.big li { padding: 20px; }
.tools.big a { font-size: 1.06rem; }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide-list li { position: relative; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.guide-list li:hover { border-color: var(--accent); transform: translateY(-1px); }
.guide-list a { color: var(--ink); font-weight: 720; font-size: 1.05rem; text-decoration: none; line-height: 1.3; }
.guide-list a::after { content: ""; position: absolute; inset: 0; }
.guide-list p { margin: 6px 0 10px; color: var(--ink-2); font-size: .92rem; }
.guide-list small { color: var(--muted); }

/* ---------------------------------------------------------------- prose, articles, FAQ */
.prose { max-width: 74ch; font-size: 1.02rem; line-height: 1.72; }
.prose > h2 { margin: 30px 0 10px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose li { margin: 5px 0; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose .tbl-wrap { margin: 6px 0 16px; }
.prose .tbl td:last-child, .legal .tbl td { text-align: left; white-space: normal; min-width: 160px; }
.legal .tbl th { white-space: normal; }
.prose .pill { text-decoration: none; }
.article { max-width: 780px; }
.article > h1 { margin-top: 10px; }
.byline { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
.byline a { color: var(--ink-2); }
.keyfacts { max-width: 74ch; margin: 18px 0 26px; padding: 16px 20px; background: var(--gold-tint); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); border-radius: var(--radius); }
.kf-h { margin: 0 0 8px; font-size: .74rem; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); }
.keyfacts ul { margin: 0; padding-left: 20px; }
.keyfacts li { margin: 4px 0; }
.glossary { margin: 0 0 14px; }
.glossary dt { margin: 16px 0 2px; font-weight: 720; color: var(--ink); scroll-margin-top: 84px; }
.glossary dd { margin: 0; color: var(--ink-2); }
.formula { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius-s); font-weight: 650; }
.author { margin: 34px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); max-width: 74ch; }
.faq { margin: 44px 0; max-width: 860px; }
.faq h2 { margin: 0 0 12px; }
.faq details { margin: 8px 0; padding: 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { display: flex; justify-content: space-between; gap: 14px; padding: 15px 0; font-weight: 660; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--muted); font-size: 1.35rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); line-height: 1.65; }
.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 2px; border-left: 2px solid var(--line-2); }
.timeline li { position: relative; margin: 0; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--gold); }
.timeline b { display: block; color: var(--gold-ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- infographics */
.fig { margin: 22px 0 26px; padding: 18px 18px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 760px; }
.fig svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.fig figcaption { margin-top: 10px; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.fig .fg-b { font-size: 13px; font-weight: 700; fill: var(--ink); }
.fig .fg-m { font-size: 12px; fill: var(--ink-2); }
.fig .fg-s { font-size: 10.5px; fill: var(--muted); }
.fig .fg-on { font-size: 12px; font-weight: 700; fill: #2A1E05; }
.fig .fg-op { font-size: 15px; font-weight: 800; fill: var(--gold); }
.fig .mono { font-family: var(--mono); }
.fig .fg-track { fill: var(--surface-2); }
.fig .fg-gold { fill: #E0B24A; }
.fig .fg-green { fill: #7FB8A6; } .fig .fg-green2 { fill: #A9CFC2; } .fig .fg-grey { fill: #C9CFCB; }
.fig .fg-up { fill: var(--up); } .fig .fg-down { fill: var(--down); }
.fig .fg-box { fill: var(--surface-2); stroke: var(--line-2); }
.fig .fg-goldbox { fill: var(--gold-tint); stroke: var(--gold); stroke-width: 1.5; }
.fig .fg-arrow, .fig .fg-axis, .fig .fg-bracket, .fig .fg-lead { stroke: var(--muted); stroke-width: 2; fill: none; }
.fig .fg-bracket { stroke-width: 3; stroke: var(--line-2); stroke-linecap: round; }
.fig .fg-lead { stroke-width: 1.2; stroke-dasharray: 3 3; }
.fig .fg-arrowhead { fill: var(--muted); }
.fig .fg-ring { fill: #E0B24A; } .fig .fg-ringin { fill: var(--surface); stroke: #B9892A; stroke-width: 2; }
.fig .fg-stamp { fill: none; stroke: #6B4A0A; stroke-width: 1.6; } .fig .fg-stampt { font-size: 11px; font-weight: 700; fill: #6B4A0A; }
.fig .fg-swatch { stroke: rgba(0,0,0,.15); stroke-width: 2; }
.fig .fg-coin { fill: #D9A93A; } .fig .fg-coinin { fill: none; stroke: #F3D98E; stroke-width: 1.5; }
@media (prefers-color-scheme: dark) { .fig .fg-grey { fill: #55605B; } .fig .fg-green { fill: #3E7D6C; } .fig .fg-green2 { fill: #2E5E52; } }

/* chart summary row */
.chart-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin: 10px 2px 0; font-size: .88rem; color: var(--ink-2); min-height: 24px; }
.chart-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-chg { padding: 2px 10px; border-radius: 999px; font-weight: 750; font-variant-numeric: tabular-nums; }
.cs-chg.up { background: color-mix(in srgb, var(--up) 14%, transparent); color: var(--up); }
.cs-chg.down { background: color-mix(in srgb, var(--down) 14%, transparent); color: var(--down); }
.chart-card { padding: 18px 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chart-card canvas.chart { border: 0; }

/* quick actions + country jump */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 26px 0 8px; }
.quick a { position: relative; display: grid; gap: 4px; padding: 16px 16px 16px 58px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.quick a:hover { border-color: var(--accent); transform: translateY(-1px); }
.quick a b { font-size: 1rem; }
.quick a span { font-size: .84rem; color: var(--muted); }
.quick a i { position: absolute; left: 14px; top: 16px; width: 32px; height: 32px; border-radius: 9px; background: var(--gold-tint); color: var(--gold-ink); display: grid; place-items: center; font-style: normal; font-weight: 800; }
.jump { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.jump select { max-width: 340px; }

/* guide table of contents and related tools */
.toc { max-width: 74ch; margin: 0 0 22px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc ul { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin: 4px 0; break-inside: avoid; }
.toc a { color: var(--ink-2); text-decoration: none; } .toc a:hover { color: var(--accent); text-decoration: underline; }
.related { max-width: 74ch; margin: 26px 0 0; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-tint); }
.related .pills { margin-top: 8px; }
.yr td.up { color: var(--up); } .yr td.down { color: var(--down); }
@media (max-width: 680px) { .toc ul { columns: 1; } .quick a { padding-left: 54px; } }

/* ---------------------------------------------------------------- ads */
.ad { margin: 28px 0; text-align: center; }
.ad-l { display: block; margin-bottom: 4px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ad-ph { display: grid; place-items: center; height: 110px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); }

/* ---------------------------------------------------------------- misc pages */
.alert { padding: 12px 16px; border-radius: 10px; font-weight: 620; }
.alert.ok { background: var(--accent-tint); color: var(--accent); }
.alert.err { background: color-mix(in srgb, var(--down) 12%, var(--surface)); color: var(--down); }
.contact-form { display: grid; gap: 14px; max-width: 640px; margin: 18px 0; }
.contact-form label { display: grid; gap: 6px; font-weight: 650; font-size: .9rem; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.legal .prose { max-width: 78ch; }
.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; margin: 18px 0; }
.embed-form { display: grid; gap: 14px; }
.embed-form > label { display: grid; gap: 6px; font-weight: 650; font-size: .88rem; color: var(--ink-2); }
.embed-form fieldset { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.embed-form legend { padding: 0 6px; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.embed-form textarea { font: 12px/1.5 var(--mono); }
.embed-preview { position: sticky; top: 84px; }
.embed-preview iframe { display: block; width: 100%; max-width: 360px; border: 0; }
.notfound { text-align: left; }
.code-404 { margin: 0; font-size: clamp(4rem, 3rem + 5vw, 7rem); font-weight: 820; line-height: 1; letter-spacing: -.05em; color: var(--gold); }
.notfound .btn { margin: 6px 8px 0 0; }

/* ---------------------------------------------------------------- footer */
.site-foot { margin-top: 56px; padding: 44px 0 22px; background: var(--deep); color: #B9C6C0; font-size: .9rem; }
.foot-in { display: grid; grid-template-columns: 1.8fr repeat(3, 1fr); gap: 30px; }
.foot-in p { margin: 0 0 8px; }
.foot-brand { color: #fff; font-weight: 760; font-size: 1.06rem; }
.foot-h { color: #8EA49B; font-size: .72rem; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.site-foot a { display: block; padding: 3px 0; color: #E3EAE6; text-decoration: none; }
.site-foot a:hover { color: var(--gold-2); }
.copy { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8EA49B; font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.site-foot .copy a { display: inline; color: #8EA49B; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero:has(> .hero-side) { grid-template-columns: minmax(0, 1fr); }
  .calc-layout, .embed-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-side, .embed-preview { position: static; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-in > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 62px; left: -22px; right: -22px; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 22px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .nav .lang { margin: 6px 0 0; text-align: center; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .nav { left: -16px; right: -16px; padding: 8px 16px 16px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .calc.card, .calc.inline { grid-template-columns: minmax(0, 1fr); }
  .calc fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bigprice { padding: 16px 18px; }
  .karat-strip small { display: none; }
  .cur-pick { min-width: 0; width: 100%; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .tbl { font-size: .9rem; }
  .block { margin: 28px 0; }
  .block-head .filter { max-width: none; }
  .foot-in { grid-template-columns: 1fr; }
  .ticker-in { padding: 7px 16px; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .ticker, .site-head nav, .menu-btn, .ad, .site-foot, .seg, canvas.chart, .tv, .spread, .filter { display: none !important; }
  body { background: #fff; color: #000; }
  .site-head { position: static; }
}
