html:has(.book-source-note[open]) {overflow:hidden;scrollbar-gutter:stable}
body .book-source-note {
  --note-paper:#f9f5eb;--note-ink:#242520;--note-sub:#5e6058;--note-line:#c7c5b9;--note-link:#233e85;
  position:fixed;inset:auto;margin:0;padding:0;box-sizing:border-box;
  width:min(26rem,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:min(78dvh,calc(100dvh - 24px));
  overflow:hidden;border:1px solid var(--note-line);border-radius:.55rem;background:var(--note-paper);color:var(--note-ink);
  box-shadow:0 10px 38px rgba(27,27,22,.16);font-family:Golos,Arial,sans-serif;font-size:var(--font,18px);line-height:1.45;
}
body .book-source-note[open] {display:flex;flex-direction:column}
.book-source-note::backdrop {background:rgba(33,33,27,.14)}
html:is([data-theme=dark],[data-appearance=dark]) .book-source-note {
  --note-paper:#2d2e28;--note-ink:#f2eee2;--note-sub:#c3c2b6;--note-line:#66695e;--note-link:#b8cdff;
}
body .book-note-head {display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.1rem .9rem 0 1.1rem;flex:none;}
body .book-note-head .book-note-label {font-size:.82em;font-weight:500;color:var(--note-sub)}
body .book-note-close {font:inherit;font-size:.84em;line-height:1.2;background:transparent;border:0;cursor:pointer;color:var(--note-link);padding:0 .2rem;min-height:44px;}
body .book-note-content {overflow:auto;overscroll-behavior:contain;padding:0 1.1rem .65rem}
body .book-note-content h2 {color:inherit;font:600 1em/1.32 Golos,Arial,sans-serif;letter-spacing:-.014em;margin:0}
body .book-note-content p {font:inherit;font-size:.91em;margin:.65em 0 .2em;line-height:1.48;color:var(--note-ink)}
body .book-note-publication {font-size:.91em;color:var(--note-link);display:inline-flex;align-items:center;gap:.28em;min-height:44px;text-decoration:underline;text-underline-offset:.17em}
body .book-note-publication::after {content:"↗";text-decoration:none}
body .book-source-note :is(button,a):focus-visible {outline:2px solid var(--note-link);outline-offset:1px}
main.bw-reading a[data-reader-note] {position:relative;}
main.bw-reading a[data-reader-note]::before {content:"";position:absolute;inset:-.12em -.16em;}
@media (forced-colors:active) {body .book-source-note {border-color:CanvasText}.book-source-note::backdrop {background:transparent}}
body .native-source-note {display:none}
main button.native-note-call {
  display:none;appearance:none;border:0;border-radius:0;padding:0;background:transparent;
  color:var(--nr-accent);text-decoration:underline;text-underline-offset:.15em;font:inherit;cursor:pointer;
}
@supports selector(:popover-open) {
  body .native-source-note:popover-open {display:flex;flex-direction:column;inset:0;margin:auto;height:fit-content}
}

.bw-reading .nr-chapter figure.reading-example {
  --example-blue:var(--bw-book-ink-blue,#233e85);
  --example-text:var(--ink,#24241f);
  --example-secondary:var(--nr-muted,#5d5e54);
  --example-rule:var(--nr-line,#ccc7b8);
  --example-paper:#f6f1e5;
  --stroke-return:url("/assets/bw-native-books/example-return-ca5f41eae8c5.webp");
  --stroke-outward:url("/assets/bw-native-books/example-outward-3693ff44dcf3.webp");
  --stroke-down:url("/assets/bw-native-books/example-down-ee3e6669f5a9.webp");
  --stroke-fork:url("/assets/bw-native-books/example-fork-364073803d59.webp");
  --stroke-mark-horizontal:url("/assets/bw-native-books/example-mark-horizontal-2bf7d20fe41d.webp");
  --stroke-mark-slant:url("/assets/bw-native-books/example-mark-slant-247e3e584472.webp");
  --stroke-mark-upright:url("/assets/bw-native-books/example-mark-upright-82d445e06d5b.webp");
  --stroke-mark-wave:url("/assets/bw-native-books/example-mark-wave-c468f329806a.webp");
  container-type:inline-size;
  margin:clamp(1.75rem,5vw,3rem) 0;
  padding:0;
  min-inline-size:0;
  text-align:start;
}
html:is([data-theme=dark],[data-appearance=dark]) .bw-reading .nr-chapter figure.reading-example {
  --example-paper:#242520;
}
.bw-reading .nr-chapter .reading-example p {
  margin:0;
  padding:0;
  text-align:start;
  overflow-wrap:normal;
  word-break:normal;
}
.bw-reading .nr-chapter .reading-example .nr-src-scene-label {
  display:flex;
  align-items:center;
  gap:.8em;
  font-size:max(.8em,14px);
  line-height:1.35;
  font-weight:550;
  color:var(--example-secondary);
  text-wrap:wrap;
}
.reading-example .nr-src-scene-label::after {
  content:"";
  flex:1 1 2em;
  border-block-start:1px solid var(--example-rule);
}
.bw-reading .nr-chapter .reading-example .example-board {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  gap:.8em 1.45em;
  padding:.95em 0 .9em;
}
.bw-reading .nr-chapter .reading-example .nr-src-scene-card,
.bw-reading .nr-chapter .reading-example .nr-src-scene-unframed {
  min-inline-size:0;
  border:0;
  margin:0;
  padding:0;
  box-shadow:none;
  border-radius:0;
  background:none;
}
.bw-reading .nr-chapter .reading-example .nr-src-scene-heading {
  margin:0 0 .28em;
  font-size:max(.82em,14px);
  line-height:1.35;
  color:var(--example-secondary);
  font-weight:500;
  text-wrap:wrap;
}
.reading-example .nr-src-scene-heading strong {font-weight:inherit}
.bw-reading .nr-chapter .reading-example .nr-src-scene-value,
.bw-reading .nr-chapter .reading-example .nr-src-scene-equation,
.bw-reading .nr-chapter .reading-example .nr-src-scene-result {
  color:var(--example-text);
  font-size:1.06em;
  font-weight:450;
  line-height:1.43;
  font-variant-numeric:lining-nums tabular-nums;
}
.bw-reading .nr-chapter .reading-example .nr-src-scene-card > p + .nr-src-scene-value {margin-block-start:.13em}
.bw-reading .nr-chapter .reading-example figcaption.nr-src-scene-caption {
  color:var(--example-secondary);
  font-size:max(.89em,15px);
  line-height:1.55;
  max-inline-size:64ch;
  padding:0;
  margin:0;
  text-align:start;
}
.bw-reading .nr-chapter .reading-example .nr-src-caption-text {display:inline}
.reading-example[data-example-kind] .nr-src-scene-card :is(.inline-keep,.record-keep,.wrap-prose-unit,.wrap-inset-math) {max-inline-size:100%}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=pair],[data-example-kind=sequence],[data-example-kind=repetition],[data-example-kind=relabel],[data-example-kind=report-label],[data-example-kind=declaration],[data-example-kind=statements],[data-example-kind=instructions],[data-example-kind=rule],[data-example-kind=revision]) .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,11.1em),1fr));
}
.bw-reading .nr-chapter .reading-example .example-board > p {grid-column:1/-1}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=pair],[data-example-kind=repetition],[data-example-kind=relabel],[data-example-kind=report-label],[data-example-kind=declaration],[data-example-kind=statements],[data-example-kind=instructions],[data-example-kind=revision],[data-example-kind=rule]) .example-board > div + div {
  border-inline-start:1px solid var(--example-rule);
  padding-inline-start:1em;
}
@container (max-width:24em) {
  .bw-reading .nr-chapter .reading-example:is([data-example-kind=pair],[data-example-kind=repetition],[data-example-kind=relabel],[data-example-kind=report-label],[data-example-kind=declaration],[data-example-kind=statements],[data-example-kind=instructions],[data-example-kind=revision],[data-example-kind=rule]) .example-board > div + div {
    border-inline-start:0;padding-inline-start:0;
  }
}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=sequence],[data-example-kind=pair],[data-example-kind=relabel],[data-example-kind=statements],[data-example-kind=repetition]) .nr-src-scene-value:only-of-type,
.bw-reading .nr-chapter .reading-example:is([data-example-kind=quotation],[data-example-kind=title-frame]) .nr-src-scene-value {
  font-size:1.25em;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=quotation] .nr-src-scene-value {
  padding-inline-start:.65em;
  border-inline-start:2px solid var(--example-blue);
}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=marks],[data-example-kind=answers]) .example-board {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75em .7em;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=marks] .nr-src-scene-card {
  padding:.55em .25em;
  text-align:center;
  border:1px solid var(--example-rule);
}
.bw-reading .nr-chapter .reading-example[data-example-kind=marks] .nr-src-scene-mark {
  text-align:center;font-size:1.6em;line-height:1.08;color:var(--example-blue);margin:0 0 .25em;
}
/* The character stays in the text and accessible name; ink follows its written shape. */
.reading-example[data-example-kind=marks] .nr-src-scene-card:nth-child(1) {--mark-trace:var(--stroke-mark-horizontal)}
.reading-example[data-example-kind=marks] .nr-src-scene-card:nth-child(2) {--mark-trace:var(--stroke-mark-slant)}
.reading-example[data-example-kind=marks] .nr-src-scene-card:nth-child(3) {--mark-trace:var(--stroke-mark-upright)}
.reading-example[data-example-kind=marks] .nr-src-scene-card:nth-child(4) {--mark-trace:var(--stroke-mark-wave)}
@supports (mask-image:linear-gradient(black,black)) {
  .bw-reading .nr-chapter .reading-example[data-example-kind=marks] .nr-src-scene-mark {
    color:transparent;background:var(--example-blue);mask:var(--mark-trace) center / auto 100% no-repeat;
    min-block-size:1.08em;forced-color-adjust:none;
  }
}
.bw-reading .nr-chapter .reading-example[data-example-kind=marks] .nr-src-scene-name {
  font-size:.91em;line-height:1.35;text-align:center;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=marks] .nr-src-scene-card {align-self:stretch}
.bw-reading .nr-chapter .reading-example[data-example-kind=branches] .example-board {
  grid-template-columns:minmax(0,.94fr) 2.15em minmax(0,1.06fr);
  grid-template-rows:auto auto auto;gap:.12em .35em;
  width:min(100%,22em);margin-inline:auto;align-items:center;
}
.reading-example[data-example-kind=branches] .nr-src-scene-shown-form,
.reading-example[data-example-kind=branches] .nr-src-scene-linked-names {display:contents}
.bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-heading {align-self:end;margin:0 0 .4em}
.bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-shown-form > p {grid-column:1;text-align:end}
.reading-example[data-example-kind=branches] .nr-src-scene-shown-form > .nr-src-scene-heading {grid-row:1}
.bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-shown-form > .nr-src-scene-value {
  grid-row:2/4;font-size:1.7em;line-height:1.2;
}
.reading-example[data-example-kind=branches] .nr-src-scene-linked-names > * {grid-column:3}
.reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-heading {grid-row:1}
.reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-card:nth-child(2) {grid-row:2}
.reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-card:nth-child(3) {grid-row:3}
.reading-example[data-example-kind=branches] .example-board::before {
  content:"";grid-column:2;grid-row:2/4;place-self:center;
  width:2.4em;height:2em;transform:rotate(-90deg);
  background:var(--example-blue);mask:var(--stroke-fork) center / 100% 100% no-repeat;forced-color-adjust:none;
}
@container (max-width:16.5em) {
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .example-board {
    grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,auto);column-gap:.4em;
  }
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .example-board p {text-align:center}
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-shown-form > p,
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-heading {grid-column:1/-1}
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-shown-form > .nr-src-scene-value {grid-row:2}
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .example-board::before {
    grid-column:1/-1;grid-row:3;width:54%;height:1em;transform:none;
  }
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-card:nth-child(2) {grid-column:1;grid-row:4}
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-card:nth-child(3) {grid-column:2;grid-row:4}
  .bw-reading .nr-chapter .reading-example[data-example-kind=branches] .nr-src-scene-linked-names > .nr-src-scene-heading {grid-row:5;margin:.25em 0 0}
}
.bw-reading .nr-chapter .reading-example[data-example-kind=chain] .nr-src-scene-chain,
.bw-reading .nr-chapter .reading-example[data-example-kind=inference] .nr-src-scene-chain {
  display:grid;justify-items:center;gap:.25em;
}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=chain],[data-example-kind=inference]) .nr-src-scene-chain p {text-align:center}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=chain],[data-example-kind=inference]) .nr-src-scene-arrow {
  width:1.15em;height:1.72em;font-size:1em;line-height:1;overflow:hidden;
  color:transparent;background:var(--example-blue);
  mask:var(--stroke-down) center / contain no-repeat;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=inference] .nr-src-scene-premises {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2em;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=inference] .nr-src-scene-chain > .nr-src-scene-card .nr-src-scene-value {font-size:1.4em}
.bw-reading .nr-chapter .reading-example[data-example-kind=cycle] .example-board {padding:.9em 0 .86em}
.bw-reading .nr-chapter .reading-example[data-example-kind=cycle] .nr-src-scene-chain {
  display:grid;
  width:min(100%,21em);margin:0 auto;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:auto minmax(4.15em,auto) auto;
  align-items:center;
}
.reading-example[data-example-kind=cycle] .nr-src-scene-card {grid-column:1/-1;text-align:center}
.reading-example[data-example-kind=cycle] .nr-src-scene-card:nth-child(3) {grid-row:3}
.bw-reading .nr-chapter .reading-example[data-example-kind=cycle] .nr-src-scene-value {
  text-align:center;font-size:1.14em;font-weight:520;line-height:1.32;
}
.reading-example[data-example-kind=cycle] .cycle-edge {
  display:grid;place-items:center;grid-row:2;min-height:4.15em;min-inline-size:0;
}
.reading-example .cycle-back {grid-column:1}
.reading-example .cycle-forward {grid-column:2}
.bw-reading .nr-chapter .reading-example .cycle-edge .nr-src-scene-arrow,
.bw-reading .nr-chapter .reading-example .cycle-edge .nr-src-scene-relation {grid-area:1/1}
.bw-reading .nr-chapter .reading-example .cycle-edge .nr-src-scene-arrow {
  justify-self:stretch;align-self:stretch;overflow:hidden;color:transparent;
  background:var(--example-blue);mask:var(--cycle-line) center / 100% 100% no-repeat;
}
.reading-example .cycle-back {--cycle-line:var(--stroke-return)}
.reading-example .cycle-forward {--cycle-line:var(--stroke-outward)}
.bw-reading .nr-chapter .reading-example .cycle-edge .nr-src-scene-relation {
  color:var(--example-secondary);position:relative;
  min-inline-size:0;padding:.05em 0;
  font-size:max(.83em,14px);line-height:1.35;text-align:center;
}
.bw-reading .nr-chapter .reading-example .cycle-back .nr-src-scene-relation {justify-self:stretch;margin-inline:31% 3%}
.bw-reading .nr-chapter .reading-example .cycle-forward .nr-src-scene-relation {justify-self:stretch;margin-inline:3% 31%}
@container (max-width:13em) {
  .bw-reading .nr-chapter .reading-example .cycle-edge .nr-src-scene-relation {font-size:max(.73em,14px)}
}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=calculation],[data-example-kind=criterion]) .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,7.5em),1fr));
}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=calculation],[data-example-kind=criterion]) .example-board > .nr-src-scene-equation,
.bw-reading .nr-chapter .reading-example[data-example-kind=formula] .nr-src-scene-value {
  font-size:1.19em;font-weight:500;line-height:1.5;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=criterion] .example-board > .nr-src-scene-heading {margin:0}
.bw-reading .nr-chapter .reading-example:is([data-example-kind=criterion],[data-example-kind=calculation]) .nr-src-scene-card {padding-top:.55em;border-top:1px solid var(--example-rule)}
.bw-reading .nr-chapter .reading-example[data-example-kind=formula] .nr-src-scene-value {color:var(--example-blue)}
.bw-reading .nr-chapter .reading-example[data-example-kind=ledger] .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,10.9em),1fr));gap:1em 1.6em;
}
.bw-reading .nr-chapter .reading-example .journal-entries .nr-src-scene-value {
  font-size:1em;border-bottom:1px solid var(--example-rule);padding:.22em 0;
}
.bw-reading .nr-chapter .reading-example .journal-entries {max-inline-size:20em}
.bw-reading .nr-chapter .reading-example[data-example-kind=ledger] .nr-src-scene-log ~ div .nr-src-scene-value {font-weight:500}
.bw-reading .nr-chapter .reading-example[data-example-kind=protocol] .nr-src-scene-protocol {max-width:29em}
.bw-reading .nr-chapter .reading-example[data-example-kind=protocol] .nr-src-scene-protocol > .nr-src-scene-value {
  color:var(--example-text);font-size:1.65em;line-height:1.3;margin:0 0 .3em;
}
.bw-reading .nr-chapter .reading-example .protocol-fields {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9.6em),1fr));gap:.1em 1.3em;
}
.bw-reading .nr-chapter .reading-example .protocol-fields .nr-src-scene-value {padding:.2em 0;border-bottom:1px solid var(--example-rule);font-size:1em}
.bw-reading .nr-chapter .reading-example[data-example-kind=rule] .nr-src-scene-result,
.bw-reading .nr-chapter .reading-example[data-example-kind=field] .nr-src-scene-unchanged-rule {
  padding-block-start:.55em;border-block-start:1px solid var(--example-rule);
}
.bw-reading .nr-chapter .reading-example[data-example-kind=field] .nr-src-scene-unchanged-rule {margin-block-start:.62em}
.bw-reading .nr-chapter .reading-example[data-example-kind=answers] .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,5.1em),1fr));gap:.45em 1em;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=corrections] .example-board {grid-template-columns:repeat(auto-fit,minmax(min(100%,11.1em),1fr))}
.bw-reading .nr-chapter .reading-example .correction-pair {
  display:flex;align-items:baseline;gap:.2em 1em;flex-wrap:wrap;
  border-block-end:1px solid var(--example-rule);padding:.3em 0;
}
.bw-reading .nr-chapter .reading-example .correction-pair .nr-src-scene-equation {white-space:nowrap}
.bw-reading .nr-chapter .reading-example .nr-src-scene-strike {text-decoration-thickness:.09em}
.bw-reading .nr-chapter .reading-example[data-example-kind=revision] .nr-src-scene-result {margin:.15em 0;color:var(--example-blue)}
.bw-reading .nr-chapter .reading-example[data-example-kind=report-label] .nr-src-scene-card:last-child .nr-src-scene-value,
.bw-reading .nr-chapter .reading-example[data-example-kind=title-frame] .nr-src-scene-value {
  border:1px solid var(--example-rule);padding:.17em .55em;width:fit-content;max-width:100%;
}
.bw-reading .nr-chapter .reading-example[data-example-kind=title-frame] .nr-src-scene-value {padding:.45em .85em;line-height:1.4}
/* Short terms stay opposite one another at reading widths that fit both. */
.bw-reading .nr-chapter .reading-example:is([data-example-id="4"],[data-example-id="5"],[data-example-id="17"],[data-example-id="22"]) .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,7.2em),1fr));column-gap:1em;
}
.bw-reading .nr-chapter .reading-example[data-example-id="1"] .example-board {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,5.5em),1fr));column-gap:.65em;
}
/* Keep short groups atomic as WebKit measures lines at enlarged type sizes. */
.bw-reading .nr-chapter .reading-example .example-board :is(.record-keep,.wrap-inset-math) {
  display:inline-block;max-inline-size:100%;vertical-align:baseline;
}
@container (min-width:31em) {
  .bw-reading .nr-chapter .reading-example[data-example-kind=marks] .example-board {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (forced-colors:active) {
  .bw-reading .nr-chapter .reading-example {--example-blue:CanvasText;--example-paper:Canvas;--example-text:CanvasText;--example-secondary:CanvasText;--example-rule:GrayText}
  .bw-reading .nr-chapter .reading-example .nr-src-scene-label::after,
  .bw-reading .nr-chapter .reading-example .nr-src-scene-arrow,
  .bw-reading .nr-chapter .reading-example .nr-src-scene-linked-names::before {forced-color-adjust:none}
}

/* All tools operate on the same close view. The drawing keeps its book ink and paper. */
:where(.bw-reading,.native-book-page) [data-inspectable],
:where(.bw-reading,.native-book-page) [data-inspectable] :is(img,svg,.theory-copy-line) {cursor:zoom-in}
:where(.bw-reading,.native-book-page) [data-inspectable] :is(summary,a,button) {cursor:pointer}
:is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection {
  box-sizing:border-box;position:fixed;inset:0;margin:auto;padding:0;
  inline-size:min(76rem,95vw);block-size:min(55rem,92vh);block-size:min(55rem,92dvh);
  max-width:none;max-height:none;min-width:0;border:1px solid var(--nr-line,var(--nb-rule,#b7b4a9));border-radius:5px;
  background:#f6f1e5;color:var(--bw-book-ink-text,#24241f);overflow:hidden;font:inherit;
  --inspection-accent:var(--bw-book-ink-blue,#233e85);
}
html:is([data-theme=dark],[data-appearance=dark]) :is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection {background:#242520;color:#f4efe2}
:is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection:not([open]) {display:none}
:is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.pen-inspection::backdrop {background:rgb(16 19 17 / .6)}
.pen-inspection-bar,.pen-inspection-dock {box-sizing:border-box;display:flex;align-items:center;min-inline-size:0;}
.pen-inspection-bar {justify-content:space-between;gap:.75em;padding:.15rem .7rem .15rem 1rem;border-block-end:1px solid var(--nr-line,var(--nb-rule,#b7b4a9))}
.pen-inspection-bar > span {font:inherit;font-size:.9em;font-weight:550;line-height:1.3;min-inline-size:0;overflow-wrap:break-word}
.pen-inspection-dock {justify-content:center;min-block-size:50px;border-block-start:1px solid var(--nr-line,var(--nb-rule,#b7b4a9));padding-block:.13rem max(.13rem,env(safe-area-inset-bottom))}
.pen-inspection-controls {display:flex;align-items:center;justify-content:center;gap:.25rem;width:max-content;max-width:100%}
:is(.bw-reading .nr-chapter,.native-book-page) .pen-inspection button {display:inline-grid;place-items:center;box-sizing:border-box;min-inline-size:44px;min-block-size:44px;margin:0;padding:.2rem .55rem;color:var(--inspection-accent);background:transparent;border:0;border-radius:2px;font:inherit;line-height:1.15;cursor:pointer}
:is(.bw-reading .nr-chapter,.native-book-page) .pen-inspection :is(.ink-viewer-close,.ink-viewer-step) {font:400 1.55em/1 system-ui,sans-serif;padding:.1rem}
:is(.bw-reading .nr-chapter,.native-book-page) .pen-inspection .pen-inspection-fit {font-size:.91em;margin-inline-end:.3em;text-decoration:underline;text-underline-offset:.17em}
:is(.bw-reading .nr-chapter,.native-book-page) .pen-inspection button:disabled {color:var(--nr-muted,var(--nb-muted,#66665c));opacity:.65;cursor:default}
.pen-inspection .ink-viewer-ratio {min-width:3.4em;text-align:center;font-size:.86em;font-variant-numeric:tabular-nums;line-height:1.4}
.pen-inspection :is(button,.ink-viewer-surface):focus-visible,.native-book-page .ink-enlarge:focus-visible {outline:2px solid var(--inspection-accent,var(--bw-book-ink-blue));outline-offset:-3px}
.pen-inspection-surface {position:relative;overflow:auto;min-block-size:0;min-inline-size:0;overscroll-behavior:contain;scroll-behavior:auto;overflow-anchor:none;touch-action:pan-x pan-y pinch-zoom;direction:ltr}
.pen-inspection-surface[data-can-pan] {cursor:grab}
.pen-inspection-surface[data-dragging] {cursor:grabbing}
.pen-inspection-canvas {box-sizing:border-box;overflow:hidden;position:relative;min-width:100%;min-height:100%}
.pen-inspection-print {position:absolute;top:0;left:0;transform-origin:0 0;display:flow-root;user-select:none;-webkit-user-select:none}
.pen-inspection-print > :is(figure,img) {float:none!important;display:block}
.pen-inspection-print * {cursor:inherit!important}
.native-person[data-inspectable] {position:relative}
.native-person .ink-inspect-photo {position:absolute;inset:auto 0 0 auto;display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;color:#233e85;cursor:zoom-in}
.native-person .ink-inspect-photo::before {content:none}
.native-person .ink-inspect-photo span {display:grid;place-items:center;width:1.7rem;height:1.7rem;border:1px solid #a6a69a;border-radius:50%;background:#f6f1e5;font:500 1.1rem/1 system-ui,sans-serif;text-decoration:none}
@media(max-width:44rem),(max-height:32rem) {
  :is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection {inline-size:100%;block-size:100vh;block-size:100dvh;border:0;border-radius:0}
  .pen-inspection-bar {padding-inline:.8rem .4rem;padding-block:env(safe-area-inset-top) 0}
}
@media(forced-colors:active) {
  :is(.bw-reading .nr-chapter,.native-book-page) dialog.pen-inspection {background:Canvas;color:CanvasText;--inspection-accent:LinkText}
}

/* One quiet line doubles as the chapter locator and the table of contents. */
main.bw-reading .nr-bar[data-running-bar] {
  position:sticky;
  inset-block-start:var(--reader-masthead);
  z-index:24;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:0 .65rem;
  align-items:center;
  margin-inline:0;
  padding:0;
  transform:none;
  transition:none;
}
.nr-bar[data-running-bar] .run-book, .nr-bar[data-running-bar] .run-menu-head a {
  color:var(--nr-accent);
  font-weight:500;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:.17em;
}
main.bw-reading .nr-bar[data-running-bar] .run-book {
  grid-column:1;
  grid-row:1;
  min-width:0;
  max-width:100%;
  font-size:.95em;
  line-height:1.26;
  padding-block:.42em;
}
main.bw-reading .nr-bar[data-running-bar] .nr-contents > summary {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  justify-self:stretch;
  grid-area:1 / 2;
  gap:.65em;
  min-block-size:44px;
  padding:.41em 0;
  margin:0;
  border:0;
  list-style:none;
  color:var(--nr-accent);
  font-size:.94em;
  font-weight:400;
  text-decoration:none;
  white-space:normal;
  line-height:1.28;
  cursor:pointer;
}
.nr-bar[data-running-bar] summary::marker {content:''}
.nr-bar[data-running-bar] summary::-webkit-details-marker {display:none}
.nr-bar[data-running-bar] .run-toc {text-decoration:underline;text-underline-offset:.17em;text-decoration-thickness:1px}
.nr-bar[data-running-bar] .run-arrow {
  display:block;
  flex:0 0 .48em;
  height:.48em;
  margin:0 .24em .22em 0;
  border-inline-end:1.5px solid currentColor;
  border-block-end:1.5px solid currentColor;
  transform:rotate(45deg);
}
.nr-bar[data-running-bar] details[open] .run-arrow {transform:rotate(225deg);margin-block:.22em 0}
.nr-bar[data-running-bar] .run-current,.nr-bar[data-running-bar] .run-count {display:none}
.nr-bar[data-running-bar] .run-sr,.nr-bar[data-running-bar][data-show-chapter] .run-toc {
  position:absolute;
  inline-size:1px;
  block-size:1px;
  padding:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
main.bw-reading .nr-bar[data-show-chapter] .run-book {display:none}
main.bw-reading .nr-bar[data-show-chapter] .nr-contents > summary {grid-area:1 / 1 / 2 / -1;justify-content:initial}
.nr-bar[data-show-chapter] .run-current {
  display:block;
  min-inline-size:0;
  flex:1;
  color:var(--ink,inherit);
  font-weight:550;
  overflow-wrap:normal;
  hyphens:none;
}
.nr-bar[data-show-chapter] .run-count {display:inline}
.nr-bar[data-running-bar] :is(.run-count,.run-menu-count) {
  white-space:nowrap;
  color:var(--nr-muted);
  font-size:.88em;
  font-variant-numeric:tabular-nums;
}
.nr-bar[data-running-bar] .run-menu {
  inset-inline:0;
  inset-block-start:100%;
  background:var(--reader-paper);
  grid-column:1/-1;
  border-bottom:1px solid var(--nr-line);
  padding-block:0 .55rem;
  min-width:0;
}
.nr-bar[data-running-bar][data-enhanced] .run-menu {position:absolute}
.nr-bar[data-running-bar] .nr-contents:not([open]) > .run-menu {display:none}
.nr-bar[data-running-bar] .run-menu-head {
  display:flex;align-items:center;justify-content:space-between;
  gap:.2rem 1rem;flex-wrap:wrap;padding:.18rem .4rem .45rem;
}
.nr-bar[data-running-bar] .run-menu-head a {display:none;min-width:0;overflow-wrap:normal}
.nr-bar[data-running-bar][data-show-chapter] .run-menu-head a {display:inline}
.nr-bar[data-running-bar] .run-menu-count {margin-inline-start:auto}
.nr-bar[data-whole-index]:not([data-enhanced]) .run-menu-head {display:none}
main.bw-reading .nr-bar[data-running-bar] .nr-list {
  margin:0;
  max-height:min(49vh,26rem);
  max-height:min(49dvh,26rem);
  padding-block:0;
}
main.bw-reading .nr-bar[data-running-bar] .nr-list a {text-decoration:none}
main.bw-reading .nr-bar[data-running-bar] .nr-list a:is(:hover,:focus-visible,[aria-current=page]) {
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.17em;
}
main.bw-reading .nr-bar[data-running-bar]:not([data-enhanced]):has(details[open]) {position:relative;inset-block-start:0}
@media(max-width:600px) {.nr-bar[data-show-chapter] .run-count {display:none}}
@media print {main.bw-reading .nr-bar[data-running-bar] {display:none!important}}
/* Reserve two lines only when a long title needs them, so crossing a chapter never moves a paragraph. */
@container edition-reader (max-width:20em) {
  main.bw-reading .nr-bar[data-running-bar] .nr-contents > summary {min-block-size:max(44px,3.38em)}
}

.nr-bar[data-running-bar] .run-book-compact {display:none}
@container edition-reader (max-width:17.4em) {
  .nr-bar[data-running-bar] .run-book-full {display:none}
  .nr-bar[data-running-bar] .run-book-compact {display:inline}
}
