:root { color-scheme: light dark; }

body {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 18px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;

  /* Dark look (force it) */
  background: #0f0f0f;
  color: #eaeaea;
}

nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  opacity: 0.92;
  margin-bottom: 14px;
}

nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  color: inherit;
}

nav a:hover { border-bottom-color: currentColor; }

h1 { line-height: 1.2; margin: 10px 0 8px; }
h2 { margin-top: 26px; }

hr { margin: 22px 0; opacity: 0.35; border: none; border-top: 1px solid currentColor; }

.meta {
  font-size: 0.95rem;
  opacity: 0.85;
  margin: 0;
}

blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 3px solid currentColor;
  opacity: 0.95;
}

footer {
  margin-top: 28px;
  font-size: 0.9rem;
  opacity: 0.8;
}

footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  color: inherit;
}

footer a:hover { border-bottom-color: currentColor; }

h1, h2, h3 {
  color: #ffffff !important;
}

.note,
.meta,
.email-header {
  color: #cfcfcf !important;
}

a {
  color: #9ad1ff !important;
}

/* FORCE TEXT COLOR CONSISTENCY */
body,
body * {
  color: #eaeaea !important;
}

/* ============================= */
/* Top Navigation Bar */
/* ============================= */

.site-header {
  width: 100%;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.site-nav {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-links a {
  margin-left: 1.5rem;
  text-decoration: none;
}

.site-links a:hover {
  text-decoration: underline;
}

/* ============================= */
/* Chapter List */
/* ============================= */

.chapter-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.chapter-list li {
  margin: 0 0 1rem;
}

.chapter-list a {
  text-decoration: none;
}

.chapter-list a:hover {
  text-decoration: underline;
}

/* Email helpers (optional, but nice) */
.email-header { font-size: 0.95rem; opacity: 0.85; }
.note { font-size: 0.95rem; opacity: 0.85; font-style: italic; }
