/* Emmaus "Missal": paper and ink, rubric red for headings and links, hairline
   rules instead of boxes. Tokens match src/constants/theme.ts in the app. */
@font-face { font-family: 'EB Garamond'; src: url(fonts/EBGaramond_400Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(fonts/EBGaramond_400Regular_Italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url(fonts/EBGaramond_600SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(fonts/SourceSerif4_400Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(fonts/SourceSerif4_600SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --text: #1D1A16; --bg: #F6F1E7; --el: #EEE7D8; --muted: #5E564A;
  --accent: #A02B22; --border: #DDD2BF; --on: #F6F1E7; --ribbon: #5E3B6E;
  --draft: #8E2A20; --draft-bg: #F6E6DE;
  --display: 'EB Garamond', Garamond, 'Times New Roman', serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #ECE5D6; --bg: #15130F; --el: #1F1C17; --muted: #A69D8D;
    --accent: #E0806F; --border: #35302A; --on: #15130F; --ribbon: #9A78AD;
    --draft: #EBA18F; --draft-bg: #2C1B16;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.62 var(--serif); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 44rem; margin-inline: auto; padding-inline: 24px; }
.wide { max-width: 62rem; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--on); padding: 10px 16px; border-radius: 8px; font: 600 15px/1.2 var(--ui); z-index: 2; }
.skip:focus { left: 16px; }

/* Top: the name, a few links, and the ribbon in the season's colour. */
.top { border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; position: relative; padding-right: 34px; }
.top-row::after {
  content: ''; position: absolute; right: 0; top: 0; width: 14px; height: 62px; background: var(--ribbon);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
}
.brand { font: 400 28px/1 var(--display); color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.top nav { display: flex; gap: 22px; }
.top nav a { font: 600 12.5px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

main { padding: 56px 0 72px; }
section { border-top: 1px solid var(--border); padding-block: 48px; }
section:first-of-type { border-top: 0; padding-top: 0; }
.stack > * + * { margin-top: 18px; }

.rubric, h2 { font: 600 13px/1.4 var(--display); letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin: 0; }
h1 { font: 400 clamp(40px, 8vw, 62px)/1.04 var(--display); letter-spacing: -.02em; margin: 14px 0 0; text-wrap: balance; }
.lede { font: italic 400 clamp(21px, 3.2vw, 25px)/1.38 var(--display); color: var(--muted); margin: 16px 0 0; text-wrap: pretty; }
h3 { font: 400 26px/1.2 var(--display); letter-spacing: -.005em; margin: 0; }
.title { font: 400 clamp(28px, 4.6vw, 36px)/1.14 var(--display); letter-spacing: -.012em; margin: 10px 0 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }
.small { font: 14.5px/1.55 var(--ui); color: var(--muted); }

/* The draft notice, as in the app: rubric red on a faint red wash. */
.notice { border: 1px solid var(--draft); background: var(--draft-bg); color: var(--draft); border-radius: 4px; padding: 14px 18px; margin-top: 30px; }
.notice .rubric { color: var(--draft); font-size: 12px; }
.notice p + p { margin-top: 4px; font-size: 16.5px; line-height: 1.5; }

/* The main action is a filled ink button; the quiet one is rubric red. */
.actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 30px; }
.button { display: inline-block; font: 600 16px/1.2 var(--ui); background: var(--text); color: var(--on); text-decoration: none; border-radius: 8px; padding: 15px 24px; transition: transform 110ms ease-out; }
.button:active { transform: scale(.98); }
.quiet { font: 600 16px/1.2 var(--ui); text-decoration: none; padding: 12px 0; }
.quiet:hover { text-decoration: underline; }

/* Ruled lists: a title, then a line or two. */
.ruled { list-style: none; margin: 26px 0 0; padding: 0; }
.ruled li { border-top: 1px solid var(--border); padding: 20px 0; display: grid; gap: 6px; }
.ruled li:last-child { padding-bottom: 0; }
.ruled p { color: var(--muted); font-size: 17px; line-height: 1.58; }
.two { display: grid; gap: 0 48px; }
@media (min-width: 720px) { .two { grid-template-columns: 1fr 1fr; } }

/* Numbered steps, in red like a rubric. */
.steps { list-style: none; counter-reset: step; margin: 26px 0 0; padding: 0; }
.steps li { counter-increment: step; border-top: 1px solid var(--border); padding: 20px 0 20px 52px; position: relative; display: grid; gap: 6px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 14px; font: 400 34px/1.2 var(--display); color: var(--accent); }
.steps p { color: var(--muted); font-size: 17px; line-height: 1.58; }

/* Screens from the app. */
.screens { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 34px 0 0; padding: 0; list-style: none; }
.screens figure { margin: 0; }
.screens img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 22px; background: var(--el); }
.screens figcaption { font: 14.5px/1.5 var(--ui); color: var(--muted); margin-top: 12px; text-align: center; }
@media (max-width: 719px) {
  .screens { grid-template-columns: repeat(3, 68%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-left: -24px; margin-right: -24px; padding: 0 24px 8px; scroll-padding: 0 24px; }
  .screens li { scroll-snap-align: start; }
}

/* Question and answer, marked as in the app. */
.qa { margin: 26px 0 0; }
.qa > div { border-top: 1px solid var(--border); padding: 20px 0; }
.qa > div:last-child { padding-bottom: 0; }
.qa dt, .qa dd { position: relative; padding-left: 38px; margin: 0; }
.qa dt { font: 400 23px/1.28 var(--display); }
.qa dd { color: var(--muted); font-size: 17px; line-height: 1.58; margin-top: 8px; }
.qa dt::before, .qa dd::before { position: absolute; left: 0; top: 0; font: 600 21px/1.4 var(--display); color: var(--accent); }
.qa dt::before { content: '℣.'; }
.qa dd::before { content: '℟.'; top: -3px; }

.screens-note { text-align: center; margin-top: 20px; }
.finis { text-align: center; color: var(--accent); font-size: 26px; line-height: 1; margin: 8px 0 0; }

footer { border-top: 1px solid var(--border); padding-block: 30px 56px; }
footer .wrap { display: grid; gap: 10px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
footer nav a { font: 600 14.5px/1.3 var(--ui); text-decoration: none; padding: 8px 0; }
footer nav a:hover { text-decoration: underline; }

/* Reading pages (privacy). */
.prose h2 { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }
.prose h2 + * { margin-top: 14px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { margin-bottom: 0; padding-left: 22px; }
.prose h2 + ul { margin-top: 14px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--accent); }

@media (max-width: 520px) {
  body { font-size: 17px; }
  .wrap { padding-inline: 20px; }
  .top nav { gap: 16px; }
  .top nav a { font-size: 11.5px; letter-spacing: .12em; }
  .top nav .wide-only { display: none; }
  main { padding: 36px 0 56px; }
  section { padding-block: 38px; }
  .screens { margin-left: -20px; margin-right: -20px; padding: 0 20px 8px; scroll-padding: 0 20px; }
  .button { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .button { transition: none; } .button:active { transform: none; } }
@media print { .top nav, .actions, .skip { display: none; } body { background: #fff; color: #000; } }
