.attachment-panel {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attachment-panel > summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
}

.attachment-panel > summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.attachment-list ul {
  display: grid;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.attachment-list li {
  padding: 6px 0;
  overflow-wrap: anywhere;
}

.attachment-list li + li {
  border-top: 1px solid var(--line);
}

.attachment-list a {
  color: var(--accent-text);
  font-weight: 600;
  text-underline-offset: 2px;
}

.attachment-list small,
.attachment-status,
.attachment-error,
.attachment-hint {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.attachment-list small {
  display: block;
}

.attachment-status:empty,
.attachment-error:empty {
  margin: 0;
}

.attachment-error {
  color: #922f2f;
}

.attachment-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.attachment-form .field {
  flex: 1 1 140px;
  min-width: 0;
  margin: 0;
}

.attachment-form input[type="file"] {
  max-width: 100%;
}

.attachment-form button {
  flex: 0 0 auto;
}

.attachment-hint {
  margin: 8px 0 0;
}
