/* Opt-in programming notes. The site's navigation and title keep --oa-font. */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600;7..72,700&family=Noto+Serif+SC:wght@400;500;600;700&display=swap");

:root {
  --oa-bg: #fefefe;
  --oa-text: #333333;
  --oa-muted: #737373;
  --oa-faint: #999999;
  --oa-line: #d9d9d9;
  --oa-line-soft: #eaeaea;
  --oa-link: #444444;
  --oa-code-bg: #f0f2f7;
  --oa-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --flow-serif: "Literata", "Noto Serif SC", "Songti SC", Georgia, serif;
}

body { background: var(--oa-bg) !important; }

.site-header, .site-nav {
  background: rgba(254, 254, 254, 0.9) !important;
}

body > article, body > footer { position: relative; z-index: 1; }
article > section { width: min(100%, 620px); max-width: 620px; margin-inline: auto; }
.post-date, .post-tags { color: var(--oa-muted) !important; font-size: 0.84rem; }

.code-flow-content {
  font-family: var(--flow-serif);
  font-size: 16px;
  overflow-wrap: break-word;
}

.code-flow-content :is(p, li, dd, dt, blockquote, th, td) {
  font-family: var(--flow-serif) !important;
  font-size: 16px;
  line-height: 2;
}

.code-flow-content p { margin: 0 0 25px !important; }
.code-flow-content :is(h2, h3, h4, h5, h6) {
  color: #111111 !important;
  font-family: var(--flow-serif) !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  letter-spacing: -0.015em !important;
  scroll-margin-top: 90px;
}
.code-flow-content :is(h2, h3) { font-size: 28px !important; margin: 46px 0 25px !important; }
.code-flow-content :is(h4, h5, h6) { font-size: 19px !important; margin: 30px 0 17px !important; }

/* Markdown's top-level title is emitted as h2 by cmarker. */
.code-flow-content > h2:first-child {
  font-family: var(--oa-font) !important;
  font-weight: 560 !important;
  font-size: clamp(2.05rem, 3vw, 3.1rem) !important;
  line-height: 1.2 !important;
  letter-spacing: 0.018em !important;
  margin: 26px 0 32px !important;
}

.code-flow-content :is(strong, b) { color: #171717 !important; font-weight: 700 !important; }
.code-flow-content :is(blockquote, blockquote p, blockquote li) { color: #555555 !important; }
.code-flow-content blockquote { border-left: 1px solid #c6c6c6 !important; letter-spacing: 0; }
.code-flow-content em { color: #555555 !important; }
.code-flow-content a { text-decoration-color: #bcbcbc !important; }
.code-flow-content a:hover { color: #111111 !important; }
.code-flow-content code { color: #536b8c !important; background: #eef1f6 !important; }
.code-flow-content pre {
  --oa-muted: #78859a;
  --oa-faint: #9aa6bb;
  --oa-line: #d6deea;
  --oa-line-soft: #e8ecf2;
  border: 0 !important;
  border-radius: 3px !important;
  color: #536580 !important;
  font-size: 13px;
  line-height: 1.9;
}
.code-flow-content pre code { color: inherit !important; background: transparent !important; }
.code-flow-content pre.has-line-numbers { font-size: 13px; line-height: 1.9; }
.code-flow-content .copy-button { font-family: var(--oa-mono); border: 0; }
.code-flow-content table { display: block; max-width: 100%; overflow-x: auto; }
.code-flow-content :is(th, td) { font-size: 14px; min-width: 6em; }

.code-flow-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 680px) {
  .code-flow-content :is(p, li, dd, dt) { font-size: 15px; }
  .code-flow-content :is(h2, h3) { font-size: 25px !important; }
  .code-flow-content :is(h4, h5, h6) { font-size: 17px !important; }
  .code-flow-content pre.has-line-numbers { font-size: 12px; }
  .code-flow-canvas { opacity: 0.63; }
}

@media print {
  .code-flow-canvas { display: none; }
  .site-header, .site-nav { position: static; }
}
