:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e9ecf2;
  --muted: #98a1b3;
  --gold: #d4a72a;
  --up: #2fbf71;
  --down: #e2574c;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #1b1f2a 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

main {
  width: min(960px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  flex: 1;
}

.site-header {
  width: min(960px, 100% - 2rem);
  margin: 0 auto;
  padding: 1.5rem 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: .02em;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(140deg, #f3d67a, var(--gold) 55%, #8a6a10);
  box-shadow: 0 0 12px rgba(212, 167, 42, .55);
}

.site-footer {
  width: min(960px, 100% - 2rem);
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: .75rem 0 0; }

.hero-main { padding: .5rem 0 1.5rem; }

.eyebrow {
  margin: 0 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  color: var(--muted);
}

h1, h2 { margin: 0; line-height: 1.15; }

h1.price {
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .35rem;
}
h1.price .currency { color: var(--gold); font-size: .55em; }
h1.price .unit { font-size: .3em; font-weight: 500; color: var(--muted); }

.change {
  margin: .4rem 0 1.4rem;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: .5rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.change.up { color: var(--up); }
.change.down { color: var(--down); }
.change.flat { color: var(--muted); }
.change .muted { color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  margin: 0;
}
.stats > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .8rem;
}
.stats dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.stats dd { margin: .2rem 0 0; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.source { color: var(--muted); font-size: .8rem; margin: 1rem 0 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1rem;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}
.chart-head h2 { font-size: 1.05rem; font-weight: 600; }
.chart-head .muted { color: var(--muted); font-weight: 400; font-size: .9rem; }

.ranges { display: flex; gap: .35rem; }
.range {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .7rem;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.range:hover { color: var(--text); border-color: #3b4252; }
.range.is-active {
  color: #14161b;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.chart-wrap { position: relative; padding-left: 52px; }

.y-labels {
  position: absolute;
  inset: 0 0 0 0;
  pointer-events: none;
}
.y-labels span {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.chart {
  display: block;
  width: 100%;
  height: 260px;
  overflow: visible;
}
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.chart .line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .area { stroke: none; }
.chart.is-loading { opacity: .45; }

.axis-days {
  display: flex;
  justify-content: space-between;
  margin: .4rem 0 0;
  padding-left: 52px;
  color: var(--muted);
  font-size: .78rem;
}

.notice {
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  border-radius: 10px;
  border: 1px solid #5a4a1d;
  background: #241f10;
  color: #e8d79a;
  font-size: .9rem;
}

.muted { color: var(--muted); }

.about {
  margin-top: 2rem;
  max-width: 62ch;
}
.about h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.about p { color: #c3cad8; font-size: .95rem; margin: 0 0 .75rem; }
.about p.muted { font-size: .85rem; }

@media (max-width: 520px) {
  .chart { height: 200px; }
  .chart-wrap, .axis-days { padding-left: 44px; }
  .y-labels span { font-size: .66rem; }
  main { padding-top: 1.25rem; }
}
