/* Shared form presentation. Control meanings and section structure are unchanged. */
.choice-card {
  position: relative;
  min-height: 52px;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.choice-card:has(input:checked) {
  border-color: var(--purple);
  background: #f0eafd;
  box-shadow: inset 3px 0 0 var(--purple);
}
.choice-card:has(input:focus-visible) {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.choice-card > input { flex: 0 0 20px; accent-color: var(--purple); }
.choice-card > span:not(.choice-art) { min-width: 0; overflow-wrap: anywhere; }
.choice-art {
  display: inline-block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-image: url('../assets/ux/baby-states.png');
  background-size: 400% 200%;
  background-position: var(--art-x) var(--art-y);
  background-repeat: no-repeat;
}
.state-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 24px;
  min-width: 0;
}
.state-choice-grid .state-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 12px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 14px;
  background: #fffdfa;
  font: inherit;
  line-height: 1.5;
}
.state-choice-grid .state-choice[aria-pressed="true"] {
  border-color: var(--purple);
  background: #eee6fc;
  box-shadow: inset 3px 0 0 var(--purple);
}
.state-choice-grid .state-choice:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.state-choice-grid .state-choice:disabled { cursor: default; }
.intake-public .intake-record-sheet fieldset .choice-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 10px 0;
  padding: 12px;
  gap: 12px;
  line-height: 1.5;
}
.intake-public .intake-record-sheet fieldset legend { margin-bottom: 8px; }
.intake-public .intake-record-sheet #form > details > label:focus-within { background: #f6f0fc66; }
.intake-public .intake-record-sheet textarea { min-height: 120px; resize: vertical; }
@media (max-width: 540px) {
  .state-choice-grid .state-choice { flex-direction:column; align-items:flex-start; gap:8px; font-size:.875rem; padding:12px; }
  .state-choice-grid .state-choice:first-child { grid-column:1 / -1; min-height:44px; }
  .choice-art { flex-basis: 44px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .choice-card { transition: none; } }
@media print { .choice-art { display: none; } }
select[data-illustrated][hidden] { display: none !important; }

@media(max-width:359px) { .state-choice-grid { grid-template-columns:minmax(0,1fr); } .state-choice-grid .state-choice { flex-direction:row; align-items:center; } }

/* Crop the approved contact-sheet cells in CSS, excluding their approval numbers. */
.choice-art-approved { position:relative; overflow:hidden; background:none; border-radius:10px; }
.choice-art-approved::before { content:""; position:absolute; top:0; left:0; width:100%; height:128%; background-image:var(--choice-sheet); background-size:400% 300%; background-position:var(--choice-x) var(--choice-y); background-repeat:no-repeat; }
.choice-card-illustrated { display:flex; align-items:center; gap:12px; min-width:0; overflow-wrap:anywhere; }
.choice-card-illustrated .choice-art { flex-shrink:0; }
@media(max-width:540px) { .choice-card-illustrated { gap:8px; } }
