/* Daily Word styles
   Colours: lapis (the blue of old manuscript pigment) and a muted gold for references.
   Type: Spectral for reading, Instrument Sans for navigation and small details. */

:root {
  --page: #ffffff;
  --surface: #f0f3f9;
  --ink: #1c2230;
  --muted: #566074;
  --rule: #d7dce6;
  --lapis: #2c4a9a;
  --lapis-soft: #e3e9f7;
  --gold: #8f6516;
  --focus: #2c4a9a;

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --measure: 36rem;
  --wide: 62rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #11151d;
    --surface: #1a2030;
    --ink: #e6e9ef;
    --muted: #a3acbd;
    --rule: #2c3446;
    --lapis: #9db3f0;
    --lapis-soft: #22305a;
    --gold: #d8b062;
    --focus: #9db3f0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
    --page: #11151d;
    --surface: #1a2030;
    --ink: #e6e9ef;
    --muted: #a3acbd;
    --rule: #2c3446;
    --lapis: #9db3f0;
    --lapis-soft: #22305a;
    --gold: #d8b062;
    --focus: #9db3f0;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}

a { color: var(--lapis); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

.skip { position: absolute; left: -999px; top: 0; background: var(--lapis); color: var(--page); padding: .5rem 1rem; font-family: var(--sans); }
.skip:focus { left: 1rem; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.site-header ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; font-family: var(--sans); font-size: .95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--lapis); }

.site-footer { margin-top: 5rem; border-top: 1px solid var(--rule); background: var(--surface); font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.footer-inner { padding-top: 2rem; padding-bottom: 2.5rem; }
.footer-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); margin: 0 0 .25rem; }
.footer-links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 1.5rem 0 0; font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: .35rem; color: var(--rule); }
.crumbs a { color: var(--muted); }

/* Headings and text */
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -0.012em; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 400; margin: 2rem 0 1rem; max-width: 22ch; }
h2 { font-size: 1.45rem; font-weight: 600; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 .5rem; }
p, ul, ol, table, form, address { max-width: var(--measure); }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--muted); font-weight: 300; }
.meta, .count, .pl-meta, .cr-meta, .cr-times, .hint, .translation, .verified { font-family: var(--sans); }
.meta { color: var(--muted); font-size: .95rem; margin: 2rem 0 0; }
.count { color: var(--muted); font-size: .85rem; margin-left: .35rem; }

/* The verse: the one bold element on the site */
.verse { margin: 2rem 0; padding: 0; max-width: 40rem; }
.verse p { margin: 0; font-weight: 300; font-size: 1.55rem; line-height: 1.45; max-width: none; }
.verse p::first-letter {
  float: left;
  font-weight: 400;
  font-size: 3.6em;
  line-height: .8;
  margin: .06em .1em 0 0;
  color: var(--lapis);
}
.verse footer { margin-top: 1rem; clear: left; font-family: var(--sans); font-size: .95rem; }
.verse cite { font-style: normal; font-weight: 600; color: var(--gold); letter-spacing: .01em; }
.verse cite a { color: inherit; }
.translation { color: var(--muted); margin-left: .4rem; }

.today { padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--rule); }
.today-date { font-family: var(--sans); font-size: 1rem; font-weight: 500; color: var(--muted); margin: 0 0 1.5rem; letter-spacing: 0; max-width: none; }
.verse-hero { max-width: 48rem; margin: 0; }
.verse-hero p { font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.28; letter-spacing: -0.015em; }
.verse-hero p::first-letter { font-size: 2.9em; }
.today-link { font-family: var(--sans); font-size: 1rem; margin-top: 2rem; }
.today-link a { display: inline-block; background: var(--lapis); color: var(--page); text-decoration: none; padding: .7rem 1.1rem; border-radius: 3px; font-weight: 500; }
.today-link a:hover { filter: brightness(1.12); }

.verse-compact p { font-size: 1.3rem; }
.verse-compact p::first-letter { float: none; font-size: inherit; margin: 0; color: inherit; font-weight: inherit; }
.verse-compact { margin-bottom: .5rem; }
.read-more { font-family: var(--sans); font-size: .95rem; margin: 0 0 2.5rem; }

/* Home layout */
.home-grid { display: grid; gap: 0 4rem; }
@media (min-width: 52rem) { .home-grid { grid-template-columns: 3fr 2fr; } }
.topics-strip { border-top: 1px solid var(--rule); margin-top: 2.5rem; }

/* Lists */
.post-list, .index-list, .town-list, .church-list, .plain { list-style: none; padding: 0; }
.post-list li { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.post-list a { text-decoration: none; }
.pl-title { font-size: 1.2rem; }
.post-list a:hover .pl-title { text-decoration: underline; }
.pl-meta { display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.index-list li, .town-list li { padding: .45rem 0; }
.plain li { padding: .2rem 0; }
.month h2 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); margin-top: 2.5rem; }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; max-width: none; }
.chips a { display: inline-block; font-family: var(--sans); font-size: .92rem; text-decoration: none; padding: .35rem .8rem; border-radius: 999px; background: var(--lapis-soft); color: var(--ink); }
.chips a:hover { background: var(--lapis); color: var(--page); }

/* Devotion */
.devotion-head h1 { margin-top: .4rem; }
.prose p, .prose li { max-width: var(--measure); }
.prose blockquote { border-left: 3px solid var(--rule); margin: 1.5rem 0; padding-left: 1.25rem; color: var(--muted); font-style: italic; }
.prayer { margin: 2.5rem 0; padding: 1.5rem 1.5rem 1.25rem; background: var(--surface); border-radius: 4px; max-width: var(--measure); }
.prayer h2 { margin-top: 0; font-size: 1.15rem; }
.prayer p { font-style: italic; margin-bottom: 0; }
.tagline-topics { font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.church-nudge { margin: 3rem 0; padding: 1.25rem 0 0; border-top: 3px solid var(--lapis); max-width: var(--measure); }
.church-nudge h2 { margin-top: 0; font-size: 1.2rem; }
.church-nudge p { margin: .4rem 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; max-width: var(--measure); }
.pager a { text-decoration: none; font-size: 1.05rem; line-height: 1.35; }
.pager a span { display: block; font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-bottom: .2rem; }
.pager-next { text-align: right; }

/* Church directory */
.town-block h2 a { color: var(--ink); text-decoration: none; }
.town-block h2 a:hover { color: var(--lapis); }
.church-row { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.church-row a { text-decoration: none; }
.cr-name { font-size: 1.25rem; }
.church-row a:hover .cr-name { text-decoration: underline; }
.cr-meta, .cr-times { display: block; font-size: .9rem; color: var(--muted); }
.cr-times { color: var(--ink); margin-top: .15rem; }

.church header h1 { margin-bottom: .4rem; }
.church header .meta { margin-top: 0; }
.church-grid { display: grid; gap: 0 3rem; }
@media (min-width: 52rem) { .church-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.services { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .95rem; }
.services th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--rule); padding: .4rem .5rem .4rem 0; }
.services td { padding: .55rem .5rem .55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
address { font-style: normal; }
.map { margin: 2.5rem 0 1rem; }
.map iframe { width: 100%; height: 320px; border: 1px solid var(--rule); border-radius: 4px; }
.verified { color: var(--muted); font-size: .88rem; margin-top: 2rem; }
.notice { font-family: var(--sans); font-size: .95rem; background: var(--lapis-soft); padding: .8rem 1rem; border-left: 4px solid var(--lapis); margin-top: 1.5rem; }

/* Form */
.form { font-family: var(--sans); font-size: 1rem; display: grid; gap: 1.1rem; margin-top: 2rem; }
.form label { display: grid; gap: .35rem; font-weight: 500; }
.form .hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
.form input, .form textarea {
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--muted); border-radius: 3px; padding: .6rem .7rem; width: 100%;
}
.form fieldset { border: 1px solid var(--rule); border-radius: 3px; padding: .75rem 1rem 1rem; margin: 0; }
.form legend { font-weight: 500; padding: 0 .3rem; }
.form .radio { display: flex; gap: .6rem; align-items: center; font-weight: 400; margin-top: .4rem; }
.form .radio input { width: auto; }
.form button {
  justify-self: start; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--lapis); color: var(--page); border: 0; border-radius: 3px; padding: .75rem 1.3rem;
}
.form button:hover { filter: brightness(1.12); }
.hp { position: absolute; left: -9999px; }

@media (max-width: 40rem) {
  body { font-size: 1.125rem; }
  .verse p { font-size: 1.35rem; }
  .verse-hero p { font-size: 1.8rem; line-height: 1.3; }
  .today { padding-top: 2rem; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Optional picture at the top of a devotion */
.post-image { margin: 1.5rem 0 0; max-width: 48rem; }
.post-image img { display: block; width: 100%; height: auto; border-radius: 4px; }
