@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400;1,600&family=Raleway:wght@400;500;600;700&display=swap');

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

:root {
  --bg:       #fafaf8;
  --text:     #2c2416;
  --muted:    #8a7c6a;
  --accent:   #8b5e3c;
  --accent2:  #c4933f;
  --border:   #e4ddd2;
  --sidebar-w: 240px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Progress bar ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 1000;
  transition: width .1s linear;
}

/* ── Layout ── */
.ro-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */
.ro-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 2rem 1.4rem;
}
.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.breadcrumb {
  display: flex;
  gap: .35rem;
  font-family: 'Raleway', sans-serif;
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: .4; }

.sb-chapter-label {
  font-family: 'Raleway', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.sb-chapters {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.sb-chapters a {
  font-family: 'Raleway', sans-serif;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  display: block;
  padding: .25rem .5rem;
  border-radius: 4px;
  transition: all .2s;
}
.sb-chapters a:hover, .sb-chapters a.active {
  color: var(--accent);
  background: rgba(139,94,60,0.08);
}

.sb-date {
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}
.sb-location {
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  color: var(--muted);
}
.sb-labels { display: flex; flex-direction: column; gap: .3rem; margin-top: .3rem; }
.label-tag {
  font-family: 'Raleway', sans-serif;
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 2px;
  background: rgba(139,94,60,0.08);
  border: 1px solid rgba(139,94,60,0.15);
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  transition: all .2s;
}
.label-tag:hover { background: rgba(139,94,60,0.15); }

.back-link {
  font-family: 'Raleway', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-top: auto;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }

/* ── Main reading area ── */
.ro-main {
  padding: 3rem 4rem 4rem;
  max-width: 680px;
}

.ro-header { margin-bottom: 2.5rem; text-align: center; }
.ro-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1rem;
}
.ro-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: .8rem;
}
.ro-ornament {
  font-size: 1.8rem;
  color: var(--accent2);
  opacity: .6;
}

/* ── Event body ── */
.event-body {
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--text);
}
.event-body h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 2rem;
}
.event-body p { margin-bottom: 1.2rem; }
.event-body strong {
  font-weight: 600;
  color: var(--accent);
  font-style: italic;
  font-size: 1.15em;
}

/* ── Footer ── */
.ro-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ro-layout { grid-template-columns: 1fr; }
  .ro-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 1.5rem 1rem; }
  .sidebar-content { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .sb-chapter-nav { width: 100%; }
  .sb-chapters { flex-direction: row; flex-wrap: wrap; }
  .sb-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
  .ro-main { padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  .ro-main { padding: 1.5rem 1rem; }
  .ro-title { font-size: 1.6rem; }
  .event-body { font-size: 1rem; }
}

/* ── Lightbox ── */
#lightbox{display:none;position:fixed;inset:0;background:rgba(0,0,0,.9);
  z-index:9999;align-items:center;justify-content:center;
  flex-direction:column;gap:.5rem}
#lightbox img{max-width:90vw;max-height:80vh;object-fit:contain}
.lb-close{position:fixed;top:1rem;right:1.5rem;font-size:2.5rem;
  color:#fff;cursor:pointer;line-height:1;opacity:.8}
.lb-close:hover{opacity:1}
.lb-nav{position:fixed;top:50%;transform:translateY(-50%);font-size:3rem;
  color:#fff;cursor:pointer;padding:.5rem;user-select:none;opacity:.7}
.lb-nav:hover{opacity:1}
.lb-prev{left:1rem}.lb-next{right:1rem}
.lb-caption{color:#ccc;font-size:.9rem;text-align:center;max-width:80vw}
