/* Basic Biblical Truths
   One column for reading, set in Source Serif 4 at a generous size.
   Accent: a deep navy, chosen for calm, easy reading. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/SourceSerif4Variable-Roman.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/SourceSerif4Variable-Italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fafaf8;
  --panel: #f0f2f5;
  --ink: #1b1f27;
  --muted: #535b68;
  --rule: #d8dde5;
  --accent: #24426f;
  --accent-strong: #182f55;
  --accent-tint: #e6ecf5;

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

  --measure: 40rem;
  --step-0: 1.1875rem;   /* 19px body */
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 2.75rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12151b; --panel: #1a1f27; --ink: #e5e9ef; --muted: #a5adba; --rule: #2d3440;
    --accent: #a3bde8; --accent-strong: #c3d4f2; --accent-tint: #1d2738;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12151b; --panel: #1a1f27; --ink: #e5e9ef; --muted: #a5adba; --rule: #2d3440;
  --accent: #a3bde8; --accent-strong: #c3d4f2; --accent-tint: #1d2738;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.7;
  font-optical-sizing: auto;
}

.wrap {
  max-width: 46rem;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 5; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-block: 1.25rem;
}
.site-name {
  font-size: var(--step-1); font-weight: 650; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-family: var(--sans); font-size: 1rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding-block: 0.4rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

main { padding-block: 2.5rem 4rem; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 600; margin: 0 0 1.5rem; }
h2 { font-size: var(--step-2); font-weight: 600; margin: 2.5rem 0 1rem; }
h3 { font-size: var(--step-1); font-weight: 600; margin: 2rem 0 0.75rem; }

.eyebrow, .section-label, .crumb {
  font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 0.5rem;
}
.section-label { margin-top: 3rem; margin-bottom: 1rem; }
.crumb { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 1rem; margin-bottom: 1.5rem; }
.crumb a::before { content: "\2190\00a0"; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose ul { padding-left: 1.25em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.35em; }

/* Downloads */
.downloads { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dl { display: flex; gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.dl-icon { flex: none; width: 1.75rem; height: 1.75rem; margin-top: 0.15rem; color: var(--accent); }
.dl-body { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.dl-title { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }
.dl-meta { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-desc { margin: 0.35rem 0 0; max-width: var(--measure); }
.dl-group { padding-block: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.dl-group-head { margin: 0 0 0.75rem; font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.dl-group .downloads { margin-left: 2.75rem; }
.dl-group .dl:last-child { border-bottom: 0; }

/* Home */
.intro { padding-block: 0.5rem 0.5rem; }
.intro-note { margin: -0.5rem 0 0; color: var(--muted); max-width: var(--measure); }
.intro h1 { max-width: 18em; }
.group h3 { font-size: 1.0625rem; font-family: var(--sans); font-weight: 600; color: var(--accent); margin: 2rem 0 0.75rem; }
.studies { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.studies li { display: flex; min-width: 0; }
.study, .ru-card {
  display: flex; flex-direction: column; gap: 0.35rem; width: 100%;
  padding: 1.1rem 1.25rem; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--panel); color: var(--ink); text-decoration: none;
}
.study:hover, .ru-card:hover { border-color: var(--accent); background: var(--accent-tint); color: var(--ink); }
.study-title { font-size: var(--step-1); font-weight: 600; line-height: 1.3; color: var(--accent); }
.study-blurb { font-size: 1.0625rem; line-height: 1.55; color: var(--muted); }
.ru-card { margin-top: 2rem; }
.ru-en { font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Russian page */
.toc ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.toc a {
  display: inline-block; font-family: var(--sans); font-size: 1rem; padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; background: var(--panel);
}
.ru-section { scroll-margin-top: 1rem; }
.ru-section h2 { margin-top: 3rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--panel); font-size: 1rem; line-height: 1.6; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 1rem 2rem; padding-block: 2rem 2.5rem;
}
.foot-about { max-width: 24rem; }
.site-footer p { margin: 0; color: var(--muted); }
.foot-name { font-weight: 650; color: var(--ink) !important; font-size: 1.0625rem; margin-bottom: 0.25rem !important; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-family: var(--sans); }
.foot-nav a { color: var(--muted); text-decoration: none; padding-block: 0.15rem; }
.foot-nav a:hover { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

@media (max-width: 30rem) {
  :root { --step-0: 1.125rem; }
  main { padding-block: 1.75rem 3rem; }
  .dl-group .downloads { margin-left: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
