.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  max-width: 360px;
}

.form-group + .form-group { margin-top: 1rem; }

/* Form-groups inside multi-column grid rows must let the grid distribute
 * width — without these overrides the 360px max-width caps the cells
 * 3× wider than the containing card AND min-width: auto (grid default)
 * prevents the columns from compressing below input min-content. Both
 * together push the Achternaam column past the right edge of the card.
 * Audit on 2026-05-19. */
[class*="-form-row"] > .form-group {
  max-width: none;
  min-width: 0;
}

[class*="-form-row"] > .form-group > .form-input {
  /* Inputs default to a hardcoded ~150px min-width via UA stylesheet
   * which keeps them from shrinking below that. Override so the form-
   * row's fractional grid distribution wins. */
  min-width: 0;
  width: 100%;
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.form-input {
  padding: .6rem .875rem;
  border: 1.5px solid var(--sand);
  border-radius: var(--r);
  font-family: inherit;
  font-size: var(--fs-sm);
  background: var(--stone);
  color: var(--ink);
  line-height: 1.5;
  transition: border-color .15s, background .15s;
}

.form-input:focus {
  border-color: var(--forest);
  background: white;
  outline: none;
}

.form-input.error { border-color: var(--err-border); }

.form-input::placeholder {
  color: var(--muted);
  opacity: .6;
}

textarea.form-input { resize: vertical; }

select.form-input { cursor: pointer; }

.form-error {
  font-size: var(--fs-xs);
  color: var(--err-border);
  font-weight: 600;
}

/* Read-only display for fields that visually live in a form but aren't
 * editable from there (e.g. email on /leden/profiel/edit). Visually
 * matches a form input — same border, radius, padding — but is a <p>,
 * not an <input>, so it can't be submitted and screen readers don't
 * announce it as an interactive control. The aria-readonly attribute on
 * the element itself makes the read-only intent explicit for AT
 * consumers that key off it. */
.form-readonly-display {
  display: block;
  margin: 0;
  padding: .55rem .8rem;
  border: 1px solid var(--sand);
  border-radius: var(--r);
  background: var(--cream);
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.4;
}
