/* Great Beautiful Empty — reader styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #faf8f5;
  --bg-elev: #fffefb;
  --text: #2a2520;
  --text-mid: #6b6158;
  --text-light: #9a8f84;
  --accent: #8b7355;
  --accent-light: #c4b49a;
  --accent-dim: #d9cdb6;
  --border: #e5ddd3;
  --border-soft: #efeae2;
  --locked-bg: #f4efe6;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 18px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  font-size: 1.05rem;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem 1rem; z-index: 1000; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.5rem;
  background: rgba(250,248,245,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--sans); font-size: .85rem;
}
.topbar-title { font-family: var(--serif); font-weight: 500; font-size: 1rem; letter-spacing: .01em; }
.topbar-status { margin-left: auto; color: var(--text-mid); font-size: .8rem; }
.topbar-status strong { color: var(--text); font-weight: 500; }

.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 28px; height: 24px; flex-direction: column; justify-content: space-between;
}
.menu-toggle span { display:block; height: 2px; background: var(--text); border-radius: 1px; }

/* layout */
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 60px); }

/* sidebar */
.sidebar {
  position: sticky; top: 60px; align-self: start;
  height: calc(100vh - 60px); overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  background: var(--bg);
}
.sidebar-inner { padding: 2rem 1.5rem 3rem; }
.sidebar-logo {
  display: block; font-family: var(--serif); font-size: 1.4rem; line-height: 1.05;
  font-weight: 400; color: var(--text); margin-bottom: .5rem; letter-spacing: -.005em;
}
.sidebar-blurb { font-size: .8rem; color: var(--text-light); font-family: var(--sans); margin-bottom: 2rem; line-height: 1.5; }
.sidebar-section { margin-bottom: 1.4rem; }
.sidebar-section-title {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: .55rem; padding-left: .25rem;
}
.sidebar-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: .5rem;
  padding: .35rem .5rem; margin: 0 -.5rem;
  font-size: .92rem; line-height: 1.3;
  color: var(--text); border-radius: 3px;
  border-left: 2px solid transparent;
  transition: background .12s, border-color .12s, color .12s;
}
.sidebar-link:hover { background: var(--bg-elev); }
.sidebar-link.active { border-left-color: var(--accent); background: var(--bg-elev); color: var(--text); }
.sidebar-link[data-locked="true"] { color: var(--text-light); }
.sidebar-link[data-locked="true"]:hover { color: var(--text-mid); }
.ch-meta { font-family: var(--sans); font-size: .68rem; color: var(--text-light); white-space: nowrap; flex-shrink: 0; }
.lock-icon { display: inline-block; margin-right: .35em; color: var(--accent-dim); }

.sidebar-foot {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border-soft);
  font-family: var(--sans); font-size: .78rem; color: var(--text-mid);
}
.sidebar-foot a { color: var(--text-mid); }
.sidebar-foot a:hover { color: var(--accent); }
.sidebar-foot .dot { color: var(--text-light); margin: 0 .35rem; }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(42,37,32,.4);
  z-index: 40; opacity: 0; transition: opacity .2s;
}

/* content */
.content { padding: 3rem 0 6rem; min-width: 0; }
.chapter {
  display: none;
  max-width: 640px; margin: 0 auto; padding: 0 2rem;
}
.chapter.active { display: block; }
.chapter-header { margin-bottom: 2.5rem; }
.chapter-eyebrow {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 1rem;
}
.chapter-title {
  font-family: var(--serif); font-weight: 400; font-size: 2.4rem;
  line-height: 1.1; letter-spacing: -.01em; margin-bottom: .6rem; color: var(--text);
}
.chapter-sub {
  font-family: var(--sans); font-size: .85rem; color: var(--text-mid);
}
.chapter-body p { margin-bottom: 1.4em; }
.chapter-body p + p { text-indent: 1.5em; }
.chapter-body .verse {
  font-style: italic; text-align: center; margin: 2.5em auto; color: var(--text-mid);
  font-size: 1.05em; line-height: 1.8; letter-spacing: .01em;
  max-width: 28em;
}
.chapter-body .parting {
  font-style: italic; text-align: center; color: var(--text-mid);
  margin: 3em auto 2em; max-width: 28em; font-size: 1.05em; line-height: 1.7;
  border-top: 1px solid var(--border-soft); padding-top: 2em;
}
.section-header {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.35rem;
  margin: 3em 0 1.5em; color: var(--text); letter-spacing: -.005em;
}

/* pace picker */
.chapter--pace .chapter-body { max-width: 520px; }
.pace-options { display: flex; flex-direction: column; gap: .8rem; margin: 2rem 0 1.5rem; }
.pace-option {
  text-align: left; padding: 1.1rem 1.3rem; border: 1px solid var(--border);
  background: var(--bg-elev); border-radius: 6px; cursor: pointer;
  font-family: var(--serif); transition: border-color .15s, background .15s;
}
.pace-option:hover { border-color: var(--accent); }
.pace-option--selected { border-color: var(--accent); background: #fffaf2; }
.pace-option-name {
  font-size: 1.15rem; color: var(--text); margin-bottom: .25rem; letter-spacing: -.005em;
}
.pace-option-detail { font-size: .9rem; color: var(--text-mid); font-family: var(--sans); }
.pace-recommended {
  display: inline-block; font-family: var(--sans); font-size: .65rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--accent);
  background: rgba(139, 115, 85, .08); padding: .2em .55em; border-radius: 100px;
  margin-left: .35em; vertical-align: middle;
}
.pace-confirm {
  font-family: var(--sans); font-size: .85rem; color: var(--accent);
  background: rgba(139, 115, 85, .08); padding: .7rem 1rem; border-radius: 4px;
}

.locked-cta-row { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.locked-cta--ghost { background: transparent; color: var(--text-mid); border-color: var(--border); }
.locked-cta--ghost:hover { background: var(--bg-elev); color: var(--accent); border-color: var(--accent); }
.locked-date-iso { font-family: var(--sans); font-size: .75em; color: var(--text-light); display: block; margin-top: .35em; letter-spacing: .02em; }

/* chapter plate (image at title-card, body stays text-only) */
.chapter-plate {
  margin: 2.5rem auto 3rem;
  max-width: 540px;
  text-align: center;
}
.chapter-plate[hidden] { display: none; }
.chapter-plate img {
  width: 100%; height: auto;
  display: block;
  margin: 0 auto 1.2rem;
  filter: contrast(1.02);
}
.chapter-plate figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: .92rem;
  color: var(--text-light);
  letter-spacing: .01em;
}

/* hero / intro */
.chapter--intro { max-width: 720px; padding-top: 4rem; }
.hero { text-align: center; padding: 3rem 1rem; }
.hero-mark {
  font-size: 4rem; color: var(--accent-dim); line-height: 1; margin-bottom: 1.5rem;
  font-family: var(--serif); font-weight: 300;
}
.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: 3rem;
  line-height: 1.05; letter-spacing: -.02em; margin-bottom: 1rem; color: var(--text);
}
.hero-sub {
  font-family: var(--serif); font-style: italic; font-size: 1.2rem;
  color: var(--text-mid); margin-bottom: 2rem;
}
.hero-status {
  font-family: var(--sans); font-size: .9rem; color: var(--text-mid);
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  border-radius: 100px; padding: .5rem 1.2rem; display: inline-block; margin-bottom: 2.5rem;
}
.hero-status strong { color: var(--text); font-weight: 500; }
.hero-cta-row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-cta {
  font-family: var(--sans); font-size: .9rem; padding: .7rem 1.5rem;
  border-radius: 100px; border: 1px solid var(--accent); transition: all .15s;
}
.hero-cta--primary { background: var(--accent); color: var(--bg); }
.hero-cta--primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.hero-cta--ghost { background: transparent; color: var(--accent); }
.hero-cta--ghost:hover { background: var(--accent); color: var(--bg); }
.hero-foot { font-family: var(--sans); font-size: .8rem; color: var(--text-light); }

/* locked chapter */
.chapter--locked .chapter-title { color: var(--text-mid); }
.chapter--locked .chapter-eyebrow::before { content: "○ "; color: var(--accent-dim); }
.locked-panel {
  background: var(--locked-bg); border-radius: 6px;
  padding: 3rem 2rem; text-align: center; margin-top: 1rem;
}
.locked-eyebrow {
  font-family: var(--sans); font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-mid); margin-bottom: .8rem;
}
.locked-date {
  font-family: var(--serif); font-size: 1.6rem; color: var(--text); margin-bottom: 1.2rem;
  letter-spacing: -.005em;
}
.locked-text {
  max-width: 28em; margin: 0 auto 1.5rem; color: var(--text-mid);
  font-size: 1rem; line-height: 1.6;
}
.locked-cta {
  font-family: var(--sans); font-size: .85rem; padding: .55rem 1.3rem;
  border-radius: 100px; background: transparent; border: 1px solid var(--accent);
  color: var(--accent); display: inline-block; transition: all .15s;
}
.locked-cta:hover { background: var(--accent); color: var(--bg); }

/* form */
.form-body { max-width: 520px; }
.form-body p { margin-bottom: 1.4em; color: var(--text-mid); }
.form { margin-top: 2rem; }
.form-honey { position: absolute; left: -9999px; }
.form-row { display: block; margin-bottom: 1.2rem; }
.form-row > span {
  display: block; font-family: var(--sans); font-size: .8rem;
  color: var(--text-mid); margin-bottom: .35rem; letter-spacing: .02em;
}
.form-row > span em { font-style: normal; color: var(--text-light); }
.form-row input {
  width: 100%; padding: .7rem .9rem;
  font-family: var(--serif); font-size: 1rem; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 4px; transition: border-color .15s;
}
.form-row input:focus { outline: none; border-color: var(--accent); }
.form-checks {
  border: none; margin: 1.8rem 0 1.5rem; padding: 1.2rem; background: var(--bg-elev);
  border-radius: 4px; border: 1px solid var(--border-soft);
}
.form-checks legend {
  font-family: var(--sans); font-size: .75rem; color: var(--text-mid);
  letter-spacing: .12em; text-transform: uppercase; padding: 0 .6rem; margin-left: -.6rem;
}
.check {
  display: flex; align-items: flex-start; gap: .7rem;
  padding: .55rem 0; cursor: pointer; line-height: 1.45;
}
.check input { margin-top: .3em; flex-shrink: 0; accent-color: var(--accent); }
.check span { font-size: .98rem; color: var(--text); }
.check span em { color: var(--text-light); font-style: italic; font-size: .9em; }
.form-submit {
  font-family: var(--sans); font-size: .92rem; font-weight: 500;
  padding: .8rem 2rem; background: var(--accent); color: var(--bg);
  border: none; border-radius: 100px; cursor: pointer; transition: background .15s;
}
.form-submit:hover { background: var(--text); }
.form-submit:disabled { background: var(--text-light); cursor: wait; }
.form-fineprint {
  font-size: .82rem; color: var(--text-light); margin-top: 1.2rem; line-height: 1.5;
}
.form-result {
  margin-top: 1rem; padding: .9rem 1rem; border-radius: 4px;
  font-family: var(--sans); font-size: .9rem;
}
.form-result.success { background: #eef5ee; color: #3a5a3a; }
.form-result.error   { background: #f5eeee; color: #6a3838; }

.edition-list {
  list-style: none; margin: 1.5rem 0 2rem;
}
.edition-list li {
  padding: 1rem 0; border-bottom: 1px solid var(--border-soft);
  color: var(--text-mid); font-size: .98rem; line-height: 1.55;
}
.edition-list li strong { color: var(--text); font-weight: 500; }
.muted { color: var(--text-light); font-size: .9rem; font-style: italic; }

/* footer */
.site-foot {
  text-align: center; max-width: 640px; margin: 6rem auto 0;
  padding: 3rem 2rem 2rem; border-top: 1px solid var(--border-soft);
  font-family: var(--sans); font-size: .8rem; color: var(--text-light);
}
.foot-mark { font-size: 1.6rem; color: var(--accent-dim); margin-bottom: 1rem; line-height: 1; font-family: var(--serif); }
.foot-line { margin-bottom: .35rem; }
.foot-meta a { color: var(--text-light); }
.foot-meta a:hover { color: var(--accent); }

/* mobile */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .menu-toggle { display: flex; }
  .topbar-status { display: none; }
  .sidebar {
    position: fixed; top: 60px; left: 0; height: calc(100vh - 60px);
    width: 280px; transform: translateX(-100%); transition: transform .25s ease;
    z-index: 45; background: var(--bg);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(42,37,32,.1); }
  .sidebar-overlay.open { display: block; opacity: 1; }
  .content { padding: 2rem 0 4rem; }
  .chapter { padding: 0 1.5rem; }
  .hero-title { font-size: 2.2rem; }
  .chapter-title { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
