* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 6rem; /* Space for fixed header */
  color: #333;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

header .header-inner {
  max-width: 720px;
  margin: 0 auto;
}

header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
}

.progress {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.code-gate {
  margin-top: 2rem;
}

.code-gate h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #444;
}

.code-gate form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
  width: 100%;
}

.code-gate input[type="text"] {
  padding: 0.875rem 1rem;
  font-size: 16px; /* 16px minimum prevents iOS zoom on focus */
  min-height: 44px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 480px) {
  .code-gate form {
    max-width: 300px;
  }
}

.code-error {
  color: #dc2626;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.survey-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #444;
}

#sectionTitle {
  scroll-margin-top: 6rem; /* Offset for fixed header when scrolling into view */
}

.question-block {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
}

.question-block label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.options {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
}

.options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}

.options input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.btn {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation; /* Removes 300ms tap delay on mobile */
  min-height: 44px; /* Minimum tap target for mobile */
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover:not(:disabled) {
  background: #d1d5db;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
