/* Global search results (js/search.js) and the suggestions under the header box. Builds on css/sheet.css. */

/* the query is the headline, counts beside it, a red caret after it */
.srch-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; padding: 14px 0 10px; border-bottom: 2px solid var(--ink); }
.srch-h h1 { min-width: 0; }
.srch-h h1::after { content: ''; display: inline-block; width: 3px; height: .72em; margin-left: .18em; background: var(--no); vertical-align: -.04em; }
.srch-n { margin-left: auto; color: var(--dim); font-size: 14px; }

/* tabs: text with a red underline on the current one; phones scroll the row inside itself */
.srch-tabs { display: flex; gap: 22px; padding-top: 14px; font-size: 14.5px; overflow-x: auto; scrollbar-width: none; }
.srch-tabs a { flex: none; color: var(--dim); text-decoration: none; padding: 2px 0 3px; border-bottom: 2px solid transparent; white-space: nowrap; }
.srch-tabs a span { font-size: 12.5px; }
.srch-tabs a:hover { color: var(--ink); }
.srch-tabs a[aria-current] { color: var(--ink); font-weight: 600; border-bottom-color: var(--no); }
.srch-fix { margin-top: 16px; font-size: 15px; color: var(--dim); }
.srch-fix b { color: var(--ink); }

/* the ringed best match on the left, the other groups beside it */
.srch-out { padding-top: 40px; }
.srch-out[aria-busy] .srch-res { opacity: .55; transition: opacity .2s; }
.srch-res { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: start; }
.srch-res.solo { grid-template-columns: minmax(0, 1fr); }
/* sticky on desktop with its connections; scrolls inside itself when taller than the window (padding keeps the ring unclipped) */
.srch-best { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; scrollbar-width: thin; padding: 18px 20px; margin: -18px -20px 0; }
.srch-best .neg-big .neg-pic { aspect-ratio: 3 / 2; flex: none; }
.srch-best .neg-cap { font-size: 16px; }
.srch-why { margin-top: 26px; font-size: 14px; color: var(--dim); }
.srch-why b { color: var(--no); }

.srch-g { margin-bottom: 34px; }
.srch-g h2 { font-size: 26px; margin-bottom: 8px; }
.srch-g .row small { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-g .row:hover p { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.srch-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 8px; }
.srch-mini .neg-cap { font-size: 14px; }
.srch-mini .srch-cap { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.srch-sub { display: block; margin-top: 3px; color: var(--dim); font-size: 12.5px; font-weight: 400; }
.srch-more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--dim); }
.srch-more:hover { color: var(--ink); }

/* connected to the best match */
.srch-conn { margin-top: 22px; border-top: 1px solid var(--rule); }
.srch-conn summary { cursor: pointer; padding: 12px 0 10px; font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 22px; line-height: 1; }
.srch-conn summary span { color: var(--dim); }
.srch-cg { margin-bottom: 14px; }
.srch-cg h3 { margin-bottom: 4px; }
.srch-cg ul { list-style: none; padding: 0; }
.srch-cg li a { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 15px; line-height: 1.3; text-decoration: none; --mk: 16px; }
.srch-cg li a:hover span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.srch-cg li a.paper { margin-bottom: 4px; padding: 6px 10px; font-size: 14px; }
.srch-cg .srch-more { margin-top: 2px; }

/* documents and the text inside them: official paper */
.srch-docs { list-style: none; padding: 0; display: grid; gap: 10px; }
.srch-doc { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; text-decoration: none; }
.srch-doc b { display: block; font-size: 16px; line-height: 1.25; }
.srch-doc small { display: block; color: var(--paper-dim); font-size: 13px; }
.srch-doc:hover b { text-decoration: underline; text-decoration-thickness: 1px; }
.srch-doc .duo { display: grid; place-items: center; width: 70px; height: 52px; overflow: hidden; background: #d9dad5; font-size: 10px; color: var(--paper-dim); text-align: center; }
.srch-doc .duo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.srch-page { grid-template-columns: minmax(0, 1fr); }
.srch-page .serif { display: block; margin-top: 6px; font-size: 17px; line-height: 1.35; }
.srch-cov { margin-top: 10px; font-size: 13px; color: var(--dim); }

.srch-none { display: grid; gap: 18px; justify-items: start; max-width: 640px; }
.srch-none p { color: var(--dim); }
.srch-none a:not(.chip) { color: var(--ink); }
.srch-wait { color: var(--dim); }


@media (max-width: 720px) {
  .srch-h { padding-top: 6px; }
  .srch-n { margin-left: 0; flex-basis: 100%; }
  .srch-tabs { gap: 14px; font-size: 13px; }
  .srch-out { padding-top: 30px; }
  .srch-res { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .srch-best { position: static; max-height: none; overflow: visible; padding: 2px 4px 0; margin: 0; }
  .srch-why { margin-top: 20px; }
  .srch-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .srch-g .row small { display: none; }
}
