/* Shared web-form baseline, including controls inserted after page load.
   Low-specificity controls preserve intentional component and inline layouts.
   Standalone PDF, mobile capture and activation documents do not load this file. */
.mf-scope .mf-content :where(input, select, textarea, button) {
  font-family: var(--mf-font-sans);
  box-sizing: border-box;
  max-width: 100%;
}
.mf-scope .mf-content :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=image]), select, textarea) {
  min-width: 0;
  min-height: 36px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mf-navy-900);
  background-color: #fff;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-md);
}
.mf-scope .mf-content :where(textarea) { resize: vertical; }
.mf-scope .mf-content :where(select[multiple]) { min-height: 100px; }
.mf-scope .mf-content :where(input, select, textarea):focus-visible {
  outline: 2px solid var(--mf-navy-600);
  outline-offset: 2px;
}
.mf-scope .mf-content :where(input, select, textarea):is(:disabled, [readonly]) {
  background-color: var(--mf-slate-100);
  color: var(--mf-slate-600);
}
.mf-scope .mf-content :where(input[type=checkbox], input[type=radio]) {
  accent-color: var(--mf-navy-600);
  flex-shrink: 0;
}
.mf-scope .mf-content :where(form, fieldset, .form-group, .mf-form-group, .spec-field) {
  min-width: 0;
  min-inline-size: 0;
}
.mf-scope .mf-content :where(fieldset) { max-width: 100%; }
.mf-scope .mf-content :where(legend) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mf-scope .mf-content :where(form > p > label, form > label, fieldset > label):not(:has(input[type=checkbox], input[type=radio])) {
  display: block;
  margin-bottom: 6px;
}
.mf-scope .mf-content :where(button:not([class]), input[type=submit]) {
  padding: 8px 14px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-md);
  background: var(--mf-slate-50);
  color: var(--mf-navy-700);
  font-size: 13px;
  cursor: pointer;
}
.mf-scope .mf-content :where(button:not([class]), input[type=submit]):disabled {
  cursor: not-allowed;
  opacity: .65;
}
.mf-scope .mf-content :where(.form-group, .mf-form-group, .spec-field) > :where(label) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mf-form-fieldset {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-md);
}
.mf-form-fieldset legend { padding: 0 6px; }
.mf-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.mf-fields-grid > * { min-width: 0; }
.mf-scope .mf-content :where(.spec-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
}
.mf-scope .mf-form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  font: inherit;
  color: inherit;
}
.mf-form-check input { margin: 3px 0 0; }
.mf-calculos-revision { margin: 20px 0; }
.mf-coa-trazabilidad { margin-top: 20px; padding: 16px; }
.mf-coa-investigacion { padding: 12px 0; border-top: 1px solid var(--mf-border); }
.mf-hash { overflow-wrap: anywhere; white-space: normal; }
.mf-json-conservado {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px;
  background: var(--mf-slate-50);
  font-size: 12px;
}
@media (max-width: 700px) {
  .mf-fields-grid { grid-template-columns: minmax(0, 1fr); }
  .mf-form-fieldset { padding: 12px; }
}
