/* lexicons area: hover section in the Analysis tab, Lexicon Browser, Strong's window, AGNT / UserLex tabs, Tov-Polak window.
   Tokens come from app.css; nothing here sets a colour of its own. */

/* ------------------------------------------------------------------ text inside lexicon entries */
.lx-text { font-family: var(--text-latin); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.lx-text p { margin: 0 0 .5em; }
.lx-text .g, .lx-hw.greek, .lx-lemma .greek { font-family: var(--text-greek); font-size: 1.07em; }
.lx-text .h, .lx-hw.hebrew, .lx-lemma .hebrew { font-family: var(--text-hebrew); font-size: 1.3em; }
.lx-text .h { unicode-bidi: isolate; }
.lx-text .tr { font-style: normal; font-feature-settings: "kern"; }
.lx-text a.bwref { color: var(--ref); cursor: pointer; text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.lx-text a.bwlex { color: var(--link); cursor: pointer; text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.lx-text a:hover { background: var(--sel-bg); }
.lx-text a.bwref.cur { background: var(--hit-bg); color: var(--hit-ink); border-radius: 3px; }
.lx-text mark, .lx-snip mark { background: var(--hit-bg); color: var(--hit-ink); border-radius: 2px; padding: 0 1px; }
.lx-text pre.strongs { font: 13.5px/1.5 var(--mono); white-space: pre-wrap; margin: 0; }
.lx-text pre.strongs .g { font-family: var(--text-greek); font-size: 1.2em; }
.lx-text pre.strongs .h { font-family: var(--text-hebrew); font-size: 1.35em; }
.lx-text .mh-head { font-size: 1.05em; }
.lx-gloss { font-style: italic; }

/* ------------------------------------------------------------------ Analysis tab section */
.lx-sec { margin-top: 2px; }
.lx-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.lx-bar h3 { margin: 0; flex: 1; }
.lx-bar .btn { height: 22px; padding: 0 8px; font-size: var(--fs-small); }
.lx-part { margin: 0 0 12px; }
.lx-part + .lx-part { border-top: 1px solid var(--line); padding-top: 10px; }
.lx-lemmaline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }
.lx-lemmaline .lemma { font-weight: 650; color: var(--lemma); }
.lx-lemmaline .lemma.greek { font-family: var(--text-greek); font-size: var(--fs-greek); }
.lx-lemmaline .lemma.hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); }
.lx-lemmaline .code { font: 12px var(--mono); color: var(--code); }
.lx-str { color: var(--strongs); font-size: var(--fs-small); font-weight: 600; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; background: var(--panel); }
.lx-str:hover { border-color: var(--strongs); }
.lx-lex { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 6px; background: var(--bg); }
.lx-lexhead { display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0; background: var(--panel); padding: 5px 8px;
  text-align: left; cursor: pointer; border-radius: 8px; font-weight: 600; font-size: var(--fs-small); color: var(--ink-2); }
summary.lx-lexhead { list-style: none; }
summary.lx-lexhead::-webkit-details-marker { display: none; }
summary.lx-lexhead::before { content: "▸"; flex: none; width: 10px; color: var(--ink-3); transition: transform 120ms var(--ease); }
.lx-lex[open] > summary.lx-lexhead::before { transform: rotate(90deg); }
.lx-lex[open] > .lx-lexhead { border-radius: 8px 8px 0 0; border-bottom: 1px solid var(--line); }
.lx-lexhead:hover { background: var(--panel-2); }
.lx-lexhead .lx-caret { width: 10px; flex: none; color: var(--ink-3); }
.lx-lexhead .lx-name { flex: none; }
.lx-lexhead .lx-hw { font-weight: 500; color: var(--ink); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-lexhead .lx-n { margin-left: auto; font-weight: 400; color: var(--ink-3); flex: none; }
.lx-entry { padding: 6px 10px; border-top: 1px solid var(--line); }
.lx-entry:first-of-type { border-top: 0; }
.lx-entry-head { display: flex; gap: 8px; align-items: baseline; color: var(--ink-3); font-size: var(--fs-small); margin-bottom: 2px; }
.lx-entry-head .lx-hw { color: var(--ink); font-size: 14px; }
.lx-snip { color: var(--ink-2); font-family: var(--text-latin); font-size: 14px; cursor: pointer; }
.lx-snip:hover { color: var(--ink); }
.lx-acts { display: flex; gap: 12px; margin-top: 4px; font-size: var(--fs-small); }
.lx-acts a, .lx-acts button { color: var(--ref); cursor: pointer; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; }
.lx-acts a:hover, .lx-acts button:hover { text-decoration: underline; }
.lx-empty { color: var(--ink-3); font-size: var(--fs-small); }
.lx-notes { margin-top: 8px; }
.lx-notes summary { cursor: pointer; font-weight: 600; font-size: var(--fs-small); color: var(--ink-2); padding: 4px 0; }
.lx-notes .lx-text { padding: 0 2px 6px; }

/* chooser dialog */
.lx-choose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lx-choose h4 { margin: 0 0 6px; font-size: var(--fs-small); color: var(--ink-2); }
.lx-choose ol { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.lx-choose li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.lx-choose li:last-child { border-bottom: 0; }
.lx-choose li label { flex: 1; display: flex; gap: 6px; align-items: center; cursor: pointer; }
.lx-choose li .btn { height: 22px; width: 24px; padding: 0; }
.lx-choose:has(> div:only-child) { grid-template-columns: minmax(0, 1fr); min-width: 340px; }
.lx-choose .lx-chooser-list { max-height: 330px; overflow: auto; }
.lx-choose .lx-chooser-list li { cursor: default; user-select: none; }
.lx-choose .lx-chooser-list li .lx-mark { width: 14px; color: var(--link); font-weight: 700; }
.lx-choose .lx-chooser-list li:not(.on) { color: var(--ink-3); }
.lx-choose .lx-chooser-list li.sel { background: var(--sel-bg); color: var(--ink); }
.lx-choose .lx-chooser-btns { display: flex; gap: 6px; margin-top: 6px; }
.lx-choose .lx-chooser-btns .btn { width: auto; height: 26px; padding: 0 14px; }
.lx-opts { margin-top: 12px; display: grid; gap: 6px; }

/* ------------------------------------------------------------------ scripture popup */
.lx-pop { position: fixed; z-index: var(--z-popover); max-width: 380px; padding: 8px 10px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px oklch(0 0 0 / 0.2); font-size: 13px; line-height: 1.5; pointer-events: none; }
.lx-pop b { color: var(--ref); }
.lx-pop .greek { font-family: var(--text-greek); font-size: var(--fs-greek); }
.lx-pop .hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); direction: rtl; display: block; }
.lx-pop .lx-pop-h { font-weight: 650; margin-bottom: 2px; }
.lx-pop pre { margin: 4px 0 0; white-space: pre-wrap; font: 12.5px/1.45 var(--mono); }

/* ------------------------------------------------------------------ Lexicon Browser window */
.lxb { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-height: 0; background: var(--bg); }
.lxb-menu { display: flex; gap: 2px; padding: 2px 6px; background: var(--panel); border-bottom: 1px solid var(--line); }
.lxb-menu button { background: none; border: 0; padding: 3px 9px; border-radius: 4px; cursor: default; }
.lxb-menu button:hover, .lxb-menu button[aria-expanded="true"] { background: var(--panel-2); }
.lxb-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.lxb-bar .lxb-find { flex: 1; min-width: 140px; }
.lxb-bar .lxb-title { font-weight: 650; max-width: 36%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.lxb-main { display: grid; grid-template-columns: var(--lxb-list, 220px) 5px minmax(0, 1fr); min-height: 0; }
.lxb-left { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border-right: 1px solid var(--line); }
.lxb-left select { margin: 6px; width: calc(100% - 12px); }
.lxb-split { background: var(--line); cursor: col-resize; }
.lxb-split:hover { background: var(--focus); }
.lxb-list { overflow: auto; position: relative; contain: strict; outline: none; }
.lxb-list:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lxb-rows { position: relative; }
.lxb-row { position: absolute; left: 0; right: 0; height: 24px; line-height: 24px; padding: 0 10px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer; font-family: var(--text-latin); font-size: 15px; }
.lxb-row.greek { font-family: var(--text-greek); font-size: var(--fs-greek); }
.lxb-row.hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); direction: rtl; text-align: right; }
.lxb-row:hover { background: var(--panel-2); }
.lxb-row[aria-selected="true"] { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.lxb-count { padding: 3px 8px; font-size: var(--fs-small); color: var(--ink-3); border-top: 1px solid var(--line); }
.lxb-right { overflow: auto; min-height: 0; padding: 12px 16px 40px; }
.lxb-right iframe { width: 100%; height: 100%; border: 0; background: var(--bg); }
.lxb-entry-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.lxb-entry-head .lx-hw { font-size: 20px; }
.lxb-entry-head .lx-no { color: var(--ink-3); font-size: var(--fs-small); margin-left: auto; }
.lxb-nav { display: flex; gap: 4px; }
.lxb-nav .btn { height: 24px; width: 28px; padding: 0; }
.lxb-status { padding: 3px 10px; font-size: var(--fs-small); color: var(--ink-3); border-top: 1px solid var(--line); background: var(--panel); }
.lxb-hits { padding: 0; margin: 0; list-style: none; }
.lxb-search { padding: 8px 12px; display: grid; gap: 2px; align-content: start; overflow: auto; height: 100%; }
.lxb-search-btns { gap: 6px; }
mark.lxb-hit { background: var(--hit-bg); color: var(--hit-ink); border-radius: 2px; }
.lxb-hits li { padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lxb-hits li:hover { background: var(--panel); }
.lxb-hits .lx-hw { font-weight: 650; margin-right: 8px; }
.lxb-hits .lx-mod { color: var(--ink-3); font-size: var(--fs-small); }
.lxb-welcome { color: var(--ink-2); line-height: 1.6; max-width: 56ch; }
.lxb-ln { margin-top: 10px; padding: 6px 10px; background: var(--panel); border-radius: 6px; font-size: var(--fs-small); color: var(--ink-2); }

/* dropdown menus inside tool windows (same look as the main menus) */
.lx-menu { position: fixed; min-width: 220px; max-height: 70vh; overflow: auto; padding: 4px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.22); z-index: var(--z-popover);
  animation: pop-in 140ms var(--ease); }
.lx-menu button { display: flex; width: 100%; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 5px 10px 5px 26px;
  border-radius: 5px; position: relative; white-space: nowrap; cursor: default; }
.lx-menu button:hover, .lx-menu button:focus-visible { background: var(--sel-strong); color: #fff; outline: none; }
.lx-menu button.checked::before { content: "✓"; position: absolute; left: 9px; }
.lx-menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.lx-menu .grp { padding: 4px 10px; font-size: var(--fs-small); color: var(--ink-3); font-weight: 650; }

/* ------------------------------------------------------------------ Strong's / Thayer / BDB window */
.lxs { display: grid; grid-template-columns: 150px minmax(0, 1fr); height: 100%; min-height: 0; }
.lxs-side { padding: 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-height: 0; background: var(--panel); }
.lxs-num { display: flex; gap: 4px; align-items: center; }
.lxs-num input { width: 72px; font-family: var(--mono); }
.lxs-num .btn { width: 26px; padding: 0; }
.lxs-tools { display: flex; gap: 4px; }
.lxs-tools .btn { flex: 1; padding: 0 4px; font-size: var(--fs-small); }
.lxs-hist { flex: 1; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); min-height: 60px; }
.lxs-hist button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 3px 8px; cursor: pointer; font-size: var(--fs-small); }
.lxs-hist button:hover { background: var(--panel-2); }
.lxs-main { overflow: auto; padding: 10px 14px 30px; min-height: 0; }
.lxs-title { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.lxs-title .lx-hw { font-size: 24px; }
.lxs-title .lx-no { color: var(--strongs); font-weight: 650; }
.lxs-langs { margin-left: auto; }
.lxs-defs h3 { font-size: var(--fs-small); color: var(--ink-2); margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.lxs-defs h3 a { color: var(--ref); cursor: pointer; font-weight: 400; margin-left: 8px; }

/* ------------------------------------------------------------------ AGNT / UserLex tabs */
.agnt-grid { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-bottom: 10px; align-items: flex-start; }
.agnt-col { display: flex; flex-direction: column; align-items: flex-start; padding: 2px 4px; border-radius: 6px; min-width: 2.5em; }
.agnt-col:hover { background: var(--panel); }
.agnt-col > span { cursor: pointer; line-height: 1.35; white-space: nowrap; }
.agnt-col .tw { font-family: var(--text-greek); font-size: var(--fs-greek); font-weight: 600; }
.agnt-col .tg { font: 11.5px var(--mono); color: var(--code); }
.agnt-col .lg { font-family: var(--text-greek); font-size: 14px; color: var(--lemma); }
.agnt-col .erg { font-size: 12.5px; color: var(--ink-2); }
.agnt-col .tgnt { font-size: 12.5px; color: var(--strongs); }
.agnt-col > span.dash { color: var(--ink-3); }
.agnt-col .tw.phr { color: var(--link); }                       /* a form that is part of a Greek phrase (blue, whichever lines are on) */
.agnt-col .gkphr { font-family: var(--text-greek); font-size: 14px; color: var(--link); }
.agnt-col .perg, .agnt-col .plerg { font-size: 12.5px; color: var(--ink-2); }
.agnt-col .plerg { font-style: italic; }
.agnt-col .ann { font-size: 11.5px; color: var(--ink-2); }
.agnt-col .ann .ann-item { padding: 0 2px; border-radius: 3px; }
.agnt-col .ann .ann-item:hover, .agnt-col .ann .ann-item:focus { background: var(--sel-bg); outline: none; }
.agnt-col .ann .ref { color: var(--code); font-family: var(--mono); }
.agnt-doc-h { margin-bottom: 4px; }
.agnt-doc-b p { margin: 0 0 6px; }
.agnt-tagdesc .agnt-english { color: var(--ink); margin: 2px 0 8px; }
.agnt-phrase > div { margin-bottom: 3px; }
.agnt-detail { border-top: 1px solid var(--line); padding-top: 8px; }
.agnt-opts { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; font-size: var(--fs-small); color: var(--ink-2); }
.agnt-opts label { display: inline-flex; gap: 4px; align-items: center; }
.ul-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; height: 100%; }
.ul-wrap textarea { width: 100%; min-height: 220px; resize: vertical; font: 15px/1.5 var(--text-latin); padding: 8px; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--bg); color: var(--ink); }
.ul-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ul-head .lemma { font-size: 20px; }
.ul-state { margin-left: auto; color: var(--ink-3); font-size: var(--fs-small); }

/* ------------------------------------------------------------------ maintenance dialogs */
.lxm-list { border: 1px solid var(--line); border-radius: 6px; max-height: 46vh; overflow: auto; }
.lxm-list table { width: 100%; border-collapse: collapse; }
.lxm-list th, .lxm-list td { padding: 3px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.lxm-list tr.sel td { background: var(--sel-bg); }
.lxm-list tr { cursor: pointer; }
.lxm-list .greek, .lxm-list .hebrew { font-family: var(--text-greek); font-size: var(--fs-greek); }
.lxm-list .hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); direction: rtl; }
.lxm-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.lxm-row label { min-width: 110px; color: var(--ink-2); }
.lxm-row input.ctl { width: 110px; font-family: var(--mono); }
.lxm-note { color: var(--ink-3); font-size: var(--fs-small); margin-top: 6px; }

/* ------------------------------------------------------------------ Parallel Hebrew - LXX (Tov-Polak) */
.tov { display: grid; grid-template-rows: auto var(--tov-texts, 120px) 7px minmax(0, 1fr) 7px var(--tov-lexes, 150px); height: 100%; min-height: 0; --tov-bar: oklch(0.88 0.15 95); }
:root[data-theme="dark"] .tov, .tov-dark { --tov-bar: oklch(0.62 0.12 95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tov { --tov-bar: oklch(0.62 0.12 95); } }
.tov-split { background: var(--tov-bar); cursor: row-resize; border-top: 1px solid oklch(0.7 0.12 90 / 0.6); border-bottom: 1px solid oklch(0.7 0.12 90 / 0.6); touch-action: none; }
.tov-split:hover, .tov-split:focus-visible { filter: brightness(0.94); outline: 2px solid var(--sel-strong); outline-offset: -2px; }
.tov-copy { display: inline-flex; }
.tov-copy .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tov-copyarrow { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; padding: 0 6px; }
.tov-qbox { min-height: 28px; padding: 4px 8px; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; line-height: 1.5; }
.tov-qbox:focus { outline: 2px solid var(--sel-strong); outline-offset: -1px; }
.tov-qbox[data-mode="hebrew"] { direction: rtl; text-align: right; }
.tov-qbox[data-mode="hebrew"]::before, .tov-qbox[data-mode="greek"]::before { content: attr(data-mode); float: left; font: 10px var(--mono); color: var(--ink-3); margin-right: 6px; text-transform: uppercase; }
.tov-wild { font-family: var(--mono); font-weight: 700; padding: 0 1px; border-radius: 3px; }
.tov-wild.he { color: oklch(0.5 0.2 262); background: oklch(0.93 0.04 262); }
.tov-wild.gr { color: oklch(0.52 0.22 25); background: oklch(0.94 0.04 25); }
:root[data-theme="dark"] .tov-wild.he { color: oklch(0.8 0.12 262); background: oklch(0.34 0.08 262); }
:root[data-theme="dark"] .tov-wild.gr { color: oklch(0.82 0.12 25); background: oklch(0.36 0.08 25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tov-wild.he { color: oklch(0.8 0.12 262); background: oklch(0.34 0.08 262); } :root:not([data-theme="light"]) .tov-wild.gr { color: oklch(0.82 0.12 25); background: oklch(0.36 0.08 25); } }
.tov-hit.sel { background: var(--sel-bg); }
.tov-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tov-bar .ctl.ref { width: 130px; }
.tov-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 0; overflow: auto; }
.tov-texts > div { padding: 6px 10px; }
.tov-texts .hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); direction: rtl; text-align: right; line-height: 1.6; border-right: 1px solid var(--line); }
.tov-texts .greek { font-family: var(--text-greek); font-size: var(--fs-greek); line-height: 1.6; }
.tov-grid { overflow: auto; min-height: 0; }
.tov-grid table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tov-grid th { position: sticky; top: 0; background: var(--panel); text-align: left; font-size: var(--fs-small); color: var(--ink-2); padding: 4px 8px; border-bottom: 1px solid var(--line-strong); }
.tov-grid td { padding: 3px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tov-grid td.ref { color: var(--ref); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tov-grid td.he { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); direction: rtl; text-align: right; }
.tov-grid td.gr { font-family: var(--text-greek); font-size: var(--fs-greek); }
.tov-grid td.an { font: 12px var(--mono); color: var(--code); }
.tov-grid tr.sel td { background: var(--sel-bg); }
.tov-grid tr:hover td { background: var(--panel); }
.tov-note { color: var(--err-ink); cursor: help; }

.tov-lexes > div { font-size: 14px; }
.tov-lexes > div { overflow: auto; min-height: 0; }
.tov-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.tov-tabs { display: flex; gap: 2px; padding: 4px 6px 0; border-bottom: 1px solid var(--line); background: var(--panel); }
.tov-tabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 4px 10px; border-radius: 6px 6px 0 0; cursor: pointer; color: var(--ink-2); }
.tov-tabs button:hover { background: var(--panel-2); }
.tov-tabs button.active { background: var(--bg); border-color: var(--line); color: var(--ink); font-weight: 600; margin-bottom: -1px; }
.tov-lexes .lx-entry-head { margin-top: 4px; }
.tov-note { color: var(--err-ink); cursor: help; border-bottom: 1px dotted currentColor; }
.tov-grid tr { cursor: pointer; }
.tov-grid td.he sup.code, .tov-grid td.gr sup.code { font: 10px var(--mono); color: var(--code); margin-left: 1px; }
.tov-grid td.ref sup { color: var(--ink-3); margin-left: 2px; }
.tov-search { padding: 8px 10px; display: grid; gap: 4px; align-content: start; }
.tov-qrow { display: grid; grid-template-columns: 190px 90px minmax(0, 1fr); gap: 6px; align-items: center; margin: 2px 0; }
.tov-qlab { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.tov-q.he { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); }
.tov-q.gr { font-family: var(--text-greek); font-size: var(--fs-greek); }
.tov-results { border: 1px solid var(--line); border-radius: 6px; max-height: 280px; overflow: auto; }
.tov-results:empty { display: none; }
.tov-hit { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; padding: 3px 10px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: baseline; }
.tov-hit:hover { background: var(--panel); }
.tov-hit .n { color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.tov-hit .he { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); }
.tov-hit .gr { font-family: var(--text-greek); font-size: var(--fs-greek); }
.tov-hit .cls { color: var(--ink-3); font-size: var(--fs-small); }
.lx-ref { color: var(--ref); font-family: var(--ui); font-size: 12px; }

.lxm { display: grid; grid-template-columns: 190px minmax(0, 1fr); height: 100%; min-height: 0; }
.lxm-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--panel); border-right: 1px solid var(--line); }
.lxm-nav button { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.lxm-nav button:hover { background: var(--panel-2); }
.lxm-nav button.active { background: var(--sel-bg); color: var(--ink); font-weight: 600; }
.lxm-body { padding: 10px 14px; overflow: auto; min-height: 0; }
.lxm-list { max-height: 60vh; }
.lxm-list td { vertical-align: middle; }
.lxm-list .hebrew { font-family: var(--text-hebrew); font-size: var(--fs-hebrew); }
.lxm-list code { font: 12px var(--mono); color: var(--code); }

.lxmorph { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.lxmorph-main { display: grid; grid-template-columns: minmax(150px, 22%) minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
.lxmorph-main > * { overflow: auto; border-right: 1px solid var(--line); min-height: 0; }
.lxmorph-main .lxb-row[aria-selected="true"] { background: var(--sel-bg); }
.lxmorph-main .lxb-row { padding: 2px 10px; height: auto; cursor: pointer; }
.lxcodes { padding: 8px 14px; }
.lxcodes h4 { margin: 14px 0 4px; font-size: 13px; color: var(--ink); }
.lxcodes th { width: 120px; }

/* word gloss line in the Word Tip (gloss.js) */
.ws-tip .lx-gloss { margin: 3px 0 5px; padding-top: 3px; border-top: 1px solid var(--line); font: 12.5px/1.4 var(--ui); color: var(--ink); max-width: 340px; }
.lx-gloss-row + .lx-gloss-row { margin-top: 2px; }
.lx-gloss-text { font-style: italic; }
.lx-gloss-lemma { font-size: 14px; }
.lx-gloss-src, .lx-gloss-freq { color: var(--ink-2); font-size: 11px; }

/* the BibleWorks Link Editor (maint.js) */
.lxl { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 10px 12px; box-sizing: border-box; }
.lxl-bar, .lxl-edit-row, .lxl-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lxl-pager { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.lxl-rows { flex: 1; min-height: 120px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); font-size: 13px; }
.lxl-head, .lxl-row { display: grid; grid-template-columns: 70px 1fr 70px 1fr; gap: 8px; align-items: baseline; padding: 3px 8px; }
.lxl-head { position: sticky; top: 0; background: var(--panel-2, var(--panel)); font-weight: 600; font-size: 11px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.lxl-row { cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.lxl-row:hover { background: var(--hit-bg, rgba(120, 120, 120, .1)); }
.lxl-row.sel { background: var(--sel-bg, rgba(60, 120, 220, .18)); }
.lxl-row.edited .num:nth-child(3) { color: var(--ref); }
.lxl-row.pend { font-style: italic; }
.lxl-row.pend .num:nth-child(3) { color: var(--ref); font-weight: 600; }
.lxl-row .hebrew { font-size: 17px; }
.lxl-row .num { font-family: var(--mono); }
.lxl-preview { min-width: 80px; font-size: 18px; }
.lxl-buttons { justify-content: flex-end; }
.lxl-edit { display: grid; gap: 10px; min-width: 300px; }
.lxl-edit label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }

/* Manuscripts area: Mss tab, Leningradensis tab, CNTTS, transcription and tagging tools */

:root {
  --ms-label: oklch(0.90 0.09 158);
  --ms-label-ink: oklch(0.28 0.06 158);
  --ms-label-line: oklch(0.62 0.10 158);
  --ms-tab: oklch(0.62 0.20 28);
  --ms-region: oklch(0.82 0.16 85 / 0.22);
  --ms-region-line: oklch(0.72 0.17 78 / 0.75);
  --ms-var: oklch(0.94 0.10 98);
  --ms-word: oklch(0.80 0.14 250 / 0.38);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ms-label: oklch(0.34 0.07 158); --ms-label-ink: oklch(0.92 0.05 158); --ms-label-line: oklch(0.55 0.10 158);
    --ms-var: oklch(0.36 0.06 98);
  }
}
:root[data-theme="dark"] { --ms-label: oklch(0.34 0.07 158); --ms-label-ink: oklch(0.92 0.05 158); --ms-label-line: oklch(0.55 0.10 158); --ms-var: oklch(0.36 0.06 98); }

.grow { flex: 1; }

/* ---------------------------------------------------------------- Mss tab */
.mss { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mss-bar, .len-bar { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; padding: 5px 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mss-verse, .len-verse { width: 92px; font-variant-numeric: tabular-nums; }
.mss-ms { min-width: 0; max-width: 100%; flex: 1 1 130px; }
.mss-spin { display: inline-flex; flex-direction: column; }
.mss-spin .btn { padding: 0 5px; font-size: 7px; line-height: 10px; height: 12px; min-width: 20px; }
.mss-spin.coll { box-shadow: inset 0 -2px 0 oklch(0.7 0.14 85); }
.mss-spin.img { box-shadow: inset 0 -2px 0 oklch(0.65 0.12 158); }
.mss-spin.both { box-shadow: inset 0 -2px 0 var(--sel-strong); }

.mss-coll { overflow: auto; flex: none; background: var(--bg); font-family: var(--text-greek); font-size: 15px; }
.mss-coll.popup { height: 100%; }
.mss-coll table.coll { border-collapse: collapse; white-space: nowrap; }
.mss-coll td.w { padding: 2px 7px; border-bottom: 1px solid color-mix(in oklch, var(--line) 50%, transparent); }
.mss-coll td.w.var { background: var(--ms-var); }
.mss-coll td.w.om { color: var(--ink-3); text-align: center; }
.mss-coll td.w.hl { outline: 2px solid var(--sel-strong); outline-offset: -2px; background: var(--ms-word); }
.mss-coll th.lab { text-align: left; font-weight: 400; padding: 2px 8px 2px 6px; background: var(--panel); border-bottom: 1px solid var(--line); font-family: var(--text-latin); font-size: 14px; color: var(--ink); vertical-align: top; }
.mss-coll table.freeze th.lab { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.mss-coll .ver { cursor: pointer; margin-right: 6px; }
.mss-coll .ver:hover { color: var(--ref); text-decoration: underline; }
.mss-coll .heb { font-family: var(--text-hebrew); font-size: 1.15em; }
.mss-coll .coll-absent { font: 11px var(--ui); color: var(--ink-3); padding: 3px 8px; position: sticky; left: 0; }
.mk { font-style: normal; }
.mk.lc, .mk.lm, .mk.lw, .mk.lw2 { color: var(--ink-3); }
.mk.ro, .mk.rc { color: var(--ink-2); }
.mk.ep, .mk.ee { color: var(--ref); }
.mk.dg { color: var(--code); }

.mss-split { height: 5px; flex: none; cursor: row-resize; background: var(--panel-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mss-split:hover, .mss-split:focus-visible { background: var(--sel-bg); }
.mss-img { position: relative; flex: 1 1 140px; min-height: 100px; display: flex; }
.mss-img .pv { flex: 1; }
.mss-imgnote { position: absolute; left: 6px; bottom: 6px; right: 6px; font: 11.5px var(--ui); padding: 3px 8px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-ink); pointer-events: none; z-index: 3; }
.mss-notes { overflow: auto; flex: none; padding: 6px 10px 10px; background: var(--bg); font: 13px/1.5 var(--ui); }
.mss-notes .notes-head { font-weight: 650; margin-bottom: 4px; }
.mss-notes .note { margin: 0 0 8px; }
.mss-notes .note + .note { border-top: 1px dashed var(--line); padding-top: 6px; }
.mss-notes .gk, .imo .gk, .note .gk { font-family: var(--text-greek); font-size: 1.08em; }
.mss-notes img.note-pic { display: block; max-width: 100%; height: auto; margin: 4px 0; border: 1px solid var(--line); border-radius: 3px; image-rendering: auto; }

/* ---------------------------------------------------------------- page viewer */
.pv { position: relative; overflow: hidden; background: #17171a; min-height: 90px; cursor: grab; outline-offset: -2px; touch-action: none; user-select: none; }
.pv.grab { cursor: grabbing; }
.pv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-overlay { position: absolute; inset: 0; pointer-events: none; }
.pv-regions, .pv-labels { position: absolute; inset: 0; overflow: hidden; }
.pv-region { position: absolute; left: 0; top: 0; background: var(--ms-region); border: 1px solid var(--ms-region-line); border-radius: 2px; pointer-events: none; }
.pv-marker { position: absolute; left: 0; top: 0; background: var(--ms-word); outline: 2px solid var(--sel-strong); border-radius: 2px; pointer-events: none; mix-blend-mode: normal; }
.pv-label { position: absolute; left: 0; top: 0; margin: -9px 0 0 -2px; display: flex; align-items: stretch; height: 18px; font: 600 11px/18px var(--ui); background: var(--ms-label); color: var(--ms-label-ink);
  border: 1px solid var(--ms-label-line); border-radius: 3px; pointer-events: auto; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px #0005; }
.pv-label .tab { width: 9px; background: var(--ms-label-line); border-radius: 2px 0 0 2px; }
.pv-label.current .tab { background: var(--ms-tab); }
.pv-label.current { outline: 2px solid var(--ms-tab); z-index: 2; }
.pv-label .txt { padding: 0 6px 0 5px; }
.pv-label.pseudo { opacity: 0.8; font-style: italic; }
.pv.blank .pv-label { visibility: hidden; }
.pv.blank .pv-label .tab { visibility: visible; }
.pv-status { position: absolute; right: 6px; bottom: 4px; font: 600 10.5px var(--ui); color: #fff9; pointer-events: none; text-shadow: 0 1px 2px #000; }
.pv.loading::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--sel-strong), transparent); animation: pv-load 1s infinite linear; }
@keyframes pv-load { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .pv.loading::after { animation: none; } }
.pv-tip { position: absolute; z-index: 5; max-width: 340px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; box-shadow: 0 6px 20px #0006; font: 13px/1.45 var(--ui); pointer-events: none; }
.pv-tip .h { font-family: var(--text-hebrew); font-size: 20px; direction: rtl; text-align: right; line-height: 1.6; }
.pv-tip .e { margin-top: 3px; }
.pv-tip .r { color: var(--ref); font-weight: 600; margin-bottom: 2px; }
.pv:focus-visible { outline: 2px solid var(--focus); }

/* ---------------------------------------------------------------- Leningrad tab */
.len { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.len .pv { flex: 1; }
.len-bar .grow { flex: 1; }
.len-note { font: 11.5px var(--ui); color: var(--ink-3); padding: 2px 8px; }
.len-browser { display: flex; height: 100%; min-height: 0; }
.len-browser .list { width: 210px; overflow: auto; border-right: 1px solid var(--line); background: var(--panel); font: 12px var(--ui); }
.len-browser .list button { display: block; width: 100%; text-align: left; padding: 3px 8px; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.len-browser .list button:hover { background: var(--panel-2); }
.len-browser .list button[aria-current="true"] { background: var(--sel-bg); font-weight: 600; }
.len-browser .pv { flex: 1; }

/* ---------------------------------------------------------------- image settings window */
.imo-wrap { display: flex; flex-direction: column; height: 100%; }
.imo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; overflow: auto; flex: 1; font: 12.5px var(--ui); }
.imo fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px 8px; margin: 0 0 8px; }
.imo legend { padding: 0 4px; color: var(--ink-2); font-weight: 600; }
.imo-right { display: flex; flex-direction: column; }
.imo-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 6px; margin: 2px 0; }
.imo-row input[type=range] { width: 100%; }
.imo-val { font-variant-numeric: tabular-nums; color: var(--ink-3); text-align: right; font-size: 11px; }
.imo-check { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.imo-check.nested { margin-left: 18px; }
.imo-foot { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); }

/* ---------------------------------------------------------------- collation options */
.cop { display: grid; grid-template-columns: 1fr 200px; gap: 14px; width: min(640px, 80vw); }
.cop-h { font-weight: 600; margin-bottom: 4px; }
.cop-list { height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; }
.cop-item { display: grid; grid-template-columns: 20px 54px 70px 1fr; gap: 6px; padding: 2px 6px; align-items: center; font: 12.5px var(--ui); }
.cop-item:hover { background: var(--panel-2); }
.cop-item[hidden] { display: none; }
.cop-id { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.cop-name { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cop-btns { display: flex; gap: 6px; }
.cop-right { display: flex; flex-direction: column; gap: 4px; padding-top: 26px; }
.cop .heb { font-family: var(--text-hebrew); }

/* ---------------------------------------------------------------- CNTTS */
.cn { padding: 8px 10px 14px; font: 13px/1.5 var(--ui); }
.cn-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.cn-head .ref { color: var(--ref); font-weight: 650; font-size: 14px; }
.cn-sum { margin: 4px 0 8px; }
.cn-sum b { font-weight: 650; }
.cn-sum a, .cn a.u { color: var(--ref); cursor: pointer; text-decoration: none; }
.cn-sum a:hover, .cn a.u:hover { text-decoration: underline; }
.cn-verse { font-family: var(--text-greek); font-size: 16px; line-height: 1.55; margin: 6px 0 10px; padding: 6px 8px; background: var(--panel); border-radius: 6px; }
.cn-verse mark { background: transparent; color: inherit; border-bottom: 2px solid var(--hit-bg); }
.cn-verse mark.on { background: var(--hit-bg); border-radius: 2px; }
.cn-unit { border-top: 1px solid var(--line); padding: 5px 0; }
.cn-unit.flash { animation: cn-flash 1.4s; }
@keyframes cn-flash { from { background: var(--hit-bg); } to { background: transparent; } }
.cn-uh { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cn-uid { color: var(--ink-3); font-size: 11.5px; }
.cn-ut { font: 600 11px var(--mono); padding: 0 4px; border-radius: 3px; background: var(--panel-2); color: var(--ink-2); cursor: help; }
.cn-ut.S { background: oklch(0.92 0.08 85); } .cn-ut.I { background: oklch(0.92 0.02 250); } .cn-ut.Z { background: oklch(0.92 0.06 25); } .cn-ut.L { background: oklch(0.92 0.05 160); }
.cn-base { font-family: var(--text-greek); font-size: 16px; color: var(--ink); }
.cn-rdg { display: grid; grid-template-columns: 34px 1fr; gap: 0 6px; margin: 2px 0 2px 14px; }
.cn-no { text-align: right; color: var(--code); font: 600 12px var(--mono); cursor: help; }
.cn-rt { font-family: var(--text-greek); font-size: 16px; color: oklch(0.38 0.14 262); }
.cn-rt .rtp { font: 600 10px var(--mono); color: var(--ink-3); margin-right: 6px; cursor: help; }
.cn-rt .mt { font: 600 10px var(--mono); color: var(--code); margin-left: 6px; cursor: help; }
.cn-wit { grid-column: 2; font-size: 12.5px; color: var(--ink-2); font-family: var(--text-greek); }
.cn-wit .ms { cursor: pointer; padding: 0 1px; border-radius: 2px; }
.cn-wit .ms:hover, .cn-wit .ms.on { background: var(--sel-bg); color: var(--ref); }
.cn-wit sup { font-size: 0.72em; }
.cn-wit .heb, .cn-base .heb, .cn-rt .heb { font-family: var(--text-hebrew); }
.cn-exp { font: 600 11px var(--mono); color: var(--ref); cursor: pointer; border: 0; background: none; padding: 0 3px; }
.cn-mx { margin: 4px 0 6px 40px; border-collapse: collapse; font-size: 12px; }
.cn-mx th, .cn-mx td { border: 1px solid var(--line); padding: 2px 6px; vertical-align: top; text-align: left; }
.cn-mx th { background: var(--panel); font-weight: 600; cursor: help; }
.cn-mx td { max-width: 180px; font-family: var(--text-greek); }
.cn-note { font-size: 11.5px; color: var(--ink-3); margin: 3px 0; }
.cn-det { font: 12px/1.45 var(--ui); padding: 6px 8px; border-top: 1px solid var(--line); background: var(--panel); min-height: 3.1em; color: var(--ink); }
.cnsw { display: flex; flex-direction: column; height: 100%; min-height: 0; font: 12.5px var(--ui); }
.cnsw-top { display: grid; grid-template-columns: 1fr 112px; gap: 4px 12px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.cnsw-fields { display: grid; grid-template-columns: 70px 1fr; gap: 4px 8px; align-items: center; }
.cnsw-btns { display: flex; flex-direction: column; gap: 5px; }
.cnsw-btns .btn { width: 100%; }
.cnsw-nav { display: flex; gap: 3px; align-items: center; margin-top: 2px; }
.cnsw-nav .btn { padding: 1px 8px; }
.cnsw-disp { flex: 1; overflow: auto; padding: 4px 8px; background: var(--bg); min-height: 80px; }
.cnsw-disp .vh { font-weight: 650; color: var(--ink); margin: 8px 0 1px; }
.cnsw-disp .ln { padding: 1px 4px; border-radius: 3px; }
.cnsw-disp .ln.hit { background: oklch(0.9 0.1 150 / 0.55); }
.cnsw-disp .ln.cur { outline: 2px solid var(--sel-strong); }
.cnsw-ms { position: relative; }
.cnsw-mslist { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; max-height: 220px; overflow: auto; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 8px 24px #0005; }
.cnsw-mslist label { display: grid; grid-template-columns: 20px 1fr auto; padding: 1px 6px; gap: 6px; font-family: var(--text-greek); }
.cnsw-mslist label:hover { background: var(--panel-2); }
.cnsw-mslist .n { color: var(--ink-3); font: 11px var(--mono); }
.cnsw-sel { display: flex; flex-wrap: wrap; gap: 3px; min-height: 22px; align-items: center; padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg); font-family: var(--text-greek); cursor: pointer; }
.cnsw-sel .tag { background: var(--sel-bg); border-radius: 3px; padding: 0 4px; }
.cnsw-sel .ph { color: var(--ink-3); font-family: var(--ui); }

/* ---------------------------------------------------------------- tagging / transcription tools */
.tt { display: flex; flex-direction: column; height: 100%; min-height: 0; font: 12.5px var(--ui); }
.tt-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.tt-menu { display: flex; gap: 2px; padding: 2px 6px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.tt-menu .btn { border: 0; background: none; padding: 2px 8px; }
.tt-menu .btn:hover { background: var(--sel-bg); }
.tt-pane { overflow: auto; flex: 1; min-height: 40px; padding: 6px 8px; background: var(--bg); }
.tt-pane + .tt-pane { border-top: 3px double var(--line-strong); }
.tt-pane h4 { margin: 0 0 4px; font: 650 11.5px var(--ui); color: var(--ink-2); text-transform: none; }
.tt-words { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: flex-start; }
.tt-w { display: flex; flex-direction: column; align-items: flex-start; min-width: 36px; padding: 1px 4px; border-radius: 4px; border: 1px solid transparent; }
.tt-w .f { font-family: var(--text-greek); font-size: 17px; }
.tt-w .l { font-family: var(--text-greek); font-size: 13px; color: var(--lemma); cursor: text; }
.tt-w .c { font: 11.5px var(--mono); color: var(--code); cursor: text; }
.tt-w.diff { background: oklch(0.9 0.07 22); border-color: oklch(0.75 0.12 22 / 0.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tt-w.diff { background: oklch(0.38 0.09 22); } }
:root[data-theme="dark"] .tt-w.diff { background: oklch(0.38 0.09 22); }
.tt-w.edited .l, .tt-w.edited .c { background: var(--panel-2); border-radius: 3px; }
.tt-w.untag .c { color: var(--err-ink); }
.tt-w.found { box-shadow: 0 0 0 2px var(--sel-strong); }
.tt-vl { font: 600 11px var(--ui); color: var(--label); margin: 6px 0 2px; }
.tt-edit { font: inherit; width: 14ch; padding: 0 2px; }
.tt-layer { margin: 0 0 8px; }
.tt-layer .mark { color: var(--code); font-weight: 700; margin-right: 4px; }
.tt-text { font-family: var(--text-greek); font-size: 17px; line-height: 1.6; }
.tt-area { width: 100%; min-height: 60px; font-family: var(--text-greek); font-size: 17px; }
.tt-table { border-collapse: collapse; width: 100%; }
.tt-table th, .tt-table td { padding: 2px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.tt-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tt-table td.g { font-family: var(--text-greek); font-size: 15px; }
.tt-chars { display: flex; gap: 3px; flex-wrap: wrap; padding: 4px 0; }
.tt-chars .btn { font-family: var(--text-greek); font-size: 15px; padding: 1px 7px; }
.unported-note { font: 12px var(--ui); color: var(--ink-3); padding: 6px 10px; }

/* transcription window: differences against the base text */
.tt-text { font-size: var(--tt-fs, 17px); }
.tt .tt-area { font-size: var(--tt-fs, 17px); }
.tt .df, .tt .dw { background: oklch(0.87 0.14 150 / 0.7); border-radius: 2px; padding: 0 1px; }
.tt-text .layer { margin: 1px 0; }
.tt-text .layer .mark { color: var(--code); font-weight: 700; margin-right: 5px; }

/* collation in the wrapped layout (Load in HTML Viewer) and the collation window's verse box */
.cw { display: flex; flex-direction: column; height: 100%; }
.cw-title { margin: 0 4px; }
.cw-body { flex: 1; overflow: auto; padding: 8px 12px; background: var(--bg); font-family: var(--text-greek); font-size: 15px; }
.cw-line { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.cw-col { display: flex; flex-direction: column; flex: none; }
.cw-cell { padding: 1px 4px; line-height: 1.55; white-space: nowrap; border-bottom: 1px solid color-mix(in oklch, var(--line) 50%, transparent); }
.cw-cell.yellow { background: var(--ms-var); }
.cw-cell.om { color: var(--ink-3); text-align: center; }
.cw-lab { font-family: var(--text-latin); font-size: 14px; background: var(--panel); position: sticky; left: 0; }
.cw-probe { position: fixed; left: -9999px; top: 0; display: flex; visibility: hidden; font-family: var(--text-greek); font-size: 15px; }
.cw-body .heb { font-family: var(--text-hebrew); font-size: 1.15em; }
.toolwin .tt-bar .mss-verse { width: 110px; }

/* New Tagging Project / Compile / BWT Extraction windows */
.tnp { font: 12.5px var(--ui); display: flex; flex-direction: column; gap: 8px; }
.tnp-ids { display: flex; gap: 18px; flex-wrap: wrap; }
.tnp-ids label { display: flex; flex-direction: column; gap: 2px; font-weight: 600; color: var(--ink-2); }
.tnp fieldset { margin: 0; }
.tnp-panel { margin: 2px 0 8px 22px; display: flex; flex-direction: column; gap: 6px; }
.tnp-panel[hidden] { display: none; }
.tnp-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 8px; }
.tt-err { color: var(--err-ink); min-height: 1.3em; font-size: 12px; }
.tt-log { font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.tt-sum { margin: 4px 0 8px 18px; padding: 0; font-size: 12.5px; }
.cop-item.moving { outline: 2px solid var(--sel-strong); background: var(--sel-bg); }
.mslabels-ta { width: min(720px, 86vw); height: 300px; font: 12px/1.5 var(--mono); white-space: pre; tab-size: 12; }

/* Transcription images: selection (SHIFT-drag), the yellow placeholder arrow, the notes pane */
.pv-sel-layer { position: absolute; inset: 0; overflow: hidden; }
.pv-select { position: absolute; left: 0; top: 0; border: 2px dashed #ffe600; background: #ffe60026; box-shadow: 0 0 0 1px #000a; pointer-events: none; }
.pv.selecting { cursor: crosshair; }
.pv-arrow { position: absolute; left: 0; top: 0; width: 40px; height: 56px; color: var(--tr-marker, #ffe600); pointer-events: none; filter: drop-shadow(0 1px 2px #0008); }
.pv-arrow[hidden] { display: none; }
.tr-blink .pv-arrow { animation: tr-blink 1s steps(2, start) infinite; }
@keyframes tr-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .tr-blink .pv-arrow { animation: none; } }
.tt-area.bwk { font-family: "BWGrkL", var(--text-greek); }
.tt-chars .btn.bwg { font-family: "BWGrkL", var(--text-greek); font-size: 17px; line-height: 1; }
.tt-chars .btn[disabled] { opacity: 0.4; }
.tt-chars .sep { width: 1px; background: var(--line-strong); margin: 2px 3px; }
.tt-chars .fmt-b { font-weight: 800; } .tt-chars .fmt-i { font-style: italic; } .tt-chars .fmt-u { text-decoration: underline; }

.tt-notes { min-height: 54px; max-height: 16em; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--bg); font: 14px/1.5 var(--ui); outline: none; overflow: auto; white-space: pre-wrap; }
.tt-notes:focus { box-shadow: 0 0 0 2px var(--sel-strong); }
.tt-notes .gk { font-family: "BWGrkL", var(--text-greek); font-size: 1.2em; }
.tt-notes .heb { font-family: var(--text-hebrew); font-size: 1.2em; }
.tt-notes .en { font-family: var(--ui); }
.tt-notes img { max-width: 100%; height: auto; vertical-align: middle; }
.tt .dw, .tt .df { background: var(--tt-diff, oklch(0.87 0.14 150 / 0.7)); }
.tr-list button .alias-edit { font: inherit; width: 100%; }

.tnp-fs { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 0; }
.tnp-fs legend { font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.tnp-row.wide { grid-template-columns: auto 1fr; }

/* BibleWorks Maps: map window, Overlays window, Find place, Quick Maps, Atlas gallery. Tokens come from app.css. */

.maps-toolwin .toolwin-body, .maps-aux .toolwin-body { overflow: hidden; }

.maps-win { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-height: 0; background: var(--panel); }
.maps-menubar { display: flex; gap: 0; padding: 0 4px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.mp-top { height: 26px; padding: 0 10px; border: 0; background: none; color: var(--ink); cursor: default; font-size: var(--fs-ui); }
.mp-top:hover, .mp-top:focus-visible { background: var(--sel-bg); outline: none; }
.maps-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 3px 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mt-btn { width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: var(--r); background: none; cursor: pointer; display: grid; place-items: center; }
.mt-btn:hover:not(:disabled) { background: var(--panel-2); border-color: var(--line-strong); }
.mt-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.mt-btn.on { background: var(--sel-bg); border-color: var(--sel-strong); }
.mt-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mt-btn img { image-rendering: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mt-btn img { filter: invert(0.88) hue-rotate(180deg); } }
:root[data-theme="dark"] .mt-btn img { filter: invert(0.88) hue-rotate(180deg); }
.mt-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }
.mt-zoom { width: 150px; accent-color: var(--sel-strong); }

.maps-stage { position: relative; min-height: 0; background: #fff; overflow: hidden; }
.maps-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.maps-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.maps-status { display: flex; gap: 18px; align-items: center; height: 24px; padding: 0 10px; border-top: 1px solid var(--line); background: var(--panel-2);
  font: 11.5px/1 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.maps-status .ms-m { flex: 1; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.maps-status .ms-r { margin-left: auto; }
.maps-inset-box { position: absolute; right: 10px; bottom: 10px; border: 2px solid #fff; box-shadow: 0 2px 10px oklch(0 0 0 / 0.45); border-radius: 3px; background: #fff; z-index: 3; }
.maps-inset-box[hidden] { display: none; }
.maps-inset-grip { height: 14px; background: oklch(0.32 0.02 250); color: #fff; font: 600 9px/14px var(--mono); letter-spacing: 0.08em; padding: 0 5px; cursor: move; user-select: none; text-transform: uppercase; touch-action: none; }
.maps-inset { display: block; cursor: crosshair; }
.maps-tip { position: absolute; z-index: 3; max-width: 340px; pointer-events: none; background: oklch(0.99 0.01 95 / 0.97); color: #111; border: 1px solid #555;
  border-radius: 4px; padding: 6px 9px; font-size: 12px; line-height: 1.35; box-shadow: 0 4px 14px oklch(0 0 0 / 0.3); }

.site-info .si-title { font-weight: 700; }
.site-info .si-at { color: #444; font-size: 11px; }
.site-info .si-row { margin-top: 2px; }
.site-info .si-ind { margin-left: 14px; }
.site-info .si-ov { margin-top: 4px; color: #555; font-style: italic; }
.maps-toolwin .li-win .site-info, .li-win .site-info { color: var(--ink); }
.li-win { padding: 10px 12px; overflow: auto; height: 100%; font-size: 12.5px; }
.li-empty { color: var(--ink-3); }

/* popup menus */
.mp-pop { position: fixed; z-index: 100000; min-width: 190px; padding: 4px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px;
  box-shadow: 0 12px 34px oklch(0 0 0 / 0.28); font-size: var(--fs-ui); }
.mp-item { position: relative; display: flex; gap: 18px; align-items: center; width: 100%; text-align: left; padding: 5px 12px 5px 24px; border: 0; background: none; border-radius: 5px; color: inherit; cursor: default; }
.mp-item:hover, .mp-item:focus-visible { background: var(--sel-strong); color: #fff; outline: none; }
.mp-item.checked::before { content: "✓"; position: absolute; left: 7px; }
.mp-item.disabled { color: var(--ink-3); cursor: not-allowed; }
.mp-item.disabled:hover { background: none; color: var(--ink-3); }
.mp-text { flex: 1; }
.mp-kbd, .mp-sub { color: var(--ink-3); font-size: var(--fs-small); }
.mp-item:hover .mp-kbd, .mp-item:hover .mp-sub { color: #fffc; }
.mp-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.mp-head { padding: 4px 12px; font-weight: 700; color: var(--ink-2); font-size: var(--fs-small); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Overlays / Stacking order */
.ov-win { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; background: var(--bg); }
.ov-transparent { opacity: 0.45; transition: opacity 0.15s; }
.ov-transparent:hover { opacity: 1; }
.ov-menubar { display: flex; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.ov-tree { overflow: auto; padding: 4px 4px 12px; font-size: 12.5px; }
.ov-row { display: flex; align-items: center; gap: 4px; padding: 1px 4px 1px calc(var(--d) * 16px + 2px); line-height: 21px; white-space: nowrap; border-radius: 4px; }
.ov-row:hover { background: var(--panel-2); }
.ov-row.sel { background: var(--sel-bg); }
.ov-row .ov-tw { width: 14px; height: 18px; padding: 0; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 11px; }
.ov-row input { margin: 0 2px; accent-color: var(--sel-strong); }
.ov-row .ov-label { overflow: hidden; text-overflow: ellipsis; cursor: default; }
.ov-row.folder .ov-label { font-weight: 600; }
.ov-tip { position: fixed; z-index: 100001; width: 280px; padding: 8px 10px; background: var(--bg); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 8px 22px oklch(0 0 0 / .25); font-size: 12px; pointer-events: none; }
.ov-tip p { margin: 4px 0 0; color: var(--ink-2); }

/* Find place */
.fp-win { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 6px; padding: 12px 14px; height: 100%; background: var(--bg); box-sizing: border-box; }
.fp-win p { margin: 4px 0 0; }
.fp-win input[type=search] { width: 100%; box-sizing: border-box; }
.fp-table-wrap { overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--r); min-height: 0; }
.fp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fp-table th { position: sticky; top: 0; background: var(--panel-2); text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.fp-table td { padding: 3px 8px; border-bottom: 1px solid var(--line); }
.fp-table tr:hover td { background: var(--panel); }
.fp-table tbody tr { user-select: none; cursor: default; }
.fp-table tr.sel td { background: var(--sel-bg); }
.fp-table tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fp-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.fp-foot .spacer { flex: 1; }
.fp-n { color: var(--ink-3); font-size: var(--fs-small); }

/* Color adjustment, travel speed, open/save dialogs */
.ca-win, .tt-win { padding: 14px 16px; background: var(--bg); height: 100%; box-sizing: border-box; overflow: auto; }
.ca-row { display: grid; grid-template-columns: 90px 1fr 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.ca-row input { accent-color: var(--sel-strong); }
.ca-row output { text-align: right; color: var(--ink-3); font: 11.5px var(--mono); }
.ca-row2 { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.ca-tip, .tt-note { color: var(--ink-3); font-size: var(--fs-small); }
.tt-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 6px 14px; flex-wrap: wrap; }
.tt-u { display: flex; flex-direction: column; margin-left: 10px; }
.od-win { width: min(560px, 80vw); }
.od-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 8px; }
.od-tab { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); cursor: pointer; }
.od-tab.on { background: var(--sel-strong); color: #fff; border-color: var(--sel-strong); }
.od-list { height: 300px; overflow: auto; margin: 8px 0; border: 1px solid var(--line-strong); border-radius: var(--r); }
.od-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px; cursor: default; border-bottom: 1px solid var(--line); }
.od-row small { color: var(--ink-3); }
.od-row:hover { background: var(--panel); }
.od-row.sel { background: var(--sel-bg); }
.od-desc { min-height: 2.4em; color: var(--ink-2); font-size: var(--fs-small); }
.od-empty { padding: 14px; color: var(--ink-3); }
.dlg-form { display: grid; gap: 8px; min-width: 380px; }
.dlg-f { display: grid; gap: 3px; font-size: var(--fs-small); color: var(--ink-2); }
.dlg-f input, .dlg-f textarea { font: inherit; padding: 5px 7px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); color: var(--ink); }
.sv-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--r); margin-top: 8px; }
.maps-about { text-align: center; }
.maps-about img { max-width: 100%; border-radius: 6px; }
.ma-note { color: var(--ink-3); font-size: var(--fs-small); }
.maps-details { max-width: 460px; }
.md-also { color: var(--ink-3); font-size: var(--fs-small); }
.maps-an h4 { margin: 8px 0 2px; }

/* Quick Maps (NET Bible maps) */
.qm-win { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; background: var(--panel); }
.qm-stage { position: relative; overflow: auto; background: oklch(0.3 0.01 250); min-height: 0; }
.qm-inner { position: relative; margin: 0 auto; transform-origin: top left; line-height: 0; }
.qm-inner img { display: block; user-select: none; -webkit-user-drag: none; }
.qm-inner svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.qm-toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.qm-status { display: flex; gap: 14px; padding: 0 10px; height: 24px; align-items: center; background: var(--panel-2); border-top: 1px solid var(--line); font: 11.5px var(--mono); color: var(--ink-2); }
.qm-label { position: absolute; transform-origin: 0 0; white-space: pre; pointer-events: auto; cursor: move; line-height: 1.15; font-family: Arial, sans-serif; padding: 1px 3px; }
.qm-label.sel { outline: 1.5px dashed var(--sel-strong); }
.qm-marker { position: absolute; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); border: 1.5px solid #fff; box-shadow: 0 0 0 1px #0006; cursor: move; }
.qm-sel { stroke-dasharray: 5 3; }

/* Atlas gallery */
.at-win { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: 100%; background: var(--bg); min-height: 0; }
.at-side { padding: 10px 12px; border-right: 1px solid var(--line); overflow: auto; background: var(--panel); display: grid; gap: 8px; align-content: start; font-size: 12.5px; }
.at-side label { display: grid; gap: 3px; color: var(--ink-2); font-size: var(--fs-small); }
.at-side select, .at-side input[type=search] { width: 100%; box-sizing: border-box; }
.at-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.at-count { padding: 6px 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.at-grid { overflow: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; min-height: 0; }
.at-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); cursor: pointer; text-align: left; padding: 0; color: inherit; }
.at-card:hover { border-color: var(--sel-strong); }
.at-card:focus-visible { outline: 2px solid var(--focus); }
.at-card img { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--panel-2); }
.at-card .at-t { padding: 6px 8px; font-size: 12px; line-height: 1.3; }
.at-card .at-t small { display: block; color: var(--ink-3); }
.at-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.at-view header { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.at-view header strong { flex: 1; }
.at-pan { position: relative; overflow: hidden; background: #222; touch-action: none; }
.at-pan img { position: absolute; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.at-foot { padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); max-height: 150px; overflow: auto; }
.at-foot a { color: var(--ref); cursor: pointer; text-decoration: underline; }

/* ruler card */
.maps-ruler { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; gap: 10px; align-items: flex-start; max-width: min(560px, calc(100% - 20px)); padding: 8px 10px;
  background: oklch(1 0 0 / 0.93); color: #111; border: 1px solid #10a340; border-radius: 8px; box-shadow: 0 6px 18px oklch(0 0 0 / 0.28); font-size: 12px; line-height: 1.4; }
.maps-ruler[hidden] { display: none; }
.mr-row b { display: inline-block; min-width: 82px; margin-right: 8px; color: #0b6f2c; font-weight: 650; }
.at-card.variant img { object-fit: contain; background: #fff; }

/* edit mode */
.et-win { padding: 10px 12px; background: var(--bg); height: 100%; box-sizing: border-box; overflow: auto; }
.et-win p { margin: 2px 0 6px; }
.et-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.et-tools { display: flex; gap: 2px; }
.et-note { color: var(--ink-3); font-size: var(--fs-small); margin-top: 10px; }
.ep-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 18px; }
.ep-grid .dlg-form { min-width: 0; align-content: start; }
.dlg-f input, .dlg-f textarea, .dlg-f select { width: 100%; box-sizing: border-box; }
.ep-row input, .ep-row select { width: auto; }
.ep-set { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 10px 10px; display: grid; gap: 6px; }
.ep-set legend { font-size: var(--fs-small); color: var(--ink-2); padding: 0 4px; }
.ep-row { display: flex; align-items: center; gap: 6px; font-size: var(--fs-small); color: var(--ink-2); flex-wrap: wrap; }
.es-win { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; padding: 12px 14px; height: 100%; box-sizing: border-box; background: var(--bg); }
.es-left, .es-right { display: grid; gap: 6px; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
.es-right { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.es-left p, .es-right p { margin: 0; }
.es-list { width: 100%; min-height: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); color: var(--ink); }
.ov-row.drop-above { box-shadow: inset 0 2px 0 var(--sel-strong); }
.ov-row.drop-below { box-shadow: inset 0 -2px 0 var(--sel-strong); }
.ov-row.leaf[draggable="true"] { cursor: grab; }

/* Save window, Overlays window folders */
.sv-win .sv-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.sv-win .sv-row small { color: var(--ink-2); }
.ov-row.sel .ov-label { background: var(--sel-bg); border-radius: 3px; }
.ov-row.folder.sel .ov-label { background: var(--sel-bg); font-weight: 650; }
.ov-row.drop-into { outline: 2px dashed var(--sel-strong); outline-offset: -2px; }
.et-tools .mt-btn.on { background: var(--sel-bg); }

/* Media: audio players, Read Text, paradigm pronunciations, pictures, Daily Light. Tokens come from app.css. */

/* ---------------------------------------------------------------- audio players */
.mp { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; height: 100%; min-height: 0; outline: none; }
.mp-row, .mp-ctl, .mp-bar, .mp-opts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-row select { min-width: 0; }
.mp-row select[aria-label="Book"] { flex: 1 1 150px; }
.mp-row select[aria-label="Chapter"], .mp-row select[aria-label="Verse"] { width: 64px; }
.mp-ctl .mp-b { width: 36px; padding: 0; }
.mp-ctl .mp-play { width: 52px; font-size: 16px; background: var(--sel-strong); border-color: var(--sel-strong); color: white; }
.mp-ctl select { margin-left: auto; }
.mp-bar { flex-wrap: nowrap; }
.mp-seek { flex: 1; min-width: 80px; accent-color: var(--sel-strong); }
.mp-vol { width: 70px; accent-color: var(--ink-3); }
.mp-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: var(--fs-small); min-width: 34px; text-align: center; }
.mp-opts { gap: 4px 14px; color: var(--ink-2); font-size: var(--fs-small); }
.mp-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.mp-check input { accent-color: var(--sel-strong); margin: 0; }
.mp-status { min-height: 18px; color: var(--ink-2); font-size: var(--fs-small); }
.mp-verses { display: flex; flex-wrap: wrap; gap: 3px; overflow: auto; align-content: flex-start; min-height: 0; flex: 1; padding: 2px; }
.mp-v { min-width: 30px; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel);
  font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ref); }
.mp-v:hover { background: var(--panel-2); border-color: var(--line-strong); }
.mp-v.now { background: var(--sel-strong); border-color: var(--sel-strong); color: white; font-weight: 650; }
.mp-v.est { border-style: dashed; }
.mp-v.empty { color: var(--ink-3); background: transparent; text-decoration: line-through; cursor: default; }
.mp-foot { color: var(--ink-3); font-size: var(--fs-small); line-height: 1.45; }

/* ---------------------------------------------------------------- Read Text */
.rt { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 8px; padding: 10px 12px; height: 100%; min-height: 0; }
.rt-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rt-row .rt-version { flex: 1 1 180px; min-width: 0; }
.rt-row .rt-voice { flex: 1 1 160px; min-width: 0; }
.rt-row .rt-ref { flex: 1 1 150px; min-width: 120px; }
.rt-nav { width: 28px; padding: 0; }
.rt-wav { display: inline-flex; gap: 5px; align-items: center; color: var(--ink-3); font-size: var(--fs-small); }
.rt-sub { justify-content: space-between; }
.rt-status { color: var(--ink-2); font-size: var(--fs-small); }
.rt-text { width: 100%; min-height: 0; height: 100%; resize: none; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px;
  background: var(--bg); color: var(--ink); font-family: var(--text-latin); font-size: var(--fs-latin); line-height: 1.55; }

/* ---------------------------------------------------------------- paradigms */
.pa { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.pa-bar { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.pa-q { flex: 1 1 160px; min-width: 120px; }
.pa-count { color: var(--ink-3); font-size: var(--fs-small); margin-left: auto; font-variant-numeric: tabular-nums; }
.pa-list { overflow: auto; padding: 4px 10px 14px; }
.pa-group h4 { position: sticky; top: 0; background: var(--bg); margin: 12px 0 4px; padding: 4px 0; font-size: var(--fs-small); color: var(--ink-2);
  border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; z-index: 1; }
.pa-open { margin-left: auto; font-weight: 400; color: var(--link); text-decoration: none; }
.pa-open:hover { text-decoration: underline; }
.pa-row { display: grid; grid-template-columns: minmax(80px, 150px) minmax(0, 1fr) 42px auto; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 5px; }
.pa-row:hover { background: var(--panel); }
.pa-label { font-family: var(--text-greek); font-size: 16px; color: var(--ink); }
.pa-label.hebrew, .pa-label.aramaic { font-family: var(--ui); font-size: var(--fs-ui); color: var(--ref); font-weight: 600; }
.pa-sub { color: var(--ink-3); font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-dur { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; text-align: right; }
.pa-btns { display: flex; gap: 4px; }
.pa-play { height: 24px; padding: 0 8px; display: inline-flex; gap: 5px; align-items: center; font-size: var(--fs-small); }
.pa-play.playing { background: var(--sel-strong); border-color: var(--sel-strong); color: white; }
.pa-vocab { padding: 6px 10px; border-top: 1px solid var(--line); background: var(--panel); font-size: var(--fs-small); color: var(--ink-2); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.pa-vhead { font-weight: 600; }

/* ---------------------------------------------------------------- pictures */
.pc { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); height: 100%; min-height: 0; }
.pc-bar { display: flex; gap: 6px; align-items: center; padding: 6px 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--panel); }
.pc-bar .ctl { min-width: 0; max-width: 220px; }
.pc-q { flex: 1 1 200px; max-width: none !important; }
.pc-ref { width: 150px; }
.pc-loose { display: inline-flex; gap: 5px; align-items: center; color: var(--ink-2); font-size: var(--fs-small); }
.pc-count { margin-left: auto; color: var(--ink-2); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.pc-about { padding: 6px 12px; color: var(--ink-3); font-size: var(--fs-small); border-bottom: 1px solid var(--line); }
.pc-grid { overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 10px 12px 20px; align-content: start; outline: none; }
.pc-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; text-align: left; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); cursor: pointer; font: inherit; color: inherit; }   /* no overflow:hidden: it collapses grid rows */
.pc-tile:hover { border-color: var(--sel-strong); box-shadow: 0 4px 14px oklch(0 0 0 / 0.12); }
.pc-img { display: block; flex: none; height: 112px; background: var(--panel-2); overflow: hidden; border-radius: 7px 7px 0 0; }
.pc-img img { width: 100%; height: 112px; object-fit: cover; display: block; }
.pc-cap { display: block; padding: 0 8px; font-size: var(--fs-small); line-height: 1.35; color: var(--ink-2); max-height: calc(3 * 1.35em); overflow: hidden; }
.pc-cap b { color: var(--ink); font-weight: 600; }
.pc-badge { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 10px; background: oklch(0.2 0 0 / 0.72); color: white; font-size: 10.5px; text-transform: capitalize; }
.pc-more { grid-column: 1 / -1; justify-self: center; }

/* ---------------------------------------------------------------- picture viewer */
.pv { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.pv-bar { display: flex; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.pv-count { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: var(--fs-small); margin: 0 6px; }
.pv-bar select { margin-left: auto; }
.pv-bar a.btn { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.pv-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; min-height: 0; }
.pv-stage { overflow: auto; background: oklch(0.2 0.004 250); display: grid; place-items: center; outline: none; min-height: 0; }
.pv-stage.fit { overflow: hidden; }
.pv-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-stage:not(.fit) { place-items: start; }
.pv-info { overflow: auto; padding: 12px 14px; border-left: 1px solid var(--line); background: var(--bg); font-size: var(--fs-small); line-height: 1.5; }
.pv-title { margin: 0 0 6px; font-size: 15px; line-height: 1.3; }
.pv-caption { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.pv-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.pv-chip { padding: 1px 8px; border-radius: 10px; background: var(--panel-2); color: var(--ink-2); font-size: 11px; }
.pv-chip.coll { background: var(--sel-bg); color: var(--ref-strong); }
.pv-chip.tag { background: var(--hit-bg); color: var(--hit-ink); }
.pv-chip.dim { background: none; color: var(--ink-3); }
.pv-info h4 { margin: 12px 0 4px; font-size: var(--fs-small); color: var(--ink-2); }
.pv-ref, .pv-page { color: var(--ref); text-decoration: none; margin-right: 4px; display: inline-block; }
.pv-ref:hover, .pv-page:hover { text-decoration: underline; }
.pv-ref.dim { color: var(--ink-3); }
.pv-page { color: var(--link); }
.pv-loose { color: var(--ink-3); margin-top: 6px; }

/* ---------------------------------------------------------------- Daily Light */
.dl { --dl-bg: oklch(0.97 0.05 98); --dl-ink: oklch(0.25 0.03 90); --dl-accent: oklch(0.45 0.09 70); --dl-line: oklch(0.86 0.05 95);
  display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; background: var(--dl-bg); color: var(--dl-ink); position: relative; outline: none; }
.dl.dl-evening { --dl-bg: oklch(0.955 0.03 245); --dl-ink: oklch(0.24 0.03 255); --dl-accent: oklch(0.42 0.1 255); --dl-line: oklch(0.84 0.04 245); }
:root:not([data-theme="light"]) .dl { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dl { --dl-bg: oklch(0.27 0.035 90); --dl-ink: oklch(0.92 0.02 95); --dl-accent: oklch(0.84 0.09 90); --dl-line: oklch(0.38 0.04 90); }
  :root:not([data-theme="light"]) .dl.dl-evening { --dl-bg: oklch(0.25 0.04 255); --dl-ink: oklch(0.92 0.015 250); --dl-accent: oklch(0.82 0.08 250); --dl-line: oklch(0.36 0.05 255); }
}
:root[data-theme="dark"] .dl { --dl-bg: oklch(0.27 0.035 90); --dl-ink: oklch(0.92 0.02 95); --dl-accent: oklch(0.84 0.09 90); --dl-line: oklch(0.38 0.04 90); }
:root[data-theme="dark"] .dl.dl-evening { --dl-bg: oklch(0.25 0.04 255); --dl-ink: oklch(0.92 0.015 250); --dl-accent: oklch(0.82 0.08 250); --dl-line: oklch(0.36 0.05 255); }
.dl-menu { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--dl-line); background: oklch(from var(--dl-bg) calc(l - 0.03) c h); }
.dl-m { border: 0; background: none; padding: 3px 8px; border-radius: 4px; cursor: pointer; color: var(--dl-ink); font-size: var(--fs-small); }
.dl-m:hover { background: oklch(from var(--dl-ink) l c h / 0.12); }
.dl-m.on { background: var(--dl-accent); color: var(--dl-bg); }
.dl-body { overflow: auto; padding: 16px 22px 30px; font-size: 100%; }
.dl-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; border-bottom: 1px solid var(--dl-line); padding-bottom: 6px; }
.dl-day { font-size: 1.5em; font-weight: 700; color: var(--dl-accent); }
.dl-year { color: oklch(from var(--dl-ink) l c h / 0.7); margin-left: -6px; }
.dl-when { margin-left: auto; font-size: 0.9em; letter-spacing: 0.03em; text-transform: uppercase; color: oklch(from var(--dl-ink) l c h / 0.75); }
.dl-theme { margin: 14px 0 10px; font-style: italic; font-size: 1.1em; color: var(--dl-accent); line-height: 1.4; }
.dl-text { font-family: var(--text-latin); line-height: 1.6; font-size: 1em; max-width: 62ch; }
.dl-text p { margin: 0 0 0.8em; }
.dl-text sup, .dl-fn { color: var(--dl-accent); font: 650 0.65em var(--ui); margin: 0 2px; }
.dl-pass { margin: 0 0 0.9em; }
.dl-vref { font: 600 0.78em var(--ui); color: var(--dl-accent); text-decoration: none; margin-right: 6px; }
.dl-vref:hover { text-decoration: underline; }
.dl-v.vtext { display: inline; font-size: inherit; max-width: none; color: inherit; }
.dl-v.vtext.greek { font-family: var(--text-greek); }
.dl-v.vtext.hebrew { font-family: var(--text-hebrew); font-size: 1.25em; }
.dl-full .vtext[dir="rtl"] { display: block; text-align: right; margin-top: 4px; }
.dl-missing { color: oklch(from var(--dl-ink) l c h / 0.6); font-size: 0.9em; }
.dl-notes { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--dl-line); font: 0.85em/1.7 var(--ui); display: flex; flex-wrap: wrap; gap: 2px 14px; }
.dl-note a { color: var(--dl-accent); text-decoration: none; }
.dl-note a:hover { text-decoration: underline; }
.dl-opt { display: flex; gap: 6px; align-items: center; margin: 2px 0; }
.dl-cal { position: absolute; z-index: 5; width: 244px; padding: 8px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 12px 32px oklch(0 0 0 / 0.22); }
.dl-cal-head { display: flex; gap: 4px; margin-bottom: 6px; }
.dl-cal-title { flex: 1; font-weight: 650; }
.dl-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dl-cal-grid.l1, .dl-cal-grid.l2, .dl-cal-grid.l3 { grid-template-columns: repeat(4, 1fr); }
.dl-cal-grid .dow { color: var(--ink-3); font-size: var(--fs-small); padding: 2px 0; }
.dl-cal-grid button { height: 28px; border: 0; border-radius: 5px; background: none; cursor: pointer; color: var(--ink); }
.dl-cal-grid button:hover { background: var(--sel-bg); }
.dl-cal-grid .cur { background: var(--sel-strong); color: white; }
.dl-today { width: 100%; margin-top: 6px; }

@media (max-width: 760px) {
  .pv-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .pv-info { border-left: 0; border-top: 1px solid var(--line); max-height: 40%; }
}

/* Tool windows raise their z-index with every focus (core.js), so menus and toasts opened from inside them must sit above. */
.menu-pop { z-index: 100000; }
.toast { z-index: 100010; }
.tooltip { z-index: 100020; }

/* refs: Resource Summary, reference-work reader, Dictionary, TSK, Nave's, Master Module Index, Create Module Index. */

/* ------------------------------------------------------------------ Resource Summary (Analysis tab "Resources" and the window) */
.rs { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.rs-win { height: 100%; min-height: 0; padding: 0; }
.rs-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 8px; position: sticky; top: 0; background: var(--bg); z-index: 2; }
.rs-tab { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rs-tab:hover { color: var(--ink); }
.rs-tab.on { color: var(--ref); border-bottom-color: var(--sel-strong); font-weight: 600; }
.rs-content { padding: 0 2px 12px; min-height: 0; }
.rs-win .rs-tabs { margin: 0; padding: 0 8px; }
.rs-win .rs-content { padding: 8px 12px 14px; }
.rs-head { color: var(--ink-2); margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.rs-head .ref { font-size: 14px; }
.rs-group { margin: 0 0 12px; }
.rs-group > h4 { margin: 10px 0 4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.rs-mod { margin: 0 0 8px; padding: 0 0 0 8px; border-left: 2px solid var(--line); }
.rs-modhead { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.rs-modname { color: var(--ink); text-decoration: none; line-height: 1.35; }
.rs-modname:hover { color: var(--ref); text-decoration: underline; }
.bwd.b { font-weight: 650; }
.bwd.i { font-weight: 650; font-style: italic; }
.bwd.b.i { font-weight: 650; font-style: italic; }
.rs-count { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; flex: none; }
.rs-entries { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 0; line-height: 1.5; }
.rs-link { color: var(--link); text-decoration: none; cursor: pointer; }
.rs-link:hover { text-decoration: underline; }
.rs-link.hebrew { font-family: var(--text-hebrew); font-size: 17px; }
.rs-link.greek { font-family: var(--text-greek); font-size: 15px; }
.rs-n { color: var(--ink-3); font-size: var(--fs-small); }
.rs-range { color: var(--ink-3); font-size: var(--fs-small); }
.rs-more, .rs-morebtn { color: var(--ink-3); font-size: var(--fs-small); }
.rs-morebtn { border: 0; background: none; cursor: pointer; padding: 0; text-decoration: underline; }
.rs-vtab { margin: 3px 0 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.rs-vtlabel { font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.rs-topical { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; }
.rs-topical > h4 { margin-top: 2px; }
.rs-word { margin: 2px 0 6px; }
.rs-wordform { font-size: 18px; margin-right: 6px; }
.rs-wordform.greek { font-family: var(--text-greek); }
.rs-wordform.hebrew { font-family: var(--text-hebrew); font-size: 22px; }
.rs-desc { color: var(--ink-2); }
.rs-note { color: var(--ink-2); margin: 4px 0 8px; line-height: 1.5; }
.rs-ops { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; }
.rs-spin { margin-left: auto; display: inline-flex; gap: 2px; }
.rs-spin .btn { padding: 0 8px; }
.rs-checks h4 { margin: 10px 0 2px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.rs-check { display: flex; align-items: baseline; gap: 8px; padding: 2px 6px; border-radius: 4px; cursor: default; }
.rs-check:hover { background: var(--panel); }
.rs-check.sel { background: var(--sel-bg); }
.rs-checklabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rs-opt input { margin-top: 3px; }
.rs-opt small { display: block; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.rs-lexentry { padding: 10px 14px 16px; line-height: 1.55; }

/* ------------------------------------------------------------------ reader window */
.rd-win .toolwin-body { overflow: hidden; }
.rd { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.rd-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.rd-nav { width: 30px; padding: 0; }
.rd-nav:disabled { opacity: 0.35; cursor: default; }
.rd-pick { max-width: 280px; min-width: 120px; }
.rd-spacer { flex: 1; }
.rd-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.rd-tab { border: 0; background: var(--panel); padding: 0 10px; height: 24px; cursor: pointer; color: var(--ink-2); }
.rd-tab + .rd-tab { border-left: 1px solid var(--line-strong); }
.rd-tab.on { background: var(--sel-bg); color: var(--ink); font-weight: 600; }
.rd-main { display: flex; min-height: 0; min-width: 0; }
.rd-side { width: 280px; flex: none; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--bg); }
.rd-panel { flex: 1; min-height: 0; overflow: auto; padding: 6px; }
.rd-panel[hidden] { display: none; }
.rd-panel > .ctl, .rd-searchbar .ctl { width: 100%; margin-bottom: 6px; }
.rd-searchbar { display: flex; gap: 6px; }
.rd-searchbar .ctl { flex: 1; min-width: 0; }
.rd-panel > select.ctl { width: 100%; }
.rd-grip { width: 5px; flex: none; cursor: col-resize; background: transparent; margin-left: -3px; z-index: 1; }
.rd-grip:hover { background: var(--sel-strong); opacity: 0.4; }
.rd-page { flex: 1; min-width: 0; border: 0; background: #fff; }
.rd-tree, .rd-tree ul { list-style: none; margin: 0; padding: 0; }
.rd-tree ul { padding-left: 14px; display: none; }
.rd-tree li.open > ul { display: block; }
.rd-node { display: flex; gap: 4px; align-items: baseline; padding: 2px 4px; border-radius: 4px; cursor: pointer; line-height: 1.35; }
.rd-node:hover { background: var(--panel); }
.rd-node.sel { background: var(--sel-bg); }
.rd-node:focus-visible, .rd-item:focus-visible, .rd-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rd-caret { width: 12px; flex: none; color: var(--ink-3); transition: transform 0.12s var(--ease); display: inline-block; }
li.open > .rd-node > .rd-caret { transform: rotate(90deg); }
.rd-label { min-width: 0; overflow-wrap: anywhere; }
.rd-more { padding: 4px; }
.rd-list { display: flex; flex-direction: column; }
.rd-item { display: block; padding: 3px 6px; border-radius: 4px; color: var(--ink); text-decoration: none; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.rd-item:hover { background: var(--panel); }
.rd-item.sel { background: var(--sel-bg); }
.rd-see { color: var(--ink-3); font-size: var(--fs-small); }
.rd-hit { display: block; padding: 6px 6px 8px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rd-hit:hover { background: var(--panel); }
.rd-hit b { color: var(--ref); }
.rd-snip { color: var(--ink-2); font-size: 12px; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; white-space: pre-line; }
.rd-snip mark, .master-res mark { background: var(--hit-bg); color: var(--hit-ink); border-radius: 2px; padding: 0 1px; }
.rd-loading { color: var(--ink-3); padding: 8px; }
.refs-pop { max-width: 440px; }
.refs-pop .rp-ref { color: var(--ref); display: block; margin-bottom: 3px; }
.refs-pop .vtext { margin: 0 0 3px; font-family: var(--text-latin); font-size: 14px; }
.refs-pop .vtext.greek { font-family: var(--text-greek); }
.refs-pop .vtext.hebrew { font-family: var(--text-hebrew); font-size: 17px; }

/* ------------------------------------------------------------------ Dictionary tab and Bible Dictionaries window */
.dict { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.dict-win { height: 100%; }
.dict-bar { display: flex; gap: 6px; align-items: center; padding: 6px 0; flex-wrap: wrap; }
.dict-win .dict-bar { padding: 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.dict-pick { max-width: 100%; min-width: 0; flex: 1 1 160px; }
.dict-word { flex: 1 1 140px; min-width: 100px; }
.dict-status { color: var(--ink-2); font-size: 12px; padding: 2px 0 6px; }
.dict-win .dict-status { padding: 6px 10px; }
.dict-body { flex: 1; min-height: 0; display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.dict-win .dict-body { border: 0; border-radius: 0; }
.dict-toc { width: 210px; flex: none; overflow: auto; border-right: 1px solid var(--line); padding: 4px; }
.dict-toc[hidden] { display: none; }
.dict-frame { flex: 1; min-width: 0; border: 0; background: #fff; min-height: 220px; }
.dict:not(.dict-win) .dict-frame { min-height: 280px; }
#analysis-body .dict { min-height: 360px; }

/* ------------------------------------------------------------------ Master Module Index */
.master { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.master-bar { display: flex; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.master-bar .ctl { flex: 1; min-width: 0; }
.master-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(180px, 38%) 1fr; }
.master-list { overflow: auto; border-right: 1px solid var(--line); padding: 4px; }
.master-note { color: var(--ink-3); font-size: var(--fs-small); padding: 2px 6px 6px; }
.master-res { overflow: auto; padding: 4px 8px; }

/* ------------------------------------------------------------------ Create Module Index dialog */
.bi p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.5; }
.bi-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px; align-items: center; margin: 6px 0; }
.bi-row span { text-align: right; color: var(--ink-2); }
.bi-row .ctl { min-width: 0; }
.bi-slot { margin: 6px 0; }
.bi-pick { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); padding: 6px; }
.bi-path { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); padding: 2px 4px 6px; overflow-wrap: anywhere; }
.bi-list { max-height: 180px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.bi-dir::before { content: "\25B8\00a0"; color: var(--ink-3); }
.bi-pickbar { display: flex; justify-content: flex-end; padding-top: 6px; }
.bi-status { margin: 10px 0 0; min-height: 20px; color: var(--ink-2); line-height: 1.5; }
.bi-status.err { color: var(--err-ink); }
.bi-status.ok { color: var(--ink); }
.bi-note { color: var(--ink-3); font-size: var(--fs-small); margin-top: 3px; overflow-wrap: anywhere; }
.bi-mods h4 { margin: 14px 0 4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.bi-mod { display: flex; gap: 10px; align-items: center; padding: 3px 0; }
.bi-mod a { flex: 1; color: var(--link); }
.bi-tools { display: flex; gap: 6px; margin: 8px 0 0; }

/* ------------------------------------------------------------------ Westminster Confession references window */
.wcf { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.wcf-head { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.wcf-list { flex: 1; min-height: 0; overflow: auto; padding: 4px; }
.wcf-bar { padding: 8px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.rd-pdf { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.rd-pdf[hidden] { display: none; }

/* Round 5 additions of the refs feature (kept apart from css/refs.css, which the core owns). */
.rs-lexical { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px 8px; }
.rs-lexical > h4 { margin-top: 2px; }
.rs-lexrow { display: grid; grid-template-columns: 4.2em minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 2px 8px; padding: 2px 4px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.rs-lexrow:hover { background: var(--sel-bg); }
.rs-lexabbrev { color: var(--ink-3); font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.02em; }
.rs-lexhead { color: var(--link); max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-lexhead.greek { font-family: var(--text-greek); font-size: 15px; }
.rs-lexhead.hebrew { font-family: var(--text-hebrew); font-size: 17px; }
.rs-lexfirst { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); }
.rs-desc.greek { font-family: var(--text-greek); }
.rs-desc.hebrew { font-family: var(--text-hebrew); font-size: 17px; }
.master-group { margin: 10px 0 2px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; list-style: none; }
.bi-import { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.bi-import h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.bi-import p { margin: 0 0 6px; color: var(--ink-2); line-height: 1.45; }

/* Reader windows: the Follow toggle and the status line under the page */
.rd { grid-template-rows: auto minmax(0, 1fr) auto; }
.rd-followbox { display: inline-flex; }
.rd-follow.on { background: var(--sel-bg); border-color: var(--sel-strong); color: var(--ink); font-weight: 600; }
.rd-follow:disabled { opacity: 0.5; cursor: default; }
.rd-status { padding: 3px 10px; border-top: 1px solid var(--line); background: var(--panel); color: var(--ink-3); font-size: var(--fs-small); }
.rd-status[hidden] { display: none; }
.rd-pick { max-width: min(280px, 100%); }

/* searchtools area: GSE canvas, list managers, statistics, assistants.  Tokens come from app.css. */
.stmenu-bar { display: flex; gap: 0; background: var(--panel-2); border-bottom: 1px solid var(--line); padding: 0 4px; user-select: none; }
.stmenu-top { background: none; border: 0; padding: 4px 9px; border-radius: 4px; color: var(--ink); cursor: default; font-size: var(--fs-small); }
.stmenu-top:hover { background: var(--sel-bg); }
.stmenu-pop {
  position: fixed; min-width: 220px; max-height: calc(100vh - 40px); overflow: auto; padding: 4px; background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.22); z-index: 2000000000;
  animation: pop-in 120ms var(--ease);
}
.stmenu-pop .menu-item:disabled { opacity: 0.5; }

.st-win-pad { padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.st-form { display: grid; gap: 8px; }
.st-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 8px; }
.st-lab { color: var(--ink-2); }
.st-check { display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }
.st-check input { margin-top: 2px; accent-color: var(--sel-strong); }
.st-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 10px; display: grid; gap: 6px; margin: 0; min-width: 0; }
.st-group legend { padding: 0 6px; color: var(--ink-2); font-size: var(--fs-small); font-weight: 600; }
.st-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-indent { margin-left: 22px; }
.st-grow { flex: 1 1 140px; min-width: 0; }
.st-num { width: 70px; }
.st-hint { color: var(--ink-3); font-size: var(--fs-small); line-height: 1.45; }
.st-vrow { display: grid; gap: 4px; }
.st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.st-area { width: 100%; font: inherit; padding: 6px 8px; height: auto; resize: vertical; }
.st-status { padding: 4px 10px; font-size: var(--fs-small); color: var(--ink-2); border-top: 1px solid var(--line); background: var(--panel); min-height: 24px; }
.st-status.err { color: var(--err-ink); }
.st-error { color: var(--err-ink); line-height: 1.5; }
.st-btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.st-btncol { display: grid; gap: 6px; align-content: start; }
.st-iel { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; }
.st-code { font-family: var(--mono); color: var(--code); }
.st-mfields { display: grid; gap: 6px; }
.st-mdesc { font-size: var(--fs-small); color: var(--ink-2); padding: 6px 8px; background: var(--panel); border-radius: 6px; line-height: 1.5; }
.st-mdesc code { font-family: var(--mono); color: var(--code); font-size: 13px; }

.st-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.st-tab { border: 1px solid transparent; border-bottom: 0; background: none; padding: 5px 12px; border-radius: 6px 6px 0 0; cursor: pointer; color: var(--ink-2); }
.st-tab.active { background: var(--bg); border-color: var(--line); color: var(--ink); font-weight: 600; margin-bottom: -1px; }

.st-list { display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); overflow: hidden; min-height: 60px; }
.st-list-head { display: flex; gap: 8px; padding: 3px 8px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); font-weight: 600; }
.st-list-head span { flex: 0 0 auto; }
.st-list-head span:last-child { flex: 1 1 auto; }
.st-list-body { overflow: auto; outline: none; min-height: 0; }
.st-li { display: flex; gap: 8px; padding: 2px 8px; cursor: default; white-space: nowrap; line-height: 1.5; }
.st-li span { flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; }
.st-li span:last-child { flex: 1 1 auto; }
.st-li:hover { background: var(--panel); }
.st-li.sel { background: var(--sel-bg); }
.st-li.excl { color: var(--err-ink); }
.st-li .num { text-align: right; font-variant-numeric: tabular-nums; }
.st-li .greek, .st-list-body .greek { font-family: var(--text-greek); font-size: 15px; }
.st-li .hebrew { font-family: var(--text-hebrew); font-size: 17px; }

/* ---------------------------------------------------------------- GSE */
.gse-toolwin .toolwin-body { display: grid; }
.gse-win { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; min-height: 0; height: 100%; }
.gse-toolbar { display: flex; gap: 4px; align-items: center; padding: 4px 6px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.gse-toolbar .btn { height: 24px; padding: 0 8px; font-size: var(--fs-small); }
.gse-toolbar .btn.on { background: var(--sel-bg); border-color: var(--sel-strong); }
.gse-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 4px; }
.gse-canvas { position: relative; overflow: auto; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px, var(--bg);
  background-blend-mode: normal; outline: none; min-height: 0; }
.gse-canvas { background-color: var(--bg); background-image: radial-gradient(var(--line-strong) 1px, transparent 1px); background-size: 24px 24px; }
.gse-canvas[data-mode="connect"], .gse-canvas[data-mode="order"] { cursor: crosshair; }
.gse-world { position: relative; transform-origin: 0 0; min-width: 100%; min-height: 100%; }
.gse-links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.gse-layer { position: relative; }
.gse-link { fill: none; stroke-width: 1.6; }
.gse-link.out { stroke: var(--ink); }
.gse-link.agree { stroke: oklch(0.55 0.15 150); stroke-dasharray: 3 3; }
.gse-link.agree.primary { stroke-dasharray: 12 4; stroke-width: 2; }
.gse-link.order { stroke: var(--sel-strong); }
.gse-rubber { stroke: var(--sel-strong); stroke-width: 1.5; stroke-dasharray: 4 3; }
.gse-box { position: absolute; border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--panel); box-shadow: 0 1px 2px oklch(0 0 0 / 0.1);
  user-select: none; overflow: hidden; cursor: grab; display: grid; }
.gse-canvas[data-mode="connect"] .gse-box, .gse-canvas[data-mode="order"] .gse-box { cursor: crosshair; }
.gse-box.sel { border-color: var(--sel-strong); box-shadow: 0 0 0 2px oklch(from var(--sel-strong) l c h / 0.35); }
.gse-word { grid-template-rows: 1fr auto; }
.gse-wtop { padding: 5px 8px; background: var(--bg); border-bottom: 1px solid var(--line); font-family: var(--text-latin); font-size: 14px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 1px 3px oklch(0 0 0 / 0.12); }
.gse-wtop.greek { font-family: var(--text-greek); font-size: 15px; }
.gse-wtop.hebrew { font-family: var(--text-hebrew); font-size: 17px; direction: rtl; text-align: right; }
.gse-wbot { padding: 2px 8px; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gse-wbot b { color: var(--ref); }
.gse-word.filter { border-style: dashed; background: var(--warn-bg); }
.gse-merge { text-align: center; border-radius: 22px; background: oklch(0.93 0.04 150); border-color: oklch(0.6 0.08 150); }
.gse-mtop { font-weight: 700; padding-top: 6px; letter-spacing: 0.04em; }
.gse-mbot { font-size: 10px; color: var(--ink-2); }
.gse-order { text-align: center; border-radius: 14px; background: oklch(0.94 0.04 255); border-color: var(--sel-strong); }
.gse-otop { font-size: 11px; font-weight: 600; padding-top: 4px; white-space: nowrap; }
.gse-obot { font-size: 9px; color: var(--ink-3); }
.gse-agree { border-radius: 4px; background: oklch(0.94 0.04 150); border-color: oklch(0.55 0.15 150); border-style: dashed; text-align: center; }
.gse-atop { font-size: 11px; padding: 5px 6px 0; line-height: 1.2; overflow: hidden; }
.gse-abot { font-size: 10px; color: var(--ink-3); }
.gse-band { position: absolute; border: 1px dashed var(--sel-strong); background: oklch(from var(--sel-strong) l c h / 0.1); pointer-events: none; }
.gse-statusbar { display: flex; gap: 2px; padding: 2px 6px; background: var(--chrome); }
.gse-flag { background: none; border: 0; color: var(--chrome-ink-2); opacity: 0.55; padding: 1px 7px; border-radius: 4px; cursor: pointer; font-size: var(--fs-small); }
.gse-flag.on { opacity: 1; color: oklch(0.86 0.12 95); }
.gse-flag:hover { background: var(--chrome-hover); }
.gse-wordform { min-width: min(760px, 88vw); }
dialog.bw:has(.gse-wordform) { width: min(820px, 94vw); }
.st-agree { align-items: start; }
.st-agree-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ---------------------------------------------------------------- Command Line Assistant */
.st-cla-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.st-cla-top .st-group { align-content: start; }
.st-cla-row { display: flex; gap: 6px; align-items: center; }
.st-cla-row > select, .st-cla-row > .st-grow { flex: 1 1 auto; min-width: 0; }
.st-cla-extra { display: grid; gap: 8px; }
.st-cla-btns { align-items: center; }
.st-spacer { flex: 1 1 auto; }
.st-cla-line { display: flex; gap: 8px; align-items: baseline; }
.st-cla-preview { font-family: var(--mono); color: var(--ref-strong); font-size: 13px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- list managers */
.vlm-win { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; min-height: 0; }
.vlm-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px; min-height: 0; }
.vlm-pane { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: 6px; min-height: 0; min-width: 0; }
.vlm-head { display: flex; flex-direction: column; gap: 2px; }
.vlm-list.active, .vlm-pane .st-list.active { border-color: var(--sel-strong); box-shadow: 0 0 0 1px var(--sel-strong); }
.vlm-add { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.vlm-add span:first-child { color: var(--ink-2); }

/* ---------------------------------------------------------------- windows with results */
.vc { overflow: auto; border: 1px solid var(--line-strong); border-radius: 6px; min-height: 120px; height: 100%; background: var(--bg); }
.vc-row { display: grid; grid-template-columns: 22px 54px 92px minmax(0, 1fr); gap: 6px; align-items: baseline; padding: 3px 8px; border-bottom: 1px solid var(--line); }
.vc-row:hover { background: var(--panel); }
.vc-hits { color: var(--code); font-variant-numeric: tabular-nums; }
.vc-ref { color: var(--ref); font-weight: 600; text-decoration: none; }
.vc-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--text-latin); }
.vc-text.greek { font-family: var(--text-greek); } .vc-text.hebrew { font-family: var(--text-hebrew); direction: rtl; }
.rvt-win, .kw-win, .stats-panel { display: grid; gap: 8px; padding: 8px; align-content: start; min-height: 0; height: 100%; }
.rvt-win { grid-template-rows: auto minmax(0, 1fr) auto; }
.rvt-cols { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); gap: 10px; min-height: 0; }
.rvt-left, .rvt-right { display: grid; gap: 6px; align-content: start; min-height: 0; }
.rvt-right { grid-template-rows: auto minmax(0, 1fr); }
.rvt-words { border: 1px solid var(--line-strong); border-radius: 6px; max-height: 280px; overflow: auto; background: var(--bg); }
.rvt-word { display: flex; gap: 6px; align-items: baseline; padding: 2px 8px; cursor: default; }
.rvt-word.sel { background: var(--sel-bg); }
.rvt-word.heavy { background: oklch(from var(--sel-strong) l c h / 0.22); }
.rvt-w.greek { font-family: var(--text-greek); } .rvt-w.hebrew { font-family: var(--text-hebrew); }
.kw-win { grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 0; gap: 0; }
.kw-design { display: grid; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.kw-lists { display: grid; grid-template-rows: 1.4fr 1fr; gap: 8px; padding: 8px; min-height: 0; }
.kw-gray { color: var(--ink-3); }
.kw-key, .kw-k { color: oklch(0.55 0.2 27); font-weight: 700; }
.kw-l { text-align: right; }
.stats-bar { display: grid; gap: 6px; }
.stats-graph { overflow: auto; min-height: 120px; border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: var(--bg); max-height: 440px; }
.sg-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 8px; align-items: center; padding: 1px 0; font-size: var(--fs-small); }
.sg-track { height: 12px; background: var(--panel-2); border-radius: 3px; overflow: hidden; display: block; }
.sg-bar { display: block; height: 100%; border-radius: 3px; min-width: 1px; }
.sg-bar.OT { background: oklch(0.62 0.15 150); } .sg-bar.NT { background: oklch(0.58 0.2 27); } .sg-bar.AP { background: oklch(0.58 0.16 258); }
.sg-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sg-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; }
.sg-key.OT { background: oklch(0.62 0.15 150); } .sg-key.NT { background: oklch(0.58 0.2 27); } .sg-key.AP { background: oklch(0.58 0.16 258); }
.stats-graph.swap { display: flex; align-items: flex-end; gap: 2px; height: 300px; max-height: none; }
.stats-graph.swap .sg-row { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: 100%; min-width: 14px; }
.stats-graph.swap .sg-track { height: 100%; display: flex; align-items: flex-end; width: 12px; margin: 0 auto; }
.stats-graph.swap .sg-bar { width: 100%; height: auto; }
.stats-graph.swap .sg-label, .stats-graph.swap .sg-val { writing-mode: vertical-rl; text-align: left; font-size: 10px; }

/* ---------------------------------------------------------------- text (editor) window, code buttons, cross-version popup */
.tw-win { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.tw-bar { display: flex; gap: 6px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.tw-body { overflow: auto; padding: 12px 16px; white-space: pre-wrap; font: 15px/1.6 var(--text-latin); outline: none; }
.tw-body table.an { border-collapse: collapse; margin: 4px 0 10px; font-size: 13px; } .tw-body table.an td { padding: 1px 10px 1px 0; }
.tw-body .code { font-family: var(--mono); color: var(--code); } .tw-body .lx { margin: 6px 0; white-space: normal; }
.tw-body h2, .tw-body h3 { font-family: var(--ui); margin: 12px 0 4px; }
.st-codebar { display: flex; gap: 2px; flex-wrap: wrap; }
.st-codebar .btn { min-width: 26px; padding: 0 6px; height: 22px; font-family: var(--mono); }
#cmdline.st-reveal { font-family: var(--mono) !important; letter-spacing: 0.04em; }
.st-xver { box-shadow: 0 0 0 2px oklch(0.8 0.15 95); }
.xv-pop { min-width: 320px; }
.xv-head { padding: 4px 10px; font-size: var(--fs-small); color: var(--ink-2); font-weight: 600; }
.xv-err { padding: 2px 10px; font-size: var(--fs-small); color: var(--err-ink); }
.st-sample { margin: 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; max-height: 150px; overflow: auto; }
.rg-lex { display: grid; gap: 2px; max-height: 120px; overflow: auto; }
.rg-form { min-width: min(820px, 88vw); }
dialog.bw:has(.rg-form) { width: min(900px, 94vw); }

/* ---------------------------------------------------------------- printing */
#st-print-root { display: none; }
@media print {
  body.st-print > *:not(#st-print-root) { display: none !important; }
  body.st-print { display: block !important; overflow: visible !important; height: auto !important; background: #fff !important; color: #000 !important; }
  body.st-print #st-print-root { display: block !important; position: static !important; }
  #st-print-root .gse-world { transform: none !important; }
  #st-print-root .gse-links { position: absolute; }
  #st-print-root .st-print-header { font: 10pt var(--ui); margin-bottom: 8pt; border-bottom: 1px solid #999; }
  #st-print-root .browse, #st-print-root .analysis-body { overflow: visible !important; height: auto !important; max-height: none !important; contain: none !important; }
  #st-print-root .tw-body { overflow: visible; }
}

.st-group .st-ver, .st-row .st-ver, .st-form > .st-ver { width: 100%; max-width: 100%; min-width: 0; }
.st-inline .st-ver { width: auto; max-width: 260px; }
.gse-agree { width: 150px; }
.gse-atop { font-size: 10.5px; line-height: 1.15; }

.pmt-win { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.st-morph-win { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.st-win-pad { overflow: auto; }

/* ---------------------------------------------------------------- Command Line helpers: word list popup, morphology help, history */
.st-hist-host { position: relative; }
.st-hist-host .cmdline { padding-right: 30px; }
.st-histbtn { position: absolute; top: 8px; right: 8px; width: 26px; height: 34px; border: 0; background: none; color: var(--ink-2); cursor: pointer;
  border-radius: 0 var(--r) var(--r) 0; font-size: 12px; line-height: 1; }
.st-histbtn:hover { background: var(--panel-2); color: var(--ink); }
.st-cmdpop, .st-histpop { position: fixed; max-width: min(440px, calc(100vw - 20px)); max-height: min(320px, calc(100vh - 80px)); overflow: auto; padding: 4px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.22);
  z-index: 2000000000; animation: pop-in 120ms var(--ease); }
.st-cp-head { padding: 3px 8px 5px; font-size: var(--fs-small); color: var(--ink-3); border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.st-cp-row, .st-hist-row { display: flex; gap: 14px; justify-content: space-between; align-items: baseline; padding: 2px 8px; border-radius: 4px; cursor: default; line-height: 1.5; }
.st-cp-row:hover, .st-cp-row.sel, .st-hist-row:hover, .st-hist-row:focus-visible { background: var(--sel-bg); }
.st-cp-word.greek { font-family: var(--text-greek); font-size: 15px; }
.st-cp-word.hebrew { font-family: var(--text-hebrew); font-size: 17px; }
.st-cp-code { font-family: var(--mono); color: var(--code); min-width: 1.6em; font-weight: 600; }
.st-cp-note { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; text-align: right; }
.st-cp-row .st-cp-code + .st-cp-note { color: var(--ink-2); text-align: left; flex: 1; }
.st-hist-row { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.st-hist-q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-hist-clear { color: var(--ink-2); border-top: 1px solid var(--line); border-radius: 0; margin-top: 3px; padding-top: 5px; }

/* Search Window verse list: List Box Content Options > Show Reference Only */
#results.st-ref-only .res-row .kwic { display: none; }

/* abort windows of long calls (SEARCHABORTPARAM, SEARCHABORTDLG, SEARCHABORTDLGP, COPYALLABORTPARAM) */
dialog.bw.st-abort { width: min(360px, 92vw); }
.st-abort-body { display: grid; gap: 10px; }
.st-abort-bar { width: 100%; height: 10px; accent-color: var(--sel-strong); }

/* ---- search tools, round 5 (KWIC collocation colours, phrase headings, GSE inline entry, RVT mode) */
/* KWIC: the collocation word in the top list is blue, the key word red (help bwh31) */
.kw-blue { color: var(--ref); font-weight: 700; }
.kw-cw { cursor: pointer; }
.st-list-head span[data-col] { cursor: default; }
.kw-lists .st-list-head span.sortable { cursor: pointer; }
.kw-lists .st-list-head span.sortable:hover { color: var(--ink); text-decoration: underline; }
.kw-lists .st-list-head span.sorted { color: var(--ink); }
.kw-lists .st-list-head .num { text-align: right; }
/* Phrase Matching Tool: results grouped by phrase */
.vc-head { display: flex; gap: 10px; align-items: baseline; padding: 4px 8px; background: var(--panel-2); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line);
  font-weight: 600; position: sticky; top: 0; z-index: 1; }
.vc-head .vc-count { color: var(--code); font-variant-numeric: tabular-nums; }
.vc-head.greek, .vc-head .greek { font-family: var(--text-greek); } .vc-head .hebrew { font-family: var(--text-hebrew); }
.vc-row.in-group { padding-left: 22px; }
.vc-row.in-group.dup .vc-ref { opacity: 0.8; }
/* GSE: the text entry that opens in place on the top half of a word box */
.gse-box .gse-inline { position: absolute; left: 3px; right: 3px; top: 3px; height: calc(50% - 5px); box-sizing: border-box; padding: 0 6px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--sel-strong); border-radius: 4px; outline: none; z-index: 3; }
.gse-box .gse-inline.greek { font-family: var(--text-greek); } .gse-box .gse-inline.hebrew { font-family: var(--text-hebrew); direction: rtl; }
/* RVT word list: morphology mode shown on the list */
.rvt-mode { color: var(--ink-3); font-size: var(--fs-small); }

/* tooldata: Timeline, Flashcards, Diagrammer, Synopsis, Outline, colours, book names. Uses the app tokens from app.css. */

/* ---------------------------------------------------------------- shared window furniture */
.td-win .toolwin-body { display: grid; min-height: 0; }
.td-win { min-width: 420px; }
.td-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.td-btn { height: 26px; padding: 0 9px; }
.td-btn[disabled] { opacity: 0.45; cursor: default; }
.td-btn.on, .td-btn[aria-pressed="true"] { background: var(--sel-bg); border-color: var(--sel-strong); }
.td-sep { width: 1px; height: 20px; background: var(--line-strong); margin: 0 4px; }
.td-check { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.td-check input { accent-color: var(--sel-strong); }
.td-statusline { display: flex; justify-content: space-between; gap: 12px; padding: 4px 10px; font-size: var(--fs-small); color: var(--ink-2); background: var(--panel); border-top: 1px solid var(--line); }
.td-statusline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-menubar { display: flex; gap: 0; padding: 0 4px; background: var(--chrome-2); color: var(--chrome-ink); user-select: none; }
.td-menu-top { background: none; border: 0; color: var(--chrome-ink); padding: 5px 10px; font-size: var(--fs-small); cursor: default; border-radius: 4px; }
.td-menu-top:hover, .td-menu-top[aria-expanded="true"] { background: var(--chrome-hover); }
.td-hint { color: var(--ink-2); font-size: var(--fs-small); margin: 0 0 6px; line-height: 1.45; }
.td-msg { color: var(--err-ink); min-height: 1.2em; font-size: var(--fs-small); grid-column: 1 / -1; }
.td-wide { width: 100%; }
.td-form { display: grid; gap: 8px; }
.td-form label { display: grid; gap: 3px; font-size: var(--fs-small); color: var(--ink-2); }
.td-grid { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px 12px; }
.td-grid > label { font-size: var(--fs-ui); color: var(--ink); display: block; }
.td-grid > .td-check { grid-column: 1 / -1; }
.td-span { grid-column: 1 / -1; }
dialog.td-dlg { width: 440px; }
.td-picklist { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.td-pick { display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; cursor: default; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); }
.td-pick:hover { background: var(--panel); }
.td-pick.sel { background: var(--sel-bg); color: var(--ink); box-shadow: inset 3px 0 0 var(--sel-strong); }
.td-pick-l { font-weight: 600; white-space: nowrap; }
.td-pick-s { color: var(--ink-2); font-size: var(--fs-small); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- timeline */
.tl-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.tl-scroll { overflow: auto; position: relative; background: var(--bg); min-height: 0; outline: none; }
.tl-axis { position: sticky; top: 0; z-index: 2; display: block; border-bottom: 1px solid var(--line-strong); font-family: var(--ui); }
.tl-body { display: block; font-family: var(--ui); }
.tl-item { cursor: pointer; }
.tl-item:focus-visible { outline: none; }
.tl-item:focus-visible .tl-hit { stroke: var(--focus); stroke-width: 2; }
.tl-item:hover .tl-hit { fill: oklch(0.7 0.1 250 / 0.12); }
.tl-editing .tl-item { cursor: move; }
.tl-search { width: 190px; }
.tl-zoom-label { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tl-edit-only { display: none; }
.tl-editing .tl-edit-only { display: inline-block; }

/* ---------------------------------------------------------------- print preview (shared) */
dialog.td-print-preview { width: min(1100px, 96vw); }
.td-print-pages { display: grid; gap: 14px; justify-items: center; }
.td-print-page { background: white; color: black; border: 1px solid var(--line-strong); box-shadow: 0 2px 10px oklch(0 0 0 / 0.12); padding: 24px; width: 100%; overflow: auto; font-family: var(--ui); }
.td-print-title { font-size: 14px; margin: 0 0 8px; }
@media print {
  body.td-printing > *:not(dialog.td-print-dialog) { display: none !important; }
  body.td-printing dialog.td-print-dialog { position: static; box-shadow: none; border: 0; max-width: none; width: auto; max-height: none; }
  body.td-printing dialog.td-print-dialog::backdrop { display: none; }
  body.td-printing dialog.td-print-dialog header, body.td-printing dialog.td-print-dialog footer, body.td-printing .td-noprint { display: none !important; }
  body.td-printing dialog.td-print-dialog .dlg-body { max-height: none; overflow: visible; padding: 0; }
  body.td-printing .td-print-page { border: 0; box-shadow: none; break-after: page; padding: 0; overflow: visible; }
}

/* ---------------------------------------------------------------- flashcards */
.fc-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.fc-main { display: grid; grid-template-columns: minmax(300px, 40%) minmax(0, 1fr); min-height: 0; }
.fc-left { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border-right: 1px solid var(--line); }
.fc-head, .fc-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px 38px 54px 84px; align-items: center; gap: 4px; padding: 0 8px; }
.fc-head { background: var(--panel); border-bottom: 1px solid var(--line); height: 26px; }
.fc-th { background: none; border: 0; text-align: left; font-size: var(--fs-small); font-weight: 650; color: var(--ink-2); padding: 0; cursor: pointer; height: 100%; }
.fc-th.on { color: var(--ref-strong); box-shadow: inset 0 -2px 0 var(--sel-strong); }
.fc-th.on::after { content: attr(aria-sort); display: none; }
.fc-list { --fc-row: 24px; overflow: auto; position: relative; outline: none; min-height: 0; }
.fc-list:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.fc-list-body { position: relative; }
.fc-row { position: absolute; left: 0; right: 0; height: var(--fc-row, 24px); border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; white-space: nowrap; }
.fc-row:hover { background: var(--panel); }
.fc-row.sel { background: var(--sel-bg); }
.fc-row.cur { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.fc-row.learned .fc-c-word, .fc-row.learned .fc-c-us { color: var(--ink-3); text-decoration: line-through; text-decoration-color: oklch(from var(--ink-3) l c h / 0.5); }
.fc-c-word { overflow: hidden; text-overflow: ellipsis; font-size: 16px; font-family: var(--text-greek); }
.fc-c-word.hebrew { font-family: var(--text-hebrew); font-size: 18px; text-align: right; }
.fc-c-lang, .fc-c-ch, .fc-c-fq, .fc-c-us { font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.fc-c-fq { text-align: right; }
.fc-total { background: var(--panel); border: 0; border-top: 1px solid var(--line); padding: 5px 10px; text-align: left; font-size: var(--fs-small); color: var(--ink-2); cursor: pointer; }
.fc-total:hover { background: var(--panel-2); color: var(--ink); }
.fc-right { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; padding: 10px 14px; min-width: 0; }
.fc-nav { display: flex; gap: 6px; align-items: center; }
.fc-nav .fc-prev, .fc-nav .fc-next { width: 48px; font-size: 15px; }
.fc-nav button.on { background: var(--sel-bg); border-color: var(--sel-strong); }
.fc-card { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); display: grid; align-content: center; justify-items: center; padding: 18px 22px; text-align: center; position: relative; min-height: 180px; cursor: pointer; box-shadow: 0 1px 2px oklch(0 0 0 / 0.06); }
.fc-card.learned { background: var(--panel); }
.fc-card.learned::after { content: "learned"; position: absolute; top: 8px; right: 12px; font-size: var(--fs-small); color: var(--lemma); font-weight: 650; }
.fc-face { font-family: var(--text-greek); line-height: 1.35; }
.fc-face.hebrew { font-family: var(--text-hebrew); line-height: 1.6; }
.fc-back { font-family: var(--text-latin); line-height: 1.45; white-space: pre-line; max-width: 36ch; }
.fc-card.show-front .fc-back, .fc-card.show-back .fc-face { display: none; }
.fc-meta { position: absolute; bottom: 8px; left: 12px; right: 12px; font-size: var(--fs-small); color: var(--ink-3); }
.fc-marks { display: flex; gap: 6px; align-items: center; }
.fc-marks .spacer { flex: 1; }
.fc-learned-n { color: var(--ink-2); font-size: var(--fs-small); margin-left: 6px; }
.fc-timer { font-variant-numeric: tabular-nums; color: var(--ink-2); cursor: pointer; font-size: var(--fs-small); }
.fc-setrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fc-set { background: none; border: 0; color: var(--ref); font-weight: 650; cursor: pointer; padding: 2px 0; text-align: left; }
.fc-set:hover { text-decoration: underline; }
.fc-pos { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.fc-print-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.fc-print-table th, .fc-print-table td { border-bottom: 1px solid #ccc; padding: 3px 6px; text-align: left; vertical-align: top; }
.fc-print-table td.num { text-align: right; }
.fc-pw { font-family: var(--text-greek); } .fc-pw.hebrew { font-family: var(--text-hebrew); }
.fc-cardgrid { display: grid; gap: 0; justify-content: start; }
.fc-pcard { display: grid; place-items: center; text-align: center; padding: 8px; overflow: hidden; }
.fc-pcard.bordered { outline: 1px solid #666; outline-offset: -1px; }
.fc-pface { font-family: var(--text-greek); } .fc-pface.hebrew { font-family: var(--text-hebrew); }
.fc-pback { font-family: var(--text-latin); white-space: pre-line; }
.fc-cardpage { min-height: 11in; }

/* ---------------------------------------------------------------- diagramming module */
.dg-wrap { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
.dg-toolbar .dg-sel { margin-left: auto; color: var(--ink-2); font-size: var(--fs-small); }
.dg-main { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 0; }
.dg-left { display: grid; grid-template-rows: auto auto minmax(0, 1fr); border-right: 1px solid var(--line); min-height: 0; background: var(--panel); }
.dg-lhead { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-weight: 650; font-size: var(--fs-small); color: var(--ink-2); }
.dg-symfilter { margin: 0 8px 6px; width: calc(100% - 16px); }
.dg-symbols { overflow: auto; min-height: 0; padding: 0 4px 6px; }
.dg-sym { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 6px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink); text-align: left; cursor: default; font-size: var(--fs-small); }
.dg-sym:hover { background: var(--bg); border-color: var(--line); }
.dg-sym:focus-visible { outline: 2px solid var(--focus); }
.dg-sym span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-thumb { flex: none; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.dg-right { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.dg-texthead { display: flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--fs-small); font-weight: 650; color: var(--ink-2); }
.dg-texthead span { margin-right: auto; }
.dg-text { max-height: 96px; min-height: 40px; overflow: auto; padding: 6px 10px; background: var(--bg); border-bottom: 1px solid var(--line-strong); line-height: 1.9; }
.dg-text.greek { font-family: var(--text-greek); font-size: 18px; }
.dg-text.hebrew { font-family: var(--text-hebrew); font-size: 20px; }
.dg-text-empty { color: var(--ink-3); font-size: var(--fs-small); font-family: var(--ui); }
.dg-tref { font-family: var(--ui); font-size: var(--fs-small); color: var(--ref); font-weight: 650; }
.dg-chip { display: inline-block; padding: 0 5px; border: 1px solid transparent; border-radius: 5px; cursor: grab; }
.dg-chip:hover { background: var(--sel-bg); border-color: var(--line-strong); }
.dg-chip.sel { background: var(--sel-bg); border-color: var(--sel-strong); }
.dg-scroll { overflow: auto; background: #f4f4f1; min-height: 0; position: relative; outline: none; }
.dg-win.dg-drawing .dg-scroll { cursor: crosshair; }
.dg-canvas { display: block; user-select: none; touch-action: none; }
.dg-canvas:focus-visible { outline: none; }
.dgm-widget .dgm-hit { cursor: move; }
.dgm-widget.sel line:not(.dgm-hit) { stroke: #2b6cd9; }
.dgm-slot { cursor: copy; }
.dgm-slot.over { fill: oklch(0.7 0.14 250 / 0.25); stroke: #2b6cd9; stroke-dasharray: 3 2; }
.dgm-word { cursor: move; }
.dgm-word.sel { fill: #c32 !important; font-weight: 700; }
.dgm-word:hover { fill: #1d56b9; }
.dgm-label.sel polyline:not(.dgm-hit), .dgm-label.sel text { fill: #2b6cd9; stroke: #2b6cd9; }
.dg-selbox { stroke: #2b6cd9; stroke-dasharray: 4 3; stroke-width: 1; }
.dg-handle { fill: #fff; stroke: #2b6cd9; stroke-width: 1.5; cursor: crosshair; }
.dg-band { fill: oklch(0.7 0.14 250 / 0.12); stroke: #2b6cd9; stroke-dasharray: 3 3; }
.dg-guide { stroke: #0aa; stroke-width: 1; stroke-dasharray: 5 3; cursor: grab; }
.dg-guide:hover { stroke-width: 3; }
.dg-printpage { display: grid; justify-items: center; }
.dg-printsvg { max-width: 100%; height: auto; background: #fff; }

/* ---------------------------------------------------------------- NT diagram database */
.dgdb-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
.dgdb-main { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.dgdb-list { overflow: auto; border-right: 1px solid var(--line); background: var(--bg); outline: none; min-height: 0; }
.dgdb-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; }
.dgdb-row:hover { background: var(--panel); }
.dgdb-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.dgdb-l { font-weight: 600; white-space: nowrap; }
.dgdb-s { color: var(--ink-3); font-size: var(--fs-small); white-space: nowrap; }
.dgdb-right { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.dgdb-preview { overflow: auto; padding: 10px 14px; background: #fff; color: #000; min-height: 0; }
.dgdb-ref { font-family: var(--ui); font-weight: 650; margin-bottom: 6px; color: #333; }
.dgdb-notes { max-height: 150px; overflow: auto; border-top: 1px solid var(--line-strong); background: var(--panel); padding: 6px 12px; font-size: var(--fs-small); }
.dgdb-notes:empty { display: none; }
.dgdb-notehead { font-weight: 650; color: var(--ink-2); margin-bottom: 3px; }
.dgdb-notetext { white-space: pre-wrap; line-height: 1.5; }

/* ---------------------------------------------------------------- synopsis */
.sy-wrap { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
.sy-file { font-size: var(--fs-small); color: var(--ink-2); }
.sy-panes { display: grid; grid-template-rows: 38% 6px minmax(0, 1fr); min-height: 0; }
.sy-rows { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.sy-rowhead, .sy-row { display: grid; gap: 8px; padding: 0 10px; align-items: center; }
.sy-rowhead { background: var(--panel); border-bottom: 1px solid var(--line); height: 24px; font-size: var(--fs-small); font-weight: 650; color: var(--ink-2); }
.sy-rowlist { overflow: auto; min-height: 0; outline: none; }
.sy-rowlist:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sy-row { height: 24px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; font-size: var(--fs-small); }
.sy-row:hover { background: var(--panel); }
.sy-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.sy-n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sy-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-c { color: var(--ref); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-edit { width: 100%; height: 100%; border: 0; padding: 8px 10px; font: 13px/1.5 var(--code, ui-monospace, monospace); background: var(--bg); color: var(--ink); resize: none; box-sizing: border-box; grid-row: 1 / -1; }
.sy-split { background: var(--line-strong); cursor: row-resize; }
.sy-split:hover, .sy-split:focus-visible { background: var(--sel-strong); outline: none; }
.sy-cols { display: grid; min-height: 0; overflow: hidden; }
.sy-col { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; border-right: 1px solid var(--line); min-height: 0; }
.sy-col:last-child { border-right: 0; }
.sy-col.blank { background: var(--panel); }
.sy-colhead { display: flex; gap: 8px; align-items: baseline; padding: 4px 10px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.sy-ver { font-weight: 700; color: var(--ink); }
.sy-refs { color: var(--ref); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-colbody { overflow: auto; padding: 6px 10px; min-height: 0; }
.sy-v { cursor: pointer; border-radius: 4px; padding: 2px 4px; }
.sy-v:hover { background: oklch(from var(--sel-bg) l c h / 0.5); }
.sy-v.cur { background: var(--sel-bg); }
.sy-vref { display: block; font-size: var(--fs-small); color: var(--ref); font-weight: 650; }
.sy-none { color: var(--ink-3); font-style: italic; font-size: var(--fs-small); padding: 6px 0; }
.sy-flow .vspan { opacity: 0.55; }
.sy-flow .vspan.in { opacity: 1; background: oklch(from var(--sel-bg) l c h / 0.6); }
.sy-win:not(.sy-editing) .sy-edit { display: none; }

/* ---------------------------------------------------------------- bible outline + browse heading */
.ol-wrap { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
.ol-set { max-width: 330px; }
.ol-main { display: grid; grid-template-columns: 130px minmax(0, 1fr); min-height: 0; }
.ol-books { overflow: auto; border-right: 1px solid var(--line); background: var(--panel); min-height: 0; }
.ol-book { padding: 4px 10px; font-size: var(--fs-small); cursor: default; }
.ol-book:hover { background: var(--bg); }
.ol-book.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); font-weight: 650; }
.ol-heads { overflow: auto; background: var(--bg); min-height: 0; outline: none; }
.ol-head { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 8px; padding: 4px 10px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; }
.ol-head:hover, .ol-pop-row:hover { background: var(--panel); }
.ol-head.sel { background: var(--sel-bg); }
.ol-head.cur, .ol-pop-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); font-weight: 650; }
.ol-ref { color: var(--ref); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ol-edit { font: 12.5px/1.5 var(--code, ui-monospace, monospace); }
.ol-pop { position: fixed; z-index: var(--z-popover, 40); width: 430px; max-height: 360px; overflow: auto; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 12px 32px oklch(0 0 0 / 0.22); }
.ol-pop-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px; padding: 4px 10px; cursor: default; font-size: var(--fs-small); }
.outline-heading { display: inline-flex; align-items: baseline; gap: 2px; margin-left: 10px; max-width: 70%; vertical-align: baseline; }
.oh-title { background: none; border: 0; padding: 0; color: var(--ink-2); font: inherit; font-style: italic; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oh-title:hover { color: var(--ref); text-decoration: underline; }
.oh-drop { background: none; border: 0; padding: 0 4px; color: var(--ink-3); cursor: pointer; font: inherit; }
.oh-drop:hover { color: var(--ink); }

/* ---------------------------------------------------------------- book names, sort orders */
.bn-wrap { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; min-height: 0; }
.bn-files { border-top: 0; }
.bn-file { margin-right: 6px; color: var(--ink-2); font-size: var(--fs-small); }
.bn-file b { color: var(--ink); font-weight: 650; }
.bn-problem { margin: 0; line-height: 1.45; }
.bn-row.custom .bn-name { font-weight: 600; }
.bn-row { display: grid; grid-template-columns: 5em minmax(0, 1.2fr) 6em minmax(0, 1.5fr); gap: 8px; padding: 3px 10px; font-size: var(--fs-small); border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; align-items: center; }
.bn-head { background: var(--panel); font-weight: 650; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.bn-list { overflow: auto; min-height: 0; background: var(--bg); }
.bn-row:not(.bn-head):hover { background: var(--panel); }
.bn-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.bn-row.edited .bn-name::after { content: " (edited)"; color: var(--ref); font-size: 10.5px; }
.bn-code { font-family: var(--mono); color: var(--ink-2); }
.bn-al { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-wrap { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; min-height: 0; gap: 0; padding: 8px 10px; }
.so-vwrap { min-height: 0; overflow: hidden; display: grid; }
.so-vers .td-pick { display: grid; grid-template-columns: 6em minmax(0, 1fr) auto; }
.so-cur { color: var(--ref); font-size: var(--fs-small); }
.so-preview { margin: 6px 0 0; }
dialog.so-dlg { width: 420px; }

/* ---------------------------------------------------------------- program colors */
.pc-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; }
.pc-left { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-right: 1px solid var(--line); min-height: 0; background: var(--panel); }
.pc-lhead { padding: 6px 10px; font-weight: 650; font-size: var(--fs-small); color: var(--ink-2); }
.pc-list { overflow: auto; border: 0; border-radius: 0; background: transparent; min-height: 0; max-height: none; }
.pc-scheme { display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.pc-sw { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden; flex: none; }
.pc-sw i { width: 12px; height: 16px; display: block; }
.pc-right { overflow: auto; padding: 8px 12px; min-height: 0; }
.pc-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 8px; padding: 4px 10px 8px; border: 1px solid var(--line); border-radius: var(--r); }
.pc-mode legend { padding: 0 6px; color: var(--ink-2); font-size: var(--fs-small); font-weight: 600; }
.pc-chart-btn { margin-left: auto; }
.pc-tile.armed .pc-pick { outline: 2px solid var(--sel-strong); outline-offset: 1px; }
.pc-chart-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 10px 12px; gap: 6px; min-height: 0; }
.pc-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; align-content: start; }
.pc-cell { aspect-ratio: 1; min-height: 22px; border: 1px solid oklch(0 0 0 / 0.25); border-radius: 3px; padding: 0; cursor: pointer; }
.pc-cell:hover, .pc-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; position: relative; z-index: 1; }
.pc-chart-read { margin: 0; font-family: var(--mono); min-height: 1.4em; }
.pc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.pc-tile { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: var(--fs-small); }
.pc-pick { width: 34px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: none; cursor: pointer; }
.pc-tl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-hex { color: var(--ink-3); font-family: var(--mono); font-size: 10.5px; }
.pc-morph { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.pc-chip { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 3px; vertical-align: -3px; }
html.bw-scheme .pane-head, html.bw-scheme .toolwin-head { color: var(--bw-head-ink); }
html.bw-scheme .toolwin-head .toolwin-close { color: var(--bw-head-ink); }

/* ---------------------------------------------------------------- greek alias list */
.ga-wrap { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 0; }
.ga-scroll { --ga-row: 26px; overflow: auto; background: var(--bg); position: relative; min-height: 0; outline: none; }
.ga-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ga-body { position: relative; }
.ga-row { position: absolute; left: 0; right: 0; height: var(--ga-row, 26px); display: grid; grid-template-columns: 3.4em minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; }
.ga-row:hover { background: var(--panel); }
.ga-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.ga-row.plus .ga-words::after { content: " (compound)"; color: var(--ink-3); font-family: var(--ui); font-size: 10.5px; }
.ga-n { color: var(--ink-3); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.ga-words { font-family: var(--text-greek); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-filter { width: 230px; }

/* ---------------------------------------------------------------- ermie */
.er-wrap { display: grid; grid-template-rows: auto minmax(0, 46%) minmax(0, 1fr) auto; min-height: 0; }
.er-top .spacer, .xl-bottom .spacer { flex: 1; }
.er-link { background: none; border: 0; color: var(--ref); cursor: pointer; font: inherit; padding: 2px 6px; }
.er-link:hover { text-decoration: underline; }
.er-win.er-m-browser .er-wrap { grid-template-rows: auto 0 minmax(0, 1fr) auto; }
.er-win.er-m-browser .er-catalog { display: none; }
.er-win.er-m-catalog .er-wrap { grid-template-rows: auto minmax(0, 1fr) 0 auto; }
.er-win.er-m-catalog .er-view { display: none; }
.er-catalog { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; border-bottom: 1px solid var(--line-strong); }
.er-lt { display: grid; grid-template-rows: minmax(0, 1fr) auto; border-right: 1px solid var(--line); min-height: 0; }
.er-tree { overflow: auto; background: var(--bg); outline: none; min-height: 0; }
.er-node { display: flex; align-items: center; gap: 2px; height: 24px; cursor: default; font-size: var(--fs-ui); white-space: nowrap; }
.er-node:hover { background: var(--panel); }
.er-node.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.er-node.drop { outline: 2px dashed var(--sel-strong); outline-offset: -2px; }
.er-tw { background: none; border: 0; width: 16px; padding: 0; color: var(--ink-2); cursor: pointer; font-size: 11px; }
.er-ft { overflow: hidden; text-overflow: ellipsis; }
.er-rt { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.er-rhead { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.er-path { font-weight: 650; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-list { overflow: auto; background: var(--bg); min-height: 0; }
.er-item { display: grid; grid-template-columns: 18px minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; padding: 4px 10px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; align-items: center; }
.er-item:hover { background: var(--panel); }
.er-item.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.er-ic { color: var(--ink-3); }
.er-it { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-ip { color: var(--ink-3); font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: var(--bg); }
.er-view > .an-empty { grid-row: 1 / -1; align-self: center; }
.er-vbar { display: flex; gap: 10px; align-items: center; padding: 4px 10px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.er-vurl { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.er-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.er-vhint { margin: 0; padding: 3px 10px; }
.er-adddlg { width: 460px; }
.er-add fieldset { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 8px 10px; display: grid; gap: 6px; }
.er-add legend { font-weight: 650; font-size: var(--fs-small); padding: 0 4px; }

/* ---------------------------------------------------------------- external links manager */
.xl-wrap { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; min-height: 0; }
.xl-main { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 0; }
.xl-left { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-right: 1px solid var(--line); min-height: 0; background: var(--panel); }
.xl-lhead { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-weight: 650; font-size: var(--fs-small); }
.xl-lhead button:first-of-type { margin-left: auto; }
.xl-list { overflow: auto; background: var(--bg); min-height: 0; outline: none; }
.xl-row { display: flex; gap: 8px; padding: 4px 10px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; align-items: center; font-size: var(--fs-small); }
.xl-row:hover { background: var(--panel); }
.xl-row.sel { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); }
.xl-row:not(.on) .xl-name { color: var(--ink-3); }
.xl-on { color: var(--lemma); }
.xl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xl-right { overflow: auto; padding: 10px 14px; min-height: 0; }
.xl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xl-bottom { border-top: 1px solid var(--line); border-bottom: 0; }
.pc-tiles > .td-hint { grid-column: 1 / -1; }
.er-view > .an-empty { justify-self: center; }
html.bw-scheme .pane-head button { color: var(--bw-head-ink); opacity: 0.8; }
html.bw-scheme .pane-head button:hover { color: var(--bw-head-ink); opacity: 1; }
.td-form .td-check { display: inline-flex; }
.td-dlg .td-menubar { margin: -2px -2px 8px; border-radius: 6px; }

.dgdb-preview svg { display: block; max-width: none; }
.dgdb-zoom { width: 96px; }

.fc-quizdlg { width: 460px; }
.fc-qface { min-height: 76px; border: 1px solid var(--line-strong); border-radius: 8px; display: grid; place-items: center; font-size: 30px; padding: 10px; background: var(--bg); }
.fc-qans { min-height: 76px; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 8px 12px; white-space: pre-line; font-family: var(--text-latin); font-size: 16px; color: var(--ink-3); }
.fc-qans.on { color: var(--ink); border-style: solid; }
.fc-qscore { margin-left: auto; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fc-fontbar { align-items: center; gap: 2px; }
.fc-fontlbl { padding: 0 8px; font-size: var(--fs-small); color: var(--chrome-ink-2); }
.fc-font.on { background: var(--chrome-hover); }

/* ---- tool-data windows, round 5 (Diagrammer notes tab, Leedy box, disconnect marker, Timeline caption handle, Flashcards record button and parts of speech, Ermie preview and Edit Item) */
.td-multi { display: grid; max-height: 150px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 2px 0; }
.td-multi-row { display: grid !important; grid-template-columns: 18px auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 2px 8px; font-size: var(--fs-ui); color: var(--ink); }
.td-multi-row:hover { background: var(--panel); }
.td-multi-l { font-weight: 600; white-space: nowrap; }
.td-multi .td-pick-s { text-align: right; }

.fc-nav button.fc-rec.on { background: oklch(0.62 0.2 25 / 0.2); border-color: oklch(0.55 0.22 25); animation: fc-rec-pulse 1s ease-in-out infinite; }
@keyframes fc-rec-pulse { 50% { box-shadow: 0 0 0 3px oklch(0.62 0.2 25 / 0.35); } }
@media (prefers-reduced-motion: reduce) { .fc-nav button.fc-rec.on { animation: none; } }
.fc-nav .fc-smaller, .fc-nav .fc-larger { width: 30px; padding: 0; font-weight: 650; }
.fc-size { color: var(--ink-2); font-size: var(--fs-small); min-width: 44px; }
.fc-nav .td-sep { margin: 0 2px; }

.tl-handle { cursor: nwse-resize; }

.dg-tabs { display: flex; gap: 2px; padding: 3px 8px 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.dg-tabs[hidden], .dg-notes[hidden], .er-prev[hidden] { display: none; }
.dg-tab { border: 1px solid var(--line); border-bottom: 0; background: var(--panel-2, var(--panel)); color: var(--ink-2); padding: 3px 12px; border-radius: 6px 6px 0 0; font-size: var(--fs-small); cursor: pointer; }
.dg-tab.on { background: var(--bg); color: var(--ink); font-weight: 650; box-shadow: inset 0 2px 0 var(--sel-strong); }
.dg-notes { overflow: auto; padding: 14px 20px; background: var(--bg); color: var(--ink); white-space: pre-wrap; line-height: 1.6; font-family: var(--text-latin); font-size: 15px; min-height: 0; }
.dg-leedy { display: inline-flex; align-items: center; gap: 4px; }
.dg-leedy .ctl { height: 26px; }
.dg-ghost { user-select: none; }
.dg-win.dg-drawing .dg-scroll { cursor: crosshair; }
.dg-guide-hit { cursor: grab; }
.dg-order-row { display: flex; align-items: center; }
.dg-disc circle { cursor: pointer; }

.er-rootdrop { display: none; margin: 6px 8px; padding: 6px 10px; border: 2px dashed var(--line-strong); border-radius: var(--r); color: var(--ink-2); font-size: var(--fs-small); text-align: center; }
.er-tree.er-dragging .er-rootdrop { display: block; }
.er-rootdrop.drop { border-color: var(--sel-strong); background: var(--sel-bg); color: var(--ink); }
.er-new { animation: er-new-flash 1.6s ease-out 1; }
@keyframes er-new-flash { from { background: var(--sel-bg); box-shadow: inset 3px 0 0 var(--sel-strong); } }
.er-prev { display: grid; grid-template-rows: minmax(0, 1fr); height: 210px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); overflow: hidden; }
.er-prev .er-frame { height: 100%; }
.er-noview { padding: 14px 16px; background: var(--bg); color: var(--ink); font-size: var(--fs-ui); }
.er-noview p { margin: 0 0 8px; }
.er-edititem { width: 640px; max-width: 94vw; }
.er-edititem footer { flex-wrap: wrap; }
.er-adddlg { max-height: 94vh; overflow: auto; }

.vdc { padding: 12px 14px 16px; display: grid; gap: 10px; }
.vdc fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; }
.vdc legend { font-weight: 650; padding: 0 4px; color: var(--ink); }
.vdc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vdc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 14px; align-items: center; }
.vdc-field { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 6px; }
.vdc-field span { color: var(--ink-2); }
.vdc-field input, .vdc-field select { min-width: 0; width: 100%; box-sizing: border-box; }
.vdc-hyp { margin-top: 6px; }
.vdc-check { display: flex; align-items: center; gap: 4px; }
.vdc-hint { margin: 6px 0 0; color: var(--ink-2); }
.vdc-hint code { font-family: var(--mono); }
.vdc-raw { color: var(--ink-2); }
.vdc-log { margin: 8px 0 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  max-height: 180px; overflow: auto; font: 12px/1.5 var(--mono); white-space: pre-wrap; }
.vdc-edit { width: min(800px, 80vw); height: 60vh; font: 13px/1.5 var(--mono); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px; }

/* vsupport: X-Refs tab, Version Info, Parallel Versions, TSK / Nave's / Torrey's / Thompson / Biographical Bible, Targum variants. */

/* ------------------------------------------------------------ X-Refs */
.xr-txt sup.xr, .xr-pop sup.xr, .tp-txt sup.xr, .pvl sup.xr { display: none; }   /* note anchors a, b, c: not needed in a one-line text */
.xr-tabbody { padding: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr); }
.xrv { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; height: 100%; background: var(--bg); }
.toolwin .xrv { height: 100%; }
.xr-head { display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.xr-head .xr-db { flex: 1 1 130px; min-width: 0; }
.xr-head .xr-ver { width: 118px; }
.xr-cur { font-variant-numeric: tabular-nums; color: var(--ref); font-weight: 600; }
.xr-cur.held { background: var(--hit-bg); color: var(--hit-ink); border-color: var(--sel-strong); }
.xr-body { overflow: auto; padding: 4px 0 24px; outline: none; font-size: var(--fs-ui); }
.xrv.small .xr-body { font-size: var(--fs-small); }
.xrv.frozen .xr-head { box-shadow: inset 0 -2px 0 var(--sel-strong); }
.xr-foot { padding: 3px 10px; font-size: var(--fs-small); color: var(--ink-2); border-top: 1px solid var(--line); background: var(--panel); font-variant-numeric: tabular-nums; }
.xr-verse { padding: 6px 10px 2px; font-weight: 650; color: var(--ref); border-bottom: 1px solid var(--line); margin-top: 6px; }
.xr-sec { background: oklch(0.88 0.06 258); color: oklch(0.25 0.08 258); padding: 3px 10px; margin-top: 6px; font-weight: 600; line-height: 1.45; }
.xr-sec.topic { background: oklch(0.8 0.08 258); }
.xr-sec.l1 { margin-left: 14px; background: oklch(0.92 0.04 258); font-weight: 500; }
.xr-sec .xr-tag { display: inline-block; min-width: 1.4em; margin-right: 6px; color: var(--ref-strong); }
.xr-sec .xr-link { color: var(--ref-strong); text-decoration: underline; }
.xr-title { font-weight: 700; }
.xr-note { margin: 6px 10px; padding: 6px 8px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .xr-sec { background: oklch(0.33 0.07 258); color: oklch(0.93 0.03 258); }
  :root:not([data-theme="light"]) .xr-sec.topic { background: oklch(0.4 0.08 258); }
  :root:not([data-theme="light"]) .xr-sec.l1 { background: oklch(0.28 0.05 258); }
}
:root[data-theme="dark"] .xr-sec { background: oklch(0.33 0.07 258); color: oklch(0.93 0.03 258); }
:root[data-theme="dark"] .xr-sec.topic { background: oklch(0.4 0.08 258); }
:root[data-theme="dark"] .xr-sec.l1 { background: oklch(0.28 0.05 258); }
.xr-ref { display: flex; gap: 8px; align-items: baseline; padding: 2px 10px 2px 22px; cursor: default; content-visibility: auto; contain-intrinsic-size: auto 24px; border-left: 3px solid transparent; }
.xr-ref:hover { background: var(--panel); }
.xr-ref.sel { background: var(--sel-bg); border-left-color: var(--sel-strong); }
.xr-ref .xr-lab { flex: none; min-width: 5.6em; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ref); }
.xr-ref.cur .xr-lab { color: var(--err-ink); }          /* the Browse Window's own verse is red in the original */
.xr-ref.star .xr-lab::after { content: " *"; color: var(--ink-3); }
.xr-ref .xr-vid { flex: none; font: 600 10.5px var(--ui); color: var(--label); width: 34px; }
.xr-ref .xr-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.45; max-width: none; }
.xr-ref .xr-txt.greek { font-size: 15px; }
.xr-ref .xr-txt.hebrew { font-size: 17px; }
.xr-ref .xr-txt.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xr-ref .xr-txt.missing { color: var(--ink-3); font-style: italic; }
.xr-ref .xr-txt sup.vn { color: var(--ref); font: 600 9.5px var(--ui); margin-right: 2px; }
.xrv.arranging .xr-ref { cursor: grab; }
.xr-ref.dropbefore { box-shadow: 0 -2px 0 var(--sel-strong); }
.xr-notes { padding: 8px 12px; font: 13.5px/1.6 var(--ui); max-width: 80ch; }
.xr-notes a.ref, .xr-notes .ref { color: var(--link); cursor: pointer; text-decoration: none; }
.xr-notes a.ref:hover { text-decoration: underline; }
.xr-pop { position: fixed; z-index: var(--z-tip); max-width: 520px; padding: 8px 10px; border-radius: 8px; background: var(--panel);
  border: 1px solid var(--line-strong); box-shadow: 0 8px 24px oklch(0 0 0 / 0.2); pointer-events: none; }
.xr-pop b { display: block; color: var(--ref); margin-bottom: 2px; font-size: 12px; }
.xr-pop .vtext { max-width: none; font-size: 14.5px; }
/* dialogs */
.xr-dlg { display: grid; gap: 8px; }
.xr-dlg label { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; }
.xr-dlg .xr-row { display: flex; gap: 18px; }
.xr-dlg .xr-row label { grid-template-columns: 1fr; gap: 3px; }
.xr-dlg .xr-radio { display: block; padding: 2px 0; }
.xr-dlg fieldset { border: 1px solid var(--line); border-radius: 8px; }
.xr-dlg .xr-tags { margin: 0; padding: 6px 10px; background: var(--panel); border-radius: 6px; font: 12px/1.5 var(--mono); }
.xr-dlg .xr-sample { min-height: 32px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.xr-dlg .xr-err { color: var(--err-ink); min-height: 18px; }
.xr-dlg .xr-hint { color: var(--ink-3); }
.xr-dlg small { color: var(--ink-3); }

/* ------------------------------------------------------------ Version Info */
.vi { display: block; }
.vi-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 10px; }
.vi-name { font-weight: 650; flex: 1 1 100%; order: 5; min-width: 0; }
.vi-grid { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .vi-grid { grid-template-columns: 1fr; } }
.vi-grid h3, .analysis-body section > h3 { font-size: var(--fs-small); color: var(--ink-2); margin: 0 0 6px; font-weight: 650; }
.vi-stats th { width: 55%; }
.vi-caution { color: var(--ink-3); font-size: var(--fs-small); line-height: 1.5; }
.vi-desc { font: 13px/1.55 var(--ui); max-height: 300px; overflow: auto; padding-right: 6px; }
.vi-desc p { margin: 0 0 6px; }
.vi-books { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: var(--fs-small); color: var(--ink-2); }
.vi-book b { color: var(--ref); font-family: var(--mono); font-size: 11px; }
.vi-more { margin-top: 10px; }
.vi-more summary { cursor: pointer; color: var(--ink-2); font-size: var(--fs-small); font-weight: 600; margin-bottom: 6px; }

/* ------------------------------------------------------------ Parallel Versions */
.pvl { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.pvl-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.pvl-spin { padding: 0 7px; }
.pvl-opt { display: inline-flex; gap: 4px; align-items: center; margin-left: 8px; font-size: var(--fs-small); color: var(--ink-2); }
.pvl-area { overflow: auto; min-height: 0; }
.pvl-grid { display: grid; grid-template-columns: repeat(var(--pvl-n), minmax(190px, 1fr)); }
.pvl-row { display: contents; }
.pvl-colhead { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; align-items: baseline; padding: 5px 10px; background: var(--chrome-3); color: var(--chrome-ink);
  border-right: 1px solid var(--chrome-2); font-size: var(--fs-small); overflow: hidden; white-space: nowrap; }
.pvl-colhead b { color: var(--chrome-ink); }
.pvl-colhead span { color: var(--chrome-ink-2); overflow: hidden; text-overflow: ellipsis; }
.pvl-x { margin-left: auto; background: none; border: 0; color: var(--chrome-ink-2); cursor: pointer; }
.pvl-cell { scroll-margin-top: 34px; padding: 5px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; }
.pvl-cell.empty { color: var(--ink-3); text-align: center; }
.pvl-cell.cur { background: var(--sel-bg); }
.pvl-v { display: flex; gap: 6px; align-items: baseline; }
.pvl-n { flex: none; color: var(--ref); font: 600 10.5px var(--ui); min-width: 1.6em; font-variant-numeric: tabular-nums; }
.pvl .vtext { max-width: none; font-size: 15px; }
.pvl .vtext.greek { font-size: 16px; }
.pvl .vtext.hebrew { font-size: 19px; }
.pvl-cols { display: grid; grid-template-columns: repeat(var(--pvl-n), minmax(190px, 1fr)); height: 100%; }
.pvl-col { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.pvl-scroll { overflow: auto; min-height: 0; }
.pvl-area:not(.synced) { overflow: hidden; }
dialog.bw:has(.pvl-pick) { width: min(860px, 94vw); }   /* the chooser needs two lists and the buttons between them */
.pvl-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; }
.pvl-pick > div { min-width: 0; }
.pvl-pick h4 { margin: 0 0 4px; font-size: var(--fs-small); color: var(--ink-2); }
.pvl-list { height: 300px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 6px; }
.pvl-item { display: flex; gap: 8px; padding: 2px 8px; cursor: default; }
.pvl-item b { min-width: 50px; color: var(--ref); }
.pvl-item span { min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvl-item.sel { background: var(--sel-bg); }
.pvl-btns { display: grid; align-content: center; gap: 6px; }

/* ------------------------------------------------------------ TSK / topical browsers */
.tp { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.tp-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tp-bar .tp-search { flex: 1 1 180px; min-width: 120px; }
.tp-count, .tp-bar .tp-head { color: var(--ink-2); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.tp-head { flex: 1; }
.tp h4 { margin: 8px 8px 2px; font-size: var(--fs-small); color: var(--ink-2); font-weight: 650; }
.tp-two { display: grid; grid-template-columns: minmax(200px, 38%) minmax(0, 1fr); min-height: 0; }
.tp-two > div, .tp-grid > div { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.tp-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 280px; min-height: 0; }
.tp-c1 { grid-template-rows: auto minmax(0, 2fr) auto minmax(0, 1fr) !important; }
.tp-list { overflow: auto; margin: 0 8px 8px; border: 1px solid var(--line-strong); border-radius: 6px; min-height: 0; }
.tp-item { padding: 2px 8px; cursor: default; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); }
.tp-item:hover { background: var(--panel); }
.tp-item.sel { background: var(--sel-bg); }
.tp-star { color: var(--ref); font-weight: 700; }
.tp-ref { display: flex; gap: 8px; padding: 2px 8px; border-bottom: 1px solid oklch(from var(--line) l c h / 0.5); cursor: default; align-items: baseline; }
.tp-ref:hover { background: var(--panel); }
.tp-ref.sel { background: var(--sel-bg); }
.tp-ref.cur { background: var(--hit-bg); color: var(--hit-ink); }
.tp-ref .ref { flex: none; color: var(--ref); font-weight: 600; min-width: 5.4em; }
.tp-ref .tp-txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-text { overflow: auto; margin: 0 8px 8px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; line-height: 1.6; font-size: 14px; min-height: 0; }
.tp-title { margin: 0 0 6px; font-size: 17px; }
.tp-sec { margin-top: 8px; font-weight: 600; color: var(--ink); }
.tp-sr { margin: 2px 0 4px 10px; color: var(--ink-2); }
.tp-link { color: var(--ref); text-decoration: none; }
.tp-link:hover { text-decoration: underline; }
.tp-more { padding: 4px 8px; color: var(--ink-3); font-size: var(--fs-small); }

/* ------------------------------------------------------------ verse maps editor */
.vm { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.vm-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.vm-status { margin-left: auto; color: var(--ink-3); font-size: var(--fs-small); }
.vm-wrap { overflow: auto; }
.vm-row { cursor: default; }
.vm-row.sel td { background: var(--sel-bg); }
.vm-f { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: center; }

/* ------------------------------------------------------------ Targum variants */
.vtext .e { font: 600 0.55em var(--ui); vertical-align: super; color: var(--ink-3); margin: 0 1px; }
body:not(.tv-numbers) .vtext .e { display: none; }
body.tv-colors .vtext .tv-1 { color: var(--tv-fg-1, inherit); background: var(--tv-bg-1, transparent); }
body.tv-colors .vtext .tv-2 { color: var(--tv-fg-2, inherit); background: var(--tv-bg-2, transparent); }
body.tv-colors .vtext .tv-3 { color: var(--tv-fg-3, inherit); background: var(--tv-bg-3, transparent); }
body.tv-colors .vtext .tv-4 { color: var(--tv-fg-4, inherit); background: var(--tv-bg-4, transparent); }
body.tv-colors .vtext .tv-5 { color: var(--tv-fg-5, inherit); background: var(--tv-bg-5, transparent); }
body.tv-colors .vtext .tv-6 { color: var(--tv-fg-6, inherit); background: var(--tv-bg-6, transparent); }
body.tv-colors .vtext .tv-7 { color: var(--tv-fg-7, inherit); background: var(--tv-bg-7, transparent); }
body.tv-colors .vtext .tv-8 { color: var(--tv-fg-8, inherit); background: var(--tv-bg-8, transparent); }
body.tv-colors .vtext .tv-9 { color: var(--tv-fg-9, inherit); background: var(--tv-bg-9, transparent); }
.tv-dlg { display: grid; gap: 8px; }
.tv-grid { display: grid; grid-template-columns: 28px 90px 110px; gap: 4px 12px; align-items: center; }
.tv-i { color: var(--ink-3); text-align: right; }
.tv-grid input[type=color] { width: 70px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: none; }
.tv-sample { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 18px; }

/* version copyright window (RTFINFO) and database information (ABOUTINFO) */
dialog.bw:has(.vi-dbinfo) { width: min(1000px, 94vw); }
.vi-rtfbox { display: flex; gap: 12px; align-items: flex-start; max-height: 60vh; overflow: auto; }
.vi-rtficon { flex: none; font-size: 26px; line-height: 1; color: var(--ref); }
.vi-rtf { font: 13px/1.55 var(--ui); min-width: 0; }
.vi-rtf p { margin: 0 0 6px; }
.vi-dbwrap { max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.vi-dbinfo-table td, .vi-dbinfo-table th { padding: 3px 8px; }
.vi-dbinfo-table .vi-off { color: var(--ink-3); }
.vi-head .btn { flex: none; }

/* Treasury of Scripture Knowledge text (tskdic.dat): chapter outline, keyword notes, book essays */
.xr-outline { list-style: none; margin: 6px 10px 2px; padding: 6px 8px; font: 13px/1.5 var(--ui); color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; }
.xr-outline li { display: flex; gap: 8px; }
.xr-outline .xr-vn { min-width: 2.2em; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.xr-text { margin: 2px 10px 4px 24px; font: 13px/1.55 var(--ui); color: var(--ink-2); max-width: 80ch; }
.xr-essay { margin: 8px 12px; font: 13.5px/1.6 var(--ui); max-width: 80ch; }
.xr-essay.head { font-weight: 600; margin-top: 14px; }
.xr-strong { font-size: 0.75em; color: var(--ink-3); }

/* notice window (RTFINFO / RTFINFOPIC) */
.vi-rtfdlg { max-width: min(640px, 94vw); }
.vi-rtfdlg .dlg-body { padding: 14px 16px; }
.vi-rtfbox.pic { align-items: flex-start; }
.vi-rtfpic { flex: none; padding-top: 2px; }
.vi-rtfpic img { display: block; max-width: 160px; height: auto; }
.vi-rtf img.rtf-pic { max-width: 100%; height: auto; vertical-align: middle; }
.vi-rtf { min-width: 320px; }
.vi-hide { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 12px; color: var(--ink-2); }
.vi-rtfdlg footer { align-items: center; }
.vi-auto { display: flex; align-items: center; gap: 4px; margin: 6px 0 10px; font-size: 12px; color: var(--ink-2); }
.vi-auto .btn { margin-left: 10px; }

/* Round 5 additions of the vsupport feature (kept apart from css/vsupport.css, which belongs to the core). */
.xr-sec.xr-linked { cursor: pointer; }
.xr-sec.xr-linked:hover { filter: brightness(0.96); }
.xr-sec.xr-linked:focus-visible { outline: 2px solid var(--sel-strong); outline-offset: -2px; }
.xr-sec .xr-more { float: right; margin-left: 10px; font-weight: 700; color: var(--ref-strong); }
.xr-body.dropend { box-shadow: inset 0 -3px 0 var(--sel-strong); }
.xr-ref[draggable="true"]:active { cursor: grabbing; }
.pvl-menu-btn { margin-left: auto; }
.tp-see { color: var(--link); cursor: pointer; text-decoration: underline dotted; }
.tp-see:hover { text-decoration: underline; }
.pvl-vb { flex: 1; min-width: 0; }
.pvl-vb .vnotes { margin: 4px 0 0 0; max-width: none; }

/* Workspace area: Editor, notes, user lexicon, EPUB, options, keyboards, popups. Uses the app tokens from app.css. */

/* ---------------------------------------------------------------- Analysis tab hosting */
#analysis-body.ws-fill { padding: 0; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
#analysis-body.ws-fill > .ws-tab { flex: 1; min-height: 0; }

/* ---------------------------------------------------------------- rich editor */
.rich { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); color: var(--ink); height: 100%; }
.rich-window { height: 100%; }
.rich-menubar { display: flex; gap: 2px; padding: 2px 6px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.rich-menu { background: none; border: 0; padding: 3px 8px; border-radius: 4px; cursor: default; }
.rich-menu:hover { background: var(--panel-2); }
.rich-toolbar { flex: none; background: var(--panel); border-bottom: 1px solid var(--line); padding: 3px 4px; display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.rich-toolbar .rt-rows { display: flex; flex-wrap: nowrap; gap: 2px 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; min-width: 0; flex: 1; padding-bottom: 2px; }
.rich-toolbar.expanded .rt-rows { flex-wrap: wrap; overflow: visible; }
.rt-group { flex: none; }
.rt-wrap { flex: none; }
.rt-group { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--line); }
.rt-group:last-child { border-right: 0; }
.rt-btn { min-width: 26px; height: 26px; padding: 0 4px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; }
.rt-btn:hover { background: var(--panel-2); border-color: var(--line); }
.rt-btn[aria-pressed="true"] { background: var(--sel-bg); border-color: var(--sel-strong); }
.rt-btn:focus-visible { outline: 2px solid var(--focus); }
.rt-glyph { font: 600 13px/1 var(--ui); }
.rt-glyph.b { font-weight: 800; } .rt-glyph.i { font-style: italic; font-family: Georgia, serif; } .rt-glyph.u { text-decoration: underline; } .rt-glyph.s { text-decoration: line-through; }
.rt-split { display: inline-flex; }
.rt-split .rt-btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rt-split .rt-dd { min-width: 14px; padding: 0 1px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; }
.rt-swatch { display: block; width: 14px; height: 3px; border-radius: 1px; margin-top: 1px; background: currentColor; }
.rt-btn:has(.rt-swatch) { grid-template-rows: auto auto; gap: 0; padding-top: 2px; }
.rt-sel { height: 26px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg); color: var(--ink); font-size: 12px; max-width: 120px; }
.rt-size { max-width: 64px; }
.rt-ref { width: 110px; height: 26px; }
.rich-body {
  flex: 1; min-height: 120px; overflow: auto; padding: 12px 16px 32px; outline: none; font: 15px/1.6 var(--text-latin); background: var(--bg); color: var(--ink);
  caret-color: var(--sel-strong); overflow-wrap: anywhere;
}
.rich-body:empty::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; }
.rich-body p { margin: 0 0 0.6em; }
.rich-body table { border-collapse: collapse; margin: 6px 0; }
.rich-body td, .rich-body th { border: 1px solid var(--line-strong); padding: 4px 8px; vertical-align: top; }
.rich-body a { color: var(--link); text-decoration: underline; cursor: pointer; }
.rich-body a.bwlink { background: oklch(from var(--link) l c h / 0.08); border-radius: 3px; }
.rich-body img { max-width: 100%; }
.rich-body hr { margin: 10px 0; }
.rich-body ul, .rich-body ol { padding-left: 1.6em; margin: 0 0 0.6em; }
.rich-body blockquote { border-left: 3px solid var(--line-strong); margin: 0 0 0.6em 4px; padding-left: 10px; color: var(--ink-2); }
.rich.focused .rich-body { box-shadow: inset 0 0 0 1px oklch(from var(--focus) l c h / 0.35); }
.rich-status { flex: none; display: flex; gap: 14px; padding: 3px 10px; background: var(--panel); border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); }
.rich-status .rs-file { margin-right: auto; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rich.dirty .rs-dirty { color: var(--code); }
.rt-palette { position: fixed; z-index: var(--z-popover); display: grid; grid-template-columns: repeat(8, 22px); gap: 4px; padding: 8px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px oklch(0 0 0 / 0.2); }
.rt-chip { width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--line-strong); cursor: pointer; padding: 0; }
.rt-custom-l { grid-column: 1 / -1; font-size: var(--fs-small); color: var(--ink-2); display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- notes tab */
.ws-note-head { flex: none; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); display: grid; gap: 5px; }
.ws-note-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ws-note-file { font: 600 12px var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-note-file.exists { color: var(--ref); }
.ws-note-empty { padding: 0 16px 10px; color: var(--ink-3); font-size: var(--fs-small); }
.ws-spacer { flex: 1; }
.ws-tabflag { margin-left: 3px; color: var(--ref); font-weight: 700; font-size: 10.5px; vertical-align: super; }
.ws-note-dot { margin-left: 6px; border: 0; background: none; color: var(--link); cursor: pointer; font-size: 12px; padding: 0 3px; border-radius: 3px; }
.ws-note-dot:hover { background: var(--panel-2); }
.verse-block.has-note { box-shadow: inset 3px 0 0 var(--link); }
.browse-mode .vspan.has-note .vn { color: var(--link); }
.ws-chapnote { border: 1px solid var(--line-strong); background: var(--panel); color: var(--link); border-radius: 999px; font-size: var(--fs-small); padding: 1px 9px; cursor: pointer; }
.ws-sb-notes { display: inline-flex; gap: 1px; margin-right: 6px; }
.ws-sb-flag { display: inline-block; background: none; border: 0; padding: 1px 6px; border-radius: 4px; color: oklch(from var(--chrome-ink-2) l c h / 0.45); font: 700 11px var(--ui); cursor: pointer; }
.ws-sb-flag.on { color: oklch(0.86 0.12 95); }

/* ---------------------------------------------------------------- shared form bits */
.ws-form { display: grid; gap: 10px; }
.ws-field { display: grid; gap: 3px; font-size: var(--fs-small); color: var(--ink-2); }
.ws-field > span { font-weight: 600; }
.ws-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ws-fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; display: grid; gap: 6px; }
.ws-fieldset legend { padding: 0 6px; color: var(--ink-2); font-size: var(--fs-small); font-weight: 600; }
.ws-grid3 { display: grid; grid-template-columns: 1.4fr 1fr 0.6fr; gap: 8px; }
.ws-muted { color: var(--ink-3); font-size: var(--fs-small); }
.ws-right { margin-left: auto; }
.ws-actions { justify-content: flex-end; }
.ws-list { border: 1px solid var(--line); border-radius: 8px; max-height: 46vh; min-height: 120px; overflow: auto; background: var(--bg); }
.ws-list-h { padding: 5px 10px; font: 600 11px var(--ui); color: var(--ink-3); background: var(--panel); border-bottom: 1px solid var(--line); text-transform: none; }
.ws-item { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; border: 0; border-bottom: 1px solid oklch(from var(--line) l c h / 0.6); background: none; padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.ws-item:hover { background: var(--panel); }
.ws-item.sel { background: var(--sel-bg); }
.ws-item .ws-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ws-sample { border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-align: center; background: var(--bg); }
.ws-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 2px; max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; font-size: 20px; }
.ws-char { height: 34px; border: 0; background: none; color: var(--ink); border-radius: 4px; cursor: pointer; font: inherit; }
.ws-char:hover { background: var(--sel-bg); }

/* ---------------------------------------------------------------- user lexicon */
.ws-lex-head { font-size: 18px; min-height: 28px; display: flex; align-items: baseline; gap: 6px; }
.ws-lex-key { font-family: var(--text-greek); font-size: 22px; font-weight: 600; color: var(--lemma); }
.ws-lex-key.hebrew { font-family: var(--text-hebrew); font-size: 26px; }
.ws-lex-key.english { font-family: var(--text-latin); font-size: 20px; }

/* ---------------------------------------------------------------- Options window */
dialog.bw.ws-options { width: min(1020px, 96vw); max-width: 96vw; height: min(720px, 92vh); max-height: 92vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog.bw.ws-options .dlg-body { padding: 0; max-height: none; overflow: hidden; }
.ws-optwrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); height: 100%; min-height: 0; }
.ws-optnav { overflow: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 8px 6px 16px; }
.ws-optgroup { margin: 12px 8px 3px; font: 650 10.5px var(--ui); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.ws-optitem { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: 5px 10px; border-radius: 6px; cursor: pointer; font: inherit; }
.ws-optitem:hover { background: var(--panel-2); }
.ws-optitem.on { background: var(--sel-bg); font-weight: 600; box-shadow: inset 2px 0 0 var(--sel-strong); }
.ws-optmain { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; min-width: 0; }
.ws-opttitle { margin: 0; padding: 12px 18px 8px; font: 650 14px var(--ui); color: var(--ink); border-bottom: 1px solid var(--line); }
.ws-optpane { overflow: auto; padding: 14px 18px 28px; min-height: 0; }
.ws-sec { display: grid; gap: 8px; margin-bottom: 16px; }
.ws-sec > h3 { margin: 0; font: 650 12px var(--ui); color: var(--ink-2); text-transform: none; }
.ws-note { margin: 0; line-height: 1.5; max-width: 72ch; }
.ws-check { align-items: flex-start; }
.ws-check input { margin-top: 3px; accent-color: var(--sel-strong); }
.ws-check small { display: block; color: var(--ink-3); font-size: var(--fs-small); line-height: 1.4; }
.ws-check small.why { color: var(--ink-3); font-style: italic; }
.ws-check.off span { color: var(--ink-3); }
.ws-radios { display: grid; gap: 4px; }
.ws-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; align-items: start; }
.ws-cat { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--bg); }
.ws-cat > summary { cursor: pointer; padding: 7px 12px; font-weight: 600; list-style: none; }
.ws-cat > summary::before { content: '\25b8'; display: inline-block; width: 14px; color: var(--ink-3); transition: transform 120ms; }
.ws-cat[open] > summary::before { transform: rotate(90deg); }
.ws-cat-body { display: grid; gap: 7px; padding: 4px 14px 12px 28px; border-top: 1px solid var(--line); padding-top: 10px; }
.ws-split { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 16px; }
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; align-content: start; }
.ws-tile { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.ws-color, input[type=color] { width: 32px; height: 24px; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: none; cursor: pointer; }
.ws-sw { display: inline-grid; place-items: center; width: 28px; height: 20px; border-radius: 4px; font: 600 11px var(--ui); }
.ws-preview { margin: 0; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; max-height: 180px; overflow: auto; }
.ws-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 10px; }
.ws-bookgrid { display: grid; gap: 8px; }
.ws-tall { max-height: 52vh; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; min-height: 28px; }
.ws-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border-radius: 999px; background: var(--sel-bg); font-weight: 600; font-size: 12px; }
.ws-x { border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 50%; width: 18px; height: 18px; padding: 0; }
.ws-x:hover { background: var(--panel-2); }
.ws-tablewrap { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.ws-names td, .ws-names th { white-space: nowrap; font-size: 12px; padding: 3px 6px; }
.ws-names tr:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ws-fonts td, .ws-fonts th { vertical-align: middle; }

/* ---------------------------------------------------------------- effects of options on the main windows */
:root { --vref-weight: 650; --tb-k: 1; }
.verse-block .vref { font-weight: var(--vref-weight); }
.vtext { font-weight: var(--fw-english, 400); font-style: var(--fi-english, normal); }
.vtext.greek { font-weight: var(--fw-greek, 400); font-style: var(--fi-greek, normal); }
.vtext.hebrew { font-weight: var(--fw-hebrew, 400); font-style: var(--fi-hebrew, normal); }
.vline[data-lg="cyrillic"] .vtext, .vspan[data-lg="cyrillic"] { font-family: var(--text-cyrillic); font-size: var(--fs-cyrillic); }
.vline[data-lg="central"] .vtext, .vspan[data-lg="central"] { font-family: var(--text-central); font-size: var(--fs-central); }
.vline[data-lg="vietnamese"] .vtext, .vspan[data-lg="vietnamese"] { font-family: var(--text-vietnamese); font-size: var(--fs-vietnamese); }
.vline[data-lg="hebtrans"] .vtext { font-family: var(--text-hebtrans); font-size: var(--fs-hebtrans); }
.res-row .kwic { font-family: var(--sf-english, var(--text-latin)); font-size: var(--sw-english, 14px); }
.res-row .kwic.greek { font-family: var(--sf-greek, var(--text-greek)); font-size: var(--sw-greek, 15px); }
.res-row .kwic.hebrew { font-family: var(--sf-hebrew, var(--text-hebrew)); font-size: var(--sw-hebrew, 17px); }
.cmdline { font-family: var(--sf-english, var(--text-latin)); }
.cmdline.greek { font-family: var(--sf-greek, var(--text-greek)); }
.cmdline.hebrew { font-family: var(--sf-hebrew, var(--text-hebrew)); }
.an-word { font-size: var(--aw-greek, 22px); }
.an-word.hebrew { font-size: var(--aw-hebrew, 26px); }
.an-lex { font-size: var(--aw-english, 15px); }
.vline.ws-sv .w.hit, .vline.ws-sv .mw.hit, .vspan.ws-sv .w.hit, .vspan.ws-sv .mw.hit {
  background: var(--found-sv-bg, var(--hit-bg)); color: var(--found-sv-fg, var(--hit-ink)); font-weight: var(--found-sv-w, inherit); font-style: var(--found-sv-i, inherit); text-decoration: var(--found-sv-u, none);
}
.vline:not(.ws-sv) .w.hit, .vline:not(.ws-sv) .mw.hit {
  background: var(--found-other-bg, var(--hit-bg)); color: var(--found-other-fg, var(--hit-ink)); font-weight: var(--found-other-w, inherit); font-style: var(--found-other-i, inherit); text-decoration: var(--found-other-u, none);
}
.res-row .kwic .hit { background: var(--found-sv-bg, var(--hit-bg)) !important; color: var(--found-sv-fg, var(--hit-ink)) !important; font-weight: var(--found-sv-w, inherit); font-style: var(--found-sv-i, inherit); text-decoration: var(--found-sv-u, none); }
body.ws-svcolor .vline.ws-sv .vlabel { color: var(--ref); }
body.ws-svcolor .vline.ws-sv { box-shadow: inset 2px 0 0 var(--sel-strong); padding-left: 4px; margin-left: -6px; }
/* check boxes off: the box keeps its (zero-width) cell, so the reference stays in its own column */
.results.no-checks .res-row input { visibility: hidden; width: 0; min-width: 0; padding: 0; border: 0; margin: 0; }
.results.no-checks .res-row { grid-template-columns: 0 78px minmax(0, 1fr); }
/* with hit counts (*N) after the reference the reference column is a little wider; the row still has its three cells */
body.ws-multihits .res-row { grid-template-columns: 22px 98px minmax(0, 1fr); }
body.ws-multihits .results.no-checks .res-row { grid-template-columns: 0 98px minmax(0, 1fr); }
.ws-hitcount { color: var(--ink-3); font: 600 11px var(--ui); }
.tb { width: calc(31px * var(--tb-k)); height: calc(33px * var(--tb-k)); }
.tb.wide { width: calc(46px * var(--tb-k)); }
.tb img { width: 100%; height: 100%; object-fit: contain; }

.ws-splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 4px; background: var(--chrome); color: var(--chrome-ink); transition: opacity 280ms; }
.ws-splash.out { opacity: 0; }
.ws-splash h1 { margin: 6px 0 0; font: 650 28px var(--ui); letter-spacing: 0.01em; }
.ws-splash p { margin: 0; color: var(--chrome-ink-2); }
.ws-hint { grid-column: 1 / -1; flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; align-items: start; margin: 2px 0; padding: 6px 8px 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: var(--fs-small); line-height: 1.45; }
.ws-hint-text b { font-weight: 650; }
.ws-hint .ws-x { color: var(--warn-ink); }
.ws-hint-never { grid-column: 1 / -1; font-size: 11px; opacity: 0.9; }

/* ---------------------------------------------------------------- keyboards */
.ws-rel { position: relative; }
.ws-ins { position: absolute; right: 16px; top: 17px; width: 11px; height: 11px; border-radius: 2px; background: var(--err-ink); animation: ws-blink 1s steps(2, start) infinite; pointer-events: none; }
@keyframes ws-blink { 50% { opacity: 0.15; } }
.ws-sb-kb { margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: var(--fs-small); color: var(--chrome-ink-2); cursor: pointer; }
.ws-sb-kb.on { color: oklch(0.86 0.12 95); }
#cmdline[data-kb="greek"] { background-image: linear-gradient(90deg, transparent, transparent); }
.kb-window { display: grid; gap: 8px; padding: 0 12px 12px; }
.kb-menu { margin: 0 -12px; }
.kb-tabs { display: flex; gap: 2px; }
.kb-tab { border: 1px solid var(--line); background: var(--panel); border-radius: 6px 6px 0 0; padding: 4px 14px; cursor: pointer; color: var(--ink-2); }
.kb-tab.on { background: var(--bg); color: var(--ink); font-weight: 600; border-bottom-color: var(--bg); }
.kb-opts { gap: 8px; }
.kb-board { display: grid; gap: 4px; }
.kb-row { display: flex; gap: 4px; }
.kb-row:nth-child(2) { padding-left: 14px; } .kb-row:nth-child(3) { padding-left: 26px; } .kb-row:nth-child(4) { padding-left: 0; }
.kb-key { position: relative; flex: 1 1 0; min-width: 0; height: 48px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--ink); cursor: pointer; font: 500 13px var(--ui); display: grid; place-items: center; padding: 0; }
.kb-key.wide { flex: 1.9 1 0; }
.kb-key small { position: absolute; left: 5px; top: 2px; font: 600 9px var(--ui); color: var(--ink-3); }
.kb-key span { font-size: 21px; line-height: 1; }
.kb-key.heb span { font-family: var(--text-hebrew); font-size: 24px; direction: ltr; }
.kb-key.grk span { font-family: var(--text-greek); }
.kb-key:not(.mapped):not(.wide) span { color: var(--ink-3); font-size: 15px; }
.kb-key.wide span { font-size: 12px; font-family: var(--ui); }
.kb-key:hover { background: var(--panel-2); }
.kb-key.hit, .kb-key.on { background: var(--sel-bg); border-color: var(--sel-strong); }
.kb-note { margin: 0; line-height: 1.5; }

/* ---------------------------------------------------------------- layout, browse header */
#search-pane.ws-cmd-bottom { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
#search-pane.ws-cmd-bottom > div:not(.pane-head):not(.results):not(.search-foot) { display: contents; }
#search-pane.ws-cmd-bottom .pane-head { order: 0; } #search-pane.ws-cmd-bottom .result-tabs { order: 1; } #search-pane.ws-cmd-bottom .results { order: 2; }
#search-pane.ws-cmd-bottom .search-top { order: 3; border-top: 1px solid var(--line); border-bottom: 0; } #search-pane.ws-cmd-bottom .search-foot { order: 4; }
.panes.ws-custom { grid-template-columns: unset; }
.panes.ws-custom > .split { cursor: col-resize; }
body.ws-stacked .panes > #split-right { cursor: row-resize; }
#browse-pane[data-h-current="0"] #browse-heading > .ref { display: none; }
#browse-pane[data-h-boxes="0"] .browse-bar select:not(.ws-outline) { display: none; }
#browse-pane[data-h-buttons="0"] #btn-mode { display: none; }
#browse-pane[data-h-none="1"] .browse-bar { display: none; }
.ws-outline { flex: 1 1 100%; min-width: 0; max-width: 100%; order: -1; font-weight: 600; }

/* ---------------------------------------------------------------- secondary Browse Windows */
.ws-bw { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.ws-bw-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ws-bw-body { overflow: auto; padding: 8px 14px 30px; min-height: 0; }
.ws-bw-analysis { padding: 6px 12px; border-top: 1px solid var(--line); background: var(--panel); min-height: 34px; font-size: 13px; color: var(--ink-2); }
.ws-bw-m { margin-left: 8px; }
.ws-bw-m .lemma { font-family: var(--text-greek); color: var(--lemma); font-weight: 600; }
.ws-bw-m .lemma.hebrew { font-family: var(--text-hebrew); }
.ws-bw-m .code { font-family: var(--mono); color: var(--code); }
.tb.sync-on { background: var(--chrome-3); box-shadow: inset 0 -2px 0 var(--sel-strong); }

/* ---------------------------------------------------------------- colors, comparison, popups */
.ws-diff { color: var(--diff-fg, inherit); background: var(--diff-bg, var(--hit-bg)); border-radius: 3px; }
.ws-cmp-head, .ws-cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) 60px 36px 36px 80px 70px; gap: 8px; align-items: center; }
.ws-cmp-head { font: 600 11px var(--ui); color: var(--ink-3); }
.ws-cmp-head span:nth-child(n+3):nth-child(-n+4) { text-align: center; }
.ws-colwin { padding: 12px 14px; }
.ws-col-head { display: grid; gap: 2px; padding: 8px 10px; background: var(--panel); border-radius: 8px; }
.ws-colfoot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.ws-popup { position: fixed; z-index: var(--z-tip); max-width: 520px; padding: 8px 12px 10px; border-radius: 10px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 10px 28px oklch(0 0 0 / 0.22); pointer-events: none; font-size: 13px; }
.ws-popup-ref { font-weight: 650; color: var(--ref); margin-bottom: 4px; }
.ws-popup .vtext { font-size: 15px; line-height: 1.5; max-width: none; }
.ws-popup .vline { padding: 2px 0; }
.ws-popup .vlabel { width: 38px; }
.ws-tip { padding: 6px 10px; }
.ws-tip-row { margin-top: 3px; }
.ws-tip .lemma { font-family: var(--text-greek); color: var(--lemma); font-weight: 600; }
.ws-tip .lemma.hebrew { font-family: var(--text-hebrew); font-size: 17px; }
.ws-tip .code { font-family: var(--mono); color: var(--code); }

/* ---------------------------------------------------------------- EPUB */
.ws-epub-tab { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.ws-epub-seg { display: flex; gap: 2px; padding: 4px 8px 0; background: var(--panel); border-bottom: 1px solid var(--line); }
.ws-epub-seg button, .ws-epub-ntabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 3px 12px; border-radius: 6px 6px 0 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-small); }
.ws-epub-seg button.on, .ws-epub-ntabs button.on { background: var(--bg); color: var(--ink); border-color: var(--line); font-weight: 600; }
.ws-epub { display: flex; flex-direction: column; min-height: 0; flex: 1; height: 100%; }
.ws-epub[hidden] { display: none; }
.ws-epub-bar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.ws-epub-title { margin-left: 8px; font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-epub-main { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); flex: 1; min-height: 0; }
.ws-epub-nav { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.ws-epub-nav[hidden] { display: none; }
.ws-epub-main:has(.ws-epub-nav[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ws-epub-ntabs { display: flex; gap: 2px; padding: 4px 6px 0; }
.ws-epub-toc, .ws-epub-search { overflow: auto; flex: 1; min-height: 0; padding: 4px 0; }
.ws-epub-search { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.ws-epub-results { overflow: auto; flex: 1; min-height: 0; }
.ws-epub-toc-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 4px 8px; cursor: pointer; font: 12.5px/1.35 var(--ui); color: var(--link); }
.ws-epub-toc-item:hover { background: var(--panel-2); }
.ws-epub-toc-item.on { background: var(--sel-bg); color: var(--ink); font-weight: 600; }
.ws-epub-read { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ws-epub-pagewrap { flex: 1; overflow: auto; min-height: 0; }
.ws-epub-page { padding: 14px 22px 30px; font: 16px/1.65 var(--text-latin); max-width: 44em; margin: 0 auto; overflow-wrap: anywhere; }
.ws-epub-page img { max-width: 100%; height: auto; }
.ws-epub-page h1, .ws-epub-page h2, .ws-epub-page h3 { font-family: var(--ui); line-height: 1.25; }
.ws-epub-page a.bwref { color: var(--ref); text-decoration: none; border-bottom: 1px dotted var(--ref); }
.ws-epub-page a { color: var(--link); }
.ws-epub-page mark, .ws-epub-snip mark { background: var(--hit-bg); color: var(--hit-ink); border-radius: 2px; }
.ws-epub-page mark.cur { outline: 2px solid var(--sel-strong); }
.ws-epub-foot { display: flex; justify-content: space-between; padding: 5px 8px; border-top: 1px solid var(--line); background: var(--panel); flex: none; }
.ws-epub-find { margin: 4px 8px; }
.ws-epub-snip { display: block; color: var(--ink-2); font-size: 12px; white-space: normal; }
.ws-item:has(.ws-epub-snip) { display: block; }
.ws-lib-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.ws-lib-bar { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.ws-lib-table { overflow: auto; }
.ws-lib th { position: sticky; top: 0; background: var(--panel); }
.ws-lib tr.sel td { background: var(--sel-bg); }
.ws-lib tbody tr { cursor: default; }

/* ---------------------------------------------------------------- interlinear, splitter, analysis tabs */
.ws-interlinear #browse .vline:has(.ws-il) .w { display: inline-flex; flex-direction: column; align-items: center; vertical-align: top; margin: 0 4px 8px; }
.ws-il { display: flex; flex-direction: column; align-items: center; font: 11px/1.25 var(--ui); color: var(--ink-3); pointer-events: none; }
.ws-il-lem { font-family: var(--text-greek); color: var(--lemma); font-size: 12.5px; }
.ws-il-code { font-family: var(--mono); color: var(--code); font-size: 9.5px; }
.split { background: var(--split-color, var(--line)); }
.ws-nowrap-atabs .atabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.ws-nowrap-atabs .atabs button { flex: none; }
.ws-windlg { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.ws-windlg-body { overflow: auto; padding: 12px 14px; min-height: 0; }

/* ---- Configuration Manager (configman.js) */
.ws-cfgman .dlg-body { min-width: 420px; }
.ws-cfg-menu { position: relative; display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: -4px 0 6px; padding-bottom: 2px; }
.ws-cfg-menu .menu-top { background: transparent; color: var(--ink); border: 0; padding: 3px 9px; border-radius: 4px; font: inherit; cursor: pointer; }
.ws-cfg-menu .menu-top:hover { background: var(--panel-2); }
.ws-cfg-row { display: flex; gap: 10px; align-items: flex-start; }
.ws-cfg-list { flex: 1; min-height: 120px; max-height: 220px; overflow: auto; }
.ws-cfg-btns { display: flex; flex-direction: column; gap: 6px; min-width: 72px; }
.ws-error { color: var(--err-ink); font-size: var(--fs-small, 12px); }

.ws-cfg-pop { position: absolute; top: 100%; z-index: 5; min-width: 230px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 6px 18px rgb(0 0 0 / .18); padding: 3px; }
.ws-cfg-pop .menu-item { text-align: left; background: transparent; color: var(--ink); border: 0; padding: 5px 10px; border-radius: 4px; font: inherit; cursor: pointer; }
.ws-cfg-pop .menu-item:hover, .ws-cfg-pop .menu-item:focus-visible { background: var(--sel-bg); }
.ws-cfg-pop .menu-item.checked::after { content: '\2713'; margin-left: 10px; }

/* ---- Migrate Settings and Files, Select Directory (migrate.js) */
.ws-dirs { min-height: 150px; max-height: 240px; overflow: auto; }
.ws-wrap { white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto; }
.ws-migdlg { width: min(900px, 94vw); }
.ws-mig-cols { align-items: start; }
dialog.ws-dirdlg { width: min(520px, 94vw); }
.ws-migdlg .dlg-body { max-height: 74vh; overflow: auto; }
.ws-migres section { margin-bottom: 8px; }

/* ---- Verse History and Word History windows (history.js) */
.ws-hist { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ws-hist-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ws-hist-btn { min-width: 30px; padding: 2px 8px; font-weight: 700; }
.ws-hist-list { flex: 1; min-height: 0; overflow: auto; border: 0; border-radius: 0; }
.ws-hist-list .ws-item { justify-content: space-between; }

/* ---- Easy windows, code helper buttons, slide show (easy.js) */
.ws-clhelpers { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0 2px; }
.ws-clh { min-width: 24px; height: 24px; padding: 0 4px; font: 600 13px var(--mono, monospace); background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.ws-clh:hover { background: var(--sel-bg); }
.ws-easybar { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
body[data-ws-mode="beginner"] #cmdline { display: none; }
.ws-easy-grp { margin: 0 0 8px; }
.ws-easy-out { white-space: pre-wrap; max-height: 150px; overflow: auto; margin: 8px 0 0; font: inherit; color: var(--ink-2); }
.ws-spin { display: flex; flex-direction: column; gap: 2px; }
.ws-spin .btn { padding: 0 6px; font-size: 9px; line-height: 14px; }

/* ---- Search Window tab menu (tabs.js) */
#result-tabs.ws-tabs-nowrap { flex-wrap: nowrap; overflow-x: auto; }
#result-tabs button.ws-tab-titled { max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#result-tabs button.ws-tab-frozen { font-style: italic; }

/* ---- Analysis Window: tab options, the second Analysis Window, word filter (anatabs.js) */
.atabs[hidden], .analysis-body[hidden] { display: none !important; }
#ws-atabs2, #ws-abody2 { display: none; }
body.ws-acols2 #analysis-pane { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.ws-acols2 #analysis-pane > .pane-head, body.ws-acols2 #analysis-pane > div:empty:not([id]) { grid-column: 1 / -1; }
body.ws-acols2 #atabs { grid-column: 1; grid-row: 2; }
body.ws-acols2 #analysis-body { grid-column: 1; grid-row: 3; }
body.ws-acols2 #ws-atabs2 { display: flex; grid-column: 2; grid-row: 2; border-left: 1px solid var(--line); }
body.ws-acols2 #ws-abody2 { display: block; grid-column: 2; grid-row: 3; border-left: 1px solid var(--line); overflow: auto; padding: 12px 14px 40px; }
body.ws-acols2 #ws-atabs2[hidden] { display: none; }
#analysis-pane .pane-head #ws-acol-toggle[aria-pressed="true"] { background: var(--chrome-hover); color: var(--chrome-ink); }
.ws-anatabdlg { width: min(760px, 94vw); }
.ws-anaTop { align-items: flex-start; justify-content: space-between; gap: 16px; }
.ws-anaCols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ws-anaCol { display: flex; flex-direction: column; gap: 4px; }
.ws-listhead { font-weight: 600; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 3px 2px; color: var(--ink); cursor: pointer; }
.ws-listhead.ws-drop-ready { color: var(--link); border-bottom-color: var(--link); }
.ws-anaList { min-height: 260px; max-height: 320px; overflow: auto; }
.ws-anaList.over { outline: 2px dashed var(--link); outline-offset: -2px; }
.ws-drag { cursor: grab; }

/* ---- Divider Dimensions (misc.js): the splitter bars between the windows */
.panes:not(.ws-custom) { grid-template-columns: var(--w-search, 25%) var(--split-w, 5px) minmax(0, 1fr) var(--split-w, 5px) var(--w-analysis, 31%); }
.panes.no-analysis:not(.ws-custom) { grid-template-columns: var(--w-search, 25%) var(--split-w, 5px) minmax(0, 1fr) 0 0; }
dialog.ws-langdlg { width: 320px; }
dialog.ws-dividerdlg { width: 380px; }

/* ---- BibleWorks Toolbar Editor (extras.js) */
dialog.ws-tbdlg { width: min(760px, 94vw); }
.ws-tbEditor { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 10px; align-items: start; }
.ws-tbList { min-height: 300px; max-height: 340px; overflow: auto; margin-top: 4px; }
.ws-tbList .ws-item { gap: 8px; }
.ws-tbBtns { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }

/* ---- Set Tab Width (editor-dialogs.js): a Tab typed in the Editor */
.ws-tabstop { display: inline-block; width: var(--ws-tabw, 0.5in); white-space: pre; overflow: hidden; vertical-align: bottom; height: 1em; }
dialog.ws-settabdlg { width: 380px; }

/* ---- Choose Search and Display Versions (session.js) */
dialog.ws-csddlg { width: min(860px, 94vw); }
.ws-csdwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ws-csd { max-height: 52vh; overflow: auto; margin: 4px 0 6px; padding: 4px 6px; display: flex; flex-direction: column; gap: 2px; }
.ws-csd .ws-lang { margin: 6px 0 2px; font-weight: 600; }

/* Restore: the categories that the chosen archive holds are shown in red (help bwh74) */
.ws-check.ws-inzip span { color: var(--err-ink); }

/* the configuration menu button of the main window (layout.js) */
.ws-config-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 24px; margin-right: 6px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.ws-config-btn:hover, .ws-config-btn:focus-visible { background: oklch(from currentColor l c h / 0.14); }
.ws-config-btn.ws-config-float { position: fixed; top: 4px; right: 8px; z-index: 60; margin: 0; background: var(--panel); color: var(--ink-2); border: 1px solid var(--line); box-shadow: 0 1px 4px oklch(0 0 0 / 0.2); }

/* Search Window fonts (Options > General > Fonts): the verse list takes the weight and style, and the Command Line the size, weight and style once a Search Window font is set */
.res-row .kwic { font-weight: var(--sfw-english, 400); font-style: var(--sfi-english, normal); }
.res-row .kwic.greek { font-weight: var(--sfw-greek, 400); font-style: var(--sfi-greek, normal); }
.res-row .kwic.hebrew { font-weight: var(--sfw-hebrew, 400); font-style: var(--sfi-hebrew, normal); }
body[data-ws-cmdfont] .cmdline { font-size: var(--sw-english); font-weight: var(--sfw-english); font-style: var(--sfi-english); }
body[data-ws-cmdfont] .cmdline.greek { font-size: var(--sw-greek); font-weight: var(--sfw-greek); font-style: var(--sfi-greek); }
body[data-ws-cmdfont] .cmdline.hebrew { font-size: var(--sw-hebrew); font-weight: var(--sfw-hebrew); font-style: var(--sfi-hebrew); }

/* Double-byte Fonts and the style of the Cyrillic, Central European, Vietnamese and Hebrew Transliteration rows (Options > General > Fonts) */
.vline[data-lg="chinese"] .vtext, .vspan[data-lg="chinese"] { font-family: var(--text-chinese); }
.vline[data-lg="japanese"] .vtext, .vspan[data-lg="japanese"] { font-family: var(--text-japanese); }
.vline[data-lg="korean"] .vtext, .vspan[data-lg="korean"] { font-family: var(--text-korean); }
.vline[data-lg="arabic"] .vtext, .vspan[data-lg="arabic"] { font-family: var(--text-arabic); }
.vline[data-lg="thai"] .vtext, .vspan[data-lg="thai"] { font-family: var(--text-thai); }
.vline[data-lg="cyrillic"] .vtext, .vspan[data-lg="cyrillic"] { font-weight: var(--fw-cyrillic, 400); font-style: var(--fi-cyrillic, normal); }
.vline[data-lg="central"] .vtext, .vspan[data-lg="central"] { font-weight: var(--fw-central, 400); font-style: var(--fi-central, normal); }
.vline[data-lg="vietnamese"] .vtext, .vspan[data-lg="vietnamese"] { font-weight: var(--fw-vietnamese, 400); font-style: var(--fi-vietnamese, normal); }
.vline[data-lg="hebtrans"] .vtext { font-weight: var(--fw-hebtrans, 400); font-style: var(--fi-hebtrans, normal); }

/* the chosen versions of a favorite: the selected one marks where an added version goes */
.ws-chip { cursor: pointer; }
.ws-chip.sel { outline: 2px solid var(--sel-strong); outline-offset: 1px; }

/* the buttons beside the outline list box of the Browse Window header (layout.js) */
.ws-outline-btn { padding: 2px 7px; min-width: 26px; }
.ws-outline-all .ws-item { justify-content: space-between; }

/* The EPUB tabs (ePub1, ePub2) and the EPUB library: the Navigation pane's font buttons and its draggable border (help bwh10n).
   The base rules of the reader are in workspace.css; these come after them. */
.ws-epub-main { grid-template-columns: var(--epub-nav-w, 200px) 6px minmax(0, 1fr); }
.ws-epub-main:has(.ws-epub-nav[hidden]) { grid-template-columns: minmax(0, 1fr); }
.ws-epub-nav { min-width: 0; overflow: hidden; font-size: calc(13px * var(--epub-nav-scale, 1)); }
.ws-epub-nav .ws-epub-toc-item { font-size: calc(12.5px * var(--epub-nav-scale, 1)); }
.ws-epub-nav .ws-epub-results .ws-item, .ws-epub-nav .ws-epub-snip, .ws-epub-nav .ws-list-h, .ws-epub-nav .ws-muted, .ws-epub-nav input.ctl { font-size: calc(12px * var(--epub-nav-scale, 1)); }
.ws-epub-split { width: 6px; cursor: col-resize; background: var(--line); border-left: 1px solid var(--line-strong); touch-action: none; }
.ws-epub-split:hover, .ws-epub-split:focus-visible, .ws-epub-split.drag { background: var(--sel-strong); outline: none; }
.ws-epub-split[hidden] { display: none; }
.ws-epub-navbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2px 4px; padding-right: 6px; }
.ws-epub-navfont { display: inline-flex; gap: 2px; margin: 0 0 2px auto; flex: none; }
.ws-epub-nf { border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); border-radius: 4px; padding: 0 5px; font: 600 11px/18px var(--ui); cursor: pointer; }
.ws-epub-nf:hover { background: var(--sel-bg); }
