/* readsweeter.com, in Sweeter's own colours (src/theme.js): the dawn
   for the front page, as the app opens, the warm paper rooms for the pages you read, and the
   charcoal rooms at night. */

/* Newsreader, served from this site and nowhere else, so a visit asks no
   third party for anything (a font fetched from Google hands Google each
   visitor's address); the front page's video is served from here too. Only
   the waitlist's form, when sent, goes elsewhere: to Buttondown.
   SIL Open Font License: fonts/OFL.txt. */
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --dawn: #FCEFE1;
  --dawn-mesh:
    radial-gradient(80vw 80vw at 50% 44%, #FFF8EF 0%, rgba(255, 248, 239, 0) 100%),
    radial-gradient(95vw 95vw at 12% 0%, #F9E2CA 0%, rgba(249, 226, 202, 0) 100%),
    radial-gradient(75vw 75vw at 105% 62%, #F5D3C2 0%, rgba(245, 211, 194, 0) 100%),
    radial-gradient(115vw 115vw at 50% 108%, #EFC2A6 0%, rgba(239, 194, 166, 0) 100%),
    #FCEFE1;
  --on-dawn: #2F3036;
  --on-dawn-muted: rgba(47, 48, 54, 0.86);
  --bg: #F5F1EA;
  --surface: #FBF9F4;
  --ink: #2F3036;
  --muted: #62655A;
  --hairline: rgba(47, 48, 54, 0.11);
  --serif: "Newsreader", "New York", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D1E22;
    --surface: #2A2B31;
    --ink: #EDE6DA;
    --muted: #A2A498;
    --hairline: rgba(237, 230, 218, 0.11);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* The front page: the dawn, as the app opens, in ink. The words
   and the waitlist on one side, the app playing in an iPhone on the other;
   on a phone, one column with the phone between them. */
body.front {
  background: var(--dawn-mesh);
  background-attachment: fixed;
  color: var(--on-dawn);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.front main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 72px;
  padding: 72px max(32px, env(safe-area-inset-right)) 40px max(32px, env(safe-area-inset-left));
}
.front .copy { max-width: 30em; }
.front .icon {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 17px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.front h1 {
  font: 600 64px/1.02 var(--serif);
  letter-spacing: -0.015em;
  margin: 26px 0 6px;
}
.front .tagline {
  font: 400 26px/1.25 var(--serif);
  color: var(--on-dawn-muted);
  margin: 0;
}
.front .about {
  margin: 24px 0 0;
  color: var(--on-dawn-muted);
}
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The waitlist: one field and one button, and a promise of one email. */
.wait { margin-top: 36px; }
.wait h2, .wait h3 { font: 600 15px/1.3 var(--sans); letter-spacing: 0.02em; margin: 0 0 4px; }
.wait p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--on-dawn-muted); }
.wait form { display: flex; flex-wrap: wrap; gap: 10px; }
.wait input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border-radius: 26px;
  border: 1px solid rgba(47, 48, 54, 0.14);
  background: rgba(251, 249, 244, 0.62);
  color: var(--on-dawn);
  font: 17px var(--sans);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.wait input::placeholder { color: rgba(47, 48, 54, 0.68); }
.wait input:focus-visible { border-color: var(--on-dawn); box-shadow: 0 0 0 3px rgba(47, 48, 54, 0.12); }
.wait button {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 26px;
  border-radius: 26px;
  border: 0;
  background: var(--on-dawn);
  color: #FCEFE1;
  font: 600 17px var(--sans);
  cursor: pointer;
}
.wait button:focus-visible { outline: 3px solid rgba(47, 48, 54, 0.35); outline-offset: 2px; }
.wait .fine { margin: 12px 0 0; font-size: 13.5px; color: rgba(47, 48, 54, 0.68); }
.wait .thanks { display: none; margin: 0; font: 400 21px/1.35 var(--serif); color: var(--on-dawn); }
.wait.sent form, .wait.sent .fine { display: none; }
.wait.sent .thanks { display: block; }

/* The phone: an iPhone drawn round the recording, the island over its top.
   The screen, not the phone, has the recording's shape (402 by 874, the
   viewport it was made at), so the video fills it without losing its sides. */
.front .device { margin: 0; display: flex; flex-direction: column; align-items: center; }
.front .phone {
  --w: clamp(250px, 27vw, 320px);
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.155);
  background: #17181B;
  box-shadow: 0 0 0 1.5px #5A5751, 0 0 0 3px #2A2A2C, 0 40px 80px -30px rgba(60, 35, 10, 0.55), 0 18px 36px -18px rgba(0, 0, 0, 0.35);
}
.front .screen { position: relative; width: 100%; aspect-ratio: 402 / 874; border-radius: calc(var(--w) * 0.125); overflow: hidden; background: #C4CBCA; }
.front .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.front .play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; color: #FCEFE1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.front .play[hidden] { display: none; }
.front .play span {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; padding-left: 4px; box-sizing: border-box;
  background: rgba(47, 48, 54, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease;
}
.front .play:active span { transform: scale(0.94); }
.front .play:focus-visible span { outline: 3px solid rgba(248, 238, 218, 0.9); outline-offset: 3px; }
.front .island { position: absolute; z-index: 2; top: calc(var(--w) * 0.058); left: 50%; transform: translateX(-50%); width: 31%; height: calc(var(--w) * 0.085); border-radius: 999px; background: #000; }
.front footer { color: var(--on-dawn-muted); }

@media (max-width: 820px) {
  .front main { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 48px 16px 24px; text-align: center; justify-items: center; }
  .front .copy { display: contents; }
  .front .icon { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto; }
  .front h1 { font-size: 52px; margin-top: 22px; }
  .front .tagline { font-size: 22px; }
  .front .about { max-width: 30em; margin-top: 20px; }
  .front .device { order: 1; margin-top: 36px; }
  .front .phone { --w: min(72vw, 290px); }
  .wait { order: 2; width: 100%; max-width: 420px; margin-top: 40px; }
  .wait form { justify-content: center; }
  .wait button { flex: 1 1 100%; }
}

/* The pages you read: privacy, support, and the reading guides. */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 20px 24px;
}
.page .home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 20px/1 var(--serif);
}
.page .home img { width: 32px; height: 32px; border-radius: 8px; }
.page h1 {
  font: 600 40px/1.1 var(--serif);
  letter-spacing: -0.01em;
  margin: 48px 0 8px;
}
.page .date { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.page h2 {
  font: 600 24px/1.25 var(--serif);
  margin: 40px 0 8px;
}
.page p, .page li { margin: 0 0 14px; }
.page ul { padding-left: 1.2em; margin: 0 0 14px; }
.page .lede { font-size: 19px; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 32px 20px max(32px, env(safe-area-inset-bottom));
  font-size: 15px;
  color: var(--muted);
}
.page + footer { border-top: 1px solid var(--hairline); max-width: 640px; margin: 24px auto 0; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* The reading guides (/read, written by scripts/build-site.mjs): Scripture
   on a page of its own, as the app sets it, the line that goes with each
   passage, a plan's whole schedule, and the waitlist on a card of the dawn. */
.page .crumb { margin: 40px 0 0; font-size: 15px; color: var(--muted); }
.page .crumb a { text-decoration: none; }
.page .crumb a:hover { text-decoration: underline; }
.page .crumb + h1 { margin-top: 6px; }
.guide h1 + .lede { margin-top: 16px; }

.guide .glance { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--hairline); }
.guide .glance li { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.guide .glance a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.guide .glance a:hover { text-decoration: underline; }
.guide .glance span { color: var(--muted); text-align: right; }

.guide .day { margin-top: 56px; scroll-margin-top: 24px; }
.guide .day h2 { margin: 0 0 10px; }
.guide .day h2 .ref { display: block; margin-bottom: 6px; font: 600 13px/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.guide .note { color: var(--muted); }

.passage {
  margin: 18px 0 0;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline);
  font: 400 20px/1.6 var(--serif);
}
.passage p { margin: 0 0 14px; }
.passage p:last-child { margin-bottom: 0; }
.passage sup { margin-right: 4px; font: 600 11px/0 var(--sans); color: var(--muted); vertical-align: 0.55em; }
.passage .poem .line { display: block; padding-left: 1.4em; text-indent: -1.4em; }
.passage .title { font-style: italic; font-size: 17px; color: var(--muted); }
.sc { font-size: 0.8em; letter-spacing: 0.04em; }

.guide .tips { list-style: none; padding: 0; }
.guide .tips li { margin: 0 0 12px; }

.guide .facts { font-weight: 600; }
.schedule h3 { margin: 32px 0 8px; font: 600 15px/1.3 var(--sans); letter-spacing: 0.02em; color: var(--muted); }
.schedule .days { list-style: none; padding: 0; margin: 0; column-count: 2; column-gap: 32px; }
.schedule .days li { display: flex; gap: 10px; break-inside: avoid; margin: 0; padding: 6px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; line-height: 1.4; }
.schedule .n { flex: 0 0 2em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.schedule .r { flex: 1; }
.schedule .m { color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 1px; }
@media (max-width: 560px) {
  .schedule .days { column-count: 1; }
  .passage { padding: 18px 18px; font-size: 19px; }
}

.guide .guides { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hairline); }
.guide .guides li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.guide .guides a { display: block; font: 600 21px/1.25 var(--serif); text-decoration: none; }
.guide .guides a:hover { text-decoration: underline; }
.guide .guides .about { display: block; margin-top: 4px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.guide .guides .meta { display: block; margin-top: 6px; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }

.guide .more { padding-left: 1.2em; }
.guide .more li { margin: 0 0 8px; }
.guide .more span { color: var(--muted); }
@media (min-width: 600px) { .guide h2 + .more { column-count: 2; column-gap: 32px; } .guide h2 + .more li { break-inside: avoid; } }

/* The reference pages: three figures in a row, tables of numbers, and
   verses side by side in each translation. */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.page .stats p { margin: 0; padding: 16px 16px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); font-size: 14px; line-height: 1.35; color: var(--muted); }
.stats strong { display: block; margin-bottom: 4px; font: 600 28px/1.1 var(--serif); color: var(--ink); }
@media (max-width: 560px) { .stats { grid-template-columns: minmax(0, 1fr); } }

.table { margin: 16px 0 8px; overflow-x: auto; }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 7px 8px; border-bottom: 1px solid var(--hairline); text-align: right; vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table th[scope="row"] { text-align: left; font-weight: 400; }
.table thead th { font: 600 12px/1.3 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.table thead th:first-child { text-align: left; }
.times .c { text-align: center; }
.times tr.group th { padding-top: 24px; text-align: left; font: 600 19px/1.3 var(--serif); }
.times tr.sum th, .times tr.sum td { font-weight: 600; }
.times tfoot th, .times tfoot td { border-bottom: 0; border-top: 2px solid var(--hairline); }
@media (max-width: 420px) { .times .c { display: none; } .table table { font-size: 14px; } }
.versions th, .versions td, .versions thead th:first-child { text-align: left; }
.versions th[scope="row"] { color: var(--muted); }

.compare { margin: 16px 0 0; padding: 18px 20px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--hairline); }
.compare figcaption { margin-bottom: 10px; font: 600 13px/1.4 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.page .compare p { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); align-items: baseline; margin: 0 0 10px; font: 400 18px/1.5 var(--serif); }
.page .compare p:last-child { margin-bottom: 0; }
.compare .tr { font: 600 12px/1 var(--sans); letter-spacing: 0.06em; color: var(--muted); }

/* The waitlist's card: the dawn, drawn to the card's own size. */
.cta {
  margin: 56px 0 0;
  padding: 28px 24px 26px;
  border-radius: 24px;
  color: var(--on-dawn);
  background:
    radial-gradient(90% 110% at 50% 40%, #FFF8EF 0%, rgba(255, 248, 239, 0) 70%),
    radial-gradient(120% 140% at 12% 0%, #F9E2CA 0%, rgba(249, 226, 202, 0) 70%),
    radial-gradient(90% 120% at 100% 55%, #F5D3C2 0%, rgba(245, 211, 194, 0) 70%),
    radial-gradient(130% 120% at 50% 115%, #EFC2A6 0%, rgba(239, 194, 166, 0) 70%),
    var(--dawn);
}
.cta .icon { display: block; width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16); }
.guide .cta h2 { margin: 18px 0 8px; font: 600 28px/1.15 var(--serif); }
.guide .cta > p { color: var(--on-dawn-muted); }
.cta .wait { margin-top: 24px; }
.guide .credit { margin-top: 40px; font-size: 14px; color: var(--muted); }

@media print {
  body { background: #fff; color: #000; }
  .cta, footer, .page .home, .guide .more, .guide .more + * { display: none; }
  .passage { padding: 0; background: none; box-shadow: none; }
  .guide .credit { display: block; }
}
