/* book-reader.css: the reading aids of assets/book-reader.js on the pages of the book online (read/). 17 Nov 2026.
   All rules are .brx-. Nothing here changes the chapter's own markup or the site's other styles. */
/* text size, chosen by the reader */
html.brx-size-1 main.bk-wrap { font-size: 112%; }
html.brx-size-2 main.bk-wrap { font-size: 125%; }
/* reading time and text size, under the title */
.brx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.2rem; margin: 0.9rem 0 1.3rem; padding: 0.45rem 0; border-top: 1px solid rgba(190, 150, 70, 0.45); border-bottom: 1px solid rgba(190, 150, 70, 0.45); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.86rem; line-height: 1.3; color: #5f5340; }
html.brx-size-1 .brx-bar, html.brx-size-2 .brx-bar { font-size: 0.8rem; }
.brx-time { letter-spacing: 0.01em; }
.brx-sizer { display: inline-flex; align-items: baseline; gap: 0.3rem; margin-left: auto; }
.brx-bar button.brx-a { appearance: none; -webkit-appearance: none; min-width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid rgba(138, 100, 32, 0.55); border-radius: 4px; background: #fffaf0; color: #1c2a3f; font-family: "Source Serif 4", Georgia, serif; font-weight: 600; line-height: 1; cursor: pointer; }
.brx-bar button.brx-a-small { font-size: 0.82rem; }
.brx-bar button.brx-a-large { font-size: 1.22rem; }
.brx-bar button.brx-a:hover:not(:disabled) { background: #f6e9c8; }
.brx-bar button.brx-a:disabled { opacity: 0.4; cursor: default; }
.brx-bar button.brx-a:focus-visible, .brx-bar button.brx-notes-btn:focus-visible, .brx-panel button:focus-visible, .brx-panel a:focus-visible, .brx-note button:focus-visible, .brx-resume button:focus-visible, .brx-note a:focus-visible { outline: 2px solid #8a6420; outline-offset: 2px; }
/* how far down the chapter */
.brx-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 1200; background: transparent; pointer-events: none; }
.brx-progress > i { display: block; height: 100%; width: 0; background: #d8b366; }
/* the notes. Under 1120px: the chosen note in a sheet at the bottom edge */
sup.en a[aria-expanded="true"] { background: #f6e9c8; border-radius: 3px; box-shadow: 0 0 0 2px #f6e9c8; }
.brx-note { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; box-sizing: border-box; width: auto; max-width: 48rem; margin: 0 auto; max-height: min(62vh, 30rem); display: flex; flex-direction: column; background: #fffdf7; color: #1f1a14; border: 1px solid rgba(138, 100, 32, 0.6); border-bottom: 0; border-top: 3px solid #d8b366; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom, 0); box-shadow: 0 -10px 30px rgba(20, 31, 48, 0.3); font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif; font-size: 0.93rem; line-height: 1.5; text-align: left; }
.brx-note:focus { outline: none; }
.brx-note-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.9rem 0.4rem; border-bottom: 1px solid rgba(190, 150, 70, 0.4); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.brx-note-head b { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8a6420; }
.brx-note button.brx-x { appearance: none; -webkit-appearance: none; border: 1px solid rgba(138, 100, 32, 0.5); border-radius: 4px; background: transparent; color: #1c2a3f; font: inherit; font-size: 0.8rem; padding: 0.2rem 0.6rem; cursor: pointer; }
.brx-note button.brx-x:hover { background: #f6e9c8; }
.brx-note-body { padding: 0.7rem 0.9rem; overflow: auto; overflow-wrap: anywhere; }
.brx-note-body a { color: #7a5514; }
.brx-note-one + .brx-note-one { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px dotted rgba(190, 150, 70, 0.6); }
.brx-note-n { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.8rem; color: #8a6420; }
html.theme-dark .brx-note-n { color: #e8cd8a; }
.brx-note-foot { padding: 0.45rem 0.9rem 0.6rem; border-top: 1px solid rgba(190, 150, 70, 0.4); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.8rem; }
.brx-note-foot a { color: #1c2a3f; }
@media (max-width: 49rem) { .brx-note { border-left: 0; border-right: 0; } }
/* NOTEPANEL40_a (A1): while the note sheet is open the round light/dark button would lie over its corner; it comes back when the sheet closes */
html:not(#_):not(#__) body:has(> .brx-note) .theme-toggle-fab { visibility: hidden; }
/* 1120px and wider: all the notes in a panel docked at the right; the page makes room for it (NOTEPANEL40) */
.brx-bar button.brx-notes-btn, .brx-panel { display: none; }
@media (min-width: 1120px) {
  html { --brx-pw: clamp(21rem, 30vw, 27rem); }
  .brx-bar button.brx-notes-btn { display: inline-block; appearance: none; -webkit-appearance: none; margin-left: auto; height: 2.1rem; padding: 0 0.8rem; border: 1px solid #9c7526; border-radius: 4px; background: #fffaf0; color: #1c2a3f; font: inherit; font-weight: 600; cursor: pointer; }
  .brx-bar button.brx-notes-btn + .brx-sizer { margin-left: 0; }
  .brx-bar button.brx-notes-btn:hover { background: #f6e9c8; }
  .brx-bar button.brx-notes-btn[aria-expanded="true"] { background: #f6e9c8; border-color: #7a5514; }
  html.brx-panel-on body { padding-right: var(--brx-pw); }
  html.brx-panel-on body > nav.site-nav-shared { margin-right: calc(-1 * var(--brx-pw)); }
  html.brx-panel-on .theme-toggle-fab { right: calc(var(--brx-pw) + 14px); }
  html.brx-panel-on .brx-panel { display: flex; flex-direction: column; position: fixed; top: var(--stx-navh, 53px); right: 0; bottom: 0; z-index: 1000; box-sizing: border-box; width: var(--brx-pw); background: #fffdf7; color: #1f1a14; border-left: 1px solid rgba(138, 100, 32, 0.6); box-shadow: -8px 0 24px rgba(20, 31, 48, 0.12); font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif; font-size: 0.9rem; line-height: 1.5; text-align: left; }
}
.brx-panel-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.9rem 0.55rem 1rem; border-bottom: 1px solid rgba(190, 150, 70, 0.5); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.brx-panel-head b { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: #7a5514; }
.brx-panel-count { font-size: 0.82rem; color: #5f5340; }
.brx-panel button.brx-x { appearance: none; -webkit-appearance: none; margin-left: auto; border: 1px solid #9c7526; border-radius: 4px; background: transparent; color: #1c2a3f; font: inherit; font-size: 0.82rem; padding: 0.25rem 0.7rem; cursor: pointer; }
.brx-panel button.brx-x:hover { background: #f6e9c8; }
.brx-panel-list { position: relative; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0.3rem 0 40vh; list-style: none; overflow-y: auto; overscroll-behavior: contain; overflow-wrap: anywhere; }
.brx-panel-list:focus { outline: none; }
.brx-pn { display: flex; align-items: baseline; gap: 0.55rem; margin: 0; padding: 0.5rem 0.9rem 0.5rem 0.7rem; border-left: 3px solid transparent; }
.brx-pn + .brx-pn { border-top: 1px dotted rgba(190, 150, 70, 0.55); }
.brx-pn:focus { outline: none; }
.brx-pn:focus-visible { outline: 2px solid #7a5514; outline-offset: -2px; }
.brx-pn-n { flex: 0 0 auto; box-sizing: border-box; min-width: 2.1rem; padding: 0.1rem 0.25rem; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #7a5514; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.82rem; font-weight: 600; line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; }
button.brx-pn-n { appearance: none; -webkit-appearance: none; cursor: pointer; border-color: #9c7526; }
button.brx-pn-n:hover { background: #f6e9c8; }
.brx-pn-body { flex: 1 1 auto; min-width: 0; }
.brx-pn-body a { color: #7a5514; }
.brx-pn.brx-near { border-left-color: #a67f30; }
.brx-pn.brx-chosen { border-left-color: #7a5514; background: #f6e9c8; }
/* the place where the reader stopped */
.brx-resume { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1050; box-sizing: border-box; width: max-content; max-width: calc(100vw - 24px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 0.8rem; padding: 0.65rem 0.9rem; background: #141f30; color: #f3ead6; border: 1px solid rgba(216, 179, 102, 0.6); border-radius: 8px; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35); font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.88rem; line-height: 1.35; }
.brx-resume button { appearance: none; -webkit-appearance: none; font: inherit; border-radius: 5px; padding: 0.4rem 0.8rem; cursor: pointer; }
.brx-resume button.brx-go { background: #d8b366; color: #141f30; border: 1px solid #d8b366; font-weight: 700; }
.brx-resume button.brx-no { background: transparent; color: #f3ead6; border: 1px solid rgba(243, 234, 214, 0.5); }
.brx-here { background: #f8ecc8; box-shadow: 0 0 0 6px #f8ecc8; transition: background 0.6s, box-shadow 0.6s; }
/* the contents page: the chapter last read */
p.brx-last { margin: 0.9rem 0 1.2rem; padding: 0.6rem 0.9rem; background: #fffaf0; border: 1px solid rgba(190, 150, 70, 0.6); border-left: 3px solid #d8b366; border-radius: 4px; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 0.95rem; }
/* dark theme */
html.theme-dark .brx-bar { color: #c8b896; border-color: rgba(216, 179, 102, 0.3); }
html.theme-dark .brx-bar button.brx-a { background: #1c2536; color: #f3ead6; border-color: rgba(216, 179, 102, 0.5); }
html.theme-dark .brx-bar button.brx-a:hover:not(:disabled) { background: #263247; }
html.theme-dark sup.en a[aria-expanded="true"] { background: rgba(216, 179, 102, 0.3); box-shadow: 0 0 0 2px rgba(216, 179, 102, 0.3); }
html.theme-dark .brx-note { background: #1a2233; color: #ece3cf; border-color: rgba(216, 179, 102, 0.5); border-top-color: #d8b366; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
html.theme-dark .brx-note-head b { color: #e8cd8a; }
html.theme-dark .brx-note button.brx-x { color: #ece3cf; border-color: rgba(216, 179, 102, 0.5); }
html.theme-dark .brx-note button.brx-x:hover { background: #263247; }
html.theme-dark .brx-note-body a { color: #e8cd8a; }
html.theme-dark .brx-note-foot a { color: #ece3cf; }
html.theme-dark .brx-bar button.brx-notes-btn { background: #1c2536; color: #f3ead6; border-color: #a38a52; }
html.theme-dark .brx-bar button.brx-notes-btn:hover, html.theme-dark .brx-bar button.brx-notes-btn[aria-expanded="true"] { background: #263247; }
html.theme-dark.brx-panel-on .brx-panel { background: #1a2233; color: #ece3cf; border-left-color: rgba(216, 179, 102, 0.5); box-shadow: -8px 0 24px rgba(0, 0, 0, 0.5); }
html.theme-dark .brx-panel-head b, html.theme-dark .brx-pn-n, html.theme-dark .brx-pn-body a { color: #e8cd8a; }
html.theme-dark .brx-panel-count { color: #c8b896; }
html.theme-dark .brx-panel button.brx-x { color: #ece3cf; border-color: #a38a52; }
html.theme-dark .brx-panel button.brx-x:hover, html.theme-dark button.brx-pn-n:hover { background: #263247; }
html.theme-dark button.brx-pn-n { border-color: #a38a52; }
html.theme-dark .brx-pn.brx-near { border-left-color: #a38a52; }
html.theme-dark .brx-pn.brx-chosen { border-left-color: #d8b366; background: #2a3550; }
html.theme-dark .brx-bar button.brx-notes-btn:focus-visible, html.theme-dark .brx-panel button:focus-visible, html.theme-dark .brx-panel a:focus-visible, html.theme-dark .brx-pn:focus-visible { outline-color: #e8cd8a; }
html.theme-dark .brx-here { background: rgba(216, 179, 102, 0.22); box-shadow: 0 0 0 6px rgba(216, 179, 102, 0.22); }
html.theme-dark p.brx-last { background: #1a2233; border-color: rgba(216, 179, 102, 0.45); border-left-color: #d8b366; }
@media (prefers-reduced-motion: reduce) { .brx-here { transition: none; } }
@media print { .brx-bar, .brx-progress, .brx-note, .brx-panel, .brx-resume, p.brx-last { display: none !important; } html.brx-panel-on body { padding-right: 0 !important; } html.brx-size-1 main.bk-wrap, html.brx-size-2 main.bk-wrap { font-size: inherit; } }
