/* Shared reading-page layout. Home pages keep their own hero and section grid. */
body.site-layout {
  --layout-paper: #ffffff;
  --layout-ink: #17345d;
  --layout-muted: #566b82;
  --layout-line: #d7e4f3;
  background: var(--layout-paper);
  color: var(--layout-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: clamp(1rem, .96rem + .12vw, 1.075rem);
  line-height: 1.75;
}

body.site-layout > header,
body.site-layout > main,
body.site-layout > footer {
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

body.site-layout > header {
  min-height: 5rem;
  height: auto;
  padding: 1rem 0;
  gap: clamp(.75rem, 2vw, 2rem);
  border-bottom: 1px solid var(--layout-line);
}

body.site-layout > main {
  max-width: 76rem;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(.15rem, 1.5vw, 1.25rem) clamp(3rem, 6vw, 5rem);
}

body.site-layout > main h1 {
  max-width: 24ch;
  margin: 0 0 1.4rem;
  color: var(--layout-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  font-weight: 500;
  line-height: 1.12;
  text-wrap: balance;
}

body.site-layout > main h2 {
  margin: 2.25rem 0 .85rem;
  color: var(--layout-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

body.site-layout > main h3 {
  margin: 1.65rem 0 .65rem;
  color: var(--layout-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.3;
}

body.site-layout > main p,
body.site-layout > main li {
  max-width: 76ch;
  line-height: 1.8;
}

body.site-layout > main section,
body.site-layout > main article {
  scroll-margin-top: 1.5rem;
}

body.site-layout > main a:not(.button):not([role="button"]) {
  text-underline-offset: .18em;
}

body.site-layout > footer {
  min-height: 4.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--layout-line);
  gap: 1.25rem;
}

body.site-layout :focus-visible {
  outline: 3px solid #3972b8;
  outline-offset: 3px;
}

/* Marian blue and white also apply to reading pages that use the shared layout. */
body.site-layout > header,
body.site-layout > footer {
  border-color: #d7e4f3;
}

body.site-layout blockquote,
body.site-layout .reference-card,
body.site-layout .devotion-quicklinks a {
  background-color: #f1f6fc;
  border-color: #d7e4f3;
  color: #17345d;
}

body.site-layout a:not(.button):not([role="button"]):hover {
  color: #245a9c;
}

@media (max-width: 700px) {
  body.site-layout > header,
  body.site-layout > main,
  body.site-layout > footer {
    width: min(100% - 1.5rem, 76rem);
  }

  body.site-layout > header {
    flex-wrap: wrap;
    min-height: 4rem;
  }

  body.site-layout > main {
    padding: 1.5rem .1rem 3rem;
  }

  body.site-layout > main h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  body.site-layout > main h2 {
    margin-top: 1.75rem;
  }

  body.site-layout > footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.site-layout[dir="rtl"] > main h1,
body.site-layout[dir="rtl"] > main h2,
body.site-layout[dir="rtl"] > main h3 {
  line-height: 1.45;
}
