.survey-hub {
  padding: 30px 0 78px;
  background: #f7f8fa;
}

.survey-hub .container {
  max-width: 1180px;
}

.survey-hub-heading {
  max-width: 720px;
  margin: 28px auto 38px;
  text-align: center;
}

.survey-hub-heading h1 {
  margin: 14px 0 12px;
  color: #1d2935;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
}

.survey-hub-heading p {
  margin: 0 auto;
  color: #64717d;
  line-height: 1.7;
}

.survey-response-overview {
  margin: 0 0 28px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid #e3e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.045);
}

.survey-response-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.survey-response-overview-heading h2 {
  margin: 10px 0 5px;
  color: #25313d;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.survey-response-overview-heading p {
  margin: 0;
  color: #687581;
  font-size: 0.9rem;
}

.survey-response-total {
  display: grid;
  min-width: 145px;
  gap: 3px;
  padding: 13px 18px;
  border: 1px solid #f0d0d1;
  border-radius: 10px;
  background: #fff7f7;
  text-align: center;
}

.survey-response-total strong {
  color: #b30d13;
  font-size: 1.6rem;
  line-height: 1.2;
}

.survey-response-total span {
  color: #687581;
  font-size: 0.8rem;
}

.survey-response-filter {
  display: grid;
  grid-template-columns: max-content minmax(150px, 220px) max-content;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}

.survey-response-filter label {
  white-space: nowrap;
  color: #45515d;
  font-size: 0.86rem;
  font-weight: 650;
}

.survey-response-filter select {
  min-height: 40px;
  width: 100%;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #d7dde2;
  border-radius: 7px;
  background: #fff;
  color: #25313d;
  font: inherit;
}

.survey-response-filter select:focus {
  border-color: #c81016;
  outline: 3px solid rgba(200, 16, 22, 0.12);
}

.survey-response-filter .btn {
  width: auto;
  min-width: 100px;
  min-height: 40px;
  padding: 8px 15px;
  justify-self: start;
  white-space: nowrap;
}

.survey-response-chart {
  display: grid;
  gap: 15px;
}

.survey-response-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: #45515d;
  font-size: 0.86rem;
}

.survey-response-label strong {
  flex: 0 0 auto;
  color: #25313d;
}

.survey-response-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f2;
}

.survey-response-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c81016, #e1675d);
  transition: width 250ms ease;
}

.survey-response-updated {
  margin: 17px 0 0;
  color: #74808a;
  font-size: 0.78rem;
  text-align: right;
}

.survey-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.survey-hub-card {
  display: flex;
  min-height: 255px;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid #e3e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.survey-hub-card:hover {
  transform: translateY(-3px);
  border-color: #c81016;
  box-shadow: 0 12px 28px rgba(31, 42, 55, 0.09);
}

.survey-hub-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  background: #fff1f1;
  color: #c81016;
}

.survey-hub-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.survey-hub-card h2 {
  margin: 18px 0 8px;
  color: #25313d;
  font-size: 1.05rem;
  line-height: 1.35;
}

.survey-hub-card p {
  margin: 0 0 20px;
  color: #687581;
  font-size: 0.9rem;
  line-height: 1.6;
}

.survey-hub-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #b30d13;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.survey-hub-action:hover {
  color: #85090e;
  text-decoration: underline;
}

.survey-hub-action.is-unavailable {
  color: #7b858e;
  font-size: 0.8rem;
  font-weight: 600;
}

.survey-hub-audience {
  display: block;
  margin: -8px 0 18px;
  color: #727e88;
  font-size: 0.78rem;
  line-height: 1.45;
}

.survey-form-panel {
  max-width: 900px;
  margin: 28px auto 0;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid #e3e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(31, 42, 55, 0.06);
}

.survey-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid #edf0f2;
}

.survey-form-heading .survey-hub-icon {
  flex: 0 0 auto;
}

.survey-form-heading h1 {
  margin: 10px 0 7px;
  color: #1d2935;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.survey-form-heading p {
  margin: 0;
  color: #687581;
  line-height: 1.6;
}

.survey-form-heading .tag-soft {
  display: inline-block;
}

.survey-privacy-note {
  margin: 20px 0;
  padding: 13px 15px;
  border-left: 3px solid #c81016;
  border-radius: 4px 8px 8px 4px;
  background: #fff7f7;
  color: #5c646b;
  font-size: 0.9rem;
  line-height: 1.6;
}

.survey-form-section {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.survey-form-section legend {
  width: 100%;
  margin-bottom: 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid #edf0f2;
  color: #25313d;
  font-size: 1.08rem;
  font-weight: 750;
}

.survey-biodata-section {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #e7ebef;
  border-radius: 12px;
  background: #fbfcfd;
}

.survey-biodata-section legend {
  width: auto;
  margin: 0;
  padding: 0 8px;
  border: 0;
  color: #25313d;
  font-size: 1.12rem;
}

.survey-biodata-intro {
  margin: 2px 0 16px;
  color: #687581;
  font-size: 0.88rem;
  line-height: 1.55;
}

.survey-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 20px;
}

.survey-biodata-fields {
  gap: 13px 18px;
}

.survey-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.survey-field-full {
  grid-column: 1 / -1;
}

.survey-field label {
  color: #3d4954;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.survey-field-label {
  color: #3d4954;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.survey-field label span {
  margin-left: 3px;
  color: #c81016;
}

.survey-respondent-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.survey-respondent-choice {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #d7dde2;
  border-radius: 9px;
  background: #fff;
  color: #45515d;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  transition: border-color 140ms ease, background 140ms ease;
}

.survey-respondent-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.survey-respondent-choice span::before {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 1px solid #aab4bd;
  border-radius: 50%;
  background: #fff;
  content: "";
  vertical-align: -3px;
}

.survey-respondent-choice:has(input:checked) {
  border-color: #c81016;
  background: #fff7f7;
  color: #8c1015;
}

.survey-respondent-choice:has(input:checked) span::before {
  border: 5px solid #c81016;
}

.survey-respondent-choice:has(input:focus-visible) {
  outline: 3px solid rgba(200, 16, 22, 0.18);
  outline-offset: 2px;
}

.survey-field input,
.survey-field select,
.survey-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d7dde2;
  border-radius: 8px;
  background: #fff;
  color: #25313d;
  font: inherit;
  font-size: 0.92rem;
}

.survey-field-helper {
  color: #74808a;
  font-size: 0.78rem;
  line-height: 1.45;
}

.survey-field textarea {
  min-height: 108px;
  resize: vertical;
}

.survey-field input:focus,
.survey-field select:focus,
.survey-field textarea:focus {
  border-color: #c81016;
  outline: 3px solid rgba(200, 16, 22, 0.12);
}

.survey-field [aria-invalid="true"] {
  border-color: #b42318;
}

.survey-field-error {
  color: #b42318;
  font-size: 0.8rem;
}

.survey-success-message,
.survey-error-summary {
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 8px;
  line-height: 1.5;
}

.survey-success-message {
  border: 1px solid #a7d8b4;
  background: #f0faf3;
  color: #216b36;
}

.survey-error-summary {
  border: 1px solid #edb6b6;
  background: #fff4f4;
  color: #a51b1b;
}

.survey-result-card {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid #d9e6dc;
  border-radius: 14px;
  background: #fbfdfb;
  text-align: center;
}

.survey-result-card.is-good {
  border-color: #a7d8b4;
  background: #f2faf4;
}

.survey-result-card.is-neutral {
  border-color: #ead9a6;
  background: #fffcf2;
}

.survey-result-card.is-needs-improvement {
  border-color: #edb6b6;
  background: #fff6f6;
}

.survey-result-emoji {
  font-size: 3rem;
  line-height: 1.2;
}

.survey-result-eyebrow {
  margin: 12px 0 5px;
  color: #687581;
  font-size: 0.86rem;
  font-weight: 650;
}

.survey-result-card h2 {
  margin: 0;
  color: #25313d;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.survey-result-scores {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 22px auto 0;
}

.survey-result-scores > div {
  display: grid;
  min-width: 150px;
  gap: 4px;
  padding: 13px 18px;
  border: 1px solid rgba(65, 80, 90, 0.12);
  border-radius: 10px;
  background: #fff;
}

.survey-result-scores span {
  color: #687581;
  font-size: 0.82rem;
}

.survey-result-scores strong {
  color: #25313d;
  font-size: 1.3rem;
}

.survey-result-scores small {
  color: #74808a;
  font-size: 0.9rem;
  font-weight: 500;
}

.survey-result-score-note {
  margin: 10px 0 0;
  color: #74808a;
  font-size: 0.8rem;
}

.survey-result-narrative {
  max-width: 620px;
  margin: 18px auto 22px;
  color: #45515d;
  line-height: 1.65;
}

.survey-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.survey-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.survey-result-counters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.survey-result-counter {
  display: grid;
  min-height: 102px;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  gap: 10px 12px;
  padding: 15px;
  border: 1px solid #e3e7eb;
  border-radius: 10px;
  background: #fff;
  color: #34414c;
  transition: border-color 150ms ease, background 150ms ease;
}

.survey-result-counter > a:first-child {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.survey-result-counter > a:first-child span {
  font-size: 0.84rem;
  line-height: 1.4;
}

.survey-result-counter > a:first-child strong {
  color: #b30d13;
  font-size: 1.3rem;
}

.survey-result-counter:hover {
  border-color: #c81016;
  background: #fffafa;
}

.survey-question-manage {
  grid-column: 1 / -1;
  color: #b30d13;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.survey-question-manage:hover {
  text-decoration: underline;
}

.survey-result-detail {
  margin-top: 20px;
}

.survey-result-detail h2 {
  margin-top: 0;
}

.survey-builder-panel {
  overflow: hidden;
  border: 1px solid #e3e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 42, 55, 0.045);
}

.survey-builder-intro {
  padding: 24px 26px;
  border-bottom: 1px solid #edf0f2;
}

.survey-builder-intro h2 {
  margin: 12px 0 8px;
  color: #25313d;
  font-size: 1.2rem;
}

.survey-builder-intro p {
  max-width: 820px;
  margin: 0;
  color: #687581;
  line-height: 1.6;
}

.survey-builder-form {
  padding: 22px 26px 26px;
}

.survey-question-editor {
  min-width: 0;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid #e3e7eb;
  border-radius: 10px;
  background: #fbfcfd;
}

.survey-question-editor legend {
  padding: 0 8px;
  color: #25313d;
  font-size: 0.9rem;
  font-weight: 750;
}

.survey-builder-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: end;
}

.survey-builder-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.survey-builder-field-wide {
  grid-column: 1 / -1;
}

.survey-builder-field label {
  color: #45515d;
  font-size: 0.82rem;
  font-weight: 700;
}

.survey-builder-field input,
.survey-builder-field select,
.survey-builder-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d7dde2;
  border-radius: 7px;
  background: #fff;
  color: #25313d;
  font: inherit;
  font-size: 0.88rem;
}

.survey-builder-field textarea {
  min-height: 84px;
  resize: vertical;
}

.survey-builder-field input:focus,
.survey-builder-field select:focus,
.survey-builder-field textarea:focus {
  border-color: #c81016;
  outline: 3px solid rgba(200, 16, 22, 0.12);
}

.survey-question-required {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #45515d;
  font-size: 0.86rem;
}

.survey-question-required input {
  width: 16px;
  height: 16px;
  accent-color: #c81016;
}

.survey-question-remove {
  justify-self: start;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #edb6b6;
  border-radius: 7px;
  background: #fff;
  color: #a51b1b;
  font-size: 0.82rem;
}

.survey-builder-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}

.survey-builder-options.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .survey-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .survey-result-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .survey-hub {
    padding: 20px 0 52px;
  }

  .survey-hub-heading {
    margin: 24px auto 28px;
  }

  .survey-hub-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .survey-response-overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .survey-response-filter {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .survey-response-filter label {
    grid-column: 1 / -1;
  }

  .survey-response-total {
    width: 100%;
  }

  .survey-response-updated {
    text-align: left;
  }

  .survey-hub-card {
    min-height: 0;
    padding: 19px;
  }

  .survey-form-panel {
    margin-top: 20px;
    padding: 20px;
  }

  .survey-form-heading {
    gap: 13px;
  }

  .survey-form-fields {
    grid-template-columns: 1fr;
  }

  .survey-biodata-section {
    padding: 17px;
  }

  .survey-respondent-choices {
    grid-template-columns: 1fr;
  }

  .survey-field-full {
    grid-column: auto;
  }

  .survey-form-actions {
    flex-direction: column;
  }

  .survey-result-scores {
    flex-direction: column;
    align-items: stretch;
  }

  .survey-result-scores > div {
    min-width: 0;
  }

  .survey-form-actions .btn {
    width: 100%;
    text-align: center;
  }

  .survey-result-counters {
    grid-template-columns: 1fr 1fr;
  }

  .survey-result-counter {
    min-height: 74px;
    padding: 12px;
  }

  .survey-builder-intro {
    padding: 20px;
  }

  .survey-builder-form {
    padding: 20px;
  }

  .survey-question-editor {
    padding: 14px;
  }

  .survey-builder-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .survey-builder-field-wide {
    grid-column: auto;
  }

  .survey-builder-actions {
    flex-direction: column;
  }

  .survey-builder-actions .btn {
    width: 100%;
    text-align: center;
  }

}
