:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #5f6b7a;
  --border: #d8dee6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error: #dc2626;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  line-height: 1.25;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#account {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

#account:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

button#go {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button#go:hover:not(:disabled) {
  background: var(--accent-hover);
}

button#go:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

#progress progress {
  flex: 1;
  height: 10px;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e9f0;
  accent-color: var(--accent);
}

#progress progress::-webkit-progress-bar {
  background: #e5e9f0;
  border-radius: 999px;
}

#progress progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}

#progress progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}

#ptext {
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}

#download {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  color: #fff;
  background: #16a34a;
  border-radius: 8px;
  text-decoration: none;
}

#download:hover {
  background: #15803d;
}

#download.is-disabled {
  background: #9aa6b2;
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}

#error {
  margin-top: 1.25rem;
  padding: 0.75rem 0.875rem;
  color: var(--error);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.95rem;
}

details {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

details ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

details li {
  margin-bottom: 0.4rem;
}
