/* GoldMarket.lk v2.5: Market Pulse + premium UX layer */

:root {
  --gm-gold: #c79a34;
  --gm-gold-soft: #ecd487;
  --gm-gold-pale: #fff0b0;
  --gm-green: #2bbd82;
  --gm-green-soft: #83e0ba;
  --gm-red: #c85656;
  --gm-red-soft: #ff9c9c;
  --gm-amber: #d6a348;
  --gm-hero: #0a0907;
  --gm-hero-2: #15120c;
  --gm-hero-line: rgba(255,255,255,.085);
  --gm-hero-muted: #a79f92;
}

/* ---------- global polish ---------- */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.gm-nav {
  min-height: 70px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
}

.gm-nav .navbar-brand img {
  display: block;
}

.gm-nav .nav-link {
  padding: .65rem .8rem;
  border-radius: 10px;
  font-size: .9rem;
}

.gm-nav .nav-link:hover {
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
}

.btn-theme {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.btn-theme svg { width: 18px; height: 18px; }

.section-heading h2,
.calculator-intro h2,
.methodology-copy h2,
.faq-section h2 {
  margin: .35rem 0 .65rem;
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.045em;
  font-weight: 850;
}

.section-heading p,
.calculator-intro p,
.methodology-copy p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

/* ---------- hero ---------- */
.v25-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(199,154,52,.16), transparent 28%),
    radial-gradient(circle at 12% 90%, rgba(199,154,52,.07), transparent 35%),
    linear-gradient(145deg, var(--gm-hero) 0%, var(--gm-hero-2) 54%, #090806 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.v25-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
}

.v25-hero .container {
  position: relative;
  z-index: 2;
}

.v25-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: end;
  gap: 32px;
  margin-bottom: 28px;
}

.hero-copy { min-width: 0; }

.hero-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  color: #d7d0c5;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .055em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #909090;
}

.pulse-active .pulse-dot,
.pulse-fresh .pulse-dot {
  background: #48d39a;
  box-shadow: 0 0 0 5px rgba(72,211,154,.12);
}

.pulse-delayed .pulse-dot {
  background: #e5b75b;
  box-shadow: 0 0 0 5px rgba(229,183,91,.12);
}

.pulse-stale .pulse-dot,
.pulse-offline .pulse-dot {
  background: #e16b6b;
  box-shadow: 0 0 0 5px rgba(225,107,107,.11);
}

.pulse-active,
.pulse-fresh { border-color: rgba(72,211,154,.22); color: #94e6c3; }
.pulse-delayed { border-color: rgba(229,183,91,.22); color: #edca82; }
.pulse-stale,
.pulse-offline { border-color: rgba(225,107,107,.22); color: #f0a2a2; }

.freshness {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a89f91;
  font-size: .79rem;
  font-weight: 650;
}

.freshness svg { width: 15px; height: 15px; }

.v25-hero .eyebrow { color: var(--gm-gold-soft); }

.v25-hero h1 {
  margin: .45rem 0 .65rem;
  max-width: 880px;
  font-size: clamp(2.7rem, 5.8vw, 5.6rem);
  line-height: .93;
  letter-spacing: -.065em;
  font-weight: 900;
}

.text-gold {
  background: linear-gradient(92deg, var(--gm-gold-pale), var(--gm-gold) 58%, #f3d879);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-date {
  margin: 0 0 .65rem;
  color: #d0c8ba;
  font-size: .93rem;
  font-weight: 700;
}

.v25-hero .hero-lead {
  max-width: 710px;
  color: #a9a194;
  font-size: 1rem;
  line-height: 1.7;
}

.pulse-summary-card {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-align: left;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.pulse-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236,212,135,.25);
  background: rgba(255,255,255,.06);
}

.pulse-summary-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(199,154,52,.12);
  color: var(--gm-gold-soft);
}

.pulse-summary-icon svg { width: 21px; height: 21px; }

.pulse-summary-copy { min-width: 0; }
.pulse-summary-copy small {
  display: block;
  margin-bottom: 2px;
  color: #9f978a;
  text-transform: uppercase;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .11em;
}
.pulse-summary-copy strong {
  display: block;
  color: #fff;
  font-size: .98rem;
  line-height: 1.3;
}
.pulse-summary-copy span {
  display: block;
  margin-top: 3px;
  color: #9f978a;
  font-size: .72rem;
}
.pulse-summary-arrow { width: 18px; height: 18px; color: #8f877b; }

/* ---------- unit switch ---------- */
.v25-unit-toolbar,
.unit-toolbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: #9f978a;
  font-size: .76rem;
}

.unit-toolbar > span { font-weight: 750; }

.unit-switch,
.purity-switch,
.period-switch,
.today-karat-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: rgba(255,255,255,.05);
}

.unit-switch button,
.purity-switch button,
.period-switch button,
.today-karat-switch button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 8px 13px;
  color: #a69e91;
  font: inherit;
  font-size: .74rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.unit-switch button:hover { color: #fff; background: rgba(255,255,255,.05); }
.unit-switch button.active {
  background: linear-gradient(135deg, #f0da8c, #c79631);
  color: #161208;
  box-shadow: 0 6px 20px rgba(0,0,0,.16);
}

/* ---------- rate cards ---------- */
.rate-grid { position: relative; }

.v25-rate-card,
.rate-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 28px 80px rgba(0,0,0,.20);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rate-card-primary {
  border-color: rgba(199,154,52,.32);
  background: linear-gradient(145deg, rgba(199,154,52,.105), rgba(255,255,255,.027));
}

.rate-card-glow {
  position: absolute;
  right: -100px;
  bottom: -150px;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,154,52,.17), transparent 68%);
  pointer-events: none;
}

.rate-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.karat-badge {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.rate-subtitle {
  margin-top: 4px;
  color: #948c80;
  font-size: .76rem;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.trend-badge svg { width: 15px; height: 15px; }
.trend-badge.up { color: #7fe0b9; background: rgba(43,189,130,.12); }
.trend-badge.down { color: #ff9a9a; background: rgba(200,86,86,.12); }
.trend-badge.neutral { color: #a49c8f; background: rgba(255,255,255,.055); }

.rate-label { margin-bottom: 5px; color: #958d80; font-size: .78rem; }
.rate-value {
  color: #fff;
  font-size: clamp(2.85rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: .98;
  letter-spacing: -.06em;
}

.rate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.rate-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #aaa295;
  font-size: .78rem;
}
.rate-meta svg { width: 15px; height: 15px; }
.rate-meta .up { color: #78dcb3; }
.rate-meta .down { color: #ff9999; }

.market-range {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,.075);
  color: #948c7f;
  font-size: .75rem;
}
.market-range strong { color: #d6cfc4; font-weight: 750; }

.rate-card.rate-changed {
  animation: rateFlash 1.25s ease;
}
@keyframes rateFlash {
  0% { box-shadow: 0 0 0 0 rgba(236,212,135,.32), 0 28px 80px rgba(0,0,0,.20); }
  40% { box-shadow: 0 0 0 5px rgba(236,212,135,.10), 0 28px 80px rgba(0,0,0,.20); }
  100% { box-shadow: 0 0 0 0 rgba(236,212,135,0), 0 28px 80px rgba(0,0,0,.20); }
}

/* ---------- market pulse strip ---------- */
.market-pulse-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.pulse-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
  background: rgba(255,255,255,.028);
}

.pulse-primary-metric { border-color: rgba(72,211,154,.13); }
.metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255,255,255,.045);
  color: #d5be74;
}
.metric-icon svg { width: 17px; height: 17px; }
.pulse-metric small {
  display: block;
  color: #8f877b;
  font-size: .63rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pulse-metric strong {
  display: block;
  margin-top: 3px;
  color: #eee8de;
  font-size: .84rem;
  line-height: 1.25;
}
.metric-sub {
  display: block;
  margin-top: 2px;
  color: #837b70;
  font-size: .65rem;
}

/* ---------- CBSL comparison ---------- */
.v25-comparison-panel,
.comparison-panel {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: 20px;
  background: rgba(255,255,255,.03);
}

.comparison-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.reference-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reference-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(199,154,52,.10);
  color: var(--gm-gold-soft);
}
.reference-icon svg { width: 19px; height: 19px; }
.reference-title strong { display: block; color: #fff; font-size: .9rem; }
.reference-title span:not(.reference-icon) { display: block; margin-top: 2px; color: #91897c; font-size: .72rem; }

.comparison-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #bcb4a8;
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}
.comparison-link:hover { color: #fff; }
.comparison-link svg { width: 14px; height: 14px; }

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 44px 1fr 1fr 1.1fr;
  align-items: end;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}
.comparison-karat { color: #f0d67b; font-weight: 900; }
.comparison-row span,
.comparison-row small { display: block; color: #8f877a; font-size: .63rem; }
.comparison-row strong { display: block; margin-top: 2px; color: #eee8df; font-size: .84rem; }
.comparison-premium.positive strong,
.comparison-premium.positive small { color: #7fdcb6; }
.comparison-premium.negative strong,
.comparison-premium.negative small { color: #ff9999; }

/* ---------- trust strip ---------- */
.trust-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 14px;
  padding: 13px 14px;
  border-top: 1px solid rgba(255,255,255,.065);
  color: #8f877b;
  font-size: .7rem;
}
.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-strip span svg { width: 15px; height: 15px; color: #d9c274; }
.trust-strip span strong { color: #bdb5a9; font-weight: 800; }
.trust-strip button {
  appearance: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d4cdbf;
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
.trust-strip button svg { width: 14px; height: 14px; }

/* ---------- verification drawer ---------- */
.verification-drawer {
  background: #12100c;
  color: #f2ede4;
  border-left: 1px solid #2a241a;
}
.verification-drawer h2 { margin: 3px 0 0; font-size: 1.55rem; letter-spacing: -.03em; }
.drawer-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid #2a241a;
  border-radius: 14px;
  background: #18150f;
}
.drawer-status small { display: block; color: #8f877b; font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; }
.drawer-status strong { display: block; margin-top: 2px; }
.verification-check {
  display: flex;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #2a241a;
}
.verification-check svg { width: 21px; height: 21px; flex: 0 0 auto; color: #d8b957; }
.verification-check strong { display: block; }
.verification-check span { display: block; margin-top: 3px; color: #a39b8d; font-size: .8rem; line-height: 1.55; }
.verification-note {
  margin-top: 20px;
  padding: 14px;
  border-radius: 14px;
  background: #1b1710;
  color: #a9a092;
  font-size: .78rem;
  line-height: 1.55;
}

/* ---------- today's movement ---------- */
.today-heading,
.trend-heading,
.changes-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.today-karat-switch,
.chart-controls .purity-switch,
.period-switch {
  border-color: var(--line);
  background: var(--surface-2);
}
.today-karat-switch button,
.chart-controls .purity-switch button,
.period-switch button { color: var(--muted); }
.today-karat-switch button.active,
.chart-controls .purity-switch button.active,
.period-switch button.active {
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.today-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.today-panel {
  display: none;
  grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.today-panel.active { display: grid; }

.today-primary,
.today-stat {
  min-width: 0;
  padding: 22px;
}
.today-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 13%, var(--surface-2)), var(--surface));
  border-right: 1px solid var(--line);
}
.today-primary > span,
.today-stat > span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.today-primary > strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -.045em;
}
.today-primary > small { display: block; margin-top: 5px; font-size: .74rem; font-weight: 800; }
.today-primary > small.positive { color: var(--green); }
.today-primary > small.negative { color: var(--red); }
.today-primary > small.neutral { color: var(--muted); }

.today-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}
.today-stat:last-child { border-right: 0; }
.today-stat strong { display: block; margin-top: 7px; font-size: 1rem; }
.today-stat small { display: block; margin-top: 3px; color: var(--muted); font-size: .65rem; }
.empty-state { grid-column: 1 / -1; padding: 28px; color: var(--muted); }

/* ---------- trend ---------- */
.chart-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v25-chart-card,
.chart-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.chart-topline {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 2px 5px 15px;
  color: var(--muted);
  font-size: .74rem;
  font-weight: 750;
}
.chart-topline a {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
}
.chart-topline svg { width: 15px; height: 15px; }
.reference-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.reference-toggle input { accent-color: var(--gold); }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; }
.dot-market { background: var(--gold); }
.chart-wrap { position: relative; height: 350px; }
.period-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.period-stats > div { padding: 11px 12px; border-radius: 13px; background: var(--surface-2); }
.period-stats span { display: block; color: var(--muted); font-size: .66rem; }
.period-stats strong { display: block; margin-top: 4px; font-size: .9rem; }
.period-stats strong.positive { color: var(--green); }
.period-stats strong.negative { color: var(--red); }

/* ---------- calculator ---------- */
.calculator-section {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 55%, transparent), transparent);
  border-block: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 52px;
}
.calculator-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px;
  color: var(--muted);
  font-size: .76rem;
}
.calculator-note svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--gold-deep); }
.v25-calculator-card,
.calculator-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.calculator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calculator-grid label > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.calculator-grid select,
.weight-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
}
.calculator-grid select { padding: 0 13px; }
.weight-input { display: flex; align-items: center; padding: 0 13px; }
.weight-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
}
.weight-input span { color: var(--muted); font-size: .74rem; }
.weight-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.weight-presets button {
  appearance: none;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.weight-presets button.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--surface);
}
.calculator-result {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--gold) 25%, var(--line));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, var(--surface-2)), var(--surface-2));
}
.calculator-result span { display: block; color: var(--muted); font-size: .72rem; }
.calculator-result strong { display: block; margin-top: 4px; font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.05em; }
.calculator-result small { display: block; margin-top: 5px; color: var(--muted); }

/* ---------- recent changes ---------- */
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 850;
  white-space: nowrap;
}
.section-link svg { width: 15px; height: 15px; }
.changes-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.change-row {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.change-row:last-child { border-bottom: 0; }
.change-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
}
.change-time strong { font-size: .86rem; }
.change-time span { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.change-values { display: grid; grid-template-columns: 1fr 1fr; }
.change-karat {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 18px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
}
.change-karat + .change-karat { border-left: 1px solid var(--line); }
.change-karat-label { color: var(--gold-deep); font-size: .78rem; font-weight: 900; }
.change-karat div small { display: block; color: var(--muted); font-size: .62rem; }
.change-karat div strong { display: block; margin-top: 2px; font-size: .82rem; }
.change-karat > svg { width: 15px; height: 15px; color: var(--muted); }
.change-delta { padding: 6px 8px; border-radius: 999px; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.change-delta.positive { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.change-delta.negative { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.change-delta.neutral { color: var(--muted); background: var(--surface-2); }
.changes-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px;
}
.changes-empty-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface-2));
  color: var(--gold-deep);
}
.changes-empty-icon svg { width: 20px; height: 20px; }
.changes-empty strong { display: block; }
.changes-empty p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }

/* ---------- methodology ---------- */
.methodology-section { background: var(--surface-2); border-block: 1px solid var(--line); }
.methodology-shell {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 46px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
}
.icon-box {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold) 24%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  color: var(--gold-deep);
}
.icon-box svg { width: 22px; height: 22px; }
.v25-method-grid,
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method-grid > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.method-grid strong { color: var(--gold-deep); font-size: .68rem; }
.method-grid span { display: block; margin-top: 7px; font-weight: 850; }
.method-grid p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #ecd178, #b7801d);
  color: #17120a;
  font-weight: 850;
}
.btn-gold svg { width: 17px; height: 17px; }

/* ---------- FAQ + footer ---------- */
.faq-section { background: var(--paper); }
.gm-accordion .accordion-item,
.gm-accordion .accordion-button { background: transparent; color: var(--text); }
.gm-accordion .accordion-item { border-color: var(--line); }
.gm-accordion .accordion-button { padding: 20px 4px; box-shadow: none; font-weight: 850; }
.gm-accordion .accordion-body { padding: 0 4px 24px; color: var(--muted); line-height: 1.7; }

.footer-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .76rem; font-weight: 750; }
.footer-links a:hover { color: var(--text); }
.footer-disclaimer { text-align: right; }

/* ---------- public source page cleanup ---------- */
.source-card {
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 14px 35px rgba(20,20,20,.055);
}
.source-card h2 { margin: 4px 0 0; font-size: 1.15rem; }
.source-type { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .64rem; font-weight: 850; }
.source-role { margin-top: 14px; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.source-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--text); text-decoration: none; font-size: .78rem; font-weight: 850; }
.source-link svg { width: 14px; height: 14px; }
.public-source-note { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); }
.public-source-note svg { width: 21px; height: 21px; flex: 0 0 auto; color: var(--gold-deep); }
.public-source-note strong { display: block; color: var(--text); }
.public-source-note span { display: block; margin-top: 3px; font-size: .78rem; }

/* ---------- mobile sticky ---------- */
.mobile-rate-bar { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
  .v25-hero-top { grid-template-columns: 1fr; gap: 20px; }
  .pulse-summary-card { max-width: 560px; }
  .market-pulse-strip { grid-template-columns: 1fr 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .today-panel { grid-template-columns: 1.25fr repeat(2, 1fr); }
  .today-stat:nth-child(4),
  .today-stat:nth-child(5) { border-top: 1px solid var(--line); }
  .today-stat:nth-child(3) { border-right: 0; }
  .today-primary { grid-row: span 2; }
  .change-values { grid-template-columns: 1fr; }
  .change-karat + .change-karat { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 991.98px) {
  .v25-hero h1 { font-size: clamp(2.55rem, 10vw, 4.6rem); }
  .market-pulse-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip button { margin-left: 0; }
  .today-heading,
  .trend-heading,
  .changes-heading { align-items: flex-start; flex-direction: column; }
  .chart-controls { width: 100%; justify-content: space-between; }
  .calculator-shell,
  .methodology-shell { grid-template-columns: 1fr; gap: 30px; }
  .period-stats { grid-template-columns: 1fr 1fr; }
  .footer-shell { grid-template-columns: 1fr; text-align: center; }
  .footer-disclaimer { text-align: center; }

  .mobile-rate-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr auto;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1040;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 16px 45px rgba(0,0,0,.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .mobile-rate-bar > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: var(--text);
    text-decoration: none;
    font-size: .68rem;
  }
  .mobile-rate-bar > a + a { border-left: 1px solid var(--line); }
  .mobile-rate-bar > a strong { font-size: .76rem; }
  .mobile-pulse {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-left: 1px solid var(--line);
    color: var(--muted);
    font-size: .63rem;
    font-weight: 800;
  }
  .mobile-pulse .pulse-dot { background: #48d39a; box-shadow: none; }
  .gm-footer { padding-bottom: 84px !important; }
}

@media (max-width: 767.98px) {
  .market-pulse-strip { grid-template-columns: 1fr; }
  .comparison-heading { align-items: flex-start; flex-direction: column; }
  .comparison-row { grid-template-columns: 44px 1fr 1fr; }
  .comparison-premium { grid-column: 2 / 4; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
  .today-panel { grid-template-columns: 1fr 1fr; }
  .today-primary { grid-column: 1 / -1; grid-row: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .today-stat { border-top: 0 !important; }
  .today-stat:nth-child(3),
  .today-stat:nth-child(5) { border-right: 0; }
  .change-row { grid-template-columns: 76px minmax(0,1fr); }
  .change-time { padding: 14px 12px; }
  .change-karat { grid-template-columns: 38px minmax(0,1fr) 16px minmax(0,1fr); }
  .change-delta { grid-column: 2 / -1; justify-self: start; }
  .v25-method-grid,
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .gm-nav { min-height: 62px; }
  .gm-nav .navbar-brand img { width: 165px; height: auto; }
  .v25-hero .container { padding-inline: 16px; }
  .v25-hero h1 { font-size: 2.75rem; }
  .hero-date { font-size: .84rem; }
  .pulse-summary-card { padding: 14px; grid-template-columns: 42px minmax(0,1fr) 18px; }
  .pulse-summary-icon { width: 42px; height: 42px; }
  .unit-toolbar { justify-content: space-between; }
  .unit-switch button { padding: 8px 10px; }
  .v25-rate-card,
  .rate-card { min-height: 275px; padding: 22px; border-radius: 22px; }
  .rate-value { font-size: 2.8rem; }
  .rate-card-head { gap: 10px; }
  .trend-badge { padding: 6px 8px; }
  .trust-strip { align-items: flex-start; flex-direction: column; }
  .comparison-row { padding: 12px; gap: 10px; }
  .today-panel { grid-template-columns: 1fr; }
  .today-primary { grid-column: 1; }
  .today-stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .today-stat:last-child { border-bottom: 0; }
  .chart-controls { align-items: stretch; flex-direction: column; }
  .chart-controls .purity-switch,
  .period-switch { width: 100%; justify-content: space-between; }
  .chart-controls button,
  .period-switch button { flex: 1; padding-inline: 8px; }
  .v25-chart-card,
  .chart-card { padding: 14px; }
  .chart-topline { flex-wrap: wrap; gap: 10px; }
  .chart-topline a { margin-left: 0; }
  .chart-wrap { height: 275px; }
  .period-stats { gap: 7px; }
  .calculator-shell { gap: 24px; }
  .v25-calculator-card,
  .calculator-card { padding: 20px; }
  .calculator-grid { grid-template-columns: 1fr; }
  .methodology-shell { padding: 22px; }
  .change-row { grid-template-columns: 1fr; }
  .change-time { flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .change-karat { padding: 14px; }
  .mobile-pulse { display: none; }
  .mobile-rate-bar { grid-template-columns: 1fr 1fr; }
}
