/* Paper Mode: scientific article / arXiv-like layout */

body.paper-mode {
  background: #ffffff !important;
  color: #0f172a !important;
  font-family: 'Source Serif 4', 'Literata', 'EB Garamond', Georgia, serif;
}

body.paper-mode .main-content-wrap {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  color: #0f172a;
}

body.paper-mode .main-content-wrap h1,
body.paper-mode .main-content-wrap h2,
body.paper-mode .main-content-wrap h3,
body.paper-mode .main-content-wrap h4,
body.paper-mode .main-content-wrap p,
body.paper-mode .main-content-wrap li,
body.paper-mode .main-content-wrap span {
  color: #1e293b !important;
}

body.paper-mode .main-content-wrap strong {
  color: #0f172a !important;
}

body.paper-mode h1,
body.paper-mode h2,
body.paper-mode h3,
body.paper-mode h4 {
  font-family: inherit;
  font-weight: 600;
}

body.paper-mode main {
  counter-reset: section;
}
body.paper-mode .section-reveal h2,
body.paper-mode .section-spacing h2 {
  counter-increment: section;
}
body.paper-mode .section-reveal h2::before,
body.paper-mode .section-spacing h2::before {
  content: counter(section) ". ";
}

body.paper-mode .paper-ref {
  font-size: 0.9em;
  color: #334155;
  font-style: normal;
}

/* Hide or simplify non-paper UI in paper mode */
body.paper-mode .sidebar-nav,
body.paper-mode .terminal-wrap,
body.paper-mode .idea-graph-wrap {
  display: none !important;
}

body.paper-mode [data-paper-toggle] {
  display: block;
}
