:root {
  color-scheme: light;
  --page-bg: #f5f3ee;
  --paper: #fffdfa;
  --ink: #1f242b;
  --muted: #5f6975;
  --line: #d7d2c8;
  --accent: #365f6f;
  --accent-strong: #234250;
  --code-bg: #efebe3;
  --text-column: 78ch;
  --note-column: 13rem;
  --note-gap: 1.6rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

.site-shell {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  min-height: 100vh;
}

.site-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 1rem 2rem;
  border-right: 1px solid var(--line);
  background: #fbf8f1;
}

.site-title {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
}

.site-toc {
  margin-top: 1.45rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-toc__label {
  max-width: none;
  margin: 1.25rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-toc__list {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-toc__list li {
  max-width: none;
}

.site-toc a {
  display: block;
  padding: 0.34rem 0.45rem;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
  text-decoration: none;
}

.site-toc a:hover,
.site-toc a[aria-current="page"] {
  border-left-color: var(--accent);
  background: #efe9dc;
  color: var(--accent-strong);
}

.page-content {
  display: grid;
  grid-template-columns:
    minmax(1rem, 1fr)
    minmax(0, var(--text-column))
    var(--note-column)
    minmax(1rem, 1fr);
  column-gap: var(--note-gap);
  width: min(100% - 2rem, 1320px);
  margin: clamp(1rem, 3vw, 2.5rem) auto 5rem;
  padding: clamp(1.2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(37, 31, 24, 0.08);
}

.page-content > * {
  grid-column: 2;
}

.home {
  display: block;
}

.home-lede {
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.thesis-meta {
  max-width: 64ch;
  margin: -0.6rem 0 1.3rem;
  color: var(--accent-strong);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.sidenote-number {
  color: var(--accent);
  cursor: pointer;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 0;
  vertical-align: super;
}

.margin-toggle {
  display: none;
}

.sidenote {
  float: right;
  clear: right;
  width: var(--note-column);
  margin: 0.15rem calc(-1 * (var(--note-column) + var(--note-gap))) 0.85rem var(--note-gap);
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.38;
}

.sidenote__number {
  color: var(--accent-strong);
  font-weight: 700;
}

.references-list {
  padding-left: 1.15rem;
  font-size: 0.92rem;
}

.references-list li {
  margin-bottom: 0.42rem;
}

.toc-list-page {
  max-width: 82ch;
  margin: 1rem 0 2.2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.toc-list-page li {
  max-width: none;
  border-bottom: 1px solid var(--line);
}

.toc-list-page a {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  text-decoration: none;
}

.toc-list-page strong {
  display: block;
  color: var(--ink);
}

.toc-list-page span {
  display: block;
  color: var(--muted);
  font-size: 0.94rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0;
}

h2 {
  margin-top: 2.4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.45rem;
}

h3 {
  margin-top: 1.8rem;
  font-size: 1.16rem;
}

p,
li {
  max-width: var(--text-column);
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #eee8dc;
}

code {
  padding: 0.08em 0.25em;
  border-radius: 0.18em;
  background: var(--code-bg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.term-script {
  display: inline-block;
  padding: 0 0.16em;
  border-radius: 0.18em;
  background: #f1eee7;
  color: #111827;
  font-size: 1.08em;
  line-height: 1.4;
  unicode-bidi: isolate;
}

.term-script--he,
.term-script--ar,
.term-script--arc {
  direction: rtl;
  font-family: "SBL Hebrew", "Ezra SIL", "Noto Sans Hebrew", "Noto Sans Arabic", "Times New Roman", serif;
}

.term-translit {
  color: #344152;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.term-gloss {
  color: var(--muted);
  font-style: italic;
}

pre {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  background: var(--code-bg);
}

pre code {
  padding: 0;
  background: transparent;
}

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

.chart-figure {
  margin: 1.35rem 0 1.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.chart-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.chart-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.86rem;
  line-height: 1.4;
}

.biblical-example {
  margin: 1.35rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid #51606f;
  background: #f7f7f4;
  color: #20242a;
  font-size: 0.96rem;
  line-height: 1.55;
}

.biblical-example__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  margin-bottom: 0.65rem;
  color: #4b5563;
}

.biblical-example__ref {
  font-weight: 700;
  color: #1f2933;
}

.biblical-example__meta {
  font-size: 0.82rem;
}

.biblical-example__line {
  margin: 0.35rem 0;
}

.biblical-example__hebrew {
  font-size: 1.22rem;
  line-height: 1.9;
  text-align: right;
  unicode-bidi: isolate;
}

.biblical-example__transliteration {
  font-size: 0.92rem;
  color: #394150;
}

.biblical-example__translation {
  margin-top: 0.55rem;
  color: #242a31;
}

.biblical-example__translation--en {
  color: #56616f;
  font-size: 0.9rem;
}

.biblical-example__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.biblical-example__tag {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1.2;
}

.biblical-example--missing {
  border-color: #b14b4b;
  background: #fff1f1;
}

.syx {
  padding: 0.04em 0.18em;
  border-radius: 0.2em;
  border-bottom: 2px solid currentColor;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.biblical-forms-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.biblical-forms-legend__item {
  display: inline-flex;
  gap: 0.3rem;
  align-items: baseline;
}


.syx.imp {
  background: #dcefed;
  border-color: #3d8c87;
  color: #173f3c;
}

.syx.inf {
  background: #f1e2ee;
  border-color: #9a5c87;
  color: #4b2740;
}

.syx.p {
  background: #e7e9ef;
  border-color: #697082;
  color: #2d323c;
}

.syx.q {
  background: #fde8d7;
  border-color: #d16f32;
  color: #5c2d12;
}

.syx.qa {
  background: #fde8d7;
  border-color: #d16f32;
  color: #5c2d12;
}

.syx.qc {
  background: #fde8d7;
  border-color: #d16f32;
  color: #5c2d12;
}

.syx.qp {
  background: #fde8d7;
  border-color: #d16f32;
  color: #5c2d12;
}

.syx.wplusy {
  background: #dff1fb;
  border-color: #2f83b7;
  color: #123e57;
}

.syx.wq {
  background: #fff0bd;
  border-color: #bd8c17;
  color: #563e06;
}

.syx.wy {
  background: #e0f4df;
  border-color: #4d9a52;
  color: #1f4c24;
}

.syx.y {
  background: #dff1fb;
  border-color: #2f83b7;
  color: #123e57;
}

.syx.yp {
  background: #e8e3ff;
  border-color: #7961c8;
  color: #32265f;
}


sub.accent {
  line-height: 0;
}

@media (max-width: 1180px) {
  .page-content {
    display: block;
  }

  .sidenote {
    float: none;
    clear: both;
    display: block;
    width: auto;
    margin: 0.35rem 0 0.85rem 1rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--line);
  }
}

@media (max-width: 820px) {
  html {
    font-size: 16px;
  }

  .site-shell {
    display: block;
  }

  .site-sidebar {
    position: static;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-toc__list {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  }

  .page-content {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .toc-list-page a {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
