/* Base */
:root { --radius: 4px; color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: an almanac. Masthead between double rules, centered entries, hairline columns, one rust accent. */
:root {
  --paper: #e4d6b8; --paper-inset: #efe4cc; --ink: #2a2117; --muted: #5a4a35;
  --rust: #6e2811; --rule: #a99470; --leader: #8c7a5a;
  --serif: "Old Standard TT", "Baskerville", "Georgia", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1f1a14; --paper-inset: #2a231b; --ink: #eadfc8; --muted: #c4b49a;
    --rust: #e39c76; --rule: #6b5a44; --leader: #7d6a51; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1f1a14; --paper-inset: #2a231b; --ink: #eadfc8; --muted: #c4b49a;
  --rust: #e39c76; --rule: #6b5a44; --leader: #7d6a51; color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 calc(48px + 72px);
}
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a { transition: color 0.15s, background-color 0.15s, text-decoration-color 0.15s; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.wrap { max-width: 960px; margin: 0 auto; }
.caps { font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* site header */
.topnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; padding-top: 10px; }
.topnav a { color: var(--ink); text-decoration: none; padding: 10px 8px; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.topnav a[aria-current="page"] { color: var(--rust); text-decoration: underline; }
.topnav a:hover { color: var(--rust); text-decoration: underline; text-decoration-thickness: 2px; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-left: 6px;
  font: inherit; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 6px 10px; min-height: 44px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .to-light { display: none; }
/* the half-filled icon turns over when the theme changes */
.theme-toggle svg { transition: transform 0.5s ease-in-out; }
:root[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle svg { transform: rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle svg { transition: none; }
}
:root[data-theme="dark"] .theme-toggle .to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .to-dark { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .to-light { display: inline; }
}
.masthead { text-align: center; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 10px 0 8px; margin-top: 4px; }
.masthead .name:hover { color: var(--rust); }
.masthead .name { color: var(--ink); text-decoration: none; font-weight: 700; font-size: clamp(24px, 5vw, 34px); letter-spacing: 0.08em; text-transform: uppercase; }
.masthead p { margin: 2px 0 0; font-style: italic; font-size: 15px; color: var(--muted); }
.home .masthead { padding: 18px 0 14px; }
.home .masthead .name { font-size: clamp(40px, 9vw, 76px); letter-spacing: 0.05em; line-height: 1.05; }
.home .masthead p { font-size: 18px; margin-top: 6px; }

main { padding-top: 36px; display: flex; flex-direction: column; gap: 40px; }
.eyebrow { margin: 0 0 10px; text-align: center; color: var(--rust); font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; }
h1 { margin: 0; text-align: center; font-weight: 700; font-size: clamp(34px, 6vw, 56px); line-height: 1.12; text-wrap: balance; }
h1 .series { display: block; font-size: clamp(14px, 2.4vw, 17px); font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
h1 em { font-weight: 400; color: var(--rust); }
.sub { margin: 14px auto 0; max-width: 34em; text-align: center; font-style: italic; font-size: 20px; line-height: 1.5; text-wrap: balance; }
.lead { margin: 0 auto; max-width: 38em; }
.lead p { margin: 0 0 14px; }
.forecast { margin: 18px auto 0; max-width: 32em; text-align: center; font-style: italic; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 4px; }
h2.sect { margin: 0 0 4px; text-align: center; font-weight: 700; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; }
.sectsub { margin: 0 0 16px; text-align: center; font-style: italic; color: var(--muted); }
.prose { max-width: 38em; margin: 0 auto; }
.prose p { margin: 0 0 14px; }
.prose h2 { margin: 28px 0 10px; font-size: 22px; font-weight: 700; text-align: left; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* four tired voices */
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.card { padding: 16px 18px 18px; border-bottom: 1px solid var(--rule); min-width: 0; }
.card:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--rule); }
.card:nth-child(even) { padding-right: 0; }
.card h3 { margin: 0 0 6px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--rust); text-decoration: underline; text-decoration-thickness: 2px; }
.card h3 small { font-size: 15px; letter-spacing: 0; text-transform: none; font-style: italic; font-weight: 400; color: var(--muted); }
.card p { margin: 0; }
@media (max-width: 680px) {
  .grid4 { grid-template-columns: 1fr; }
  .card:nth-child(odd), .card:nth-child(even) { padding-left: 0; padding-right: 0; border-right: 0; }
}

/* the With box */
.with { background: var(--paper-inset); border: 3px double var(--ink); padding: clamp(18px, 4vw, 32px); display: flex; flex-direction: column; gap: 16px; }
.with > .caps { color: var(--rust); text-align: center; }
.with h3 { margin: 0; text-align: center; font-weight: 400; font-style: italic; font-size: clamp(25px, 4.2vw, 32px); line-height: 1.25; text-wrap: balance; }
.with .resp { margin: 0 auto; max-width: 38em; }
.shepherd { margin: 0 auto; max-width: 34em; text-align: center; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0; }
.shepherd .caps { display: block; color: var(--rust); font-size: 13px; margin-bottom: 2px; }
.with-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.with-cols > div { padding: 4px 16px 0; border-left: 1px solid var(--rule); min-width: 0; }
.with-cols > div:first-child { border-left: 0; padding-left: 0; }
.with-cols .caps { font-size: 13px; color: var(--rust); }
.with-cols p { margin: 6px 0 0; }
.prayer { font-style: italic; font-size: 20px; line-height: 1.4; }
.refs { display: flex; flex-wrap: wrap; gap: 2px 14px; }
a.ref { white-space: nowrap; }
@media (max-width: 760px) {
  .with-cols { grid-template-columns: 1fr; }
  .with-cols > div { border-left: 0; padding: 12px 0; border-top: 1px solid var(--rule); }
  .with-cols > div:first-child { border-top: 0; padding-top: 0; }
}

/* lists */
.dotlist { list-style: none; margin: 0 auto; padding: 0; max-width: 40em; border-top: 1px solid var(--ink); }
.dotlist li { padding: 12px 0; border-bottom: 1px dotted var(--leader); }
.turn { border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 30px 0; text-align: center; }
.turn p { margin: 0 auto; max-width: 22em; font-style: italic; font-size: clamp(24px, 4vw, 33px); line-height: 1.3; text-wrap: balance; }
.frames { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.frames li { padding: 14px 16px 16px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); min-width: 0; }
.frames li:nth-child(3n) { border-right: 0; }
.frames b { display: block; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.frames .num { color: var(--rust); font-size: 22px; display: block; }
@media (max-width: 760px) { .frames { grid-template-columns: 1fr; } .frames li { border-right: 0; padding-inline: 0; } }
.portraits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.portraits div { padding: 14px; border-left: 1px solid var(--rule); min-width: 0; }
.portraits div:first-child { border-left: 0; padding-left: 0; }
.portraits b { display: block; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.portraits i { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
@media (max-width: 760px) {
  .portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portraits div { padding: 12px; border-left: 0; border-top: 1px solid var(--rule); }
  .portraits div:nth-child(-n+2) { border-top: 0; }
  .portraits div:nth-child(even) { border-left: 1px solid var(--rule); }
  .portraits div:nth-child(odd) { padding-left: 0; }
}
@media (max-width: 440px) {
  .portraits { grid-template-columns: 1fr; }
  .portraits div, .portraits div:nth-child(even) { border-left: 0; padding-inline: 0; }
  .portraits div:nth-child(2) { border-top: 1px solid var(--rule); }
}
.truth { margin: 0 auto; max-width: 36em; text-align: center; }
.truth .caps { display: block; color: var(--rust); font-size: 13px; }
.road { margin: 0 auto; max-width: 36em; background: var(--paper-inset); border: 1px solid var(--rule); padding: 18px 22px; text-align: center; }
.road .caps { display: block; color: var(--rust); font-size: 13px; margin-bottom: 4px; }
.road p { margin: 0; }

/* contents pages */
.toc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.toc.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toc section { min-width: 0; }
.toc h3 { margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.toc h3 + .note { margin: 6px 0 4px; font-style: italic; font-size: 15px; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--leader); }
.toc li small { color: var(--muted); font-style: italic; font-size: 15px; text-align: right; }
@media (max-width: 860px) { .toc, .toc.two { grid-template-columns: 1fr; } }
.legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.legend a { display: block; padding: 14px 14px 16px; border-left: 1px solid var(--rule); min-width: 0; color: var(--ink); text-decoration: none; }
.legend a:first-child { border-left: 0; }
.legend a:hover { background: var(--paper-inset); color: var(--ink); }
.legend a:hover b { color: var(--rust); text-decoration: underline; }
.legend b { display: block; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }
.legend i { display: block; font-size: 15px; color: var(--muted); margin: 2px 0 6px; line-height: 1.35; }
.legend span { display: block; font-size: 15px; line-height: 1.45; }
.legend .with-pos b { color: var(--rust); }
@media (max-width: 760px) {
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend a { border-left: 0; border-top: 1px solid var(--rule); }
  .legend a:nth-child(-n+2) { border-top: 0; }
  .legend a:nth-child(even) { border-left: 1px solid var(--rule); }
  .legend .with-pos { grid-column: 1 / -1; }
}
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); }
.ways a { display: block; padding: 18px; border-left: 1px solid var(--rule); color: var(--ink); text-decoration: none; text-align: center; min-width: 0; }
.ways a:first-child { border-left: 0; }
.ways b { display: block; font-size: 22px; }
.ways span { display: block; font-style: italic; color: var(--muted); }
.ways a:hover { background: var(--paper-inset); color: var(--ink); }
.ways a:hover b { color: var(--rust); text-decoration: underline; }
@media (max-width: 700px) { .ways { grid-template-columns: 1fr; } .ways a { border-left: 0; border-top: 1px solid var(--rule); } .ways a:first-child { border-top: 0; } }
.nowbox { border: 3px double var(--ink); background: var(--paper-inset); padding: 20px 22px; text-align: center; }
.nowbox .caps { color: var(--rust); display: block; }
.nowbox .now { display: block; font-size: clamp(28px, 5vw, 40px); font-weight: 700; line-height: 1.15; margin: 4px 0; }
.nowbox p { margin: 6px auto 0; max-width: 34em; }
.motto { margin: 0 auto; max-width: 30em; text-align: center; font-style: italic; font-size: 20px; }
.motto span { display: block; font-style: normal; font-size: 15px; margin-top: 4px; }

/* tables */
.tablewrap { overflow-x: auto; }
table.alm { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.alm th { text-align: left; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding: 8px 10px 6px 0; }
table.alm td { padding: 9px 10px 9px 0; border-bottom: 1px dotted var(--leader); vertical-align: top; }
table.alm tr.is-now td { background: var(--paper-inset); }
table.alm tr.is-now td:first-child { padding-left: 8px; }
.book-h { margin: 24px 0 6px; font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.sidx { list-style: none; margin: 0; padding: 0; }
.sidx li { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 4px 14px; padding: 6px 0; border-bottom: 1px dotted var(--leader); }
@media (max-width: 520px) { .sidx li { grid-template-columns: 1fr; } }

/* pager and keep walking */
.keep { max-width: 40em; margin: 0 auto; width: 100%; }
.keep ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.keep li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--leader); }
.keep small { color: var(--muted); font-style: italic; text-align: right; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 3px double var(--ink); padding-top: 14px; }
.pager a { display: inline-block; padding: 6px 0; min-height: 44px; }
.pager .next { margin-left: auto; text-align: right; }

/* quiz */
.quiz { max-width: 40em; margin: 0 auto; width: 100%; }
.quiz fieldset { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: 16px 0; }
.quiz legend { float: left; width: 100%; font-weight: 700; padding: 0; margin-bottom: 6px; }
.quiz legend + label { clear: both; }
.quiz label { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.quiz input[type="radio"] { accent-color: var(--rust); width: 18px; height: 18px; margin-top: 5px; flex: 0 0 auto; }
.btn { font: inherit; background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius); padding: 12px 24px; min-height: 44px; cursor: pointer; }
.btn:hover { background: var(--rust); }
.result { border: 3px double var(--ink); background: var(--paper-inset); padding: 20px; text-align: center; margin-top: 20px; }
.result h2 { margin: 4px 0 8px; font-size: clamp(24px, 4vw, 32px); }
.formnote { color: var(--rust); font-style: italic; margin: 10px 0 0; }

/* footer and Bible bar */
footer.site { border-top: 3px double var(--ink); margin-top: 56px; padding-top: 16px; text-align: center; font-size: 16px; color: var(--muted); }
footer.site p { margin: 0 auto 8px; max-width: 42em; }
footer.site .ornament { color: var(--rust); }
footer.site nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin-bottom: 8px; }
footer.site nav a { padding: 8px; }
.disclosure { font-size: 14px; font-style: italic; }
.biblebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--paper-inset); border-top: 3px double var(--ink);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.biblebar-in { max-width: 960px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; font-size: 16px; }
.biblebar label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.biblebar select { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); padding: 8px 10px; min-height: 44px; max-width: 100%; }
.biblebar small { font-style: italic; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) {
  body { padding-bottom: calc(48px + 120px); }
  .biblebar small { display: none; }
  .biblebar select { flex: 1 1 200px; }
}

/* feedback panel: opens upward out of the sticky bar */
.fb-open { font: inherit; font-size: 16px; font-style: italic; color: var(--rust); background: none; border: 0; padding: 8px 4px; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.fb-open:hover { text-decoration-thickness: 2px; }
.fb-open[aria-expanded="true"] { font-weight: 700; }
.bar-sep { width: 1px; height: 28px; background: var(--rule); }
.fb-panel { max-width: 960px; margin: 0 auto; max-height: min(72vh, 560px); overflow-y: auto; padding: 6px 0 14px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.fb-form { display: flex; flex-direction: column; gap: 6px; max-width: 40em; margin: 0 auto; }
.fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fb-head h2 { margin: 4px 0 8px; font-size: clamp(19px, 3vw, 22px); font-weight: 400; font-style: italic; line-height: 1.35; text-wrap: balance; }
.fb-close { font: inherit; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 6px 10px; min-height: 44px; cursor: pointer; flex: 0 0 auto; }
.fb-form label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.fb-form label .muted { letter-spacing: 0; text-transform: none; font-style: italic; font-size: 14px; }
.fb-form textarea, .fb-form input[type="text"], .fb-form input[type="email"] {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--radius); padding: 10px 12px; width: 100%;
}
.fb-form textarea { min-height: 110px; resize: vertical; }
.fb-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 4px; }
.fb-row > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.fb-status { margin: 0; font-style: italic; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) {
  .fb-more, .bar-sep { display: none; }
  .fb-row { grid-template-columns: 1fr; }
  .biblebar label[for="bible-version"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.emblem { display: block; margin: 0 auto 12px; width: 56px; height: 56px; color: var(--ink); }
.emblem * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.emblem .acc { stroke: var(--rust); }
.emblem .fill { fill: currentColor; stroke: none; }
.emblem .accfill { fill: var(--rust); stroke: none; }
.hero { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; color: var(--ink); }
.hero * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero .acc { stroke: var(--rust); }
.hero .fill { fill: currentColor; stroke: none; }
.hero .accfill { fill: var(--rust); stroke: none; }
.hero .faint { stroke: var(--rule); }
.hero .sh * { vector-effect: non-scaling-stroke; }
