/* YouDevotion: "Printed Bible" design system. See DESIGN.md.
   Warm, steady, unhurried. One book face (EB Garamond), set like a printed Bible.
   Sizes are for senior readers: rem = 21px on phones and 22px on wider screens; nothing is set below 0.86rem (18px+).
   The palette follows the reader's hour: data-hour="morning|evening" is set on <html> before first paint.  */

:root {
  --paper:#FAF7F0; --paper-2:#F2ECDF; --ink:#26201A; --soft:#5E5548; --rubric:#9B2823; --gilt:#7E5F2E; --rule:#D6C8AF;
  --face:"EB Garamond", "Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --measure:34rem;
  color-scheme:light;
  font-size:21px;
}
@media (min-width:700px) { :root { font-size:22px; } }
:root[data-hour="evening"] {
  --paper:#1E1914; --paper-2:#28211A; --ink:#EEE4D1; --soft:#BBAD95; --rubric:#E8A468; --gilt:#DDBB7E; --rule:#46392C;
  color-scheme:dark;
}

*, *::before, *::after { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:var(--face); font-size:1rem; line-height:1.6;
  font-variant-numeric:oldstyle-nums; transition:background-color .6s ease, color .6s ease;
  padding-left:max(18px, env(safe-area-inset-left)); padding-right:max(18px, env(safe-area-inset-right)); }
img { max-width:100%; }
a { color:inherit; text-decoration-color:var(--rule); text-underline-offset:.18em; text-decoration-thickness:1px; }
a:hover { color:var(--rubric); text-decoration-color:currentColor; }
:focus-visible { outline:3px solid var(--rubric); outline-offset:3px; }
/* small caps read smaller than their size, so they are set a little larger */
.sc { font-variant-caps:all-small-caps; letter-spacing:.06em; font-size:1.15em; }
[hidden] { display:none !important; }

/* ---------- running head ---------- */
.head { max-width:44rem; margin:0 auto; padding:.8rem 0 .45rem; display:flex; justify-content:space-between; align-items:center; gap:1rem;
  border-bottom:3px double var(--rule); }
.head .mark { font-weight:600; text-decoration:none; display:flex; align-items:center; gap:.5rem; }
.head .mark img { width:28px; height:28px; border-radius:6px; }
.head nav { display:flex; gap:1.1rem; align-items:center; color:var(--soft); }
.head nav a { text-decoration:none; white-space:nowrap; }
.head .mark { white-space:nowrap; }
.head nav a.get { color:var(--rubric); }
.hourbtn { border:0; background:none; color:var(--soft); cursor:pointer; padding:.3rem; display:grid; place-items:center; border-radius:50%; min-width:44px; min-height:44px; }
.hourbtn:hover { color:var(--rubric); }
.hourbtn svg { width:24px; height:24px; }
:root[data-hour="morning"] .hourbtn .moon, :root[data-hour="evening"] .hourbtn .sun { display:none; }
@media (max-width:1000px) { .head nav .x { display:none; } }
@media (max-width:430px) { .head .mark .name { display:none; } }

/* ---------- one reading column ---------- */
.page { max-width:var(--measure); margin:0 auto; }

.opening { display:grid; grid-template-columns:auto 1fr; gap:1.4rem; align-items:center; padding:1.8rem 0 .6rem; }
.opening.solo { grid-template-columns:1fr; text-align:center; }
@media (max-width:560px) { .opening { grid-template-columns:1fr; justify-items:center; text-align:center; gap:.9rem; } }
.window { width:124px; height:164px; border-radius:62px 62px 5px 5px; overflow:hidden; background:var(--paper-2);
  border:3px solid var(--paper); outline:1px solid var(--gilt); box-shadow:0 6px 20px rgba(0,0,0,.16); flex:none; }
.window img { width:100%; height:100%; object-fit:cover; display:block; }
:root[data-hour="evening"] .window img { filter:brightness(.88); }
.appicon { width:100px; height:100px; border-radius:22px; box-shadow:0 6px 18px rgba(0,0,0,.14); }
.opening .kicker { color:var(--rubric); }
.opening h1 { font-weight:500; font-size:clamp(1.85rem, 7vw, 2.4rem); line-height:1.08; margin:.1rem 0 .2rem; text-wrap:balance; }
.opening h1 a { text-decoration:none; }
.opening .by { color:var(--soft); font-style:italic; }
.jump { color:var(--soft); font-style:italic; margin:.7rem 0 0; }
.jump a { color:var(--rubric); }

.rubric { color:var(--rubric); font-weight:500; font-size:1.2rem; line-height:1.3; margin:1.8rem 0 .6rem; display:flex; align-items:baseline; gap:.5rem; text-wrap:balance; }
.rubric::before { content:"\2767"; flex:none; }
.verse { font-style:italic; margin:0 0 1.1rem; padding-left:1.2rem; text-indent:-1.2rem; }
.verse .ref { font-style:normal; color:var(--gilt); white-space:nowrap; font-variant-caps:all-small-caps; letter-spacing:.05em; font-size:1.15em; }
.text > p, .text > ol, .text > ul { margin:0; }
.text > p { text-align:left; hyphens:auto; -webkit-hyphens:auto; }
@media (min-width:640px) { .text > p { text-align:justify; } }
.text > p + p { text-indent:1.3em; }
.text > p.first::first-letter, .text > .tv > p.first::first-letter { float:left; font-size:3.4em; line-height:.8; padding:.06em .09em 0 0; color:var(--rubric); font-weight:500; }
.text > p.v, .text > p.v + p { text-indent:0; }
.text > p.v { font-style:italic; text-align:left; margin:1rem 0 1rem 1.2rem; line-height:1.5; }
.text > p.refs { text-indent:0; font-style:italic; color:var(--gilt); margin-top:.7rem; text-align:left; }
.text > p.refs + p { text-indent:0; }
.text ol, .text ul { padding-left:1.3rem; margin:.6rem 0 !important; }
.text li { margin:.25rem 0; }

.fleuron { text-align:center; color:var(--rubric); font-size:1.4rem; letter-spacing:.8em; padding-left:.8em; margin:2rem 0 .2rem; }
.sharebtn { display:block; margin:2.4rem auto 0; font:inherit; font-variant-caps:all-small-caps; letter-spacing:.06em; font-size:1.15rem;
  color:var(--soft); background:none; border:1px solid var(--rule); padding:.35rem 1.1rem; cursor:pointer; min-height:44px; }
.sharebtn:hover { color:var(--rubric); border-color:var(--rubric); }

/* closing note: the app, like a publisher's note at the end of a book */
.colophon { margin:2.8rem 0 .5rem; padding-top:1.2rem; border-top:3px double var(--rule); display:grid; grid-template-columns:auto 1fr; gap:.2rem 1rem; align-items:start; }
.colophon img.icon { width:60px; height:60px; border-radius:13px; grid-row:span 3; margin-top:.2rem; }
.colophon .h { color:var(--rubric); }
.colophon p { margin:0; }
.colophon .get { margin-top:.7rem; display:flex; gap:.8rem; flex-wrap:wrap; align-items:center; }
.colophon .get img { height:52px; width:auto; display:block; }
.colophon .qr { grid-column:1 / -1; margin-top:.9rem; }
.qr { display:none; align-items:center; gap:.9rem; color:var(--soft); font-style:italic; }
[data-platform="desktop"] .qr { display:flex; }
.qr [data-qr] { background:#fff; padding:6px; width:100px; height:100px; flex:none; border:1px solid var(--rule); }
.qr [data-qr] img, .qr [data-qr] canvas { width:86px !important; height:86px !important; }
[data-platform="ios"] .only-android, [data-platform="android"] .only-ios { display:none; }

.turn { margin:2.2rem 0 1rem; display:flex; justify-content:space-between; gap:1rem; border-top:1px solid var(--rule); padding-top:.9rem; }
.turn a { text-decoration:none; color:var(--soft); padding:.3rem 0; }
.turn a:hover { color:var(--rubric); }
.turn a[rel=next] { margin-left:auto; text-align:right; }
.turn { flex-wrap:wrap; }
.turn .mid { order:3; flex-basis:100%; text-align:center; }
.credit { color:var(--soft); font-style:italic; margin:.8rem 0 0; font-size:.9rem; }

footer.site { max-width:44rem; margin:3rem auto 0; padding:1rem 0 3rem; border-top:1px solid var(--rule); color:var(--soft); font-size:.9rem;
  display:flex; flex-wrap:wrap; gap:.4rem 1.3rem; justify-content:center; }
footer.site a { text-decoration:none; }

/* ---------- Today's Word ---------- */
.word-verse { text-align:center; margin:1.2rem 0 .5rem; padding:1.4rem 0 1.3rem; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.word-verse .ref { color:var(--rubric); }
.word-verse blockquote { margin:.6rem auto 1rem; max-width:30rem; font-size:1.4em; line-height:1.35; font-style:italic; min-height:3em; }
/* Bible translation buttons (DESIGN.md): one choice for the whole site. Each passage is in the page in all four
   translations; html[data-tr] (set before first paint) shows one. KJV when nothing is chosen. */
.trs { display:flex; width:max-content; max-width:100%; margin:-.6rem 1.2rem 1rem auto; gap:.1rem; flex-wrap:wrap; }
.word-verse .trs { display:inline-flex; margin:0; }
.home .word .trs { margin:.3rem -.4rem .2rem auto; }
.trs button { font:inherit; font-variant-caps:all-small-caps; letter-spacing:.06em; font-size:.8rem; color:var(--soft);
  background:none; border:0; padding:.1rem .4rem; cursor:pointer; min-height:32px; min-width:40px; }
.trs button:hover { color:var(--rubric); }
html:not([data-tr]) .trs [data-tr=kjv], html[data-tr=kjv] .trs [data-tr=kjv], html[data-tr=bsb] .trs [data-tr=bsb],
html[data-tr=web] .trs [data-tr=web], html[data-tr=net] .trs [data-tr=net] { color:var(--rubric);
  text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:.3em; }
html:not(.js) .trs,
html:not([data-tr=bsb]) .tv-bsb, html:not([data-tr=web]) .tv-web, html:not([data-tr=net]) .tv-net,
html[data-tr=bsb] .tv-kjv, html[data-tr=web] .tv-kjv, html[data-tr=net] .tv-kjv { display:none; }
.saying { text-align:center; margin:2rem auto; max-width:28rem; }
.saying .lbl { color:var(--rubric); }
.saying p { font-style:italic; font-size:1.25em; line-height:1.4; margin:.3rem 0; }
.saying .by { color:var(--soft); }

/* ---------- landing pages (plain and practical) ---------- */
.lede { color:var(--soft); margin:.4rem 0 0; }
.today { margin:1.6rem 0 0; }
.today .label { color:var(--rubric); display:flex; justify-content:space-between; flex-wrap:wrap; gap:.2rem 1rem; border-bottom:1px solid var(--rule); padding-bottom:.35rem; }
.today .label span { color:var(--soft); }
.loading { color:var(--soft); font-style:italic; padding:1.2rem 0; }
.more { margin:1rem 0 0; }
.more a { color:var(--rubric); }
.offer { margin:2.4rem 0; padding:1.4rem 0; border-top:3px double var(--rule); border-bottom:3px double var(--rule); display:grid; grid-template-columns:auto 1fr; gap:.4rem 1.3rem; align-items:center; }
.offer img.icon { width:84px; height:84px; border-radius:19px; grid-row:span 2; box-shadow:0 4px 14px rgba(0,0,0,.12); }
.offer h2 { font-weight:500; font-size:1.35rem; margin:0; line-height:1.2; }
.offer p { margin:0; color:var(--soft); }
.offer .stores { grid-column:1 / -1; display:flex; gap:.8rem; flex-wrap:wrap; align-items:center; margin-top:.6rem; }
.offer .stores img { height:52px; width:auto; display:block; }
.offer .stores small { color:var(--soft); font-size:1em; }
.offer .qr { grid-column:1 / -1; margin-top:.5rem; }
@media (max-width:540px) { .offer { grid-template-columns:1fr; text-align:center; justify-items:center; } .offer img.icon { grid-row:auto; } .offer .stores { justify-content:center; } }
.section-h { font-weight:500; font-size:1.4rem; margin:2.6rem 0 .5rem; }

/* list of devotionals: like a table of contents */
.toc { list-style:none; margin:0; padding:0; }
.toc li { border-bottom:1px solid var(--rule); }
.toc a { display:grid; grid-template-columns:auto 1fr; gap:1rem; align-items:center; padding:.8rem 0; text-decoration:none; }
.toc img { width:56px; height:56px; border-radius:12px; }
.toc b { font-weight:500; display:block; line-height:1.25; font-size:1.08rem; }
.toc.plain a { grid-template-columns:1fr auto; }
.toc .go { color:var(--rubric); white-space:nowrap; }
.toc small { color:var(--soft); font-style:italic; font-size:.92rem; }
.also { margin:1.2rem 0 0; color:var(--soft); }
.also h3 { font-weight:500; font-size:1.05rem; color:var(--ink); margin:0 0 .4rem; }
.also ul { list-style:none; margin:0; padding:0; columns:2 13rem; column-gap:2rem; }
.also li { break-inside:avoid; padding:.35rem 0; border-bottom:1px solid var(--rule); }
.also a { text-decoration:none; color:var(--ink); }
.also a:hover { color:var(--rubric); }

/* ---------- home: the day's photograph as a window ---------- */
.home-window { position:relative; height:min(42vh, 340px); margin:0 calc(-1 * max(18px, env(safe-area-inset-left))); overflow:hidden; background:var(--paper-2); }
.home-window img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  -webkit-mask-image:linear-gradient(180deg, #000 30%, transparent 96%); mask-image:linear-gradient(180deg, #000 30%, transparent 96%); }
:root[data-hour="evening"] .home-window img { filter:brightness(.8) saturate(.9); }
.home { max-width:var(--measure); margin:-2.6rem auto 0; position:relative; }
.home .hello { color:var(--rubric); }
.home h1 { font-weight:500; font-size:clamp(1.9rem, 7vw, 2.6rem); line-height:1.08; margin:.25rem 0 .2rem; text-wrap:balance; }
.home .word { margin:1.6rem 0 0; padding:1.2rem 0; border-top:3px double var(--rule); border-bottom:1px solid var(--rule); }
.home .word a { text-decoration:none; display:block; }
.home .word .lbl { color:var(--rubric); }
.home .word .v { font-style:italic; font-size:1.2em; line-height:1.4; margin:.35rem 0; }
.home .word .r { color:var(--soft); }
.home .word .q { margin-top:1.1rem; }
.resume { margin:1.4rem 0 0; padding:.9rem 1.1rem; background:var(--paper-2); }
.resume a { color:var(--rubric); }

/* ---------- app page ---------- */
.apphero { padding:1.8rem 0 .5rem; }
.apphero .icon { width:96px; height:96px; border-radius:21px; box-shadow:0 6px 18px rgba(0,0,0,.14); }
.apphero h1 { font-weight:500; font-size:clamp(1.85rem, 6vw, 2.4rem); line-height:1.1; margin:.8rem 0 .3rem; }
.apphero .shot { margin-top:1.4rem; }
.feat { padding-left:0; list-style:none; margin:1rem 0 1.4rem; }
.feat li { padding:.25rem 0 .25rem 1.4rem; text-indent:-1.4rem; }
.feat li::before { content:"\2767\00a0\00a0"; color:var(--rubric); }

@media (prefers-reduced-motion: reduce) { body { transition:none; } }
@media print { .head nav, .colophon, .offer, footer.site, .hourbtn, .sharebtn { display:none; } body { background:#fff; color:#000; } }
.text > p.v .by { font-style:normal; color:var(--soft); }
.text > p.v + p.v { margin-top:-.2rem; }

/* Verses and quotes: an epigraph, the credit on its own line after a dash (DESIGN.md) */
blockquote.epi { margin:0 0 1.3rem; padding:0 1.2rem; }
blockquote.epi p { font-style:italic; margin:0; }
blockquote.epi footer { text-align:right; color:var(--soft); margin-top:.25rem; font-style:normal; }
.word-verse .credit-line { color:var(--soft); margin:-.4rem 0 1rem; }
.home .word .r { text-align:right; }
/* inside italic text, emphasis (e.g. KJV supplied words) turns upright, as printers do */
.word-verse blockquote i, .word-verse blockquote em, blockquote.epi p i, blockquote.epi p em, .home .word .v i { font-style:normal; }
