/* pagefind-theme.css: the Pagefind Default UI worn as the broadsheet (components/search-overlay.md; the mocks
   system/chrome/search-overlay.html and empty-search.html). Every value is a token from src/lib/ui/tokens/ (bundled in
   app.css on every page), so the morning and late editions follow from the tokens alone. Linked after
   /pagefind/pagefind-ui.css by the /search page; the `body` prefix and the doubled class outrank Pagefind's own
   `.pagefind-ui__x.svelte-hash.svelte-hash` rules (0,3,0).
   Words: the field on bare paper with a key rule under it, square; results split by hairlines; titles in the display
   face; the match in bold; controls in the control ink (navy), never red. */

body .pagefind-ui {
	--pagefind-ui-scale: 1;
	--pagefind-ui-primary: var(--control);
	--pagefind-ui-text: var(--ink);
	--pagefind-ui-background: var(--paper);
	--pagefind-ui-border: var(--rule-soft);
	--pagefind-ui-tag: var(--paper);
	--pagefind-ui-border-width: var(--rule-hair);
	--pagefind-ui-border-radius: var(--radius);
	--pagefind-ui-image-border-radius: var(--radius);
	--pagefind-ui-image-box-ratio: var(--aspect-square);
	--pagefind-ui-font: var(--font-body);
	max-width: var(--measure);
	color: var(--ink);
	font: var(--weight-body) var(--text-body)/var(--lh-body) var(--font-body);
}

/* the field: Newsreader at --text-h3 on bare paper, a key rule under it, no box, square */
body .pagefind-ui .pagefind-ui__search-input.pagefind-ui__search-input {
	height: auto;
	min-height: var(--tap-min);
	padding: var(--space-2) var(--space-12) var(--space-2) var(--space-8);
	border: 0;
	border-bottom: var(--rule-section) solid var(--rule);
	border-radius: var(--radius);
	background-color: var(--paper);
	color: var(--ink);
	font: var(--weight-display) var(--text-h3)/var(--lh-h3) var(--font-display);
}
body .pagefind-ui .pagefind-ui__search-input.pagefind-ui__search-input::placeholder { color: var(--ink-secondary); opacity: 1; }
body .pagefind-ui .pagefind-ui__search-input.pagefind-ui__search-input:focus-visible { outline: calc(var(--space-1) / 2) solid var(--focus-ring); outline-offset: calc(var(--space-1) / 2); }
body .pagefind-ui .pagefind-ui__form.pagefind-ui__form::before { background-color: var(--ink-secondary); left: 0; }

/* Clear: a text control in the control ink */
body .pagefind-ui .pagefind-ui__search-clear.pagefind-ui__search-clear {
	height: var(--tap-min);
	padding: 0 0 0 var(--space-4);
	background: var(--paper);
	color: var(--control);
	font: var(--weight-ui) var(--text-ui)/var(--lh-ui) var(--font-ui);
	letter-spacing: var(--track-kicker);
	text-transform: uppercase;
}
body .pagefind-ui .pagefind-ui__search-clear.pagefind-ui__search-clear:hover,
body .pagefind-ui .pagefind-ui__search-clear.pagefind-ui__search-clear:focus-visible { text-decoration: underline; text-decoration-thickness: var(--rule-hair); text-underline-offset: var(--space-1); }

/* the status line with the count ("3 pages") */
body .pagefind-ui .pagefind-ui__message.pagefind-ui__message {
	height: auto;
	padding: var(--space-4) 0 var(--space-2);
	color: var(--ink-secondary);
	font: var(--weight-ui) var(--text-byline)/var(--lh-ui) var(--font-ui);
	font-variant-numeric: tabular-nums;
}

/* results split by screened hairlines, no frames */
body .pagefind-ui .pagefind-ui__results.pagefind-ui__results { margin: 0; padding: 0; }
body .pagefind-ui .pagefind-ui__result.pagefind-ui__result {
	padding: var(--space-4) 0;
	border-top: 0;
	background: var(--rule-screen-s) left top / 100% var(--rule-hair) no-repeat;
}
body .pagefind-ui .pagefind-ui__result.pagefind-ui__result:first-of-type { background: linear-gradient(var(--rule), var(--rule)) left top / 100% var(--rule-section) no-repeat; }
body .pagefind-ui .pagefind-ui__result.pagefind-ui__result:last-of-type { border-bottom: var(--rule-section) solid var(--rule); }
body .pagefind-ui .pagefind-ui__result-thumb.pagefind-ui__result-thumb { display: none; }
body .pagefind-ui .pagefind-ui__result-inner.pagefind-ui__result-inner { margin-top: 0; }
body .pagefind-ui .pagefind-ui__result-title.pagefind-ui__result-title { font: var(--weight-display) var(--text-h3)/var(--lh-h3) var(--font-display); text-wrap: balance; }
body .pagefind-ui .pagefind-ui__result-link.pagefind-ui__result-link { color: var(--ink); text-decoration: none; }
body .pagefind-ui .pagefind-ui__result-link.pagefind-ui__result-link:hover,
body .pagefind-ui .pagefind-ui__result-link.pagefind-ui__result-link:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--control);
	text-decoration-thickness: var(--rule-hair);
	text-underline-offset: var(--space-1);
}
body .pagefind-ui .pagefind-ui__result-excerpt.pagefind-ui__result-excerpt {
	margin-top: var(--space-1);
	color: var(--ink-secondary);
	font: var(--weight-body) var(--text-small)/var(--lh-standfirst) var(--font-body);
}
/* the match in bold, never a highlighter fill */
body .pagefind-ui mark { background: none; color: var(--ink); font-weight: var(--weight-current); }

/* sub-results: indented under a hairline, titles in the body face */
body .pagefind-ui .pagefind-ui__result-nested.pagefind-ui__result-nested { padding-left: var(--space-4); }
body .pagefind-ui .pagefind-ui__result-nested.pagefind-ui__result-nested .pagefind-ui__result-link.pagefind-ui__result-link { font: var(--weight-body) var(--text-body)/var(--lh-body) var(--font-body); }
body .pagefind-ui .pagefind-ui__result-nested.pagefind-ui__result-nested .pagefind-ui__result-link.pagefind-ui__result-link::before { color: var(--ink-secondary); }

/* tags: plain words in the UI face, never chips */
body .pagefind-ui .pagefind-ui__result-tags.pagefind-ui__result-tags { margin-top: var(--space-2); }
body .pagefind-ui .pagefind-ui__result-tag.pagefind-ui__result-tag {
	padding: 0;
	margin-right: var(--space-3);
	background: none;
	border-radius: var(--radius);
	color: var(--ink-secondary);
	font: var(--weight-ui) var(--text-byline)/var(--lh-ui) var(--font-ui);
}

/* Load more results: a text control in the control ink, square, no box */
body .pagefind-ui .pagefind-ui__button.pagefind-ui__button {
	height: var(--tap-min);
	margin-top: var(--space-6);
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: none;
	color: var(--control);
	font: var(--weight-ui) var(--text-ui)/var(--lh-ui) var(--font-ui);
	letter-spacing: var(--track-kicker);
	text-transform: uppercase;
	text-align: left;
}
body .pagefind-ui .pagefind-ui__button.pagefind-ui__button:hover,
body .pagefind-ui .pagefind-ui__button.pagefind-ui__button:focus-visible { text-decoration: underline; text-decoration-thickness: var(--rule-hair); text-underline-offset: var(--space-1); }

/* filters, when the index carries them: kicker-set legends, hairline-split rows */
body .pagefind-ui .pagefind-ui__filter-panel-label.pagefind-ui__filter-panel-label,
body .pagefind-ui .pagefind-ui__filter-name.pagefind-ui__filter-name {
	color: var(--ink);
	font: var(--weight-ui) var(--text-kicker)/var(--lh-ui) var(--font-ui);
	letter-spacing: var(--track-kicker);
	text-transform: uppercase;
}
body .pagefind-ui .pagefind-ui__filter-block.pagefind-ui__filter-block { border-bottom: var(--rule-hair) solid var(--rule-soft); }
body .pagefind-ui .pagefind-ui__filter-checkbox.pagefind-ui__filter-checkbox { border-radius: var(--radius); accent-color: var(--control); }
