:root {
  /* vellum, iron-gall ink, lapis for what is active, gold leaf for what is found */
  --paper: #f5f0e3;
  --panel: #fcf9f1;
  --ink: #201c17;
  --muted: #6a6356;
  --faint: #a39b89;
  --rule: #dfd7c3;
  --accent: #23508f;
  --accent-soft: #e2e9f3;
  --on-accent: #fcf9f1;
  --hit: #f2dd8f;
  --sel: #d5e1f2;
  --gloss: #6b5a37;
  --gloss-fn: #a59d8b;
  /* the reader's highlights: soft, and none of them the gold of a search hit or the blue of the pinned word */
  --hl1: #f6d6db; --hl2: #f8ddc6; --hl3: #d8ead1; --hl4: #c9e9e2; --hl5: #e5dbf4;
  /* what answers, in the English or in the text, to the word pointed at: a shade of the page itself, no colour */
  --echo: #e0dbcd;
  /* The size control sets two things: the original text and the English beside
     it. Glosses and the verse and page markers follow the original in the
     proportion they have at its default of 21px (11px and 10px), and stop
     shrinking where they would become hard to read. */
  --cop-size: 21px;
  --en-size: 15px;
  --gloss-size: max(10px, calc(var(--cop-size) * 11 / 21));
  --mark-size: max(9px, calc(var(--cop-size) * 10 / 21));
  --cop: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  /* the same page by lamplight: blue-black ground, pale lapis, dull gold */
  --paper: #11151d;
  --panel: #171c27;
  --ink: #e7e3d8;
  --muted: #9aa1ad;
  --faint: #626a79;
  --rule: #293040;
  --accent: #8db3ea;
  --accent-soft: #1e2a3f;
  --on-accent: #11151d;
  --hit: #5c4b13;
  --sel: #273b5e;
  --gloss: #c2b48c;
  --gloss-fn: #6c7483;
  --hl1: #5a2c3a; --hl2: #5c3a22; --hl3: #2b4a2f; --hl4: #1d4a47; --hl5: #43356b;
  --echo: #3a372f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 var(--ui);
}
/* original-script text: the font stack follows the script of the open text,
   and inside it of each version read alongside (a Latin block in a Greek book
   goes back to the plain stack). The "Fontes" faces are the fonts Fontes
   carries (css/fonts.css); each stands after the installed fonts that serve
   its script well, except for Hebrew and Slavonic, where it is better than
   what most systems have. */
[data-script] { --cop: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; }
[data-script="Copt"] { --cop: "Antinoou", "Noto Sans Coptic", "Fontes Coptic", "New Athena Unicode", serif; }
[data-script="Grek"] { --cop: "SBL BibLit", "SBL Greek", "Gentium Plus", "New Athena Unicode", "Palatino Linotype", Palatino, "Times New Roman", "Fontes Greek", serif; }
[data-script="Hebr"] { --cop: "SBL BibLit", "SBL Hebrew", "Ezra SIL", "Fontes Hebrew", "Taamey Frank CLM", "Times New Roman", "New Peninim MT", "Arial Hebrew", serif; }
[data-script="Syrc"] { --cop: "Estrangelo Edessa", "Noto Sans Syriac", "Noto Sans Syriac Eastern", "Serto Jerusalem", "Fontes Syriac", serif; }
[data-script="Armn"] { --cop: "Mshtakan", "Noto Serif Armenian", "Noto Sans Armenian", Sylfaen, "Fontes Armenian", serif; }
[data-script="Geor"] { --cop: "Noto Serif Georgian", "Noto Sans Georgian", Sylfaen, "Fontes Georgian", serif; }
[data-script="Goth"] { --cop: "Noto Sans Gothic", "Segoe UI Historic", "Fontes Gothic", serif; }
[data-script="Glag"] { --cop: "Noto Sans Glagolitic", "Segoe UI Historic", "Fontes Glagolitic", serif; }
[data-script="Cyrl"] { --cop: "Monomakh Unicode", "Monomakh", "Fontes Slavonic", "Noto Sans Glagolitic", "Segoe UI Historic", "Fontes Glagolitic", "Times New Roman", serif; }
[data-script="Ethi"] { --cop: "Kefa", "Noto Sans Ethiopic", "Abyssinica SIL", "Nyala", "Ebrima", serif; }
[data-script="Xsux"] { --cop: "Noto Sans Cuneiform", "Segoe UI Historic", "Santakku", "Assurbanipal", "Fontes Cuneiform", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
[data-script="Ugar"] { --cop: "Noto Sans Ugaritic", "Segoe UI Historic", "Fontes Ugaritic", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
.cop, .bo { font-family: var(--cop); }
.cop { unicode-bidi: isolate; }
[hidden] { display: none !important; }
body.home .reader-only, body.home #reader { display: none; }
body:not(.home) #library { display: none; }
button, select, input { font: inherit; color: inherit; }
button {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 4px 9px;
  cursor: pointer;
}
button:hover { border-color: var(--faint); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
select, input[type="search"] {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 5px 8px;
  min-width: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- toolbar ------------------------------------------------------------ */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 8px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; color: inherit; text-decoration: none; }
.brand-mark { font-size: 18px; color: var(--accent); }
.brand-en { font-weight: 600; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav select { max-width: 190px; }
.nav .book { font-weight: 600; color: var(--accent); margin-right: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { position: relative; display: flex; gap: 4px; flex: 1 1 360px; min-width: min(100%, 360px); }
.search > input { flex: 1; min-width: 6em; font-family: var(--cop), var(--ui); }
.search select { flex: 0 0 auto; color: var(--muted); }

/* ---- the builder of a search by grammar: a panel under the search box ---------- */
.gram {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  width: min(560px, 94vw); max-height: min(78vh, 640px); overflow: auto;
  padding: 12px 14px 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.gram[hidden] { display: none; }
.gb-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.gb-head .close { margin-left: auto; border: 0; background: none; font-size: 18px; line-height: 1; padding: 0 2px; color: var(--muted); }
.gb-help { margin: 0 0 10px; padding: 8px 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; color: var(--muted); font-size: 13px; }
.gb-help p { margin: 5px 0; }
.gb-help code, .gq { font-family: var(--cop), var(--ui); color: var(--ink); }
.gb-help code { white-space: nowrap; }
.gb-word { display: grid; gap: 5px; padding: 8px 0 8px 12px; border-left: 2px solid var(--accent-soft); }
.gb-wh { color: var(--muted); }
.gb-cond { display: flex; align-items: center; gap: 6px; }
.gb-cond select { flex: 0 0 8.2em; }
.gb-cond input { flex: 1 1 8em; min-width: 0; padding: 5px 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; font-family: var(--cop), var(--ui); }
.gb-is { color: var(--faint); }
.gb-cond button, .gb-rel button { border: 0; background: none; padding: 0 4px; font-size: 16px; line-height: 1; color: var(--faint); }
.gb-cond button:hover, .gb-rel button:hover { color: var(--accent); }
.gb-word > .link { justify-self: start; }
.gb-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 7px 0 7px 12px; }
.gb-within { color: var(--muted); }
.gb-within input { width: 3.6em; padding: 4px 6px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
.gb-addw { display: block; margin: 8px 0 0 14px; }
.gb-scope { display: grid; gap: 3px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.gb-scope label { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.gb-scope input { accent-color: var(--accent); }
.gb-note { margin: 6px 0 0; color: var(--faint); font-size: 12.5px; }
.gb-err { margin: 8px 0 0; color: var(--accent); }
.gb-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.gb-foot button { padding: 4px 16px; }
.kbd {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px;
  padding: 8px; width: min(420px, 92vw);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.kbd[hidden] { display: none; }
.kbd button { font-family: var(--cop); font-size: 18px; padding: 4px 0; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: auto; }
.tools-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tog { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.tog input { accent-color: var(--accent); }
/* in place of "As written", for a text with three layers: signs, transliteration, normalised */
.layers { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; white-space: nowrap; }
.layers label { position: relative; cursor: pointer; }
.layers input { position: absolute; opacity: 0; pointer-events: none; }
.layers span { display: block; padding: 2px 8px; color: var(--muted); }
.layers label + label span { border-left: 1px solid var(--rule); }
.layers input:checked + span { background: var(--accent-soft); color: var(--ink); }
.layers input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.size { position: relative; display: inline-flex; }
.pop {
  position: absolute; z-index: 20; top: calc(100% + 6px); right: 0;
  display: grid; grid-template-columns: auto 150px 1.6em; gap: 8px 10px; align-items: center;
  padding: 10px 14px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.pop input[type="range"] { width: 100%; margin: 0; accent-color: var(--accent); }
.pop .tog.wide { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--rule); }
/* the Glosses box: which words are glossed, and the reader's own list */
.rd, .voice { align-items: center; gap: 3px; }
#rdBtn, #voiceBtn { padding: 2px 6px; font-size: 12px; line-height: 1.2; color: var(--muted); }
body.reader #rdBtn { color: var(--accent); border-color: var(--accent); }
.rdpop { display: block; width: min(430px, 92vw); white-space: normal; line-height: 1.45; }
.rdpop[hidden] { display: none; }
.rd-row { display: flex; align-items: baseline; gap: 7px; margin: 3px 0; cursor: pointer; }
.rd-row input, .rd-sub input { accent-color: var(--accent); }
.rd-sub { margin: 2px 0 6px 22px; color: var(--muted); }
.rd-sub input { width: 4.6em; padding: 2px 5px; background: var(--paper); border: 1px solid var(--rule); border-radius: 5px; }
.rd-sub select { padding: 2px 4px; }
.rd-stand { margin: 10px 0 6px; padding-top: 9px; border-top: 1px solid var(--rule); }
.rd-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.rd-note kbd, .rv-act kbd { font: 11px var(--ui); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; background: var(--paper); color: var(--muted); }
.rd-warn { margin: 6px 0; color: var(--accent); font-size: 13px; }
.rd-file, .rd-take { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.rd-take { margin-top: 8px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; }
/* the Voices box: who reads each language of the texts that are open */
#voicePop { width: min(380px, 92vw); }
.vc { margin: 0 0 8px; }
.vc .rd-row.only { cursor: default; padding-inline-start: 22px; }
.vc small { color: var(--muted); font-size: 13px; }

/* reader's mode: glosses only where they are needed, the rest set as plain text */
body.reader.inter .m.k .g, body.nofn.inter .m.fn .g { display: none; }
body.reader.inter .w.plain { margin-inline-end: .46em; padding-inline: 0; }
body.reader.inter .w.plain .m { padding: 0; }
body.reader.inter .w.plain .m + .m { border-inline-start: 0; }

/* review of a vocabulary, in the details panel */
.review .rv-ex { margin: 12px 0 4px; font-family: var(--cop); font-size: 19px; line-height: 1.6; }
.review .rv-ex mark { background: var(--hit); color: inherit; border-radius: 3px; padding: 0 2px; }
.review .rv-act { display: flex; gap: 8px; margin-top: 16px; }
.review .rv-act button { padding: 5px 14px; }
.pop output { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

/* ---- workspace ---------------------------------------------------------- */
.work {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 340px;
  min-height: 0;
}
.side, .details { background: var(--panel); min-height: 0; overflow: auto; }
.side { border-right: 1px solid var(--rule); display: flex; flex-direction: column; overflow: hidden; }
.details { border-left: 1px solid var(--rule); padding: 14px 16px 30px; }
.mid { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.text { position: relative; flex: 1 1 0; min-height: 0; overflow: auto; padding: 8px 28px 0; outline: none; }
.text::after { content: ""; display: block; height: 60vh; }

.tabs { display: flex; border-bottom: 1px solid var(--rule); }
.tabs button {
  flex: 1; border: 0; border-radius: 0; background: none; padding: 8px 4px;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.pane { display: none; overflow: auto; min-height: 0; flex: 1; }
.pane.on { display: block; }
#tab-lexicon.on { display: flex; flex-direction: column; overflow: hidden; }

.slist { list-style: none; margin: 0; padding: 4px 0; }
.slist button {
  display: flex; gap: 8px; width: 100%; text-align: left;
  border: 0; border-radius: 0; background: none; padding: 4px 12px;
}
.slist button:hover { background: var(--accent-soft); }
.slist .on button { background: var(--accent-soft); font-weight: 600; }
.slist .num { flex: 0 0 26px; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.slist .ttl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slist .lbl { color: var(--ink); }

.lexbar { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--rule); }
.lexbar input { flex: 1; }
.llist { overflow: auto; flex: 1; }
.lexrange, .lexopts, .lexfoot { align-items: center; padding: 5px 8px; font-size: 13px; color: var(--muted); }
.lexrange select { flex: 1 1 3em; min-width: 0; padding: 3px 4px; }
.lexrange[hidden] { display: none; }
.lexopts #lexsum { margin-left: auto; font-size: 12px; color: var(--faint); }
.lexfoot { border-top: 1px solid var(--rule); border-bottom: 0; justify-content: flex-end; gap: 6px; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.lrow input { margin: 0 10px 0 2px; accent-color: var(--accent); }
.lrow.known .cop, .lrow.known .gl { color: var(--faint); }
.llist button {
  display: grid; grid-template-columns: minmax(70px, auto) 1fr auto; gap: 8px; align-items: baseline;
  width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 3px 12px;
}
.llist button:hover { background: var(--accent-soft); }
.llist .cop { font-size: 17px; }
.llist .gl { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llist .n { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }

.results { padding: 6px 0; }
.results .hint, .results .sum { padding: 6px 12px; color: var(--muted); margin: 0; }
.results .sum b { color: var(--ink); }
.results button.r, .results a.r {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 0;
  background: none; padding: 5px 12px; border-top: 1px solid var(--rule);
  color: inherit; text-decoration: none;
}
.results button.r:hover, .results a.r:hover { background: var(--accent-soft); }
.results .gq { font-size: 15px; }
/* a search by grammar: its hits by section, and through a collection by text */
.bysec { padding: 0 12px 8px; color: var(--muted); }
.bysec summary { cursor: pointer; font-size: 12px; }
.bysec .chips { margin: 5px 0 0; }
.bysec button.chip { padding: 0 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.gt { border-top: 1px solid var(--rule); }
.gt summary { display: flex; align-items: baseline; gap: 8px; padding: 5px 12px; cursor: pointer; list-style: none; }
.gt summary::-webkit-details-marker { display: none; }
.gt summary::before { content: "›"; flex: 0 0 8px; color: var(--faint); }
.gt[open] summary::before { content: "⌄"; }
.gt summary:hover { background: var(--accent-soft); }
.gt summary span { font-weight: 600; }
.gt summary small { color: var(--faint); }
.gt summary b { margin-left: auto; font-weight: 400; font-variant-numeric: tabular-nums; }
.results .ref { color: var(--accent); font-size: 12px; font-variant-numeric: tabular-nums; }
.results .kwic { font-family: var(--cop); font-size: 16px; line-height: 1.5; }
.results .kwic mark { background: var(--hit); color: inherit; border-radius: 3px; padding: 0 2px; }
.results .kg { color: var(--muted); font-size: 12px; }

/* ---- running text ------------------------------------------------------- */
.saying {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 6px;
}
.saying > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.saying h2 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.saying .ttl { color: var(--muted); font-style: italic; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 34px; }
body.en .saying:not(.noen) .cols { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.coptic {
  font-family: var(--cop);
  font-size: var(--cop-size);
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.english { color: var(--muted); font-family: Georgia, "Iowan Old Style", serif; font-size: var(--en-size); line-height: 1.6; }
.english p { margin: 0 0 .6em; }
body:not(.en) .english { display: none; }
/* The English in rows (js/parallel.js, rows): each verse, or each run of verses
   that one piece of the translation renders, begins level with its English. */
.er { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 4px 34px; align-items: start; }
.er + .er { margin-top: calc(var(--cop-size) * 6 / 21); padding-top: calc(var(--cop-size) * 6 / 21); border-top: 1px solid var(--rule); }
.er .english p:last-child { margin-bottom: 0; }
.er.alone .ea { font: italic 12.5px/1.9 var(--ui); color: var(--faint); }   /* English for lines the section does not hold */
.coptic > .w:last-child.hlj { box-shadow: none; }            /* a highlight that goes on into the next row */

.w { cursor: pointer; border-radius: 4px; }
.w + .w { margin-inline-start: .42em; }
.m { border-radius: 3px; }
.m:hover { background: var(--accent-soft); }
.g { display: none; }
.sup { color: var(--faint); }
.punct { color: var(--faint); }
.v {
  font: 600 var(--mark-size) var(--ui); color: var(--accent); vertical-align: super;
  margin-inline: .15em .3em; user-select: none;
}
.english .v { font-size: max(9px, calc(var(--en-size) * 2 / 3)); vertical-align: super; margin-inline: 0 .25em; }
.pg {
  font: var(--gloss-size) var(--ui); color: var(--faint); border: 1px solid var(--rule);
  border-radius: 4px; padding: 0 4px; margin-inline: 0 .5em; vertical-align: middle; user-select: none; white-space: nowrap;
}
body:not(.pages) .pg { display: none; }
/* The reader's marks (js/marks.js). They are classes on words that are there
   already and on a section's heading: colour, and two small signs set outside
   the flow, so that nothing in the text moves when a mark is made. */
.hl1 { --hl: var(--hl1); } .hl2 { --hl: var(--hl2); } .hl3 { --hl: var(--hl3); } .hl4 { --hl: var(--hl4); } .hl5 { --hl: var(--hl5); }
.w.hl { background: var(--hl); }
.w.hlj { box-shadow: var(--hlgap, .68em) 0 0 var(--hl); }                 /* the colour runs on to the next word of the run */
.coptic[dir="rtl"] .w.hlj { box-shadow: calc(-1 * var(--hlgap, .68em)) 0 0 var(--hl); }
body.inter .w.hlj { --hlgap: .8em; }
body.reader.inter .w.plain.hlj { --hlgap: .46em; }
.w.noted, .w.booked, .saying > header.noted, .saying > header.booked { position: relative; }
.w.noted::after, .saying > header.noted::after {                          /* a note: a dot at the far corner */
  content: ""; position: absolute; top: -1px; inset-inline-end: -3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.w.booked::before, .saying > header.booked::before {                      /* a bookmark: a bar at the near edge */
  content: ""; position: absolute; top: 3px; inset-inline-start: -5px;
  width: 3px; height: .85em; border-radius: 1px; background: var(--accent);
}
.saying > header.noted::after { top: 4px; inset-inline-end: auto; inset-inline-start: -12px; }
.saying > header.booked::before { top: 2px; inset-inline-start: -20px; height: 14px; }
.saying > header { cursor: pointer; }
.w.pick { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
/* the English and the text pointing at each other (js/echo.js): a soft shade and a hairline, while the pointer rests */
.m.echo, .ew.echo { background: var(--echo); box-shadow: inset 0 -1px 0 var(--faint); border-radius: 2px; }
.ew.echo { color: var(--ink); }
.ew.echo-at { cursor: pointer; }
.w.hit { background: var(--hit); }
.m.hit { background: var(--hit); }
.w.sel { background: var(--sel); }
.m.selm { box-shadow: inset 0 -2px 0 var(--accent); }

/* interlinear: each word is a row of morpheme columns */
body.inter .coptic { line-height: 1.25; display: flex; flex-wrap: wrap; align-items: flex-start; gap: calc(var(--cop-size) * 12 / 21) 0; }
body.inter .w { display: inline-flex; align-items: flex-start; margin: 0; margin-inline-end: .8em; padding: 1px 2px; }
body.inter .coptic[data-script="Hebr"], body.inter .coptic[data-script="Syrc"] { line-height: 1.5; }
body.inter .w:hover { background: var(--accent-soft); }
body.inter .w.hit { background: var(--hit); }
body.inter .w.sel { background: var(--sel); }
body.inter .m { display: inline-flex; flex-direction: column; align-items: center; padding: 0 1px; }
body.inter .m + .m { border-inline-start: 1px dotted var(--rule); }
body.inter .g {
  display: block; font: var(--gloss-size)/1.25 var(--ui); color: var(--gloss);
  white-space: nowrap; margin-top: 1px;
}
body.inter .m.fn .g { color: var(--gloss-fn); }
body.inter .v, body.inter .pg { align-self: flex-start; margin-top: .35em; }

/* ---- versions read alongside ---------------------------------------------
   One row for each verse. In the row every version has a block of words under
   its own name, in its own script and direction: one above another, or with
   .cols on the text, side by side. */
.versions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 6px 28px; border-bottom: 1px solid var(--rule); color: var(--muted);
}
.versions[hidden] { display: none; }
.versions .tog { margin-left: auto; }
.versions .tog.idle { color: var(--faint); }
.ver {
  display: inline-flex; align-items: center; gap: 2px; white-space: nowrap;
  padding: 2px 10px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--panel); color: var(--ink);
}
.ver.wait { color: var(--faint); font-style: italic; }
.ver button {
  border: 0; background: none; padding: 0 2px; margin: 0 -5px 0 3px;
  color: var(--faint); font-size: 15px; line-height: 1;
}
.ver button:hover { color: var(--accent); }

.pv {
  display: grid; grid-template-columns: max(30px, calc(var(--cop-size) * 1.45)) minmax(0, 1fr); align-items: baseline;
  padding: 9px 0 10px; border-top: 1px solid var(--rule);
}
.phead + .pv, .phead + .pvg > .pv:first-child { border-top: 0; padding-top: 2px; }
.pvn {
  font: 600 max(10px, calc(var(--cop-size) * 12 / 21))/1 var(--ui); color: var(--accent);
  font-variant-numeric: tabular-nums; user-select: none;
}
.pvs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px 26px; align-items: baseline; }
.pc {
  display: grid; grid-template-columns: clamp(84px, calc(var(--cop-size) * 5), 126px) minmax(0, 1fr);
  gap: 0 12px; align-items: baseline;
}
.pc.none { display: none; }
.plab {
  font: clamp(9px, calc(var(--cop-size) * 10 / 21), 12px)/1.35 var(--ui); letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint); user-select: none;
}
/* the gap follows each word, so that a line begun inside a narrow block is not indented */
.par .w + .w { margin-inline-start: 0; }
.par .w { margin-inline-end: .42em; }
.pe .english { line-height: 1.5; }
body:not(.en) .pe { display: none; }
.pv.pen { border-top: 0; padding-top: 0; }                   /* the English of a run of verses, after the last of them */
body:not(.en) .pv.pen { display: none; }
.phead { display: none; }

.text.cols .pvs { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.text.cols .pc { display: block; }
.text.cols .plab { display: none; }
.text.cols .pe { grid-column: 1 / -1; padding-top: 2px; }
.text.cols .phead {
  display: grid; grid-template-columns: max(30px, calc(var(--cop-size) * 1.45)) minmax(0, 1fr);
  position: sticky; top: -8px; z-index: 2; padding: 12px 0 5px;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  font: clamp(9px, calc(var(--cop-size) * 10 / 21), 12px)/1.35 var(--ui); letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}

/* ---- the reader's marks in the details panel and in the lists ------------- */
.sw {
  width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--hl); vertical-align: middle;
}
button.sw:hover, .sw.on { border-color: var(--accent); }
.sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--accent); }
span.sw { display: inline-block; width: 9px; height: 9px; border-color: var(--faint); }
.mk-block { margin: 10px 0 2px; }
.mk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 13px; }
.mk-bar select { padding: 2px 4px; font-size: 13px; }
.mk-sw { display: inline-flex; align-items: center; gap: 5px; }
.mk { margin-top: 8px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.mk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: 12.5px; }
.mk .mk-sw { margin-bottom: 6px; gap: 6px; }
.mk-note, .mk-name {
  display: block; width: 100%; padding: 6px 8px; font: 14px/1.5 var(--ui); color: var(--ink);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; resize: vertical;
}
.mk-warn { margin: 6px 0; color: var(--accent); font-size: 13px; }
.mk-quote { margin: 6px 0 2px; font-family: var(--cop); font-size: 18px; line-height: 1.5; }
.nlist { overflow: auto; flex: 1; }
#tab-notes.on { display: flex; flex-direction: column; overflow: hidden; }
.nlist .mk-warn { padding: 0 12px; }
.nrow .nk { margin-left: 6px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.nrow .nk.lost { color: var(--accent); text-transform: none; letter-spacing: 0; }
.nrow .nt { color: var(--ink); font-size: 13px; }
.nrow .nt p { margin: 2px 0; }
.nrow .kwic { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* ... and for the whole library, on its page */
.mine { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }
.book-card .my, .booklist .my { color: var(--accent); }
.notes-head h2 { margin: 6px 0 2px; font: 600 20px Georgia, "Iowan Old Style", serif; }
.notes-head .sum { margin: 0 0 10px; color: var(--muted); }
.notes-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 18px; }
.notes-tools input { flex: 0 1 280px; }
.notes-tools .chips { margin: 0; }
#libNotes .lg h3 a { color: inherit; text-decoration: none; }
#libNotes a.nrow {
  display: block; padding: 7px 0 8px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none;
}
#libNotes a.nrow:hover { background: var(--accent-soft); }
#libNotes .nrow .ref { color: var(--accent); font-size: 12.5px; font-variant-numeric: tabular-nums; }
#libNotes .nrow .kwic { font-family: var(--cop); font-size: 17px; line-height: 1.5; color: var(--ink); -webkit-line-clamp: 3; }
#libNotes .nrow .nt { font-size: 14px; max-width: 60em; }

/* ---- paradigms (js/paradigm.js): a lemma's attested forms in their places --- */
.pd h3 .pd-tools { margin-left: 10px; letter-spacing: 0; text-transform: none; font-size: 12px; }
.pd-tools .link { margin-left: 8px; }
.pd-tools .link.on { color: var(--ink); text-decoration: none; cursor: default; }
.pd-b { margin: 6px 0 12px; }
.pd-b h4 { margin: 10px 0 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pd-note { margin: 4px 0; color: var(--faint); font-size: 12.5px; }
.pd-t { border-collapse: collapse; margin: 2px 0 8px; }
.pd-t th, .pd-t td { padding: 3px 8px 3px 0; text-align: start; vertical-align: baseline; border-top: 1px solid var(--rule); }
.pd-t thead th { border-top: 0; color: var(--faint); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.pd-t tbody th { color: var(--muted); font-size: 12.5px; font-weight: 400; padding-right: 12px; white-space: nowrap; }
.pd-t td.none { color: var(--rule); }
.pd-t .pd-of th { padding-top: 9px; border-top: 0; color: var(--muted); font-size: 12.5px; }
.pd-t .pd-of + tr th, .pd-t .pd-of + tr td { border-top: 0; }
.pd-l { margin: 2px 0 6px; }
.pd-l dt { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.pd-l dd { margin: 1px 0 0; }
.pf { border: 0; background: none; padding: 0 1px; margin-right: 6px; font-family: var(--cop); font-size: 16px; color: var(--ink); white-space: nowrap; }
.pf:hover { color: var(--accent); }
.pf small { margin-inline-start: 3px; font: 11px var(--ui); color: var(--faint); unicode-bidi: isolate; }
.pd.wide .pd-t tbody th { position: sticky; inset-inline-start: 0; background: var(--panel); }

/* ---- the pane below the text: a paradigm set out in full, or a sentence as a tree */
.dock { flex: 0 1 auto; max-height: 52%; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-top: 1px solid var(--rule); }
.dock[hidden] { display: none; }
.dock > header { display: flex; align-items: baseline; gap: 12px; padding: 6px 14px; border-bottom: 1px solid var(--rule); }
.dock > header small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.dock > header .cop { font-size: 18px; }
#dockTools { display: inline-flex; align-items: center; gap: 6px; }
#dockTools button { padding: 0 8px; }
.dock .close { margin-left: auto; border: 0; background: none; font-size: 18px; line-height: 1; padding: 0 2px; color: var(--muted); }
#dockBody { position: relative; overflow: auto; padding: 8px 14px 12px; min-height: 0; }
.tree-box { overflow-x: auto; padding-bottom: 12px; }
svg.tree { display: block; }
svg.tree .arc path { fill: none; stroke: var(--faint); stroke-width: 1; }
svg.tree .arc .tip { fill: var(--faint); stroke: none; }
svg.tree .al { font: 10px var(--ui); fill: var(--muted); text-anchor: middle; paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
svg.tree .arc.on path { stroke: var(--accent); stroke-width: 1.6; }
svg.tree .arc.on .tip { fill: var(--accent); }
svg.tree .al.on, svg.tree .al.root { fill: var(--accent); font-weight: 600; }
svg.tree .tn { cursor: pointer; }
svg.tree .tn rect { fill: transparent; }
svg.tree .tn:hover rect { fill: var(--accent-soft); }
svg.tree .tn.on rect { fill: var(--sel); }
svg.tree .tn.hd rect { fill: none; stroke: var(--accent); stroke-width: 1; }
svg.tree .tf { font-family: var(--cop); font-size: 17px; fill: var(--ink); text-anchor: middle; }
svg.tree .tg { font: 10px var(--ui); fill: var(--gloss); text-anchor: middle; }
svg.tree .tn.out .tf, svg.tree .tn.out .tg { fill: var(--faint); }
.tree-key { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 8px 0 0; color: var(--muted); font-size: 12px; direction: ltr; }
.tree-key b { color: var(--ink); font-weight: 600; }

/* ---- details panel ------------------------------------------------------ */
.details h3 {
  margin: 18px 0 6px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint);
}
.details .empty { color: var(--muted); }
.details .empty h3 { margin-top: 0; }
.details .empty kbd {
  font: 11px var(--ui); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; background: var(--paper);
}
.dword { font-family: var(--cop); font-size: 30px; line-height: 1.3; overflow-wrap: anywhere; }
.dref { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.dgloss { color: var(--gloss); margin-bottom: 4px; }
table.morphs { width: 100%; border-collapse: collapse; margin-top: 4px; }
table.morphs td { padding: 4px 6px 4px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
table.morphs tr { cursor: pointer; }
table.morphs tr:hover td { background: var(--accent-soft); }
table.morphs tr.on td { background: var(--sel); }
table.morphs .f { font-family: var(--cop); font-size: 18px; white-space: nowrap; padding-left: 6px; }
table.morphs .l { font-family: var(--cop); font-size: 15px; color: var(--muted); white-space: nowrap; }
table.morphs .gl { color: var(--gloss); }
table.morphs .tag { color: var(--faint); font-size: 11px; white-space: nowrap; text-align: right; padding-right: 6px; }
.parse { margin: 0; }
.kv { margin: 3px 0; color: var(--muted); }
.kv b { color: var(--ink); font-weight: 600; }
.kv .cop, .lemma-head .cop { font-size: 17px; color: var(--ink); }
.link { color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); background: none; border: 0; padding: 0; }
.note { margin: 4px 0; padding: 5px 8px; border-left: 3px solid var(--rule); color: var(--muted); font-size: 13px; }
.lemma-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lemma-head .cop { font-size: 24px; }
.lemma-head .cls { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chip {
  font-family: var(--cop); font-size: 15px; border: 1px solid var(--rule); border-radius: 12px;
  padding: 0 8px; background: var(--paper); cursor: pointer;
}
.chip small { font: 11px var(--ui); color: var(--faint); margin-left: 4px; }
.entry { margin: 8px 0; padding: 8px 10px; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; }
.entry .h { font-family: var(--cop); font-size: 18px; }
.entry .p { color: var(--muted); font-size: 12px; margin-left: 6px; }
.entry ol { margin: 4px 0 4px 18px; padding: 0; }
.entry .b { color: var(--faint); font-size: 11.5px; }
.entry .fs { font-family: var(--cop); color: var(--muted); font-size: 14px; }

.instant {
  display: flex; gap: 14px; align-items: baseline; min-height: 34px;
  padding: 6px 14px; background: var(--panel); border-top: 1px solid var(--rule);
  color: var(--muted); white-space: nowrap; overflow: hidden;
}
.instant .cop { font-size: 18px; color: var(--ink); }
.instant .ig { color: var(--gloss); font-weight: 600; }
.instant .ip { overflow: hidden; text-overflow: ellipsis; }

dialog {
  max-width: min(720px, 92vw); border: 1px solid var(--rule); border-radius: 12px;
  background: var(--panel); color: var(--ink); padding: 22px 26px; line-height: 1.55;
}
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog .close { float: right; border: 0; font-size: 20px; background: none; }
dialog h2 { margin-top: 0; }
dialog a { color: var(--accent); }
dialog table { border-collapse: collapse; margin: 6px 0; }
dialog td { padding: 2px 14px 2px 0; vertical-align: top; }
dialog h3 { margin: 22px 0 6px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; }
dl.credit { display: grid; grid-template-columns: minmax(6em, 10.5em) minmax(0, 1fr); gap: 5px 16px; margin: 0; }
dl.credit dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
dl.credit dd { margin: 0; overflow-wrap: anywhere; }
dialog .more { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); }
@media (max-width: 560px) {
  dl.credit { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.credit dt { margin-top: 6px; }
}

@media (max-width: 1100px) {
  .work { grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 42%); }
  .details { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
  .dock { max-height: 64%; }
}
@media (max-width: 720px) {
  .work { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 45%); }
  .side { display: none; }
  .text { padding: 4px 16px 0; }
  .versions { padding: 6px 16px; }
  .pc { grid-template-columns: minmax(0, 1fr); }
  body.en .saying:not(.noen) .cols { grid-template-columns: minmax(0, 1fr); }
  .er { grid-template-columns: minmax(0, 1fr); }
}

/* ---- paging (large texts show one section at a time) --------------------- */
.pager { display: flex; justify-content: space-between; max-width: 1180px; margin: 18px auto 0; }
.hint { color: var(--muted); padding: 12px 0; }
.hint.err { color: var(--accent); }
.muted { color: var(--muted); }
.details .empty .wt { font-size: 20px; font-weight: 600; }
.details .empty .keys span { white-space: nowrap; }
.details .empty .prov { margin-top: 16px; font-size: 12.5px; color: var(--faint); }
.details p { margin: 6px 0; }

/* ---- library shelf ---------------------------------------------------------- */
.library { overflow: auto; padding: 26px 34px 80px; }
.lib-head, .found, #libShelf { max-width: 1180px; margin: 0 auto; }
.lib-head { margin-bottom: 18px; }
.lib-head h1 { margin: 0; font: 600 26px Georgia, "Iowan Old Style", serif; }
.lib-head p { margin: 4px 0 14px; color: var(--muted); }
.lib-search { display: flex; gap: 6px; max-width: 760px; }
.lib-search input { flex: 1; padding: 8px 12px; font: 16px var(--ui), "Thomas Coptic", serif; }
.lib-search button { padding: 4px 16px; }
.lib-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lib-filter input { flex: 0 1 280px; }
.found .back { margin: 0 0 4px; }

/* ---- the day's reading: a small interlinear above the shelf ------------------ */
.daily {
  margin: 0 0 20px; padding: 11px 16px 13px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
}
.daily header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 9px; }
.daily .dyh { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.daily .dyref { font-weight: 600; }
.daily .dyfrom { color: var(--muted); }
.daily .dyact { margin-left: auto; display: inline-flex; gap: 14px; }
.daily .local, .lib-results .local {
  font: 11px var(--ui); color: var(--faint); border: 1px solid var(--rule); border-radius: 10px; padding: 1px 7px;
}
.dtext { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 0; font-family: var(--cop); font-size: 19px; line-height: 1.25; }
.dtext[data-script="Hebr"], .dtext[data-script="Syrc"] { line-height: 1.5; }
.dw { display: inline-flex; align-items: flex-start; margin-inline-end: .7em; }
.dm { display: inline-flex; flex-direction: column; align-items: center; padding: 0 1px; }
.dm + .dm { border-inline-start: 1px dotted var(--rule); }
.dm .g { display: block; font: 11px/1.25 var(--ui); color: var(--gloss); white-space: nowrap; margin-top: 1px; }
.dm[data-w] { cursor: default; border-radius: 3px; }
.dm.on { background: var(--sel); }
.daily .dinfo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-height: 25px;
  margin: 9px 0 0; padding-top: 7px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px;
}
.daily .dinfo .cop { font-size: 17px; color: var(--ink); }
.daily .dinfo .ig { color: var(--gloss); font-weight: 600; }
.daily .dinfo .idle { color: var(--faint); }
.daily .den { margin: 10px 0 0; max-width: 62em; color: var(--muted); font: 14px/1.55 Georgia, "Iowan Old Style", serif; }

/* ---- results of a search of the whole library ----------------------------------
   Drawn on the library page and, from inside a text, in the narrow Results
   tab, so nothing here assumes a width. */
.lib-results .sum { margin: 14px 0 8px; color: var(--muted); }
.lib-results .sum b { color: var(--ink); }
.lib-results .sum.key { margin-top: 0; }
.lib-results .here { color: var(--accent); font-size: 1.2em; font-weight: 600; line-height: 0; vertical-align: -.2em; margin-left: 2px; }
.lg { margin: 0 0 22px; }
.lg h3 {
  margin: 0; padding-bottom: 5px; border-bottom: 1px solid var(--rule);
  font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
}
.lg h3 small { margin-left: 10px; color: var(--faint); letter-spacing: 0; text-transform: none; font-weight: 400; }
.lx { padding: 4px 0 5px; border-bottom: 1px solid var(--rule); }
.lx summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px;
  cursor: pointer; list-style: none; border-radius: 4px;
}
.lx summary::-webkit-details-marker { display: none; }
.lx summary::before { content: "›"; flex: 0 0 8px; color: var(--faint); }
.lx[open] summary::before { content: "⌄"; }
.lx summary:hover .lxh { color: var(--accent); }
.lxh { font-size: 19px; }
.lxc { color: var(--muted); font-size: 12.5px; }
.lxc small, .lxg small, .lxn small { color: var(--faint); font-size: 11.5px; }
.lxg { color: var(--gloss); flex: 1 1 8em; min-width: 0; }
.lxn { margin-left: auto; font-variant-numeric: tabular-nums; }
.lxnote { margin: 4px 0 0 20px; color: var(--muted); }
.lxnote .cop { color: var(--ink); font-size: 16px; }
.lxt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 6px 0 4px 20px; }
.tx {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 1px 9px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel);
  color: inherit; text-decoration: none;
}
.side .tx { background: var(--paper); }
.tx:hover { border-color: var(--accent); }
.tx { max-width: 100%; }
.tx span { max-width: 26em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx small { color: var(--muted); }
.tx b { font-weight: 400; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lib-results .more { margin: 5px 0 0; }
.lg > .more { display: block; margin: 7px 0 0 20px; }
.lg.guess p { margin: 8px 0 4px; max-width: 60em; }
.lg.guess ul { margin: 4px 0; padding-left: 20px; }
.lg.guess li { margin: 3px 0; }
.lg.guess .cop { font-size: 17px; }
.results .lib-results { padding: 0 12px; }
.results .lib-results .sum { padding: 0; }
.lib-filter .chips { margin: 0; }
button.chip { font: 13px var(--ui); padding: 2px 10px; }
button.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.chip.on small { color: inherit; opacity: .8; }
.shelf { max-width: 1180px; margin: 26px auto 0; }
.shelf h2 {
  margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
  font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
}
.shelf h2 small { margin-left: 12px; color: var(--faint); letter-spacing: 0; text-transform: none; font-weight: 400; }
.coll { margin-top: 14px; }
.coll h3 { margin: 0 0 8px; font: italic 15px Georgia, "Iowan Old Style", serif; color: var(--muted); }
.coll h3 small { margin-left: 10px; font: 12px var(--ui); color: var(--faint); }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
/* a long collection, or one of long titles: a plain list in columns */
.booklist { columns: 4 230px; column-gap: 26px; }
.booklist.wide { columns: 2 440px; }
.booklist a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 3px 8px; margin: 0 -8px; border-radius: 5px; break-inside: avoid;
  color: inherit; text-decoration: none;
}
.booklist a:hover { background: var(--accent-soft); }
.booklist .bm { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.book-card {
  display: flex; flex-direction: column; gap: 2px; padding: 9px 12px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 8px;
  color: inherit; text-decoration: none;
}
.book-card:hover { border-color: var(--accent); }
.book-card .bt { font-weight: 600; }
.book-card .bo { font-size: 15px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-card .bm { font-size: 12px; color: var(--faint); }

/* ---- click to speak -------------------------------------------------------- */
button.say {
  font: 13px var(--ui); line-height: 1; padding: 3px 6px; vertical-align: middle;
  border-radius: 12px; background: var(--paper);
}
button.say:hover { border-color: var(--accent); }
.coll h3 .local {
  font: 11px var(--ui); font-style: normal; color: var(--faint);
  border: 1px solid var(--rule); border-radius: 10px; padding: 1px 7px; margin-left: 6px;
}

/* ---- the public site's notice (js/count.js); never shown from a folder ---- */
.tally-note {
  position: fixed; left: 16px; bottom: 16px; z-index: 20;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 9px 10px 9px 14px;
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  font-size: 13px;
}
.tally-note p { margin: 0; }
.tally-note .close { border: 0; background: none; font-size: 18px; line-height: 1; padding: 0 2px; color: var(--muted); }
