.student-survey {
  padding: clamp(34px, 5vw, 60px) 6%;
  background: var(--editor-background, #faf8f4);
  color: var(--editor-text, #20262d);
  border-top: 1px solid #e8dfd1;
}
.student-survey [hidden] { display: none !important; }
.student-survey-inner { max-width: 780px; margin-inline: auto; }
.student-survey h2 { margin: 0 0 18px; line-height: 1.14; }
.survey-disclosure {
  border: 1px solid #e4dfd5;
  border-radius: 16px;
  background: var(--editor-card, #fff);
  box-shadow: 0 12px 28px -18px #24334230;
}
.survey-disclosure > summary {
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
}
.survey-content { padding: 0 20px 20px; }
.survey-fields, .survey-question { border: 0; min-width: 0; margin: 0; padding: 0; }
.survey-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.survey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 14px 24px;
}
.survey-field { display: block; min-width: 0; }
.survey-duration { grid-column: 1 / -1; max-width: 360px; }
.survey-field > span, .survey-question > legend {
  display: block;
  padding: 0;
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
.survey-field input, .survey-field select, .survey-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #b9c8d0;
  border-radius: 8px;
  background: #fff;
  color: #20262d;
  font: inherit;
  font-size: 1rem;
}
.survey-field textarea { resize: vertical; }
.survey-comment { margin: 14px 0; }
.survey-field small { font-weight: 400; color: #506170; }
.survey-field > small { display: block; margin-top: 5px; font-size: .875rem; }
.survey-stars { display: flex; flex-wrap: wrap; }
.survey-star {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  color: #667681;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}
.survey-star input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.survey-star:has(input:checked), .survey-star:has(~ .survey-star input:checked) { color: #85520b; background: #fff0ca; }
.survey-star:has(input:disabled) { cursor: default; opacity: .65; }
.survey-star:has(input:focus-visible),
.survey-content :is(button, select, textarea, input):focus-visible,
.survey-disclosure > summary:focus-visible { outline: 2px solid #376f91; outline-offset: 2px; }
.survey-submit, .survey-retry {
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #cceaf8;
  color: #1f4256;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.survey-submit:disabled { opacity: .6; cursor: default; }
.survey-retry { margin-bottom: 12px; border-color: #a9c8d8; background: #fff; }
.survey-message, .survey-result {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff7fc;
  color: #24495f;
}
.survey-message--error { background: #fff2e4; color: #743d1a; }
.survey-result { margin: 0; background: #eff9f6; color: #245e50; }
@media (hover: hover) {
  .survey-star:has(input:not(:disabled)):hover { outline: 2px solid #a6752e; outline-offset: -2px; }
}
@media (max-width: 620px) {
  .survey-grid { grid-template-columns: 1fr; gap: 12px; }
  .survey-disclosure > summary { padding-inline: 16px; }
  .survey-content { padding: 0 16px 16px; }
}

.student-survey .privacy-agreements { display: grid; gap: 8px; margin-bottom: 15px; }
.student-survey .privacy-agreement {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  font-size: .9rem;
}
.student-survey .privacy-agreement input {
  appearance: auto;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #237396;
}
.student-survey .privacy-agreement a { color: #205674; text-underline-offset: 3px; }
.student-survey .privacy-agreement span { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .student-survey :is(.survey-message, .survey-result):not([hidden]) {
    animation: survey-feedback-in 200ms ease-out both;
  }
  .survey-form[aria-busy="true"] .survey-submit { display: inline-flex; align-items: center; gap: 9px; }
  .survey-form[aria-busy="true"] .survey-submit::before {
    content: "";
    flex: 0 0 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: survey-progress 700ms linear infinite;
  }
}
@keyframes survey-feedback-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@keyframes survey-progress { to { transform: rotate(360deg); } }
