:root {
  --cream: #faf8f2;
  --teal: #09d9c1;
  --teal-deep: #05a091;
  --teal-soft: #83cfc8;
  --ink: #111;
  --muted: rgba(255, 255, 255, 0.6);
  --line: rgba(9, 217, 193, 0.22);
  --field-bg: rgba(255, 255, 255, 0.05);
  --field-border: rgba(255, 255, 255, 0.1);
  --step-border: rgba(255, 255, 255, 0.2);
  --font: "Montserrat", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #000;
  color: var(--cream);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

#app {
  width: 100%;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input,
select,
textarea {
  border: none;
  background: none;
  outline: none;
  width: 100%;
}

textarea {
  resize: none;
  overflow: hidden;
  scrollbar-width: none;
}

textarea::-webkit-scrollbar {
  display: none;
}

select {
  appearance: none;
  cursor: pointer;
}

select option {
  background: #111;
  color: var(--cream);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-back {
  position: relative;
  z-index: 4;
  width: max-content;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  line-height: 17px;
  letter-spacing: 0.04em;
  transition: color 0.2s, transform 0.2s;
}

.page-back:hover {
  color: var(--cream);
  transform: translateX(-3px);
}

.page-back--desktop {
  position: absolute;
  top: 154px;
  left: 72px;
}

.page-back--mobile {
  flex: none;
  margin-bottom: 24px;
}

.course-picker {
  --picker-gutter: 20px;
  position: relative;
  width: 100%;
  cursor: pointer;
}

.course-picker--mobile {
  --picker-gutter: 16px;
}

.course-picker__toggle {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  color: var(--cream);
  font-size: 14px;
  text-align: left;
}

.course-picker__toggle .is-placeholder {
  color: var(--muted);
}

.course-picker__toggle img {
  width: 16px;
  height: 16px;
}

.course-picker__panel {
  position: absolute;
  top: 58px;
  left: calc(var(--picker-gutter) * -1);
  z-index: 40;
  display: none;
  width: calc(100% + var(--picker-gutter) * 2);
  padding: 12px;
  border: 1px solid rgba(9, 217, 193, 0.45);
  border-radius: 16px;
  background: rgba(10, 18, 17, 0.97);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 22px rgba(9, 217, 193, 0.12);
  backdrop-filter: blur(16px);
}

.course-picker.is-open .course-picker__panel {
  display: block;
}

.course-picker__track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.course-picker--school .course-picker__track {
  display: flex;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-color: rgba(9, 217, 193, 0.55) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.course-picker--school .course-picker__option {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  padding: 0 14px;
}

.course-picker__track::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  left: 8px;
  z-index: -1;
  height: 1px;
  background: rgba(9, 217, 193, 0.28);
}

.course-picker__option {
  display: grid;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--step-border);
  border-radius: 19px;
  background: #111;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.course-picker__option:hover,
.course-picker__option.is-selected {
  border-color: var(--teal);
  background: var(--teal);
  color: #111;
  box-shadow: 0 0 14px rgba(9, 217, 193, 0.35);
}

.df-input--upload.field-valid::after,
.mf-input--upload.field-valid::after,
.df-input--upload.field-invalid::after,
.mf-input--upload.field-invalid::after {
  content: none;
  display: none;
}

.df-input.field-valid,
.mf-input.field-valid {
  border-color: var(--teal);
  box-shadow: 0 0 20px rgba(9, 217, 193, 0.25);
}

.df-input.field-valid::after,
.mf-input.field-valid::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(9, 217, 193, 0.16);
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-50%);
}

.mf-input.field-valid::after {
  right: 14px;
}

.field-valid > img,
.field-valid .course-picker__toggle img {
  opacity: 0;
}

.df-input.field-invalid,
.mf-input.field-invalid {
  border-color: #ff6f7d;
  box-shadow: 0 0 18px rgba(255, 74, 94, 0.2);
  animation: field-error-pulse 0.35s ease;
}

.df-input.field-invalid::after,
.mf-input.field-invalid::after {
  content: "!";
  position: absolute;
  top: 50%;
  right: 18px;
  z-index: 3;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 74, 94, 0.14);
  color: #ff8c97;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
}

.mf-input.field-invalid::after {
  right: 14px;
}

.field-invalid > img,
.field-invalid .course-picker__toggle img {
  opacity: 0;
}

.field-error {
  display: block;
  margin-top: -5px;
  color: #ff8c97;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  text-shadow: 0 0 12px rgba(255, 74, 94, 0.24);
}

.question-group {
  width: 100%;
}

.question-group__title {
  margin: 0;
  color: var(--teal);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 18px rgba(9, 217, 193, 0.18);
}

.question-group__fields {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.question-field__label {
  line-height: 1.45;
  text-transform: none;
  white-space: normal;
}

.df-input--upload,
.mf-input--upload {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  justify-content: center;
}

.df-input--upload input,
.mf-input--upload input {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  opacity: 0;
}

.upload-block {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 10px;
}

.upload-actions {
  display: flex;
  width: 100%;
  gap: 8px;
}

.upload-actions .df-input--upload,
.upload-actions .mf-input--upload {
  flex: 1 1 0;
  min-width: 0;
}

.upload-control__button {
  flex: none;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.upload-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.upload-list {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.upload-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field-bg);
}

.upload-list__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--cream);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-list__remove {
  flex: none;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.consent-section {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 12px;
}

.consent-field {
  width: 100%;
}

.consent-card {
  position: relative;
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--field-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.consent-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-card__box {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border: 1px solid rgba(250, 248, 242, 0.3);
  border-radius: 6px;
  color: transparent;
  font-size: 12px;
  font-weight: 700;
}

.consent-card input:checked + .consent-card__box {
  border-color: var(--teal);
  background: var(--teal);
  color: #111;
  box-shadow: 0 0 14px rgba(9, 217, 193, 0.28);
}

.consent-card__text {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.consent-card__text button {
  display: inline;
  color: var(--teal);
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-card.field-valid {
  border-color: rgba(9, 217, 193, 0.65);
}

.consent-card.field-invalid {
  border-color: #ff6f7d;
  box-shadow: 0 0 18px rgba(255, 74, 94, 0.2);
  animation: field-error-pulse 0.35s ease;
}

.legal-content {
  position: relative;
  z-index: 2;
  color: var(--cream);
}

.legal-eyebrow {
  margin: 0;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.09em;
}

.legal-title {
  margin: 12px 0 0;
  color: var(--cream);
  text-shadow: 0 4px 18px rgba(9, 217, 193, 0.22);
}

.legal-body {
  margin-top: 32px;
  color: var(--muted);
}

.legal-body h2 {
  margin: 26px 0 8px;
  color: var(--cream);
  font-size: 16px;
  line-height: 22px;
}

.legal-body p {
  margin: 0;
}

.legal-body a {
  color: var(--teal);
}

.legal-warning {
  padding: 14px 16px;
  border: 1px solid rgba(255, 140, 151, 0.5);
  border-radius: 12px;
  background: rgba(255, 74, 94, 0.08);
  color: #ffadb5;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}

.submit-error {
  width: 100%;
  margin: 0 0 12px;
  color: #ff8c97;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-shadow: 0 0 12px rgba(255, 74, 94, 0.24);
}

.df-footer .submit-error {
  flex: 1 0 100%;
  text-align: right;
}

.mf-action .submit-error {
  text-align: left;
}

@keyframes field-error-pulse {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-3px);
  }
  70% {
    transform: translateX(3px);
  }
}

/* Floating DESKTOP / MOBILE switcher (dev aid, not part of the Figma frames) */
.view-switch {
  position: fixed;
  z-index: 9999;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(9, 217, 193, 0.45);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.view-switch__btn {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(250, 248, 242, 0.7);
}

.view-switch__btn.is-active {
  background: linear-gradient(90deg, var(--teal), var(--teal-deep));
  color: #041312;
}

body.view-desktop .desktop {
  display: block;
  width: 100%;
}

body.view-desktop .mobile {
  display: none !important;
}

body.view-mobile .mobile {
  display: block;
  width: 100%;
}

body.view-mobile .desktop {
  display: none !important;
}

@keyframes float-y {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@keyframes star-pulse {
  0%,
  75%,
  100% {
    opacity: 0.85;
    scale: 1;
  }
  37.5% {
    opacity: 1;
    scale: 1.03;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
