/* ---------- The search, edition by edition (owner, 10.11.2026: A "the box"; B "the guide" kept for the visit) ----------
   v3.js "the search, edition by edition"; answers from /search/v4/ (search4.php).
   - Ink: the dark grey the owner gave the door's top-right square (#2B2B2B), not orange (owner, same day); the
     edition's colour only as a swatch, its button, the title chosen, the marks (--ed, set by the shell per edition;
     black at the front door).
   - Nothing floats (owner, same day). The block and the ant's column hang on the vertical axis, half in each square
     (--s4-col, set by the shell). The box stands on the horizontal axis, from the block to the screen's edge. The
     bottom-left square's rows run from the screen's edge to the ant's column, stacked from the axis down. The
     bottom-right's bands and rows run from the ant's column to the edge; the headings of the lists hold to the axis
     as the results scroll. */
#stage { --s4-ink: #2B2B2B; --s4-rule: #d6d3ca; }
#stage.has-s4 { --tr: var(--s4-ink); --bl: #ECEBE6; }
#stage.has-s4 .w-head { display: none !important; }
.s4 { position: absolute; inset: 0; z-index: 3; font: 11px/1.4 Verdana, var(--font); color: #333; }
.s4 a { color: inherit; }
.s4-sw { flex: none; display: inline-block; width: 10px; height: 10px; background: var(--c, #000); }
.s4-sw-all { background: none; box-shadow: inset 0 0 0 1px #fff; }   /* (every edition: an empty swatch) */

/* the top-right square: the word Search with the edition, a line, then the box standing on the axis. The box is a
   field that says it is one (owner, 10.11.2026: "I didn't even see the search field ... the font ... very big"): a
   white field framed inside the band, the lens, the words at reading size, a grey prompt, the caret waiting */
.s4-tr { display: flex; flex-direction: column; justify-content: flex-end; background: var(--s4-ink); color: #fff; }
.s4-head, .s4-lab, .s4-sentence, .s4-hint { padding: 0 24px 0 calc(var(--s4-col, 24px) + 16px); }
.s4-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.s4-big { font: bold 22px/1.1 Verdana, var(--font); letter-spacing: .5px; color: #fff; }
.s4-in { color: rgba(255, 255, 255, .6); font-size: 13px; }
.s4-lab { margin-bottom: 7px; letter-spacing: 1px; color: rgba(255, 255, 255, .7); }
.s4-where { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; font: bold 13px Verdana, var(--font); color: #fff; }
.s4-hint { margin-bottom: 12px; color: rgba(255, 255, 255, .75); }
.s4-hint b, .s4-said b { color: #fff; }
.s4-form { flex: none; display: flex; height: var(--s4-band, 52px); margin-left: var(--s4-col, 24px); padding: 7px 0 5px 8px; box-sizing: border-box; background: #3a3a3a; }
.s4-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #fff; box-shadow: inset 0 0 0 1px #9a9a9a; cursor: text; }
.s4-field:focus-within { box-shadow: inset 0 0 0 2px var(--ed, #000); }
.s4-lens { flex: none; width: 17px; height: 17px; color: #666; }
.s4-field:focus-within .s4-lens { color: var(--ed, #000); }
.s4-q { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 0; outline: none; background: transparent; color: #000; font: 15px/1 Verdana, var(--font); caret-color: var(--ed, #000); }
.s4-q::placeholder { color: #8a8a8a; font-size: 13px; }
.s4-q::-webkit-search-cancel-button { cursor: pointer; }
.s4-go { flex: none; width: 104px; height: 100%; margin: 0 8px 0 0; padding: 0; border: 0; background: var(--ed, #000); color: #fff; font: bold 12px Verdana, var(--font); letter-spacing: 1px; cursor: pointer; }
.s4-go:hover { filter: brightness(1.2); }
/* B: the sentence to complete */
.s4-sentence { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 8px; font: 17px/1.3 Verdana, var(--font); }
.s4-sel { max-width: 100%; padding: 1px 2px; border: 0; border-bottom: 2px solid #fff; border-radius: 0; background: transparent; color: #fff; font: bold 17px/1.3 Verdana, var(--font); cursor: pointer; }
.s4-sel option { color: #000; }
.s4-sel:disabled { border-bottom-color: transparent; cursor: default; opacity: 1; }

/* the bottom-left square: bands and rows from the screen's edge to the ant's column, stacked from the axis */
.s4-bl { overflow-y: auto; scrollbar-width: thin; background: #ECEBE6; }
.s4-side { margin-right: var(--s4-col, 24px); padding-bottom: 24px; }
.s4-band { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px; box-sizing: border-box; background: var(--s4-ink); color: #fff; font: bold 12px/1.25 Verdana, var(--font); }
.s4-bt { min-width: 0; }
.s4-band .s4-tot { margin-left: auto; font-size: 14px; font-weight: normal; }
.s4-band-sub { min-height: 28px; margin-top: 18px; background: #dcd9d0; color: #333; font-size: 11px; }
.s4-band-sub + .s4-band-sub { margin-top: 0; }
.s4-title { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; height: 28px; padding: 0 12px; border-bottom: 1px solid var(--s4-rule); color: #222; font-size: 12px; text-decoration: none; }
.s4-title .s4-d { font-weight: bold; color: var(--ed, #000); }
.s4-title .s4-n { color: #555; }
a.s4-title:hover { background: #fff; }
.s4-title.on { background: #fff; box-shadow: inset 4px 0 0 var(--ed, #000); font-weight: bold; }
.s4-title.none { color: #aaa; }
.s4-title.none .s4-d { color: #bbb; }
.s4-all { color: #555; }
.s4-comp .s4-d { color: #999; }
.s4-comp em { font-style: normal; font-size: 10px; color: #999; }
.s4-year { background: #fff; box-shadow: inset 4px 0 0 var(--ed, #000); font-weight: bold; }
.s4-ed { display: grid; grid-template-columns: 4px 1fr auto; align-items: center; gap: 0 10px; height: 26px; padding: 0 12px 0 0; border-bottom: 1px solid var(--s4-rule); color: #222; text-decoration: none; }
.s4-ed i { width: 4px; height: 100%; background: var(--c, #000); }
.s4-ed .s4-n { color: #555; }
.s4-ed:hover { background: #fff; }
.s4-door i { background: none; box-shadow: inset 1px 0 0 #000, inset -1px 0 0 #000; }
.s4-note { margin: 0; padding: 7px 12px; border-bottom: 1px solid var(--s4-rule); color: #888; }
.s4-line { color: #333; line-height: 1.8; }
.s4-line a.on { color: var(--ed, #000); font-weight: bold; }
.s4-route { display: block; padding: 6px 12px 6px 10px; border-bottom: 1px solid var(--s4-rule); box-shadow: inset 4px 0 0 var(--c, var(--s4-ink)); color: #000; font-size: 12px; text-decoration: none; }
.s4-route:hover { background: #fff; }
.s4-route .s4-mute { color: #888; }
.s4-route .s4-k-there { display: block; margin-top: 1px; font-size: 10px; color: var(--c, #888); }

/* the bottom-right square: what was understood, then the results, in bands and rows from the ant's column */
.s4-br { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: thin; padding: 0 0 30px var(--s4-col, 24px); background: #fff; font: 11px/1.45 Verdana, var(--font); color: #333; }
.s4-wait, .s4-none { margin: 0; padding: 12px 24px 12px 16px; border-bottom: 1px solid #eee; color: #888; }
.s4-none a, .s4-tries a { color: var(--ed, #000) !important; }
.s4-card { padding: 12px 24px 12px 16px; border-bottom: 1px solid #e2dfd6; background: #F3F2EE; }
.s4-card > * { max-width: 46em; }
.s4-card .s4-k { color: #888; letter-spacing: 1px; }
.s4-ct { margin: 1px 0 3px; font-size: 18px; color: #000; }
.s4-ctext { margin: 0 0 6px; color: #555; }
.s4-card ul { margin: 6px 0 0; padding: 0; list-style: none; }
.s4-card li { margin: 2px 0; }
.s4-card li a { color: #000; }
.s4-card li a.there { color: var(--c, #000); }
.s4-there { color: #888; }
.s4-html h3, .s4-html .card-kind { display: none; }
.s4-html ul { margin: 4px 0 0; padding-left: 16px; }
.s4-gh { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 32px; margin: 0; padding: 0 24px 0 16px; border-bottom: 2px solid var(--c, #000);
  background: #fff; font: bold 13px/1 Verdana, var(--font); color: #000; }
.s4-gh i { width: 10px; height: 10px; background: var(--c, #000); }
.s4-gh .s4-d { color: var(--c, #000); }
.s4-gh .s4-n { margin-left: auto; font-weight: normal; color: #888; }
.s4-it { padding: 8px 24px 9px 16px; border-bottom: 1px solid #eee; }
.s4-it > * { max-width: 52em; }
.s4-tt { font-size: 13px; color: #000 !important; text-decoration: none; }
.s4-tt:hover { text-decoration: underline; text-decoration-color: var(--ed, #000); }
.s4-meta { color: #888; }
.s4-x { margin: 2px 0 0; color: #444; }
.s4-x mark { background: color-mix(in srgb, var(--ed, #000) 14%, #fff); color: inherit; }
.s4-more { display: block; padding: 7px 24px 7px 16px; border-bottom: 1px solid #eee; color: var(--ed, #000) !important; text-decoration: none; }
.s4-more:hover { background: #F3F2EE; }
button.s4-next { width: 100%; border: 0; border-bottom: 1px solid #eee; background: #FAFAF8; font: 11px Verdana, var(--font); text-align: left; cursor: pointer; }
button.s4-next:disabled { color: #888 !important; cursor: default; }
.s4-also { margin: 0; padding: 9px 24px 9px 16px; border-bottom: 1px solid #e2dfd6; background: #F3F2EE; color: #888; }
.s4-also a { color: var(--c, #000); }

/* while the words are typed, the answer before stays, paler, until the new one comes */
.s4-br.is-busy > * { opacity: .5; transition: opacity .15s; }
/* the empty search: what the edition holds */
.s4-intro { padding: 12px 24px 12px 16px; border-bottom: 1px solid #eee; font-size: 13px; line-height: 1.6; color: #333; }
.s4-intro p { margin: 0 0 4px; max-width: 52em; }
.s4-intro .s4-tries { margin: 0; font-size: 11px; color: #888; }
.s4-browse { display: flex; align-items: baseline; gap: 10px; padding: 12px 24px 10px 16px; border-bottom: 1px solid #eee; font: bold 16px Verdana, var(--font); color: #000; }
.s4-browse span { font: 11px Verdana, var(--font); color: #888; }
/* the years: bars from the ant's column to the edge */
.s4-strip { padding: 10px 24px 6px 16px; border-bottom: 1px solid #eee; }
.s4-strip-h { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #888; }
.s4-strip-h a { color: var(--ed, #000) !important; font-weight: bold; text-decoration: none; }
.s4-bars { display: flex; align-items: flex-end; gap: 1px; height: 64px; }
.s4-bar { position: relative; flex: 1 1 0; min-width: 1px; height: 100%; display: flex; align-items: flex-end; }
.s4-bar i { display: block; width: 100%; height: var(--h); background: #b9b6ad; }
a.s4-bar:hover i { background: var(--ed, #000); }
.s4-bar.on i { background: var(--ed, #000); }
.s4-bar.none i { height: 1px; background: #e4e2dc; }
/* a year far above the others is cut near its top: the scale stops at twice the next one (its number in its title) */
.s4-bar.over i { -webkit-mask: linear-gradient(#000 0 4px, transparent 4px 7px, #000 7px); mask: linear-gradient(#000 0 4px, transparent 4px 7px, #000 7px); }
/* at the front door, an edition whose records the one above already showed */
.s4-same { margin: 0; padding: 9px 24px 9px 16px; border-bottom: 1px solid #eee; color: #888; }
.s4-ylabels { position: relative; height: 16px; margin-top: 3px; font-size: 10px; color: #888; }
.s4-ylabels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.s4-ylabels span:first-child { transform: none; }
/* narrowing: the places and names of these results */
.s4-narrow { padding: 8px 24px 8px 16px; border-bottom: 1px solid #eee; background: #FAFAF8; }
.s4-narrow-h { margin-bottom: 4px; color: #888; letter-spacing: 1px; }
.s4-narrow-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 3px 0; }
.s4-narrow-row .s4-k { width: 56px; flex: none; color: #888; }
.s4-chip { padding: 2px 7px; border: 1px solid #d8d6cf; background: #fff; color: #222 !important; text-decoration: none; }
.s4-chip sup { margin-left: 3px; font-size: 9px; color: #999; }
.s4-chip:hover { border-color: var(--ed, #000); }
/* the places, people, groups (and words) the edition holds, each as large as it is frequent (Volume 2's keywords did so) */
.s4-clouds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-bottom: 1px solid #eee; }
.s4-cloud { border-right: 1px solid #eee; }
.s4-ch { display: flex; justify-content: space-between; padding: 7px 16px; border-bottom: 1px solid #eee; background: #F3F2EE; font-weight: bold; color: #333; }
.s4-ch span { font-weight: normal; color: #999; }
.s4-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 16px 14px; line-height: 1.25; }
.s4-w { color: #333 !important; text-decoration: none; }
.s4-w:hover { color: var(--ed, #000) !important; text-decoration: underline; }
.s4-w0 { font-size: 11px; color: #777 !important; }
.s4-w1 { font-size: 12px; }
.s4-w2 { font-size: 14px; }
.s4-w3 { font-size: 17px; }
.s4-w4 { font-size: 21px; color: #000 !important; }

/* phones: the box and the side in the page, above the results; no column to keep clear */
@media (max-width: 699px) {
  #stage { --s4-col: 0px !important; }
  .s4, .s4-br { position: static; }
  .s4-tr { padding-top: 14px; }
  .s4-head, .s4-lab, .s4-sentence, .s4-hint { padding: 0 16px; }
  .s4-form { height: 52px; margin: 0; padding: 7px 0 5px 8px; }
  .s4-q { font-size: 16px; }
  .s4-bars { height: 48px; }
  .s4-side { margin: 0; padding-bottom: 0; }
  .s4-br { padding: 0 0 30px; }
  /* the box and the side come into the page on a phone: their squares stay empty, so they close, and the page runs
     down the screen in one scroll, not in a box of 70vh with a band and a black block around it (10.11.2026) */
  #stage:is(.s4-a, .s4-b) :is(.sq-tr, .sq-bl) { display: none; }
  #stage:is(.s4-a, .s4-b) .sq-br { flex: 1 0 auto; min-height: 0; }
  #stage:is(.s4-a, .s4-b) :is(.viewer, .frame-box) { height: auto; }
  #stage:is(.s4-a, .s4-b) .frame-box > .wall { position: static; overflow: visible; height: auto; }
  .s4-bl { overflow: visible; height: auto; max-height: none; }
}
