/* Bullion Radar
   Black up top so the gold and silver dials shine, cool silver paper below.
   The scale runs from tarnish red to verdigris green. */
:root {
  --vault: #000000;
  --vault-2: #141414;
  --vault-text: #a3a3a3;
  --vault-line: rgba(255, 255, 255, 0.1);

  --gold: #d4af5a;
  --gold-hi: #f3dc97;
  --gold-deep: #8e6b24;
  --silver: #c9cfd6;
  --silver-hi: #f4f6f8;
  --silver-deep: #6f7987;

  --paper: #eceff2;
  --panel: #f8f9fb;
  --ink: #15233a;
  --muted: #5b6676;
  --line: #d3d8de;

  --band-1: #c0533a;
  --band-2: #d27a3e;
  --band-3: #d9a23a;
  --band-4: #8fae6a;
  --band-5: #3f9c8a;
  --up: #2f8a78;
  --down: #c0533a;

  --display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.coin-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  background: var(--vault);
  color: var(--silver-hi);
  position: relative;
  z-index: 5;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  white-space: nowrap;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand .gold-word { color: var(--gold-hi); }
.nav { display: flex; gap: 2px 20px; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: var(--vault-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--silver-hi); }
.nav a.active { color: var(--silver-hi); border-bottom-color: var(--gold); }
.nav .soon { color: var(--gold); font-size: 0.75rem; margin-left: 4px; }

.notice {
  background: var(--vault-2);
  color: var(--gold-hi);
  text-align: center;
  font-size: 0.88rem;
  padding: 8px 16px;
}

/* ---------- Hero ---------- */
.site-header { border-bottom: 1px solid var(--vault-line); }
.brand { font-weight: 600; letter-spacing: 0.12em; font-size: 1.1rem; }

.radar-hero {
  position: relative;
  overflow: hidden;
  background: var(--vault);
  color: var(--silver-hi);
  padding: 36px 0 40px;
  --coin-scale: 1;
}
.coin-field { position: absolute; inset: 0; pointer-events: none; }
.coin-field img {
  position: absolute;
  width: calc(var(--s) * 1px * var(--coin-scale));
  height: auto;
  opacity: var(--o);
}
.radar-hero .container { position: relative; z-index: 1; }
.radar-hero h1 {
  text-align: center;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  margin-bottom: 6px;
}
.lede {
  text-align: center;
  color: var(--vault-text);
  max-width: 56ch;
  margin: 0 auto 28px;
}

.scopes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

/* Quote panels: price on top, buy scale gauge below */
.quote-panel {
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 20px 22px 18px;
}
.qp-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a2a;
}
.qp-name { font-weight: 600; font-size: 1.05rem; }
.qp-name::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--metal);
}
.quote-panel.gold { --metal: var(--gold); }
.quote-panel.silver { --metal: var(--silver); }
.qp-sym { color: var(--vault-text); font-size: 0.82rem; font-weight: 500; }
.qp-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 14px;
}
.qp-price strong {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.qp-change { font-size: 0.92rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.qp-change.up { color: #5fb89f; }
.qp-change.down { color: #e07a64; }
.qp-sub { color: var(--vault-text); font-size: 0.8rem; margin-top: 2px; }

.gauge { max-width: 300px; margin: 18px auto 0; }
.gauge svg { width: 100%; display: block; }
.gauge-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--vault-text);
  margin-top: 2px;
}
.qp-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #2a2a2a;
  font-size: 0.9rem;
  color: var(--vault-text);
}
.qp-foot strong { color: var(--silver-hi); font-weight: 600; font-variant-numeric: tabular-nums; }

.coin-img { display: block; border-radius: 50%; }

.hero-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 22px;
  color: var(--vault-text);
  font-size: 0.88rem;
}
.hero-strip strong { color: var(--silver-hi); font-weight: 600; }

/* ---------- Page sections ---------- */
.section { padding-top: 56px; padding-bottom: 8px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head a {
  color: var(--gold-deep);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Factor breakdown: two columns, no cards */
.factor-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
}
.col-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.col-head .coin-img { width: 38px; height: 38px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.col-head h3 { margin: 0; font-size: 1.45rem; flex: 1; }
.col-head .total { font-family: var(--display); font-size: 1.45rem; }
.frow {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name score" "reading score" "bar bar";
  column-gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.fname { grid-area: name; font-weight: 600; }
.fweight { color: var(--muted); font-weight: 500; font-size: 0.85rem; margin-left: 6px; }
.freading { grid-area: reading; color: var(--muted); font-size: 0.9rem; }
.fscore { grid-area: score; font-family: var(--display); font-size: 1.6rem; align-self: center; }
.fbar { grid-area: bar; height: 4px; background: var(--line); margin-top: 10px; border-radius: 2px; overflow: hidden; }
.fbar span { display: block; height: 100%; }
.frow.off { opacity: 0.5; }
.frow { grid-template-areas: "name score" "reading score" "bar bar" "links links"; }
.flinks { grid-area: links; display: grid; gap: 4px; margin-top: 10px; font-size: 0.86rem; }
.flink { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: baseline; }
.flabel { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.flink a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.flink a:hover { color: var(--gold-deep); border-bottom-color: var(--gold-deep); }
.fsrc { color: var(--muted); white-space: nowrap; margin-left: 6px; font-size: 0.8rem; }

.fineprint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

/* Charts */
.charts { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.chart-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.chart-panel h3 { font-size: 1.2rem; margin-bottom: 2px; }
.chart-panel p { color: var(--muted); font-size: 0.88rem; margin: 0 0 12px; }
.chart-wrap { position: relative; height: 280px; }
.ranges { display: flex; gap: 4px; flex-wrap: wrap; }
.ranges button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.ranges button:hover { border-color: var(--ink); }
.ranges button.active { background: var(--ink); color: var(--silver-hi); border-color: var(--ink); }

/* News rows */
.news-list { border-top: 2px solid var(--ink); }
.news-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 4px 20px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
a.news-row:hover .news-title { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.news-tags { display: flex; flex-direction: column; gap: 2px; font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.tag::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 0;
}
.tag.gold::before { background: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.tag.silver::before { background: var(--silver); box-shadow: inset 0 0 0 1px var(--silver-deep); }
.tag.coins::before { background: var(--band-5); }
.news-title { font-family: var(--display); font-size: 1.18rem; line-height: 1.3; }
.news-src { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.filters { margin-bottom: 8px; }

/* Sub-page title band */
.hero {
  background: var(--vault);
  color: var(--silver-hi);
  padding-top: 40px;
  padding-bottom: 44px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 6px; }
.hero p { color: var(--vault-text); margin: 0; max-width: 56ch; }
.hero .hero-coin {
  position: absolute;
  right: -30px;
  top: -40px;
  width: 250px;
  height: 250px;
  opacity: 0.85;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.8));
  transform: rotate(-12deg);
}
@media (max-width: 560px) { .hero .hero-coin { width: 150px; height: 150px; opacity: 0.4; } }

/* Prose (How the scale works) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose p, .prose li { color: #2e3a4d; }
.factor-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.factor-table th, .factor-table td { text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.factor-table th { font-size: 0.85rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--ink); }
.legend { display: grid; gap: 8px; margin: 12px 0; }
.legend div { display: flex; align-items: center; gap: 10px; }
.legend .swatch { width: 32px; height: 10px; border-radius: 5px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px;
  background: var(--vault);
  color: var(--vault-text);
  padding: 36px 0 44px;
  font-size: 0.88rem;
}
.site-footer strong { color: var(--silver-hi); }
.site-footer .brand { font-size: 1rem; color: var(--silver-hi); margin-bottom: 14px; }
.site-footer p { max-width: 70ch; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .factor-cols, .charts { grid-template-columns: 1fr; }
  .radar-hero { --coin-scale: 0.6; }
}
@media (max-width: 560px) {
  .radar-hero { padding-top: 20px; --coin-scale: 0.5; }
  .coin-field { display: none; }
  .quote-panel { padding: 12px 12px 10px; }
  .qp-head { flex-direction: column; gap: 0; padding-bottom: 8px; }
  .qp-name { font-size: 0.95rem; }
  .qp-sym { font-size: 0.72rem; }
  .qp-price { margin-top: 8px; flex-direction: column; gap: 0; }
  .qp-price strong { font-size: 1.2rem; }
  .qp-change { font-size: 0.78rem; }
  .qp-sub { font-size: 0.68rem; }
  .gauge { margin-top: 10px; }
  .gauge-ends { font-size: 0.62rem; }
  .qp-foot { flex-direction: column; gap: 0; font-size: 0.78rem; margin-top: 8px; padding-top: 8px; }
  .nav .long, .nav-shop { display: none; }
  .nav a { font-size: 0.9rem; }
  .radar-hero h1 { font-size: 1.35rem; }
  .lede { font-size: 0.92rem; margin-bottom: 18px; }
  .scopes { gap: 10px; }
  .news-row { grid-template-columns: 1fr; }
  .news-tags { flex-direction: row; gap: 12px; }
  .brand { font-size: 1rem; letter-spacing: 0.1em; }
  .nav { gap: 2px 16px; }
  .factor-table { display: block; overflow-x: auto; }
}

/* Daily summary sentence under each quote panel */
.qp-summary { margin: 12px 0 0; font-size: 0.88rem; line-height: 1.5; color: #cfcfcf; }
@media (max-width: 560px) { .qp-summary { font-size: 0.74rem; } }

/* Melt value calculator */
.melt-calc {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px 32px;
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
}
.melt-inputs { display: grid; grid-template-columns: 1fr 140px; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field select, .field input {
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9c0c9;
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
.field select:focus, .field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.melt-result { display: grid; text-align: right; min-width: 220px; }
.melt-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.melt-result strong { font-size: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.melt-detail { font-size: 0.85rem; color: var(--muted); }
.melt-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: start; }
.melt-table td:nth-child(2), .melt-table td:nth-child(3),
.melt-table th:nth-child(2), .melt-table th:nth-child(3) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .melt-calc { grid-template-columns: 1fr; }
  .melt-result { text-align: left; }
  .melt-tables { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .melt-inputs { grid-template-columns: 1fr; }
  .melt-calc { padding: 16px; }
}
.chart-tall { height: 340px; }

/* Silver alert signup */
.alert-signup {
  max-width: 860px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 24px;
  align-items: center;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 16px 20px;
  background: #0b0b0b;
}
.alert-copy { display: grid; gap: 2px; }
.alert-copy strong { font-size: 1rem; }
.alert-copy span { font-size: 0.85rem; color: var(--vault-text); }
.alert-fields { display: flex; gap: 8px; }
.alert-fields input[type="email"] {
  font: inherit;
  font-size: 0.95rem;
  width: 240px;
  padding: 9px 12px;
  border-radius: 4px;
  border: 1px solid #3a3a3a;
  background: #161616;
  color: var(--silver-hi);
}
.alert-fields input[type="email"]:focus { outline: 2px solid var(--silver); outline-offset: 1px; }
.alert-fields button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 16px;
  border: 0;
  border-radius: 4px;
  background: var(--silver-hi);
  color: #000;
  cursor: pointer;
}
.alert-fields button:hover { background: #fff; }
.alert-privacy { grid-column: 1 / -1; font-size: 0.78rem; color: var(--vault-text); }
@media (max-width: 760px) {
  .alert-signup { grid-template-columns: 1fr; }
  .alert-fields input[type="email"] { width: auto; flex: 1; min-width: 0; }
}

.footer-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-meta a { color: var(--vault-text); }
.alert-signup.done { grid-template-columns: 1fr; border-color: #3d8a6c; }
.alert-fields button:disabled { opacity: 0.6; cursor: default; }

/* Shop */
.disclosure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 0.92rem;
  max-width: 820px;
}
.shop-list { border-top: 2px solid var(--ink); }
.shop-item {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 8px 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.shop-name { display: grid; }
.shop-name strong { font-weight: 600; }
.shop-name span, .shop-melt span { font-size: 0.85rem; color: var(--muted); }
.shop-melt { display: grid; text-align: right; }
.shop-melt strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.shop-buy { display: flex; gap: 8px; justify-content: flex-end; }
.shop-btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  white-space: nowrap;
}
.shop-btn:hover { background: var(--ink); color: var(--silver-hi); }
.footer-disclosure { font-size: 0.8rem; }
@media (max-width: 640px) {
  .shop-item { grid-template-columns: 1fr auto; }
  .shop-buy { grid-column: 1 / -1; justify-content: flex-start; }
}
.footer-disclosure a { color: var(--vault-text); }
