.guide-attachments {
  display: grid;
  gap: 12px;
  min-inline-size: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line, rgba(0, 0, 0, 0.09));
}
.guide-attachments > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.guide-attachments > header > div {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}
.guide-attachments > header h4 {
  margin: 0;
  color: var(--ios-ink, #1d1d1f);
  font-weight: 600;
}
.guide-attachments > header p {
  margin: 0;
  color: var(--ios-secondary, #6e6e73);
  line-height: 1.6;
}
.guide-attachments .guide-attachment-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
}
.guide-attachments .guide-attachment-upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  min-block-size: 0;
  opacity: 0;
}
.guide-attachments .guide-attachment-upload:focus-within {
  outline: 2px solid var(--ios-accent, #0c7180);
  outline-offset: 2px;
}
.guide-attachments .guide-attachment-upload[aria-disabled=true] {
  opacity: 0.55;
  cursor: not-allowed;
}
.guide-attachment-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-attachment-list > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.09));
  border-radius: var(--ios-radius-sm, 10px);
  background: var(--ios-panel, #fff);
}
.guide-attachment-list > li.is-active {
  border-color: var(--ios-accent, #0c7180);
  background: var(--ios-accent-soft, rgba(12, 113, 128, 0.09));
}
.guide-attachment-badge {
  display: inline-grid;
  place-items: center;
  min-inline-size: 44px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--ios-fill, rgba(120, 120, 128, 0.12));
  color: var(--ios-secondary, #6e6e73);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.guide-attachment-name {
  display: grid;
  gap: 2px;
  min-inline-size: 0;
}
.guide-attachment-name > b {
  overflow: hidden;
  color: var(--ios-ink, #1d1d1f);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-attachment-name > small {
  color: var(--ios-tertiary, #86868b);
}
.guide-attachment-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.guide-attachment-actions .guide-attachment-remove:not(:disabled) {
  color: var(--ios-danger, #a83432);
}
.guide-attachment-message,
.guide-attachment-status {
  margin: 0;
  line-height: 1.6;
}
.guide-attachment-message.success {
  color: var(--ios-success, #246348);
}
.guide-attachment-message.error,
.guide-attachment-status.error {
  color: var(--ios-danger, #a83432);
}
.guide-attachment-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
  border-radius: var(--ios-radius-sm, 10px);
  background: var(--ios-inset, #f2f2f7);
  color: var(--ios-secondary, #6e6e73);
}
.guide-attachment-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(13, 38, 48, 0.42);
}
.material-preview-overlay.guide-attachment-overlay {
  z-index: 2101;
}
.material-preview-overlay.guide-attachment-overlay:focus {
  outline: none;
}
.guide-attachment-overlay > .submission-preview-reader {
  grid-template-rows: auto minmax(0, 1fr);
}
.guide-attachment-overlay > .submission-preview-reader > .format-pdf-preview {
  border: 0;
  border-radius: 0;
}
.guide-attachment-overlay > .submission-preview-reader > .guide-attachment-status {
  margin: 16px;
  align-self: start;
}
.guide-attachment-overlay > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.09));
}
.modal-body.guide-summary > .guide-attachments,
.expert-guide-dialog .expert-guide-materials > .guide-attachments {
  grid-column: 1 / -1;
  padding-inline: 0;
  padding-block-end: 0;
}
@media (max-width: 640px) {
  .guide-attachments {
    padding-inline: 16px;
  }
  .guide-attachment-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .guide-attachment-badge {
    justify-self: start;
  }
  .guide-attachment-actions {
    justify-content: flex-start;
  }
  .material-preview-overlay.guide-attachment-overlay {
    inset: 8px;
  }
}
.guide-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-inline-size: 0;
  padding-block: 12px;
}
.guide-document-actions > button {
  max-inline-size: 100%;
  white-space: normal;
}
.guide-resource-dialog {
  position: fixed;
  z-index: 2101;
  inset: 8vh max(16px, calc((100vw - 800px) / 2));
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  overflow: hidden;
  background: var(--ios-panel, #fff);
  color: var(--ios-ink, #1d1d1f);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(13, 38, 48, 0.24);
}
.guide-resource-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line, #ddd);
}
.guide-resource-dialog h2 {
  margin: 0;
  font-size: 20px;
}
.guide-resource-content {
  min-block-size: 0;
  min-inline-size: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 20px 24px;
}
.guide-resource-version {
  margin: 0 0 16px;
  color: var(--ios-secondary, #6e6e73);
}
.guide-resource-content .guide-attachment-name > b {
  white-space: normal;
  overflow-wrap: anywhere;
}
.guide-resource-dialog:focus {
  outline: none;
}
.guide-resource-dialog :focus-visible,
.guide-document-actions :focus-visible {
  outline: 2px solid var(--ios-accent, #0c7180);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .guide-resource-dialog {
    inset: 8px;
  }
  .guide-resource-dialog > header,
  .guide-resource-content {
    padding: 16px;
  }
}
.guide-body-reader {
  max-inline-size: 72ch;
  margin-inline: auto;
  min-inline-size: 0;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.guide-body-reader > :first-child {
  margin-block-start: 0;
}
.guide-body-reader :is(p, li, blockquote, h1, h2, h3, h4, h5, h6) {
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
