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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding: 24px 24px 16px;
}

header h1 {
  font-size: 1.8rem;
  color: #ffffff;
  margin-bottom: 16px;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.toggle-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid #444;
  background: #1a1a2e;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.toggle-btn:hover {
  border-color: #666;
}

.toggle-btn.active {
  background: #2a2a4a;
  border-color: #7c6ff7;
  color: #ffffff;
}

.toggle-btn.hidden {
  opacity: 0.4;
  text-decoration: line-through;
}

main {
  flex: 1;
  padding: 16px 24px;
}

.loading {
  text-align: center;
  padding: 60px;
  color: #888;
  font-size: 1.1rem;
}

.error {
  text-align: center;
  padding: 24px;
  color: #ef4444;
  background: #1a1a2e;
  border-radius: 8px;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.card {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #2a2a3e;
}

.card-header {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-count {
  font-size: 0.8rem;
  color: #888;
  font-weight: 400;
}

.pr-item {
  padding: 10px 0;
  border-top: 1px solid #2a2a3e;
}

.pr-title {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.pr-title a {
  color: #a5b4fc;
  text-decoration: none;
}

.pr-title a:hover {
  text-decoration: underline;
}

.pr-meta {
  font-size: 0.75rem;
  color: #888;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pr-repo {
  color: #999;
}

.wait-time {
  font-weight: 600;
  font-size: 0.8rem;
}

.wait-time.green {
  color: #22c55e;
}

.wait-time.yellow {
  color: #eab308;
}

.wait-time.red {
  color: #ef4444;
}

.no-reviews {
  color: #555;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px 0;
}

footer {
  text-align: center;
  padding: 16px 24px;
  font-size: 0.75rem;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legend {
  display: flex;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green {
  background: #22c55e;
}

.dot.yellow {
  background: #eab308;
}

.dot.red {
  background: #ef4444;
}

.page-section {
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a3e;
}

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.collapsible > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.collapsible > summary::-webkit-details-marker {
  display: none;
}

.collapsible > summary:hover h2 {
  color: #a5b4fc;
}

.section-header-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.collapse-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #888;
  border-bottom: 2px solid #888;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-bottom: 4px;
}

.collapsible:not([open]) .collapse-chevron {
  transform: rotate(-45deg);
}

.collapsible:not([open]) .collapsible-body {
  display: none;
}

.freshness {
  font-size: 0.75rem;
  color: #888;
}

.bar-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.bar-chart {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a3e;
}

.bar-chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.bar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr max-content;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.bar-name {
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  display: block;
  background: #0f0f1a;
  border-radius: 4px;
  height: 16px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  background: #7c6ff7;
  height: 100%;
  border-radius: 4px;
  transition: width 0.2s ease;
}

.bar-fill.green {
  background: #22c55e;
}

.bar-fill.yellow {
  background: #eab308;
}

.bar-fill.red {
  background: #ef4444;
}

.bar-count.dim {
  color: #555;
}

.bar-count .bar-count-n {
  color: #555;
  font-size: 0.7rem;
  margin-left: 4px;
  font-weight: 400;
}

.bar-count {
  color: #a5b4fc;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.build-info {
  font-size: 0.75rem;
  color: #555;
}

.build-info a {
  color: #888;
  text-decoration: none;
}

.build-info a:hover {
  color: #a5b4fc;
  text-decoration: underline;
}
