:root {
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --red-600: #dc2626;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.container--center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-700);
}

.container--center .brand {
  justify-content: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--green-600);
  color: var(--white);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}

.hero {
  margin-bottom: 24px;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 16px;
  color: var(--gray-500);
  margin: 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.score-block {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
}

.score-block legend {
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-900);
  margin-bottom: 12px;
  padding: 0;
}

.score-hint {
  display: flex;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--gray-500);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
}

.score-btn {
  position: relative;
  cursor: pointer;
}

.score-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.score-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-700);
  transition: all 0.12s ease;
}

.score-btn:hover span {
  border-color: var(--green-600);
  color: var(--green-700);
}

.score-btn input:checked + span {
  background: var(--green-600);
  border-color: var(--green-600);
  color: var(--white);
}

.score-btn input:focus-visible + span {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.field-label em {
  font-style: normal;
  color: var(--gray-400);
  font-weight: 400;
}

.field textarea,
.field input[type="text"] {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  resize: vertical;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.field textarea:focus,
.field input[type="text"]:focus {
  outline: none;
  background: var(--white);
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}

.submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--green-600);
  color: var(--white);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.05s ease;
}

.submit:hover { background: var(--green-700); }
.submit:active { transform: translateY(1px); }
.submit:disabled { background: var(--gray-400); cursor: not-allowed; }

.submit-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit.is-loading .submit-spinner {
  display: inline-block;
}

.submit.is-loading .submit-label {
  opacity: 0.6;
}

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

.error {
  margin: 16px 0 0;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red-600);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.legal {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--gray-400);
  line-height: 1.5;
}

.thanks {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px 24px;
  box-shadow: var(--shadow-sm);
}

.thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 50%;
  margin-bottom: 20px;
}

.cta-link {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--white);
  color: var(--green-700);
  border: 1.5px solid var(--green-600);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.12s ease;
}

.cta-link:hover {
  background: var(--green-50);
}

@media (max-width: 480px) {
  .container { padding: 20px 16px 48px; }
  h1 { font-size: 24px; }
  .card { padding: 20px 16px; }
  .score-grid { gap: 4px; }
  .score-btn span { height: 40px; font-size: 14px; }
}

@media (max-width: 380px) {
  .score-grid { grid-template-columns: repeat(6, 1fr); }
}
