@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1b1f26;
  --line: #262b33;
  --text: #edeff2;
  --muted: #8a93a3;
  --pulse: #ff5a5f;
  --recovery: #43d9ad;
  --amber: #f2b134;
  --deep: #2e5cff;
  --light: #6ea8ff;
  --rem: #b48cff;
  --awake: #ff8a5a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

header {
  padding: 28px 32px 8px;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.02em;
  margin: 4px 0 16px;
}

.pulse-line {
  width: 100%;
  height: 60px;
  display: block;
}

.pulse-path {
  fill: none;
  stroke: var(--pulse);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 2.4s ease-out forwards, glow 1.4s ease-in-out infinite alternate;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow {
  from { filter: drop-shadow(0 0 0px rgba(255,90,95,0.2)); }
  to { filter: drop-shadow(0 0 6px rgba(255,90,95,0.55)); }
}

main {
  padding: 8px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1100px;
}

section.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
section.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
section.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}
.card.wide { width: 100%; }

.card .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.card .value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  letter-spacing: 0.01em;
  line-height: 1;
}
.card .value.small { font-size: 22px; font-family: 'Inter', sans-serif; font-weight: 600; }

.card .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.card .unit {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--muted);
  margin-left: 6px;
}

.card.accent-pulse .value { color: var(--pulse); }
.card.accent-recovery .value { color: var(--recovery); }
.card.accent-amber .value { color: var(--amber); }

.stage-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
}
.stage-bar > div { height: 100%; }
.stage-bar .deep { background: var(--deep); }
.stage-bar .light { background: var(--light); }
.stage-bar .rem { background: var(--rem); }
.stage-bar .awake { background: var(--awake); }

.stage-legend {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.stage-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.activity-row:last-child { border-bottom: none; }
.activity-row .name { font-weight: 600; }
.activity-row .meta { color: var(--muted); }

.pr-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.pr-row:last-child { border-bottom: none; }
.pr-row .type { font-weight: 600; }
.pr-row .meta { color: var(--muted); }

.empty, .error {
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0;
}
.error { color: var(--pulse); }
