#doc-search { position: fixed; top: 8px; right: 12px; width: 360px; max-width: calc(100vw - 24px); z-index: 1000;
  font: 14px/1.4 system-ui, sans-serif; color: #222; }
#doc-search input { width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid #bbb; border-radius: 6px;
  background: #fff; font: inherit; }
#doc-search input:focus { outline: 2px solid #4a7fd4; border-color: transparent; }
#doc-search .ds-count { position: absolute; right: 10px; top: 7px; font-size: 12px; color: #777; pointer-events: none; }
#doc-search .ds-results { list-style: none; margin: 4px 0 0; padding: 0; max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
#doc-search .ds-results[hidden] { display: none; }
#doc-search li { display: flex; align-items: flex-start; border-bottom: 1px solid #eee; }
#doc-search li.ds-sel { background: #eef4ff; }
#doc-search .ds-main { flex: 1; min-width: 0; padding: 6px 10px; color: inherit; text-decoration: none; }
#doc-search .ds-title { font-weight: 600; }
#doc-search .ds-crumb { font-size: 12px; color: #777; }
#doc-search .ds-snip { font-size: 12px; color: #444; overflow-wrap: anywhere; }
#doc-search mark { background: #ffe58a; color: inherit; padding: 0 1px; }
#doc-search .ds-md { margin: 6px 8px 0 0; padding: 1px 6px; font-size: 12px; border: 1px solid #ccc; border-radius: 4px;
  color: #4a7fd4; text-decoration: none; }
#doc-search .ds-foot { margin-top: 3px; text-align: right; font-size: 11px; }
#doc-search .ds-foot a { color: #4a7fd4; background: rgba(255,255,255,.85); padding: 0 3px; }
