:root {
  --bg:         #faf7f2;
  --bg-2:       #f0ebe2;
  --bg-3:       #e8e1d6;
  --text:       #2a1f14;
  --muted:      #7a6755;
  --accent:     #8b4513;
  --accent-lt:  #a0522d;
  --accent-dim: rgba(139,69,19,0.08);
  --line:       rgba(42,31,20,0.13);
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --max:        860px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.7; font-size: 1rem; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(calc(100% - 2.5rem), var(--max)); margin: 0 auto; }

/* ── Book nav ── */
.book-nav { background: var(--bg-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.book-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; gap: 1rem; flex-wrap: wrap; }
.book-nav-title { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.book-nav-links { display: flex; gap: 1.25rem; align-items: center; overflow-x: auto; scrollbar-width: none; }
.book-nav-links::-webkit-scrollbar { display: none; }
.book-nav-links a { font-size: 0.82rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color 0.2s; }
.book-nav-links a:hover, .book-nav-links a.active { color: var(--accent); }

/* ── Page header ── */
.page-header { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.75rem; }
.page-title { font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 400; line-height: 1.08; color: var(--text); }
.page-subtitle { font-family: var(--serif); font-size: 1.15rem; font-style: italic; color: var(--muted); margin-top: 0.6rem; }

/* ── Prose body ── */
.prose { padding: 3.5rem 0; }
.prose p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.85; color: var(--text); margin-bottom: 1.6rem; max-width: 66ch; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1.2; color: var(--text); margin: 3rem 0 1.1rem; padding-left: 1rem; border-left: 2px solid var(--accent); }
.prose h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; color: var(--text); margin: 2rem 0 0.8rem; }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }

/* ── Pullquote ── */
.pullquote { margin: 2.5rem 0; padding: 1.5rem 2rem; border-left: 3px solid var(--accent); background: var(--accent-dim); border-radius: 0 10px 10px 0; max-width: 66ch; }
.pullquote p { font-family: var(--serif); font-size: 1.2rem; font-style: italic; line-height: 1.6; color: var(--text); margin: 0; }

/* ── Letter ── */
.letter-wrap { margin: 2.5rem 0; max-width: 66ch; }
.letter-meta { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.letter-scan { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; }
.letter-scan img { width: 100%; }
.letter-body { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 2rem 2.25rem; }
.letter-body p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.85; color: var(--text); margin-bottom: 1.3rem; }
.letter-body p:last-child { margin-bottom: 0; }
.letter-note { font-size: 0.82rem; color: var(--muted); font-style: italic; margin-top: 0.75rem; }

/* ── Story card ── */
.story { margin: 3rem 0; border-top: 1px solid var(--line); padding-top: 2.5rem; max-width: 66ch; }
.story:first-of-type { border-top: none; padding-top: 0; }
.story-title { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; color: var(--text); margin-bottom: 0.3rem; }
.story-date { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; display: block; }
.story p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.85; color: var(--text); margin-bottom: 1.4rem; }
.story p:last-child { margin-bottom: 0; }

/* ── Feedback forms ── */
.feedback-shell { margin: 3rem 0 0; padding-top: 2.5rem; border-top: 1px solid var(--line); max-width: 72ch; }
.feedback-shell p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.8; color: var(--text); margin-bottom: 1.2rem; max-width: 66ch; }
.feedback-shell p:last-child { margin-bottom: 0; }
.feedback-layout { display: grid; gap: 1.25rem; align-items: start; margin-top: 1.5rem; }
.feedback-form,
.aside-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; }
.feedback-side { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.field-grid { display: grid; gap: 1rem; }
.field label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.choice-note { font-size: 0.72rem; font-weight: 500; letter-spacing: normal; text-transform: none; }
.input,
.textarea,
select.input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem; background: var(--bg); color: var(--text); font: inherit; }
.textarea { min-height: 220px; resize: vertical; }
.actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.6rem; }
.btn-primary,
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0.7rem 1.1rem; border: 1px solid var(--line); font-size: 0.88rem; font-weight: 700; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-ghost { background: var(--bg); color: var(--accent); }
.status { min-height: 1.4rem; margin: 0.85rem 0 0; color: var(--muted); font-size: 0.92rem; }
.status[data-state="error"] { color: #9f3527; }
.status[data-state="success"] { color: #2b6d43; }
.hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.aside-card h3 { margin: 0 0 0.65rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.aside-card ul { margin: 0; padding-left: 1.1rem; }
.aside-card li { font-family: var(--serif); font-size: 1rem; line-height: 1.7; color: var(--text); margin-bottom: 0.45rem; }

/* ── Chapter nav ── */
.chapter-nav { padding: 3rem 0; border-top: 1px solid var(--line); display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.chapter-nav-link { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.4rem; max-width: 260px; flex: 1; transition: border-color 0.2s; }
.chapter-nav-link:hover { border-color: var(--accent-lt); }
.chapter-nav-link .dir { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.3rem; }
.chapter-nav-link .lbl { font-family: var(--serif); font-size: 1.05rem; color: var(--text); font-weight: 500; }

/* ── Coming soon ── */
.coming { padding: 5rem 0; }
.coming p { font-family: var(--serif); font-size: 1.2rem; color: var(--muted); font-style: italic; }

/* ── Footer ── */
.site-footer { padding: 2rem 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.site-footer p { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 600px) {
  .book-nav-inner { align-items: flex-start; }
  .book-nav-links { width: 100%; gap: 0.75rem 0.95rem; padding-top: 0.35rem; flex-wrap: wrap; overflow-x: visible; }
  .letter-body { padding: 1.4rem 1.25rem; }
  .pullquote { padding: 1.2rem 1.4rem; }
}

@media (min-width: 960px) {
  .feedback-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
