:root{
  --bg: #f6f7fb;
  --card: #fff;
  --text: #1b1d22;
  --muted: #616571;

  --state-empty:  #FFE4E1; /* MistyRose */
  --state-active: #FFFACD; /* LemonChiffon */
  --state-done:   #F0FFF0; /* HoneyDew */

  --purple: #6A0DAD;
  --border: rgba(0,0,0,0.12);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.card{
  max-width: 860px;
  margin: 20px auto;
  padding: 18px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

h1{ margin: 0 0 8px; font-size: 1.25rem; }
.muted{ color: var(--muted); margin: 0 0 14px; }

fieldset{ border: 0; padding: 0; margin: 0; }
legend{ font-weight: 600; margin-bottom: 8px; }
label{ display:block; margin: 8px 0; line-height: 1.3; }

input[type="text"], input[type="email"], select, textarea{
  width: 100%;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
}

textarea{ resize: vertical; }

.hint{ margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }
.indent{ margin-left: 18px; }
.mt{ margin-top: 12px; }

.blocklabel{ margin: 0 0 6px; display:block; }
.subhead{ font-weight: 650; margin-bottom: 6px; }

.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){
  .grid2{ grid-template-columns: 1fr; }
}

.subcard{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.7);
}

/* Details styling */
details.qstep{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0;
  background: var(--state-empty);
  transition: background 120ms ease;
}

/* state backgrounds */
details.qstep[data-state="empty"]{ background: var(--state-empty); }
details.qstep[data-state="active"]{ background: var(--state-active); }
details.qstep[data-state="complete"]{ background: var(--state-done); }

/* summary typography rules */
details.qstep summary{
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  margin: -2px 0 6px;
}
details.qstep:not([open]) summary{
  font-weight: 400;
  font-size: 0.92rem;
}

/* remove default triangle and make it consistent */
details.qstep summary::-webkit-details-marker{ display:none; }
details.qstep summary:before{
  content: "▸";
  display:inline-block;
  width: 1.1em;
  margin-right: 4px;
  color: rgba(0,0,0,0.55);
}
details.qstep[open] summary:before{ content: "▾"; }

/* Nav buttons */
.nav{
  display:flex;
  gap: 10px;
  margin-top: 14px;
}
.nav button{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1rem;
}
.nav button:hover{ filter: brightness(0.98); }

/* Purple “○” style radios (q6_from/q6_to) */
.radioPill{
  display:flex;
  align-items:center;
  gap: 10px;
}

.radioPill input[type="radio"]{
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.25);
  background: #fff;
  display:inline-grid;
  place-content:center;
  margin: 0;
}
.radioPill input[type="radio"]::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transform: scale(0);
  transition: transform 120ms ease;
  background: var(--purple);
}
.radioPill input[type="radio"]:checked{
  border-color: var(--purple);
  background: rgba(106,13,173,0.08);
}
.radioPill input[type="radio"]:checked::before{
  transform: scale(1);
}

/* Screen-reader only */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
