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

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

header {
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

header .subtitle {
  color: #86868b;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.status {
  text-align: center;
  color: #86868b;
  padding: 2rem;
  font-size: 0.875rem;
}

.status.error {
  color: #ff3b30;
}

.week-group {
  margin-bottom: 2rem;
}

.week-group h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #86868b;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #d2d2d7;
}

.build-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.build-info {
  flex: 1;
  min-width: 0;
}

.build-branch {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.build-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #86868b;
}

.build-meta a {
  color: #0066cc;
  text-decoration: none;
}

.build-meta a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-nightly {
  background: #e8f0fe;
  color: #1a73e8;
}

.badge-manual {
  background: #fef7e0;
  color: #ea8600;
}

.badge-push {
  background: #e6f4ea;
  color: #137333;
}

.download-btn {
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.download-btn:hover {
  background: #0055aa;
}

.download-btn:disabled {
  background: #d2d2d7;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: #86868b;
  font-size: 0.8125rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #86868b;
}

.empty-state p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .build-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-btn {
    align-self: stretch;
    text-align: center;
  }
}
