:root {
  --ink: #1c1e21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --bg: #f7f8fa;
  --card: #ffffff;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.loading, .error {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

.error { color: #b91c1c; }
.error button { margin-top: 12px; }

.progress {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.prompt {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 8px;
}

.help {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--accent); }
.option input { margin-top: 3px; }
.option.selected { border-color: var(--accent); background: #eff4ff; }

textarea, .other-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}
.other-text { min-height: 44px; resize: none; margin-top: 8px; }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}

button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:disabled { opacity: 0.5; cursor: default; }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }

.skip {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.summary h1, .summary h2 { font-size: 18px; margin: 24px 0 8px; }
.summary h1:first-child, .summary h2:first-child { margin-top: 0; }
.summary p { margin: 0 0 12px; }
.summary ul { margin: 0 0 12px; padding-left: 20px; }
.summary strong { font-weight: 700; }
.summary-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
}
