/* bench-kit: paratexts and Help guides. Loaded after the bench's own research.css, whose colour
   tokens it uses (--bg, --surface, --text, --text-dim, --text-faint, --line, --line-soft, --amber,
   --beam, --sans, --mono, and the gold of repairs, --kin). */
.px-howto { max-width: 70ch; }
.px-howto ol { padding-left: 1.3em; } .px-howto li { margin: 4px 0; }
.px-bar { flex-wrap: wrap; gap: 6px 10px; }
.px-bar input[type="search"] { min-width: 14em; }
.px-grid { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.px-card { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.px-card:hover, .px-card:focus-visible { border-color: var(--text-dim); outline: none; }
.px-thumb { height: 130px; display: grid; place-items: center; font-size: 40px; background: var(--bg); overflow: hidden; }
.px-thumb img { width: 100%; height: 100%; object-fit: cover; }
.px-meta { padding: 7px 9px 9px; font-size: 13px; line-height: 1.35; }
.px-meta b { font-weight: 600; }
.px-code { font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--line-soft); border-radius: 3px; padding: 0 4px; }
.px-tags { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.px-tags .fd-tag { margin: 0; }
.px-tags .px-v { color: var(--beam); }
.px-s { font-size: 11.5px; color: var(--text-dim); margin-right: 6px; }
.px-s sup { font-size: 9px; }
dialog.px-dlg { width: min(96vw, 1200px); }
.px-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 16px; }
@media (max-width: 800px) { .px-cols { grid-template-columns: 1fr; } }
.px-view { min-height: 200px; background: var(--bg); border-radius: 6px; display: grid; place-items: center; overflow: auto; max-height: 78vh; }
.px-img { max-width: 100%; max-height: 76vh; display: block; }
.px-pdf { width: 100%; height: 76vh; border: 0; background: #fff; }
.px-text { white-space: pre-wrap; font: 12.5px var(--mono); padding: 10px; margin: 0; align-self: start; justify-self: stretch; }
.px-fields { display: grid; gap: 3px; }
.px-fields label { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; align-items: start; font-size: 12.5px; color: var(--text-dim); }
.px-fields input, .px-fields textarea { font: 13px var(--sans); padding: 4px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.px-acts { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.px-acts .px-wd { margin-left: auto; }
.px-talk { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 4px; }
.px-talk .fd-rxbar button { font-size: 12.5px; padding: 0 6px; line-height: 1.6; }
.px-cbox { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.px-cbox > :not(textarea):not(.btn) { grid-column: 1 / -1; }
.px-drop { display: block; border: 2px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; color: var(--text-dim); margin: 6px 0 12px; cursor: pointer; }
.px-drop.on { border-color: var(--beam); color: var(--text); }
.px-drop input { display: none; }
/* the Add box's three modes: the panels not in use stay hidden (their display rules would otherwise show them) */
.px-drop[hidden], .px-linkin[hidden], .px-missin[hidden] { display: none; }
.px-rx .fd-rate button.on { color: var(--star, var(--kin)); }
.px-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.px-nav { position: sticky; top: 8px; font-size: 13px; border-right: 1px solid var(--line-soft); padding-right: 10px; max-height: calc(100vh - 120px); overflow: auto; }
@media (max-width: 760px) { .px-shell { grid-template-columns: 1fr; } .px-nav { position: static; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 0 0 8px; max-height: none; } }
.px-coll { display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px calc(6px + var(--d, 0) * 14px); border-radius: 5px; cursor: pointer; color: var(--text-dim); }
.px-coll:hover, .px-coll:focus-visible { background: var(--surface); color: var(--text); outline: none; }
.px-coll.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--amber); }
.px-coll.px-drop-on, .px-folder.px-drop-on, .px-crumbs a.px-drop-on { outline: 2px dashed var(--beam); outline-offset: -2px; background: var(--surface); }
.px-cn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-cnt { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.px-cact { display: none; }
.px-coll:hover .px-cact, .px-coll:focus-within .px-cact { display: inline-flex; }
.px-coll:hover .px-cnt, .px-coll:focus-within .px-cnt { display: none; }
.px-cact .icon-btn { font-size: 11px; padding: 0 3px; min-width: 0; }
.px-cedit { cursor: default; }
.px-cin { width: 100%; font: 13px var(--sans); padding: 2px 5px; background: var(--bg); color: var(--text); border: 1px solid var(--beam); border-radius: 4px; }
.px-ch { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 2px; padding: 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.px-ch .icon-btn { font-size: 13px; }
.px-wdrow { margin-top: 10px; }
.px-navfoot { font-size: 11.5px; margin: 10px 6px 0; line-height: 1.4; }
.px-crumbs { font-size: 13px; color: var(--text-dim); margin: 4px 0 8px; }
.px-crumbs a { cursor: pointer; color: var(--beam); border-radius: 3px; padding: 0 2px; }
.px-folders { list-style: none; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.px-folder { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; background: var(--surface); font-size: 13px; }
.px-folder:hover { border-color: var(--text-dim); }
.px-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 10px; margin: 6px 0; border: 1px solid var(--beam); border-radius: 6px; background: var(--surface); font-size: 13px; position: sticky; top: 0; z-index: 2; }
.px-selbar[hidden] { display: none; }
.px-selbar select, .px-tagin { font: 12.5px var(--sans); }
.px-tagin { width: 8em; padding: 2px 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.px-tagadd { display: inline-flex; gap: 4px; }
.px-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.px-seg button { border: 0; border-radius: 0; padding: 1px 8px; background: none; color: var(--text-dim); cursor: pointer; font-size: 13px; }
.px-seg button + button { border-left: 1px solid var(--line); }
.px-seg button.on { background: var(--surface); color: var(--text); }
.px-grid.px-s { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.px-grid.px-s .px-thumb { height: 90px; font-size: 28px; }
.px-grid.px-s .px-meta { font-size: 12px; }
.px-grid.px-l { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.px-grid.px-l .px-thumb { height: 230px; }
.px-card { position: relative; }
.px-card.sel { border-color: var(--beam); box-shadow: 0 0 0 1px var(--beam); }
.px-pick { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--text-dim); background: var(--bg); opacity: 0; cursor: pointer; padding: 0; z-index: 1; }
.px-card:hover .px-pick, .px-has-sel .px-pick, .px-pick:focus-visible { opacity: 1; }
.px-pick[aria-pressed="true"] { background: var(--beam); border-color: var(--beam); opacity: 1; }
.px-pick[aria-pressed="true"]::after { content: '✓'; color: var(--bg); font-size: 13px; line-height: 17px; display: block; text-align: center; }
.px-cl { font-size: 11px; color: var(--text-faint); margin-right: 5px; white-space: nowrap; }
/* corpus: a chip on an item from a corpus other than the one in view, and the left panel's rows */
.px-cline .px-cx { margin-left: 0; margin-right: 6px; }
.px-cx { font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--border, currentColor); border-radius: 3px; padding: 0 4px; margin-left: 6px; white-space: nowrap; vertical-align: 1px; font-weight: normal; }
.px-cx-bad, .px-corow.px-cx-bad .px-cn { color: var(--danger, #b3261e); border-color: var(--danger, #b3261e); }
.px-dragging .px-coll[data-c]:not([data-c="_none"]):not([data-c="_wd"]):not([data-c=""]) { background: color-mix(in srgb, var(--beam) 7%, transparent); }
.px-tablewrap { overflow-x: auto; }
.px-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.px-table th { text-align: left; font-weight: 600; color: var(--text-dim); padding: 5px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.px-table th[data-sort] { cursor: pointer; }
.px-table th.on { color: var(--text); }
.px-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.px-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.px-table .px-pick { position: static; opacity: 1; display: block; }
.px-row { cursor: pointer; }
.px-row:hover, .px-row:focus-visible { background: var(--surface); outline: none; }
.px-row.sel { background: color-mix(in srgb, var(--beam) 14%, transparent); }
.px-thumb.px-mini { width: 44px; height: 32px; font-size: 18px; border-radius: 3px; }
.px-code-c { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.px-colls { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; font-size: 12.5px; color: var(--text-dim); margin: 5px 0 0; align-items: center; }
.px-cchip { display: inline-flex; align-items: center; gap: 2px; }
.px-cchip button { border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 0 0 0 3px; font-size: 13px; }
.px-cchip button:hover { color: var(--text); }
.px-addc { font-size: 12px; }
.px-linkline { font-size: 12.5px; color: var(--text-dim); margin: 2px 0 0; line-height: 1.45; }
.px-linkline b { color: var(--text); margin-right: 4px; }
.px-linkline .btn { font-size: 12px; padding: 0 7px; }
.px-into { margin: 8px 0 0; font-size: 13px; }
.px-more { position: relative; display: inline-block; }
.px-acts .px-more { margin-left: auto; }
.px-more > summary { list-style: none; cursor: pointer; padding: 1px 9px; }
.px-more > summary::-webkit-details-marker { display: none; }
.px-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; }
.px-selbar .px-menu { left: 0; right: auto; }
.px-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); font: 13px var(--sans); padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.px-menu button:hover { background: var(--bg); }
dialog.px-wdbox { width: min(94vw, 520px); }
.px-wdlist { margin: 4px 0 8px; padding-left: 1.2em; font-size: 13px; max-height: 30vh; overflow: auto; }
.px-wdf { display: grid; gap: 3px; margin: 8px 0; font-size: 12.5px; color: var(--text-dim); }
.px-wdf input { font: 13px var(--sans); padding: 4px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.px-danger:not(:disabled) { background: #b3412f; border-color: #b3412f; color: #fff; }
.px-wdnote { display: block; margin: 4px 0; }
.px-cfold > summary { cursor: pointer; list-style: revert; margin: 8px 0 4px; }
.px-cfold > summary .faint { font-weight: 400; }
.px-ro { display: grid; grid-template-columns: 7em 1fr; gap: 4px 10px; margin: 0 0 8px; font-size: 13px; }
.px-ro dt { color: var(--text-dim); }
.px-ro dd { margin: 0; overflow-wrap: anywhere; }
.px-ro dd p { margin: 0 0 4px; }
.px-peekfoot { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: flex-end; border-top: 1px solid var(--line-soft); margin-top: 12px; padding-top: 10px; font-size: 13.5px; }
.px-peekfoot a { color: var(--beam); }
.sw-stars { white-space: nowrap; letter-spacing: 1px; }
.sw-stars b { color: var(--kin); font-weight: inherit; }
.sw-stars i { color: var(--line); font-style: normal; }
.px-s .sw-stars { font-size: 13px; }
.px-head { display: flex; align-items: center; gap: 8px; }
.px-head h2 { margin: 0 0 8px; }
.px-ib { font-size: 16px; color: var(--text-dim); margin-bottom: 8px; }
.px-ib[aria-expanded="true"] { color: var(--beam); }
.px-lede { font-size: 12.5px; max-width: 80ch; margin: 0 0 12px; }
.px-addbtn { display: block; width: 100%; margin: 0 0 10px; }
.px-dc { margin: 8px 0 0; }
.px-dc > summary { cursor: pointer; font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.px-fields select { font: 13px var(--sans); padding: 3px 6px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
/* the Type picker: a find box beside the list */
.px-tpick { display: grid; grid-template-columns: 9em 1fr; gap: 6px; }
.px-tpick .px-tfind { min-width: 0; }
.px-fmt { color: var(--text); font-size: 12.5px; }
.px-catby { display: flex; align-items: center; gap: 8px; min-width: 0; }
.px-catby input { width: 7em; flex: none; }
.px-catby .faint { font-size: 12px; }
.guidehelp .gh-toc { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.guidehelp .gh-toc a { color: var(--beam); }
.guidehelp section p { max-width: 75ch; }
.guidehelp kbd { font: 11.5px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; }
.px-acts .px-exp { margin-left: auto; }
.px-acts .px-exp + .px-more, .px-acts .px-exp + .px-wd { margin-left: 0; }
dialog.px-sbs { width: min(98vw, 1600px); }
.px-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .px-panes { grid-template-columns: 1fr; } }
.px-pane { min-width: 0; display: flex; flex-direction: column; }
.px-ph { font-size: 13px; margin: 0 0 4px; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.px-ph b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.px-ph .faint { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.px-zoom { position: relative; height: 72vh; overflow: hidden; background: var(--bg); border-radius: 6px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.px-zoom.dragging { cursor: grabbing; }
.px-zoom img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.px-zoom .px-cover { position: absolute; inset: 0; }   /* over the picture: a drag moves it, and Live Text cannot select in it */
.px-zoom.px-free { cursor: auto; overflow: auto; touch-action: auto; }
.px-zoom.px-free .px-pdf { height: 100%; }
.px-sbs .refhelp-acts .check { font-size: 13px; margin-right: 6px; }
.px-cited { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 4px; }
.px-citelist { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 4px; }
.px-cite { display: block; width: 100%; text-align: left; border: 1px solid var(--line-soft); background: var(--bg); color: var(--text); border-radius: 5px; padding: 5px 8px; font: 12.5px var(--sans); cursor: pointer; }
.px-cite:hover { border-color: var(--text-dim); }
.px-citetext { display: block; color: var(--text-dim); margin-top: 2px; }
.px-embed { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; align-self: start; }
.px-embed.px-embed-audio { aspect-ratio: auto; height: 180px; }
.px-audio { width: min(100%, 520px); }
.px-video { width: 100%; max-height: 76vh; background: #000; }
.px-linkout { padding: 20px; font-size: 14px; overflow-wrap: anywhere; }
.px-addmode { margin: 0 0 10px; }
.px-linkin { display: grid; gap: 6px; margin: 0 0 12px; }
.px-linkin label { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-dim); }
.px-linkin input, .px-linkin select { font: 13px var(--sans); padding: 4px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.px-view.px-zwrap { display: block; place-items: initial; overflow: visible; max-height: none; background: none; }
/* the same where the picture is in the inner pane of an item with alternates: a centred grid would
   shrink the zoom box to its content, and the picture (placed absolutely) gives it none, so it had no width */
.px-pv.px-zwrap { display: block; place-items: initial; justify-self: stretch; align-self: stretch; overflow: visible; }
.px-zwrap .px-zone { width: 100%; }
.px-zbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; }
.px-zbar .btn { padding: 1px 9px; font-size: 12.5px; }
.px-zpc { min-width: 4.2em; text-align: center; font-size: 12px; color: var(--text-dim, var(--text-faint)); }
.px-zwrap .px-zone { height: 70vh; }
.px-zhint { margin: 4px 0 0; font-size: 11.5px; }
.px-pdfbox .px-pdf { height: 72vh; }
.px-zpg { display: inline-flex; align-items: center; gap: 2px; margin: 0 6px; }
.px .lede { max-width: 70ch; }
.pxlink { font-style: normal; }

/* the record's own provenance, as a field row like the rest */
/* reactions: only the ones chosen are shown; the rest fold behind + */
.px-talk .fd-rxbar { margin: 4px 0; gap: 3px; }
.px-rxmore { display: inline-block; }
.px-rxmore > summary { list-style: none; cursor: pointer; }
.px-rxmore > summary::-webkit-details-marker { display: none; }
.px-rxmenu { display: flex; flex-wrap: wrap; gap: 3px; padding: 5px; min-width: 0; }
.px-rxmenu button { font-size: 14px; }
.px-talk .px-cfold { margin-top: 2px; }
.px-cited:empty { display: none; }
.px-cited h4 { margin: 8px 0 4px; }

/* rate from the card itself: your own stars, the crew average beside them */
.px-cardrate { display: inline-flex; align-items: center; gap: 1px; }
.px-cardrate button.px-cs { background: none; border: 0; padding: 0 1px; cursor: pointer; font-size: 14px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--text-faint); opacity: .45; }
.px-cardrate button.px-cs.on { color: var(--star, var(--kin)); -webkit-text-stroke: 0; opacity: 1; }
/* under the pointer, the rating a click would give: the stars up to the one pointed at filled */
.px-cardrate:has(button.px-cs:hover) button.px-cs { color: var(--star, var(--kin)); -webkit-text-stroke: 0; opacity: .8; }
.px-cardrate:has(button.px-cs:hover) button.px-cs:hover ~ button.px-cs { color: transparent; -webkit-text-stroke: 1px var(--text-faint); opacity: .45; }
.px-cardrate .px-cavg { margin-left: 3px; font-size: 11px; }

/* a paratext's alternates: a translation or transcription beside the original */
.px-alts { flex-wrap: wrap; margin: 0 0 6px; }
.px-alts .btn { font-size: 11.5px; padding: 1px 8px; white-space: nowrap; }
.px-alts .btn.on { border-color: var(--beam); background: color-mix(in srgb, var(--beam) 16%, transparent); }
/* what the reading showing is, under the switcher: its title and its note, in full */
.px-altcap { flex-basis: 100%; margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-dim); }
.px-altcap i { color: var(--text); }
.px-pv { min-height: 0; }
/* With a language row above it, the view is two rows and the preview is the one that scrolls.
   Centring a tall item in a capped row puts its top above the row, out of scroll's reach, and
   the middle of the text then paints over the row. */
.px-view.px-withalts { grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
.px-view.px-withalts > .px-pv { align-self: stretch; justify-self: stretch; display: grid; place-items: center; overflow: auto; }

/* lacunae (paratexts.js gaps): the seam in gold, after kintsugi; one mark means one thing across the
   bench (Help ▸ Marks and conventions). An open seam is a dashed band; a fill sits inside it, from
   another copy dashed (yobitsugi), by conjecture solid (kake); neither is the text's own colour */
.px-textgaps pre.px-text { margin: 0; }
.px-gap { margin: 8px 0; padding: 6px 10px; border: 1px dashed var(--kin); border-left: 4px solid var(--kin); border-radius: 3px; font: 12.5px/1.45 var(--sans); color: var(--text-dim);
  background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--kin) 9%, transparent) 7px 14px); }
.px-gap b { color: var(--kin); }
.px-gapl { margin-left: 6px; color: var(--kin); opacity: .85; }
.px-gapnone { margin-top: 3px; font-style: italic; color: var(--text-faint); }
.px-gapfill { margin-top: 6px; }
.px-gapsrc { font-size: 11.5px; color: var(--kin); margin-bottom: 3px; }
.px-gapfill pre { margin: 0; padding: 4px 6px; color: var(--kin); background: color-mix(in srgb, var(--kin) 7%, transparent); white-space: pre-wrap; }
.px-gapfill-conjecture pre { border-bottom: 2px solid var(--kin); }
.px-gapfill-witness pre { outline: 1px dashed var(--kin); outline-offset: 1px; }
.px-gapnote summary { cursor: pointer; color: var(--text-faint); font-size: 11.5px; margin-top: 3px; }
.px-gapnote p { margin: 3px 0 0; }
.px-gapflash { outline: 2px solid var(--kin); outline-offset: 2px; transition: outline-color .6s; }
.px-gapstrip { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.px-gapgo { border: 1px dashed var(--kin); background: none; color: var(--kin); border-radius: 3px; padding: 1px 7px; font: 12px var(--sans); cursor: pointer; }
.px-gapgo:hover { background: color-mix(in srgb, var(--kin) 14%, transparent); }
.px-gapr { color: var(--text-faint); }
.px-gapover { margin: 0 0 6px; }
.px-gapover .px-gap { margin: 0; }
.px-gaptl { position: relative; height: 6px; margin: 2px 0 4px; background: var(--line-soft, var(--line)); border-radius: 3px; }
.px-gaptlb { position: absolute; top: 0; bottom: 0; background: var(--kin); border-radius: 2px; }
.px-gapsay { min-height: 1.2em; font: 12px var(--sans); color: var(--kin); }
.px-s.px-gapn { color: var(--kin); border: 1px dashed var(--kin); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.px-s.px-gapflag { color: var(--kin); font-style: italic; font-size: 11px; }

/* a paratext's type (genre), on its card and in the list; a link shown as an image or a PDF */
.px-s.px-genre { color: var(--text-dim); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; font-size: 11px; }
.px-table td.px-genre-c { color: var(--text-dim); white-space: nowrap; }
.px-linkimg { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; }
.px-embed-pdf { width: 100%; height: 70vh; border: 0; }
/* the list's rows in alternate shades, easier to follow across; hover and selection keep theirs */
.px-table tbody tr.px-row:nth-child(even):not(.sel) { background: color-mix(in srgb, var(--text) 4%, transparent); }
.px-table tbody tr.px-row:nth-child(even):not(.sel):hover { background: var(--surface); }

/* the gaps in Leiden's notation (body.px-leiden): the seam's own words give way to the form a
   quotation carries, as plain text in its place */
.px-gapleiden { display: none; margin: 0; white-space: pre-wrap; font: inherit; }
body.px-leiden .px-gap { border: 0; background: none; padding: 0; margin: 0; color: inherit; font-family: var(--code-font, var(--mono)); }
body.px-leiden .px-gap > :not(.px-gapleiden) { display: none; }
body.px-leiden .px-gap > .px-gapleiden { display: block; }
/* the switchers, at the top left whatever the reading showing: the view centres its content, and
   a bar sized to its own width moved with every change of reading */
.px-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-self: stretch; align-self: start; padding: 6px 8px 4px; min-width: 0; }
.px-viewbar .px-alts { margin: 0; }

/* the item's file and where it is held, under ☰ in its header */
.px-filemenu .px-menu { min-width: 170px; }
.px-menu a { display: block; padding: 5px 10px; border-radius: 4px; color: var(--text); font: 13px var(--sans); text-decoration: none; white-space: nowrap; }
.px-menu a:hover { background: var(--bg); }

/* a card: the same thing in the same place on every card. Code and rating on the top line, the
   title (three lines at most, the whole in the card's tooltip), type and date, the tags (two
   lines at most), the collections at the foot */
.px-card .px-meta { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.px-ctop { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.px-ctop .px-code { flex: none; }
.px-ctop .px-cardrate { margin-left: auto; }
.px-ctop .px-s { flex: none; }
.px-ctitle { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.px-cline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-dim); min-height: 18px; }
.px-cdate { white-space: nowrap; font-variant-numeric: tabular-nums; }
.px-card .px-tags { margin-top: 0; max-height: calc(2 * 1.9em); overflow: hidden; }
.px-cfoot { margin-top: auto; padding-top: 2px; }

/* an embedded player (YouTube, Vimeo, the Internet Archive) or a video across the whole view: the
   view centres what it shows, and a player sized by percentage inside a centred box had shrunk
   to a small frame in the middle */
.px-view, .px-pv { grid-template-columns: minmax(0, 1fr); }
.px-embed, .px-video { justify-self: stretch; }
.px-pv:has(> .px-embed, > .px-video) { justify-self: stretch; width: 100%; }

/* a translation held beside the item, on its card */
.px-s.px-trchip { color: var(--beam); border: 1px dashed var(--beam); border-radius: 3px; padding: 0 5px; font-size: 11px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* a stub for a missing item: on its card and in its box */
.px-s.px-misschip { color: var(--red, #b44); border: 1px dashed currentColor; border-radius: 3px; padding: 0 5px; font-size: 11.5px; white-space: nowrap; font-variant-caps: small-caps; letter-spacing: .02em; }
.px-missing { max-width: 60ch; padding: 18px 20px; align-self: start; justify-self: start; }
.px-misshead { font-weight: 600; color: var(--red, #b44); margin: 0 0 8px; font-variant-caps: small-caps; letter-spacing: .02em; }
.px-missing .note-md { font-size: 13.5px; line-height: 1.5; }

/* what a filter hides, beside the count and in an empty list */
.px-count b, .px-none b { color: var(--text); font-weight: 600; }
.px-clearf { font-size: 11.5px; padding: 0 7px; margin-left: 3px; }
/* a stub's long description, and any tall reading, starts at the top of the box: centred, it
   overflowed upward and its first lines could not be scrolled to */
.px-view, .px-pv { place-items: safe center; }
.px-pv:has(> .px-missing), .px-view:has(> .px-missing) { place-items: start stretch; }
.px-view > .px-pv:has(> .px-missing) { align-self: start; justify-self: stretch; }
.px-view.px-withalts > .px-pv { place-items: safe center; }
.px-view.px-withalts > .px-pv:has(> .px-missing) { place-items: start stretch; }

/* stepping through: the list it was opened from, and each sequence it is in */
.px-stepbars:empty { display: none; }
.px-stepbars { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 8px; }
.px-stepbar { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.px-stepbar .btn { padding: 1px 8px; font-size: 12px; }
.px-stepbar[data-stepkind="seq"] .px-steppos { color: var(--text); }
.px-cchip button[disabled] { opacity: .35; cursor: default; }

/* related items: a list like Cited in, each row with its unlink button */
.px-relrow { display: flex; gap: 4px; align-items: stretch; }
.px-relrow .px-cite { flex: 1; }
.px-reladd { font-size: 11.5px; padding: 0 7px; margin-left: 6px; }
.px-related:empty { display: none; }

/* the sequence editor */
.px-seqdlg { width: min(760px, 94vw); }
.px-sqlist { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 3px; max-height: 50vh; overflow: auto; }
.px-sqrow { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 1px solid var(--line-soft, var(--line)); border-radius: 5px; background: var(--bg); font-size: 13px; }
.px-sqrow.over { border-color: var(--beam); box-shadow: 0 -2px 0 var(--beam); }
.px-sqrow.dragging { opacity: .45; }
.px-sqgrip { cursor: grab; color: var(--text-faint); letter-spacing: -2px; user-select: none; }
.px-sqn { min-width: 1.6em; text-align: right; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.px-sqt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-sqbtns { display: inline-flex; gap: 2px; }
.px-sqbtns button[disabled] { opacity: .3; }
.px-sqadd { display: flex; gap: 6px; margin: 6px 0 10px; }
.px-sqadd input { flex: 1; font: 13px var(--sans); padding: 4px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.px-seqrow { cursor: pointer; }
