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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

button {
  touch-action: manipulation;
}

#version-tag {
  font-size: 0.65rem;
  color: #b0bac5;
  font-weight: 400;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
}

.nav {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 420px;
  margin-bottom: 1rem;
}

.nav-link {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #4a5568;
  background: #e2e8f0;
  transition: background 0.15s, color 0.15s;
}

.nav-link.active {
  background: #667eea;
  color: white;
}

/* ── Shared card header ──────────────────────────────── */
.card-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-date {
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #667eea;
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

/* ── Stats grid & tiles ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-tile {
  background: #f7fafc;
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #718096;
  margin-bottom: 0.3rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.1;
}

.stat-sub {
  font-size: 0.75rem;
  color: #718096;
  margin-top: 0.2rem;
}

/* ── Utility ─────────────────────────────────────────── */
.empty {
  text-align: center;
  color: #718096;
  font-size: 0.95rem;
  padding: 2rem 0;
}

.loading {
  text-align: center;
  color: #a0aec0;
  font-size: 0.95rem;
  padding: 2rem 0;
}
