/* User Provided Stylesheet */

/* Book-like typography and palette for Robots That Perceive.
   Literata is a serif designed for long-form screen reading; JetBrains Mono for code. */
@import url("https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;0,7..72,700;1,7..72,400&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  --rtp-ink: #1f3a5f;
  --rtp-rust: #9a4a16;
  --rtp-paper: #fbfaf6;
  --rtp-rule: #e4dfd3;
}

html:not(.dark) body { background: var(--rtp-paper); }

article, .article, .prose {
  font-family: "Literata", Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  line-height: 1.72;
}
.prose p, .prose li { max-width: 72ch; }

article h1, article h2, article h3, .prose h1, .prose h2, .prose h3 {
  font-family: "Literata", Georgia, serif;
  letter-spacing: -0.01em;
}
html:not(.dark) article h1, html:not(.dark) article h2 { color: var(--rtp-ink); }
.prose h2 { border-bottom: 1px solid var(--rtp-rule); padding-bottom: 0.3rem; margin-top: 2.2rem; }

code, pre, .cm-editor, kbd { font-family: "JetBrains Mono", ui-monospace, monospace !important; font-size: 0.88em; }

/* Equations: a little breathing room, like a printed book */
.math-display, .katex-display { margin: 1.4rem 0 !important; }

/* Figures and captions */
figure figcaption { font-size: 0.92rem; color: #5b5648; font-style: normal; }
html.dark figure figcaption { color: #bdb7a8; }

/* Tables */
.prose table { font-size: 0.95rem; }
html:not(.dark) .prose thead { border-bottom: 2px solid var(--rtp-ink); }

/* Home-page chapter cards */
html:not(.dark) .card, html:not(.dark) [class*="card"] a { border-color: var(--rtp-rule); }
html:not(.dark) .card:hover { border-color: var(--rtp-rust); }

/* Links */
html:not(.dark) .prose a { color: var(--rtp-ink); text-decoration-color: rgba(154, 74, 22, 0.45); text-underline-offset: 2px; }
html:not(.dark) .prose a:hover { color: var(--rtp-rust); }
