:root {
  color-scheme: light;
  --background: #f4f8f8;
  --surface: #ffffff;
  --text: #17313b;
  --muted: #62747b;
  --primary: #16a3a8;
  --primary-dark: #0c7f84;
  --primary-soft: #dff5f3;
  --blue: #317abe;
  --blue-dark: #195b94;
  --blue-soft: #e7f2fb;
  --border: #d8e4e5;
  --field-border: #a9bec1;
  --danger: #a53838;
  --danger-soft: #fff2f0;
  --success: #137760;
  --success-soft: #e3f6ef;
  --focus: #163f88;
  --shadow: 0 1.25rem 3.75rem rgb(16 68 76 / 10%);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 27%, rgb(22 163 168 / 7%) 0 0.3rem, transparent 0.35rem),
    linear-gradient(180deg, #ffffff 0 15rem, var(--background) 15rem);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.1875rem;
}

.page-shell {
  width: min(100% - 2rem, 53rem);
  margin-inline: auto;
}

.site-header {
  border-bottom: 0.0625rem solid var(--border);
  background: rgb(255 255 255 / 95%);
}

.site-header__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 5rem;
}

.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--primary-soft);
}

.brand-mark__dot,
.brand-mark__arc {
  position: absolute;
  display: block;
  background: var(--primary);
}

.brand-mark__dot {
  top: 0.55rem;
  left: 1.05rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
}

.brand-mark__arc {
  right: 0.55rem;
  bottom: 0.55rem;
  left: 0.55rem;
  height: 0.85rem;
  border-radius: 0.85rem 0.85rem 0.4rem 0.4rem;
}

.brand-copy {
  min-width: 0;
}

.brand-name,
.brand-caption,
.site-footer p {
  margin: 0;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.brand-caption {
  color: var(--muted);
  font-size: 0.8125rem;
}

.header-badge {
  margin-left: auto;
  padding: 0.5rem 0.9rem;
  border: 0.0625rem solid var(--border);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.8125rem;
  font-weight: 700;
}

main {
  min-height: calc(100vh - 11rem);
  padding-block: 2rem 4.5rem;
}

.intro {
  position: relative;
  isolation: isolate;
  min-height: 18rem;
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  overflow: hidden;
  border-radius: 2rem;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.intro__content {
  position: relative;
  z-index: 2;
  max-width: 38rem;
}

.intro__eyebrow {
  margin: 0 0 0.75rem;
  color: #bfe8f6;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.grade-label {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.35rem 0.75rem;
  border: 0.0625rem solid rgb(255 255 255 / 38%);
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 750;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.15rem, 8vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

.intro__description {
  max-width: 37rem;
  margin: 1.1rem 0 0;
  color: rgb(255 255 255 / 88%);
  font-size: 1.0625rem;
}

.form-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.form-meta span {
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.intro__decoration {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.68;
}

.intro__circle,
.intro__line {
  position: absolute;
  display: block;
}

.intro__circle {
  border: 0.0625rem solid rgb(255 255 255 / 38%);
  border-radius: 50%;
}

.intro__circle--large {
  right: -5rem;
  bottom: -7rem;
  width: 20rem;
  height: 20rem;
  border-width: 3rem;
  border-color: rgb(22 163 168 / 75%);
}

.intro__circle--small {
  top: 2rem;
  right: 7rem;
  width: 3.5rem;
  height: 3.5rem;
}

.intro__line {
  top: 5.4rem;
  right: -2rem;
  width: 13rem;
  height: 0.125rem;
  background: rgb(255 255 255 / 32%);
  transform: rotate(-30deg);
}

.status-panel,
.error-summary,
.completion-panel,
.survey-form {
  border: 0.0625rem solid var(--border);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: 0 0.625rem 2.25rem rgb(16 68 76 / 6%);
}

.status-panel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
}

.status-panel p,
.completion-panel p,
.error-summary p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.status-indicator {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  border: 0.1875rem solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.status-panel--message .status-indicator,
.status-panel--error .status-indicator {
  border: 0;
  animation: none;
}

.status-panel--message {
  border-color: #b6dedb;
  background: var(--primary-soft);
}

.status-panel--error,
.error-summary {
  border-color: #e6bdb9;
  background: var(--danger-soft);
}

.status-panel--error h2,
.error-summary h2 {
  color: var(--danger);
}

.error-summary,
.completion-panel {
  margin-bottom: 1rem;
  padding: 1.5rem;
}

.completion-panel {
  max-width: 42rem;
  margin-inline: auto;
  padding: clamp(1.75rem, 6vw, 3rem);
  border-color: #aedccc;
  background: var(--success-soft);
  text-align: center;
}

.completion-panel__icon {
  display: grid;
  width: 3.75rem;
  height: 3.75rem;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 800;
}

.completion-panel h2 {
  color: var(--success);
}

.survey-form {
  overflow: hidden;
}

.survey-form__heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: clamp(1.4rem, 5vw, 2.25rem);
  border-bottom: 0.0625rem solid var(--border);
  background: linear-gradient(115deg, #ffffff, var(--blue-soft));
}

.survey-form__heading p,
.survey-form__heading span {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.survey-form__heading p {
  grid-column: 1 / -1;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.survey-form__heading span {
  align-self: end;
}

.questions {
  display: grid;
  padding: clamp(1.4rem, 5vw, 2.25rem);
}

.question {
  min-width: 0;
  margin: 0;
  padding: 1.65rem 0;
  border: 0;
  border-bottom: 0.0625rem solid var(--border);
}

.question:first-child {
  padding-top: 0;
}

.question:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.question__label,
.question legend {
  display: block;
  margin-bottom: 0.55rem;
  padding: 0;
  font-size: 1.0625rem;
  font-weight: 750;
}

.required-mark {
  color: var(--danger);
}

.question__help {
  margin: -0.2rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.question input[type="text"],
.question input[type="number"],
.question select,
.question textarea {
  width: 100%;
  border: 0.0625rem solid var(--field-border);
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.question input[type="text"],
.question input[type="number"],
.question select {
  min-height: 3.25rem;
  padding: 0.7rem 0.85rem;
}

.question textarea {
  min-height: 8.5rem;
  padding: 0.85rem;
  resize: vertical;
}

.question input:hover,
.question select:hover,
.question textarea:hover {
  border-color: var(--primary-dark);
}

.choice-list {
  display: grid;
  gap: 0.65rem;
}

.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 0.0625rem solid var(--border);
  border-radius: 0.8rem;
  cursor: pointer;
}

.choice-option:hover {
  border-color: var(--primary);
  background: #f4fbfa;
}

.choice-option input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  accent-color: var(--primary);
}

.form-actions {
  padding: clamp(1.4rem, 5vw, 2.25rem);
  border-top: 0.0625rem solid var(--border);
  background: #f9fbfb;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  max-width: 43rem;
  margin-bottom: 1.25rem;
}

.privacy-note__icon {
  display: grid;
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.privacy-notice,
.finality-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.primary-button {
  min-height: 3.25rem;
  padding: 0.8rem 1.65rem;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0.5rem 1.25rem rgb(22 163 168 / 24%);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-0.0625rem);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.finality-note {
  margin-top: 0.7rem;
}

.site-footer {
  padding-block: 1.5rem;
  border-top: 0.0625rem solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
}

.site-footer__content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

[hidden] {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 42rem) {
  .header-badge {
    display: none;
  }

  .intro {
    min-height: 17rem;
    border-radius: 1.35rem;
  }

  .intro__circle--large {
    right: -9rem;
    opacity: 0.7;
  }

  .survey-form__heading {
    grid-template-columns: 1fr;
  }

  .survey-form__heading span {
    margin-top: 0.35rem;
  }

  .site-footer__content {
    flex-direction: column;
  }
}

@media (max-width: 30rem) {
  .page-shell {
    width: min(100% - 1.25rem, 53rem);
  }

  .site-header__content {
    min-height: 4.5rem;
  }

  main {
    padding-block: 1rem 3rem;
  }

  .intro {
    min-height: 18rem;
    padding: 1.4rem;
  }

  .form-meta span {
    font-size: 0.75rem;
  }

  .status-panel,
  .error-summary,
  .completion-panel,
  .survey-form {
    border-radius: 1rem;
  }

  .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
