/* Truth, Peace and Love - style.css - version 3.7 (typographic design) */

/* Typefaces (SIL Open Font Licence), self-hosted:
   Source Serif 4 for reading (assets/fonts/OFL.txt);
   Inter Extra Bold and Black Italic for hashtags and headings (assets/fonts/Inter-OFL.txt),
   trimmed to Latin letters and punctuation. */
@font-face{font-family:"Source Serif 4";src:url("../fonts/SourceSerif4-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url("../fonts/SourceSerif4-Italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url("../fonts/SourceSerif4-Semibold.woff2") format("woff2");font-weight:600 700;font-style:normal;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url("../fonts/SourceSerif4-SemiboldItalic.woff2") format("woff2");font-weight:600 700;font-style:italic;font-display:swap}
@font-face{font-family:"Inter";src:url("../fonts/Inter-800-Italic.woff2") format("woff2");font-weight:800;font-style:italic;font-display:swap}
@font-face{font-family:"Inter";src:url("../fonts/Inter-900-Italic.woff2") format("woff2");font-weight:900;font-style:italic;font-display:swap}

/* Colours. Dark is the default. The button in the masthead switches between two choices,
   remembered on the reader's device: dark and light. Since v2.5 they are mirror images:
   light is warm grey paper with soft black ink (the old "soft"); dark is that soft black
   as the paper with the warm grey as the ink.
   --hash is the colour of every # sign: set it to var(--rubric) for red, or var(--muted) for grey. */
:root{
  --pop-size:1.10rem;
  --serif:"Source Serif 4",Georgia,"Times New Roman",serif;
  --display:"Inter","Helvetica Neue",Arial,sans-serif;
  --paper:#252422;--ink:#dcd8cf;--muted:#a39e94;--gloss:#7f7b73;--rubric:#d98a78;
  --pop-bg:#302e2b;--pop-head:#3b3935;--pop-text:#dcd8cf;
  --hash:var(--ink);
  color-scheme:dark;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
}
:root[data-theme="light"]{
  --paper:#dcd8cf;--ink:#252422;--muted:#57534c;--gloss:#7a766e;--rubric:#8a2a1f;
  --pop-bg:#d0ccc2;--pop-head:#c3bfb4;--pop-text:#252422;color-scheme:light}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;font-synthesis:small-caps;background:var(--paper)}
body{
  margin:0;background:var(--paper);color:var(--ink);font-family:var(--serif);
  font-size:calc(clamp(1.0625rem,.95rem + .45vw,1.25rem) * 1.265 * var(--text-scale,1));line-height:1.6;
  font-kerning:normal;font-variant-numeric:oldstyle-nums proportional-nums;
}
.wrap{max-width:82rem;margin-left:auto;margin-right:auto;padding-left:clamp(1.15rem,4vw,3rem);padding-right:clamp(1.15rem,4vw,3rem)}
p{margin:0 0 1em;text-wrap:pretty}
a{color:var(--ink);text-decoration-thickness:.06em;text-underline-offset:.18em}
a:hover{text-decoration-thickness:.12em}
:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
img{max-width:100%;height:auto}
.hash{color:var(--hash)}
.skip{position:absolute;left:-999px;top:.5rem;padding:.5rem .75rem;background:var(--paper);color:var(--ink);z-index:5}
.skip:focus{left:1rem}
.sr-only,.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Reading width: everything in the main column keeps a comfortable line length,
   except the big typographic blocks, which run the full width. */
main > *{max-width:34em}
main > .page-head,main > .hero,main > .doors-block,main > .more,main > .post{max-width:none}
.prose{max-width:34em}

/* Masthead: wordmark, hashtag menu, light/dark button */
.masthead{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem 1.5rem;padding-top:1rem}
.wordmark{order:1;font-family:var(--display);font-weight:900;font-style:italic;font-size:2.5rem;line-height:1;letter-spacing:-.06em;text-decoration:none;padding:.1rem .15rem .1rem 0}
.masthead nav{order:2;margin-left:auto}
.reader-controls{order:3;display:flex;gap:.4rem}
.menu{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;column-gap:1.1rem;font-family:var(--display);font-weight:800;font-style:italic;font-size:1.15rem;letter-spacing:-.02em;font-variant-numeric:normal}
.menu a{display:inline-flex;align-items:center;min-height:44px;text-decoration:none;border-bottom:3px solid transparent}
.menu a:hover{border-bottom-color:var(--ink)}
.menu a[aria-current]{border-bottom-color:var(--rubric)}
.ctl{flex:0 0 auto;min-width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 .7rem;border:2px solid var(--ink);border-radius:0;background:transparent;color:var(--ink);cursor:pointer;font-family:var(--display);font-weight:800;font-style:italic;font-size:1rem;letter-spacing:-.02em}
.ctl[hidden]{display:none}
.ctl:hover{background:var(--ink);color:var(--paper)}
.ctl:hover .hash{color:var(--paper)}
/* Text size buttons (v3.3): square, beside #dark/#light. At the smallest or largest size the
   button fades and does nothing. */
.size-btn{width:44px;padding:0}
.size-btn svg{display:block}
.size-btn[aria-disabled="true"]{opacity:.35;cursor:default}
.size-btn[aria-disabled="true"]:hover{background:transparent;color:var(--ink)}
@media (max-width:52em){
  .reader-controls{order:2;margin-left:auto}
  .masthead nav{order:3;margin-left:0;flex-basis:100%}
}

/* Display type: hashtags and headings */
h1,h2,h3{text-wrap:balance}
h1,h2,.hero-title,.tag-title,.door-tag,.list-tag,.list-title,.doors-h,.strap,.more-h,.whatsnew-h{font-family:var(--display);font-style:italic;font-variant-numeric:lining-nums;word-spacing:.08em}
h1{font-weight:900;font-size:clamp(2.4rem,8vw,6rem);line-height:.92;letter-spacing:-.045em;margin:clamp(2.5rem,7vw,5.5rem) 0 .5em}
h2{font-weight:900;font-size:clamp(1.75rem,3.8vw,3rem);line-height:1;letter-spacing:-.035em;margin:2em 0 .55em}
h3{font-weight:600;font-size:1.2em;line-height:1.3;margin:1.6em 0 .4em}
.hash-heads h2::before{content:"#";content:"#" / "";color:var(--hash)}

.page-head{margin:clamp(2.5rem,7vw,6rem) 0 clamp(2rem,4vw,3.5rem)}
.page-head h1{margin:0}
.tag-title{font-size:clamp(2.8rem,11.5vw,10.5rem);line-height:.86;letter-spacing:-.06em;overflow-wrap:anywhere}
.tag-title.long{font-size:clamp(2.2rem,8vw,7.2rem)}
.deck{margin:clamp(1.1rem,2.4vw,1.8rem) 0 0;max-width:24em;font-size:clamp(1.3rem,2.5vw,2rem);line-height:1.25;text-wrap:balance}

/* Home */
.hero{margin:clamp(2.5rem,8vw,6.5rem) 0 clamp(2rem,4vw,3rem);position:relative;isolation:isolate}
/* Heartbeat line across the title (v2.7, _includes/ecg.html). --ecg is its colour:
   crimson on dark paper, white on light paper (v3.2, Carl's choice).
   z-index:-1 puts the line behind the letters (it shows between them); 1 would put it in front. */
.ecg{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;color:var(--ecg);z-index:-1}
html{--ecg:#d4143a}
:root[data-theme="light"]{--ecg:#ffffff}
body{overflow-x:clip}
.hero-title{margin:0;font-size:clamp(3.2rem,12.5vw,11.5rem);line-height:.86;letter-spacing:-.055em}
/* Phones and narrow windows (v2.9): the home-page title 30% larger. The strapline is unchanged. */
@media (max-width:52em){.hero-title{font-size:clamp(4.16rem,16.25vw,14.95rem)}}
.strap{margin:clamp(1.2rem,2.6vw,2.2rem) 0 0;font-weight:800;font-size:clamp(1.3rem,2.4vw,2rem);line-height:1.15;letter-spacing:-.02em}
.home-welcome{margin-top:clamp(2.5rem,5vw,4rem)}
.home-welcome .sign{font-style:italic}
/* "Welcome." at the start of the home page, in the strapline's type (v2.8). */
.welcome-word{font-family:var(--display);font-style:italic;font-weight:800;font-size:clamp(1.3rem,2.4vw,2rem);line-height:1;letter-spacing:-.02em;word-spacing:.08em}
/* #whatsnew on the home page (v2.8): anything posted in the past month. */
.whatsnew{margin-top:clamp(2.5rem,5vw,4rem)}
.whatsnew-h{margin:0 0 .75rem;font-weight:900;font-size:clamp(1.9rem,4.4vw,3.4rem);line-height:1;letter-spacing:-.045em}
.whatsnew .list-big{border-top-width:2px}
.whatsnew .list-big li:last-child{border-bottom-width:2px}
.whatsnew .list-title{font-size:clamp(1.25rem,2.4vw,1.8rem)}
.doors-block{margin-top:clamp(3.5rem,8vw,6.5rem)}
.doors-h{margin:0 0 1.25rem;font-weight:800;font-size:clamp(1.4rem,2.6vw,2.2rem);letter-spacing:-.03em;line-height:1.1}
.doors,.list-big{list-style:none;margin:0;padding:0;border-top:6px solid var(--ink)}
.doors li,.list-big li{border-bottom:2px solid var(--ink)}
.doors li:last-child,.list-big li:last-child{border-bottom-width:6px}
.doors a,.list-big a{display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem 2.5rem;padding:clamp(1rem,2.4vw,2rem) 0;text-decoration:none}
.door-tag{flex:1 1 30rem;min-width:0;font-weight:900;font-size:clamp(2.2rem,7vw,6rem);line-height:.95;letter-spacing:-.05em;overflow-wrap:anywhere}
.door-line,.list-line{flex:1 1 15rem;font-size:clamp(1.12rem,1.6vw,1.4rem);line-height:1.35}
.door-sub{display:block;font-style:italic;color:var(--muted)}
.doors a:hover .door-tag,.list-big a:hover .list-tag,.list-big a:hover .list-title{text-decoration:underline;text-decoration-thickness:.06em;text-underline-offset:.08em}
.door-more{display:flex;flex-wrap:wrap;gap:0 3rem;padding-top:1.5rem}
.door-more p{margin:0 0 .5rem}

/* Lists of pages in a section, and the blog */
.list-tag{flex:1 1 26rem;min-width:0;font-weight:900;font-size:clamp(1.9rem,4.4vw,3.4rem);line-height:1;letter-spacing:-.045em;overflow-wrap:anywhere}
.list-tag.long{font-size:clamp(1.6rem,3.6vw,2.8rem)}
.list-title{flex:1 1 100%;font-weight:900;font-size:clamp(1.45rem,3vw,2.3rem);line-height:1.05;letter-spacing:-.035em}
.prose .list-big{margin:1.5rem 0}
.more{margin-top:clamp(3.5rem,7vw,6rem)}
.more-h{margin:0 0 .75rem;font-weight:800;font-size:clamp(1.2rem,2vw,1.6rem);letter-spacing:-.02em;color:var(--ink)}
.more-h a{color:var(--ink);text-decoration:none}
.more-h a:hover{text-decoration:underline}
.empty{max-width:34em;margin-top:2rem}
.empty p:first-child{font-style:italic;color:var(--muted)}
.more .more-h + .list-big{margin-top:0}
.list-big + .more-h{margin-top:clamp(2.5rem,5vw,4rem)}
.distress-note{margin:0 0 1em;padding:1.1em 1.25em;border:2px solid var(--ink)}
.distress-note p:last-child{margin-bottom:0}
.back{margin-top:3rem;font-family:var(--display);font-weight:800;font-style:italic;font-size:1.3rem}
.back a{text-decoration:none}
.back a:hover{text-decoration:underline}
/* The AI note at the foot of every page (v2.3): quiet, but readable and kept in print. */
.ai-note{max-width:34em;margin:clamp(3rem,6vw,4.5rem) 0 0;font-style:italic;font-size:.92em;line-height:1.5;color:var(--muted)}
.ai-note a{color:var(--ink)}

/* Fading verses on the home page */
.verses{display:grid;max-width:34em;margin:0;padding:.2rem 0 .2rem 1.15rem;border-left:4px solid var(--rubric)}
.verse{grid-area:1/1;margin:0;font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.4;opacity:0;visibility:hidden;animation:fade 36s infinite}
.verse:nth-child(2){animation-delay:12s}
.verse:nth-child(3){animation-delay:24s}
.ref{display:block;margin-top:.45em;font-size:.68em;color:var(--muted);font-variant-numeric:lining-nums}
@keyframes fade{0%{opacity:0;visibility:hidden}6%{opacity:1;visibility:visible}28%{opacity:1;visibility:visible}34%{opacity:0;visibility:hidden}100%{opacity:0;visibility:hidden}}
@media (prefers-reduced-motion:reduce){.verses{display:block}.verse{opacity:1;visibility:visible;animation:none;margin-bottom:1em}.verse:last-child{margin-bottom:0}}

/* Small capitals: KJV, and LORD (the layout marks these automatically) */
.kjv{font-variant-caps:all-small-caps;letter-spacing:.05em}
.lord span{font-variant-caps:all-small-caps;letter-spacing:.04em}

/* Text */
blockquote{margin:1.5em 0;padding:.1em 0 .1em 1.15em;border-left:4px solid var(--rubric)}
blockquote p:last-child{margin-bottom:0}
hr{border:0;border-top:2px solid var(--ink);margin:2.5em 0}
.footnotes{font-size:.9em;color:var(--muted)}
.footnotes a{color:var(--muted)}
sup{line-height:0}
.gloss{color:var(--gloss)}

/* Blog posts */
.post-head .post-title{font-size:clamp(2.2rem,6vw,4.8rem);line-height:.95}
.post-date{color:var(--muted);font-size:.9rem;margin:.6rem 0 0;font-variant-numeric:lining-nums}
.list-big .post-date{flex:1 1 100%;margin:0}
.post-content img{display:block;max-width:100%;height:auto;margin:1.25rem 0}

/* Gospels: red marks belong to Scripture only (chapter numbers, verse numbers, the bar beside quotations) */
.gv{margin:0 0 .55em}
.vn{position:relative;top:-.6em;line-height:0;font-size:.62em;font-weight:400;color:var(--rubric);font-variant-numeric:lining-nums;margin-right:.08em}
.chap{float:left;font-size:3.3em;line-height:.8;margin:.08em .14em 0 0;color:var(--rubric);font-variant-numeric:lining-nums}
.vn.sr{position:absolute;top:auto}
.bible-note{font-size:.85em;color:var(--muted)}
.chapter-list,.book-list{list-style:none;padding:0;margin:1.25rem 0}
.chapter-list{display:flex;flex-wrap:wrap;gap:.5rem}
.chapter-list a{display:inline-block;min-width:3rem;min-height:3rem;line-height:calc(3rem - 4px);text-align:center;border:2px solid var(--ink);text-decoration:none;font-family:var(--display);font-weight:800;font-style:italic;font-size:1.1rem;font-variant-numeric:lining-nums tabular-nums}
.chapter-list a:hover{background:var(--ink);color:var(--paper)}
.book-list{border-top:6px solid var(--ink)}
.book-list li{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 1rem;padding:.9rem 0;border-bottom:2px solid var(--ink)}
.book-list li:last-child{border-bottom-width:6px}
.book-list a{font-family:var(--display);font-weight:900;font-style:italic;font-size:clamp(1.9rem,4.4vw,3.2rem);line-height:1;letter-spacing:-.045em;text-decoration:none}
.book-list a:hover{text-decoration:underline;text-decoration-thickness:.06em}
.book-list .post-date{margin:0}

/* Desktop (v2.9): the big hashtag headings 20% smaller than on narrow screens. */
@media (min-width:52.01em){
  .tag-title{font-size:clamp(2.24rem,9.2vw,8.4rem)}
  .tag-title.long{font-size:clamp(1.76rem,6.4vw,5.76rem)}
  .door-tag{font-size:clamp(1.76rem,5.6vw,4.8rem)}
  .list-tag,.whatsnew-h{font-size:clamp(1.52rem,3.52vw,2.72rem)}
  .list-tag.long{font-size:clamp(1.28rem,2.88vw,2.24rem)}
  .hash-heads h2{font-size:clamp(1.4rem,3.04vw,2.4rem)}
}
.chapter-nav{display:flex;justify-content:space-between;flex-wrap:wrap;gap:0 1rem;margin:2rem 0 1rem;font-family:var(--display);font-weight:800;font-style:italic;font-size:1.05rem;font-variant-numeric:lining-nums}
.chapter-nav.top{margin:.25rem 0 1.25rem}
.chapter-nav a{display:inline-flex;align-items:center;min-height:44px;text-decoration:none}
.chapter-nav a:hover{text-decoration:underline}

/* Important note on Confessions and catechisms (v5.0) */
.standing-note{margin:0 0 2.2em}
/* Change logs (v5.2) */
.version-line{color:var(--muted);font-size:.9rem;margin:.6rem 0 0;font-variant-numeric:lining-nums}
.version-line a{color:var(--ink)}
.page-head .version-line{margin-top:1rem}
details.changelog{margin-top:clamp(2.5rem,5vw,3.5rem)}
.changelog-h{margin:0;font-family:var(--display);font-style:italic;font-weight:800;font-size:clamp(1.2rem,2vw,1.6rem);line-height:1.1;letter-spacing:-.02em}
.changelog-list{list-style:none;margin:0;padding:0;font-size:.9em;line-height:1.5}
.changelog-list li{margin:0 0 .9em}
.changelog-v{font-weight:600;font-variant-numeric:lining-nums}
.changelog-git{font-size:.9em}
/* TPL Accordion Style (v4.5; named in v6.0): collapsible sections for long pages. Main sections: <details class="part" id="..."> with an <h2> inside its <summary>. Subsections: <details class="head"> with an <h3>. */
details[id],details [id]{scroll-margin-top:1rem}
details.part{margin:0 0 .6em}
details.part>summary{display:flex;align-items:baseline;justify-content:space-between;gap:.6em;min-height:44px;padding:.3em 0;cursor:pointer;list-style:none}
details.part>summary::-webkit-details-marker{display:none}
details.part>summary h2{margin:0;font-size:clamp(1.45rem,3.2vw,2.4rem)}
.hash-heads summary h2::before{content:none}
details.part>summary::after{content:"+";flex:0 0 1em;text-align:center;font-family:var(--display);font-weight:900;font-style:italic;font-size:clamp(1.45rem,3.2vw,2.4rem);line-height:1}
details.part[open]>summary::after{content:"\2212"}
details.part[open]{padding-bottom:1.5em}
details.part[open]>summary{margin-bottom:.5em}
@media (hover:hover){details.part>summary:hover h2{text-decoration:underline;text-decoration-thickness:.05em;text-underline-offset:.12em}}
details.head{margin:0}
details.head>summary{display:flex;align-items:baseline;justify-content:space-between;gap:.75em;min-height:44px;padding:.45em 0;cursor:pointer;list-style:none}
details.head>summary::-webkit-details-marker{display:none}
details.head>summary h3{margin:0;font-weight:400;display:flex;align-items:baseline}
.para-no{font-size:.69em;font-style:normal;font-variant-numeric:oldstyle-nums proportional-nums;letter-spacing:.02em;flex:0 0 auto;min-width:1.6em}
/* Catechism question labels ("Q. 45.") are wider than paragraph numbers: room for them, so the
   question text keeps a clear gap after the number and all the questions line up. */
.para-no.q-no{min-width:3.1em}
details.head>summary::after{content:"+";flex:0 0 1.1em;text-align:center;font-family:var(--display);font-weight:800;font-style:italic;font-size:1.25em;line-height:1}
details.head[open]>summary::after{content:"\2212"}
@media (hover:hover){details.head>summary:hover h3{text-decoration:underline;text-decoration-thickness:.06em;text-underline-offset:.18em}}
details.head[open]{padding-bottom:1.25em}
details.head[open]>summary{margin-bottom:.4em}
.accordion-controls{display:flex;flex-wrap:wrap;gap:.4rem}

/* Footer */
.site-footer{margin-top:clamp(4rem,8vw,7rem);padding-top:1.25rem;padding-bottom:2.5rem;border-top:2px solid var(--ink);font-size:.85em;color:var(--muted);font-variant-numeric:lining-nums}
.site-footer p{margin:0 0 .5em}
.site-footer a{color:var(--muted)}
.footer-links{font-family:var(--display);font-weight:800;font-style:italic;font-size:1.25rem}
.footer-links a{color:var(--ink);text-decoration:none;display:inline-flex;align-items:center;min-height:44px;margin-right:1.1rem}
.footer-links a:hover{text-decoration:underline}
.site-footer a.copyright-link{text-decoration:none}
.site-footer a.copyright-link:focus-visible{text-decoration:underline}

/* VerseClick: links and pop-ups follow the site theme, light and dark */
.vcVerseLink{color:var(--ink)!important;border-bottom:1px dotted var(--ink);text-decoration:none!important;white-space:nowrap}
.vcVerseLink:hover{border-bottom-style:solid}
.vcPopupVerseText{background-color:var(--pop-bg)!important;color:var(--pop-text)!important;font-family:var(--serif)!important;font-size:var(--pop-size)!important;line-height:1.5!important;padding:12px 16px!important}
.vcPopupHeaderText{background-color:var(--pop-head)!important;color:var(--pop-text)!important;font-family:var(--serif)!important;font-size:var(--pop-size)!important}

/* Printing: black on white, no menus or buttons */
@media print{
  :root,:root[data-theme]{--paper:#fff;--ink:#000;--muted:#333;--gloss:#888;--rubric:#000;color-scheme:light}
  body{font-size:11pt;line-height:1.45}
  .wrap{max-width:none;padding:0}
  .masthead nav,.reader-controls,.ecg,.verses,.chapter-nav,.skip,.doors-block,.more,.back,details.part>summary::after,details.head>summary::after,.accordion-controls{display:none!important}
  .hero-title,.tag-title,.tag-title.long{font-size:40pt}
  h1{font-size:28pt;margin-top:12pt}
  h2{font-size:16pt}
  a{text-decoration:none}
  .vcVerseLink{border-bottom:0}
  h1,h2,h3{break-after:avoid}
  p{orphans:3;widows:3}
}
