:root {
  color-scheme: dark;
  --bg: #07101d;
  --panel: rgba(10, 18, 34, 0.96);
  --text: #eef4ff;
  --muted: #9eb0d0;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.16);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(220, 38, 38, 0.16), transparent 34%),
    var(--bg);
  color: var(--text);
}
button, a { font: inherit; }
.page {
  width: min(1140px, calc(100vw - 20px));
  margin: 20px auto 40px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.topbar h1 { margin: 8px 0 0; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1; }
.topbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #8dbdff;
  font-size: 0.75rem;
}
.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.hero { padding: 16px 14px 18px; }
.tab-row {
  display: inline-flex;
  gap: 10px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  margin-bottom: 18px;
}
.tab-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;
}
.tab-button.active.bench { background: var(--blue-soft); color: #d8e9ff; }
.tab-button.active.squat { background: var(--red-soft); color: #ffe0e0; }
.hero-readout {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 10px;
}
.readout-label { color: var(--muted); font-size: 0.92rem; margin-bottom: 6px; }
.hero-value {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.92;
  font-weight: 760;
  letter-spacing: -0.03em;
}
.hero-date { font-size: 1.05rem; color: var(--text); }
.chart-shell {
  position: relative;
  width: 100%;
  height: 430px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
}
.chart-shell svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}
.summary-card .label { color: var(--muted); font-size: 0.84rem; margin-bottom: 6px; }
.summary-card .value { font-size: 1.16rem; font-weight: 700; }
.summary-card .sub { color: var(--muted); margin-top: 4px; font-size: 0.9rem; }
.chart-overlay-date, .chart-overlay-value { fill: var(--text); }
.chart-overlay-label, .axis-label { fill: rgba(238,244,255,0.66); }
.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.56);
}
.modal-card {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  margin: 8vh auto 0;
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.modal-head h2 { margin: 8px 0 0; }
.modal-copy, .bullet-list { color: var(--muted); }
.bullet-list { padding-left: 18px; margin-bottom: 0; }
@media (max-width: 760px) {
  .page { width: min(100vw - 6px, 1140px); margin-top: 8px; }
  .hero { padding: 10px 6px 12px; }
  .hero-readout, .topbar { flex-direction: column; align-items: flex-start; }
  .summary-strip { grid-template-columns: 1fr; }
  .chart-shell { height: 420px; border-radius: 20px; }
  .tab-row { gap: 6px; padding: 4px; }
  .tab-button { padding: 10px 14px; }
}
