/*
 * dailymyrrh.com: one stylesheet for every page, so the home page, the
 * privacy policy and the guides read as pages of one book. The palette is
 * the app's own (src/styles/global.css): cream and gold by day, true black
 * with warm white at night. Paintings and emblems keep their own colours.
 */

:root {
  --ground: #F6EFE1;
  --surface: #FFFDF8;
  --ink: #3B342A;
  --body: #4A4234;
  --muted: #6B6153;
  --gold: #B98526;
  --link: #805A17;
  --brand: #C5740C;
  --tint: rgba(185, 133, 38, 0.10);
  --rule: rgba(59, 52, 42, 0.14);
  --hairline: rgba(59, 52, 42, 0.09);
  --button: #3B342A;
  --button-ink: #FFFDF8;

  --serif: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wide: 1080px;
  --narrow: 640px;
  --gutter: clamp(20px, 5vw, 24px);
  --section: clamp(56px, 9vw, 96px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #000000;
    --surface: #151310;
    --ink: #F5EDDE;
    --body: #DED4C3;
    --muted: #BBAF9D;
    --gold: #DDB86E;
    --link: #DDB86E;
    --brand: #E3AE45;
    --tint: rgba(221, 184, 110, 0.10);
    --rule: rgba(245, 237, 222, 0.16);
    --hairline: rgba(245, 237, 222, 0.10);
    --button: #F5EDDE;
    --button-ink: #1A1712;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-color: var(--rule); text-underline-offset: 3px; transition: color 140ms ease, text-decoration-color 140ms ease; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.shell { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--narrow); margin: 0 auto; }

/* ── Masthead and footer ─────────────────────────────────────────────── */

.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding: 20px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.brand svg { width: 30px; height: auto; color: var(--brand); flex: none; }
.brand span { font: 600 1.2rem/1 var(--serif); letter-spacing: 0.005em; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.masthead nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-size: 0.95rem; }

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--section);
  padding: 32px 0 48px;
  color: var(--muted); font-size: 0.92rem; line-height: 1.6;
}
.footer .brand { margin-bottom: 4px; }
.footer .brand svg { width: 24px; }
.footer .brand span { font-size: 1.05rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
.footer p { margin: 0; }

/* ── Type ────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 7vw, 4rem); line-height: 1.06; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.85rem, 4.4vw, 2.25rem); line-height: 1.15; letter-spacing: -0.005em; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 1rem; }
.label { font: 600 0.82rem/1.4 var(--sans); letter-spacing: 0.06em; color: var(--muted); margin: 0 0 12px; }
.lede { font: 400 clamp(1.3rem, 3.4vw, 1.45rem)/1.45 var(--serif); color: var(--ink); max-width: 30ch; }
.caption { font-size: 0.875rem; line-height: 1.5; color: var(--muted); margin-top: 12px; }
.caption cite { font-style: italic; font-family: var(--serif); font-size: 1rem; color: var(--body); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 24px; border-radius: 999px;
  background: var(--button); color: var(--button-ink);
  font: 600 1rem/1 var(--sans); text-decoration: none;
  transition: opacity 140ms ease;
}
.button:hover { opacity: 0.88; }
.fine { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ── Articles (privacy, guides) ──────────────────────────────────────── */

.article { padding-top: clamp(24px, 6vw, 56px); }
.article header { margin-bottom: 40px; }
.article h1 { font-size: clamp(2.2rem, 6.5vw, 3.1rem); }
.article .lede { max-width: none; margin-top: 16px; }
.article section { padding: 36px 0; border-top: 1px solid var(--hairline); }
.article section h2 { font-size: clamp(1.6rem, 4vw, 1.9rem); margin-bottom: 14px; }
.article p, .article li { max-width: 62ch; }
.article ul { margin: 0 0 1rem; padding: 0; list-style: none; }
.article ul li { position: relative; padding-left: 1.4rem; margin-bottom: 0.6rem; }
.article ul li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.72em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.article ol { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: step; }
.article ol li { counter-increment: step; position: relative; padding-left: 2.1rem; margin-bottom: 0.7rem; }
.article ol li::before {
  content: counter(step); position: absolute; left: 0; top: 0.18em;
  width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--tint); color: var(--link);
  font: 700 0.78rem/1.45rem var(--sans); text-align: center;
}
.updated { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }

.notice {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: 20px 22px; margin: 0 0 24px;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 0.6rem; }
.notice strong { color: var(--ink); }

.contents { margin: 0 0 8px; }
.contents ul { columns: 2; column-gap: 28px; margin: 0; }
.contents li { break-inside: avoid; margin-bottom: 0; }
.contents a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 520px) { .contents ul { columns: 1; } }

.where {
  font-size: 0.95rem; color: var(--ink); background: var(--tint);
  border-radius: 8px; padding: 10px 14px; margin: 14px 0;
}
.ui { color: var(--ink); font-weight: 600; }
.quote { font-family: var(--serif); font-style: italic; font-size: 1.06em; color: var(--ink); }
.note { font-size: 0.95rem; color: var(--muted); }
.kicker { font: 600 0.82rem/1.4 var(--sans); letter-spacing: 0.06em; color: var(--link); margin: 0 0 8px; }

/* ── Home ────────────────────────────────────────────────────────────── */

.spread {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px); align-items: center;
  padding: clamp(24px, 5vw, 56px) 0 var(--section);
}
.spread h1 { margin-bottom: 20px; }
.spread .lede { margin-bottom: 28px; }
.painting img { border-radius: 8px; width: 100%; }

.feature {
  display: grid; gap: clamp(32px, 6vw, 72px); align-items: center;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  padding: var(--section) 0;
  border-top: 1px solid var(--hairline);
}
.feature h2 { margin-bottom: 16px; }
.feature p { max-width: 52ch; }
.screen img {
  width: 100%; max-width: 300px; margin: 0 auto;
  border-radius: 8px; border: 1px solid var(--rule);
}

.emblems {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; max-width: 400px;
}
.emblems li { font-size: 0.85rem; line-height: 1.35; color: var(--muted); }
.emblems img { width: 100%; max-width: 104px; border-radius: 6px; margin-bottom: 8px; }

.prayers { padding: var(--section) 0; border-top: 1px solid var(--hairline); }
.prayers > header { max-width: 40rem; margin-bottom: 40px; }
.prayers > header h2 { margin-bottom: 14px; }
.shelf {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 40px); margin: 0; padding: 0; list-style: none;
}
.shelf img { width: 100%; max-width: 160px; border-radius: 8px; margin-bottom: 14px; }
.shelf h3 { margin-bottom: 4px; }
.shelf p { color: var(--muted); margin: 0; }
.together {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: start;
  margin-top: 56px; max-width: 40rem;
}
.together img { width: 72px; border-radius: 8px; }
.together h3 { margin-bottom: 6px; }
.together p { margin: 0; }

.preview {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  padding: clamp(24px, 4vw, 36px); max-width: 44rem; margin-inline: auto;
}
.preview h2 { margin-bottom: 10px; }
.preview p { max-width: 54ch; }
.preview .note { margin-bottom: 18px; }
.preview a { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

.closing { text-align: center; padding: var(--section) 0 0; }
.closing h2 { margin-bottom: 12px; }
.closing p { color: var(--muted); }
.closing .button { margin-top: 12px; }

@media (max-width: 760px) {
  .spread, .feature { grid-template-columns: minmax(0, 1fr); }
  .feature .screen { order: 2; }
  .shelf { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .shelf li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; }
  .shelf img { margin: 0; }
  .together { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; margin-top: 28px; }
  .together img { width: 56px; justify-self: center; }
}

/* ── Guides: the list on the home page and the guides page ───────────── */

.guides { padding: var(--section) 0 0; border-top: 1px solid var(--hairline); }
.guides > h2 { margin-bottom: 12px; }
.guides > .lede { margin-bottom: 28px; max-width: 40ch; }
.guide-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px;
}
.guide-list a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 44px;
  padding: 18px 20px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: var(--body);
  transition: border-color 140ms ease;
}
.guide-list a:hover { border-color: var(--gold); }
.guide-title { font: 500 1.3rem/1.25 var(--serif); color: var(--ink); }
.guide-line { font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.guide-kicker { font: 600 0.78rem/1.4 var(--sans); letter-spacing: 0.06em; color: var(--link); }
.article .guide-list { margin-top: 8px; }
