:root {
  --navy: #1B3A5C;
  --gold: #C8A84B;
  --ink: #222222;
  --muted: #6b7280;
  --bg: #f7f5f0;
  --card-bg: #ffffff;
  --border: #e3ddd1;
  --error: #b3261e;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  min-height: 100vh;
}

.loading { text-align: center; color: var(--muted); padding-top: 64px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 2px 10px rgba(27, 58, 92, 0.06);
}

.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s ease;
}

.intro-text {
  color: var(--navy);
  font-size: 15px;
  background: #f0ede4;
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 24px;
}

h1, h2 {
  color: var(--navy);
  margin-top: 0;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
}

.field { margin-bottom: 20px; }

.hint { font-size: 13px; color: var(--muted); margin-top: 4px; margin-bottom: 16px; }

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

textarea { min-height: 90px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 168, 75, 0.25);
}

.statement {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.statement:last-child { border-bottom: none; }

.statement-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.rating-row {
  display: flex;
  gap: 8px;
}

.rating-btn {
  flex: 1;
  min-height: 48px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rating-btn:hover { border-color: var(--gold); }

.rating-btn.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-field input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.checkbox-field label { font-weight: 400; margin: 0; color: var(--ink); font-size: 14px; }

.radio-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.radio-field input { width: 18px; height: 18px; flex-shrink: 0; }
.radio-field label { font-weight: 500; margin: 0; color: var(--ink); font-size: 15px; }

.loading-inline {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
  font-size: 15px;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}

button.primary, button.secondary {
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

button.primary {
  background: var(--gold);
  color: var(--navy);
  margin-left: auto;
}
button.primary:hover { filter: brightness(0.95); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

button.secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.error-banner {
  background: #fdecea;
  color: var(--error);
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.thank-you {
  text-align: center;
  padding: 40px 12px;
}
.thank-you h1 { margin-bottom: 12px; }
.thank-you p { color: var(--muted); font-size: 15px; }

@media (max-width: 420px) {
  .rating-row { gap: 6px; }
  .rating-btn { min-height: 44px; font-size: 15px; }
  .card { padding: 20px 16px; }
}
