/* GoldPHP — styles */
:root {
  --bg: #0e0e11;
  --bg-alt: #15151b;
  --panel: #1b1b22;
  --panel-2: #20202a;
  --line: #2b2b35;
  --text: #ecedf2;
  --muted: #9b9bab;
  --gold: #e8b34a;
  --gold-2: #f6cf73;
  --gold-deep: #c8902a;
  --green: #34c77b;
  --red: #f06262;
  --radius: 14px;
  --wrap: 1060px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
.visually-hidden, .alert-form label.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,17,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 20px; }
.accent { color: var(--gold); }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 780px) { .nav { display: none; } }

/* ---------- Hero / price ---------- */
.hero { padding: 46px 0 30px; background:
  radial-gradient(900px 360px at 50% -120px, rgba(232,179,74,.16), transparent 70%); }
.eyebrow { color: var(--gold); font-weight: 600; font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 0 0 10px; }
.hero .sub { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 26px; }

.price-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.price-main { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.price-label { color: var(--muted); font-size: 14px; font-weight: 500; }
.price-value {
  font-size: clamp(40px, 9vw, 60px); font-weight: 800; letter-spacing: -.02em;
  color: var(--gold-2); line-height: 1; font-variant-numeric: tabular-nums;
}
.price-value[data-loading] { color: var(--muted); }
.price-change { font-size: 15px; font-weight: 600; min-height: 20px; }
.price-change.up { color: var(--green); }
.price-change.down { color: var(--red); }

.price-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-k { color: var(--muted); font-size: 12px; }
.meta-v { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { .price-meta { grid-template-columns: repeat(2, 1fr); } }

.price-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; gap: 12px; }
.status { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live::before { background: var(--green); box-shadow: 0 0 0 3px rgba(52,199,123,.18); }
.status.stale::before { background: var(--gold); }
.status.error::before { background: var(--red); }
.refresh {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 12px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.refresh:hover { border-color: var(--gold-deep); color: var(--gold-2); }
.refresh:active { transform: translateY(1px); }
.updated { color: var(--muted); font-size: 13px; margin: 14px 2px 0; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(22px, 3.4vw, 30px); margin: 0 0 8px; }
.section-sub { color: var(--muted); max-width: 680px; margin: 0 0 24px; font-size: 16px; }
.note { color: var(--muted); font-size: 13.5px; margin-top: 16px; }

/* ---------- Karat table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.karat-table { width: 100%; border-collapse: collapse; min-width: 460px; }
.karat-table th, .karat-table td { padding: 14px 16px; text-align: left; }
.karat-table thead th { background: var(--panel); color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.karat-table tbody tr { border-top: 1px solid var(--line); }
.karat-table tbody tr:hover { background: var(--panel); }
.karat-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.k-name { font-weight: 800; font-size: 16px; }
.k-name .k-badge { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(232,179,74,.12); border: 1px solid rgba(232,179,74,.3); padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.k-price { font-weight: 700; color: var(--gold-2); }
@media (max-width: 620px) { .hide-sm { display: none; } }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc-form { display: flex; flex-direction: column; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input-unit { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.input-unit:focus-within { border-color: var(--gold-deep); }
.input-unit input { border: none; background: transparent; }
.input-unit .unit { padding: 0 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.input-unit .unit.prefix { padding-right: 4px; padding-left: 12px; }
input, select {
  width: 100%; padding: 12px 14px; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
select:focus, input:focus { border-color: var(--gold-deep); }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239b9bab' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.calc-out { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.calc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.calc-row.headline { padding-top: 4px; }
.calc-k { color: var(--muted); font-size: 14px; }
.calc-v { font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.calc-row.headline .calc-v { color: var(--gold-2); font-size: 30px; }
.calc-v.range { font-size: 18px; }
.hint { cursor: help; color: var(--gold); margin-left: 5px; font-size: 12px; }
.disclaimer { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font-weight: 700; border-radius: 11px; padding: 13px 18px; cursor: pointer; border: 1px solid transparent; font-size: 15px; text-align: center; }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); color: #2a1c05; }
.btn-gold:hover { text-decoration: none; filter: brightness(1.05); }
.btn-gold:active { transform: translateY(1px); }
.calc-out .btn { width: 100%; margin-top: 18px; }

/* ---------- Where to sell cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.opt-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.opt-card h3 { margin: 0 0 8px; font-size: 18px; }
.opt-card p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.opt-tag { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; margin-bottom: 14px; }
.opt-tag.best { color: var(--green); border-color: rgba(52,199,123,.4); background: rgba(52,199,123,.08); }
.opt-link { font-weight: 700; font-size: 14.5px; }

/* ---------- Price alert ---------- */
.alert-box { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; background: linear-gradient(120deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
@media (max-width: 760px) { .alert-box { grid-template-columns: 1fr; } }
.alert-copy h2 { margin: 0 0 8px; }
.alert-copy p { color: var(--muted); margin: 0; }
.alert-form { display: flex; flex-direction: column; gap: 12px; }
.alert-form .input-unit { background: var(--bg); }
.alert-msg { font-size: 13.5px; margin: 2px 0 0; min-height: 18px; color: var(--green); }

/* ---------- Ad slots ---------- */
.ad-slot { display: flex; align-items: center; justify-content: center; color: #55555f; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; border: 1px dashed var(--line); border-radius: 10px; background: repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,.012) 12px, rgba(255,255,255,.012) 24px); margin: 26px 0; }
.ad-leaderboard { height: 90px; }
.ad-rect { height: 250px; max-width: 336px; margin-left: auto; margin-right: auto; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-bottom: 14px; }
.prose h3 { margin: 28px 0 10px; font-size: 19px; color: var(--gold-2); }
.prose p, .prose li { color: #c7c8d2; font-size: 16px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border: 1px solid var(--line); border-radius: 11px; padding: 4px 18px; margin-bottom: 10px; background: var(--panel); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 20px; color: var(--gold); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 14px; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 36px 0; margin-top: 10px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { font-size: 20px; font-weight: 800; }
.foot-note { color: var(--muted); font-size: 14px; max-width: 320px; }
.foot-meta p { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.foot-meta .disclaimer { font-size: 12.5px; }
.copyright { opacity: .8; }

/* tabular numbers everywhere it counts */
.price-value, .meta-v, .calc-v, .k-price { font-variant-numeric: tabular-nums; }

/* ---------- Footer columns (multi-page) ---------- */
.foot-brand-row { margin-bottom: 24px; }
.footer-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.foot-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin: 0 0 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin: 7px 0; }
.foot-col a { color: var(--muted); font-size: 14px; }
.foot-col a:hover { color: var(--gold-2); text-decoration: none; }
.foot-about .foot-note { margin-top: 10px; }
.foot-legal { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-legal .disclaimer { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; max-width: none; }
.foot-legal .copyright { color: var(--muted); font-size: 12.5px; margin: 0; opacity: .85; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold-2); }
.crumbs span[aria-current] { color: var(--text); }

/* ---------- Content / article pages ---------- */
.content-head { padding-top: 30px; padding-bottom: 0; border-top: none;
  background: radial-gradient(700px 240px at 20% -100px, rgba(232,179,74,.12), transparent 70%); }
.content-head h1 { font-size: clamp(26px, 4.5vw, 38px); margin: 6px 0 8px; }
.karat-hero { margin-top: 18px; }
.updated-inline { font-size: 13px; color: var(--muted); }
.karat-table tr.active { background: rgba(232,179,74,.07); }
.k-name a { color: var(--text); font-weight: 800; }
.k-name a:hover { color: var(--gold-2); text-decoration: none; }
.formula { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 8px; padding: 14px 16px; font-size: 15px; color: var(--gold-2); overflow-x: auto; }
.callout { background: rgba(232,179,74,.08); border: 1px solid rgba(232,179,74,.3); border-radius: 10px;
  padding: 14px 18px; margin-top: 16px; }
.callout p { margin: 0; font-size: 15px; color: var(--text); }

/* ---------- Price history chart ---------- */
.chart-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0 16px; }
.chart-stats .stat { display: flex; flex-direction: column; gap: 3px; }
.stat-k { color: var(--muted); font-size: 12px; }
.stat-v { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.stat-v.up { color: var(--green); }
.stat-v.down { color: var(--red); }
.chartbox { width: 100%; }
.chart-svg { width: 100%; height: 300px; display: block; }
.chart-note { color: var(--muted); font-size: 13px; text-align: center; margin: 10px 0 0; }
@media (max-width: 620px) { .chart-stats { grid-template-columns: repeat(2, 1fr); } .chart-svg { height: 240px; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
