@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

.fq-page {
  --fq-ink: #1a2826;
  --fq-muted: #5b6b68;
  --fq-teal: #149b9b;
  --fq-teal-strong: #0d9488;
  --fq-line: #e2e8f0;
  --fq-font: "Outfit", "Aeonik", system-ui, -apple-system, sans-serif;
  font-family: var(--fq-font);
  color: var(--fq-ink);
}

.fq-page-head {
  margin: 0 0 20px;
}

.fq-title {
  margin: 0;
  font-family: var(--fq-font);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
  color: #1a2826;
}

.fq-subtitle {
  margin: 10px 0 0;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
  color: #1a2826;
}

.fq-subtitle-support {
  max-width: 42rem;
  color: #5b6b68;
  font-size: 20px;
  line-height: 1.4;
}

.fq-status-line {
  margin: 10px 0 0;
  font-size: 13px;
  color: #5b6b68;
}

.fq-status-pill {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 600;
}

.fq-sticky-summary {
  position: sticky;
  top: var(--portal-topbar-height, 72px);
  z-index: 25;
  margin: 0 0 20px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(237, 249, 248, 0.96) 70%, rgba(237, 249, 248, 0));
}

.fq-overall-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 40, 36, 0.06);
  padding: 16px 20px 18px;
}

.fq-overall-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fq-meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fq-muted);
  font-weight: 500;
}

.fq-overall-pct {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fq-ink);
}

.fq-progress-track {
  height: 16px;
  border-radius: 42px;
  background: #e8eef0;
  overflow: hidden;
}

.fq-progress-fill {
  height: 100%;
  border-radius: 42px;
  background: linear-gradient(90deg, #a2dede 0%, #56c4c4 100%);
  transition: width 0.35s ease;
}

.fq-workspace {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr);
  gap: 16px;
  align-items: start;
}

.fq-steps {
  position: sticky;
  top: calc(var(--portal-topbar-height, 72px) + var(--questionnaire-summary-height, 176px));
  align-self: start;
  z-index: 20;
  min-width: 0;
}

.fq-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fq-step-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  color: var(--fq-ink);
  cursor: pointer;
  font: inherit;
}

.fq-step-item.is-upcoming {
  color: #8a9693;
  background: rgba(255, 255, 255, 0.45);
}

.fq-step-item.is-current {
  background: #56c4c4;
  color: #fff;
  border-color: #56c4c4;
}

.fq-step-item.is-completed {
  background: #fff;
  border-color: #d7ecec;
}

.fq-step-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  background: #e8f6f4;
  color: var(--fq-teal-strong);
}

.fq-step-item.is-current .fq-step-index {
  background: #fff;
  color: var(--fq-teal);
}

.fq-step-item.is-completed .fq-step-index {
  background: #149b9b;
  color: #fff;
}

.fq-step-item.is-upcoming .fq-step-index {
  background: #f1f5f4;
  color: #9aa6a3;
  border: 1px solid #d7e0de;
}

.fq-step-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fq-step-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}

.fq-step-meta {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 400;
}

.fq-section-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 40, 36, 0.08);
  padding: 22px 24px 20px;
  min-width: 0;
}

.fq-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.fq-section-head-main {
  flex: 1;
  min-width: 0;
}

.fq-section-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fq-ink);
  line-height: 1.2;
}

.fq-section-track {
  height: 8px;
  border-radius: 42px;
  background: #e8eef0;
  overflow: hidden;
  max-width: 280px;
}

.fq-section-fill {
  height: 100%;
  border-radius: 42px;
  background: linear-gradient(90deg, #a2dede 0%, #56c4c4 100%);
}

.fq-section-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border-radius: 53px;
  background: #149b9b;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.fq-save-row {
  min-height: 18px;
  margin-bottom: 8px;
}

.fq-saved {
  font-size: 0.78rem;
  color: var(--fq-teal-strong);
  font-weight: 500;
}

.fq-saved.is-idle {
  visibility: hidden;
}

.fq-questions {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.fq-question {
  display: flex;
  flex-direction: column;
}

.fq-q-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fq-teal);
  margin-bottom: 6px;
}

.fq-q-prompt {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fq-ink);
  line-height: 1.35;
}

.fq-q-help {
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: #6a9e9c;
  line-height: 1.4;
}

.fq-q-control {
  margin-top: 12px;
}

.fq-input,
.fq-select,
.fq-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5dee3;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: var(--fq-ink);
  font: inherit;
  font-size: 0.95rem;
}

.fq-input:focus,
.fq-select:focus,
.fq-textarea:focus {
  outline: 2px solid rgba(20, 155, 155, 0.35);
  border-color: #56c4c4;
}

.fq-input-number {
  max-width: 140px;
}

.fq-radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fq-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  background: #fcfefe;
}

.fq-radio-row.is-selected {
  border-color: #56c4c4;
  background: #f0faf9;
}

.fq-radio-row input {
  accent-color: #149b9b;
}

.fq-multi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fq-multi-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fcfefe;
  cursor: pointer;
  font: inherit;
  color: var(--fq-ink);
}

.fq-multi-card.is-selected {
  border-color: #149b9b;
  background: #f0faf9;
}

.fq-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #c5d0ce;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #fff;
}

.fq-check.is-on {
  background: #149b9b;
  border-color: #149b9b;
}

.fq-multi-label {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
}

.fq-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--fq-line);
}

.fq-btn {
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.fq-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fq-btn-ghost {
  background: transparent;
  color: var(--fq-muted);
  border: 1px solid #d5dee3;
  margin-right: auto;
}

.fq-btn-secondary {
  background: #e8f6f4;
  color: var(--fq-teal-strong);
}

.fq-btn-primary {
  background: #149b9b;
  color: #fff;
}

.fq-review {
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fq-review-section {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 40, 36, 0.04);
  overflow: hidden;
}

.fq-review-toggle {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.fq-review-toggle-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fq-review-section-title {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--fq-ink);
}

.fq-review-complete {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f766e;
}

.fq-review-complete.is-incomplete {
  color: #b45309;
}

.fq-review-chevron {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef8f7;
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fq-review-body {
  padding: 0 20px 18px;
  border-top: 1px solid #eef2f4;
}

.fq-review-qa {
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fq-review-qa:last-of-type {
  border-bottom: 0;
}

.fq-review-q {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fq-ink);
  line-height: 1.4;
}

.fq-review-a {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.5;
}

.fq-review-edit {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #149b9b;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.fq-review-submit {
  margin-top: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
}

.fq-confirm-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--fq-ink);
  cursor: pointer;
}

.fq-confirm-check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #149b9b;
}

.fq-review-footer {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.fq-confirm {
  max-width: 640px;
  margin: 48px auto 24px;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 40, 36, 0.06);
}

.fq-confirm-copy {
  margin: 14px 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #5b6b68;
}

.fq-confirm-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fq-loading,
.fq-error {
  margin: 24px 0;
  font-family: var(--fq-font, inherit);
  color: #5b6b68;
}

.fq-error {
  color: #b91c1c;
}

@media (max-width: 980px) {
  .fq-title {
    font-size: 36px;
  }
  .fq-subtitle {
    font-size: 18px;
  }
  .fq-workspace {
    grid-template-columns: 1fr;
  }
  .fq-steps {
    position: static;
  }
  .fq-sticky-summary {
    position: static;
    background: transparent;
  }
  .fq-multi-grid {
    grid-template-columns: 1fr;
  }
}
