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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f8f9fa;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  min-height: 100vh;
}

header { margin-bottom: 2rem; }
.logo { height: 28px; }

main { margin-top: 3rem; }

.state.hidden { display: none; }
.hidden { display: none !important; }

h1 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

p { color: #6b7280; margin-bottom: 1.5rem; font-size: 0.9375rem; }

/* Buttons */
.btn {
  padding: 0.625rem 1.25rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: #333; }

.btn-sm {
  padding: 0.3125rem 0.625rem;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-sm:hover { background: #333; }
.btn-sm:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }

.btn-outline {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }

.btn-link {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: underline;
}
.btn-link:hover { color: #374151; }

/* User bar */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #d1d5db;
}
#user-email { font-size: 0.875rem; color: #4b5563; }

.disclaimer {
  font-size: 0.75rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Download groups */
#downloads-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.download-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.group-header {
  padding: 1rem 1.25rem 0.25rem;
}

.group-name {
  font-weight: 600;
  font-size: 1.0625rem;
  color: #1a1a1a;
}

/* Version rows */
.versions-list {
  display: flex;
  flex-direction: column;
}

.version-row {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #f3f4f6;
  background: #fff;
}

.version-row:last-child {
  padding-bottom: 1rem;
}

.version-header,
.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.variant-wrapper {
  margin-top: 0.375rem;
}

.version-left {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.version-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.version-name {
  font-weight: 500;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.version-meta {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
}

/* When version-meta is a standalone second line (single-variant layout) */
.version-row > .version-meta {
  margin-top: 0.125rem;
}

.platform-tag, .latest-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.platform-tag {
  background: #f3f4f6;
  color: #4b5563;
  text-transform: capitalize;
}

.latest-tag {
  background: #ecfdf5;
  color: #059669;
}

.release-notes {
  font-size: 0.8125rem;
  color: #4b5563;
  margin: 0.375rem 0;
  white-space: pre-line;
  line-height: 1.5;
}


/* CLI command section */
.cli-section {
  margin-top: 0.625rem;
}

.cli-code-header {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}

.cli-command {
  display: block;
  background: #f9fafb;
  color: #1a1a1a;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

.copy-btn {
  padding: 0.1875rem 0.5rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.6875rem;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s;
}
.copy-btn:hover { background: #f9fafb; border-color: #9ca3af; }
.copy-btn.copied { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

.no-downloads {
  color: #9ca3af;
  text-align: center;
  padding: 2rem 0;
}

/* Loading */
.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid #e5e7eb;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#error-state { text-align: center; }
