.rd-actions,.rd-preview-actions{display:flex;gap:7px;flex-wrap:wrap}.rd-actions button,.rd-dialog button,.rd-preview-actions a{font:500 12px Inter,Arial,sans-serif;background:#fff;border:1px solid #d9d1c8;border-radius:999px;padding:9px 14px;color:#302621;cursor:pointer;text-decoration:none}.rd-actions button:hover,.rd-dialog button:hover{background:#f5eee5}.rd-dialog{box-sizing:border-box;width:min(580px,calc(100vw - 28px));max-height:90dvh;padding:24px;border:1px solid #d9d1c8;border-radius:16px;background:#fdfaf5;color:#272321;font:13px Inter,Arial,sans-serif;box-shadow:0 24px 70px #21181033}.rd-dialog::backdrop{background:#21181066}.rd-dialog .rd-preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.rd-dialog h2{margin:0;font-size:20px;font-weight:600}.rd-dialog .rd-preview-header p{font-size:12px;margin:7px 0 0;color:#6d625c}.rd-dialog .rd-preview-header>button{padding:3px 10px;font-size:24px;background:transparent;border:0}.rd-dialog label{display:block;margin:16px 0;font-size:12px;font-weight:600}.rd-dialog input:not([type=checkbox]),.rd-dialog select{box-sizing:border-box;width:100%;padding:11px 12px;margin-top:7px;border:1px solid #d9d1c8;border-radius:8px;background:white;color:#272321;font:14px Inter,Arial,sans-serif}.rd-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.rd-fields label{margin:0}.rd-dialog .rd-drop{border:1px dashed #b99da7;border-radius:12px;padding:18px;background:#f7eff2}.rd-drop span{display:block;font-size:11px;font-weight:400;line-height:1.6;overflow-wrap:anywhere;margin-top:10px}.rd-dialog .rd-pin{display:flex;align-items:center;gap:8px}.rd-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.rd-dialog .rd-primary{background:#815474;color:white;border-color:#815474}.rd-status{font-size:12px;color:#8a354b;line-height:1.5}.rd-dialog button:disabled{opacity:.5;cursor:wait}.rd-viewer{width:min(1120px,calc(100vw - 28px))}.rd-viewer iframe{width:100%;height:60dvh;border:1px solid #ded5ca;border-radius:8px;background:#fff}.rd-print-hint{font-size:11px;color:#6d625c;line-height:1.5}.rd-preview-actions a:not([href]){opacity:.4;pointer-events:none}.rd-dialog :focus-visible,.rd-row :focus-visible{outline:2px solid #815474;outline-offset:3px}@media(max-width:650px){.rd-fields{grid-template-columns:1fr;gap:12px}.rd-dialog{padding:18px}.rd-dialog input:not([type=checkbox]),.rd-dialog select{font-size:16px}.rd-viewer iframe{height:52dvh}}

/* Match the existing SOPs: joined, compact disclosure rows. */
.res-grid:has(>details.rd-row){gap:0;border:1px solid var(--border);border-radius:8px;overflow:hidden}
.rd-row{margin:0;border:0;border-bottom:1px solid var(--border);background:rgba(255,255,255,.78);font-family:'DM Sans',Arial,sans-serif;color:var(--ink)}
.rd-row:last-child{border-bottom:0}
.rd-row summary{display:flex;align-items:center;gap:8px;min-height:40px;padding:10px 12px;cursor:pointer;list-style:none}
.rd-row summary::-webkit-details-marker{display:none}
.rd-row summary:hover{background:var(--sand-light)}
.rd-title{font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere;flex:1;min-width:0}
.rd-chevron{flex:none;color:var(--ink-xlight);transition:transform .15s}
.rd-row[open] .rd-chevron{transform:rotate(90deg)}
.rd-body{padding:8px 14px 16px}
.rd-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px 20px;flex-wrap:wrap}.rd-meta{font-size:12px;font-weight:500;line-height:1.5;color:#352d26;margin:0;white-space:nowrap}
.rd-description{font-size:13px;line-height:1.7;color:#352d26;margin:0 0 12px}
.rd-row .rd-actions button{font-family:'DM Sans',Arial,sans-serif;padding:6px 11px;font-size:12px}
@media(max-width:700px){.rd-row summary{min-height:44px}.rd-row .resource-private-badge{font-size:9px;margin-left:0}}

/* Document upload retains the shared Resource form's typography and controls. */
.rd-upload{padding:12px;border:1px dashed var(--border);border-radius:8px;transition:background .15s,border-color .15s}
.rd-upload.rd-dragging{background:var(--sand-light);border-color:var(--rust);outline:2px solid var(--rust);outline-offset:2px}
.rd-drop-hint{font-size:12px;color:var(--ink-light);margin:0 0 10px;line-height:1.5}
#rd-file-info{overflow-wrap:anywhere}
/* Isolate the viewer header from the site's full-page header styling. */
.rd-dialog{margin:auto;inset:0}
.rd-viewer>.rd-preview-header{position:static;background:none;padding:0;height:auto;min-height:0;margin:0 0 24px;box-shadow:none;border:0}
.rd-preview-header>div{min-width:0}
.rd-viewer .rd-preview-header h2{font-size:22px;line-height:1.4;overflow-wrap:anywhere}
.rd-viewer .rd-preview-header p{font-size:13px;line-height:1.6;margin:8px 0 0}
.rd-viewer .rd-preview-header>button{flex:none;display:grid;place-items:center;width:34px;height:34px;padding:0;border-radius:8px;background:rgba(26,23,20,.06);line-height:1}
.rd-viewer .rd-preview-actions{gap:10px}
.rd-viewer .rd-print-hint{font-size:12px;line-height:1.7;margin:16px 0 18px}
.rd-viewer .rd-print-hint p{margin:0}
.rd-viewer .rd-print-hint p+p{margin-top:5px}
#rd-view-status:empty{display:none}
#rd-view-status:not(:empty){font-size:13px;line-height:1.6;margin:0 0 14px}
#rd-pdf-controls{align-items:center;margin-top:16px;row-gap:12px}
#rd-pdf-controls span{font-size:12px;min-width:42px;text-align:center}
.rd-pdf-surface{height:60dvh;overflow:auto;overscroll-behavior:contain;touch-action:none;background:#e5dfd6;border:1px solid var(--border);border-radius:8px;cursor:grab;position:relative}
.rd-pdf-surface.rd-panning{cursor:grabbing}
.rd-pdf-sheet{margin:16px auto;background:white;box-shadow:0 2px 8px #21181026;flex:none}
.rd-pdf-sheet canvas{display:block;width:100%;height:100%}
.rd-viewer .rd-print-frame{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;border:0}
@media(max-width:650px){.rd-pdf-surface{height:52dvh}}
