.text-search { min-width: 0; max-width: 46rem; }
.text-search h1 { margin-block: .5em; }
@media screen {
  .text-search { font-size: 1.0625rem; overflow-wrap: anywhere; }
  .text-search h1 { font-size: 1.6875rem; }
  .text-search .btn { font-size: 1rem; }
}
@media screen and (min-width: 768px) {
  .text-search { font-size: 1.125rem; }
  .text-search h1 { font-size: 2.0625rem; }
  .reading-large .text-search h1 { font-size: 2.5rem; }
}
.text-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4em 1em; align-items: end; margin-block: 1.5em; }
.text-search-form label, .text-search-form #text-query { grid-column: 1 / -1; }
.text-search-form label { margin-block-start: .5em; font-weight: 700; }
.text-search-form input, .text-search-form select { min-width: 0; width: 100%; min-height: 46px; background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: .55em .75em; font: inherit; }
.text-search-form .text-basic-option { display: flex; align-items: center; gap: .45em; min-height: 44px; width: fit-content; margin-block-start: 0; font-weight: 400; cursor: pointer; }
.text-search-form .text-basic-option input { width: 1.1em; min-height: 0; height: 1.1em; padding: 0; margin: 0; }
.text-search-form button { min-height: 46px; background: var(--act); color: white; }
#text-status, .text-hits { overflow-wrap: anywhere; }
#text-status:not(:empty) { margin-block: 1.25em .5em; }
#text-early summary { width: fit-content; min-height: 44px; padding-block: .55em; cursor: pointer; color: var(--act); }
#text-early ul { margin: 0; padding-inline-start: 1.25em; }
#text-early li { margin-block: .5em; }
#text-early a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .35em; }
#text-early p { margin: 0; }
.text-hits { list-style: none; padding: 0; margin: 0; }
.text-hits > li { border-block-start: 1px solid var(--rule); padding-block: 1rem; }
.text-hits a { display: block; width: fit-content; }
.text-hits h2 { font-size: 1.13rem; margin: 0; line-height: 1.6; }
.text-hits .text-section { font-size: .91rem; }
.text-hits p { margin: .45em 0 0; }
.text-search mark { background: #fff0ad; color: #372c11; }
.text-places { margin-top: .3em; font-size: .92rem; }
.text-places summary { width: fit-content; min-height: 44px; padding-block: .55em; cursor: pointer; color: var(--act); }
.text-places ul { margin: 0; padding: 0; list-style: none; }
.text-places li a { display: flex; align-items: center; min-height: 44px; padding-block: .4em; }
:is(#text-scope, #text-spelling):not([hidden]) { display: block; width: fit-content; min-height: 44px; padding-block: .4em; }
.text-passages { list-style: none; padding: 0; }
.text-places li, .text-passages li { margin-block-start: .7rem; padding-inline-start: .8rem; border-inline-start: 2px solid var(--rule); }
.text-passages a { min-height: 44px; padding-block: .35em; }
#text-more { margin: .4em 0 1em; }
@media screen {
  .reading-large .text-search :is(.text-section, .text-places) { font-size: 1.125rem; }
}
@media (max-width: 440px) {
  .text-search-form { grid-template-columns: minmax(0, 1fr); }
  .text-search-form button { justify-self: start; margin-block-start: .5em; }
}
.text-paper-scope { display: none; }
@media print {
  .text-paper-scope:not(:empty) { display: block; }
  .text-search header > p, .text-hits details:not([open]) { display: none; }
  .text-hits > li { padding-block: 2.5mm; break-inside: avoid; }
  .text-hits h2 { font-size: 12pt; }
  .text-hits p { margin-block: 1mm; }

  .text-hits > li:has(.text-places[open]) { break-inside: auto; }
  .text-places li, .text-places p { break-inside: avoid; }
  .text-places li:has(p + p) { break-inside: auto; }
  .text-places summary, .text-places li a, .text-passages a { min-height: 0; padding: 0; }
  .text-search-form, #text-early, #text-early-notice, #text-more, #text-retry, .text-other-search, #text-scope, #text-spelling { display: none !important; }
}
