/* One stylesheet, two modes. The root carries data-mode (light|dark); no
   data-mode = follow the system. A mode only ever changes colors. */

/* ---- the faces: IBM Plex, self-hosted (static/fonts, OFL) --------- */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexSans-Regular.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexSans-Medium.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/IBMPlexSans-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/IBMPlexMono-Regular.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/IBMPlexMono-Medium.woff2) format("woff2"); }

/* ---- colors: light (the default), dark by choice or by the system ------- */
/* each color once, light then dark; color-scheme picks which: the system's
   until a mode is chosen (toggles.js sets data-mode). Script that needs a
   plain color (the graph's canvas) reads it through cssColor in toggles.js */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f7f6f2, #151517); --fg: light-dark(#1c1c1f, #dedcd6);
  --muted: light-dark(#5f5e59, #9c9a93); --rule: light-dark(#dcdad3, #2a2a2e);
  --link: light-dark(#8a5a00, #e3a857); --link-hover: light-dark(#5c3c00, #f2c98a); --accent: light-dark(#8a5a00, #e3a857);
  --code-bg: light-dark(#efede7, #1c1c1f); --ok: light-dark(#2f7d4f, #86c99a); --bad: light-dark(#b3261e, #e8857b);
  --todo: light-dark(#2b5fa8, #8fb3e8); --conjecture: light-dark(#8a7400, #e8d36a);
  --frame: light-dark(#dcdad3, #2a2a2e);
  --g-edge: light-dark(#dcdad3, #3a3a3f); --g-backdrop: light-dark(rgba(28, 28, 31, 0.25), rgba(10, 10, 10, 0.4));
  --veil: light-dark(rgba(28, 28, 31, 0.5), rgba(10, 10, 10, 0.68));   /* the front door's veil over the graph, heavier than the overlay's backdrop */
}
:root[data-mode="light"] { color-scheme: light; }
:root[data-mode="dark"] { color-scheme: dark; }

/* ---- the shared frame ---------------------------------------------------- */
html { background: var(--bg); color: var(--fg); }
body { margin: 0; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 17px; line-height: 1.5; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
.page { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
/* with room for all three columns, each scrolls on its own and the page does not */
@media (min-width: 1160px) {
  html, body { height: 100%; overflow: hidden; }
  .page { height: 100vh; flex-wrap: nowrap; }
  .tree, .note, .side { height: 100vh; overflow-y: auto; scrollbar-width: thin; }
  /* a slim thumb in the muted tone on no track */
  .tree, .note, .side {
    scrollbar-color: color-mix(in srgb, var(--muted) 35%, transparent) transparent;
  }
}
.tree { flex: 0 1 280px; min-width: 0; box-sizing: border-box; padding: 24px 20px; border-right: 1px solid var(--frame); }
.note { flex: 999 1 560px; min-width: 0; box-sizing: border-box; padding: 40px 48px 72px; }
.note > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.side { flex: 0 1 320px; min-width: 0; box-sizing: border-box; border-left: 1px solid var(--frame); display: flex; flex-direction: column; }
.side .graph { display: block; position: relative; width: 100%; height: 240px; margin: 0; border-bottom: 1px solid var(--frame); }
.side .graph:empty { display: none; }
/* a glyph button: the light/dark toggle, the panels' folds, the whole-vault
   graph (and the preview's flask, dev.ts) */
.glyph { display: flex; padding: 4px; color: var(--muted); background: var(--bg); border: 1px solid var(--rule); border-radius: 4px; cursor: pointer; }
.glyph:hover, .glyph[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.glyph:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* light/dark: fixed in the bottom-right corner */
.mode-toggle { position: fixed; right: 16px; bottom: 16px; z-index: 40; padding: 7px; }
/* the button on the pane that opens the whole vault, and the overlay it opens */
.graph .all { position: absolute; left: 8px; top: 8px; z-index: 1; }
/* the overlay is a box over the dimmed page, as Obsidian's is: 90% of the
   window, a click outside it closes it */
.graph-overlay { position: fixed; inset: 0; z-index: 50; background: var(--g-backdrop); }
.graph-overlay .canvas { position: absolute; inset: 5%; overflow: hidden; background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; }
.graph-overlay .meta { position: absolute; left: calc(5% + 10px); top: calc(5% + 10px); z-index: 1; padding: 2px 6px; background: var(--bg); font-size: 13px; color: var(--muted); pointer-events: none; }
.graph-overlay .close { position: absolute; right: calc(5% + 12px); top: calc(5% + 10px); font: inherit; font-size: 12.5px; line-height: 1; padding: 5px 9px; color: var(--muted); background: var(--bg); border: 1px solid var(--rule); cursor: pointer; }
.graph-overlay .close:hover { color: var(--accent); border-color: var(--accent); }
/* the front door (/sda/): the whole vault over the window, behind a veil
   with one way in. The veil takes the mouse, so the graph is a picture
   here, not a control; it sits under the light/dark toggle */
body.landing { margin: 0; overflow: hidden; }
.landing .graph.whole { position: fixed; inset: 0; transition: opacity 0.8s ease; }   /* graph.js keeps it invisible until its first settled frame */
.landing .veil { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: var(--veil); }
/* the hero: one card in the middle holding the way in and the count, on the page's own background so it stands clear of the graph */
.landing .hero { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 56px; background: var(--bg); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.landing .count { margin: 0; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.landing .count:empty { display: none; }
.landing .enter { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; padding: 12px 34px; color: var(--fg); background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; text-decoration: none; }
.landing .enter:hover, .landing .enter:focus-visible { color: var(--accent); border-color: var(--accent); outline: none; }
.side .links { padding: 24px 24px 40px; }
@media (max-width: 760px) {
  .note { padding: 32px 20px 48px; }
}
/* the side panels fold, the file tree on the left and the graph and links
   on the right, alike (toggles.js). Wide, folding is your choice: the panel
   hides but keeps its column, so the note never moves; below the width
   where three columns fit both are always folded, and each opens as a
   drawer over the page from its own edge */
:root[data-tree="folded"] .tree { visibility: hidden; border-right-color: transparent; }
:root[data-side="folded"] .side { visibility: hidden; border-left-color: transparent; }
/* the fold glyphs are borderless until hovered, the same whether they fold
   or unfold, so the button looks the same in its spot either way */
.tree-fold, .side-fold, .side-unfold { flex: none; border-color: transparent; }
/* the tree's glyph row (its fold, and the Bible on the preview) is pinned in
   the top-left corner, out of the tree, so it stands in the same spot
   whether the tree is open, folded or a drawer: one button folds and
   unfolds it, and never moves under the mouse */
.site { position: fixed; left: 12px; top: 12px; z-index: 46; margin: 0; display: flex; align-items: center; gap: 6px; }
.tree { padding-top: 56px; }   /* the list starts under the pinned row */
.side-fold { position: fixed; right: 12px; top: 12px; z-index: 46; }   /* exactly where the unfold glyph stands, so clicking it again and again never moves it; the whole-vault glyph takes the graph's left */
.side-unfold { position: fixed; right: 12px; top: 12px; z-index: 40; }
/* vim keys for the editor (app.js): a writer's glyph beside the side panel's fold, lit when on */
.vim-toggle { position: fixed; right: 50px; top: 12px; z-index: 46; padding: 5px; }
.page.bible-view ~ .vim-toggle, body:has(.page.bible-view) .vim-toggle { display: none; }
:root:not([data-side="folded"]) .side-unfold { display: none; }
.page.bible-view ~ .side-unfold { display: none !important; }   /* the Bible view has no side panel */
@media (max-width: 1159px) {
  .tree, .side { display: none; }
  :root:not([data-drawer="side"]) .side-unfold { display: flex; }
  :root[data-drawer="tree"] .tree { display: block; position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; width: min(300px, 85vw); overflow-y: auto; background: var(--bg); border-right: 1px solid var(--frame); box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  :root[data-drawer="side"] .side { display: flex; visibility: visible; position: fixed; right: 0; top: 0; bottom: 0; height: auto; z-index: 45; width: min(320px, 85vw); overflow-y: auto; background: var(--bg); border-left: 1px solid var(--frame); box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  :root[data-drawer="side"] .side-unfold { display: none; }
  :root[data-drawer="tree"] .tree { visibility: visible; }
  .note { padding-top: 56px; }   /* room for the glyphs above the title */
}

/* ---- sidebar -------------------------------- */
/* the Bible glyph: only where a Bible view exists (the local preview sets data-bible) */
.site .bible { display: none; padding: 5px; color: var(--muted); }
:root[data-bible] .site .bible { display: inline-flex; }
.site .bible:hover, .site .bible[aria-current] { color: var(--accent); }
/* the pencil (app.js adds it once the editing service knows the visitor); not over the Bible */

/* ---- the editor (edit.js: the note's org text, shared live) -------------- */
/* the note's own face and measure, so the text reads as it will; no box of
   its own but a hairline under the title's rule, which it already has */
.note .editor { max-width: 680px; margin: 0 auto; }
.note .editor .cm-editor { background: transparent; color: var(--fg); font-size: 17px; line-height: 1.5; }
.note .editor .cm-editor.cm-focused { outline: none; }
.note .editor .cm-scroller { font-family: "IBM Plex Sans", system-ui, sans-serif; line-height: inherit; overflow: visible; }
.note .editor .cm-content { padding: 0; caret-color: var(--accent); }
.note .editor .cm-line { padding: 0; }
.note .editor .cm-cursor, .note .editor .cm-dropCursor { border-left-color: var(--accent); border-left-width: 2px; }
.note .editor .cm-selectionBackground, .note .editor .cm-focused .cm-selectionBackground { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.note .editor.read-only .cm-content { caret-color: var(--muted); }
/* org, lightly colored: headings and labels bold, keywords and sources muted, links and tags as on the page */
.note .editor .org-heading { font-weight: 600; }
.note .editor .org-meta, .note .editor .org-source { color: var(--muted); }
.note .editor .org-bullet { color: var(--accent); }
.note .editor .org-label { font-weight: 500; color: var(--accent); }
.note .editor .org-link { color: var(--link); }
.note .editor .org-tag { color: var(--muted); }
.note .editor .org-tagGood { color: var(--ok); }
.note .editor .org-tagBad { color: var(--bad); }
.note .editor .org-tagTodo { color: var(--todo); }
.note .editor .org-tagGuess { color: var(--conjecture); }
.note .editor .org-tagGrey { color: var(--muted); }
/* the page look (client.ts): lines the cursor is not on wear the page's
   faces, the note's h2/h3, lists, quotes and the rest above, in padding
   rather than margins so the editor measures them right */
.note .editor .org-h2 { padding: 28px 0 10px; font-size: 20px; line-height: 26px; font-weight: 600; }
.note .editor .org-h3, .note .editor .org-h4 { padding: 20px 0 6px; font-size: 17px; line-height: 22px; font-weight: 600; }
.note .editor .org-blank { line-height: 14px; }
.note .editor .org-dot, .note .editor .org-num, .note .editor .org-box { display: inline-block; width: 20px; text-indent: 0; }
.note .editor .org-dot { font-size: .8em; }
.note .editor .org-num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .72em; font-weight: 600; }
.note .editor .org-box { font-size: 15px; }
.note .editor .org-quote { padding-left: 14px; border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.note .editor .org-cite { font-size: 14px; line-height: 20px; color: var(--muted); text-align: right; }
.note .editor .org-code { padding: 0 8px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; color: var(--muted); background: var(--code-bg); }
.note .editor .org-front { padding: 0 0 8px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); cursor: pointer; }
.note .editor .org-front:hover { color: var(--accent); }
.note .editor .org-front-line { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.note .editor .org-a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.note .editor a.org-a:hover { color: var(--link-hover); }
.note .editor .org-a-dead { text-decoration-style: dotted; }
.note .editor .org-b { font-weight: 600; }
.note .editor .org-i { font-style: italic; }
.note .editor .org-u { text-decoration: underline; }
.note .editor .org-s { text-decoration: line-through; }
.note .editor .org-c { padding: 0 3px; border-radius: 3px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .9em; background: var(--code-bg); }
/* the others' cursors: a bar in the owner's color with their name on a flag above it, always shown */
.note .editor .cm-ySelection { }
.note .editor .cm-ySelectionCaret { position: relative; border-left: 2px solid; border-right: none; margin-left: -1px; }
.note .editor .cm-ySelectionInfo { position: absolute; top: -1.35em; left: -2px; padding: 1px 5px; border-radius: 3px 3px 3px 0; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; line-height: 1.3; color: #fff; white-space: nowrap; opacity: 1 !important; transition: none; user-select: none; z-index: 5; }
/* the / menu and its entries: the site's card look */
.cm-tooltip.cm-tooltip-autocomplete { background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; }
.cm-tooltip.cm-tooltip-autocomplete > ul > li { padding: 3px 8px; color: var(--fg); }
.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--fg); }
.cm-tooltip.cm-tooltip-autocomplete .cm-completionLabel { color: var(--accent); }
.cm-tooltip.cm-tooltip-autocomplete .cm-completionDetail { margin-left: 10px; font-style: normal; color: var(--muted); }
.cm-tooltip.cm-tooltip-autocomplete .cm-completionMatchedText { text-decoration: none; font-weight: 600; }
.note .editor .cm-snippetField { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 2px; }
/* the verse strip under the editor, and the status line */
.note .editor .cm-panels { background: transparent; border: 0; }
.note .editor .verse-ask { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.note .editor .verse-ask input { margin-left: 8px; width: 16em; font: inherit; color: var(--fg); background: var(--code-bg); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 6px; }
.note .editor .verse-ask input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.note .edit-status { display: flex; justify-content: space-between; gap: 16px; margin: 20px auto 0; padding-top: 8px; border-top: 1px solid var(--rule); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; line-height: 18px; color: var(--muted); }
.note .edit-status.bad .word { color: var(--bad); }
.tree ul { margin: 0; padding-left: 0; list-style: none; }
.tree .vault { margin: 12px 0 4px; font-size: 13px; color: var(--muted); }
.tree { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.tree a { display: block; padding: 4px 0; font-size: 15px; line-height: 22px; color: var(--muted); text-decoration: none; }
/* hovering a note previews the current-note look; the page you land on then carries it */
.tree a:hover, .tree a[aria-current="page"] { font-weight: 600; color: var(--accent); }
/* where you stand on a concept: ✓ concur, ✗ dissent, – neutral, before its title;
   empty but the same width on the rest, so the titles line up */
.tree li a { display: flex; }   /* a long title wraps in its own column, clear of the mark */
.tree .stance { flex: none; width: 1.1em; margin-right: 4px; text-align: center; font-weight: 700; }
.tree .stance.concur { color: var(--ok); }
.tree .stance.dissent { color: var(--bad); }
.tree .stance.neutral { color: var(--muted); }

/* ---- note and side pane ------------------------------ */
.note h1 { margin: 0 auto 8px; font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.note .meta { margin: 0 auto 24px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; line-height: 20px; color: var(--muted); }
.note .meta span + span::before { content: ""; margin-right: 20px; }   /* the parts set apart by space */
.note .meta .wip { color: var(--accent); }
.note hr.top { border: 0; border-top: 1px solid var(--rule); margin: 0 auto 20px; }
.note h2 { margin: 28px auto 10px; font-size: 20px; line-height: 26px; font-weight: 600; }
.note h3 { margin: 20px auto 6px; font-size: 17px; line-height: 22px; font-weight: 600; }
.note p { margin: 0 auto 14px; }
/* no bullets: every list counts, 1 2 3 at the top and i ii iii one level
   down. A checkbox list has no marker: the box is the marker. */
.note ul, .note ol { margin: 0 auto 14px; padding-left: 24px; }
.note ul { list-style: disc; }                  /* "-" items: unordered */
.note ol { list-style: decimal; }               /* "N." items: ordered */
.note li ul, .note li ol { margin: 2px auto 2px; border-left: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }   /* a sublist hangs from its parent on a rule */
.note li ul { list-style: circle; }
.note li ol { list-style: lower-roman; }
/* the answer to a quote sits under it in a tinted panel, no bullets: a
   bar would read as another quote */
.note :is(ul, ol).reply { list-style: none; margin-top: 6px; margin-bottom: 10px; padding: 8px 12px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.note .reply > li:last-child { margin-bottom: 0; }
.note li.quoted { list-style: none; }   /* an item that is a quote block: the bar marks it */
/* it sits in from the quote's left edge, so it reads as an answer, and
   ends at the quote's right edge. One after a quote block on its own is
   placed against the quote's box: 697px, the 680 column plus the quote's
   17px padding and bar, centered */
.note li > .reply { margin-left: 24px; margin-right: 0; }
.note > .reply { max-width: none; box-sizing: border-box;
  margin-left: max(24px, calc((100% - 697px) / 2 + 24px));
  margin-right: max(0px, calc((100% - 697px) / 2)); }
.note :is(ul, ol) > li::marker { color: var(--accent); }
.note ol > li::marker { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .72em; font-weight: 600; }   /* list numbers, 1. and i. alike: set off from the text */
.note ul:has(> li.task) { padding-left: 0; list-style: none; }
.note li { margin: 0 0 4px; }
/* a "Label :: text" line stays one line: bold label, colon, text */
.note dl { margin: 0 auto 14px; }
.note dt { display: inline; font-weight: bold; }
.note dt::after { content: ": "; }
.note dd { display: inline; margin: 0; }
.note dd::after { content: "\A"; white-space: pre; }
.note dd > p { display: inline; margin: 0; }
/* a label heading a group of points ("- Matthew ::" over its list): a small
   heading in the accent, its list set off by a rule down its left */
.note dt.group { display: block; margin: 12px 0 4px; font-size: 1.08em; color: var(--accent); letter-spacing: .01em; }
.note dt.group::after { content: none; }
.note dd.group { display: block; padding-left: 18px; border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.note dd.group::after { content: none; }
.note dd.group > :is(ul, ol) { margin-bottom: 6px; padding-left: 30px; }   /* room for "viii." clear of the rule */
/* a concept's Claim (or Definition) line leads it: set in larger type, in a callout */
.note dl.claim { font-size: 19px; line-height: 1.45; padding: 14px 18px; margin: 0 auto 28px; border-left: 3px solid var(--accent); background: var(--code-bg); }
.note dl.claim dt { color: var(--accent); }
.note dl.claim dd::after { content: none; }
/* where you stand on the claim: concur green, dissent red, neutral grey */
.note dl.stance { padding: 10px 16px; margin: 0 auto 18px; border-left: 3px solid var(--stance); background: var(--code-bg); }
.note dl.stance dt { color: var(--stance); }
.note dl.stance dd::after { content: none; }
.note dl.stance.concur { --stance: var(--ok); }
.note dl.stance.dissent { --stance: var(--bad); }
.note dl.stance.neutral { --stance: var(--muted); }
.note table { border-collapse: collapse; width: 100%; margin: 0 auto 18px; }   /* full column, not a centered shrink-wrap */
.note th, .note td { border-bottom: 1px solid var(--rule); padding: 4px 10px; text-align: left; vertical-align: top; }
.note th { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; color: var(--muted); }
.note pre, .note code { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.92em; }
.note pre { background: var(--code-bg); padding: 12px 14px; overflow-x: auto; margin: 0 auto 14px; border: 1px solid var(--rule); border-radius: 4px; }
/* a quotation (#+begin_quote): set off by a bar on the left, like a backlink's snippet */
.note blockquote { margin: 0 auto 14px; padding: 2px 0 2px 14px; border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.note blockquote > p:last-child { margin-bottom: 0; }
.note blockquote > p.cite { margin-top: -6px; font-size: 14px; color: var(--muted); text-align: right; }
/* checkbox items sit tight and a step smaller */
.note li.task { margin: 0; font-size: 15px; line-height: 1.4; }
.note .tag { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; color: var(--accent); cursor: help; position: relative; }
/* an abbreviation ("ABC"): spelled out by the same tooltip as a tag */
.note abbr.abbr { text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; cursor: help; position: relative; }
/* a Bible reference: plain text, a link where the Bible view exists */
:root[data-bible] .note .verse { color: var(--accent); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
:root[data-bible] .note .verse:hover { text-decoration-style: solid; }
/* the verse card a hovered reference shows (preview only, see app.js) */
.verse-card { position: fixed; z-index: 45; box-sizing: border-box; max-width: min(420px, calc(100vw - 16px)); max-height: 50vh; overflow-y: auto; padding: 10px 14px; font-size: 15px; line-height: 1.5; color: var(--fg); background: var(--bg); border: 1px solid var(--rule); border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.verse-card[hidden] { display: none; }
.verse-card p { margin: 0 0 6px; }
.verse-card b { font-size: 12px; color: var(--muted); }
.verse-card .cite { margin: 2px 0 0; font-size: 13px; color: var(--muted); text-align: right; }
/* the line from the reference to its card, and the reference while its card is open */
.verse-card-line { color: var(--accent); }
:root[data-bible] .note .verse.verse-card-on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; text-decoration-style: solid; }
/* the Bible view takes the note and side columns */
.page.bible-view .side { display: none; }
.page.bible-view .note { padding: 0; display: flex; flex-direction: column; flex-basis: 0; }
.page.bible-view .note > * { max-width: none; margin: 0; }
.note .bible-frame { flex: 1; width: 100%; min-height: 80vh; border: 0; background: var(--bg); }
/* a judged sentence: green or red, its tags included */
.note .verdict.true { color: var(--ok); }
.note .verdict.false { color: var(--bad); }
.note .verdict.todo { color: var(--todo); }   /* [todo]: still to look into */
.note .verdict.conjecture { color: var(--conjecture); }   /* [conjecture]: a guess */
.note .verdict.contested { color: var(--muted); }   /* [contested]: scholars disagree */
.note .verdict > .tag { color: inherit; }
/* the tag's meaning, drawn on hover or focus from data-tip: instant, unlike a title */
.note :is(.tag, abbr.abbr):focus { outline: none; }
.note :is(.tag, abbr.abbr):focus-visible { outline: 1px dotted var(--accent); outline-offset: 2px; }
.note :is(.tag, abbr.abbr):hover::after, .note :is(.tag, abbr.abbr):focus::after {
  content: attr(data-tip); position: absolute; left: 0; top: 100%; margin-top: 4px; z-index: 1;
  width: max-content; max-width: 320px; padding: 6px 10px; box-sizing: border-box;
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 13px; line-height: 1.4; font-weight: normal; white-space: normal;
  color: var(--bg); background: var(--fg); border-radius: 4px;
}
/* a note: [cite][...] or [footnote][...], a small number with its text on
   hover or focus */
.note sup.ref { position: relative; font-size: .7em; line-height: 0; margin-left: 1px; }
.note sup.ref > .ref-num { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; color: var(--accent); text-decoration: none; cursor: help; }
.note sup.ref > a.ref-num { cursor: pointer; }
.note sup.ref > .ref-num:focus { outline: none; }
.note sup.ref > .ref-num:focus-visible { outline: 1px dotted var(--accent); outline-offset: 2px; }
.note sup.ref > .ref-body {
  display: none; position: absolute; left: 0; top: 100%; z-index: 2; margin-top: 2px;
  width: max-content; max-width: min(360px, 80vw); padding: 8px 12px; box-sizing: border-box;
  font: normal 14px/1.45 "IBM Plex Sans", system-ui, sans-serif; text-align: left; white-space: normal; overflow-wrap: anywhere;
  color: var(--bg); background: var(--fg); border-radius: 8px;
  border-block: 4px solid transparent; background-clip: padding-box;   /* a gap from the number the mouse can still cross */
}
.note sup.ref:is(:hover, :focus-within) > .ref-body:not(:empty) { display: block; }
/* an unseen strip as wide as the box, over the line the number sits on, so
   the box stays open while the mouse drifts along that line toward it;
   app.js sets its height (--reach) and flips it below for a box opened above */
.note sup.ref > .ref-body::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--reach, 28px); }
.note sup.ref.ref-up > .ref-body::before { bottom: auto; top: 100%; }
/* near the bottom or right edge of the window, app.js opens a tag's box above
   it (tip-up) or right-aligned (tip-end) so it stays in view */
.note :is(.tag, abbr.abbr).tip-up:is(:hover, :focus)::after { top: auto; bottom: 100%; margin: 0 0 4px; }
.note :is(.tag, abbr.abbr).tip-end:is(:hover, :focus)::after { left: auto; right: 0; }   /* an empty one, still being written, shows nothing */
.note sup.ref > .ref-body a { color: inherit; text-decoration: underline; }
.side .links { font-size: 15px; line-height: 1.5; }
.side h2 { margin: 0 0 8px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; line-height: 22px; color: var(--muted); }
.side ul { margin: 0 0 24px; padding-left: 0; list-style: none; }
.side li { margin: 0 0 8px; }
.side .links a { color: var(--fg); text-decoration: none; }
.side .links a:hover { font-weight: 600; color: var(--accent); }
/* a backlink's snippet is a quotation from the linking note: set off under its title */
.side .snippet { display: block; margin: 3px 0 10px; padding: 2px 0 2px 10px; border-left: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.side .empty { color: var(--muted); font-style: italic; margin: 0 0 24px; }
