*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0C447C;
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --blue-mid: #B5D4F4;
  --teal: #0F6E56;
  --teal-light: #E1F5EE;
  --amber: #BA7517;
  --amber-light: #FAEEDA;
  --coral: #993C1D;
  --coral-light: #FAECE7;
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5a6a7e;
  --border: #dce4ef;
  --ff: 'Sora', sans-serif;
  --fs: 'Lora', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 3rem;
}

/* HEADER */
.header {
  background: linear-gradient(150deg, var(--navy) 0%, #0d2b56 60%, var(--teal) 100%);
  padding: 2.5rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  top: -80px; right: -80px;
}
.header::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -60px; left: -40px;
}
.inst-badge {
  display: inline-block;
  background: rgba(181,212,244,0.15);
  border: 1px solid rgba(181,212,244,0.35);
  color: #B5D4F4;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.header h1 {
  font-family: var(--fs);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  position: relative;
}
.header h1 em {
  font-style: italic;
  color: #FAC775;
}
.header p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
}

/* PROGRESS */
.progress-wrap {
  background: #e8eef6;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}
.progress-label {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
}
.progress-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 100px;
  transition: width 0.4s ease;
  width: 0%;
}
.progress-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  min-width: 32px;
  text-align: right;
}

/* MAIN */
.main {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* SECTION HEADER */
.section-header {
  margin: 2rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue-light);
}
.section-header .tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.section-header h2 {
  font-family: var(--fs);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}

/* QUESTION CARD */
.q-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.q-card:focus-within {
  border-color: #85B7EB;
  box-shadow: 0 0 0 3px rgba(24,95,165,0.08);
}
.q-num {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.q-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1.1rem;
}
.q-text .note {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* RADIO / CHECKBOX OPTIONS */
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  user-select: none;
}
.option-label:hover {
  background: var(--blue-light);
  border-color: #85B7EB;
}
.option-label input[type="radio"],
.option-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  min-width: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.option-label input[type="checkbox"] {
  border-radius: 5px;
}
.option-label input[type="radio"]:checked,
.option-label input[type="checkbox"]:checked {
  border-color: var(--blue);
  background: var(--blue);
}
.option-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.option-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: #fff;
  font-size: 11px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
}
.option-label:has(input:checked) {
  background: var(--blue-light);
  border-color: var(--blue);
}

/* SCALE */
.scale-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0 2px;
}
.scale-btns {
  display: flex;
  gap: 6px;
}
.scale-btn {
  flex: 1;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-family: var(--ff);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}
.scale-btn:hover { background: var(--blue-light); border-color: #85B7EB; color: var(--navy); }
.scale-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* TEXTAREA */
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--ff);
  font-size: 0.88rem;
  color: var(--text);
  background: #fff;
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
  transition: border-color 0.2s;
  outline: none;
}
textarea:focus { border-color: #85B7EB; box-shadow: 0 0 0 3px rgba(24,95,165,0.08); }
textarea::placeholder { color: #aab3c0; }

/* SELECT */
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--ff);
  font-size: 0.88rem;
  color: var(--text);
  background: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235a6a7e' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
select:focus { border-color: #85B7EB; box-shadow: 0 0 0 3px rgba(24,95,165,0.08); }

/* REQUIRED */
.req { color: #D85A30; margin-left: 3px; }

/* SUBMIT */
.submit-area {
  margin-top: 2.5rem;
  text-align: center;
}
.btn-submit {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem 3rem;
  font-family: var(--ff);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.15s;
  width: 100%;
  max-width: 340px;
}
.btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

/* SUCCESS */
.success-screen {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
}
.success-icon {
  width: 80px; height: 80px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.2rem;
}
.success-screen h2 {
  font-family: var(--fs);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.success-screen p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 400px;
  margin: 0 auto;
}

/* ERROR */
.q-card.error { border-color: #D85A30; }
.q-card.error .q-num { color: #D85A30; }
.error-msg {
  font-size: 0.78rem;
  color: #993C1D;
  margin-top: 8px;
  display: none;
}
.q-card.error .error-msg { display: block; }

/* FOOTER */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* INFO PILL */
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .q-card { padding: 1.25rem 1rem; }
  .scale-btn { font-size: 0.8rem; padding: 9px 2px; }
}