* {
  box-sizing: border-box;
}

:root {
  --ink: #172033;
  --muted: #657089;
  --surface: #ffffff;
  --soft: #eef2f7;
  --line: #d8dfeb;
  --accent: #293d73;
  --accent-strong: #182951;
  --good: #216e52;
  --warn: #8a5d13;
  --danger: #8a2f39;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(41, 61, 115, 0.12), transparent 32rem),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.25rem 0 4rem;
}

.hero {
  padding: 1.5rem 0 1.75rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
  color: var(--muted);
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 223, 235, 0.95);
  border-radius: 22px;
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: 0 18px 55px rgba(23, 32, 51, 0.09);
}

.hidden {
  display: none !important;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-grid label:first-child {
  grid-column: 1 / -1;
}

label,
.block-label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

input[type="text"],
input:not([type]),
textarea,
.form-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid rgba(41, 61, 115, 0.22);
  outline-offset: 2px;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, opacity 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-strong);
}

.secondary {
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.privacy,
footer,
.muted {
  color: var(--muted);
}

.privacy {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.progress-wrap {
  height: 8px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 220ms ease;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 750;
}

.phase-pill {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: var(--soft);
  color: var(--accent);
  font-size: 0.86rem;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.answer-button {
  min-height: 64px;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.answer-button:hover {
  border-color: var(--accent);
}

.answer-button.selected {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.answer-button:disabled {
  cursor: default;
  opacity: 0.75;
}

.block-label {
  margin: 1rem 0;
}

input[type="range"] {
  width: min(420px, 100%);
}

.distribution-row {
  display: grid;
  grid-template-columns: 96px 1fr 48px;
  align-items: center;
  gap: 0.75rem;
  margin: 0.8rem 0;
}

.distribution-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.distribution-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.feedback {
  margin-top: 1.25rem;
  border-left: 5px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1rem 1rem 1.1rem;
  background: #f5f7fb;
}

.feedback-result {
  margin-bottom: 0.45rem;
  font-weight: 900;
}

.status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  color: var(--danger);
  font-weight: 700;
}

.summary-box {
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: var(--soft);
}

footer {
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 1rem, 920px);
    padding-top: 1rem;
  }

  .form-grid,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .form-grid label:first-child {
    grid-column: auto;
  }

  .answer-button {
    min-height: 52px;
  }

  .distribution-row {
    grid-template-columns: 84px 1fr 42px;
    gap: 0.5rem;
  }
}
