* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.app {
  width: 100%;
  max-width: 860px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.sub {
  color: #6b7280;
  margin-bottom: 20px;
  line-height: 1.5;
}

.topbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

button, input {
  font: inherit;
}

button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

button.secondary {
  background: #e5e7eb;
  color: #111827;
}

button.option-btn {
  width: 100%;
  text-align: left;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
}

button.option-btn:hover {
  background: #e5e7eb;
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px;
  background: #fcfdff;
}

.task-type {
  display: inline-block;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.question {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.25;
}

.answer-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.result {
  min-height: 52px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.step-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  line-height: 1.5;
}

.step-row {
  margin: 6px 0;
  font-size: 16px;
}

.step-label {
  font-weight: 700;
}

.hidden {
  display: none;
}

.ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.bad {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.neutral {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.footer-note {
  margin-top: 18px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .topbar {
    grid-template-columns: repeat(2, 1fr);
  }

  .question {
    font-size: 28px;
  }
}
