/* book.css - Book (kit/book.js): a version's text set as a page, one text or two facing, with
   the stages of revision. On the bench's colour tokens; the bench's own serif where it has one.
   Part of bench-kit (github.com/critical-code-studies/bench-kit). */
#view-book .bk-bar { flex-wrap: wrap; gap: 6px 8px; }
#view-book .bk-texts { display: inline-flex; flex-wrap: wrap; gap: 4px; }
#view-book .bk-stages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex-basis: 100%; }
#view-book .bk-stages input[type="range"] { width: min(340px, 46vw); accent-color: var(--amber); }
/* every revision is shown: the slider does not set the text until it is moved */
#view-book .bk-stages input[type="range"].bk-idle { opacity: 0.5; }
#view-book .bk-imgs { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--text-dim); }
#view-book .bk-imgs .btn { padding: 2px 8px; }
#view-book .bk-imgs .bk-eye { display: inline-flex; align-items: center; padding: 3px 6px; }
#view-book .bk-imgs input[type="range"] { width: 110px; accent-color: var(--amber); }
#view-book .bk-stage-l { font-size: 13px; color: var(--text-dim); min-width: 14em; }

#view-book .bk-cols { display: grid; grid-template-columns: minmax(0, 1fr); }
#view-book .bk-cols.bk-two { grid-template-columns: repeat(var(--bk-n, 2), minmax(0, 1fr)); }
#view-book .bk-col { position: relative; height: calc(100vh - var(--bk-top, 150px) - 4px); overflow: auto; padding: 20px 20px 120px; scroll-behavior: auto; }
#view-book .bk-two .bk-col + .bk-col { border-left: 1px solid var(--line); }
#view-book .bk-colhead { margin: 0 0 8px clamp(8px, 4vw, 56px); font: 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
#view-book .bk-part { margin: 36px 0 10px clamp(8px, 4vw, 56px); font: 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }

.bk-page { max-width: none; margin: 0; font: var(--bk-size, 18px)/1.65 var(--serif, Georgia, "Iowan Old Style", serif); color: var(--text); }
/* a sheet to a page: the text on the left with a margin, the page's image on the right at the
   slider's width (--bk-imgw, set on the view), held in view while its text is read */
.bk-sheet { display: grid; grid-template-columns: minmax(0, 38em) var(--bk-imgw, 320px); gap: 0 40px; justify-content: start; padding-left: clamp(8px, 4vw, 56px); }
.bk-two .bk-sheet { grid-template-columns: minmax(0, 1fr) calc(var(--bk-imgw, 320px) * 0.45); gap: 0 20px; padding-left: 8px; }
.bk-fig { margin: 0; position: sticky; top: 12px; align-self: start; padding-top: 1.2em; }
.bk-fig-b { display: block; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-2); cursor: zoom-in; width: 100%; }
.bk-fig-b:hover { border-color: var(--amber); }
/* a box of fixed shape, so the text does not move as the images load */
.bk-fig-b img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.bk-fig figcaption { font: 11px var(--mono); color: var(--text-faint); margin-top: 4px; }
/* the images folded away (Off) give their room to the text, a ▣ at each page break opening one */
#view-book.bk-noimg .bk-sheet { grid-template-columns: minmax(0, 52em); }
#view-book.bk-noimg .bk-two .bk-sheet { grid-template-columns: minmax(0, 1fr); }
#view-book.bk-noimg .bk-fig { display: none; }
/* three columns or more: the images beside the first only, a ▣ at each page break in the others */
#view-book :is(.bk-many, .bk-onefig) .bk-col + .bk-col .bk-sheet { grid-template-columns: minmax(0, 1fr); }
#view-book :is(.bk-many, .bk-onefig) .bk-col + .bk-col .bk-fig { display: none; }
#view-book :is(.bk-many, .bk-onefig) .bk-col + .bk-col .bk-pb-img { display: inline-block; }
/* the image to the left of its text (SW.BENCH.doc.imageSide: 'left') */
#view-book.bk-imgleft .bk-sheet { grid-template-columns: var(--bk-imgw, 320px) minmax(0, 38em); }
#view-book.bk-imgleft .bk-two .bk-sheet { grid-template-columns: calc(var(--bk-imgw, 320px) * 0.45) minmax(0, 1fr); }
#view-book.bk-imgleft .bk-fig { order: -1; }
#view-book.bk-imgleft.bk-noimg .bk-sheet, #view-book.bk-imgleft :is(.bk-many, .bk-onefig) .bk-col + .bk-col .bk-sheet { grid-template-columns: minmax(0, 1fr); }
.bk-beside select + .faint { margin-left: 4px; }
.bk-pb-img { display: none; order: 2; font: 12px var(--sans, system-ui); padding: 0 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-2); color: var(--text-dim); cursor: zoom-in; }
.bk-pb-img:hover { border-color: var(--amber); color: var(--text); }
#view-book.bk-noimg .bk-pb-img { display: inline-block; }
.bk-pb::after { order: 3; }
.bk-page p, .bk-page .bk-lg { margin: 0 0 0.9em; text-align: justify; hyphens: auto; }
.bk-page h3.bk-head { font: 600 0.833em/1.5 var(--serif, Georgia, serif); letter-spacing: 0.14em; text-transform: uppercase; text-align: center; margin: 1.6em 0 1em; }
.bk-page p.bk-l { margin: 0 0 0 2em; text-align: left; }
.bk-page .bk-lg { margin-left: 2em; text-align: left; }
.bk-page p.bk-margin { font-size: 0.78em; color: var(--text-dim); border-left: 2px solid var(--line); padding-left: 10px; text-align: left; }
.bk-page p.bk-margin::before { content: attr(data-where); display: block; font: 10px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.bk-page .bk-r-center { text-align: center; }
.bk-page hr.bk-divider { border: 0; border-top: 1px solid var(--line); width: 30%; margin: 1.6em auto; }

/* a page break: the page's number, and a small image of it where the document gives one */
.bk-pb { display: flex; align-items: center; gap: 10px; margin: 1.2em 0 0.8em; color: var(--text-faint); font: 11px var(--mono); }
.bk-pb::after { content: ""; flex: 1; border-top: 1px solid var(--line-soft); }

/* a page larger, over the view, with its details; a click closes it */
/* as wide as the page fitted to the window's height, with the details beside it (--bk-ar, the page's width over its height) */
dialog.bk-modal { width: min(96vw, calc(min(90vh, 1600px) * var(--bk-ar, 0.8) + 340px)); max-width: 96vw; max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
dialog.bk-modal button, dialog.bk-modal a { cursor: pointer; }
dialog.bk-modal::backdrop { background: rgba(0, 0, 0, 0.72); cursor: zoom-out; }
.bk-modal-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px); max-height: 94vh; }
.bk-modal-in img { display: block; width: 100%; height: min(90vh, 1600px); object-fit: contain; background: var(--surface-2); }
.bk-modal-pic { position: relative; overflow: hidden; touch-action: none; }
/* a page with its edges trimmed (Settings ▸ Book): the image larger than its box, the kept part in it */
.bk-crop { position: relative; overflow: hidden; width: 100%; }
.bk-crop > img.bk-cropped { position: absolute; max-width: none; max-height: none; aspect-ratio: auto; object-fit: fill; }
.bk-trim .bk-zoom { height: min(90vh, 1600px); display: flex; align-items: center; justify-content: center; }
.bk-trim .bk-zoom > .bk-crop { flex: none; }
/* the image and its boxes, zoomed and moved together */
.bk-zoom { position: relative; transform-origin: 0 0; will-change: transform; }
.bk-zoomed .bk-modal-pic { cursor: grab; }
.bk-zoomed .bk-modal-pic:active { cursor: grabbing; }
.bk-zctl { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.bk-zctl button { width: 40px; height: 36px; border: 0; border-radius: 6px; font-size: 18px; color: #fff; background: rgba(0, 0, 0, 0.42); cursor: pointer; }
.bk-zctl button:hover { background: rgba(0, 0, 0, 0.66); }
.bk-zctl .bk-zw { width: auto; padding: 0 10px; font-size: 13px; }
.bk-zctl .bk-zpc { min-width: 52px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font: 12px var(--mono, monospace); color: #fff; background: rgba(0, 0, 0, 0.42); }
/* the page before and after: large enough to tap, either side of the image */
.bk-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; border-radius: 6px; font-size: 22px; color: #fff; background: rgba(0, 0, 0, 0.42); cursor: pointer; }
.bk-nav:hover:not(:disabled) { background: rgba(0, 0, 0, 0.66); }
.bk-nav:disabled { opacity: 0.25; cursor: default; }
.bk-nav-prev { left: 10px; }
.bk-nav-next { right: 10px; }
.bk-x { float: right; width: 36px; height: 36px; margin: -6px -6px 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 16px; cursor: pointer; }
.bk-x:hover { border-color: var(--amber); }
.bk-modal-meta { padding: 16px 18px; overflow: auto; font-size: 13px; max-height: calc(94vh - 2px); box-sizing: border-box; }
.bk-modal-meta table { border-collapse: collapse; width: 100%; }
.bk-modal-meta td { padding: 4px 8px 4px 0; vertical-align: top; border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.bk-modal-meta td:first-child { color: var(--text-dim); width: 7.5em; overflow-wrap: normal; hyphens: manual; }
.bk-modal-meta .swref { white-space: normal; }

/* the marks */
.bk-italic { font-style: italic; }
.bk-bold { font-weight: 600; }
.bk-smallcaps, .bk-small-caps { font-variant: small-caps; }
.bk-sup, .bk-superscript { vertical-align: super; font-size: 0.75em; }
.bk-underline { text-decoration: underline; }
.bk-add { color: var(--amber); }
.bk-hands .bk-add { color: var(--hand, var(--amber)); }
.bk-stet { text-decoration: underline dotted; text-underline-offset: 3px; }
.bk-unc { text-decoration: underline wavy var(--text-faint); text-underline-offset: 3px; }
.bk-reg, .bk-cor { border-bottom: 1px dotted var(--text-faint); cursor: help; }
.bk-res::before, .bk-supp::before { content: "["; color: var(--text-faint); }
.bk-res::after, .bk-supp::after { content: "]"; color: var(--text-faint); }
.bk-gap::before { content: "[…]"; color: var(--text-faint); }
.bk-ref { border-bottom: 1px dotted var(--amber); cursor: pointer; }
.bk-meta { font-size: 0.85em; color: var(--text-faint); font-style: italic; }
.bk-all .bk-add { vertical-align: 0.45em; font-size: 0.78em; }
.bk-all .bk-del { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; color: var(--text-dim); }
.bk-all.bk-hands .bk-del { text-decoration-color: var(--hand, var(--red)); }

/* the revisions' boxes on the page's image: faint while the pointer is on the image, lit for the
   revision under the pointer in the text, and for the revisions made at the slider's stage */
.bk-fig-b { position: relative; }
.bk-zl { position: absolute; pointer-events: none; }
/* the page's lines (pb.lines), as bands under the revisions' boxes */
.bk-band { position: absolute; box-sizing: border-box; border-bottom: 1px solid transparent; pointer-events: auto; cursor: pointer; z-index: 1; transition: background-color 0.2s ease, border-color 0.2s ease; }
.bk-fig-b:hover .bk-band, .bk-modal-pic:hover .bk-band { border-bottom-color: color-mix(in srgb, var(--bk-link, var(--amber)) 25%, transparent); }
.bk-fig-b:hover .bk-band.bk-band-est, .bk-modal-pic:hover .bk-band.bk-band-est { border-bottom-style: dashed; }
/* Share highlight: the picture to send, and what can be done with it */
.bk-shl { width: min(820px, 94vw); max-height: 90vh; padding: 0; }
.bk-shl form { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; }
.bk-shl h3 { margin: 0; }
.bk-shl-pic { overflow: auto; max-height: 56vh; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.bk-shl-pic img { display: block; max-width: 100%; max-height: 54vh; width: auto; height: auto; margin: 0 auto; }
.bk-shl-pic .hint { padding: 16px; margin: 0; }
.bk-shl-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-shl-gap { flex: 1; }
.bk-shl-msg { min-height: 1.4em; margin: 0; }
/* Settings ▸ Book: a sample of the highlight links' colour */
.bk-linkdemo { padding: 1px 6px; border-radius: 2px; outline: 1px solid transparent; }
/* the places of a page's passages (doc.regions): faint with the pointer on the picture, lit with their passage */
.bk-rg { position: absolute; box-sizing: border-box; border: 1px solid transparent; border-radius: 2px; pointer-events: auto; cursor: pointer; z-index: 1; transition: background-color 0.2s ease, border-color 0.2s ease; }
.bk-fig-b:hover .bk-rg, .bk-modal-pic:hover .bk-rg { border-color: color-mix(in srgb, var(--bk-link, var(--amber)) 25%, transparent); }
.bk-rg.bk-rg-est { border-style: dashed; }
/* a passage's place lit or held is filled, with no edge (David): the faint edges show where the places are while
   the pointer is on the picture, and go from a place once it is lit. The fill runs two pixels past the place
   above and below (shadows of its own colour), so that it does not sit tight on the first and last characters */
.bk-fig-b .bk-rg.bk-rhover, .bk-fig-b .bk-rg.bk-rsel, .bk-modal-pic .bk-rg.bk-rhover, .bk-rg.bk-rhover, .bk-rg.bk-rsel { background: color-mix(in srgb, var(--bk-link, var(--amber)) 24%, transparent); border-color: transparent; box-shadow: 0 -2px 0 0 color-mix(in srgb, var(--bk-link, var(--amber)) 24%, transparent), 0 2px 0 0 color-mix(in srgb, var(--bk-link, var(--amber)) 24%, transparent); }
.bk-fig-b .bk-rg.bk-rheld, .bk-modal-pic .bk-rg.bk-rheld, .bk-rg.bk-rheld { background: color-mix(in srgb, var(--bk-link, var(--amber)) 34%, transparent); border-color: transparent; box-shadow: 0 -2px 0 0 color-mix(in srgb, var(--bk-link, var(--amber)) 34%, transparent), 0 2px 0 0 color-mix(in srgb, var(--bk-link, var(--amber)) 34%, transparent); }
::highlight(bk-rg-hover) { background-color: color-mix(in srgb, var(--bk-link, var(--amber, #a3317a)) 20%, transparent); }
::highlight(bk-rg-held) { background-color: color-mix(in srgb, var(--bk-link, var(--amber, #a3317a)) 36%, transparent); }
.bk-s.bk-rg-hover { background-color: color-mix(in srgb, var(--bk-link, var(--amber)) 20%, transparent); }
.bk-s.bk-rg-held { background-color: color-mix(in srgb, var(--bk-link, var(--amber)) 36%, transparent); }
.bk-band.bk-lhover { background: color-mix(in srgb, var(--bk-link, var(--amber)) 14%, transparent); border-bottom-color: var(--bk-link, var(--amber)); }
.bk-band.bk-lsel { background: color-mix(in srgb, var(--bk-link, var(--amber)) 24%, transparent); border-bottom-color: var(--bk-link, var(--amber)); }
.bk-fig-b .bk-band:hover, .bk-modal-pic .bk-band:hover { background: color-mix(in srgb, var(--bk-link, var(--amber)) 14%, transparent); border-bottom-color: var(--bk-link, var(--amber)); }
.bk-z { z-index: 2; }
.bk-z.bk-zbig { z-index: 0; }
.bk-z { position: absolute; box-sizing: border-box; border: 1px solid transparent; border-radius: 2px; pointer-events: auto; cursor: pointer; transition: background-color 0.3s ease, border-color 0.3s ease; }
.bk-fig-b:hover .bk-z { border-color: color-mix(in srgb, var(--bk-link, var(--amber)) 45%, transparent); }
.bk-z.bk-zstage { border: 2px solid var(--red); background: color-mix(in srgb, var(--red) 16%, transparent); animation: bk-zpulse 1.2s ease; }
.bk-z.bk-zhover, .bk-fig-b .bk-z:hover { border: 2px solid var(--bk-link, var(--amber)); background: color-mix(in srgb, var(--bk-link, var(--amber)) 26%, transparent); }
@keyframes bk-zpulse { from { background: color-mix(in srgb, var(--red) 45%, transparent); } }
.bk-s.bk-zlink { background-color: color-mix(in srgb, var(--bk-link, var(--amber)) 30%, transparent); }
/* a part of the page transcribed under another page: below its lowest box, and a link by its rule */
.bk-else { position: absolute; left: 0; width: 100%; box-sizing: border-box; border: 1px dashed transparent; border-radius: 2px; pointer-events: auto; cursor: pointer; }
.bk-fig-b:hover .bk-else, .bk-modal-pic:hover .bk-else { border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.bk-else:hover { background: color-mix(in srgb, var(--amber) 14%, transparent); }
.bk-else-link { order: 2; font: 12px var(--sans, system-ui); padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-2); color: var(--text-dim); cursor: pointer; }
.bk-else-link:hover { border-color: var(--amber); color: var(--text); }
/* the text a box was clicked for, until the reader does something else */
.bk-page .bk-held { background-color: color-mix(in srgb, var(--bk-link, var(--amber)) 34%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bk-link, var(--amber)) 55%, transparent); border-radius: 2px; }
/* a box's words and revision, by the pointer in the enlarged view */
.bk-ztip { position: fixed; z-index: 3; max-width: 22em; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); font-size: 13px; line-height: 1.4; pointer-events: none; }
.bk-ztip-w { font: 15px/1.4 var(--serif, Georgia, serif); margin-bottom: 4px; }
.bk-ztip-h { margin-top: 4px; color: var(--text-faint); font-size: 12px; }
.bk-modal-pic .bk-zl { position: absolute; pointer-events: none; }
.bk-modal-pic:hover .bk-z { border-color: color-mix(in srgb, var(--bk-link, var(--amber)) 45%, transparent); }
.bk-modal-pic .bk-z:hover { border: 2px solid var(--bk-link, var(--amber)); background: color-mix(in srgb, var(--bk-link, var(--amber)) 26%, transparent); }
/* with Compare: the page of the passage under the pointer in the facing text */
.bk-sheet.bk-leaflit .bk-fig-b { outline: 3px solid var(--amber); outline-offset: 2px; }
.bk-sheet.bk-leaflit .bk-pb { color: var(--amber); }

/* the revisions coming and going as the stage moves */
/* Strike deletions: a deletion made by the stage stays, struck through in red (the hand's colour
   with hands on), drawn through as it is reached; this stage's own revisions marked more strongly */
.bk-s.bk-struck { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; color: var(--text-dim); }
.bk-hands .bk-s.bk-struck { text-decoration-color: var(--hand, var(--red)); }
.bk-s.bk-strike-in { animation: bk-strike 0.6s ease; }
@keyframes bk-strike { from { text-decoration-color: transparent; color: var(--text); } }
.bk-s.bk-now { background-color: color-mix(in srgb, var(--hl) 55%, transparent); box-shadow: 0 1px 0 var(--amber); }
.bk-s { transition: opacity 0.45s ease, font-size 0.45s ease, background-color 1.2s ease; border-radius: 2px; }
.bk-s.bk-off { opacity: 0; font-size: 0; }
.bk-s.bk-gone { display: none; }
.bk-s.bk-new { animation: bk-arrive 1.4s ease; }
.bk-s.bk-flash, .bk-page .bk-flash { animation: bk-arrive 1.6s ease; }
@keyframes bk-arrive { from { background-color: var(--hl); } to { background-color: transparent; } }

/* the group's annotations on their lines */
.bk-noted { background-image: linear-gradient(transparent 88%, color-mix(in srgb, var(--amber) 55%, transparent) 88%); }
.bk-nm { font: 11px var(--sans, system-ui); border: 1px solid var(--line); background: var(--surface-2); color: var(--text-dim); border-radius: 9px; padding: 0 5px; margin-right: 3px; vertical-align: 0.15em; cursor: pointer; }
.bk-nm:hover { border-color: var(--amber); color: var(--text); }
.bk-selpop { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bk-selpop .selref { margin-right: 4px; }
.bk-notepop { max-width: 32em; font: calc(var(--bk-size, 18px) * 0.78)/1.5 var(--serif, Georgia, serif); }

@media (max-width: 760px) {
  .bk-sheet, .bk-two .bk-sheet { grid-template-columns: minmax(0, 1fr) min(96px, var(--bk-imgw, 320px)); gap: 0 12px; padding-left: 4px; }
  #view-book.bk-noimg .bk-sheet { grid-template-columns: minmax(0, 1fr); }
  dialog.bk-modal { width: 96vw; }
  .bk-modal-in { grid-template-columns: minmax(0, 1fr); }
  .bk-modal-in img { max-height: 70vh; }
  .bk-trim .bk-zoom { height: 70vh; }
  #view-book .bk-cols.bk-two { grid-template-columns: minmax(0, 1fr); }
  #view-book .bk-two .bk-col { height: auto; max-height: 70vh; }
  #view-book .bk-two .bk-col + .bk-col { border-left: 0; border-top: 1px solid var(--line); }
  .bk-page { font-size: calc(var(--bk-size, 18px) - 2px); }
  .bk-page p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .bk-s { transition: none; } .bk-s.bk-new, .bk-s.bk-flash, .bk-s.bk-strike-in, .bk-z.bk-zstage { animation: none; } }

/* Settings ▸ Book: the pages' edges, dragged on a page */
/* Settings ▸ Book fits its pane without scrolling: the page at a modest height, its controls beside it */
.bk-tset { display: flex; gap: 16px; align-items: flex-start; }
.bk-tpic { flex: none; }
.bk-tctl { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: start; }
.bk-tctl p { margin: 0; }
.bk-linkrow .bk-linkgap { flex: none; width: 10px; }
.set-pane .bk-linkrow label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; width: auto; }
.bk-linkrow .bk-linkdemo { font-size: 13px; }
.set-pane > h2 + .hint { margin: 0; }
@media (max-width: 520px) { .bk-tset { flex-wrap: wrap; } }
.bk-tpage { position: relative; display: inline-block; overflow: hidden; touch-action: none; }
.bk-tpage img { display: block; height: 200px; width: auto; max-width: 100%; }
.bk-tframe { position: absolute; outline: 2px solid #fff; outline-offset: -1px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); pointer-events: none; }
.bk-tedge { position: absolute; pointer-events: auto; }
.bk-tedge-l, .bk-tedge-r { top: 0; bottom: 0; width: 14px; cursor: ew-resize; }
.bk-tedge-t, .bk-tedge-b { left: 0; right: 0; height: 14px; cursor: ns-resize; }
.bk-tedge-l { left: -7px; } .bk-tedge-r { right: -7px; }
.bk-tedge-t { top: -7px; } .bk-tedge-b { bottom: -7px; }
.bk-tnums { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 18px; }
.bk-tnums label { display: flex; align-items: center; gap: 6px; }
.bk-tnums label > span { min-width: 3.4em; }
.bk-tnums input { width: 4.6em; }

/* a bookmark: red, at the top right of a page beside the text and of the enlarged page; faint on the
   page under the pointer until it is set */
.bk-mkbox { position: absolute; pointer-events: none; z-index: 3; }
.bk-mk { position: absolute; top: -2px; right: 8%; width: 14px; height: 24px; pointer-events: auto; cursor: pointer; background: #c62828; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); opacity: 0; transition: opacity .12s; }
.bk-fig-b:hover .bk-mk, .bk-modal-pic:hover .bk-mk { opacity: .35; }
.bk-mk:hover { opacity: .75 !important; }
.bk-mk.on { opacity: 1 !important; }
.bk-modal-pic .bk-mk { width: 22px; height: 38px; transform-origin: 100% 0; }
.bk-bar .bk-marks { max-width: 13em; }
/* the enlarged page's details: the image's credit folded, the rating, bookmark and link on one line,
   the keys in small type */
.bk-credit summary { cursor: pointer; }
.bk-credit[open] summary { margin-bottom: 4px; }
.bk-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; border-top: 1px solid var(--line-soft); }
.bk-acts .fd-rate { margin-right: 0; }
.bk-markbtn.on { border-color: #c62828; background: color-mix(in srgb, #c62828 14%, transparent); }
.bk-modal-meta .bk-keys { font-size: 10.5px; line-height: 1.45; margin-top: 10px; }
