/* Sutras custom.css. Loads on every page of the site.
   Everything here is scoped to .rs (the reading layout, used by edition pages with layout: plain),
   so pages without a .rs wrapper are unchanged, with one exception at the end (the footer line).
   @import lines must stay first. */
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400&display=swap");
@import url("/css/reading.css");
@import url("/css/home.css");
/* The design direction: one line selects it, and it must stay the last import so it wins (decision 0005).
   Remove it for the stand-in look (EB Garamond on the personal theme); swap the file to try another direction. */
@import url("/css/direction-seeds.css");
/* previous look (direction A, decision 0005): @import url("/css/direction-a.css"); */

/* The reading system under Flowershow's sticky navbar */
.rs { --rs-sticky-top: var(--navbar-height, 4rem) }

/* Footnotes: Flowershow renders the footnote list after our closing </div>, outside .rs.
   reading.js marks it once the notes are in the margin; hide it on screen then. Before that, style it. */
@media screen { [data-rs-sidenoted], .footnotes:has([data-rs-sidenoted]) { display: none } }
.rs ~ .footnotes, .rs ~ [data-footnotes] { max-width: 34em; margin: 0 auto; padding: 2rem 20px 4rem; font-family: var(--sd-text, "EB Garamond", Garamond, Georgia, serif); font-size: 17px; line-height: 1.5 }

/* Edition header */
.rs-head .rs-attribution { margin: 0; color: var(--rs-ink2); font-size: 1em; line-height: 1.45 }
.rs[data-rs-theme="personal"] .rs-head .rs-wrap { padding-block: var(--rs-s5) 0 }
.rs-head a.rs-kicker { text-decoration: none; align-self: flex-start }
.rs-head a.rs-kicker:hover { color: var(--rs-accent) }
/* no automatic hyphenation: the measure is wide enough, and broken words read badly in quotations */
.rs-text p, .rs-inbrief { hyphens: manual; -webkit-hyphens: manual }
/* the Personal theme sets the first line after every h2 in small caps; on these pages that lands on
   link text, split names and the poem, so it is off */
.rs[data-rs-theme="personal"] .rs-body .rs-text :is(.rs-first, h2 + p, h2 + .rs-inbrief + p)::first-line { font-variant: normal; letter-spacing: 0 }
.rs-text .rs-signed { font-size: .9em; font-style: italic; color: var(--rs-muted) }

/* Verse: one <p> per stanza, lines ended with two spaces. No hyphenation. */
.rs-verse p { position: relative; hyphens: none; -webkit-hyphens: none; text-wrap: wrap; text-align: left; margin-bottom: var(--rs-s4); hanging-punctuation: none }

/* Stanza numbers: <a class="v" id="3" href="#3">3</a> at the start of each stanza.
   The link target must land clear of the navbar. */
.rs-verse a.v, .rs-passages a.v { display: block; font-size: .72em; line-height: 1.2; margin-bottom: .2em; color: var(--rs-muted); text-decoration: none; font-variant-numeric: lining-nums; scroll-margin-top: calc(var(--navbar-height, 4rem) + 1.25rem) }
.rs-verse a.v:hover, .rs-verse a.v:target, .rs-passages a.v:hover, .rs-passages a.v:target { color: var(--rs-accent) }
/* arriving on /faith-in-mind#3 focuses the number; the accent colour marks it, so no focus box */
.rs-verse a.v:target:focus-visible, .rs-passages a.v:target:focus-visible { outline: none }
@container rs (min-width: 760px) {
  .rs-verse a.v, .rs-passages a.v { position: absolute; left: -2.6em; top: .32em; margin: 0; width: 2.2em; text-align: right }
}
/* Verse lines: edition.js wraps each line of a stanza in a .rs-line span, so a line too long for a
   phone wraps with a hanging indent and does not read as a new line of the poem. */
.rs-verse .rs-line { display: block; padding-left: 1.4em; text-indent: -1.4em }

/* Prose passages: <div class="rs-passages">, a numbered paragraph starts with <a class="v" id="4.3" href="#4.3">4.3</a>;
   paragraphs after it, until the next number, belong to the same passage. Numbers sit in the left margin as in verse. */
.rs-passages p { position: relative }
.rs-passages a.v { white-space: nowrap }

/* Verse inside prose (a gatha in the Diamond Sutra): <p class="rs-gatha">, or <div class="rs-gatha"> with Markdown
   inside (blank lines round it) when the verse has a footnote; lines ended with two spaces.
   Indented, left-aligned, no hyphenation; edition.js gives its lines the same hanging indent as verse. */
.rs-text p.rs-gatha, .rs-text .rs-gatha p { margin-left: 1.5em; text-align: left; hyphens: none; -webkit-hyphens: none; text-wrap: wrap }
.rs-gatha .rs-line { display: block; padding-left: 1.4em; text-indent: -1.4em }

/* Chapter headings as passage targets in prose: <h3 id="17"><a href="#17">XVII</a></h3>.
   The heading reads as a heading; hover or arriving on /…#17 shows it is a link. */
.rs-text :is(h2, h3)[id] > a[href^="#"]:only-child { color: inherit; text-decoration: none }
.rs-text :is(h2, h3)[id] > a[href^="#"]:only-child:hover, .rs-text :is(h2, h3):target > a[href^="#"]:only-child { color: var(--rs-accent) }
.rs-text :is(h2, h3):target > a:focus-visible { outline: none }

/* Editors' notes beside the translator's: reading.js marks a note .rs-sn-editorial when its footnote label starts
   with "e" ([^e1]) or its text starts "Editors’ note". Ours get a quieter number and an "ed." mark. */
.rs-sn-editorial .rs-sn-ref, .rs-sn-editorial .rs-sn-n { color: var(--rs-muted) }
.rs-sn-editorial .rs-sn-note { border-left-color: var(--rs-rule, #ccc) }
.rs-sn-editorial .rs-sn-n::after { content: " ed."; font-style: italic; font-weight: 400 }

.rs-text h2, .rs-text h3 { scroll-margin-top: calc(var(--navbar-height, 4rem) + 1.25rem) }

/* Phones: the note number is the tap target. Upstream gives it line-height 0, so its box has no
   height; give it a real one, larger than the glyph, without moving the line. */
@container rs (max-width: 759.98px) {
  .rs-sn-ref { line-height: 1; padding: .9em .7em; margin: -.9em -.45em -.9em -.5em; position: relative }
}

/* Original-language text (Mumonkan Chinese; later Pāli, Tao Te Ching): <p class="orig" lang="zh">.
   Smaller and quieter than the translation, marked off by a hairline, so it reads as the original. */
.rs :lang(zh) { font-family: "Noto Serif TC", "Songti TC", "PMingLiU", "Noto Serif CJK TC", serif; font-variant-numeric: normal }
.rs-text p.orig { font-size: .82em; line-height: 1.75; color: var(--rs-muted); text-align: left; hyphens: none; -webkit-hyphens: none;
  border-left: 1px solid var(--rs-rule); padding-left: .9em; margin-top: calc(-1 * var(--rs-s1)) }
.rs-verse p.orig { margin-bottom: var(--rs-s4) }

/* Koan cases (Mumonkan): h3.koan-title with span.koan-num and span.koan-title-zh; then div.koan-case,
   div.koan-comment, div.koan-verse. More space between cases than between the parts of a case. */
.rs-text h3.koan-title { margin-top: var(--rs-s6) }
.rs-text h3.koan-title .koan-num { display: block; font-family: var(--rs-ui); font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rs-accent); margin-bottom: var(--rs-s1); font-variant-numeric: lining-nums }
.rs-text h3.koan-title .koan-title-zh { font-size: .62em; color: var(--rs-muted); margin-left: .35em; white-space: nowrap }
.rs-text .koan-comment, .rs-text .koan-verse { margin-top: var(--rs-s3) }
.rs-text .koan-comment { font-size: .94em; color: var(--rs-ink2) }
.rs-text p.koan-label { font-family: var(--rs-text); font-variant: all-small-caps; text-transform: none; letter-spacing: .06em;
  font-size: 1.05em; font-weight: 500; color: var(--rs-muted); margin: 0 0 var(--rs-s1) }
.rs-text p.koan-label :lang(zh) { font-variant: normal; font-size: .8em }
/* the contents of the cases: a quiet line that opens a compact list, two columns when there is room */
.rs-text details.koan-contents { margin: 0 0 var(--rs-s4); font-family: var(--rs-text) }
.rs-text details.koan-contents summary { cursor: pointer; color: var(--rs-muted); font-style: italic }
.rs-text details.koan-contents summary:hover { color: var(--rs-accent) }
.rs-text ol.koan-toc { margin: var(--rs-s2) 0 0; padding-left: 2em; font-size: .9em; line-height: 1.45; list-style: decimal outside }
.rs-text ol.koan-toc li::marker { color: var(--rs-muted); font-variant-numeric: lining-nums; font-size: .9em }
.rs-text ol.koan-toc li { margin: 0 0 .15em; break-inside: avoid }
.rs-text ol.koan-toc a { color: var(--rs-ink2); text-decoration: none }
.rs-text ol.koan-toc a:hover { color: var(--rs-accent) }
@container rs (min-width: 600px) { .rs-text ol.koan-toc { columns: 2; column-gap: 2.5em } }

/* Site-wide, not .rs: the navbar, footer and page take the reading page's paper and ink (personal theme in
   css/reading.css), so there are no white bands; a hairline rule marks them off. Light only, as the reading page is. */
:root { --sutras-paper: var(--sd-bg, #f8f7f4); --sutras-ink: var(--sd-ink, #252421); --sutras-rule: var(--sd-rule, #dedbd3) }
body, .site-navbar, .site-footer { background-color: var(--sutras-paper) }
.site-navbar { border-bottom: 1px solid var(--sutras-rule) }
.site-footer { border-top: 1px solid var(--sutras-rule) !important; color: var(--sutras-ink) }
/* On a phone the footer lines up with the page's 20px gutter (its default is 32px). */
@media (max-width: 640px) { .site-footer { padding-left: 1.25rem; padding-right: 1.25rem } }

/* Site-wide, not .rs: Flowershow's default footer says "(c) year Sutras. All rights reserved.", which is
   untrue here (texts belong to their rights holders, our additions are CC BY). Hidden until the Site
   workstream writes a real footer. */
.site-footer-copyright { display: none }
