:root {
  --ink: #141a2e;
  --muted: #5b6472;
  --line: #e4e8f0;
  --brand: #2743e3;
  --brand-dark: #1c33bb;
  --brand-soft: #e3edf9;
  --danger: #b3261e;
  --bg: #ffffff;
  --surface: #f4f6fb;
  --focus: #2743e3;
  --radius: 14px;
  --tap: 48px;
  --font-body: 'Work Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-display: 'League Spartan', 'Avenir Next', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.quote-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.quote-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 4px;
}

.quote-title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.progress-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.25s ease;
}

.progress-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.step-question {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 16px;
}

.option-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.option-item {
  position: relative;
}

.option-item input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.option-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.option-item label:hover {
  border-color: var(--brand);
}

.option-item input[type='radio']:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.option-item input[type='radio']:checked + label {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

.option-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex: none;
  display: inline-block;
  position: relative;
}

.option-item input[type='radio']:checked + label .option-check {
  border-color: var(--brand);
}

.option-item input[type='radio']:checked + label .option-check::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}

.form-fields {
  display: grid;
  gap: 14px;
  margin: 0 0 8px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.form-field input:focus {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field-error {
  display: none;
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
}

.form-field.invalid input {
  border-color: var(--danger);
}

.form-field.invalid .field-error {
  display: block;
}

.data-notice {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}

.data-notice a {
  color: var(--brand);
}

.wizard-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  min-height: var(--tap);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  flex: 1;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-primary:disabled {
  background: #aebcde;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:focus-visible,
.btn-primary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.form-error {
  display: none;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
}

.form-error.visible {
  display: block;
}

.verdict {
  display: none;
  padding: 24px 4px;
}

.verdict.visible {
  display: block;
}

.verdict-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.verdict-badge.good {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.verdict-badge.possible {
  background: #fdf3e0;
  color: #8a5a00;
}

.verdict-badge.unlikely {
  background: #fbeae9;
  color: var(--danger);
}

.verdict h2 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 12px;
}

.verdict-note {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 16px;
}

.verdict-recs {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.verdict-recs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  font-weight: 600;
}

.verdict-recs li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
}

.verdict-demo {
  font-size: 13px;
  color: var(--muted);
  background: #fdf3e0;
  border: 1px solid #ecd9a8;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 16px 0 0;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
