/* The Testimony - theme D3: GitHub markdown typeface, colours and structure,
   on our current narrower column, no header roundel. Screen only; print is untouched.
   Load after style.css (and after the inline <style> of the printable sheets). */
@media screen {
:root { --paper: #ffffff; --inset: #f6f8fa; --inset2: #f6f8fa; --ink: #1f2328; --ink2: #31363c; --muted: #59636e;
        --rule: #d0d7de; --rule2: #d8dee4; --blue: #0969da; --visited: #0969da; --red: #cf222e;
        --green: #1a7f37; --hl: #ddf4ff; --hl-line: #0969da; --strong: #818b98; --frame: #d0d7de; }

body { background: var(--paper); color: var(--ink);
       font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
       font-size: 16px; line-height: 1.5; }
::selection { background: #b6e3ff; color: var(--ink); }

/* keep the existing 640px column; do not widen to a readme measure */
#outer, body.front #outer { width: 640px; max-width: 100%; }

/* header without the roundel: title, tagline and nav, centered */
.site-brand { display: block; text-align: center; }
.site-brand-text { text-align: center; }
#header h1 { text-align: center; font-weight: 600; letter-spacing: -.02em; }
.tagline { text-align: center; }

/* Heading sizes: system sans at the old Georgia px values reads much larger,
   especially at weight 600. Bring them back to about the D2 visual size, slightly smaller. */
#header h1 { font-size: 28px; }
h2.page-title, .fullpost h2 { font-size: 22px; font-weight: 600; }
.fullpost h3 { font-size: 17px; font-weight: 600; }
h3.post-title { font-size: 21px; font-weight: 600; }
.principal-case h3.post-title { font-size: 22px; font-weight: 600; }
.featured-post h3.post-title { font-size: 22px; font-weight: 600; }
.posttitle { font-size: 26px; font-weight: 600; }
.subtitle { font-size: 18px; }
h2.topic-heading { font-size: 15px; font-weight: 600; }
.sheet h1, .record h1, .sheet h2.h3t { font-size: 20pt; font-weight: 600; }
@media (max-width: 760px) {
  #header h1 { font-size: 24px; }
  .posttitle { font-size: 24px; }
  h3.post-title { font-size: 19px; }
  .featured-post h3.post-title,
  .principal-case h3.post-title { font-size: 20px; }
  h2.page-title, .fullpost h2 { font-size: 20px; }
}
@media (max-width: 820px) {
  .sheet h1, .record h1, .sheet h2.h3t { font-size: 26px; }
}

/* links */
a:link { color: var(--blue); }
a:visited { color: var(--visited); }
a:link, a:visited { text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover, a:focus { color: #0550ae; text-decoration-thickness: 2px; }
#header h1 a, #header h1 a:link, #header h1 a:visited { color: var(--ink); text-decoration: none; }
#header h1 a:hover { color: var(--blue); }
h3.post-title a:link, h3.post-title a:visited { color: var(--blue); }
h3.post-title a:hover { color: #0550ae; }
a:focus-visible { outline: 2px solid var(--hl-line); outline-offset: 2px; border-radius: 3px; }

/* highlight: Primer accent-subtle (blue), not yellow */
mark { background-color: var(--hl); color: var(--ink); box-shadow: inset 0 -2px 0 var(--hl-line); padding: 0 2px; border-radius: 2px;
        -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* headings: thin bottom border, semibold */
#header { border-bottom: 1px solid var(--rule); }
.tagline, h2.date-header, .date, .topnav, #footer, .smallcaps, h3.topic-sub, .principal-case .case-label { color: var(--muted); }

/* word-count / reading-time line in the old date slot, between header rule and titlepage rule */
body:has(.reading-meta) #header { margin-bottom: 8px; }
.reading-meta { margin: 0 0 8px 0; padding: 0; text-align: center; font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

#footer { border-top: 1px solid var(--rule); }
p.post-footer { color: var(--muted); border-top-color: var(--rule2); }
.fullpost h2, h2.page-title { font-weight: 600; letter-spacing: -.015em; padding-bottom: .3em; border-bottom: 1px solid var(--rule); }
h2.topic-heading { border-bottom: 1px solid var(--rule); color: var(--ink); }
.case, .lead, .caption, ul.topic-index .item-desc { color: var(--ink2); }
.credit, p.orn, .forthcoming, #sidebar .forthcoming, ul.topic-index .forthcoming + .item-desc, .forthcoming-label, #sidebar .forthcoming-label { color: var(--muted); }
#sidebar h2 { border-bottom-color: var(--rule); color: var(--ink2); }
#sidebar .topics h3 { color: var(--ink); }
#sidebar .topics ul { border-bottom-color: var(--rule2); }
@media (max-width: 760px) { #sidebar { border-top-color: var(--rule); } }

/* blockquotes: grey left bar */
blockquote { border-left: .25em solid var(--rule); color: var(--muted); padding: 0 1em; margin-left: 0; }

/* boxes: 1px #d0d7de, fill #f6f8fa, 6px corners */
.box { border: 1px solid var(--rule); background: var(--inset); border-radius: 6px; padding-left: 1em; padding-right: 1em; }
.box.judgment { border: 1px solid var(--rule); border-left: 3px solid var(--strong); background: var(--inset); border-radius: 6px; }
.principal-case { border: 1px solid var(--rule); border-left: 4px solid var(--blue); background: var(--inset); border-radius: 6px; }
.principal-case p.start-flag, .principal-case .start-arrow, ul.topic-index .start-flag, ul.topic-index .start-arrow { color: var(--red); }
.titlepage { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc { border: 1px solid var(--rule); background: var(--inset2); border-radius: 6px; }
.toc summary::before { color: var(--muted); }
.figure img { border: 1px solid var(--rule); background: #ffffff; border-radius: 6px; }
img[style*="max-width:760px"] { background: #ffffff !important; border: 1px solid var(--rule) !important; border-radius: 6px; }

/* tables: 1px #d0d7de, header fill, zebra rows */
table.ftbl { border-collapse: collapse; }
table.ftbl th, table.ftbl td { border: 1px solid var(--rule); padding: 6px 13px; }
table.ftbl th { background: var(--inset); font-weight: 600; }
table.ftbl tbody tr:nth-child(2n) { background: var(--inset); }
@media (max-width: 760px) { table.ftbl tr { background: var(--inset); border-color: var(--rule); } }

/* light code / label styling */
code, .rn, .vl, .gv, kbd { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }
code { background: var(--inset); padding: .15em .4em; border-radius: 6px; font-size: .85em; }

/* notes and sources */
sup.fnref a:link, sup.fnref a:visited { color: var(--blue); }
sup.fnref a:hover, sup.fnref a:focus, a.back:hover { background: var(--hl); color: var(--blue); }
.fullpost h2#notes, .fullpost h2:has(+ h3 + p.ref), .fullpost h2:has(+ p.ref) { color: var(--ink); border-bottom: 1px solid var(--rule); }
.fullpost h3[id^="notes-"], .fullpost h3:has(+ p.ref) { color: var(--muted); }
ol.notes li::marker { color: var(--muted); }
ol.notes li:target { background: var(--hl); box-shadow: inset 3px 0 0 var(--hl-line); }
/* backlinks: same hook-arrow as before, text presentation (not emoji), link blue */
a.back, a.back:link, a.back:visited {
  color: #0969da;
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif;
  text-decoration: none;
}
p.ref, p.ref em { color: var(--ink); }
.free-take { border-top: 1px solid var(--rule2); color: var(--muted); }

/* Trinity Lock */
.tlock { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink); }
.tlock-title span, .tl-ref, .tl-core small { color: var(--muted); }
.tlock-head { border-bottom: 1px solid var(--rule); font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.tlock-head .tl-mark { font-size: 15px; }
.tlock-head-true .tl-mark { color: var(--green); }
.tlock-head-broken { color: var(--ink2); }
.tlock-head-broken .tl-mark, .tl-break { color: var(--red); }
.tl-w { border: 1px solid var(--strong); background: var(--paper); border-radius: 6px; }
.tlock-sure .tl-w3 { background: var(--hl); border: 1px solid var(--hl-line); box-shadow: inset 3px 0 0 var(--hl-line); }
.tl-core { border: 1px solid var(--ink2); background: var(--paper); border-radius: 6px; }
.tlock-cond .tl-w { border-color: var(--rule); color: var(--ink2); }
.tlock-cond .tl-w3 { border: 1px dashed var(--red); background: #fff5f5; }
.tlock-cond .tl-core { border: 1px dotted var(--strong); background: transparent; }
.tlock-key { background: var(--inset); border: 1px solid var(--rule); border-radius: 6px; }
.tlock-key .tl-verses em { color: var(--ink); }
.tlock-key svg [stroke="#2a2620"] { stroke: var(--ink); }
.tlock-key svg rect[fill="#fffdf8"] { fill: var(--paper); }
.tlock-key svg circle[fill="#2f5d3a"] { fill: var(--green); }
.tlock-key svg [stroke="#f6e8a6"] { stroke: #ffffff; }
.tlock-key svg [stroke="#5c5546"] { stroke: var(--muted); }
.tlock-key svg stop[stop-color="#2a2620"] { stop-color: var(--ink); }
.tlock-key svg g[fill="#2a2620"] { fill: var(--ink); }

/* Explanation matrix */
.xmatrix { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--ink); }
.xm-sub, .xm-note, .xm-table thead th.xm-corner, .xm-table tbody th small { color: var(--muted); }
.xm-key { color: var(--ink2); }
.xm-table { background: var(--paper); }
.xm-table th, .xm-table td { border: 1px solid var(--rule); }
.xm-table thead th { color: var(--ink2); background: var(--inset); border-bottom: 1px solid var(--strong); }
.xm-table tbody tr:nth-child(2n) { background: var(--inset); }
.xm-y { color: var(--green); }
.xm-n { color: var(--red); }
.xm-p { color: var(--muted); }
.xm-table .xm-rose { background: var(--hl); border-left: 2px solid var(--hl-line); border-right: 2px solid var(--hl-line); }
.xm-table thead th.xm-rose { color: var(--ink); border-top: 2px solid var(--hl-line); font-weight: 600; background: var(--hl); }
.xm-table tbody tr:last-child .xm-rose { border-bottom: 2px solid var(--hl-line); }
/* narrow screens: no mid-word hyphenation in matrix heads; no small-caps blow-up */
@media (max-width: 560px) {
  .xm-table col.xm-c0 { width: 26%; }
  .xm-table thead th {
    font-size: 11px;
    letter-spacing: 0;
    font-variant: normal;
    font-variant-caps: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.2;
  }
}

/* printable sheets, screen view */
body:has(> .sheet), body:has(> .record), body:has(> main.record) { background: #f6f8fa;
   --rule: #8c959f; --ink: #1f2328; --red: #cf222e; --paper: #ffffff; --tint: #f6f8fa; }
body:has(> .sheet) > .bar, body:has(> .sheet) > .also, body:has(> .sheet) > .print-line, body:has(> .sheet) > .free-take,
body:has(> .record) > .bar, body:has(> .record) > .also, body:has(> .record) > .print-line, body:has(> .record) > .free-take { color: #59636e; }
body:has(> .sheet) > .read-next, body:has(> .record) > .read-next { color: #1f2328; }
body:has(> .sheet) > .read-next h2.topic-heading, body:has(> .record) > .read-next h2.topic-heading { color: #1f2328; border-bottom: 1px solid #d0d7de; }
body:has(> .sheet) > .read-next .item-desc, body:has(> .record) > .read-next .item-desc { color: #31363c; }
body:has(> .sheet) > :not(.sheet) a:link, body:has(> .record) > :not(.record) a:link { color: #0969da; }
body:has(> .sheet) > :not(.sheet) a:visited, body:has(> .record) > :not(.record) a:visited { color: #0969da; }
.sheet, .record { background: #ffffff; color: #1f2328; border: 0; border-radius: 6px;
                  box-shadow: 0 0 0 1px #d0d7de, 0 1px 3px rgba(31,35,40,.08);
                  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif; }
.sheet a:link, .sheet a:visited, .record a:link, .record a:visited { color: #0969da; }
.sheet .ev a { color: #0969da; border-bottom-color: #0969da; }
.sheet mark, .record mark { background: #ddf4ff; color: inherit; box-shadow: inset 0 -2px 0 #0969da; }
.sheet .kicker, .sheet .sub, .sheet .ps, .sheet .cont, .sheet .bn, .sheet .ref, .sheet .qt, .sheet .q, .sheet .or, .sheet .gift, .sheet .foot,
.record .kicker, .record .sub, .record .ref, .record .ft, .record .foot, .record h2 .ps { color: #59636e; }
.sheet .panel, .sheet .chart, .sheet .bill, .sheet .opt { border: 1px solid #d0d7de; border-radius: 6px; background: #ffffff; overflow: hidden; }
.sheet .ph { background: #f6f8fa; border-bottom: 1px solid #d0d7de; }
.sheet .panel li + li { border-top: 1px solid #d0d7de; }
.sheet .n { border: 1px solid #8c959f; border-radius: 4px; background: #ffffff; }
.sheet .panel.fruit { border: 1px dashed #8c959f; background: #ffffff; }
.sheet .meter { border: 1px solid #d0d7de; border-radius: 6px; overflow: hidden; background: #ffffff; }
.sheet .meter .j { background: #ddf4ff; border-right: 1px solid #0969da; }
.sheet .final, .sheet .choice, .sheet .eat-box { border: 1px solid #d0d7de; border-top: 3px solid #0969da; border-radius: 6px; background: #f6f8fa; }
.sheet .opt.yes { background: #ddf4ff; border-color: #0969da; }
.sheet .vc { background: #ddf4ff; border-left: 3px solid #0969da; }
.sheet .paid { border: 1px solid #d0d7de; border-radius: 6px; background: #f6f8fa; }
.sheet .verses > div { border-top: 1px solid #d0d7de; }
.sheet .led th { border-bottom: 1px solid #8c959f; }
.sheet .led td, .sheet .g td { border-bottom-color: #d0d7de; border-top-color: #d0d7de; border-bottom-style: solid; border-top-style: solid; border-width: 0 0 1px 0; }
.sheet .g td { border-width: 1px 0 0 0; }
.sheet .g tr:first-child td { border-top: 0; }
.sheet .led tr.tot td { border-top: 1px solid #8c959f; border-bottom: 1px solid #8c959f; background: #f6f8fa; }
.sheet .stamp { border-style: solid; border-width: .6mm; }
.sheet .rule { border-top: 1px solid #d0d7de; }
.sheet svg [fill="#fff59d"].dot-saved { fill: #ddf4ff; stroke: #0969da; }
.record::before { display: none; content: none; border: 0; width: 0; }
.frame { display: none !important; }
.record .caption { border-bottom: 1px solid #d0d7de; }
.record table.docket, .record table.alt { border: 1px solid #d0d7de; background: #ffffff; }
.record .docket th, .record .docket td, .record .alt td { border-bottom: 1px solid #d0d7de; }
.record .alt th { border-bottom: 1px solid #8c959f; background: #f6f8fa; }
.record table.alt tbody tr:nth-child(2n), .record table.docket tbody tr:nth-child(2n) { background: #f6f8fa; }
.record h2 { background: #f6f8fa; border-top: 1px solid #d0d7de; border-bottom: 1px solid #d0d7de; }
.record .finding, .finding {
  border: 1px solid #d0d7de; border-top: 3px solid #0969da; border-radius: 6px; background: #f6f8fa;
  text-align: left; font-weight: 400; line-height: 1.55; padding: 14px 16px 16px;
}
.finding .stamp, .record .finding .stamp {
  display: table; margin: 0 auto 12px; text-align: center; font-weight: 700;
}
.finding p, .record .finding p { font-weight: 400; margin: 0; line-height: 1.55; }
.finding p b, .record .finding p b { font-weight: 600; }
.record .finding .q, .finding .q {
  border-top: 1px solid #d0d7de;
  margin-top: 14px; padding-top: 12px;
  font-weight: 500; font-size: inherit; font-style: italic; line-height: 1.5;
}

/* desktop screen: let sheets grow so text is not clipped; panel frames can close */
.sheet { height: auto; overflow: visible; }
}
@media screen and (min-width: 821px) {
  .sheet { min-height: 296mm; }
}

/* sitepack 2026-11-29: CC0 footer line */
#footer .cc0 { margin: 8px 0 0 0; }
p.cc0 { font-size: 13px; color: var(--muted, #59636e); text-align: center; }
body:has(> .sheet) > p.cc0,
body:has(> .record) > p.cc0 { width: 210mm; max-width: 100%; margin: 0 auto 24px; }
@media print {
  p.cc0 { display: none !important; }
}

/* dark mode 2026-11-29: only when the reader has chosen it (html[data-theme="dark"]). Loaded after style.css, so these rules are the ones that apply on screen. Print is unchanged. */

  html[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0d1117;
    --inset: #161b22;
    --inset2: #161b22;
    --ink: #e6edf3;
    --ink2: #c9d1d9;
    --muted: #8b949e;
    --rule: #30363d;
    --rule2: #21262d;
    --blue: #58a6ff;
    --visited: #58a6ff;
    --red: #ff7b72;
    --green: #3fb950;
    --hl: #152d48;
    --hl-line: #58a6ff;
    --strong: #8b949e;
    --frame: #30363d;
    color-scheme: dark;
  }
  
  html[data-theme="dark"] body{ background: var(--paper); color: var(--ink); }
  html[data-theme="dark"] ::selection{ background: #1f4d73; color: var(--ink); }

  html[data-theme="dark"] a:link{ color: var(--blue); }
  html[data-theme="dark"] a:visited{ color: var(--visited); }
  html[data-theme="dark"] a:hover, html[data-theme="dark"] a:focus{ color: #79c0ff; }
  html[data-theme="dark"] a:link, html[data-theme="dark"] a:visited{ text-decoration-color: currentColor; }
  html[data-theme="dark"] #header h1 a, html[data-theme="dark"] #header h1 a:link, html[data-theme="dark"] #header h1 a:visited{ color: var(--ink); }
  html[data-theme="dark"] #header h1 a:hover{ color: var(--blue); }
  html[data-theme="dark"] h3.post-title a:link, html[data-theme="dark"] h3.post-title a:visited{ color: var(--blue); }
  html[data-theme="dark"] h3.post-title a:hover{ color: #79c0ff; }
  html[data-theme="dark"] a:focus-visible{ outline-color: var(--hl-line); }

  html[data-theme="dark"] mark{ background-color: var(--hl); color: var(--ink); box-shadow: inset 0 -2px 0 var(--hl-line); }

  html[data-theme="dark"] .figure img, html[data-theme="dark"] img[style*="max-width:760px"]{
    background: #ffffff !important;
    border-color: var(--rule) !important;
  }
  html[data-theme="dark"] .figure svg{
    background: #f7f7f2;
    border: 1px solid var(--rule);
    border-radius: 6px;
  }

  html[data-theme="dark"] code{ background: var(--inset); color: var(--ink); }

  html[data-theme="dark"] sup.fnref a:link, html[data-theme="dark"] sup.fnref a:visited{ color: var(--blue); }
  html[data-theme="dark"] sup.fnref a:hover, html[data-theme="dark"] sup.fnref a:focus, html[data-theme="dark"] a.back:hover{ background: var(--hl); color: var(--blue); }
  html[data-theme="dark"] a.back, html[data-theme="dark"] a.back:link, html[data-theme="dark"] a.back:visited{ color: var(--blue); }

  html[data-theme="dark"] .tlock-cond .tl-w3{ background: #3d1618; }
  html[data-theme="dark"] .tlock-key svg [stroke="#f6e8a6"]{ stroke: var(--hl); }
  html[data-theme="dark"] .tlock-key svg rect[fill="#fffdf8"]{ fill: var(--paper); }
  html[data-theme="dark"] .tlock-key svg circle[fill="#2f5d3a"]{ fill: var(--green); }
  html[data-theme="dark"] .tlock-key svg [stroke="#2a2620"]{ stroke: var(--ink); }
  html[data-theme="dark"] .tlock-key svg g[fill="#2a2620"]{ fill: var(--ink); }
  html[data-theme="dark"] .tlock-key svg stop[stop-color="#2a2620"]{ stop-color: var(--ink); }
  html[data-theme="dark"] .tlock-key svg [stroke="#5c5546"]{ stroke: var(--muted); }

  /* Text figures */
  html[data-theme="dark"] .tfig{ border-top-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .tfig-title span, html[data-theme="dark"] .tfig-key{ color: var(--muted); }
  html[data-theme="dark"] .tfig-sub{ color: var(--ink); border-top-color: var(--rule2); }
  html[data-theme="dark"] .tfig-key .k-w{ background: var(--paper); border-color: var(--ink); }
  html[data-theme="dark"] .tfig-key .k-c{ background: var(--strong); }
  html[data-theme="dark"] .tfig-key .k-nt{ background: var(--blue); }
  html[data-theme="dark"] .tfig .tf-halo{ stroke: var(--paper); }
  html[data-theme="dark"] .tfig-cap{ background: var(--inset); border-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#1f2328"]{ fill: var(--ink); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#1f2328"]{ stroke: var(--ink); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#59636e"]{ fill: var(--muted); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#59636e"]{ stroke: var(--muted); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#8c959f"]{ fill: var(--strong); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#8c959f"]{ stroke: var(--strong); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#d8dee4"]{ fill: var(--rule); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#d8dee4"]{ stroke: var(--rule); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#0969da"]{ fill: var(--blue); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#0969da"]{ stroke: var(--blue); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#1a7f37"]{ fill: var(--green); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#1a7f37"]{ stroke: var(--green); }
  html[data-theme="dark"] .tfig .tf-svg [fill="#dafbe1"]{ fill: #12261c; }
  html[data-theme="dark"] .tfig .tf-svg [fill="#b6e3ff"]{ fill: #152d48; }
  html[data-theme="dark"] .tfig .tf-svg [fill="#ffffff"]{ fill: var(--paper); }
  html[data-theme="dark"] .tfig .tf-svg [stroke="#ffffff"]{ stroke: var(--paper); }

  html[data-theme="dark"] .pjfig{ border-top-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .pj-title span, html[data-theme="dark"] .pj-head .pj-ref, html[data-theme="dark"] .pj-l{ color: var(--muted); }
  html[data-theme="dark"] .pj-head{ border-bottom-color: var(--ink); }
  html[data-theme="dark"] .pj-h-faith{ border-bottom-color: var(--green); }
  html[data-theme="dark"] .pj-h-faith .pj-tag{ background: #12261c; border-color: var(--green); color: var(--green); }
  html[data-theme="dark"] .pj-h-works{ border-bottom-color: var(--rule); }
  html[data-theme="dark"] .pj-h-works .pj-tag{ background: var(--inset); border-color: var(--rule); color: var(--muted); }
  html[data-theme="dark"] .pj-cell{ background: var(--inset); border-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .pj-ans.pj-faith{ background: #12261c; border-color: var(--green); }
  html[data-theme="dark"] .pj-ans.pj-faith strong{ color: var(--green); }
  html[data-theme="dark"] .pj-ans.pj-works{ background: var(--inset); border-color: var(--rule); }
  html[data-theme="dark"] .pj-one{ background: #12261c; border-color: var(--green); }
  html[data-theme="dark"] .pj-one strong{ color: var(--green); }
  html[data-theme="dark"] .pj-one span{ color: var(--ink2); }
  html[data-theme="dark"] .gex-arr svg [stroke="#cf222e"]{ stroke: var(--red); }
  html[data-theme="dark"] .gex-arr svg [fill="#cf222e"]{ fill: var(--red); }
  html[data-theme="dark"] .gex-arr svg [stroke="#1a7f37"], html[data-theme="dark"] .pj-join svg [stroke="#1a7f37"]{ stroke: var(--green); }
  html[data-theme="dark"] .gex-arr svg [fill="#1a7f37"], html[data-theme="dark"] .pj-join svg [fill="#1a7f37"]{ fill: var(--green); }
  html[data-theme="dark"] .pj-join svg [stroke="#8b949e"]{ stroke: var(--muted); }
  html[data-theme="dark"] .pj-join svg [fill="#8b949e"]{ fill: var(--muted); }

  html[data-theme="dark"] .gex{ border-top-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .gex-title span, html[data-theme="dark"] .gex-ref{ color: var(--muted); }
  html[data-theme="dark"] .gex-cols span, html[data-theme="dark"] .gex-desc{ color: var(--ink); }
  html[data-theme="dark"] .gex-cap{ color: var(--ink); background: var(--inset); border-color: var(--rule); }
  html[data-theme="dark"] .gex-card{ border-color: var(--rule); }
  html[data-theme="dark"] .gex-debt{ background: #3d1618; border-color: var(--rule); box-shadow: inset 3px 0 0 var(--red); }
  html[data-theme="dark"] .gex-gift{ background: #12261c; border-color: var(--rule); box-shadow: inset 3px 0 0 var(--green); }
  html[data-theme="dark"] .gex-debt .gex-lab, html[data-theme="dark"] .gex-arr-debt span{ color: var(--red); }
  html[data-theme="dark"] .gex-gift .gex-lab, html[data-theme="dark"] .gex-arr-gift span{ color: var(--green); }

  html[data-theme="dark"] .rhfig{ border-top-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .rh-title span{ color: var(--muted); }
  html[data-theme="dark"] .rh-board{ border-color: var(--rule); background: var(--inset); }
  html[data-theme="dark"] .rh-place{ color: var(--ink); }
  html[data-theme="dark"] .rh-house{ color: var(--green); }
  html[data-theme="dark"] .rh-one{ background: #12261c; border-color: var(--green); }
  html[data-theme="dark"] .rh-one strong{ color: var(--green); }
  html[data-theme="dark"] .rh-one span{ color: var(--ink2); }
  html[data-theme="dark"] .rh-track svg [stroke="#d0d7de"]{ stroke: var(--rule); }
  html[data-theme="dark"] .rh-track svg [stroke="#59636e"]{ stroke: var(--muted); }
  html[data-theme="dark"] .rh-track svg [fill="#59636e"]{ fill: var(--muted); }
  html[data-theme="dark"] .rh-track svg [stroke="#1a7f37"]{ stroke: var(--green); }
  html[data-theme="dark"] .rh-track svg [fill="#1a7f37"]{ fill: var(--green); }
  html[data-theme="dark"] .rh-track svg [fill="#ffffff"]{ fill: var(--paper); }

  html[data-theme="dark"] .mxc{ border-top-color: var(--rule); border-bottom-color: var(--rule); color: var(--ink); }
  html[data-theme="dark"] .mxc-title span, html[data-theme="dark"] .mxc-ref{ color: var(--muted); }
  html[data-theme="dark"] .mxc-col{ border-color: var(--rule); }
  html[data-theme="dark"] .mxc-law{ background: var(--inset); }
  html[data-theme="dark"] .mxc-clean{ background: #12261c; box-shadow: inset 3px 0 0 var(--green); }
  html[data-theme="dark"] .mxc-clean .mxc-head{ color: var(--green); }
  html[data-theme="dark"] .mxc-body, html[data-theme="dark"] .mxc-cap{ color: var(--ink); }
  html[data-theme="dark"] .mxc-arr svg [stroke="#1a7f37"]{ stroke: var(--green); }
  html[data-theme="dark"] .mxc-arr svg [fill="#1a7f37"]{ fill: var(--green); }

  /* Printable sheets follow the screen theme. Print CSS and PDFs stay white. */
@media screen {
  html[data-theme="dark"] body:has(> .sheet), html[data-theme="dark"] body:has(> .record), html[data-theme="dark"] body:has(> main.record){
    background: #0d1117;
    --paper: #161b22;
    --inset: #161b22;
    --inset2: #161b22;
    --tint: #21262d;
    --ink: #e6edf3;
    --ink2: #c9d1d9;
    --muted: #8b949e;
    --rule: #30363d;
    --rule2: #21262d;
    --blue: #58a6ff;
    --visited: #58a6ff;
    --red: #ff7b72;
    --green: #3fb950;
    --hl: #152d48;
    --hl-line: #58a6ff;
    --strong: #8b949e;
    --frame: #30363d;
  }
  html[data-theme="dark"] body:has(> .sheet) > .bar, html[data-theme="dark"] body:has(> .sheet) > .also, html[data-theme="dark"] body:has(> .sheet) > .print-line, html[data-theme="dark"] body:has(> .sheet) > .free-take, html[data-theme="dark"] body:has(> .record) > .bar, html[data-theme="dark"] body:has(> .record) > .also, html[data-theme="dark"] body:has(> .record) > .print-line, html[data-theme="dark"] body:has(> .record) > .free-take, html[data-theme="dark"] body:has(> .sheet) > p.cc0, html[data-theme="dark"] body:has(> .record) > p.cc0, html[data-theme="dark"] p.cc0{
    color: #8b949e;
  }
  html[data-theme="dark"] body:has(> .sheet) > .read-next, html[data-theme="dark"] body:has(> .record) > .read-next{ color: #e6edf3; }
  html[data-theme="dark"] body:has(> .sheet) > .read-next h2.topic-heading, html[data-theme="dark"] body:has(> .record) > .read-next h2.topic-heading{
    color: #e6edf3; border-bottom-color: #30363d;
  }
  html[data-theme="dark"] body:has(> .sheet) > .read-next .item-desc, html[data-theme="dark"] body:has(> .record) > .read-next .item-desc{ color: #c9d1d9; }
  html[data-theme="dark"] body:has(> .sheet) > :not(.sheet) a:link, html[data-theme="dark"] body:has(> .record) > :not(.record) a:link,
  html[data-theme="dark"] body:has(> .sheet) > :not(.sheet) a:visited, html[data-theme="dark"] body:has(> .record) > :not(.record) a:visited{ color: #58a6ff; }
  html[data-theme="dark"] body:has(> .sheet) > :not(.sheet) a:hover, html[data-theme="dark"] body:has(> .record) > :not(.record) a:hover{ color: #79c0ff; }

  html[data-theme="dark"] .sheet, html[data-theme="dark"] .record{
    background: #161b22;
    color: #e6edf3;
    box-shadow: 0 0 0 1px #30363d, 0 8px 28px rgba(0,0,0,.45);
    --paper: #161b22;
    --inset: #0d1117;
    --inset2: #0d1117;
    --tint: #21262d;
    --ink: #e6edf3;
    --ink2: #c9d1d9;
    --muted: #8b949e;
    --rule: #30363d;
    --rule2: #21262d;
    --blue: #58a6ff;
    --visited: #58a6ff;
    --red: #ff7b72;
    --green: #3fb950;
    --hl: #152d48;
    --hl-line: #58a6ff;
    --strong: #8b949e;
    --frame: #30363d;
  }
  html[data-theme="dark"] .sheet a:link, html[data-theme="dark"] .sheet a:visited,
  html[data-theme="dark"] .record a:link, html[data-theme="dark"] .record a:visited{ color: #58a6ff; }
  html[data-theme="dark"] .sheet .ev a{ color: #58a6ff; border-bottom-color: #58a6ff; }
  html[data-theme="dark"] .sheet mark, html[data-theme="dark"] .record mark{
    background: #152d48; color: inherit; box-shadow: inset 0 -2px 0 #58a6ff;
  }
  html[data-theme="dark"] .sheet .kicker, html[data-theme="dark"] .sheet .sub, html[data-theme="dark"] .sheet .ps, html[data-theme="dark"] .sheet .cont, html[data-theme="dark"] .sheet .bn, html[data-theme="dark"] .sheet .ref, html[data-theme="dark"] .sheet .qt, html[data-theme="dark"] .sheet .q, html[data-theme="dark"] .sheet .or, html[data-theme="dark"] .sheet .gift, html[data-theme="dark"] .sheet .foot,
  html[data-theme="dark"] .record .kicker, html[data-theme="dark"] .record .sub, html[data-theme="dark"] .record .ref, html[data-theme="dark"] .record .ft, html[data-theme="dark"] .record .foot, html[data-theme="dark"] .record h2 .ps{ color: #8b949e; }
  html[data-theme="dark"] .sheet .panel, html[data-theme="dark"] .sheet .bill, html[data-theme="dark"] .sheet .opt{
    border-color: #30363d; background: #0d1117;
  }
  /* The Paid in Full time-chart SVG is drawn for a light ground; keep it on a light plate. */
  html[data-theme="dark"] .sheet .chart{
    background: #ffffff;
    border-color: #30363d;
    color: #1c1a17;
  }
  html[data-theme="dark"] .sheet .ph{ background: #21262d; border-bottom-color: #30363d; }
  html[data-theme="dark"] .sheet .panel li + li{ border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .n{ border-color: #8b949e; background: #0d1117; color: #e6edf3; }
  html[data-theme="dark"] .sheet .panel.fruit{ border-color: #8b949e; background: #0d1117; }
  html[data-theme="dark"] .sheet .meter{ border-color: #30363d; background: #0d1117; }
  html[data-theme="dark"] .sheet .meter .j{ background: #152d48; border-right-color: #58a6ff; }
  html[data-theme="dark"] .sheet .final, html[data-theme="dark"] .sheet .choice, html[data-theme="dark"] .sheet .eat-box{
    border-color: #30363d; border-top-color: #58a6ff; background: #21262d;
  }
  html[data-theme="dark"] .sheet .opt.yes{ background: #152d48; border-color: #58a6ff; }
  html[data-theme="dark"] .sheet .vc{ background: #152d48; border-left-color: #58a6ff; }
  html[data-theme="dark"] .sheet .paid{ border-color: #30363d; background: #21262d; }
  html[data-theme="dark"] .sheet .verses > div{ border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .led th{ border-bottom-color: #8b949e; color: #ff7b72; }
  html[data-theme="dark"] .sheet .led td, html[data-theme="dark"] .sheet .g td{ border-bottom-color: #30363d; border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .led tr.tot td{ border-top-color: #8b949e; border-bottom-color: #8b949e; background: #21262d; }
  html[data-theme="dark"] .sheet .rule{ border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .rule::after{ background: #161b22; color: #ff7b72; }
  html[data-theme="dark"] .sheet svg [fill="#fff59d"].dot-saved{ fill: #152d48; stroke: #58a6ff; }
  html[data-theme="dark"] .sheet .bill .bh{ background: #21262d; border-bottom-color: #30363d; }
  html[data-theme="dark"] .sheet .bill .bh i{ color: #c9d1d9; }
  html[data-theme="dark"] .sheet .note{ color: #c9d1d9; border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .note b, html[data-theme="dark"] .sheet .led td.am, html[data-theme="dark"] .sheet .led tr.tot td.am{ color: #ff7b72; }
  html[data-theme="dark"] .sheet .led td.no, html[data-theme="dark"] .sheet .led td.rf, html[data-theme="dark"] .sheet .led tr.more td{ color: #8b949e; }
  html[data-theme="dark"] .sheet .led tr:not(.tot) td.it::before, html[data-theme="dark"] .sheet .led td.rf::before, html[data-theme="dark"] .sheet .led td.am::before{ color: #ff7b72; }
  html[data-theme="dark"] .sheet .rom, html[data-theme="dark"] .sheet .caption, html[data-theme="dark"] .sheet .opt .q, html[data-theme="dark"] .sheet .gift, html[data-theme="dark"] .sheet .vq, html[data-theme="dark"] .sheet .final.ring .sc{ color: #c9d1d9; }
  html[data-theme="dark"] .sheet .vq, html[data-theme="dark"] .sheet .qt{ border-left-color: #30363d; }
  html[data-theme="dark"] .sheet .also{ color: #c9d1d9; }
  html[data-theme="dark"] .sheet .also a{ color: #58a6ff; border-bottom-color: #58a6ff; }
  html[data-theme="dark"] .sheet .arrow::before{ border-left-color: #30363d; }
  html[data-theme="dark"] .sheet .arrow::after{ border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .vr, html[data-theme="dark"] .sheet .g tr, html[data-theme="dark"] .sheet .final.ring .end{ border-top-color: #30363d; }
  html[data-theme="dark"] .sheet .rn, html[data-theme="dark"] .sheet .bt, html[data-theme="dark"] .sheet .tag, html[data-theme="dark"] .sheet .vl, html[data-theme="dark"] .sheet .gv, html[data-theme="dark"] .sheet .g td.gv{ color: #ff7b72; }

  html[data-theme="dark"] .record .caption{ border-bottom-color: #30363d; }
  html[data-theme="dark"] .record table.docket, html[data-theme="dark"] .record table.alt{ border-color: #30363d; background: #0d1117; }
  html[data-theme="dark"] .record .docket th, html[data-theme="dark"] .record .docket td, html[data-theme="dark"] .record .alt td{ border-bottom-color: #30363d; }
  html[data-theme="dark"] .record .docket th, html[data-theme="dark"] .record .xl, html[data-theme="dark"] .record h2 .rn, html[data-theme="dark"] h2 .rn{ color: #ff7b72; }
  html[data-theme="dark"] .record .alt th{ border-bottom-color: #8b949e; background: #21262d; }
  html[data-theme="dark"] .record table.alt tbody tr:nth-child(2n), html[data-theme="dark"] .record table.docket tbody tr:nth-child(2n){ background: #21262d; }
  html[data-theme="dark"] .record h2{ background: #21262d; border-top-color: #30363d; border-bottom-color: #30363d; color: #e6edf3; }
  html[data-theme="dark"] .record .finding, html[data-theme="dark"] .finding{
    border-color: #30363d; border-top-color: #58a6ff; background: #21262d; color: #e6edf3;
  }
  html[data-theme="dark"] .finding .stamp, html[data-theme="dark"] .record .finding .stamp{ border-color: #ff7b72; color: #ff7b72; }
  html[data-theme="dark"] .record .finding .q, html[data-theme="dark"] .finding .q{ border-top-color: #30363d; }
  html[data-theme="dark"] .alt td:nth-child(2)::before, html[data-theme="dark"] .alt td:nth-child(3)::before{ color: #ff7b72; }
}


  /* Home reading-path tabs (also set in index.html so they win over its inline style) */
  html[data-theme="dark"] .path-lead{ color: #e6edf3; }
  html[data-theme="dark"] .path-tabs{ background: #30363d; border-color: #30363d; }
  html[data-theme="dark"] .path-tabs button{ background: #161b22; color: #e6edf3; }
  html[data-theme="dark"] .path-tabs button:hover{ background: #21262d; box-shadow: inset 0 0 0 1px #8b949e; }
  html[data-theme="dark"] .reading-paths[data-path="all"] #tab-all, html[data-theme="dark"] .reading-paths[data-path="5min"] #tab-5min, html[data-theme="dark"] .reading-paths[data-path="evening"] #tab-evening, html[data-theme="dark"] .reading-paths[data-path="case"] #tab-case{
    background: #e6edf3; color: #0d1117;
  }
  html[data-theme="dark"] .reading-paths[data-path="all"] #tab-all:hover, html[data-theme="dark"] .reading-paths[data-path="5min"] #tab-5min:hover, html[data-theme="dark"] .reading-paths[data-path="evening"] #tab-evening:hover, html[data-theme="dark"] .reading-paths[data-path="case"] #tab-case:hover{
    background: #e6edf3; color: #0d1117; box-shadow: none;
  }
  html[data-theme="dark"] .path-tabs button:focus-visible{ box-shadow: inset 0 0 0 2px #e6edf3; }
  html[data-theme="dark"] .reading-paths[data-path="all"] #tab-all:focus-visible, html[data-theme="dark"] .reading-paths[data-path="5min"] #tab-5min:focus-visible, html[data-theme="dark"] .reading-paths[data-path="evening"] #tab-evening:focus-visible, html[data-theme="dark"] .reading-paths[data-path="case"] #tab-case:focus-visible{
    box-shadow: inset 0 0 0 2px #0d1117;
  }



/* Theme toggle: sun and moon always visible; shown only after script runs; hidden in print */
html { color-scheme: light; }
#header, .bar { position: relative; }
.theme-toggle {
  position: absolute;
  z-index: 6;
  display: flex;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule, #d0d7de);
  border-radius: 6px;
  overflow: hidden;
  background: var(--rule, #d0d7de);
  line-height: 0;
}
#header .theme-toggle { top: 10px; right: 0; }
.bar .theme-toggle { top: 50%; right: 0; transform: translateY(-50%); }
.theme-toggle button {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper, #ffffff);
  color: var(--muted, #59636e);
  cursor: pointer;
  line-height: 0;
}
.theme-toggle button svg { display: block; }
.theme-toggle button:hover { color: var(--ink, #1f2328); background: var(--inset, #f6f8fa); }
.theme-toggle button:focus-visible {
  outline: 2px solid var(--hl-line, #0969da);
  outline-offset: -2px;
  z-index: 1;
}
.theme-toggle button[aria-pressed="true"] {
  background: var(--ink, #1f2328);
  color: var(--paper, #ffffff);
}
.theme-toggle button[aria-pressed="true"]:hover {
  background: var(--ink, #1f2328);
  color: var(--paper, #ffffff);
}
html[data-theme="dark"] .theme-toggle { border-color: var(--rule); background: var(--rule); }
html[data-theme="dark"] .theme-toggle button {
  background: var(--inset);
  color: var(--muted);
}
html[data-theme="dark"] .theme-toggle button:hover {
  color: var(--ink);
  background: var(--paper);
}
html[data-theme="dark"] .theme-toggle button[aria-pressed="true"],
html[data-theme="dark"] .theme-toggle button[aria-pressed="true"]:hover {
  background: var(--ink);
  color: var(--paper);
}
/* hidden must win over display:flex, including when script is off */
.theme-toggle[hidden] { display: none !important; }
@media print {
  .theme-toggle { display: none !important; }
}

/* About: closing quotation as a modest card (screen and print) */
blockquote.closing-quote {
  margin: 1.85em auto 2.1em;
  padding: 0.9em 1.15em 1em 1.2em;
  max-width: 28em;
  border: 1px solid var(--rule, #d0d7de);
  border-left: 3px solid var(--blue, #0969da);
  border-radius: 6px;
  background: var(--inset, #f6f8fa);
  text-align: left;
  color: var(--ink, #1f2328);
}
blockquote.closing-quote::before { content: none; display: none; }
blockquote.closing-quote p {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink, #1f2328);
}
blockquote.closing-quote footer {
  margin: 0.5em 0 0;
  font-family: inherit;
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted, #59636e);
}
@media print {
  blockquote.closing-quote { break-inside: avoid; }
}
