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

html, body {
  min-height: 100%;
  background: #111;
  color: #ccc;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.stats-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 0;
  position: relative;
}

.back-link {
  position: absolute;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #888;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.back-link:hover {
  color: #ddd;
}

.stats-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #ddd;
}

/* ── Main layout ── */
.stats-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Cards ── */
.stat-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 28px;
}

.card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 20px;
}

/* ── Overview ── */
.overview-card {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.overview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overview-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 300;
  color: #eee;
  line-height: 1.1;
}

.overview-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777;
}

/* ── Camera section ── */
.camera-section {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.camera-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.camera-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.camera-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.camera-name {
  flex: 1;
  color: #ccc;
}

.camera-count {
  color: #999;
  min-width: 24px;
  text-align: right;
}

.camera-pct {
  color: #666;
  min-width: 32px;
  text-align: right;
  font-size: 12px;
}

.chart-wrap {
  width: 180px;
  flex-shrink: 0;
}

.chart-wide {
  width: 100%;
  height: 200px;
}

/* ── State list ── */
.state-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.state-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.state-name {
  min-width: 80px;
  color: #ccc;
  text-align: right;
  letter-spacing: 0.04em;
}

.state-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.state-bar-fill {
  height: 100%;
  background: #9a8c98;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.state-count {
  min-width: 24px;
  text-align: right;
  color: #888;
}

/* ── Season section ── */
.season-section {
  display: flex;
  justify-content: center;
}

.season-section .chart-wrap {
  width: 240px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .stats-header {
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px 0;
  }

  .back-link {
    position: static;
  }

  .stats-title {
    font-size: 22px;
  }

  .stats-main {
    padding: 24px 16px 48px;
    gap: 20px;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .overview-card {
    flex-direction: column;
    gap: 16px;
  }

  .overview-number {
    font-size: 28px;
  }

  .camera-section {
    flex-direction: column;
    gap: 20px;
  }

  .chart-wrap {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .state-name {
    min-width: 48px;
    font-size: 11px;
  }
}
