:root {
  --navy: #1A2744;
  --navy-deep: #0F1A2E;
  --gold: #C5973B;
  --gold-light: #E8D5A8;
  --cream: #FAF8F4;
  --text: #2C2C2C;
  --text-light: #666;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Source Sans 3', sans-serif; color: var(--text); background: var(--cream); line-height: 1.7; }

/* NAV */
nav { background: var(--navy-deep); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
nav .nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 56px; }
nav .logo { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; font-weight: 700; color: white; text-decoration: none; }
nav .logo span { color: var(--gold); }
nav .nav-links { display: flex; gap: 6px; align-items: center; }
nav .nav-links a { color: rgba(255,255,255,0.8); text-decoration: none; padding: 8px 14px; border-radius: 6px; font-size: 0.9rem; transition: all 0.2s; }
nav .nav-links a:hover, nav .nav-links a.active { background: rgba(255,255,255,0.1); color: white; }
nav .nav-links a.cta-nav { background: var(--gold); color: white; font-weight: 600; }
nav .nav-links a.cta-nav:hover { background: #b8892e; }
.lang-btn { font-size: 0.85rem !important; }
.hamburger { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* PAGE HEADER */
.page-header { background: var(--navy); color: white; padding: 40px 20px; text-align: center; }
.page-header h1 { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; }
.page-header p { color: var(--gold-light); margin-top: 8px; }

/* CONTAINER */
.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
section { padding: 60px 0; }
section h2 { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; color: var(--navy); margin-bottom: 20px; }
section h2::after { content: ''; display: block; width: 50px; height: 3px; background: var(--gold); margin: 10px 0 0; }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { background: white; border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border-top: 4px solid var(--gold); transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); }
.card h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 0.93rem; color: var(--text-light); line-height: 1.6; }

/* PAPER CARDS */
.paper-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 20px; border-left: 4px solid var(--gold); }
.paper-card h3 { font-family: 'Cormorant Garamond', serif; color: var(--navy); font-size: 1.2rem; margin-bottom: 6px; }
.paper-card .meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.paper-card p { font-size: 0.92rem; line-height: 1.6; }
.badge { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; margin-right: 6px; margin-top: 8px; }
.badge-submitted { background: #e8f5e9; color: #2e7d32; }
.badge-review { background: #fff3e0; color: #e65100; }
.badge-open { background: #e3f2fd; color: #1565c0; }

/* BOOK ROW */
.book-row { display: flex; gap: 40px; align-items: flex-start; margin: 30px 0; }
.book-row.reverse { flex-direction: row-reverse; }
.book-cover { flex-shrink: 0; width: 280px; }
.book-cover img { width: 100%; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.book-info { flex: 1; }
.book-info h2 { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: var(--navy); margin-bottom: 6px; }
.book-info h2::after { display: none; }
.book-subtitle { font-size: 1.1rem; color: var(--gold); margin-bottom: 6px; }
.book-meta { font-size: 0.9rem; color: var(--text-light); margin-bottom: 16px; }
.book-info h3 { font-size: 1.1rem; color: var(--navy); margin: 20px 0 12px; }

/* TOC */
.toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.toc-part { background: #f9f6f0; padding: 14px 16px; border-radius: 8px; border-left: 3px solid var(--gold); }
.toc-part h4 { font-size: 0.9rem; color: var(--navy); margin-bottom: 4px; }
.toc-part p { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; }

.divider { border: none; border-top: 2px solid var(--gold); margin: 50px auto; width: 40%; opacity: 0.4; }

/* CTA */
.cta-btn {
  display: inline-block; background: var(--gold); color: white;
  font-size: 1rem; font-weight: 600; padding: 14px 32px; border-radius: 8px;
  text-decoration: none; transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(197,151,59,0.3);
}
.cta-btn:hover { background: #b8892e; transform: translateY(-2px); }

/* FOOTER */
footer { background: var(--navy); color: rgba(255,255,255,0.6); text-align: center; padding: 28px 20px; font-size: 0.85rem; }
footer a { color: var(--gold-light); text-decoration: none; }

/* MOBILE */
@media (max-width: 700px) {
  .hamburger { display: block; }
  nav .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--navy-deep); padding: 10px; }
  nav .nav-links.open { display: flex; }
  .book-row, .book-row.reverse { flex-direction: column; }
  .book-cover { width: 200px; margin: 0 auto; }
}

/* Back to search results floating button */
.back-to-search {
  display:none; position:fixed; bottom:24px; right:24px; z-index:1000;
  background:#C5973B; color:white; border:none; border-radius:50px;
  padding:12px 20px; font-size:0.9rem; font-family:inherit; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,0.2); transition:all 0.2s;
  text-decoration:none;
}
.back-to-search:hover { background:#1A2744; transform:translateY(-2px); }
.back-to-search.visible { display:flex; align-items:center; gap:6px; }

/* Chapter navigation bar — sticky top */
.chapter-nav-bar {
  position:sticky; top:0; z-index:999;
  display:flex; justify-content:space-between; align-items:center;
  background:rgba(26,39,68,0.95); backdrop-filter:blur(8px);
  padding:8px 20px; gap:12px;
  border-bottom:2px solid #C5973B;
  font-family:'Source Sans 3',sans-serif; font-size:0.85rem;
}
.chapter-nav-bar a {
  color:#C5973B; text-decoration:none; font-weight:600;
  padding:6px 14px; border-radius:20px; transition:all 0.2s;
  white-space:nowrap;
}
.chapter-nav-bar a:hover {
  background:rgba(197,151,59,0.2); color:#e8d5a8;
}
.chapter-nav-bar .nav-current {
  color:rgba(255,255,255,0.8); font-size:0.8rem;
  text-align:center; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; flex:1; min-width:0;
}
.nav-prev { order:1; }
.nav-current { order:2; }
.nav-next { order:3; }
