/* ----------------------------------------------------------------- */
/* RESPONSIVE TYPOGRAPHY SYSTEM - Desktop & Mobile */
/* ----------------------------------------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e6f2ff 0%, #079edf 100%);
  min-height: 100vh;
  padding: 30px 20px;
  padding-top: 40px; /* Account for progress bar */
  position: relative;
  font-size: 16px;
}

/* Subtle background pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
  padding: 50px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  color: #0a4d92;
  text-align: center;
  margin-bottom: 35px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  position: relative;
  padding-bottom: 18px;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  background: linear-gradient(90deg, #079edf 0%, #0a4d92 100%);
  border-radius: 2px;
}

.form-field {
  margin-bottom: 22px;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

label {
  display: block;
  margin-bottom: 9px;
  font-weight: 600;
  color: #0a4d92;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
select {
  width: 100%;
  padding: 13px 17px;
  border: 2px solid #e3f2fd;
  border-radius: 11px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f8fbff;
  color: #1a1a1a;
  font-weight: 500;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="email"]:hover,
select:hover {
  border-color: #bbdefb;
  background: #ffffff;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
select:focus {
  outline: none;
  border-color: #079edf;
  background: white;
  box-shadow: 0 0 0 4px rgba(7, 158, 223, 0.1);
}

/* Placeholder styling */
input::placeholder {
  color: #90a4ae;
  opacity: 0.8;
  font-size: 14px;
}

/* Disabled state */
input:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

/* Select dropdown arrow */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230a4d92' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 43px;
}

/* Checkbox and Radio styles */
input[type="checkbox"],
input[type="radio"] {
  width: 21px;
  height: 21px;
  cursor: pointer;
  accent-color: #079edf;
  margin-right: 11px;
  transition: transform 0.2s ease;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  transform: scale(1.1);
}

.checkbox-field {
  display: flex;
  align-items: center;
  flex-direction: row;
  padding: 11px 17px;
  background: #f8fbff;
  border-radius: 11px;
  border: 2px solid #e3f2fd;
  transition: all 0.3s ease;
  cursor: pointer;
}

.checkbox-field:hover {
  background: white;
  border-color: #bbdefb;
}

.checkbox-field label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 500;
  color: #1a1a1a;
  font-size: 15px;
}

/* Radio Groups */
.radio-group {
  margin-bottom: 22px;
  padding: 18px;
  background: #f8fbff;
  border-radius: 11px;
  border: 2px solid #e3f2fd;
}

.radio-group-label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
  color: #0a4d92;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.radio-options {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  flex-direction: column;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 11px 15px;
  background: white;
  border-radius: 9px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.radio-option:hover {
  background: #e3f2fd;
  border-color: #079edf;
}

.radio-option label {
  margin-bottom: 0;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
}

/* Required field indicator */
input[required],
select[required] {
  background-image: linear-gradient(to right, #f8fbff 0%, #fff8f8 100%);
}

/* Submit Button */
#submitBtn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, #079edf 0%, #0a4d92 100%);
  color: white;
  border: none;
  border-radius: 11px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(7, 158, 223, 0.3);
  margin-top: 35px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

#submitBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

#submitBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(7, 158, 223, 0.4);
}

#submitBtn:hover::before {
  left: 100%;
}

#submitBtn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(7, 158, 223, 0.3);
}

/* Error styling */
.error-field {
  border: 2px solid #f44336 !important;
  background-color: #ffebee !important;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

/* Accordion Improvements */
.accordion {
  margin-bottom: 18px;
  border: 2px solid #e3f2fd;
  border-radius: 11px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion:hover {
  border-color: #bbdefb;
  box-shadow: 0 4px 12px rgba(7, 158, 223, 0.08);
}

.accordion-header {
  background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
  color: #0a4d92;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.accordion-header.active {
  background: linear-gradient(135deg, #079edf 0%, #0a4d92 100%);
  color: white;
}

.accordion-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  background-color: white;
  padding: 0 22px;
}

.accordion-content.active {
  padding: 22px;
}

.accordion-inner {
  padding: 0;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  height: 45px;
  border-radius: 11px;
  margin-bottom: 18px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Form placeholder */
.form-placeholder {
  text-align: center;
  padding: 50px 35px;
  color: #90a4ae;
  font-style: italic;
  font-size: 22px;
}

/* reCAPTCHA container */
.form-field:has(#dynamic-recaptcha) {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

/* ============================================ */
/* MINIMAL TOP PROGRESS BAR */
/* ============================================ */

#question-tracker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 0;
  box-shadow: 0 2px 20px rgba(7, 158, 223, 0.1);
  z-index: 10000;
  border-bottom: 1px solid rgba(7, 158, 223, 0.1);
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tracker-header {
  display: none;
}

.tracker-subtitle {
  display: none;
}

.progress-bar-container {
  position: relative;
  margin: 0;
  padding: 0;
}

.progress-bar {
  width: 100%;
  height: 7px;
  background: linear-gradient(90deg, #f0f4f8 0%, #e3f2fd 100%);
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  border: none;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a4d92 0%, #079edf 50%, #42a5f5 100%);
  background-size: 200% 100%;
  border-radius: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 20px rgba(7, 158, 223, 0.5);
  animation: shimmerProgress 2s infinite;
}

@keyframes shimmerProgress {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progressShine 1.5s infinite;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Progress Percentage Badge */
.progress-percentage {
  position: sticky;
  float: right;
  top: 8px;
  right: 16px;
  transform: none;
  font-size: 13px;
  font-weight: 700;
  color: #0a4d92;
  background: white;
  margin: -48px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
  padding: 10px;
  transition: all 0.3s ease;
  animation: fadeInBadge 0.5s ease;
}

@keyframes fadeInBadge {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-percentage:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(7, 158, 223, 0.25);
  border-color: rgba(7, 158, 223, 0.4);
}

.completion-badge {
  display: none !important;
}

/* Success state when completed */
#question-tracker.completed .progress-fill {
  background: linear-gradient(90deg, #2e7d32 0%, #4caf50 50%, #66bb6a 100%);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

.progress-percentage.completed {
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  color: white;
  border-color: rgba(76, 175, 80, 0.4);
  animation: celebratePulse 0.6s ease;
}

@keyframes celebratePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #079edf;
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: #079edf;
  color: white;
}

/* Hide scrollbar for Chrome, Safari, Edge */
::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for Firefox */
html {
  scrollbar-width: none; /* "none" removes the scrollbar */
}

/* Optional: Ensure no overflow artifacts on mobile */
body {
  -ms-overflow-style: none; /* IE and Edge */
}
/* ============================================ */
/* CUSTOM ALERT & CONFIRM DIALOG */
/* ============================================ */

.custom-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 77, 146, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

.custom-dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.custom-dialog {
  background: white;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(7, 158, 223, 0.1);
  max-width: 450px;
  width: 100%;
  padding: 28px;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.custom-dialog-overlay.active .custom-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Decorative accent bar */
.custom-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #079edf 0%, #0a4d92 100%);
}

/* Icon container */
.custom-dialog-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 30px;
  animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

@keyframes iconBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Alert icon (info) */
.custom-dialog-icon.alert {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #0a4d92;
  border: 3px solid rgba(7, 158, 223, 0.3);
}

/* Confirm icon (question) */
.custom-dialog-icon.confirm {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border: 3px solid rgba(230, 81, 0, 0.3);
}

/* Error icon */
.custom-dialog-icon.error {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
  border: 3px solid rgba(198, 40, 40, 0.3);
}

/* Success icon */
.custom-dialog-icon.success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 3px solid rgba(46, 125, 50, 0.3);
}

/* Warning icon */
.custom-dialog-icon.warning {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border: 3px solid rgba(230, 81, 0, 0.3);
}

/* Danger icon */
.custom-dialog-icon.danger {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: #c62828;
  border: 3px solid rgba(198, 40, 40, 0.3);
}

/* Title */
.custom-dialog-title {
  font-size: 20px;
  font-weight: 700;
  color: #0a4d92;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.3;
}

/* Message */
.custom-dialog-message {
  font-size: 15px;
  color: #455a64;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 22px;
  white-space: pre-wrap;
}

/* Buttons container */
.custom-dialog-buttons {
  display: flex;
  gap: 11px;
  justify-content: center;
}

/* Button base styles */
.custom-dialog-btn {
  flex: 1;
  padding: 13px 22px;
  border: none;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 110px;
}

.custom-dialog-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.custom-dialog-btn:hover::before {
  left: 100%;
}

/* Primary button (OK, Confirm) */
.custom-dialog-btn-primary {
  background: linear-gradient(135deg, #079edf 0%, #0a4d92 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(7, 158, 223, 0.3);
}

.custom-dialog-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(7, 158, 223, 0.4);
}

.custom-dialog-btn-primary:active {
  transform: translateY(0);
}

/* Secondary button (Cancel) */
.custom-dialog-btn-secondary {
  background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
  color: #455a64;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.custom-dialog-btn-secondary:hover {
  background: linear-gradient(135deg, #eeeeee 0%, #e0e0e0 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-dialog-btn-secondary:active {
  transform: translateY(0);
}

/* Single button (alert) - full width */
.custom-dialog-buttons.single-button .custom-dialog-btn {
  flex: initial;
  width: 100%;
}

/* Animation for closing */
.custom-dialog-overlay.closing {
  opacity: 0;
}

.custom-dialog-overlay.closing .custom-dialog {
  transform: scale(0.9) translateY(20px);
  opacity: 0;
}

/* ============================================ */
/* RESPONSIVE BREAKPOINTS - Mobile Optimizations */
/* ============================================ */

/* Tablets and smaller laptops */
@media (max-width: 1024px) {
  .container {
    max-width: 95%;
    padding: 40px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  body {
    padding: 20px 12px;
    padding-top: 30px;
    font-size: 14px;
  }

  .container {
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  }

  h1 {
    font-size: 26px;
    margin-bottom: 28px;
    padding-bottom: 14px;
  }

  h1::after {
    width: 60px;
    height: 3px;
  }

  label {
    font-size: 14px;
    margin-bottom: 8px;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select {
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 10px;
  }

  select {
    padding-right: 40px;
    background-position: right 15px center;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
  }

  .checkbox-field {
    padding: 10px 15px;
    border-radius: 10px;
  }

  .checkbox-field label {
    font-size: 14px;
  }

  .radio-group {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .radio-group-label {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .radio-options {
    gap: 10px;
  }

  .radio-option {
    padding: 10px 14px;
    border-radius: 8px;
  }

  .radio-option label {
    font-size: 14px;
  }

  #submitBtn {
    padding: 15px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 28px;
  }

  .accordion {
    margin-bottom: 16px;
    border-radius: 10px;
  }

  .accordion-header {
    padding: 15px 18px;
    font-size: 15px;
  }

  .accordion-icon {
    font-size: 13px;
  }

  .accordion-content {
    padding: 0 18px;
  }

  .accordion-content.active {
    padding: 18px;
  }

  .form-field {
    margin-bottom: 20px;
  }

  .skeleton {
    height: 42px;
    border-radius: 10px;
    margin-bottom: 16px;
  }

  .progress-percentage {
    top: 6px;
    right: 12px;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 10px;
    margin: -40px;
  }

  /* Dialog adjustments */
  .custom-dialog {
    max-width: 400px;
    padding: 24px;
    border-radius: 16px;
  }

  .custom-dialog-icon {
    width: 54px;
    height: 54px;
    font-size: 26px;
    margin-bottom: 16px;
  }

  .custom-dialog-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .custom-dialog-message {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .custom-dialog-buttons {
    gap: 10px;
  }

  .custom-dialog-btn {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 10px;
    min-width: 100px;
  }
}

/* Mobile devices */
@media (max-width: 480px) {
  body {
    padding: 15px 10px;
    padding-top: 25px;
    font-size: 14px;
  }

  .container {
    padding: 25px 16px;
    border-radius: 14px;
  }

  h1 {
    font-size: 22px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    letter-spacing: -0.3px;
  }

  h1::after {
    width: 50px;
    height: 3px;
  }

  label {
    font-size: 13px;
    margin-bottom: 7px;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select {
    padding: 11px 13px;
    font-size: 14px;
    border-radius: 9px;
  }

  select {
    padding-right: 36px;
    background-position: right 13px center;
    background-size: 10px 10px;
  }

  input::placeholder {
    font-size: 13px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 19px;
    height: 19px;
    margin-right: 9px;
  }

  .checkbox-field {
    padding: 9px 13px;
    border-radius: 9px;
  }

  .checkbox-field label {
    font-size: 13px;
  }

  .radio-group {
    padding: 14px;
    border-radius: 9px;
    margin-bottom: 18px;
  }

  .radio-group-label {
    font-size: 13px;
    margin-bottom: 11px;
  }

  .radio-options {
    gap: 9px;
  }

  .radio-option {
    padding: 9px 12px;
    border-radius: 7px;
  }

  .radio-option label {
    font-size: 13px;
  }

  #submitBtn {
    padding: 14px;
    font-size: 15px;
    border-radius: 9px;
    margin-top: 24px;
    letter-spacing: 0.3px;
  }

  .accordion {
    margin-bottom: 14px;
    border-radius: 9px;
  }

  .accordion-header {
    padding: 13px 16px;
    font-size: 14px;
  }

  .accordion-icon {
    font-size: 12px;
  }

  .accordion-content {
    padding: 0 16px;
  }

  .accordion-content.active {
    padding: 16px;
  }

  .form-field {
    margin-bottom: 18px;
  }

  .skeleton {
    height: 38px;
    border-radius: 9px;
    margin-bottom: 14px;
  }

  .progress-bar {
    height: 6px;
  }

  .progress-percentage {
    top: 5px;
    right: 10px;
    font-size: 10px;
    padding: 6px 10px;
    border-radius: 9px;
    margin: -35px;
  }

  /* Dialog adjustments for small mobile */
  .custom-dialog-overlay {
    padding: 15px;
  }

  .custom-dialog {
    max-width: 100%;
    padding: 20px;
    margin: 0;
    border-radius: 14px;
  }

  .custom-dialog-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
    margin-bottom: 14px;
  }

  .custom-dialog-title {
    font-size: 17px;
    margin-bottom: 11px;
  }

  .custom-dialog-message {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .custom-dialog-buttons {
    flex-direction: column;
    gap: 9px;
  }

  .custom-dialog-btn {
    width: 100%;
    min-width: initial;
    padding: 11px 18px;
    font-size: 14px;
    border-radius: 9px;
  }

  /* reCAPTCHA scaling for mobile */
  .form-field:has(#dynamic-recaptcha) {
    margin: 20px 0;
    overflow-x: auto;
  }

  #dynamic-recaptcha {
    transform-origin: left top;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  body {
    padding: 12px 8px;
    padding-top: 22px;
  }

  .container {
    padding: 20px 14px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  select {
    padding: 10px 12px;
    font-size: 13px;
  }

  #submitBtn {
    padding: 13px;
    font-size: 14px;
  }

  .progress-percentage {
    font-size: 9px;
    padding: 5px 8px;
    right: 8px;
  }
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding-top: 20px;
  }

  .container {
    margin: 10px auto;
  }

  h1 {
    margin-bottom: 20px;
  }

  .form-field {
    margin-bottom: 16px;
  }

  #submitBtn {
    margin-top: 20px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets for mobile */
  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    height: 22px;
  }

  .radio-option,
  .checkbox-field {
    min-height: 44px; /* iOS recommended minimum touch target */
  }

  #submitBtn {
    min-height: 48px;
  }

  .accordion-header {
    min-height: 48px;
  }

  /* Disable hover effects on touch devices */
  input[type="checkbox"]:hover,
  input[type="radio"]:hover {
    transform: none;
  }

  #submitBtn:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    padding: 0;
  }

  body::before {
    display: none;
  }

  .container {
    box-shadow: none;
    padding: 20px;
    max-width: 100%;
  }

  #submitBtn,
  #question-tracker,
  .progress-percentage {
    display: none;
  }

  .accordion-content {
    max-height: none !important;
    padding: 10px !important;
  }

  .accordion-header {
    background: transparent !important;
  }

  .form-field {
    page-break-inside: avoid;
  }
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  min-width: 21px;
  min-height: 21px;
  margin-top: 2px; /* optical alignment */
  cursor: pointer;
}

.radio-option label {
  line-height: 1.4;
  cursor: pointer;
}
