/* SpotPrice v7 - light, airy and high-contrast. One sans (Geist), one navy accent.
   Large type for every age. The metal tiles carry the only metal colors on the page. */
@font-face { font-family: "Geist"; src: url("../fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #0b0d12; --ink-2: #262a33; --muted: #4b5262; --line: #e6e8ec; --line-2: #d2d6dd;
  --bg: #ffffff; --card: #ffffff; --soft: #f5f6f8; --soft-2: #eef0f3;
  --accent: #1e40af; --accent-ink: #1b3a99; --accent-hover: #17337f; --accent-soft: #eef2fc; --accent-line: #c9d4f2;
  --ok: #157a3c; --ok-bg: #eaf6ee; --bad: #b42318; --warn: #8a3b00; --warn-bg: #fff4e8; --focus: #1e40af;
  --radius: 18px; --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(11,13,18,.05);
  --shadow: 0 1px 2px rgba(11,13,18,.04), 0 6px 20px -8px rgba(11,13,18,.10);
  --shadow-lg: 0 1px 3px rgba(11,13,18,.05), 0 16px 40px -14px rgba(11,13,18,.16);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; } /* 18px base */
html.bigtext { font-size: 131.25%; } /* 21px */
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-decoration-color: rgba(30,64,175,.35); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 12px 18px; z-index: 10; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* Header: white, translucent, thin bottom border */
.site-header { background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  color: var(--ink); position: sticky; top: 0; z-index: 8; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; padding: 6px 0; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-size: 1.4rem; font-weight: 640; letter-spacing: -.035em; line-height: 1; }
.brand:hover { color: var(--ink); }
.menu-btn { display: none; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; font: inherit;
  font-size: 1rem; font-weight: 600; padding: 10px 16px; min-height: 48px; cursor: pointer; }
.menu-btn:hover { border-color: var(--ink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a { display: flex; align-items: center; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 1rem; padding: 10px 13px; border-radius: 10px; min-height: 48px; letter-spacing: -.01em; }
.site-nav a:hover { background: var(--soft); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 620; }
@media (max-width: 1040px) {
  .menu-btn { display: block; }
  .site-nav { display: none; width: 100%; padding-bottom: 14px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { font-size: 1.1rem; padding: 14px 16px; background: var(--soft); }
}

/* Type */
main, main.wrap { padding-top: 28px; padding-bottom: 64px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; font-family: var(--sans); }
h1 { font-weight: 660; font-size: clamp(2.05rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.04em; margin: 8px 0 14px; }
h2 { font-weight: 640; font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.18; letter-spacing: -.03em; margin: 44px 0 14px; }
h3 { font-size: 1.15rem; font-weight: 620; line-height: 1.3; letter-spacing: -.015em; margin: 8px 0; }
strong { font-weight: 620; }
p, li { max-width: 72ch; }
.lead { font-size: 1.18rem; color: var(--muted); margin-top: 0; letter-spacing: -.005em; }
.small { font-size: .95rem; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: var(--accent-ink); margin: 0 0 6px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 3px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 24px;
  border-radius: 14px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; text-align: center; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--accent); border-color: var(--accent); color: #fff; } /* legacy name: the primary button */
.btn-gold:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { background: var(--card); color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.btn-row .btn { flex: 1 1 220px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Home hero: a soft light band, full-bleed without horizontal scroll */
.hero { position: relative; background: #f7f8fa; margin-top: -28px; padding: 40px 0 30px;
  box-shadow: 0 0 0 100vmax #f7f8fa, 0 1px 0 100vmax var(--line); clip-path: inset(0 -100vmax -1px); }
.hero > * { position: relative; z-index: 1; }

/* Spot cards */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 22px 0 14px; }
.price-card { position: relative; background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.prices-minor { grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 0; }
@media (max-width: 900px) { .prices-minor { grid-template-columns: 1fr; } }
.price-card.mini { padding: 16px 18px; box-shadow: var(--shadow-sm); }
.price-card.mini .price-head .el-tile { --s: 60px; }
.price-card.mini h2 { font-size: 1.08rem; }
.price-card.mini .price-big { font-size: clamp(1.7rem, 3vw, 2rem); margin: 10px 0 0; }
.price-card.mini .price-unit { font-size: .92rem; margin-bottom: 10px; }
.price-card.mini .price-sub { padding-top: 10px; font-size: .88rem; }
.price-card.mini .price-sub strong { font-size: 1.05rem; }
@media (max-width: 900px) {
  .price-card.mini { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .price-card.mini .price-head { grid-row: span 2; align-self: start; }
  .price-card.mini .price-head .meta { display: none; }
  .price-card.mini .price-big { margin: 0; }
  .price-card.mini .price-big::before { content: attr(data-name); display: block; font-size: 1rem; font-weight: 620; letter-spacing: -.01em; color: var(--ink); margin-bottom: 2px; }
  .price-card.mini .price-unit { margin: 0; }
  .price-card.mini .price-sub, .price-card.mini .mini-note, .price-card.mini .avail { grid-column: 1 / -1; margin-top: 10px; }
}
.mini-note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.avail { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--warn); }
.price-card.is-unavailable .price-big { color: var(--muted); font-size: 1.4rem; }
.price-head { display: flex; align-items: center; gap: 14px; }
.price-head .el-tile { --s: 88px; }
.price-head .meta { display: flex; flex-direction: column; gap: 2px; }
.price-card h2 { margin: 0; font-size: 1.2rem; font-weight: 640; letter-spacing: -.02em; }
.price-card .sym { font-size: .82rem; font-weight: 550; color: var(--muted); letter-spacing: .06em; }
.price-big { font-size: clamp(2.4rem, 5vw, 3rem); font-weight: 640; letter-spacing: -.045em; line-height: 1.05; margin: 14px 0 2px; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 1rem; color: var(--muted); margin: 0 0 14px; }
.price-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 14px 0 0; list-style: none; font-size: .95rem; color: var(--muted); border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.price-sub strong { display: block; font-size: 1.2rem; color: var(--ink); font-weight: 620; letter-spacing: -.02em; }
.status { display: flex; align-items: center; gap: 10px; background: var(--soft); border: 1px solid var(--line); color: var(--ink-2); padding: 10px 16px; border-radius: 12px; margin: 8px 0; font-size: .98rem; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 4px rgba(34,163,90,.16); flex: 0 0 10px; }
.status.warn { background: var(--warn-bg); border-color: #f0cfa8; color: var(--warn); }
.status.warn::before { background: var(--warn); box-shadow: 0 0 0 4px rgba(138,59,0,.14); }
.hero .btn-row .btn { flex: 0 0 auto; }
.hero .status { width: fit-content; max-width: 100%; background: #fff; }

/* Action tiles + cards */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.tile, .card-link { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.tile { display: flex; gap: 16px; align-items: center; padding: 18px 20px; color: var(--ink); min-height: 96px; }
.tile:hover, .card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.tile:hover { color: var(--ink); }
.tile .el-tile { --s: 72px; }
.tile strong { display: block; font-size: 1.1rem; letter-spacing: -.015em; }
.tile span { color: var(--muted); font-size: .95rem; }
.panel { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card-link { display: block; padding: 20px 22px; color: var(--muted); min-height: 56px; }
.card-link:hover { color: var(--muted); }
.card-link strong { display: block; font-size: 1.15rem; color: var(--ink); margin-bottom: 4px; letter-spacing: -.015em; }
.card-link strong::after { content: " \2192"; color: var(--accent); }

/* Forms */
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend, label.lbl { display: block; font-weight: 620; font-size: 1.08rem; margin-bottom: 8px; letter-spacing: -.01em; }
input[type="number"], input[type="text"], input[type="search"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 1.15rem; min-height: 56px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30,64,175,.16); outline: none; }
.row { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.seg { display: flex; gap: 10px; flex-wrap: wrap; }
.seg label { flex: 1 1 140px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 14px;
  border: 1px solid var(--line-2); border-radius: 14px; font-weight: 600; font-size: 1.08rem; cursor: pointer; background: var(--card); box-shadow: var(--shadow-sm); }
.seg input { width: 22px; height: 22px; accent-color: var(--accent); }
.seg label:has(input:checked) { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.check { display: flex; align-items: center; gap: 12px; font-weight: 620; font-size: 1.08rem; min-height: 56px; cursor: pointer; }
.check input { width: 26px; height: 26px; accent-color: var(--accent); }
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.calc form { background: var(--card); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } .calc form { padding: 18px; } }
.result { background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 96px; overflow: hidden; }
.result h2, .result h3 { color: var(--ink); font-weight: 640; }
.result h2 { font-size: 1.15rem; }
@media (max-width: 900px) { .result { position: static; } }
.result .big { font-size: 2.8rem; font-weight: 650; letter-spacing: -.045em; line-height: 1.1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.result p { margin: 6px 0; }
.result .sell { border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 14px; }
.result .fine { font-size: .95rem; color: var(--muted); }

/* Catalog */
.filters { background: var(--card); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.chip-group { margin: 10px 0 6px; }
.chip-group .lbl { font-size: .85rem; margin-bottom: 6px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; scroll-snap-align: start; min-height: 48px; padding: 8px 18px; font: inherit; font-size: 1.02rem; font-weight: 550; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (min-width: 901px) { .chips { flex-wrap: wrap; overflow: visible; } }
.toolbar { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 600px) { .toolbar { grid-template-columns: 1fr; } }
.count-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; font-weight: 600; }
.catalog { scroll-margin-top: 96px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
@media (max-width: 420px) { .catalog { grid-template-columns: 1fr; } }
.product { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; scroll-margin-top: 96px; }
.product-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 2px; flex: 1; }

/* Element tiles (periodic-table style): the only metal colors on the site */
.el-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 4 / 3; padding: 14px 16px;
  background: radial-gradient(110% 90% at 50% 0%, #ffffff 0%, #f5f6f8 60%, #eef0f3 100%); color: var(--ink); text-decoration: none; position: relative; border-bottom: 1px solid var(--line); }
a.el-media:hover { color: var(--ink); }
a.el-media:hover .el-tile { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,13,18,.12), 0 18px 32px -12px rgba(11,13,18,.35), inset 0 1px 0 rgba(255,255,255,.7); }
.el-tile { --s: 128px; position: relative; width: var(--s); height: var(--s); flex: 0 0 auto; border-radius: calc(var(--s) * .14); overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto auto; padding: calc(var(--s) * .07) calc(var(--s) * .09) calc(var(--s) * .08); text-align: center;
  font-family: var(--sans); font-variant-numeric: tabular-nums; line-height: 1; transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 1px 2px rgba(11,13,18,.12), 0 10px 24px -12px rgba(11,13,18,.32), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(0,0,0,.12); }
.el-tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.38) 45%, rgba(255,255,255,0) 60%); }
.el-tile::after { content: ""; position: absolute; inset: calc(var(--s) * .035); border-radius: calc(var(--s) * .11); border: 1px solid rgba(255,255,255,.45); pointer-events: none; }
.el-gold { background: linear-gradient(145deg, #fcebb0 0%, #ecc463 30%, #d6a23a 62%, #b07c1e 100%); color: #2a1c03; }
.el-silver { background: linear-gradient(145deg, #ffffff 0%, #e2e6eb 32%, #b9c1cb 66%, #8a939f 100%); color: #161a21; }
.el-platinum { background: linear-gradient(145deg, #f7f9fb 0%, #d5dce4 30%, #a9b6c4 66%, #6f7f91 100%); color: #121821; }   /* cool blue-steel */
.el-palladium { background: linear-gradient(145deg, #faf7f1 0%, #e3ddd1 32%, #bfb6a5 66%, #8b8170 100%); color: #1b1812; } /* warm pewter */
.el-copper { background: linear-gradient(145deg, #ffe0c9 0%, #f0a77a 30%, #d27a4b 62%, #9c5229 100%); color: #2a1206; }
.el-num { justify-self: start; font-size: calc(var(--s) * .14); font-weight: 650; }
.el-sym { align-self: center; font-size: calc(var(--s) * .44); font-weight: 700; letter-spacing: -.04em; line-height: .9; }
.el-name { font-size: calc(var(--s) * .12); font-weight: 600; letter-spacing: .01em; }
.el-mass { font-size: calc(var(--s) * .1); font-weight: 550; opacity: .8; margin-top: calc(var(--s) * .03); }
.el-purity { margin: 10px 0 0; font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; text-align: center; }
.el-purity.el-unknown { color: var(--muted); font-weight: 600; }
.el-meta { margin: 0; font-size: .92rem; font-weight: 550; color: var(--muted); letter-spacing: .01em; }
.item-media .el-media { aspect-ratio: auto; min-height: 420px; padding: 36px 20px; }
.item-media .el-tile { --s: 220px; }
.item-media .el-purity { font-size: 1.45rem; margin-top: 18px; }
.item-media .el-meta { font-size: 1.05rem; }
@media (max-width: 900px) { .item-media .el-media { min-height: 0; padding: 30px 16px; } .item-media .el-tile { --s: 170px; } }
.product h3 { font-size: 1.18rem; margin: 10px 0 4px; }
.product h3 a { color: var(--ink); text-decoration: none; }
.product h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .82rem; font-weight: 600; background: var(--soft); color: var(--ink-2); border-radius: 999px; padding: 3px 11px; box-shadow: inset 0 0 0 1px var(--line); }
.tag-gold, .tag-silver, .tag-platinum, .tag-palladium, .tag-copper { background: var(--soft); color: var(--ink-2); }
.est-label { margin: 8px 0 0; font-weight: 550; font-size: .95rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.badge { font-size: .72rem; font-weight: 650; background: var(--soft-2); color: var(--muted); border-radius: 6px; padding: 2px 8px; text-transform: uppercase; letter-spacing: .06em; }
.est { font-size: 2.1rem; font-weight: 650; letter-spacing: -.04em; margin: 0; font-variant-numeric: tabular-nums; }
.note { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .95rem; color: var(--ink-2); }
.check-label { font-weight: 620; margin: 14px 0 8px; font-size: .95rem; }
.dealer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.btn-dealer { flex-direction: column; gap: 0; min-height: 60px; padding: 8px 10px; font-size: .98rem; background: var(--card); color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn-dealer:hover { background: var(--soft); color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn-dealer .sub { font-size: .78rem; font-weight: 550; color: var(--muted); }
.details-link { font-weight: 600; margin: 10px 0 0; }
.top-btn { position: fixed; right: 16px; bottom: 16px; z-index: 4; box-shadow: var(--shadow-lg); min-height: 52px; padding: 10px 20px; transition: opacity .18s ease, visibility .18s, transform .15s ease; }
.top-btn.tucked { opacity: 0; visibility: hidden; pointer-events: none; }
@media (max-width: 900px) {
  /* Phones: a small round arrow button instead of a wide pill */
  .top-btn { width: 52px; height: 52px; min-height: 52px; padding: 0; border-radius: 50%; right: 14px; bottom: 14px; }
  .top-btn .top-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Item detail */
.crumbs { font-size: .95rem; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
.item { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .item { grid-template-columns: 1fr; gap: 18px; } }
.item-media { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: 96px; }
@media (max-width: 900px) { .item-media { position: static; } }
.item-media figcaption { font-size: .9rem; color: var(--muted); padding: 10px 16px 14px; }
.item-info h1 { margin-top: 10px; }
.price-panel { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 20px 22px; margin: 16px 0; }
.price-panel .est { font-size: 2.6rem; }
.specs { width: 100%; border-collapse: collapse; margin: 8px 0 0; box-shadow: none; }
.specs th, .specs td { border: 0; border-bottom: 1px solid var(--line); padding: 12px 4px; background: none; font-size: 1rem; }
.specs th { color: var(--muted); font-weight: 550; width: 45%; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

/* Articles */
.article { max-width: 780px; }
.article h2 { font-size: 1.55rem; }
.article li { margin: 6px 0; }
.article > p, .article > ul, .article > ol, .article > table { font-size: 1.04rem; }
.callout { border: 1px solid var(--accent-line); border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 20px 0; }
table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 14px 0; font-size: 1rem; background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
th, td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--soft); color: var(--ink); font-weight: 620; }
.table-scroll { overflow-x: auto; }

/* Ads: hidden and take no space until enabled in js/site-config.js */
.ad-slot { margin: 32px auto; max-width: 728px; min-height: 100px; text-align: center; }
.ad-slot[hidden] { display: none; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: .8rem; color: var(--muted); margin-bottom: 4px; }

/* Footer: light gray, thin top border */
.site-footer { background: var(--soft); color: var(--ink-2); padding: 40px 0 34px; font-size: 1rem; border-top: 1px solid var(--line); }
.site-footer .foot-brand { display: inline-block; color: var(--ink); text-decoration: none; font-size: 1.3rem; font-weight: 640; letter-spacing: -.035em; margin-bottom: 14px; }
.site-footer a { color: var(--ink); text-decoration-color: var(--line-2); }
.site-footer a:hover { color: var(--accent-ink); }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-footer ul a { display: inline-block; padding: 8px 0; text-decoration: none; font-weight: 550; }
.site-footer p { color: var(--muted); }
.text-btn { background: var(--card); border: 1px solid var(--line-2); color: var(--ink); border-radius: 12px; padding: 8px 16px; font: inherit; font-size: 1rem; font-weight: 600; min-height: 48px; cursor: pointer; }
.text-btn:hover { border-color: var(--ink); }

/* Calculator: result bar pinned to the bottom on phones */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); text-decoration: none; padding: 12px 20px; min-height: 64px; font-size: 1.05rem;
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(11,13,18,.2); }
  .mobile-bar strong { font-size: 1.5rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
  .mobile-bar .go { font-size: .9rem; text-decoration: underline; color: var(--accent-ink); }
  .mobile-bar:hover { color: var(--ink); }
  body:has(.mobile-bar) .site-footer { padding-bottom: 96px; }
}

/* ---------- My Purchases ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.row-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row-even { grid-template-columns: 1fr; } }
.local-note { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 14px 18px; margin: 6px 0 18px; }
.local-note .ico { flex: 0 0 24px; color: var(--accent); margin-top: 2px; }
.local-note p { margin: 0; }
.pf-summary { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.pf-summary > * { position: relative; z-index: 1; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .pf-stats { grid-template-columns: 1fr 1fr; } .pf-stats .pf-gain { grid-column: 1 / -1; } }
.pf-stat .k, .pf-metal .k { display: block; font-size: .9rem; font-weight: 550; color: var(--muted); }
.pf-stat strong { display: block; font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pf-stat .pct { display: block; font-size: .95rem; color: var(--muted); }
.pf-summary .gain.up { color: var(--ok); } .pf-summary .gain.down { color: var(--bad); }
.pf-metals { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pf-metal { display: flex; align-items: center; gap: 12px; grid-column: span 2; min-width: 0; }
.pf-metal.major { grid-column: span 3; }
.pf-metal .sub { display: block; font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) { .pf-metals { grid-template-columns: 1fr 1fr; } .pf-metal, .pf-metal.major { grid-column: span 1; } }
.pf-unpriced { color: var(--warn); margin: 10px 0 0; }
.pf-metal .el-tile { --s: 58px; }
.pf-metal strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
@media (max-width: 420px) { .pf-metal strong { font-size: 1.1rem; } .pf-metal .el-tile { --s: 50px; } .pf-metal { gap: 10px; } }
.pf-spot { margin: 14px 0 0; font-size: .92rem; color: var(--muted); }
.pf-chart-panel h2 { margin-top: 0; font-size: 1.35rem; }
.pf-svg { width: 100%; height: auto; display: block; }
.pf-svg .gl { stroke: var(--line); stroke-width: 1; }
.pf-svg .yl, .pf-svg .xl { font: 550 14px var(--sans); fill: var(--muted); }
.pf-svg .val { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.pf-svg .paid { fill: none; stroke: #8a909c; stroke-width: 2; stroke-dasharray: 6 6; }
.pf-svg .area { fill: url(#pfa); }
.pf-svg .dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: .95rem; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin-right: 8px; border-top: 4px solid var(--accent); border-radius: 2px; }
.legend i.lp { border-top: 3px dashed #8a909c; }
.chart-empty { color: var(--muted); background: var(--soft); border-radius: 12px; padding: 14px 16px; margin: 8px 0 0; }
.pf-form-panel h2 { margin-top: 0; }
.btn-row .btn#add-btn { flex: 0 1 auto; min-width: 260px; }
@media (max-width: 600px) { .btn-row .btn#add-btn { flex: 1 1 100%; } }
.pf-preview { display: flex; gap: 14px; align-items: center; margin-top: 12px; background: var(--soft); border-radius: 14px; padding: 12px; }
.pf-preview .pf-entry-tile { padding: 0; background: none; }
.pf-preview .el-tile { --s: 64px; }
.form-errors { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; border-left: 4px solid var(--warn); }
.form-errors p, .form-errors ul { margin: 4px 0; }
#pf-list { display: grid; gap: 16px; }
.pf-empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.pf-entry { display: grid; grid-template-columns: 170px 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; scroll-margin-top: 96px; }
.pf-entry.flash { animation: flash 1.6s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px rgba(30,64,175,.45), var(--shadow); } 100% { box-shadow: var(--shadow-sm); } }
.pf-entry-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 18px 10px;
  background: radial-gradient(110% 90% at 50% 0%, #ffffff 0%, #f5f6f8 60%, #eef0f3 100%); border-right: 1px solid var(--line); }
.pf-entry-tile .el-tile { --s: 100px; }
.pf-entry-tile .el-purity { font-size: .95rem; margin-top: 8px; }
.pf-entry-body { padding: 16px 20px 18px; min-width: 0; }
.pf-entry h3 { margin: 0 0 2px; font-size: 1.2rem; }
.pf-meta { margin: 0 0 10px; color: var(--muted); font-size: .98rem; }
.pf-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.pf-nums div { min-width: 0; }
.pf-nums dt { font-size: .85rem; font-weight: 550; color: var(--muted); }
.pf-nums dd { margin: 0; font-size: 1.12rem; font-weight: 620; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: -.015em; }
.pf-nums dd .small { font-weight: 450; display: block; }
@media (max-width: 900px) { .pf-nums { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .pf-entry { grid-template-columns: 1fr; }
  .pf-entry-tile { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pf-entry-tile .el-tile { --s: 72px; }
  .pf-entry-tile .el-purity { margin: 0; text-align: left; }
}
.gain { font-weight: 650; }
.pf-nums .gain .pct { display: block; }
.gain .pct { font-weight: 550; }
.gain.up { color: var(--ok); } .gain.down { color: var(--bad); } .gain.flat { color: var(--muted); }
.pf-notes { background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 12px 0 0; font-size: .98rem; white-space: pre-wrap; }
.pf-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pf-actions .btn { min-height: 48px; padding: 8px 20px; flex: 0 0 auto; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { color: #fff; background: var(--bad); border-color: var(--bad); }
.file-btn { cursor: pointer; }
.file-btn:focus-within, #import-file:focus-visible + .file-btn { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- News ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 44px 0 14px; }
.section-head h2 { margin: 0; }
.more-link { font-weight: 600; text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; }
.more-link:hover { text-decoration: underline; }
.news-filters { margin-top: 18px; }
.chip-n { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--soft-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.chips-note { margin: 4px 0 0; }
.chip[aria-pressed="true"] .chip-n { background: rgba(255,255,255,.2); color: #fff; }
.news-list { display: grid; gap: 12px; }
.news-item { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.news-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.news-item .el-tile { --s: 76px; }
.src-tile { width: 76px; height: 76px; flex: 0 0 auto; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.src-tile svg { width: 46%; height: auto; }
.src-kind { font-size: .66rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); }
.news-body { min-width: 0; }
.news-meta { margin: 0 0 4px; font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 0; align-items: center; }
.news-meta > * + *::before { content: "\00b7"; margin: 0 8px; color: var(--line-2); font-weight: 700; }
.news-src { font-weight: 650; color: var(--ink-2); }
.news-title { margin: 0; font-size: 1.17rem; line-height: 1.32; font-weight: 620; letter-spacing: -.02em; }
.news-title a { color: var(--ink); text-decoration: none; }
.news-title a:hover { color: var(--accent-ink); text-decoration: underline; text-decoration-color: var(--accent-line); }
.news-title .ext { color: var(--muted); font-weight: 500; }
.news-snip { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }
.news-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.news-tag { font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; box-shadow: inset 0 0 0 1px var(--line); }
.news-empty { color: var(--muted); background: var(--soft); border-radius: 12px; padding: 14px 16px; margin: 0; }
.news-item.compact { padding: 14px 16px; gap: 14px; align-items: center; }
.news-item.compact .el-tile { --s: 58px; }
.news-item.compact .src-tile { width: 58px; height: 58px; }
.news-item.compact .src-kind { font-size: .55rem; }
.news-item.compact .news-title { font-size: 1.08rem; }
@media (min-width: 901px) { .news-strip { grid-template-columns: repeat(3, 1fr); } .news-strip .news-item.compact { align-items: start; } }
@media (max-width: 520px) {
  .news-item, .news-item.compact { gap: 12px; padding: 14px; }
  .news-item .el-tile, .news-item.compact .el-tile { --s: 52px; }
  .news-item .src-tile, .news-item.compact .src-tile { width: 52px; height: 52px; border-radius: 9px; }
  .news-item .src-kind { display: none; } .news-item .src-tile svg { width: 56%; }
  .news-title, .news-item.compact .news-title { font-size: 1.06rem; }
  .news-tags { margin-top: 8px; }
}
.site-footer .news-note { font-size: .92rem; }

/* v9 emblems: nav icons, menu icon, chip emblems (decorative, monochrome line icons + mini element tiles) */
.site-nav a { gap: 9px; }
.nav-ic { width: 19px; height: 19px; flex: 0 0 auto; color: var(--muted); transition: color .15s; }
.site-nav a:hover .nav-ic { color: var(--ink); }
.site-nav a[aria-current="page"] .nav-ic { color: var(--accent); }
.menu-btn { display: none; align-items: center; gap: 8px; }
.menu-ic { width: 20px; height: 20px; flex: 0 0 auto; }
@media (max-width: 1040px) {
  .menu-btn { display: inline-flex; }
  .site-nav a { gap: 14px; }
  .nav-ic { width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
  .site-nav a[aria-current="page"] .nav-ic { background: var(--accent); border-color: var(--accent); color: #fff; }
}
@media (min-width: 1041px) and (max-width: 1180px) { .site-nav a { padding: 10px 7px; gap: 6px; font-size: .96rem; } .nav-ic { width: 17px; height: 17px; } }
.chip.chip-has-ic { display: inline-flex; align-items: center; gap: 8px; padding-left: 12px; }
.chip-ic { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.chip[aria-pressed="true"] .chip-ic { color: #fff; }
.chip-el { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: -.03em; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(11,13,18,.10), inset 0 1px 0 rgba(255,255,255,.6); flex: 0 0 auto; }
.chip[aria-pressed="true"] .chip-el { box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }
.chip-els { display: inline-flex; }
.chip-els .chip-el { width: 14px; height: 22px; border-radius: 4px; margin-left: -4px; box-shadow: 0 0 0 1.5px var(--card); }
.chip-els .chip-el:first-child { margin-left: 0; }
.chip[aria-pressed="true"] .chip-els .chip-el { box-shadow: 0 0 0 1.5px var(--accent); }

/* Best price per ounce (home): real dealer prices, never estimates */
.best { margin-top: 8px; }
.best .section-head { margin-top: 40px; }
.best-lead { color: var(--muted); margin: -4px 0 10px; }
.best .status { width: fit-content; max-width: 100%; }
.best-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0 10px; }
@media (max-width: 1100px) { .best-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .best-grid { grid-template-columns: 1fr; } }
.best-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.best-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.best-head .el-tile { --s: 56px; }
.best-head h3 { margin: 0; font-size: 1.08rem; }
.best-head .sym { font-size: .82rem; font-weight: 550; color: var(--muted); letter-spacing: .04em; }
.best-body { display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.best-body p { margin: 0; }
.best-price { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.best-asl { font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.best-price strong { font-size: clamp(1.75rem, 3.2vw, 2.05rem); font-weight: 650; letter-spacing: -.04em; line-height: 1.1; }
.best-type { font-size: .88rem; color: var(--muted); margin-top: 2px !important; font-variant-numeric: tabular-nums; }
.best-card-price { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.best-prem { display: inline-block; align-self: flex-start; margin-top: 10px !important; font-size: .88rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.best-prod { margin-top: 12px !important; font-size: .95rem; font-weight: 560; line-height: 1.35; color: var(--ink); }
.best-dealer { font-size: .95rem; color: var(--ink-2); margin-top: 2px !important; }
.best-when { font-size: .85rem; color: var(--muted); margin: 6px 0 14px !important; }
.best-when.is-old { color: var(--warn); font-weight: 600; }
.best-btn { margin-top: auto; min-height: 48px; font-size: .98rem; padding: 10px 14px; width: 100%; }

.best-wait { color: var(--muted); font-size: .95rem; padding: 6px 0 4px; }
.best-card.is-updating .best-head .el-tile, .best-card.is-last-known .best-price strong { opacity: .62; }
.best-note { margin: 10px 0 4px; }
.aff-note { font-size: .85rem; color: var(--muted); margin: 8px 0; }
.dealer-btns + .aff-note { margin-top: 10px; }
@media (max-width: 640px) { .best-card { padding: 14px 16px; } }

/* Share SpotPrice (home) */
.share { margin: 48px 0 8px; }
.share-inner { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 22px; box-shadow: var(--shadow-sm); }
.share h2 { margin: 0 0 6px; font-size: clamp(1.35rem, 2.4vw, 1.65rem); }
.share-lead { color: var(--muted); margin: 0 0 18px; max-width: 52ch; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.share-url { flex: 1 1 220px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; font-size: 1rem; letter-spacing: -.01em; }
.share-url:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.share-row .btn { flex: 0 1 auto; min-width: 132px; }
.share #share-status { min-height: 1.4em; margin: 12px 0 0; color: var(--ok); }
.share #share-status.is-err { color: var(--bad); }
@media (max-width: 560px) {
  .share-inner { padding: 22px 18px 18px; }
  .share-row .btn { flex: 1 1 140px; }
}
