:root {
  --bg: #0a0d11;
  --fg: #d6dde5;
  --muted: #6f7c8a;
  --accent: #4cc9f0;
  --ok: #4ade80;
  --timer: #fbbf24;
  --fail: #f87171;
  --line: #1a2330;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'JetBrains Mono', 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 3rem 1.5rem;
}

main {
  max-width: 860px;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.logo {
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(76, 201, 240, 0.4);
}

h1 {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin: 0.3rem 0;
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.card h2 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.85em;
  text-transform: none;
  letter-spacing: 0;
}

.status-list,
.sprint-list,
.goal-list {
  list-style: none;
}

.status-list li,
.sprint-list li,
.goal-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.status-list li:last-child,
.sprint-list li:last-child,
.goal-list li:last-child {
  border: none;
  padding-bottom: 0;
}

.status-list li:first-child,
.sprint-list li:first-child,
.goal-list li:first-child {
  padding-top: 0;
}

.loading {
  color: var(--muted);
  font-style: italic;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  flex-shrink: 0;
  min-width: 4.5rem;
  text-align: center;
}

.badge.ok {
  background: rgba(74, 222, 128, 0.12);
  color: var(--ok);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.badge.timer,
.badge.unknown {
  background: rgba(251, 191, 36, 0.12);
  color: var(--timer);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge.fail {
  background: rgba(248, 113, 113, 0.12);
  color: var(--fail);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  margin: 0 0.4rem;
  vertical-align: middle;
  transition: background 0.3s, box-shadow 0.3s;
}

.live-dot.ok {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

.live-dot.fail {
  background: var(--fail);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.num {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  width: 1.8rem;
  flex-shrink: 0;
}

.meta {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.metric {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.metric-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1;
}

.metric-value .unit {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 0.15rem;
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  min-height: 1.1em;
}

.bar {
  margin-top: 0.6rem;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent), var(--ok));
  width: 0%;
  transition: width 0.6s ease-out;
}

.goal {
  flex-wrap: wrap;
}

.goal-id {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 2.2rem;
  flex-shrink: 0;
}

.goal-source {
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--line);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.goal-title {
  font-size: 0.85rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-done {
  opacity: 0.55;
}

.goal-dropped {
  opacity: 0.4;
  text-decoration: line-through;
}

.goal-in_progress .goal-title {
  color: var(--accent);
}

code {
  background: var(--line);
  color: var(--accent);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 1rem 0;
}

footer .quote {
  margin-top: 1rem;
  font-style: italic;
  color: var(--accent);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  body {
    padding: 2rem 1rem;
  }
  h1 {
    font-size: 2.2rem;
  }
  .logo {
    font-size: 3rem;
  }
  .metric-value {
    font-size: 1.4rem;
  }
  .badge {
    min-width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .live-dot.ok {
    animation: none;
  }
}
