/* Wspólne pola, etykiety i grupy formularzy. */
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  align-content: start;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.5;
}
.required-mark { color: var(--muted); font-size: .8125rem; font-weight: 400; }
.field :where(small, .hint),
.hint,
.meta,
.muted {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.6;
}
:is(.page, .project-view) :where(input:not([type='checkbox']):not([type='radio']):not([type='hidden']), select, textarea),
.form-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--control-height);
  padding: 12px 14px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
:is(.page, .project-view) :where(input, select, textarea):hover { border-color: var(--ink-strong); }
:is(.page, .project-view) :where(input, select, textarea):focus-visible {
  border-color: var(--action);
  box-shadow: 0 0 0 4px var(--sea);
}
:is(.page, .project-view) :where(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
:is(.page, .project-view) :where(input, textarea)[readonly] { background: var(--pale); }
:is(.page, .project-view) :where(input, select, textarea):disabled {
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}
:is(.page, .project-view) textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}
:is(.page, .project-view) textarea[rows='2'] { min-height: 88px; }
:is(.page, .project-view) input[type='checkbox'],
:is(.page, .project-view) input[type='radio'] {
  accent-color: var(--action);
  width: 1.125rem;
  height: 1.125rem;
  margin: .2rem 0 0;
  flex: none;
}
:is(.page, .project-view) .check,
.choice {
  display: flex;
  align-items: start;
  gap: 12px;
  min-height: 44px;
  padding-block: 8px;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.6;
}
:is(.page, .project-view) fieldset {
  min-width: 0;
  margin: 0;
  padding: var(--panel-padding);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
:is(.page, .project-view) legend {
  padding-inline: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.panel > fieldset:not(.panel),
.panel > form > fieldset:not(.panel) {
  padding-inline: 0;
  border-inline: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}
form.stack { gap: var(--field-gap); }
fieldset.stack { gap: 16px; }
form .two-col { gap: 20px; }
form.stack > .actions:last-child {
  padding-top: 8px;
}
form .stack > .field + .hint,
form.stack > .field + .hint {
  margin-top: -12px;
}
:is(.page, .project-view) input[type='file'] {
  padding: 6px;
  font-size: .9375rem;
}
:is(.page, .project-view) input[type='file']::file-selector-button {
  min-height: 36px;
  margin-inline-end: 12px;
  padding: 6px 14px;
  border: 0;
  border-radius: 5px;
  background: var(--pale);
  color: var(--action);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
:is(.page, .project-view) input[type='file']::file-selector-button:hover { background: var(--sea); }
@media (max-width: 36em) {
  form.stack > .actions:last-child > .button { flex: 1 1 100%; }
}
@media (forced-colors: active) {
  :is(.page, .project-view) input[type='file']::file-selector-button { border: 1px solid ButtonText; }
}
