/* Fonts (self-hosted, latin subset): Literata for reading, Inter for labels, buttons and lists. */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("fonts/literata-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("fonts/literata-latin-wght-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); }

:root {
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Warm paper white, white cards, ink-blue accent, gold for "today". */
  --bg: #f7f4ee;
  --bg-tex: none;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f1ede4;                 /* quiet fills: table heads, inputs, the footer */
  --text: #1f1c18;
  --muted: #6b6458;
  --accent: #22508f;
  --accent-hover: #1a4075;
  --accent-soft: rgba(34, 80, 143, 0.08);
  --on-accent: #ffffff;
  --rule: #e4ddcf;
  --today: #fbe7a8;
  --today-text: #4f3a00;
  --logo-plate: transparent;           /* the logo artwork is made for a light background */
  --shadow: 0 1px 2px rgba(40, 30, 10, 0.05), 0 6px 20px -6px rgba(40, 30, 10, 0.10);
  --shadow-lg: 0 2px 4px rgba(40, 30, 10, 0.05), 0 18px 40px -12px rgba(40, 30, 10, 0.18);
  --radius: 16px;
  --header-bg: rgba(247, 244, 238, 0.82);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131417;
    --surface: #1c1e23;
    --surface-solid: #1c1e23;
    --surface-2: #23262c;
    --text: #ebe7df;
    --muted: #a59f94;
    --accent: #93b6f2;
    --accent-hover: #b4cdf7;
    --accent-soft: rgba(147, 182, 242, 0.12);
    --on-accent: #10213d;
    --rule: #30333b;
    --today: #4a3b16;
    --today-text: #ffe28a;
    --logo-plate: #f3ead8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px -6px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    --header-bg: rgba(19, 20, 23, 0.8);
  }
}
:root[data-theme="dark"] {
  --bg: #131417;
  --surface: #1c1e23;
  --surface-solid: #1c1e23;
  --surface-2: #23262c;
  --text: #ebe7df;
  --muted: #a59f94;
  --accent: #93b6f2;
  --accent-hover: #b4cdf7;
  --accent-soft: rgba(147, 182, 242, 0.12);
  --on-accent: #10213d;
  --rule: #30333b;
  --today: #4a3b16;
  --today-text: #ffe28a;
  --logo-plate: #f3ead8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px -6px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(19, 20, 23, 0.8);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* One column for the whole site, shared by the header, the page and the footer so their edges line up:
   wide enough for the plan grid at full size, narrow enough for comfortable lines of text. */
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 0; padding-bottom: 56px; }
.ui { font-family: var(--ui); }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface-solid); padding: 6px 10px; z-index: 30; }

/* Header: stays at the top, frosted */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); }
.site-header .wrap { display: flex; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; color: var(--text); text-decoration: none; margin-right: auto; flex: none; }
/* The logo reaches 2px from the header's top and bottom (its negative margins keep the header the same height). */
.brand img { display: block; width: 300px; height: 60px; margin: -8px 0; border-radius: 10px; background: var(--logo-plate); }
.nav { display: flex; gap: 2px; font: 500 0.92rem/1.2 var(--ui); }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: 999px; color: var(--text); white-space: nowrap; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.theme-toggle { order: 3; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
}
@media (max-width: 880px) {
  /* Logo and light/dark button on one line, the menu as a sideways-scrolling row under them */
  .site-header .wrap { flex-wrap: wrap; padding-bottom: 6px; }
  .nav { order: 4; width: calc(100% + 40px); margin: 0 -20px; padding: 0 14px 4px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 12px; }
}
/* Phones: as wide as fits beside the light/dark button */
@media (max-width: 560px) { .brand img { width: min(240px, calc(100vw - 98px)); height: auto; margin: -8px 0 -2px; } }

main { padding: 0 0 56px; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.01em; }
h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 650; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; line-height: 1.3; font-weight: 650; margin: 44px 0 12px; }
h3 { font-size: 1.12rem; font-weight: 650; margin: 26px 0 8px; }
@media (max-width: 560px) { h1 { font-size: 1.85rem; } }
p { margin: 0 0 16px; }
.lede { font-size: 1.12rem; color: var(--text); }
.kicker { font: 600 0.78rem/1.4 var(--ui); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 10px; }

/* Buttons, pills, translation switcher */
.btn { display: inline-block; font: 600 0.95rem/1 var(--ui); padding: 10px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg); text-decoration: none; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }
.switcher { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; font: 0.9rem/1 var(--ui); }
.switcher a, .switcher span { padding: 7px 10px; border-radius: 999px; border: 1px solid var(--rule); text-decoration: none; color: var(--text); }
.switcher a:hover { border-color: var(--accent); }
.switcher [aria-current] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.switcher .ext::after { content: " \2197"; color: var(--muted); }
/* daily-reading.html: the reading arrives by fetch; keep the footer below the fold until it does (layout shift). */
@media screen { #daily-body { min-height: 100vh; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; margin: 18px 0; }

/* Passage */
/* Reading header: previous three | date, reference, section | next three */
.rh { display: grid; grid-template-columns: 1fr minmax(0, 1.3fr) 1fr; gap: 16px; align-items: center; margin: 4px 0 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.rh-main { text-align: center; }
.rh-main h1, .rh-main .rh-title { margin: 2px 0 4px; font-size: 1.9rem; line-height: 1.2; font-weight: 700; }
.rh-date { font: 600 0.85rem/1.4 var(--ui); color: var(--muted); }
.rh-tag { color: var(--today-text); background: var(--today); padding: 1px 7px; border-radius: 4px; }
.rh-section { color: var(--muted); font-style: italic; }
.rh-note { font: 0.78rem/1.4 var(--ui); color: var(--muted); margin-top: 4px; }
.rh-list { list-style: none; margin: 0; padding: 0; font: 0.85rem/1.35 var(--ui); }
.rh-list li { margin: 3px 0; }
.rh-list a { text-decoration: none; display: block; padding: 3px 6px; border-radius: 6px; }
.rh-list a:hover { background: var(--accent-soft); }
.rh-list .rh-day { color: var(--muted); margin-right: 4px; }
.rh-list li.is-today .rh-day { color: inherit; }
.rh-prev { text-align: right; }
.rh-list li.is-today a { background: var(--today); color: var(--today-text); font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.passage h2 { font-size: 1.25rem; margin: 30px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.passage p.v { margin: 0 0 6px; padding-left: 2.1em; text-indent: -2.1em; }
.passage sup { display: inline-block; min-width: 1.9em; text-indent: 0; font: 600 0.72rem/1 var(--ui); color: var(--muted); vertical-align: 0.35em; }
.passage .title { font-style: italic; color: var(--muted); }
.credit { font: 0.85rem/1.5 var(--ui); color: var(--muted); margin-top: 28px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 30px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font: 0.95rem/1.4 var(--ui); }
.pager a { text-decoration: none; }
.pager .next { text-align: right; margin-left: auto; }

/* Plan table */
.table-scroll { overflow-x: auto; margin: 16px 0; }
table.plan { border-collapse: collapse; width: 100%; font: 0.85rem/1.35 var(--ui); }
table.plan th, table.plan td { border: 1px solid var(--rule); padding: 6px 7px; vertical-align: top; }
table.plan thead th { background: var(--surface-solid); position: sticky; top: 0; }
table.plan th small { display: block; font-weight: 400; color: var(--muted); }
table.plan td.wk { color: var(--muted); text-align: right; }
table.plan a { text-decoration: none; }
table.plan .is-today { background: var(--today); color: var(--today-text); font-weight: 700; }
@media (max-width: 720px) {
  table.plan thead { display: none; }
  table.plan, table.plan tbody, table.plan tr, table.plan td { display: block; width: 100%; }
  table.plan tr { border: 1px solid var(--rule); border-radius: 8px; margin: 0 0 10px; padding: 6px 10px; background: var(--surface); }
  table.plan td { border: 0; padding: 3px 0; }
  table.plan td.wk { text-align: left; font-weight: 700; color: var(--text); }
  table.plan td.wk::before { content: "Week "; }
  table.plan td[data-day]::before { content: attr(data-day) ": "; color: var(--muted); display: inline-block; min-width: 3em; }
}

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; }
.cal-head h2 { margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font: 0.8rem/1.3 var(--ui); }
.cal-grid .dow { font-weight: 600; text-align: center; color: var(--muted); padding: 4px 0; }
.cal-grid .dow small { display: block; font-weight: 400; }
.cal-grid .cell { min-height: 74px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 5px; overflow-wrap: anywhere; }
.cal-grid .cell.empty { background: transparent; border-color: transparent; }
.cal-grid .cell .num { color: var(--muted); font-weight: 600; }
.cal-grid .cell a { text-decoration: none; display: block; }
.cal-grid .cell.is-today { background: var(--today); color: var(--today-text); border-color: var(--today-text); }
@media (max-width: 560px) {
  .cal-grid { grid-template-columns: 1fr; }
  .cal-grid .dow, .cal-grid .cell.empty { display: none; }
  .cal-grid .cell { min-height: 0; display: flex; gap: 10px; }
  .cal-grid .cell .num { min-width: 5.5em; }
}

/* Forms */
.settings label { display: block; font: 600 0.9rem/1.4 var(--ui); margin: 10px 0 4px; }
.settings input, .settings select { font: 1rem/1.2 var(--ui); padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-solid); color: var(--text); }
.settings .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }

/* Content pages */
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--rule); color: var(--text); }
.prose table { border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 6px 10px; vertical-align: top; }
.faq dt { font-weight: 700; margin-top: 22px; }
.faq dd { margin: 6px 0 0; }
.link-list { padding-left: 1.2em; }
.link-list li { margin: 6px 0; }

footer.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: 22px 0 36px; color: var(--muted); font: 0.85rem/1.6 var(--ui); }
footer.site-footer a { color: var(--muted); }
footer.site-footer p { margin: 0 0 6px; }

@media print {
  .site-header, .site-footer, .switcher, .pager, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: none; }
}

/* Inline passages (passage.js) */
a[data-bibleref] { text-decoration-style: dotted; text-underline-offset: 3px; cursor: pointer; }
a[data-bibleref][aria-expanded="true"] { text-decoration-style: solid; font-weight: 600; }
.bp-inline { margin: 10px 0 16px; padding: 12px 16px 6px; background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 8px; font-size: 1rem; text-align: left; }
.bp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.bp-ref { font: 700 0.95rem/1.3 var(--ui); }
.bp-switch { margin: 0; }
.bp-switch button { font: inherit; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer; }
.bp-switch button:hover { border-color: var(--accent); }
.bp-switch button[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.bp-close { margin-left: auto; font: 1.3rem/1 var(--ui); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.bp-body h3.bp-sub { font: 600 0.85rem/1.3 var(--ui); color: var(--muted); margin: 10px 0 4px; }
.bp-inline .credit { margin-top: 8px; }

/* Study outlines (I. / A. / 1. / a.) */
.prose ol.outline { padding-left: 2.2em; margin: 18px 0; }
.prose ol.outline ol { padding-left: 1.9em; margin: 4px 0 8px; }
.prose ol.outline li { margin: 4px 0; }
.prose ol.outline > li { margin-top: 16px; }
.prose ol.outline li::marker { color: var(--muted); font-weight: 600; }

/* Plan switcher (buttons on home/daily/calendar, links on the grids) */
.plan-switch { margin: 6px 0 14px; }
.plan-switch button { font: inherit; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer; }
.plan-switch button:hover { border-color: var(--accent); }
.plan-switch button[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }

/* Devotion (new plan) */
.devotion { margin: 4px 0 22px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.dv-where { font-style: italic; color: var(--muted); margin: 0 0 10px; }
.devotion h2.dv-title { font-size: 1.35rem; margin: 0 0 12px; }
.dv-verse { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); }
.dv-verse p { margin: 0 0 4px; font-size: 1.05rem; }
.dv-verse cite { font: 0.85rem/1.4 var(--ui); font-style: normal; color: var(--muted); }
.dv-text { margin: 0 0 14px; }
.dv-question { margin: 0; padding: 10px 14px; background: var(--accent-soft); border-radius: 8px; }
.dv-label { font: 600 0.85rem/1 var(--ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-right: 4px; }
a.xref { text-decoration-style: dotted; text-underline-offset: 3px; }

/* Progress */
.rh-done { display: inline-flex; align-items: center; gap: 4px; margin-left: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; vertical-align: middle; }
.rh-done input, table.plan input[type=checkbox] { width: 1.05em; height: 1.05em; accent-color: var(--accent); }
table.plan td input[type=checkbox] { margin: 0 5px 0 0; vertical-align: -0.15em; }
.progress-line { color: var(--muted); min-height: 1.4em; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Compare */
table.compare { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.compare th, table.compare td { border: 1px solid var(--rule); padding: 8px 10px; vertical-align: top; text-align: left; }
table.compare thead th { background: var(--surface-solid); }
table.compare tbody th { font-weight: 600; }
table.compare ul { margin: 0; padding-left: 1.1em; }
details.ui { margin: 18px 0; }
details.ui summary { cursor: pointer; font-weight: 600; }

.print-only { display: none; }


/* Plan grids: keep each reference on one line; give the tables more room */
table.plan td { white-space: nowrap; }
@media (max-width: 720px) { table.plan td { white-space: normal; } }

/* Reading header sizing: room for the longest readings ("II Corinthians 11-13",
   "Thu: 2 Corinthians 11-13"), within the page column so its edges line up with the rest. */
.rh {
  /* Each section is as wide as its content, with the leftover space split equally
     between the two gutters. */
  grid-template-columns: auto auto auto;
  justify-content: space-between;
  column-gap: 20px;
  clear: both;   /* starts below the floated Daily Email bar rather than squeezing in beside it */
}
.rh-main h1, .rh-main .rh-title { white-space: nowrap; }
.rh-list a { white-space: nowrap; }
@media (max-width: 900px) {
  .rh-main h1, .rh-main .rh-title { font-size: 1.6rem; }
}
@media (max-width: 800px) {
  /* Too narrow for three sections: show only the middle one. */
  .rh { grid-template-columns: 1fr; justify-content: normal; gap: 10px 12px; width: auto; min-width: 0; max-width: none; margin-left: 0; transform: none; }
  .rh-main { grid-column: 1 / -1; grid-row: 1; }
  .rh-prev, .rh-next { display: none; }
  .rh-main h1, .rh-main .rh-title { white-space: normal; font-size: 1.5rem; }
  .rh-list a { white-space: normal; }
  .rh-list .rh-ref { white-space: nowrap; }
}

/* Home page: the header's center opens today's reading */
.rh-link { display: block; color: inherit; text-decoration: none; border-radius: 8px; padding: 4px 8px; margin: -4px -8px; }
.rh-link:hover, .rh-link:focus-visible { background: var(--accent-soft); }
.rh-link:hover .rh-title { color: var(--accent); }
table.compare thead th, table.plan thead th, .prose table thead th { text-align: center; }

/* Calendar: day of the month at the top right, larger and bold */
.cal-grid .cell .num { display: block; text-align: right; font-size: 1.15rem; font-weight: 700; line-height: 1.1; color: var(--muted); margin-bottom: 2px; }
.cal-grid .cell.is-today .num { color: var(--today-text); }
.cal-grid .cell .num .wd { display: none; }
@media (max-width: 560px) {
  .cal-grid .cell .num { text-align: left; font-size: 1rem; }
  .cal-grid .cell .num .wd { display: inline; font-weight: 600; }
}

/* "Your week" editor */
.week-order { list-style: none; margin: 10px 0; padding: 0; max-width: 680px; }
.week-order li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.week-order .wo-day { width: 6.5em; font-weight: 600; flex: none; }
.week-order .wo-track { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-solid); cursor: grab; touch-action: none; user-select: none; }
.week-order .wo-grip { color: var(--muted); font-size: 0.85rem; }
.week-order li.dragging .wo-track { border-color: var(--accent); background: var(--accent-soft); cursor: grabbing; }
.week-order .wo-move { font: inherit; width: 2.1em; height: 2.1em; border: 1px solid var(--rule); border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; flex: none; }
.week-order .wo-move:disabled { opacity: 0.3; cursor: default; }
.week-order .wo-min { color: var(--muted); font-size: 0.85rem; margin-left: auto; white-space: nowrap; }

/* Plan grid header cells: weekday, then track on screen; track, then (weekday) in print */
table.plan thead .thc { display: flex; flex-direction: column; align-items: center; }
table.plan thead .thc .wd { order: 0; }
table.plan thead .thc small { order: 1; }

/* Printable one-page plan: US Letter portrait, styled like the classic PDF */
@media print {
  @page { size: letter portrait; margin: 0.45in 0.5in; }
  body[data-page="plan"] .wrap { max-width: none; padding: 0; }
  body[data-page="plan"] main { padding: 0; }
  body[data-page="plan"] main > *:not(.table-scroll):not(.print-only) { display: none !important; }
  body[data-page="plan"] .print-only { display: block; }
  .print-title { font: bold 20pt/1 "Times New Roman", Times, serif; text-align: center; margin: 0 0 6pt; color: #000; }
  .print-foot { font: 8pt/1 "Times New Roman", Times, serif; text-align: center; margin: 6pt 0 0; color: #000; }
  .table-scroll { overflow: visible; margin: 0; }
  table.plan { width: 100%; border-collapse: collapse; font: 9.6pt/1.12 "Times New Roman", Times, serif; color: #000; }
  table.plan th, table.plan td { border: 0.6pt solid #000; padding: 0.4pt 3pt; white-space: nowrap; }
  table.plan thead th, table.plan td.wk { background: #d9d9d9 !important; color: #000;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.plan thead th { position: static; padding: 1pt 2pt; font-weight: bold; }
  table.plan thead .thc small { order: 0; display: block; font: inherit; color: #000; }
  table.plan thead .thc .wd { order: 1; font-style: italic; }
  table.plan thead .thc .wd::before { content: "("; }
  table.plan thead .thc .wd::after { content: ")"; }
  table.plan td.wk { text-align: center; font-weight: normal; }
  table.plan .is-today { background: none !important; font-weight: normal; color: #000; }
  table.plan td input[type=checkbox] { width: 7pt; height: 7pt; margin: 0 3pt 0 0; vertical-align: -0.5pt; accent-color: #000; }
  table.plan a { color: #000; text-decoration: none; }
  table.plan tr { break-inside: avoid; }
}

/* Calendar: a "read" checkbox at the top left, the day number at the top right */
.cal-grid .cal-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.cal-grid .cal-top input[type=checkbox] { width: 1em; height: 1em; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.cal-grid .cal-top .num { margin-bottom: 0; }
@media (max-width: 560px) {
  .cal-grid .cell { align-items: center; }
  .cal-grid .cal-top { flex-direction: row-reverse; justify-content: flex-end; gap: 8px; min-width: 7em; }
}

/* Subscribe page */
.sub-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.sub-copy { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.sub-copy label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; font: 600 0.85rem/1.3 var(--ui); color: var(--muted); }
.sub-copy input { font: 0.9rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface-solid); color: var(--text); }

/* Sticky column headers. The sideways-scroll wrapper would trap them, so it is
   only used on narrow screens (where the plan grid becomes cards anyway). */
@media (min-width: 721px) {
  .table-scroll { overflow: visible; }
}
table.plan thead th, table.compare thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-solid); box-shadow: 0 1px 0 var(--rule); }
.cal-grid .dow { position: sticky; top: 0; z-index: 2; background: var(--bg); }
@media print {
  table.plan thead th, table.compare thead th, .cal-grid .dow { position: static; box-shadow: none; }
}

/* Calendar styled like a wall calendar: one bordered grid with shared lines */
.calendar { margin: 10px 0 18px; border: 1px solid var(--rule); border-radius: 12px; overflow: clip; background: var(--surface); }
.calendar .cal-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; padding: 12px 14px; position: relative; border-bottom: 1px solid var(--rule); }
.calendar .cal-head h2 { margin: 0; font-size: 1.5rem; min-width: 9.5em; text-align: center; }
.cal-nav { font: 600 1.6rem/1 var(--ui); width: 2em; height: 1.6em; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--accent); cursor: pointer; }
.cal-nav:hover { background: var(--accent-soft); }
.cal-this { position: absolute; right: 14px; font: 600 0.85rem/1 var(--ui); padding: 7px 10px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--accent); cursor: pointer; }
.calendar .cal-grid { gap: 1px; background: var(--rule); }
.calendar .cal-grid .dow { background: var(--accent-soft); color: var(--text); padding: 6px 2px; border: 0; }
.calendar .cal-grid .dow small { color: var(--muted); }
.calendar .cal-grid .cell { min-height: 96px; border: 0; border-radius: 0; background: var(--surface); padding: 5px 6px; }
.calendar .cal-grid .cell.empty { display: block; background: var(--bg); }
.calendar .cal-grid .cell.is-today { background: var(--today); box-shadow: inset 0 0 0 2px var(--today-text); }
@media (max-width: 640px) {
  .calendar .cal-head { flex-wrap: wrap; }
  .cal-this { position: static; }
}
@media (max-width: 560px) {
  .calendar .cal-grid .cell { min-height: 0; }
  .calendar .cal-grid .cell.empty, .calendar .cal-grid .dow { display: none; }
}

/* Daily email: the "Daily Email" bar at the top right of every page, and the /email/ pages */
[hidden] { display: none !important; }   /* .btn and friends set display, which would beat the hidden attribute */
/* Floated, so the page's first lines flow around it instead of moving down. */
.es-bar { float: right; display: flex; margin: 8px 0 8px 18px; position: relative; z-index: 2; }
/* The reading header normally spans the column (and may be wider). Where there's room for its three
   sections beside the bar it takes the space that's left; on narrower screens it starts below the bar. */
.es-mini { position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 8px;
  background: var(--today); color: var(--today-text); font-size: 0.85rem; }
.es-mini label { font-weight: 700; white-space: nowrap; }
.es-state .es-label { white-space: nowrap; }   /* in "Daily Email: Subscribed [Modify]" only the status is bold */
.es-mini input[type=email] { width: 13em; min-width: 0; font: inherit; padding: 5px 8px; border: 1px solid rgba(74, 53, 0, 0.3);
  border-radius: 6px; background: var(--surface-solid); color: var(--text); }
.es-mini button, .es-mini .es-modify { font: inherit; font-weight: 700; padding: 5px 10px; border: 0; border-radius: 6px; background: var(--today-text);
  color: var(--today); cursor: pointer; white-space: nowrap; text-decoration: none; }
.es-state { padding-top: 5px; padding-bottom: 5px; min-height: 34px; }
.es-mini button:disabled { opacity: 0.7; cursor: default; }
.es-turnstile:not(:empty) { position: absolute; right: 0; top: 100%; margin-top: 6px; z-index: 5; }   /* only when Turnstile is on */
@media (max-width: 800px) {
  .es-bar { float: none; justify-content: flex-end; margin: 10px 0 4px; }   /* no room beside it: its own row */
}
@media (max-width: 560px) {
  .es-mini { flex: 1; min-width: 0; }
  .es-mini input[type=email] { flex: 1 1 0; width: 0; }
}
.settings .row input[type=email] { flex: 1 1 16em; min-width: 0; }
.es-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot: people never see it */
.rh-marked { margin-left: 10px; color: var(--today-text); background: var(--today); padding: 1px 7px; border-radius: 4px; }
.es-settings fieldset { border: 1px solid var(--rule); border-radius: 8px; margin: 14px 0; padding: 8px 14px 12px; }
.es-settings legend { font-weight: 600; padding: 0 4px; }
.es-order label { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.es-order select { width: 100%; }
.es-done { border-color: var(--accent); }
.es-error { border-color: #b3261e; color: #b3261e; }
/* Radio buttons shown as the site's pills (plan and translation on the email settings page) */
.es-pills label { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--text); cursor: pointer; font-weight: 400; margin: 0; }
.es-pills label:hover { border-color: var(--accent); }
.es-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.es-pills label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.es-pills label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.es-settings h3 label { display: inline; font: inherit; margin: 0; }
.es-status { min-height: 1.5em; color: var(--muted); }
.es-status.es-bad { color: #b3261e; }
/* Email settings: everything in one card, a subsection each ("Send it [before 6 a.m.] in [America/Chicago]", plan, ...) */
.es-card h3 { margin: 28px 0 8px; }
.es-card h3.es-first { margin-top: 0; }
.es-card .row label { display: inline; margin: 0; }
.es-card select { max-width: 100%; }
.es-card .es-pills { margin: 8px 0; }
.es-card .es-save, .es-card .es-status { margin: 18px 0 0; }

/* ---------- 2026 refresh: components ---------- */
/* Buttons and pills */
.btn { font: 600 0.95rem/1 var(--ui); padding: 12px 18px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
.btn.secondary { background: var(--surface); color: var(--accent); border-color: var(--rule); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent); background: var(--surface); color: var(--accent); }
p.ui .btn, .sub-buttons .btn { margin: 0 6px 8px 0; }
.switcher { gap: 6px; font: 500 0.88rem/1 var(--ui); }
.switcher a, .switcher span, .plan-switch button, .bp-switch button { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--text); transition: border-color .15s, background-color .15s; }
.switcher a:hover, .plan-switch button:hover, .bp-switch button:hover { border-color: var(--accent); color: var(--accent); }
.switcher [aria-current], .plan-switch button[aria-current], .bp-switch button[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.plan-switch button { font: 500 0.88rem/1 var(--ui); }

/* Cards */
.card, .devotion, .rh, .bp-inline, .calendar { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 22px 24px; }

/* Reading header */
.rh { padding: 20px 22px; margin-top: 6px; margin-bottom: 20px; }
.rh-main h1, .rh-main .rh-title { font-size: 2.1rem; font-weight: 650; letter-spacing: -0.02em; }
.rh-date { font: 600 0.82rem/1.4 var(--ui); letter-spacing: 0.01em; }
.rh-tag, .rh-marked { border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.rh-list { font: 0.84rem/1.35 var(--ui); }
.rh-list a { padding: 4px 8px; border-radius: 8px; }
.rh-list li.is-today a { border-radius: 8px; }
.rh-note { font: 0.78rem/1.4 var(--ui); }

/* Devotion */
.devotion { padding: 24px 28px; margin: 4px 0 28px; }
.devotion h2.dv-title { font-size: 1.5rem; }
.dv-verse { border-left: 3px solid var(--accent); padding: 6px 0 6px 18px; }
.dv-verse p { font-size: 1.08rem; font-style: italic; }
.dv-question { padding: 14px 18px; border-radius: 12px; }
@media (max-width: 560px) { .devotion { padding: 18px 18px; } .rh { padding: 16px; } }

/* Passage: a quiet reading column */
.passage { font-size: 1.05rem; line-height: 1.8; }
.passage h2 { font-size: 1.3rem; margin: 40px 0 14px; padding-bottom: 8px; }
.passage p.v { margin: 0 0 8px; }
.passage sup { color: var(--accent); opacity: 0.75; font: 600 0.68rem/1 var(--ui); }
.pager { border-top: 1px solid var(--rule); font: 500 0.95rem/1.4 var(--ui); }
.pager a { padding: 10px 16px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.credit { font: 0.82rem/1.5 var(--ui); }

/* Tables */
table.plan, table.compare, .prose table { background: var(--surface); }
table.plan thead th, table.compare thead th { background: var(--surface-2); font-family: var(--ui); }
@media screen and (min-width: 721px) {
  .table-scroll { border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: clip; }
  table.plan th, table.plan td { border-width: 0 1px 1px 0; }
  table.plan tr > :last-child { border-right: 0; }
  table.plan tbody tr:last-child td { border-bottom: 0; }
  table.plan tbody tr:hover td:not(.is-today) { background: var(--accent-soft); }
}
@media (max-width: 720px) { table.plan tr { border-radius: 12px; box-shadow: var(--shadow); } table.plan { background: none; } }

/* Calendar */
.calendar { overflow: clip; }
.calendar .cal-grid .cell { background: var(--surface); }
.calendar .cal-grid .cell.empty { background: var(--surface-2); }
.calendar .cal-grid .dow { background: var(--surface-2); }
.cal-nav, .cal-this { border-radius: 999px; }

/* Forms */
.settings input, .settings select, .sub-copy input { background: var(--surface-2); border-radius: 10px; }
.week-order .wo-track { border-radius: 12px; background: var(--surface); }

/* Daily email bar: a soft card instead of a gold block */
.es-bar { margin: 4px 0 14px 22px; }
.es-mini { gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--surface); color: var(--text); border: 1px solid var(--rule); box-shadow: var(--shadow); font: 0.85rem/1.3 var(--ui); }
.es-mini label { font-weight: 600; }
.es-mini input[type=email] { border: 1px solid var(--rule); border-radius: 999px; padding: 7px 12px; background: var(--surface-2); }
.es-mini button, .es-mini .es-modify { border-radius: 999px; padding: 8px 14px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.es-mini button:hover, .es-mini .es-modify:hover { background: var(--accent-hover); }
.es-state { padding-left: 14px; }
@media (max-width: 800px) { .es-bar { margin: 0 0 18px; } }

/* Home: hero, today's card, ways to follow */
.hero { position: relative; padding: 8px 0 6px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.08; max-width: 14em; }
.hero .lede { font-size: 1.12rem; color: var(--muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.hero-actions .btn { margin: 0; }
.ways { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 18px 0; padding: 0; list-style: none; }
.ways li { position: relative; padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); font: 0.92rem/1.55 var(--ui); color: var(--muted); transition: transform .15s, box-shadow .15s, border-color .15s; }
.ways li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.ways .ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.ways .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ways a { font-weight: 600; color: var(--text); text-decoration: none; }
.ways a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* the whole card is the link */
.ways li:hover a { color: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.split > section { padding: 22px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.split h2 { margin-top: 0; font-size: 1.25rem; }
.split p, .split li { font-size: 1rem; }
.split .link-list { margin: 0; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }

/* Content pages */
.prose blockquote { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 10px 18px; }
.faq dt { font-size: 1.08rem; }

/* Footer */
footer.site-footer { background: var(--surface-2); border-top: 1px solid var(--rule); padding: 32px 0 44px; font: 0.86rem/1.6 var(--ui); }
footer.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 14px; }
footer.site-footer .foot-links a { color: var(--text); text-decoration: none; font-weight: 500; }
footer.site-footer .foot-links a:hover { color: var(--accent); }
footer.site-footer p { max-width: 60em; }

@media print {
  .theme-toggle { display: none !important; }
  .card, .devotion, .rh, .table-scroll { box-shadow: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (min-width: 640px) { .ways { grid-template-columns: repeat(2, 1fr); } .ways li:first-child { grid-column: 1 / -1; } }
@media (min-width: 800px) { .ways { grid-template-columns: repeat(3, 1fr); } .ways li:first-child { grid-column: span 2; } }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* Sticky table headers sit just below the sticky site header (--head-h is its height, kept current by app.js). */
table.plan thead th, table.compare thead th, .cal-grid .dow { top: var(--head-h, 64px); }
/* The Compare tables fit a phone's width, so their wrapper needn't scroll sideways (which would trap the headers). */
.table-scroll:has(> table.compare) { overflow: visible; }
/* Reading header side lists: weekday labels in a column of their own, so "Sat:", "Sun:", "Mon:" line up
   on both sides, and the readings line up after them. */
.rh-prev { text-align: left; }
.rh-list .rh-day { display: inline-block; width: 2.6em; margin-right: 2px; }
/* Between the phone layout (cards, 720px and below) and the full-size grid, a smaller grid so each
   reading stays on one line without the table getting wider than the window. */
@media (min-width: 788px) and (max-width: 849px) { table.plan { font-size: 0.8rem; } table.plan th, table.plan td { padding: 5px; } }
@media (min-width: 721px) and (max-width: 787px) { table.plan { font-size: 0.75rem; } table.plan th, table.plan td { padding: 4px 2px; } }
/* Compare tables: the first column only as wide as its labels, the two plans splitting the rest evenly. */
table.compare { table-layout: auto; }
table.compare tr > :first-child { width: 0; }   /* grows to fit its labels; 1% would tip the split */
table.compare tr > :not(:first-child) { width: 50%; }
@media (min-width: 721px) { table.compare tr > :first-child { white-space: nowrap; } }   /* on phones the labels may wrap */
/* A link to #email-signup flashes the Daily Email bar */
@keyframes es-flash { 0%, 100% { box-shadow: var(--shadow); } 30% { box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 2px var(--accent); } }
.es-bar.es-flash .es-mini:not([hidden]) { animation: es-flash 1.4s ease-in-out 2; }
.card h2 .muted { font-weight: 450; }   /* "(Default schedule)", "(Your schedule, starting ...)" */
/* Add to Calendar: the nudge to customize before subscribing */
.card-cta { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-color: var(--accent); box-shadow: none; }
.card-cta p { margin-bottom: 12px; }
.card-cta .cta-actions { margin: 16px 0 0; }
