@font-face {
  font-family: "Sina Nova";
  src: url("/fonts/SinaNovaW01Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sina Nova";
  src: url("/fonts/SinaNovaW01Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sina Nova";
  src: url("/fonts/SinaNovaW01Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "French News";
  src: url("/fonts/1906FrenchNewsW00Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #17181c;
  --surface: #24272f;
  --surface-2: #2c3039;
  --text: #eceef2;
  --muted: #a3a6ae;
  --faint: #6c707a;
  --accent: #b3c7ff;
  --accent-strong: #5874db;
  --accent-low: #1c2754;
  --writ: #c25c5c;
  --note-bg: #1f2638;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.25);
  --serif: "Sina Nova", Georgia, "Times New Roman", serif;
  --display: "French News", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 40rem;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fbfaf7;
    --surface: #f0eee8;
    --surface-2: #e7e4dc;
    --text: #24272f;
    --muted: #545861;
    --faint: #888b96;
    --accent: #23398f;
    --accent-strong: #5874db;
    --accent-low: #dfe6fb;
    --writ: #a41f1f;
    --note-bg: #e9edf8;
    --shadow: 0 1px 2px rgba(30, 30, 40, 0.08), 0 8px 24px rgba(30, 30, 40, 0.08);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--accent-strong);
  color: #fff;
  border-radius: 0.5rem;
}
.skip:focus { top: 1rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
}

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.sections { display: flex; gap: 0.25rem; font-family: var(--sans); font-size: 0.9rem; }
.sections a {
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.sections a:hover { background: var(--surface-2); color: var(--text); }
.sections a[aria-current] { background: var(--accent-low); color: var(--text); font-weight: 600; }

.menu { position: relative; margin-left: auto; font-family: var(--sans); font-size: 0.9rem; }
.menu > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.15s, opacity 0.15s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.menu[open] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  display: grid;
  gap: 0.75rem;
  width: min(20rem, calc(100vw - 2rem));
  padding: 0.5rem;
  border-radius: 1rem;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.menu-sections { display: grid; gap: 0.25rem; }
.menu-sections a {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.menu-sections a:hover { background: var(--surface); }
.menu-sections a[aria-current] { background: var(--accent-low); }
.menu-sub { color: var(--muted); font-weight: 400; font-size: 0.82rem; line-height: 1.35; }
.menu-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 0.35rem 0.35rem;
  box-shadow: inset 0 1px 0 var(--surface-2);
}
.menu-langs a {
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.menu-langs a:hover { color: var(--text); }
.menu-langs a[aria-current] { background: var(--accent-low); color: var(--text); font-weight: 600; }

.site-header .sections, .site-header .langs { display: none; }
.site-header { flex-wrap: nowrap; }
.site-header .brand { min-width: 0; line-height: 1.3; }
.site-header .menu, .site-header .langs { flex-shrink: 0; }
@media (min-width: 960px) {
  .site-header { justify-content: flex-start; }
  .site-header .sections { display: flex; }
  .site-header .langs { display: block; }
  .site-header .menu { display: none; }
}

.langs { position: relative; margin-left: auto; font-family: var(--sans); font-size: 0.88rem; }
.langs > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.langs > summary::-webkit-details-marker { display: none; }
.langs > summary:hover, .langs[open] > summary { background: var(--surface-2); }
.langs > summary:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.langs-globe {
  width: 1rem;
  height: 1rem;
  background: currentColor;
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.langs-caret {
  width: 0.45rem;
  height: 0.45rem;
  margin: -0.2rem 0 0 0.1rem;
  box-shadow: inset -1.5px -1.5px 0 currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
  transition: transform 0.15s;
}
.langs[open] .langs-caret { transform: rotate(225deg); margin-top: 0.2rem; }
.langs-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 20;
  display: grid;
  min-width: 10.5rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.langs-menu a {
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--muted);
  text-decoration: none;
}
.langs-menu a:hover { background: var(--surface); color: var(--text); }
.langs-menu a[aria-current] { background: var(--accent-low); color: var(--text); font-weight: 600; }

.shell {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

main { min-width: 0; }

.toc { margin-bottom: 1.5rem; }
.toc > summary {
  cursor: pointer;
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}
.toc > summary::-webkit-details-marker { display: none; }
.toc > summary::after { content: " ▾"; color: var(--faint); }
.toc[open] > summary::after { content: " ▴"; }

.toc-years {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.toc-years > li { margin: 0; }

.toc-year-link, .toc-year > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
}
.toc-year-link { color: var(--text); text-decoration: none; }
.toc-year-link:hover { background: var(--surface); }
.toc-year > summary { cursor: pointer; font-weight: 700; list-style: none; background: var(--surface); }
.toc-year > summary::-webkit-details-marker { display: none; }
.toc-year > summary a { color: var(--text); text-decoration: none; }
.toc-count { color: var(--faint); font-size: 0.8rem; font-weight: 400; font-variant-numeric: tabular-nums; }

.toc-year ul { list-style: none; margin: 0.25rem 0 0.75rem; padding: 0; }
.toc-year li a {
  display: flex;
  gap: 0.6rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.35;
}
.toc-year li a:hover { background: var(--surface); color: var(--text); }
.toc-year li a[aria-current] { background: var(--accent-low); color: var(--text); }
.toc-num { flex: 0 0 3.1rem; color: var(--faint); font-variant-numeric: tabular-nums; }

@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 3rem;
    padding-top: 2rem;
  }
  .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; margin: 0; }
  .toc > summary { display: none; }
  .toc-years { margin-top: 0; }
}

.prose { max-width: var(--measure); }
.prose p, .prose li { font-size: 1.2rem; line-height: 1.7; }
.prose h1 {
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  line-height: 1.15;
  margin: 0.25rem 0 1.25rem;
  text-wrap: balance;
}
.prose h2, .prose h3, .prose h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
}
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-radius: 0.75rem;
  font-style: italic;
}
.prose blockquote p { font-size: 1.15rem; }
.prose hr {
  height: 1px;
  margin: 2.5rem auto;
  width: 40%;
  background: var(--surface-2);
  border: 0;
}

.crumb { margin: 0; font-family: var(--sans); font-size: 0.9rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--text); }

.note {
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--note-bg);
}
.note p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.note p + p { margin-top: 0.6rem; }

.letter-meta {
  margin: 0 0 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.letter-meta p { margin: 0; font-size: 0.85rem; line-height: 1.55; }
.letter-no { color: var(--faint); margin-bottom: 0.35rem !important; }

.prose sup a {
  display: inline-block;
  min-width: 1.4em;
  margin-left: 0.15em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--accent-low);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.prose .footnotes {
  margin-top: 1rem;
  color: var(--muted);
}
.prose .footnotes h2 { font-size: 1.25rem; }
.prose .footnotes li, .prose .footnotes p { font-size: 1rem; line-height: 1.6; }
.prose .footnotes hr { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: var(--measure);
  margin-top: 3rem;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.pager a:hover { background: var(--surface-2); }
.pager-next { grid-column: 2; text-align: right; }
.pager-dir { font-family: var(--sans); font-size: 0.8rem; color: var(--faint); }
.pager-title { line-height: 1.35; }

.hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin: 0.5rem 0 2.5rem;
}
.hero-image { width: min(60vw, 15rem); justify-self: center; }
.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem);
  line-height: 1.1;
  text-wrap: balance;
}
.tagline { color: var(--muted); font-size: 1.3rem; line-height: 1.5; margin: 0.9rem 0 1.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { filter: brightness(1.08); }
.button-quiet { background: var(--surface); color: var(--text); }

@media (min-width: 720px) {
  .hero { grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; }
}

.home-intro h2 { margin-top: 0; }

.year { margin-top: 2.75rem; scroll-margin-top: 1rem; }
.year h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; margin: 0 0 0.9rem; }
.letter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 720px) {
  .letter-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.letter-list a {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  column-gap: 0.5rem;
  height: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.letter-list a:hover { background: var(--surface-2); }
.letter-num { grid-row: span 2; color: var(--faint); font-family: var(--sans); font-size: 0.85rem; padding-top: 0.2rem; font-variant-numeric: tabular-nums; }
.letter-title { font-weight: 700; line-height: 1.3; }
.letter-summary { color: var(--muted); font-size: 0.98rem; line-height: 1.45; margin-top: 0.2rem; }

.site-footer {
  padding: 1.5rem 1rem 2rem;
  background: var(--surface);
  font-family: var(--sans);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 599px) {
  body { font-size: 1.05rem; }
  .prose p, .prose li { font-size: 1.1rem; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: auto; }
}

.header-link {
  margin-left: auto;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  text-decoration: none;
}
.header-link:hover { background: var(--surface-2); color: var(--text); }

.toc-home {
  display: block;
  margin: 0.75rem 0 0.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.toc-home:hover { background: var(--surface); }
.toc-home[aria-current] { background: var(--accent-low); }
.toc-back { margin-top: 1rem; color: var(--muted); font-weight: 400; }
.toc-year > summary span:first-child { line-height: 1.35; }
@media (min-width: 960px) {
  .toc-home { margin-top: 0; }
}

.prose aside {
  margin: 1.75rem 0;
  padding: 1.1rem 1.35rem;
  border-radius: 0.75rem;
}
.prose aside.note { background: var(--note-bg); }
.prose aside.scripture { background: var(--surface); }
.prose aside.question { background: var(--surface); }
.prose aside > :last-child { margin-bottom: 0; }
.prose aside p { font-size: 1.1rem; }
.prose .aside-title {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--writ);
}
.prose aside.note .aside-title, .prose aside.question .aside-title { color: var(--accent); }

.diarize {
  margin-right: 0.45rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.muted-passage { color: var(--muted); }

.letter-meta-line p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.letter-meta-line.right p { text-align: right; }

.genesis-list a { grid-template-columns: minmax(0, 1fr); }
