/* ── Seth Money Sessions — Stylesheet ── */

:root {
  --bg: #fdfaf5;
  --bg-warm: #faf6ed;
  --text: #2c2416;
  --text-secondary: #6b5e4a;
  --text-tertiary: #9b8b70;
  --accent: #8b6914;
  --accent-light: #c4a44a;
  --accent-bg: #fef9ef;
  --border: #e0d5c0;
  --border-light: #ede4d0;
  --surface: #ffffff;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: 'Palatino', 'Georgia', serif;
  --max-width: 740px;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg: #1a1a18;
  --bg-warm: #1f1e1a;
  --text: #e8e3d5;
  --text-secondary: #b8af9a;
  --text-tertiary: #7a7260;
  --accent: #d4a84b;
  --accent-light: #b8903a;
  --accent-bg: #2a2618;
  --border: #3a3528;
  --border-light: #2e2a20;
  --surface: #252420;
}

/* ── Dark Mode Toggle ── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-left: 1rem;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--accent-light); color: var(--accent); }
[data-theme="dark"] .shortcuts-bar kbd { background: #2e2a20; border-color: #4a4535; color: #b8af9a; }

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

html { font-size: 18px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

/* ── Navigation ── */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-home {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 1.5rem; }

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent-light);
}

.nav-current {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.nav-sep {
  color: var(--border);
  font-size: 0.88rem;
  user-select: none;
}

/* ── Main Content ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.subtitle-secondary {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  margin-top: 1rem;
}

/* ── Table of Contents ── */
.toc h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.toc-list { list-style: none; }

.toc-list li {
  border-bottom: 1px solid var(--border-light);
}

.toc-list li a {
  display: grid;
  grid-template-columns: 36px 1fr 200px;
  gap: 0.75rem;
  padding: 0.75rem 0.4rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  align-items: start;
}

.toc-list li a:hover { background: var(--accent-bg); }

.toc-num {
  color: var(--accent-light);
  font-size: 0.82rem;
  font-family: var(--font-heading);
  text-align: right;
  padding-top: 1px;
}

.toc-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toc-label {
  font-weight: 600;
  line-height: 1.4;
}

.toc-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.toc-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: right;
}

.toc-date {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.toc-book {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.3;
}

/* ── Session Page ── */
.session-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.session-book {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.session-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.session-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.session-display-date {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.session-body {
  font-size: 1rem;
  line-height: 1.85;
}

.session-body p {
  margin-bottom: 0.9rem;
}

.session-body p:empty { display: none; }

.session-marker {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  margin: 2rem 0 0.1rem;
}

.session-date {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.chapter-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--accent);
  text-align: center;
  margin: 1.5rem 0 1rem;
}

.session-body em, .session-body i {
  font-style: italic;
  color: #5a4a2a;
}
[data-theme="dark"] .session-body em,
[data-theme="dark"] .session-body i { color: #c4a44a; }

.session-body em.editorial {
  font-style: italic;
  color: #8b6914;
  font-size: 0.93em;
}
[data-theme="dark"] .session-body em.editorial { color: #b8903a; }

.session-body strong {
  font-weight: 600;
  color: #2c2416;
}
[data-theme="dark"] .session-body strong { color: #e8e3d5; }

.session-body u {
  text-decoration: underline;
  text-decoration-color: var(--accent-light);
  text-underline-offset: 2px;
}

/* ── Footer / Prev-Next ── */
.session-footer {
  max-width: var(--max-width);
  margin: 2rem auto 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
}

.prev-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.prev-next a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.2s;
}

.prev-next a:hover {
  background: var(--accent-bg);
  border-color: var(--accent-light);
}

.prev-next .toc-link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  border: none;
}

.prev-next .toc-link:hover { color: var(--accent); background: none; }

.page-footer {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

/* ── Timeline ── */
.timeline { margin-top: 1rem; }

.year-group { margin-bottom: 2.5rem; }

.year-heading {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.year-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: normal;
}

.year-sessions { list-style: none; }

.year-sessions li { border-bottom: 1px dotted var(--border-light); }

.year-sessions li a {
  display: grid;
  grid-template-columns: 130px 120px 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0.3rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  align-items: baseline;
}

.year-sessions li a:hover { background: var(--accent-bg); }

.tl-date {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.tl-label {
  font-weight: 600;
  font-size: 0.88rem;
}

.tl-subtitle {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ── Keyboard Shortcuts ── */
.shortcuts-bar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  opacity: 0.65;
  transition: opacity 0.3s;
}

.shortcuts-bar:hover { opacity: 1; }

.shortcuts-bar kbd {
  background: #f0ebe0;
  border: 1px solid #d5c9b0;
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 0.7rem;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  html { font-size: 16px; }
  main { padding: 1.5rem 1rem; }

  .top-nav { padding: 0.75rem 1rem; }

  .page-header h1 { font-size: 1.7rem; }
  .session-header h1 { font-size: 1.25rem; }

  .toc-list li a {
    grid-template-columns: 24px 1fr;
    gap: 0.5rem;
  }
  .toc-meta { display: none; }

  .year-sessions li a {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .prev-next { flex-direction: column; }
  .shortcuts-bar { display: none; }
}

[data-theme="dark"] .top-nav { background: rgba(26,26,24,0.95); }
[data-theme="dark"] .session-body em,
[data-theme="dark"] .session-body i { color: #c4a44a; }

@media print {
  .top-nav, .session-footer, .shortcuts-bar { display: none; }
  body { font-size: 13px; line-height: 1.6; }
}
