/* Prose styles for book chapter reading */
.prose {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.8;
  color: hsl(var(--color-text) / 0.90);
  max-width: 65ch;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: hsl(var(--color-text));
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid hsl(var(--color-primary) / 0.4);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 4vw, 2.125rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: hsl(var(--color-text));
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid hsl(var(--color-primary) / 0.5);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 600;
  line-height: 1.4;
  color: hsl(var(--color-text) / 0.92);
  margin-top: 3rem;
  margin-bottom: 0.75rem;
}

.prose h3::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: hsl(var(--color-accent));
  margin-right: 0.625rem;
  vertical-align: middle;
  position: relative;
  top: -0.1em;
}

.prose h4 {
  font-family: var(--font-display);
  font-size: clamp(1.065rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
  color: hsl(var(--color-text) / 0.85);
  margin-top: 2.5rem;
  margin-bottom: 0.625rem;
}

.prose h4::before {
  content: '//';
  font-family: var(--font-mono);
  color: hsl(var(--color-accent));
  margin-right: 0.5rem;
  font-weight: 500;
}

/* Lede paragraph — first p after H2/H3 */
.prose h2 + p,
.prose h3 + p {
  font-size: 1.175rem;
  color: hsl(var(--color-text) / 0.75);
  line-height: 1.85;
}

.prose p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.prose a {
  color: hsl(var(--color-primary) / 0.85);
  text-decoration: underline;
  text-decoration-color: hsl(var(--color-primary) / 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.prose a:hover {
  text-decoration-color: hsl(var(--color-primary));
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid hsl(var(--color-primary));
  background: hsl(var(--color-surface));
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: hsl(var(--color-text) / 0.75);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: hsl(var(--color-surface-light));
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  color: hsl(var(--color-accent));
}

.prose pre {
  margin: 2rem 0;
  padding: 1.5rem;
  background: hsl(var(--color-bg));
  border: 1px solid hsl(var(--color-text) / 0.08);
  border-radius: 0.75rem;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
  color: hsl(var(--color-text) / 0.87);
}

.prose ul,
.prose ol {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose li::marker {
  color: hsl(var(--color-primary));
}

.prose hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid hsl(var(--color-text) / 0.1);
}

.prose strong {
  color: hsl(var(--color-text));
  font-weight: 600;
}

.prose em {
  color: hsl(var(--color-text) / 0.9);
}

.prose img {
  border-radius: 0.75rem;
  margin: 2rem 0;
}
