:root {
  --ink: #111418;
  --muted: #6e737c;
  --sand: #f2eadf;
  --paper: #fbf8f2;
  --card: rgba(255, 255, 255, 0.74);
  --line: rgba(18, 24, 31, 0.09);
  --accent: #c96f2d;
  --accent-2: #1f7a74;
  --bull: #199870;
  --bear: #d4574d;
  --trend: #2f6df6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 111, 45, 0.18), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(31, 122, 116, 0.18), transparent 24%),
    linear-gradient(180deg, #efe6da 0%, #faf6ef 100%);
}

.page {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 20px 36px;
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.lede {
  max-width: 740px;
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #363b42;
}

.hero-pulse {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(25, 152, 112, 0.18);
  background: radial-gradient(circle, rgba(25, 152, 112, 0.08), transparent 65%);
}

.ring-a {
  width: 220px;
  height: 220px;
  animation: drift 6s ease-in-out infinite;
}

.ring-b {
  width: 140px;
  height: 140px;
  animation: drift 4.6s ease-in-out infinite reverse;
}

.core {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #18876c, #0d5748);
  color: #effcf7;
  font-weight: 700;
  letter-spacing: 0.16em;
  box-shadow: 0 24px 40px rgba(14, 63, 53, 0.22);
}

.metrics,
.grid {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
}

.grid {
  grid-template-columns: 1.3fr 0.7fr;
  margin-bottom: 16px;
}

.metric,
.panel,
.chart-shell {
  backdrop-filter: blur(18px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 30px rgba(30, 38, 47, 0.06);
}

.metric {
  padding: 18px 18px 20px;
}

.metric.highlight {
  background:
    linear-gradient(135deg, rgba(201, 111, 45, 0.16), rgba(255, 255, 255, 0.8)),
    var(--card);
}

.label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.panel {
  padding: 20px;
}

.panel-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 14px;
}

.rule-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(18, 24, 31, 0.07);
}

.rule-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.rule-row span {
  color: var(--muted);
}

.rule-row strong {
  text-align: right;
  font-weight: 600;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(17, 20, 24, 0.06);
  font-weight: 700;
  margin-bottom: 14px;
}

.status-copy,
.subtle {
  color: var(--muted);
  line-height: 1.6;
}

.chart-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.range-picker {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

select {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
}

.chart-shell {
  position: relative;
  height: 620px;
  overflow: hidden;
}

#chart {
  width: 100%;
  height: 100%;
  display: block;
}

.tooltip {
  position: absolute;
  min-width: 210px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(17, 20, 24, 0.9);
  color: #f5f7fa;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  transform: translate(14px, 14px);
  box-shadow: 0 18px 34px rgba(8, 12, 16, 0.25);
}

.hidden {
  display: none;
}

@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.03); }
}

@media (max-width: 1080px) {
  .hero,
  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }

  .chart-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .chart-shell {
    height: 540px;
  }
}
