:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #6b6357;
  --line: #ece4d6;
  --gold: #b8860b;
  --gold-dark: #8a6508;
  --gold-soft: #fbf3df;
  --green: #15803d;
  --red: #b42318;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 8px 24px rgba(28, 25, 23, .04);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.has-sticky-ad { padding-bottom: 124px; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }

.wrap { width: min(100% - 28px, 1080px); margin-inline: auto; }
.page { padding-bottom: 42px; }
.narrow { max-width: 860px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 244, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, #d4a017, #966d06);
  color: #fff; font-size: 17px; font-weight: 700;
}
.brand-accent { color: var(--gold-dark); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 9px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: var(--gold-soft); color: var(--gold-dark); }

/* Ads */
.ad { margin: 14px 0; text-align: center; }
.ad-eyebrow { display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: #a09788; margin-bottom: 4px; }
.ad-body { display: flex; justify-content: center; align-items: center; min-height: 50px; overflow: hidden; }
.ad-placeholder {
  display: grid; place-items: center;
  max-width: 100%;
  border: 1px dashed #d8cbb2;
  border-radius: 8px;
  background: #fdfbf6;
  color: #a39884;
  font-size: 11px;
  letter-spacing: .3px;
}
.ad--mid_content { margin: 26px 0; }
.ad--sticky_bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  margin: 0;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(28, 25, 23, .08);
}
.ad--sticky_bottom .ad-eyebrow { display: none; }
.ad--sticky_bottom .ad-body { min-height: 50px; }
.ad--sticky_bottom .ad-placeholder { height: 50px; }
.ad-close {
  position: absolute;
  top: -11px; right: 8px;
  width: 24px; height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* Hero */
.hero { padding: 16px 0 6px; }
.eyebrow {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-size: 11px; font-weight: 800; letter-spacing: 1.15px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .12); }
.hero h1, .info-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(27px, 6.6vw, 40px);
  line-height: 1.16;
  letter-spacing: -.9px;
  font-weight: 800;
}
.lede { margin: 0 0 12px; color: #4c453b; font-size: 15px; }
.updated-line { margin: 0; color: var(--muted); font-size: 12px; }

.crumbs { display: flex; gap: 8px; align-items: center; padding-top: 14px; font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--gold-dark); font-weight: 600; }

/* Sections */
.section { margin-top: 30px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 13px; }
.section-head h2, .section > h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; font-weight: 750; }
.kicker { margin: 0 0 3px; color: var(--gold-dark); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.section-note { color: var(--muted); font-size: 11px; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.fine-print { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* Cards */
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.rate-card-head { display: flex; flex-direction: column; min-height: 40px; }
.rate-title { font-size: 13px; font-weight: 700; }
.rate-sub { color: var(--muted); font-size: 11px; }
.rate-value { margin: 6px 0 7px; font-size: clamp(17px, 4.4vw, 23px); font-weight: 800; letter-spacing: -.6px; overflow-wrap: anywhere; }
.rate-foot { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.rate-unit { color: var(--muted); font-size: 10px; }
.change { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.change--up { color: var(--green); background: #e9f7ee; }
.change--down { color: var(--red); background: #fdecea; }
.change--flat { color: var(--muted); background: #f1efe9; }
.change--lg { font-size: 14px; padding: 5px 11px; }

.city-grid { display: grid; gap: 10px; }
.city-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.city-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.city-card h3 { margin: 0; font-size: 15px; }
.city-region { color: var(--muted); font-size: 10px; }
.city-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 11px 0 9px; }
.city-prices div { background: #fcfaf6; border-radius: 9px; padding: 8px; min-width: 0; }
.city-prices span { display: block; color: var(--muted); font-size: 10px; }
.city-prices strong { display: block; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.text-link { color: var(--gold-dark); font-size: 12px; font-weight: 700; }

.gold-hero-card { background: linear-gradient(150deg, #fffdf8, #fbf4e4); border: 1px solid #ecdcb8; border-radius: var(--radius); padding: 18px; }
.gold-badge { display: inline-block; padding: 3px 9px; border-radius: 99px; background: #f4e6c4; color: var(--gold-dark); font-size: 11px; font-weight: 800; }
.gold-value { margin: 10px 0 0; font-size: clamp(26px, 7vw, 38px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.gold-unit { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }
.silver-hero-card { background: linear-gradient(150deg, #fff, #f6f7f8); border-color: #e3e6e9; }
.silver-hero-card .gold-badge { background: #e8ecef; color: #4b5563; }

.asset-hero { padding-top: 6px; }
.hero-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.hero-price-value { font-size: clamp(30px, 8vw, 46px); font-weight: 800; letter-spacing: -1.4px; }
.hero-price-unit { display: block; color: var(--muted); font-size: 12px; }

/* Tables */
.table-wrap { padding: 4px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { color: var(--muted); font-size: 10px; letter-spacing: .8px; text-transform: uppercase; font-weight: 800; }
tbody th { font-weight: 650; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tr.is-current { background: var(--gold-soft); }

/* Chart */
.chart-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chart-tabs::-webkit-scrollbar { display: none; }
.chart-tab { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 11px; font-weight: 650; color: var(--muted); }
.chart-tab.is-active { background: var(--gold-soft); border-color: #e6d2a5; color: var(--gold-dark); }
.chart-panel h3 { margin: 0 0 8px; font-size: 14px; }
.trend-chart { display: block; width: 100%; height: auto; }
.chart-label { fill: #948a79; font-size: 10px; font-family: inherit; }
.chart-caption { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.chart-empty { padding: 30px 8px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 10px; }

/* Affiliates, FAQ, links */
.affiliate-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 0; padding: 12px 14px; background: #fffdf8; border: 1px solid #eee0c1; border-radius: var(--radius); font-size: 12px; color: var(--muted); }
.affiliate-btn { display: inline-block; padding: 7px 11px; border: 1px solid #d8bd7f; border-radius: 8px; background: #fff; color: var(--gold-dark); font-size: 12px; font-weight: 700; }
.affiliate-btn:hover { background: var(--gold-soft); }
.faq-list { display: grid; gap: 8px; }
.faq-list details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; }
.faq-list summary { padding: 12px 0; cursor: pointer; font-size: 13px; font-weight: 650; list-style-position: outside; }
.faq-list details p { margin: 0 0 13px; color: #4c453b; font-size: 12.5px; }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; font-size: 12px; font-weight: 650; }
.pill-links a:hover { border-color: #d8bd7f; background: var(--gold-soft); }
.info-content h2 { font-size: 17px; margin: 20px 0 5px; }
.info-content p { margin: 0; color: #4c453b; font-size: 14px; }

/* Footer */
.site-footer { margin-top: 40px; padding: 28px 0 22px; background: #211c16; color: #d6cdbf; font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.footer-grid h3 { margin: 0 0 8px; color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.footer-grid a { display: block; padding: 2px 0; color: #c9bfae; }
.footer-grid a:hover { color: #e7c77d; }
.foot-note { margin: 24px 0 8px; color: #a99f90; }
.foot-note a, .foot-meta a { color: #e0bd6e; }
.foot-meta { margin: 0; color: #8f8678; font-size: 11px; }

@media (min-width: 640px) {
  .wrap { width: min(100% - 44px, 1080px); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-top: 26px; }
}

@media (min-width: 900px) {
  .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ad--sticky_bottom .ad-body { max-width: 728px; margin-inline: auto; }
}
