/* the dissertation's search box and its results (search.js) */
/* the chapter pages have no --sheet of their own: the box sits on their paper */
.thesis { --sheet: var(--paper); }
/* the results panel hangs off <body>, outside the pages' token scopes, so it carries its own */
.dsearch-panel { --sheet: #fffdf6; --ink: #1b1b20; --ink-2: #4a4a55; --ink-3: #6e6e78; --rule: rgba(20, 20, 30, 0.1); --accent: #1f3fd0; color: var(--ink); }
.dark .dsearch-panel { --sheet: #25262a; --ink: #ecedf1; --ink-2: #b0b1ba; --ink-3: #8e8f98; --rule: rgba(255, 255, 255, 0.12); --accent: #8fb0ff; }
.dsearch { display: block; width: 100%; box-sizing: border-box; margin: 0 0 0.9rem; padding: 0.45rem 0.1rem; font: 0.85rem Newsreader, Georgia, serif;
  color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; }   /* (shapes 11-09) a ruled line to write on, not a box */
/* the site header forces this border's colour; a second line in the accent is laid under it while the field has the keyboard */
html #dsearch:focus, html .dsearch:focus { outline: none; border-bottom-color: var(--accent) !important; box-shadow: 0 1px 0 var(--accent); }
.dsearch::placeholder { color: var(--ink-3); }
/* (shapes round 2, 11-09) a patch of the paper inside one light pencil line (js/scribble.js; search.js asks for it where the
   page loads the helper). The patch is cut to the drawn line (--scr-clip, left on the element by the helper), so no paper
   shows outside the strokes; without the helper the cut is not valid and the patch is the plain box inside the ruled edge.
   The results scroll in .dsearch-list, not in the frame, so the line does not scroll away with them. */
.dsearch-panel { position: fixed; z-index: 80; box-sizing: border-box; margin: 3px 0 0 -6px; padding: 9px; border: 1px solid var(--rule); font-family: Newsreader, Georgia, serif; }
/* (shapes round 3, 11-09) where the field runs the width of the text (the contents page, and a chapter once its rail has
   moved above the text) the frame's top line lay just under the field's own line and the two read as one doubled line:
   there the frame hangs 7px lower, and the chapter's field keeps that much more room below it so the frame still starts
   above the first line it covers */
body:has(.contents .dsearch) .dsearch-panel { margin-top: 10px; }
@media (max-width: 1060px) { .dsearch-panel { margin-top: 10px; } .dsearch { margin-bottom: 1.35rem; } }
.dsearch-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; clip-path: var(--scr-clip);
  background: var(--ground, #fffdf6) var(--paper-img) 0 var(--paper-y, 0px) / 768px 768px fixed; background-blend-mode: var(--patch-blend); }
.dsearch-list { max-height: min(70vh, 560px); overflow-y: auto; }
.dsearch-panel .hit { display: block; padding: 0.5rem 0.65rem; border-radius: 2px; text-decoration: none; color: var(--ink); }
.dsearch-panel .hit.on, .dsearch-panel .hit:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.dsearch-panel .where { display: block; font-size: 0.74rem; color: var(--accent); margin-bottom: 0.15rem; }
.dsearch-panel .what { display: block; font: 0.9rem/1.45 Newsreader, Georgia, serif; color: var(--ink-2); }
.dsearch-panel mark, mark.dsearch-hit { background: rgba(255, 214, 90, 0.6); color: inherit; border-radius: 2px; padding: 0 1px; }
.dark .dsearch-panel mark, .dark mark.dsearch-hit { background: rgba(143, 176, 255, 0.35); }
mark.dsearch-hit { transition: background 1.2s; }
mark.dsearch-hit.fade { background: transparent; }
.dsearch-panel .none { margin: 0.6rem; font-size: 0.85rem; color: var(--ink-3); }
.contents .dsearch { max-width: 26rem; margin: 0 0 2rem; font-size: 0.95rem; padding: 0.6rem 0.1rem; }

/* nothing found: three lines try to get through, and turn back at the band (search.js) */
.none-detour { display: block; width: 160px; height: 44px; margin: 0.2rem 0 0.6rem; color: var(--ink-3, #8a8a93); }
.none-detour .nd-band { fill: currentColor; opacity: 0.12; }
.none-detour .nd-way { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: nd-draw 1.1s ease-out forwards; }
@keyframes nd-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .none-detour .nd-way { animation: none; stroke-dashoffset: 0; } }
