:root {
  /* WSJ Dark Mode Theme */
  --bg-color: #121212;
  --sidebar-bg: #181818;
  --text-color: #e0e0e0;
  --text-muted: #a0a0a0;
  --accent-color: #5ba4e5; /* Lighter WSJ Blue for dark backgrounds */
  --border-color: #333333;
  --header-color: #ffffff;
  --hover-bg: #252525;
  
  /* Typography - WSJ Style maintained */
  --font-headline: 'Georgia', 'Times New Roman', Times, serif;
  --font-body: 'Georgia', 'Times New Roman', Times, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --sidebar-width: 300px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-title {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--header-color);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px double var(--border-color); /* Newspaper style separator */
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.volume {
  margin-bottom: 2rem;
}

.volume-title {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chapter-item a {
  display: block;
  padding: 0.5rem 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.chapter-item a:hover {
  color: var(--accent-color);
  background-color: var(--hover-bg);
}

.chapter-item a.active {
  color: var(--accent-color);
  font-weight: 700;
  border-left-color: var(--accent-color);
  background-color: var(--hover-bg);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 5rem 8rem;
  max-width: 1000px; /* Wider reading area */
}

/* Typography - Article */
article h1 {
  font-family: var(--font-headline);
  font-size: 3rem;
  font-weight: 700;
  color: var(--header-color);
  margin-bottom: 0.5rem;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

article .post-meta {
  font-family: var(--font-ui);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

article h2 {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--header-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

article h3 {
  font-family: var(--font-ui); /* Sans-serif subheads are common in news */
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: #ccc;
  text-transform: uppercase;
}

article p {
  margin-bottom: 1.25rem;
  font-size: 1.15rem; /* ~18px for body */
  line-height: 1.6;
  color: #d0d0d0; /* Soft white for long reading */
}

article ul, article ol {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #d0d0d0;
  margin-bottom: 1.25rem;
}

article a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 164, 229, 0.3);
}

article a:hover {
  border-bottom-color: var(--accent-color);
  background-color: rgba(91, 164, 229, 0.1);
}

article blockquote {
  border-left: 3px solid var(--header-color);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 2rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.25rem;
  font-family: var(--font-headline);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-ui);
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    background-color: var(--sidebar-bg);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 5rem 1.5rem 2rem 1.5rem;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }
  
  article h1 {
    font-size: 2.2rem;
  }
}
