@font-face {
    font-family: "72";
    src: url("brand/72-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "72";
    src: url("brand/72-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
:root {
    color-scheme: light;
    font: 16px/1.5 "72", Arial, sans-serif;
    color: #222126;
    background: #f5f5f7;
    --brand: #aa0202;
    --line: #e5e2e5;
    --muted: #58535e;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
.shell { width: min(1170px, calc(100% - 2rem)); margin-inline: auto; }
.top { background: white; border-bottom: 1px solid var(--line); }
.top-inner, .identity, .heading, .section-head, .account, .actions, .upload-form, .pagination {
    display: flex; flex-wrap: wrap; gap: .8rem; align-items: center;
}
.top-inner, .heading, .section-head { justify-content: space-between; }
.top-inner { min-height: 4.5rem; padding-block: .65rem; }
.identity { gap: clamp(.6rem, 2vw, 1.2rem); }
.logo { display: block; width: clamp(104px, 21vw, 145px); height: auto; }
.brand { border-left: 1px solid var(--line); padding-left: clamp(.6rem, 2vw, 1.2rem); color: #222126; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--brand); }
.account { font-size: .9rem; }
main { padding-block: clamp(1rem, 4vw, 2.5rem) 3rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.025em; line-height: 1.08; }
h2 { font-size: 1.25rem; line-height: 1.25; }
.heading { gap: 1.35rem; padding: clamp(1.2rem, 4vw, 2.35rem); background: #232126; color: white; border-radius: .85rem; border-left: .4rem solid var(--brand); }
.eyebrow { color: var(--brand); font-size: .83rem; font-weight: 700; margin-bottom: .45rem; }
.heading .eyebrow { color: #ffb4b4; }
.quota { display: grid; gap: .3rem; width: min(13rem, 100%); }
.quota label, .quota span { color: #e0d9e1; font-size: .83rem; font-weight: 400; }
.quota strong { font-size: 1.25rem; }
progress { width: 100%; height: .45rem; accent-color: #ee4848; }
progress::-webkit-progress-bar { background: #575058; border-radius: .25rem; }
progress::-webkit-progress-value { background: #ee4848; border-radius: .25rem; }
.empty, small, time { color: var(--muted); }
.card { padding: clamp(1rem, 3vw, 1.5rem); background: white; border: 1px solid var(--line); border-radius: .85rem; margin-top: 1rem; box-shadow: 0 2px 5px #21191e08; }
.login { max-width: 30rem; margin: clamp(1rem, 8vh, 5rem) auto; border-top: .3rem solid var(--brand); padding: clamp(1.2rem, 5vw, 2.2rem); }
.login h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); }
.stack { display: grid; gap: 1rem; margin-top: 1.3rem; }
.stack label, .drop { display: grid; gap: .35rem; }
.stack label { font-weight: 700; }
.stack button { justify-self: start; }
.upload-form { margin-top: .85rem; }
.drop { flex: 1 1 18rem; min-width: 0; padding: 1rem; background: #fcf9f9; border: 1px dashed #b87979; border-radius: .55rem; overflow-wrap: anywhere; }
.drop.dragging { background: #fbe2e4; border-color: var(--brand); }
#file-label { font-weight: 700; }
input, select, button { font: inherit; }
input:not([type=file]), select { min-height: 2.6rem; border: 1px solid #b7b1bb; padding: .45rem .65rem; border-radius: .4rem; max-width: 100%; background: white; color: inherit; }
input[type=file] { width: 100%; margin-top: .2rem; font-size: .9rem; }
input::file-selector-button { background: white; border: 1px solid #cdbbbe; color: var(--brand); font: inherit; font-weight: 700; padding: .3rem .55rem; border-radius: .35rem; margin-right: .6rem; cursor: pointer; }
button { min-height: 2.6rem; background: var(--brand); color: white; border: 1px solid transparent; border-radius: .4rem; padding: .4rem .85rem; font-weight: 700; cursor: pointer; }
button:hover { background: #840202; }
button.secondary { background: white; color: #3b343e; border-color: #c8c2cb; }
button.secondary:hover { background: #f4f1f4; }
button.danger { color: var(--brand); background: #fff2f2; }
button.danger:hover { background: #fbe2e4; }
a, summary { color: var(--brand); }
a { text-underline-offset: .16em; }
summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.notice { background: #edf7ef; border: 1px solid #a7c7ad; border-radius: .5rem; padding: .8rem 1rem; margin-bottom: 1rem; }
.notice.error { background: #fff0f0; border-color: #eac0c0; color: #850505; list-style-position: inside; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; text-align: left; }
thead { background: #f6f4f6; }
th { color: #4f4754; font-size: .85rem; }
th, td { padding: .75rem .65rem; border-bottom: 1px solid var(--line); }
.filename, .event { overflow-wrap: anywhere; }
.filename { min-width: 10rem; max-width: 28rem; font-weight: 700; }
.transfer, .pagination, .empty { margin-top: .75rem; }
.event { padding-block: .65rem; border-bottom: 1px solid var(--line); }
.event time { display: inline-block; margin-left: .5rem; font-size: .88rem; }

.archive-footer { display: flex; justify-content: flex-end; margin-top: 1rem; }
dialog { width: min(32rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: clamp(1rem, 4vw, 1.65rem); color: inherit; border: 1px solid var(--line); border-top: .3rem solid var(--brand); border-radius: .85rem; box-shadow: 0 12px 40px #23152030; }
dialog::backdrop { background: #211c24a6; }
dialog h3 { margin: .85rem 0 .35rem; font-size: 1.08rem; }
.guide-progress { margin-top: .25rem; color: var(--muted); font-size: .88rem; }
.guide-choice { display: flex; align-items: baseline; gap: .45rem; margin: 1.3rem 0 .9rem; }
.guide-choice input { accent-color: var(--brand); }
.guide-controls { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.help-search { display: grid; gap: .3rem; margin-top: 1rem; }
.help-questions { margin: .65rem 0 1rem; }
.help-questions details { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.help-questions details p { margin-top: .35rem; }
#help-empty { margin-bottom: 1rem; }

.heading .back-link { color: white; }
.session-date { white-space: nowrap; font-variant-numeric: tabular-nums; }

.user-create { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-top: .85rem; }
.user-create label { display: grid; gap: .25rem; max-width: 100%; }

.result-count { margin-top: .2rem; color: var(--muted); font-size: .9rem; }
.archive-toolbar { align-items: end; }
.archive-toolbar select { max-width: min(100%, 12rem); }
.filename a { text-decoration: none; }
.filename a:hover { text-decoration: underline; }
#archive-preview { width: min(72rem, calc(100% - 2rem)); }
#preview-title { overflow-wrap: anywhere; }
.preview-tools { margin: .5rem 0; }
#preview-content { display: grid; align-content: start; justify-items: center; gap: 1rem; width: 100%; height: 60dvh; overflow: auto; padding: .75rem; background: #f5f5f7; border: 1px solid var(--line); border-radius: .4rem; }
#preview-content img, #preview-content canvas { display: block; max-width: 100%; height: auto; }
#preview-content canvas { background: white; box-shadow: 0 2px 10px #22212624; }
#preview-content pre { justify-self: stretch; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#upload-details { max-height: 45dvh; overflow: auto; padding-left: 1.3rem; overflow-wrap: anywhere; }
#upload-summary { margin-top: .5rem; font-weight: 700; }
#upload-progress { color: var(--muted); }
.pagination a, .pagination .current-page { padding: .25rem .5rem; }
.pagination .current-page { background: var(--brand); color: white; border-radius: .3rem; }


.identity { width: fit-content; flex-wrap: nowrap; gap: .65rem; color: #222126; font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.identity-praxis { display: block; width: 2.25rem; height: 2.25rem; border-radius: .45rem; }

.access-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #27252a;
}
.access-screen .top { position: relative; z-index: 1; }
.access-screen::before {
    position: fixed;
    z-index: 0;
    inset: 0;
    content: "";
    background:
        linear-gradient(110deg, #241d2322 10%, #241d2366 100%),
        url("brand/san-pietro.jpg") 50% 12% / cover no-repeat;
}
.access-screen main {
    position: relative;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-block: clamp(2rem, 8vh, 6rem);
}
.access-screen .login, .access-screen .notice { width: min(100%, 29rem); margin-inline: 0; }
.access-screen .login {
    margin-block: 0;
    border-color: #efe9ed;
    border-top-color: var(--brand);
    box-shadow: 0 18px 56px #160f1f42;
}
@media (max-width: 680px) {
    .access-screen::before { background-position: 50% 22%; }
    .access-screen main { align-items: center; justify-content: end; padding-top: max(9rem, 25vh); }
}

#archive-more { margin-top: 1rem; min-height: 2rem; }
#archive-next[aria-disabled="true"] { pointer-events: none; opacity: .55; }
#archive-load-status { color: var(--muted); font-size: .9rem; }
#transfer-file { margin-top: .35rem; overflow-wrap: anywhere; }
.file-transfer-bar { display: block; width: 100%; height: .65rem; margin: 1rem 0 .55rem; accent-color: var(--brand); }
.file-transfer-bar::-webkit-progress-bar { background: #e7e2e6; }
.file-transfer-bar::-webkit-progress-value { background: var(--brand); transition: width .15s ease-out; }
.file-transfer-bar:indeterminate {
    appearance: none;
    border-radius: 1rem;
    background: linear-gradient(90deg, #e7e2e6 0%, #e7e2e6 38%, var(--brand) 50%, #e7e2e6 62%, #e7e2e6 100%) 0 0 / 220% 100%;
    animation: transfer-activity 1s linear infinite;
}
.file-transfer-bar:indeterminate::-webkit-progress-bar { background: transparent; }
#transfer-phase { min-height: 1.5em; color: var(--muted); }
#transfer-progress button { margin-top: 1rem; }
@keyframes transfer-activity { to { background-position: -180% 0; } }
@media (prefers-reduced-motion: reduce) {
    .file-transfer-bar:indeterminate { animation: none; }
    .file-transfer-bar::-webkit-progress-value { transition: none; }
}

.transfer-confirmed .file-transfer-bar {
    --confirmation-fill: linear-gradient(105deg, var(--brand) 35%, #e78888 50%, var(--brand) 65%) 100% 0 / 240% 100%;
    --confirmation-motion: transfer-confirmation 1.15s linear infinite;
}
.transfer-confirmed .file-transfer-bar::-webkit-progress-value {
    background: var(--confirmation-fill);
    animation: var(--confirmation-motion);
}
.transfer-confirmed .file-transfer-bar::-moz-progress-bar {
    background: var(--confirmation-fill);
    animation: var(--confirmation-motion);
}
@keyframes transfer-confirmation { to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
    .transfer-confirmed .file-transfer-bar { --confirmation-motion: none; }
}

.upload-pickers { gap: .55rem 1rem; }
.upload-pickers #documento { flex: 1 1 13rem; width: auto; min-width: 0; }
#upload-selection-error { color: #850505; margin-top: .25rem; }
.folder-breadcrumb { color: var(--muted); margin-block: 1rem .75rem; gap: .45rem; overflow-wrap: anywhere; }
.folder-breadcrumb strong { color: #222126; }
.folder-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .55rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.folder-list a { display: flex; gap: .5rem; align-items: center; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .4rem; background: #fcf8f8; text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.folder-list a:hover { background: #fff0f0; }
.folder-list svg { flex: 0 0 auto; }
.document-folder { display: block; font-weight: 400; }

.preview-stage { position: relative; }
#preview-progress:not([hidden]) {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 1rem;
    background: #f5f5f7;
    border: 1px solid var(--line);
    border-radius: .4rem;
}
#preview-progress .file-transfer-bar { width: min(100%, 24rem); }
#preview-progress [role=status] { color: var(--muted); text-align: center; }

body { display: flex; flex-direction: column; min-height: 100dvh; }
.site-footer { position: relative; margin-top: auto; background: #faf9fb; color: var(--muted); border-top: 1px solid var(--line); font-size: .87rem; }
.site-footer-inner { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .8rem 1.5rem; padding-block: 1.25rem; }
.site-footer strong { color: #222126; }
.site-footer address { margin-top: .25rem; font-style: normal; }
.site-footer .actions { gap: .4rem .8rem; }
.site-footer-restriction { margin-top: .45rem; }
.footer-fbf { display: block; width: 12rem; height: auto; margin-bottom: .65rem; padding: .4rem .6rem; border-radius: .35rem; background: #203650; }
.footer-technology { display: flex; flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: .55rem 1rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.footer-technology p { margin-right: auto; }
.footer-technology img { display: block; height: auto; }

.archive-heading { padding-block: clamp(1rem, 2.2vw, 1.55rem); }
.archive-heading h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.archive-workspace { display: grid; grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.archive-sidebar { padding: .8rem; }
.sidebar-heading { margin: .15rem .55rem .55rem; font-weight: 700; font-size: .87rem; color: var(--muted); }
.sidebar-link { display: grid; align-items: center; gap: .35rem; min-height: 2.5rem; padding: .45rem .55rem; border-radius: .4rem; color: #322d35; text-decoration: none; line-height: 1.25; overflow-wrap: anywhere; }
.sidebar-folder { grid-template-columns: 1.15rem minmax(0, 1fr) auto; font-size: .9rem; }
.sidebar-link svg { color: var(--brand); }
.sidebar-link:hover, .sidebar-link.active-folder, .sidebar-link[aria-current=page] { background: #fcf0f0; color: #8a0909; }
.sidebar-link[aria-current=page] { font-weight: 700; }
.sidebar-help { margin: .8rem .5rem 0; min-height: 2.2rem; font-size: .86rem; }

.archive-upload { padding: .65rem .85rem; }
.archive-upload > summary { display: flex; gap: .55rem; align-items: center; list-style: none; }
.archive-upload > summary::-webkit-details-marker { display: none; }
.archive-upload > summary::before { content: "+"; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: .35rem; background: var(--brand); color: white; font-size: 1.15rem; }
.archive-upload[open] > summary::before { content: "−"; }
.archive-upload > summary span { margin-left: auto; color: var(--muted); font-size: .87rem; }
.archive-upload.dragging { border-color: var(--brand); background: #fff3f3; }
.archive-upload .drop { padding: .75rem; }

.archive-browser { padding: clamp(.85rem, 2vw, 1.2rem); }
.archive-toolbar { gap: .65rem .9rem; align-items: start; }
.archive-toolbar > form { gap: .4rem; }
.archive-toolbar input[type=search] { width: min(100%, 13rem); }
.archive-browser .folder-breadcrumb { border-top: 1px solid var(--line); padding-top: .7rem; margin-bottom: .75rem; font-size: .9rem; }
.folder-section { margin-top: 1rem; }
.folder-section h3 { margin: 0 0 .5rem; font-size: .9rem; }
.folder-section h3 span { margin-left: .2rem; color: var(--muted); font-weight: 400; }
.folder-section .folder-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.folder-list a { height: 100%; min-height: 3.4rem; align-items: center; padding: .55rem; }
.folder-card-icon { display: grid; place-items: center; align-self: start; width: 2.1rem; min-width: 2.1rem; height: 2.1rem; border-radius: .4rem; background: #f4e3e4; }
.folder-card-text { display: grid; gap: .1rem; min-width: 0; color: #322d35; font-size: .9rem; line-height: 1.2; }
.folder-card-text small { font-weight: 400; }

.document-table { margin-top: .7rem; }
.document-table th, .document-table td { padding: .58rem .45rem; }
.document-table tbody tr:hover { background: #fcf9fa; }
.document-meta { font-size: .86rem; color: var(--muted); }
.document-date, .document-size { white-space: nowrap; }
.document-identity { display: flex; gap: .55rem; align-items: center; line-height: 1.25; }
.document-type { display: grid; place-items: center; flex: 0 0 2rem; height: 2rem; border-radius: .35rem; background: #f4edf0; color: #75474d; font-size: .65rem; letter-spacing: .02em; font-weight: 700; }
.document-table .filename a { color: #322d35; }
.document-table .filename a:hover { color: var(--brand); }
.document-actions { gap: .25rem .6rem; font-size: .85rem; }
.document-actions .document-delete { min-height: 1.9rem; padding: .15rem .4rem; }

.delete-document-name { margin: .7rem 0 .5rem; font-weight: 700; overflow-wrap: anywhere; }
#delete-description { color: var(--muted); }
.delete-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; margin-top: 1.25rem; }

@media (min-width: 900px) {
    .archive-sidebar { position: sticky; top: 1rem; }
}
@media (max-width: 899px) {
    .archive-workspace { display: block; }
    .archive-sidebar { display: flex; align-items: start; justify-content: space-between; gap: .4rem; }
    .archive-sidebar nav { max-width: 100%; }
    .sidebar-link { display: inline-flex; vertical-align: top; }
    .sidebar-heading { margin-bottom: .2rem; }
    .sidebar-help { margin: 0; }
}
.archive-folder-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; margin-top: .9rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.archive-browser .archive-folder-toolbar .folder-breadcrumb { border: 0; margin: 0; padding: 0; }
.folder-tools { gap: .4rem; }
.folder-tools button, .document-actions .document-move { min-height: 1.95rem; padding: .2rem .45rem; }
.folder-tools button { font-size: .85rem; }
[data-drag-document] { cursor: grab; }
.dragging-document [data-drop-folder] { outline: 1px dashed #bd7373; outline-offset: -1px; }
.dragging-document .folder-drop-active { background: #fce3e5; outline: 2px solid var(--brand); }
.organize-context { margin-top: .4rem; color: var(--muted); overflow-wrap: anywhere; }
.event-path { color: var(--muted); }

.document-drag-handle { display: grid; place-items: center; flex: 0 0 1.05rem; min-height: 1.85rem; border-radius: .25rem; color: var(--muted); font-size: 1rem; line-height: 1; user-select: none; touch-action: none; }
.document-drag-handle:hover { background: #f4edf0; color: var(--brand); }
.document-drag-handle:active { cursor: grabbing; }

#delete-folder-count { font-weight: 700; }
button:disabled { cursor: not-allowed; opacity: .55; }

.sidebar-folder-row, .folder-list > li { display: flex; align-items: stretch; gap: .2rem; min-width: 0; }
.sidebar-folder-row > a, .folder-list > li > a { flex: 1; min-width: 0; }
.folder-drag-handle { display: grid; place-items: center; flex: 0 0 1.05rem; color: var(--muted); cursor: grab; user-select: none; touch-action: none; }
.folder-drag-handle:hover { color: var(--brand); }
.folder-drag-handle:active { cursor: grabbing; }
@media (max-width: 899px) {
    .sidebar-folder-row { display: inline-flex; }
}

#preview-content { position: relative; overscroll-behavior: contain; }
.preview-page-status { margin: 0 0 .45rem; font-size: .87rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.pdf-page { display: grid; place-items: center; width: min(100%, 56rem); background: #fff; color: var(--muted); box-shadow: 0 2px 10px #22212624; }
#preview-content .pdf-page canvas { width: 100%; box-shadow: none; }

.mfa-key { margin-top: .5rem; letter-spacing: .1em; overflow-wrap: anywhere; }

.staging-note { position: relative; z-index: 1; padding: .35rem 1rem; text-align: center; background: #f5ece7; color: #563a2d; font-size: .82rem; }

.mfa-qr { display: block; width: min(13.5rem, 100%); height: auto; margin: .8rem auto .65rem; border: 1px solid var(--line); border-radius: .5rem; background: white; }
.mfa-manual { font-size: .9rem; }

.impersonation-banner { background: #fff1e1; color: #693c12; border-bottom: 1px solid #e5c4a3; }
.impersonation-banner .actions { justify-content: space-between; padding-block: .5rem; }

@media (max-width: 680px) {
    .shell { width: calc(100% - 1.5rem); }
    .top-inner { min-height: 3.9rem; gap: .45rem; }
    .top .identity { gap: .45rem; font-size: 1.05rem; }
    .top .account { min-width: 0; gap: .45rem; }
    .top .account a, .top .account span { max-width: min(32vw, 9rem); overflow-wrap: anywhere; }
    .access-screen main { padding-block: clamp(2rem, 9svh, 5rem); }
    input:not([type=file]), select, button { min-height: 44px; }
    .access-screen .stack input:not([type=checkbox]) { font-size: 1rem; }
    .archive-heading { gap: .65rem; }
    .archive-heading .quota { width: 100%; grid-template-columns: 1fr auto; align-items: center; }
    .archive-heading .quota progress { grid-column: 1 / -1; width: 100%; }
    .archive-sidebar { display: grid; grid-template-columns: 1fr auto; align-items: center; }
    .archive-sidebar nav { grid-column: 1 / -1; min-width: 0; }
    .sidebar-folders { display: flex; gap: .35rem; overflow-x: auto; padding: .25rem; scrollbar-width: thin; }
    .sidebar-folders > * { flex: 0 0 auto; max-width: 75%; }
    .sidebar-folders .sidebar-link { min-height: 44px; border: 1px solid var(--line); background: white; }
    .sidebar-folders .sidebar-link:is(.active-folder, [aria-current=page]) { border-color: #d6a5a7; background: #fcf0f0; }
    .archive-upload > summary { min-height: 44px; }
    .upload-form { display: grid; }
    .upload-form .drop { min-width: 0; }
    .upload-pickers { align-items: stretch; }
    .upload-pickers #documento { width: 100%; }
    .archive-toolbar { display: grid; gap: .75rem; }
    .archive-toolbar > form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .archive-toolbar input[type=search] { grid-column: 1 / -1; width: 100%; font-size: 1rem; }
    .archive-toolbar select { width: 100%; font-size: 1rem; }
    .archive-toolbar form > a { padding: .55rem; }
    .archive-folder-toolbar { gap: .65rem; }
    .archive-browser .folder-breadcrumb { overflow-wrap: anywhere; }
    .folder-tools button { min-height: 44px; }
    .folder-section .folder-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .folder-list a { align-items: start; padding: .45rem; }
    .folder-card-icon { width: 1.55rem; min-width: 1.55rem; height: 1.55rem; }
    .document-table, .document-table tbody { display: block; }
    .document-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .document-table tr { display: flex; flex-wrap: wrap; gap: .3rem .75rem; padding: .75rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: .55rem; }
    .document-table td { display: block; border: 0; padding: 0; }
    .document-table td:is(.filename, :last-child) { width: 100%; min-width: 0; }
    .document-name { min-width: 0; overflow-wrap: anywhere; }
    .document-owner { overflow-wrap: anywhere; }
    .document-table td:last-child { margin-top: .2rem; }
    .document-actions { gap: .35rem; }
    .document-actions .document-primary-action,
    .document-actions details > summary,
    .preview-tools a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .35rem .65rem; }
    .document-actions .document-primary-action { border: 1px solid var(--line); border-radius: .4rem; font-weight: 700; text-decoration: none; }
    .document-actions .document-move, .document-actions .document-delete { min-height: 44px; padding-inline: .6rem; }
    #archive-preview[open] {
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr);
        align-content: stretch;
        width: calc(100% - 1rem);
        height: calc(100dvh - 1rem);
        max-height: calc(100dvh - 1rem);
        padding: .65rem;
    }
    #archive-preview .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
    #archive-preview #preview-title { overflow-wrap: anywhere; }
    #archive-preview .preview-stage { grid-row: 4; min-height: 0; }
    #preview-content { height: 100%; padding: .25rem; }
}

@media (max-width: 680px) and (pointer: coarse) {
    .document-drag-handle, .folder-drag-handle { display: none; }
}

@media (max-width: 360px) {
    .folder-section .folder-list { grid-template-columns: 1fr; }
}

.bulk-trash-controls { margin: .8rem 0 .55rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: .45rem; }
.bulk-trash-controls label, .document-check:not([hidden]) { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; }
.bulk-trash-controls input, .document-check input { min-height: 0; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--brand); }
.document-check { flex: 0 0 auto; padding: .3rem; }
.bulk-trash-controls [role=status] { color: var(--muted); }
#bulk-trash-description { margin-top: .55rem; }

@media (max-width: 680px) {
    .bulk-trash-controls label { min-height: 44px; }
    .document-check { min-width: 32px; min-height: 44px; justify-content: center; }
}

.trash-toolbar { margin-bottom: .55rem; }
.trash-toolbar p, .trash-actions [role=status] { color: var(--muted); }
.trash-views { gap: .25rem; }
.trash-views a { padding: .45rem .7rem; border-radius: .4rem; }
.trash-views [aria-current=page] { background: #fcf0f0; font-weight: 700; text-decoration: none; }
.trash-actions:not([hidden]) { margin: .9rem 0 .65rem; padding: .55rem .7rem; background: #faf9fb; border: 1px solid var(--line); border-radius: .45rem; }
.trash-actions label, .trash-entry-check { cursor: pointer; }
.trash-actions input, .trash-entry-check input { min-height: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--brand); vertical-align: middle; }
.trash-entry { display: flex; gap: .5rem; align-items: center; overflow-wrap: anywhere; }
.trash-confirm-description { margin: .65rem 0 .35rem; }
.trash-table { margin-top: .65rem; }
.trash-table td:nth-child(4) { white-space: nowrap; }
.trash-actions[hidden] { display: none; }

@media (max-width: 680px) {
    .trash-actions label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; flex-basis: 100%; }
    .trash-actions label[hidden] { display: none; }
    .trash-table td:nth-child(4) { white-space: normal; }
    .trash-entry-check { display: grid; place-items: center; min-width: 40px; min-height: 44px; }
    .trash-entry-check[hidden] { display: none; }
}
