.company-materials {
  margin-block: 20px;
}
.company-materials fieldset {
  margin: 16px 0;
  min-width: 0;
  border: 1px solid var(--border, #cddce3);
  border-radius: 8px;
  padding: 16px;
}
.company-materials label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.company-materials :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border, #cddce3);
  border-radius: 8px;
  background: white;
  color: inherit;
  font: inherit;
}
.company-materials .button {
  margin: 4px 8px 4px 0;
  min-height: 44px;
  white-space: normal;
}
.company-materials :focus-visible {
  outline: 3px solid #84baca;
  outline-offset: 2px;
}
.company-material-row {
  border-top: 1px solid var(--border, #cddce3);
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.company-material-row .company-material-row {
  border: 0;
  padding: 0;
}
.company-materials progress {
  display: block;
  width: 100%;
  margin-top: 12px;
}
.company-materials [hidden] {
  display: none !important;
}

/* Profile placement only; admin review and public download lists keep their layouts. */
.business-profile-form [data-company-materials] {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: var(--profile-space-lg);
  border-top: 1px solid var(--line, var(--profile-border));
}
.business-profile-form [data-company-materials] > h3 {
  margin: 0 0 12px;
}
.business-profile-form [data-company-materials] > .hint {
  margin: 0;
  line-height: 1.6;
}
.business-profile-form [data-company-materials] fieldset {
  margin: 16px 0;
  padding: 0;
  border: 0;
}
.business-profile-form [data-company-materials] legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.business-profile-form .company-material-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.business-profile-form .company-material-fields > label {
  min-width: 0;
  margin: 0;
}
.business-profile-form
  .company-material-fields
  > :is(.company-material-description, .company-material-file) {
  grid-column: 1 / -1;
}
.business-profile-form [data-company-materials] :is(input, select, textarea) {
  font-weight: 400;
}
.business-profile-form [data-company-materials] > button {
  border: 1px solid var(--border, #cddce3);
  background: white;
  color: var(--text);
}
.business-profile-form [data-company-materials] textarea {
  min-height: 96px;
  resize: vertical;
}
.business-profile-form [data-company-materials] .button {
  box-sizing: border-box;
  max-width: 100%;
}
.business-profile-form [data-company-materials] fieldset > .button {
  margin-top: 16px;
}
@media (max-width: 760px) {
  .business-profile-form .company-material-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .business-profile-form [data-company-materials] fieldset > .button {
    width: 100%;
    margin-right: 0;
  }
}
