/* QUESTIONNAIRE PAGES */
.test {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 5vw 5rem;
}

.test-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-light);
  text-decoration: none;
}
.test-back:hover { color: var(--ink); }

.test h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.test-note {
  font-size: 0.88rem;
  color: var(--ink-light);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* progress */
.test-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.test-prev {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(26,26,26,0.18);
  border-radius: 100px;
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
}
.test-prev:hover { border-color: #6b7fc4; }
.test-prev:disabled { opacity: 0.35; cursor: default; }
.test-prev:disabled:hover { border-color: rgba(26,26,26,0.18); }

.test-progress { flex: 1; }

.test-progress-label {
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 0.45rem;
}

.test-progress-track {
  height: 4px;
  border-radius: 4px;
  background: #ecedf3;
  overflow: hidden;
}

.test-progress-fill {
  height: 100%;
  width: 0;
  background: #6b7fc4;
  transition: width 0.3s ease;
}

/* question */
.test-stem {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
}

.test-item {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 1.8rem;
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.test-option {
  text-align: left;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(26,26,26,0.12);
  border-radius: 16px;
  padding: 1.05rem 1.3rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.test-option:hover { border-color: #6b7fc4; }
.test-option.is-chosen {
  background: #6b7fc4;
  border-color: #6b7fc4;
  color: #fff;
}
.test-option:focus-visible {
  outline: 2px solid #6b7fc4;
  outline-offset: 2px;
}

/* answer sheet */
.sheet-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.sheet-q {
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(26,26,26,0.07);
}

.sheet-q-text {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.sheet-q-num {
  color: var(--ink-light);
  margin-right: 0.35rem;
}

.sheet-a {
  font-size: 0.88rem;
  color: var(--ink-light);
  padding: 0.15rem 0 0.15rem 1.4rem;
  position: relative;
}

.sheet-a.is-chosen {
  color: var(--ink);
  font-weight: 500;
}

.sheet-a.is-chosen::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #6b7fc4;
}

/* result */
.result {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(26,26,26,0.08);
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.result-name {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  font-weight: 500;
}

.result-score {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.result-score small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0;
}

.scale {
  display: flex;
  gap: 6px;
}

.scale-group { min-width: 0; }

.scale-cells {
  display: flex;
  gap: 2px;
}

.scale-cell {
  flex: 1;
  height: 22px;
  border-radius: 3px;
  background: #ecedf3;
}

.scale-cell.is-on { background: #6b7fc4; }

.scale-range {
  font-size: 0.72rem;
  color: var(--ink-light);
  margin-top: 0.45rem;
  white-space: nowrap;
}

.scale-group.is-current .scale-range {
  color: var(--ink);
  font-weight: 500;
}

.result-level {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 1.8rem 0 0.6rem;
}

.result-text {
  color: var(--ink-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.result-disclaimer {
  font-size: 0.85rem;
  color: var(--ink-light);
  padding-top: 1rem;
  border-top: 1px solid rgba(26,26,26,0.07);
}

.result-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.btn-plain {
  background: none;
  border: 1px solid rgba(26,26,26,0.18);
  border-radius: 100px;
  padding: 0.9rem 2rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}
.btn-plain:hover { border-color: #6b7fc4; }

.crisis {
  margin-top: 1.5rem;
  padding: 1.3rem 1.5rem;
  border-radius: 16px;
  background: #f3f4fa;
  border-left: 3px solid #6b7fc4;
}

.crisis p { font-size: 0.92rem; color: var(--ink); margin-bottom: 0.6rem; }
.crisis p:last-child { margin-bottom: 0; }
.crisis a { color: var(--ink); font-weight: 500; }

.test-source {
  margin-top: 2.5rem;
  font-size: 0.75rem;
  color: var(--ink-light);
  line-height: 1.6;
}

[hidden] { display: none !important; }

@media (max-width: 768px) {
  .scale { gap: 4px; }
  .scale-range { font-size: 0.65rem; }
  .result { padding: 1.4rem; }
}

/* sharing */
.share {
  margin-top: 1.6rem;
  padding: 1.4rem 1.5rem;
  border-radius: 16px;
  background: #f3f4fa;
}

.share-title {
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.share-text {
  font-size: 0.85rem;
  color: var(--ink-light);
  margin-bottom: 1.1rem;
}

.share-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

a.btn-plain {
  display: inline-block;
  text-decoration: none;
}

.shared-note {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink);
  background: #f3f4fa;
  border-radius: 100px;
  padding: 0.5rem 1.1rem;
  margin-bottom: 1.5rem;
}
.crisis .phone { font-weight: 500; white-space: nowrap; }
