/* Shared document filters: right drawer, independent spacious OKS chooser. */
.overlay.document-filter-overlay{padding:0;justify-content:flex-end;align-items:stretch;z-index:65;background:var(--color-overlay)}
.modal.document-filter-drawer{width:min(400px,100%);max-height:none;height:100dvh;display:flex;flex-direction:column;overflow:hidden;border-radius:0;border-width:0 0 0 1px;box-shadow:-12px 0 48px var(--color-shadow-popup)}
.document-filter-drawer .modal-header{padding:24px;flex:none;align-items:flex-start}
.document-filter-drawer .modal-header h2{font-size:var(--font-lg)}
.document-filter-drawer .modal-header p{font-size:var(--font-xs);margin:8px 0 0}
.document-filter-drawer .modal-body{padding:0;overflow:auto;min-height:0;flex:1;overscroll-behavior:contain}
.document-filter-drawer #form-error:empty{display:none}
.document-filter-drawer .modal-footer,.document-oks-modal .modal-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:12px;padding:16px 24px;background:var(--color-surface);flex:none}
.df-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.df-footer-actions>.btn{min-height:44px;height:auto;white-space:nowrap;padding:10px 15px;line-height:22px}
.df-section{padding:20px 24px;border-bottom:1px solid var(--line)}
.df-section:last-child{border-bottom:0}
.df-section h3{font-size:var(--font-sm);font-weight:600;margin:0 0 12px;line-height:1.4}
.df-picker{border:1px solid var(--line);border-radius:8px;background:var(--color-surface);margin:0}
.df-picker>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;min-height:44px;font-size:var(--font-sm);cursor:pointer}
.df-picker>summary::-webkit-details-marker{display:none}
.df-picker>summary::after{content:'⌄';color:var(--muted);flex:none;transition:transform .15s}
.df-picker[open]>summary{border-bottom:1px solid var(--line)}
.df-picker[open]>summary::after{transform:rotate(180deg)}
.df-picker>summary:focus-visible{outline:3px solid var(--color-accent-line);outline-offset:3px;border-radius:8px}
.df-options{padding:8px 12px}
.df-option{display:flex;align-items:flex-start;gap:10px;min-height:38px;padding:8px 0;margin:0;line-height:1.45;font-size:var(--font-sm);cursor:pointer}
.df-option span{min-width:0;overflow-wrap:anywhere}
.df-option input,.df-tree-row input{width:16px;height:16px;min-width:16px;flex:none;margin:2px 0 0;padding:0;border-radius:3px;accent-color:var(--blue)}
.df-subhead{color:var(--muted);font-size:var(--font-xs);margin:10px 0 4px}
.df-status-group+.df-status-group{border-top:1px solid var(--line);margin-top:8px}
.df-divider{border-top:1px solid var(--line);margin:8px 0}
.df-segments{display:flex;align-items:stretch;gap:3px;background:var(--blue-light);padding:3px;border-radius:8px}
.df-segments>.btn{flex:1;min-width:0;height:36px;min-height:36px;padding:5px 4px;border:0;background:transparent;box-shadow:none;color:var(--blue);font-size:var(--font-xs);line-height:20px;border-radius:6px}
.df-segments>.btn:hover{background:var(--color-accent-line)}
.df-segments>.btn[aria-pressed="true"]{color:var(--color-surface);background:var(--blue);box-shadow:none}
.df-search{display:flex;align-items:center;gap:9px;min-width:0;padding:0 12px;height:44px;border:1px solid var(--line);border-radius:8px;background:var(--color-surface);margin:0}
.df-search svg{width:18px;height:18px;color:var(--muted)}
.df-search input{border:0!important;outline:none;box-shadow:none!important;width:100%;height:100%;min-height:0;min-width:0;padding:0;background:transparent;font-size:var(--font-sm);color:var(--ink);border-radius:0}
.df-search:focus-within{outline:2px solid var(--color-accent-line);outline-offset:1px}
.df-options .df-search{margin:4px 0 8px}
.df-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}
.df-heading h3{margin:0}
.df-heading>span{font-size:var(--font-xs);color:var(--muted);white-space:nowrap}
.df-tree-open.btn{width:100%;min-height:44px;justify-content:center}
.df-chips{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;min-width:0}
.df-chips:not(:empty){margin-top:12px}
.df-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-width:0;background:var(--blue-light);border:1px solid var(--color-accent-line);border-radius:7px;padding:4px 7px 4px 10px;color:var(--blue);font-size:var(--font-xs);line-height:1.5}
.df-chip>span{min-width:0;overflow-wrap:anywhere}
.df-chip .btn.df-chip-label,.df-chip .btn.df-chip-remove{border:0;box-shadow:none;border-radius:4px;background:transparent;color:var(--blue);min-height:28px;height:auto;padding:0;line-height:1.5;font-size:inherit}
.df-chip .btn.df-chip-label{white-space:normal;overflow-wrap:anywhere;min-width:0;display:block;text-align:left}
.df-chip .btn.df-chip-remove{width:28px;min-width:28px;align-self:flex-start;flex:none;font-size:18px}
.df-chip .btn:hover{background:var(--color-accent-line)}
.df-all-topics{margin:10px 0 0}
.btn.df-text-button{border:0;background:transparent;box-shadow:none;color:var(--blue);padding:8px 0;min-height:40px;height:auto;line-height:22px;font-size:var(--font-xs)}
.btn.df-text-button:hover{background:transparent;text-decoration:underline}
.overlay.document-oks-overlay{z-index:65}
.modal.document-oks-modal{display:flex;flex-direction:column;overflow:hidden;width:min(780px,100%);max-height:min(880px,calc(100dvh - 48px));border-color:var(--line)}
.document-oks-modal .modal-header{flex:none;padding:24px}
.document-oks-modal .modal-body{padding:20px 24px;min-height:0;overflow:auto;display:flex;flex-direction:column}
.df-oks-content{min-height:0;display:flex;flex-direction:column}
.df-tree-toolbar{display:flex;flex-wrap:wrap;gap:20px;padding:4px 0}
.df-oks-tree{border-block:1px solid var(--line);overflow:auto;min-height:120px;max-height:380px;padding:8px 0;overscroll-behavior:contain;scrollbar-gutter:stable}
.df-tree-row{display:flex;align-items:flex-start;gap:8px;min-width:0;padding:10px 8px 10px calc(4px + var(--df-depth)*20px);min-height:44px;border-radius:6px;font-size:var(--font-sm);line-height:1.45}
.df-tree-row:hover{background:var(--color-surface-muted)}
.df-tree-row.selected{background:var(--blue-light)}
.df-tree-row>label{display:grid;grid-template-columns:16px 80px minmax(0,1fr);gap:10px;min-width:0;flex:1;cursor:pointer;margin:0;align-items:start}
.df-tree-row label>span:last-child{min-width:0;overflow-wrap:anywhere}
.df-oks-code{color:var(--blue);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.df-tree-arrow.btn,.df-tree-spacer{width:24px;min-width:24px;height:24px;min-height:24px;flex:none;border:0;background:transparent;box-shadow:none;padding:0;border-radius:4px}
.df-tree-arrow.btn svg{width:16px;height:16px}
.df-tree-arrow.btn:hover{background:var(--color-accent-line)}
.df-tree-selection{padding-top:16px}
.df-tree-selection>p{margin:12px 0 0}
.df-tree-selection .df-chips{max-height:120px;overflow:auto}
.df-empty{padding:24px 8px;color:var(--muted)}
.document-filter-drawer [hidden],.document-oks-modal [hidden]{display:none!important}
@media(max-width:650px){
 .modal.document-filter-drawer{width:min(400px,100%);max-height:none}
 .document-filter-drawer .modal-header,.document-oks-modal .modal-header{padding:20px}
 .df-section{padding:18px 20px}
 .document-filter-drawer .modal-footer,.document-oks-modal .modal-footer{padding:14px 20px;flex-direction:row;align-items:center;gap:8px}
 .document-filter-drawer .modal-footer>.btn,.document-oks-modal .modal-footer>.btn{width:auto;white-space:nowrap;min-height:44px}
 .df-footer-actions{gap:6px}.df-footer-actions>.btn{padding-inline:12px;min-height:44px}
 .modal.document-oks-modal{width:100%;max-height:calc(100dvh - 20px)}
 .document-oks-modal .modal-body{padding:16px}
 .df-tree-row{padding-left:calc(var(--df-depth)*12px);gap:4px;font-size:var(--font-xs)}
 .df-tree-row>label{grid-template-columns:16px 72px minmax(0,1fr);gap:6px}
 .df-tree-arrow.btn,.df-tree-spacer{width:24px;min-width:24px}
 .df-search input{font-size:16px}
}
@media(pointer:coarse){.df-option{min-height:44px}.df-tree-row{padding-block:10px;min-height:44px}.df-tree-arrow.btn{height:32px;min-height:32px}.df-chip .btn.df-chip-remove{min-height:36px}}
@media(prefers-reduced-motion:reduce){.df-picker>summary::after{transition:none}}
.df-tree-arrow[aria-expanded="false"] svg{transform:rotate(-90deg)}
@media(max-width:420px){.document-oks-modal .modal-footer{flex-wrap:wrap;gap:4px}.document-oks-modal .df-footer-actions{width:100%}.document-oks-modal .df-footer-actions>.btn{flex:1}.document-oks-modal .modal-footer>.df-text-button{min-height:32px;padding-block:4px}}
