:root {
  --bg-0: #f7f2e8;
  --bg-1: #efe5cf;
  --ink: #2d2317;
  --ink-soft: #675945;
  --card: rgba(255, 252, 245, 0.8);
  --card-border: rgba(184, 139, 47, 0.28);
  --gold-1: #b88b2f;
  --gold-2: #f1c766;
  --buy: #2f7f6f;
  --sell: #b7543b;
  --shadow: 0 18px 50px rgba(106, 69, 15, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(241, 199, 102, 0.25), transparent 35%),
    radial-gradient(circle at 85% 5%, rgba(184, 139, 47, 0.2), transparent 30%),
    linear-gradient(145deg, var(--bg-0) 0%, var(--bg-1) 100%);
  padding: 28px 14px 60px;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.orb-a {
  width: 320px;
  height: 320px;
  right: -80px;
  top: -80px;
  background: radial-gradient(circle, rgba(241, 199, 102, 0.35), rgba(241, 199, 102, 0));
}

.orb-b {
  width: 380px;
  height: 380px;
  left: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(184, 139, 47, 0.24), rgba(184, 139, 47, 0));
}

.page {
  width: min(1100px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.subtitle {
  margin-top: 12px;
  max-width: 760px;
  color: var(--ink-soft);
}

.repo-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.repo-star {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  order: 1;
}

.repo-actions .github-button {
  display: inline-block;
  line-height: 0;
}

.repo-actions iframe {
  display: block;
  border: 0;
  transform: scaleY(1.09);
  transform-origin: left center;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  order: 2;
  border: 1px solid rgba(115, 85, 30, 0.25);
  background: rgba(255, 253, 248, 0.85);
  color: var(--ink);
  text-decoration: none;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.repo-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 248, 225, 0.92);
  border-color: rgba(115, 85, 30, 0.45);
}

.control-row {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.button-group {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.button-group button {
  appearance: none;
  border: 1px solid rgba(115, 85, 30, 0.25);
  background: rgba(255, 253, 248, 0.85);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button-group button:hover {
  transform: translateY(-1px);
  background: rgba(255, 248, 225, 0.92);
}

.button-group button.active {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-1));
  color: #2c200f;
  border-color: rgba(115, 85, 30, 0.5);
}

.chart-panel {
  padding: 22px;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.chart-wrap {
  margin-top: 12px;
  height: 420px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.stat-card h3 {
  margin-top: 8px;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.1;
}

.note {
  padding: 18px 22px;
}

.note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.note p + p {
  margin-top: 8px;
}

.note-list {
  margin: 10px 0 0;
  padding-left: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.note-list li {
  position: relative;
  padding-left: 18px;
}

.note-list li::before {
  content: "*";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-1);
  font-size: 14px;
  line-height: 1.5;
}

.note-list li + li {
  margin-top: 4px;
}

a {
  color: #81590c;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 600ms cubic-bezier(0.21, 1, 0.34, 1) forwards;
}

.reveal:nth-child(2) {
  animation-delay: 80ms;
}

.reveal:nth-child(3) {
  animation-delay: 140ms;
}

.reveal:nth-child(4) {
  animation-delay: 200ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-wrap {
    height: 360px;
  }
}

@media (max-width: 620px) {
  body {
    padding: 16px 10px 40px;
  }

  .hero,
  .chart-panel {
    padding: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .chart-wrap {
    height: 320px;
  }
}
