/* Aggadata — essay site. One stylesheet, no build step, no JavaScript.
   Palette: warm paper, dark ink, one deep-red accent. Dark mode follows the system. */

:root {
  --paper: #faf6ee;
  --paper-2: #f1ebdf;
  --ink: #1f1a17;
  --ink-2: #5a524b;
  --ink-3: #8b8178;
  --accent: #8c2f39;
  --accent-2: #b8863b;
  --rule: #d9d0c1;
  --measure: 38rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, "Times New Roman", serif;
  --hebrew: "SBL Hebrew", "Ezra SIL", "Frank Ruehl CLM", "Times New Roman", "Arial Hebrew", David, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f;
    --paper-2: #211c17;
    --ink: #ece5d8;
    --ink-2: #b7ad9f;
    --ink-3: #85796c;
    --accent: #e0a05a;
    --accent-2: #c9945a;
    --rule: #3a322a;
  }
}

* { 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: 1.1875rem;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum";
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---- header / footer ---- */
.top {
  display: flex; justify-content: space-between; align-items: baseline;
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto; padding: 1.25rem 1.5rem 0;
}
.brand { font-variant: small-caps; letter-spacing: 0.08em; font-size: 1.05rem; color: var(--ink-2); }
.langs a { margin-left: 0.9rem; font-size: 0.85rem; letter-spacing: 0.1em; color: var(--ink-3); }
.langs a.current { color: var(--accent); border-bottom: 2px solid var(--accent); }
.bottom {
  max-width: var(--measure); margin: 4rem auto 3rem; padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.9rem; text-align: center;
}
.bottom p { margin: 0.3rem 0; }

/* ---- layout ---- */
main { max-width: var(--measure); margin: 0 auto; padding: 0 1.5rem; }
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.site-title {
  margin: 0; font-weight: 400; font-size: 3rem; letter-spacing: 0.02em; line-height: 1.1;
}
.site-title::after {
  content: ""; display: block; width: 3rem; height: 2px; background: var(--accent-2); margin: 1.1rem auto 0;
}
.tagline { margin: 1rem 0 0; color: var(--ink-2); font-style: italic; font-size: 1.15rem; }

.notice {
  background: var(--paper-2); border-left: 3px solid var(--accent-2);
  padding: 0.6rem 1rem; margin: 1.5rem 0; font-size: 0.95rem; color: var(--ink-2);
}

/* ---- essay ---- */
.essay-head { margin: 2.5rem 0 2.5rem; }
.crumb { margin: 0 0 1.5rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }
.crumb a { color: var(--ink-3); }
.essay-head h1 { font-weight: 400; font-size: 2.4rem; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
.subtitle { margin: 0.75rem 0 0; font-size: 1.25rem; line-height: 1.4; color: var(--ink-2); font-style: italic; }
.sources { margin: 1rem 0 0; font-size: 0.9rem; color: var(--ink-3); letter-spacing: 0.02em; }
.intro .essay-head { margin-top: 1rem; }
.intro .essay-head h1 { font-size: 1.9rem; }

.body h2 {
  font-weight: 400; font-size: 1.55rem; line-height: 1.25; margin: 2.8rem 0 1rem;
}
.body h3 { font-weight: 600; font-size: 1.1rem; margin: 2.2rem 0 0.8rem; }
.body h4 { font-weight: 600; font-size: 1rem; margin: 1.8rem 0 0.6rem; }
.body p { margin: 0 0 1.1rem; }
.body p + p { text-indent: 0; }
.body hr {
  border: 0; height: auto; overflow: visible; margin: 2.8rem auto; text-align: center;
}
.body hr::after { content: "❧"; display: block; color: var(--accent-2); font-size: 1.3rem; line-height: 1; }
.body strong { font-weight: 600; }
.body ol, .body ul { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.body li { margin: 0.35rem 0; }
.body sup { line-height: 0; }

.body blockquote {
  margin: 1.6rem 0; padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--accent-2); color: var(--ink-2);
}
.body blockquote p { margin: 0 0 0.5rem; }
.body blockquote p:last-child { margin-bottom: 0; }
.body blockquote p.he { color: var(--ink); }
.body p.he {
  font-family: var(--hebrew);
  font-size: 1.35em; line-height: 1.7;
  text-align: right;
}

/* first paragraph after the title area gets a quiet drop cap on essay pages */
.page .body > p:first-of-type::first-letter,
.page .body > hr:first-child + h2 + p::first-letter {
  float: left; font-size: 3.4em; line-height: 0.85; padding: 0.08em 0.1em 0 0; color: var(--accent);
}

/* ---- essay list ---- */
.list { margin-top: 3.5rem; }
.list-title {
  font-weight: 400; font-size: 1.1rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; margin: 0 0 1.5rem;
}
.essays { list-style: none; margin: 0; padding: 0; }
.essays li { border-top: 1px solid var(--rule); }
.essays li:last-child { border-bottom: 1px solid var(--rule); }
.card { display: flex; gap: 1.2rem; padding: 1.3rem 0.4rem; color: inherit; }
.card:hover { text-decoration: none; background: var(--paper-2); }
.card .num { color: var(--accent-2); font-size: 1.6rem; line-height: 1; min-width: 1.6rem; text-align: right; padding-top: 0.15rem; }
.card-text { display: flex; flex-direction: column; gap: 0.25rem; }
.card-title { font-size: 1.35rem; line-height: 1.25; }
.card:hover .card-title { color: var(--accent); }
.card-sub { color: var(--ink-2); font-style: italic; line-height: 1.4; }
.card-src { color: var(--ink-3); font-size: 0.85rem; letter-spacing: 0.02em; }

/* ---- previous / next ---- */
.pager {
  display: flex; justify-content: space-between; gap: 1.5rem;
  margin: 3.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.pager a { display: flex; flex-direction: column; gap: 0.2rem; max-width: 48%; color: inherit; }
.pager a:hover { text-decoration: none; }
.pager a:hover .t { color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }
.pager .label { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.pager .t { font-size: 1.05rem; line-height: 1.3; }

/* ---- small screens ---- */
@media (max-width: 40rem) {
  body { font-size: 1.08rem; }
  .site-title { font-size: 2.3rem; }
  .essay-head h1 { font-size: 1.9rem; }
  .body h2 { font-size: 1.35rem; }
  .top { padding: 1rem 1rem 0; }
  main { padding: 0 1.1rem; }
  .card { gap: 0.9rem; }
  .card .num { font-size: 1.3rem; min-width: 1.3rem; }
}
@media print {
  .top, .bottom, .pager, .notice { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
