@layer components {
  .field {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
  }

  .field label {
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-ink-dark);
  }

  .field input[type="text"],
  .field input[type="email"],
  .field input[type="date"],
  .field input[type="file"],
  .field select,
  .field textarea {
    font-size: var(--text-normal);
    padding: 0.6em 0.8em;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-small);
    background: var(--color-canvas);
    color: var(--color-ink);
  }

  .field input:focus-visible,
  .field select:focus-visible,
  .field textarea:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 1px;
    border-color: var(--color-link);
  }

  .field-hint {
    font-size: var(--text-x-small);
    color: var(--color-ink-light);
  }

  .field-error {
    font-size: var(--text-x-small);
    color: var(--color-negative);
  }

  form.form {
    display: flex;
    flex-direction: column;
    gap: var(--block-space);
    max-width: 42ch;
  }

  .error-summary {
    background: var(--color-negative-bg);
    color: var(--color-negative);
    border-radius: var(--radius-medium);
    padding: var(--block-space);
    font-size: var(--text-small);
  }

  .error-summary ul {
    margin-top: 0.4em;
    padding-left: 1.2em;
    list-style: disc;
  }
}
