body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f6f7;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 780px;
  margin: auto;
}

body.no-scroll {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.card {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 32px;
}

.card {
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .card {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.hidden { display: none; }

.step {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dim-step {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dim-step.hidden {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.dim-step:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.step.hidden {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

.step:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}


h1, h2, h3 {
  margin-top: 0;
  color: #222;
}

label {
  font-weight: 600;
  margin-top: 12px;
  display: block;
}

input, select {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  margin-bottom: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

input,
select,
textarea {
  box-sizing: border-box;
}

.input-group legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.input-group input[type="radio"] {
  transform: scale(1.2);
}

.helper-text {
  font-size: 0.9rem;
  color: #666;
}

button {
  width: 100%;
  padding: 14px;
  background: #0c2d57;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

button:hover {
  background: #0a2445;
  cursor: pointer;
}

.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  margin-bottom: 16px;
}

.pill.green { background: #4caf50; }
.pill.amber { background: #dca314; }
.pill.red { background: #c4473a; }

/* =========================================
   MOBILE-FIRST DIMENSION INPUT OVERRIDES
   (safe overrides – do not regress behaviour)
   ========================================= */

/* Prevent iOS zoom (Chrome/Safari iOS) */
input,
select,
textarea {
  font-size: 16px;
}

/* Make dimension groups feel lighter */
.input-group {
  margin-bottom: 1rem;
  padding: 0;
  border: none;
}

/* Legend: smaller, calmer */
.input-group legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Radio option rows – MOBILE FIRST */
.input-group label {
  display: flex;
  align-items: center;
  gap: 0.6rem;

  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;

  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;

  cursor: pointer;

  /* CRITICAL: prevent text overflow on iPhone */
  justify-content: flex-start;
}

/* Hover (desktop only effect) */
.input-group label:hover {
  background: #f6f8fa;
}

/* Radio control – subtle */
.input-group input[type="radio"] {
  margin: 0;
  transform: scale(1.05);
  flex-shrink: 0;
}

.input-group label:active {
  transform: scale(0.99);
}

/* Text next to radio */
.option-text {
  font-size: 0.95rem;
  line-height: 1.3;
  color: #222;
}

/* Selected state – clear but calm */
.input-group label:has(input[type="radio"]:checked) {
  border-color: #0c2d57;
  background: #f2f6fb;
}

.input-group input[type="radio"]:checked + .option-text {
  font-weight: 600;
}

/* Helper text – de-emphasised */
.helper-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

/* Tablet / desktop refinement */
@media (min-width: 768px) {
  .input-group label {
    padding: 0.45rem 0.6rem;
  }

  .option-text {
    font-size: 0.9rem;
  }
}

/* ============================
   FIX RADIO INPUT REGRESSION
   ============================ */

/* Radios must NOT inherit generic input styles */
input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
  border: none;
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .dim-step {
    transition: none;
  }
}