.documents-section { padding: 14px clamp(20px, 5vw, 72px); background: #f6fcff; border-bottom: 1px solid #d7e9ef; }
.documents-library > summary { display: grid; grid-template-columns: 32px minmax(0, 1fr) 24px; align-items: center; column-gap: 18px; cursor: pointer; color: #287d98; font-size: 18px; list-style: none; }
.documents-library > summary::-webkit-details-marker { display: none; }
.documents-library > summary img { display: block; width: 30px; height: 30px; max-width: 100%; object-fit: contain; }
.documents-library > summary > span { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.documents-library > summary small { display: block; margin-top: 4px; color: #607d87; font-size: 13px; }
.documents-library > summary::after { content: "+"; justify-self: end; font-size: 28px; font-weight: 400; }
.documents-library[open] > summary::after { content: "−"; }
.documents-body { padding: 18px 0 8px; }
.documents-note, #document-status { color: #607d87; font-size: 14px; }
.documents-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.documents-controls label { display: grid; gap: 7px; color: #31505a; font-size: 14px; }
.documents-controls input, .documents-controls select { min-width: 0; width: 100%; border: 1px solid #bddbe6; border-radius: 4px; background: #fff; padding: 12px; font: inherit; color: #17343d; }
#document-list { max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.document-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 24px; padding: 18px 4px; border-top: 1px solid #d7e9ef; }
.document-row h3 { font-size: 16px; line-height: 1.4; font-weight: 500; margin: 3px 0 6px; }
.document-row p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; }
.document-row .document-group { font-size: 12px; color: #607d87; }
.document-status { color: #607d87; font-size: 12px; }
.document-status--archive { color: #9a5525; }
.document-row-actions { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; font-size: 14px; }
.document-row-actions a, .document-actions a, .source-document-link { color: #21758f; text-decoration: underline; text-underline-offset: 3px; }
.document-row-actions a:hover, .document-actions a:hover, .source-document-link:hover { color: #154b5c; }
.document-unavailable { color: #607d87; font-size: 13px; }
.module-documents { margin: 14px 0; padding-top: 12px; border-top: 1px solid #d7e9ef; font-size: 14px; line-height: 1.5; }
.module-documents summary { cursor: pointer; color: #287d98; }
.module-documents li { margin-bottom: 8px; }
.document-is-open { overflow: hidden; }
.document-dialog { width: min(1100px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid #bddbe6; border-radius: 8px; background: #f6fcff; color: #17343d; }
.document-dialog::backdrop { background: rgba(17, 38, 48, .5); }
.document-dialog-header { display: flex; align-items: flex-start; gap: 16px; }
.document-dialog-header h2 { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.document-close { flex: 0 0 40px; width: 40px; height: 40px; margin-left: auto; padding: 0; border: 0; background: transparent; color: #287d98; font-size: 32px; line-height: 1; }
.document-reference { font-size: 14px; line-height: 1.5; color: #607d87; }
.document-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 14px 0 18px; font-size: 14px; }
.reader-toolbar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px; border: 1px solid #d7e9ef; background: #eef9fd; font-size: 14px; }
.reader-toolbar button { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid #bddbe6; background: #fff; color: #287d98; border-radius: 4px; }
.reader-toolbar button:disabled { opacity: .4; cursor: default; }
.reader-page { width: 64px; padding: 7px; border: 1px solid #bddbe6; border-radius: 4px; color: #17343d; background: #fff; }
.reader-text { white-space: pre-wrap; overflow-wrap: anywhere; height: min(58dvh, 650px); overflow-y: auto; overscroll-behavior: contain; padding: 22px; background: #fff; border: 1px solid #d7e9ef; border-top: 0; font-size: 17px; line-height: 1.65; }
.document-preview:empty { display: none; }
.documents-section *, .document-dialog * { letter-spacing: 0; }
@media (max-width: 640px) {
  .topbar nav { flex-wrap: wrap; gap: 16px; }
  .documents-controls { grid-template-columns: 1fr; gap: 12px; }
  .document-row { grid-template-columns: 1fr; gap: 12px; }
  .document-row-actions { flex-direction: row; flex-wrap: wrap; gap: 12px 18px; }
  .document-dialog { padding: 14px; width: calc(100% - 16px); }
  .document-dialog-header h2 { font-size: 17px; }
  .reader-toolbar { gap: 8px; padding-inline: 4px; }
  .reader-toolbar label { font-size: 12px; }
  .reader-page { width: 52px; }
  .reader-text { padding: 14px; font-size: 16px; }
}
